From b54c47e2e99d0b952f38a069430116a48e231982 Mon Sep 17 00:00:00 2001 From: teh_coderer Date: Wed, 17 May 2023 09:38:13 -0500 Subject: [PATCH] hotfix/ Charts Theme change not persisting (#5036) * revert and fix bug introduced in #4546 * improve theme change in chart, add `theme.apply_style()` to settings_controller/hub config change --- frontend-components/plotly/src/App.tsx | 2 + .../plotly/src/components/Chart.tsx | 20 ++- openbb_terminal/core/plots/backend.py | 2 +- openbb_terminal/core/plots/plotly.html | 166 +++++++++--------- openbb_terminal/core/plots/plotly_helper.py | 5 +- openbb_terminal/core/session/local_model.py | 4 + openbb_terminal/settings_controller.py | 1 + 7 files changed, 107 insertions(+), 93 deletions(-) diff --git a/frontend-components/plotly/src/App.tsx b/frontend-components/plotly/src/App.tsx index 87c4e8f7c77b..632f5351d054 100644 --- a/frontend-components/plotly/src/App.tsx +++ b/frontend-components/plotly/src/App.tsx @@ -98,6 +98,7 @@ function App() { python_version: data.python_version, pywry_version: data.pywry_version, terminal_version: data.terminal_version, + theme: data.theme, title, }; }; @@ -155,6 +156,7 @@ function App() { cmd={transformedData.cmd} title={transformedData.title} globals={transformedData.globals} + theme={transformedData.theme} info={info} /> ); diff --git a/frontend-components/plotly/src/components/Chart.tsx b/frontend-components/plotly/src/components/Chart.tsx index b24e148ad17a..f83da6d388da 100644 --- a/frontend-components/plotly/src/components/Chart.tsx +++ b/frontend-components/plotly/src/components/Chart.tsx @@ -25,6 +25,7 @@ export default function Chart({ cmd, title, globals, + theme, info, }: { // @ts-ignore @@ -33,6 +34,7 @@ export default function Chart({ cmd: string; title: string; globals: any; + theme: string; info?: any; }) { const posthog = usePostHog(); @@ -219,7 +221,7 @@ export default function Chart({ const TRACES = plotData?.data.filter((trace) => trace?.name?.startsWith("Volume") ); - let darkmode = !darkMode; + const darkmode = !darkMode; window.document.body.style.backgroundColor = darkmode ? "#000" : "#fff"; @@ -240,15 +242,19 @@ export default function Chart({ .getElementsByTagName("svg")[0] .setAttribute("viewBox", changeIcon.viewBox); - const volumeColors = { - "#e4003a": "#c80000", - "#00ACFF": "#009600", + const volumeColorsDark = { "#009600": "#00ACFF", "#c80000": "#e4003a", }; + const volumeColorsLight = { + "#e4003a": "#c80000", + "#00ACFF": "#009600", + }; + + const volumeColors = darkmode ? volumeColorsDark : volumeColorsLight; TRACES.forEach((trace) => { - if (trace.type == "bar") + if (trace.type === "bar") trace.marker.color = trace.marker.color.map((color) => { return volumeColors[color] || color; }); @@ -367,6 +373,10 @@ export default function Chart({ Plotly.relayout(plotDiv, layout_update); } }); + + if (theme !== "dark") { + setChangeTheme(true); + } } }, [plotLoaded]); diff --git a/openbb_terminal/core/plots/backend.py b/openbb_terminal/core/plots/backend.py index 0d9ddcc5c6bd..1d05b006c1b1 100644 --- a/openbb_terminal/core/plots/backend.py +++ b/openbb_terminal/core/plots/backend.py @@ -350,7 +350,7 @@ def get_kwargs(self, title: str = "") -> dict: "download_path": str(get_current_user().preferences.USER_EXPORTS_DIRECTORY), } - def start(self, debug: bool = False): + def start(self, debug: bool = False): # pylint: disable=W0221 """Start the backend WindowManager process.""" if self.isatty: super().start(debug) diff --git a/openbb_terminal/core/plots/plotly.html b/openbb_terminal/core/plots/plotly.html index 46f9e898d010..933bf8166bca 100644 --- a/openbb_terminal/core/plots/plotly.html +++ b/openbb_terminal/core/plots/plotly.html @@ -58,7 +58,7 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(P){var F,J,ce,Pe;if(typeof performance=="object"&&typeof performance.now=="function"){var D=performance;P.unstable_now=function(){return D.now()}}else{var E=Date,e=E.now();P.unstable_now=function(){return E.now()-e}}if(typeof window>"u"||typeof MessageChannel!="function"){var _=null,w=null,s=function(){if(_!==null)try{var I=P.unstable_now();_(!0,I),_=null}catch(R){throw setTimeout(s,0),R}};F=function(I){_!==null?setTimeout(F,0,I):(_=I,setTimeout(s,0))},J=function(I,R){w=setTimeout(I,R)},ce=function(){clearTimeout(w)},P.unstable_shouldYield=function(){return!1},Pe=P.unstable_forceFrameRate=function(){}}else{var T=window.setTimeout,y=window.clearTimeout;if(typeof console<"u"){var f=window.cancelAnimationFrame;typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof f!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var l=!1,t=null,i=-1,r=5,n=0;P.unstable_shouldYield=function(){return P.unstable_now()>=n},Pe=function(){},P.unstable_forceFrameRate=function(I){0>I||125>>1,G=I[B];if(G!==void 0&&0b(j,U))H!==void 0&&0>b(H,j)?(I[B]=H,I[V]=U,B=V):(I[B]=j,I[N]=U,B=N);else if(H!==void 0&&0>b(H,U))I[B]=H,I[V]=U,B=V;else break e}}return R}return null}function b(I,R){var U=I.sortIndex-R.sortIndex;return U!==0?U:I.id-R.id}var d=[],v=[],x=1,g=null,m=3,k=!1,h=!1,M=!1;function A(I){for(var R=p(v);R!==null;){if(R.callback===null)c(v);else if(R.startTime<=I)c(v),R.sortIndex=R.expirationTime,u(d,R);else break;R=p(v)}}function C(I){if(M=!1,A(I),!h)if(p(d)!==null)h=!0,F(L);else{var R=p(v);R!==null&&J(C,R.startTime-I)}}function L(I,R){h=!1,M&&(M=!1,ce()),k=!0;var U=m;try{for(A(R),g=p(d);g!==null&&(!(g.expirationTime>R)||I&&!P.unstable_shouldYield());){var B=g.callback;if(typeof B=="function"){g.callback=null,m=g.priorityLevel;var G=B(g.expirationTime<=R);R=P.unstable_now(),typeof G=="function"?g.callback=G:g===p(d)&&c(d),A(R)}else c(d);g=p(d)}if(g!==null)var N=!0;else{var j=p(v);j!==null&&J(C,j.startTime-R),N=!1}return N}finally{g=null,m=U,k=!1}}var O=Pe;P.unstable_IdlePriority=5,P.unstable_ImmediatePriority=1,P.unstable_LowPriority=4,P.unstable_NormalPriority=3,P.unstable_Profiling=null,P.unstable_UserBlockingPriority=2,P.unstable_cancelCallback=function(I){I.callback=null},P.unstable_continueExecution=function(){h||k||(h=!0,F(L))},P.unstable_getCurrentPriorityLevel=function(){return m},P.unstable_getFirstCallbackNode=function(){return p(d)},P.unstable_next=function(I){switch(m){case 1:case 2:case 3:var R=3;break;default:R=m}var U=m;m=R;try{return I()}finally{m=U}},P.unstable_pauseExecution=function(){},P.unstable_requestPaint=O,P.unstable_runWithPriority=function(I,R){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var U=m;m=I;try{return R()}finally{m=U}},P.unstable_scheduleCallback=function(I,R,U){var B=P.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0B?(I.sortIndex=U,u(v,I),p(d)===null&&I===p(v)&&(M?ce():M=!0,J(C,U-B))):(I.sortIndex=G,u(d,I),h||k||(h=!0,F(L))),I},P.unstable_wrapCallback=function(I){var R=m;return function(){var U=m;m=R;try{return I.apply(this,arguments)}finally{m=U}}}})(h_);f_.exports=h_;var j4=f_.exports;/** @license React v17.0.2 + */(function(P){var F,J,ce,Pe;if(typeof performance=="object"&&typeof performance.now=="function"){var D=performance;P.unstable_now=function(){return D.now()}}else{var E=Date,e=E.now();P.unstable_now=function(){return E.now()-e}}if(typeof window>"u"||typeof MessageChannel!="function"){var _=null,w=null,s=function(){if(_!==null)try{var I=P.unstable_now();_(!0,I),_=null}catch(R){throw setTimeout(s,0),R}};F=function(I){_!==null?setTimeout(F,0,I):(_=I,setTimeout(s,0))},J=function(I,R){w=setTimeout(I,R)},ce=function(){clearTimeout(w)},P.unstable_shouldYield=function(){return!1},Pe=P.unstable_forceFrameRate=function(){}}else{var T=window.setTimeout,m=window.clearTimeout;if(typeof console<"u"){var f=window.cancelAnimationFrame;typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof f!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var l=!1,t=null,i=-1,r=5,n=0;P.unstable_shouldYield=function(){return P.unstable_now()>=n},Pe=function(){},P.unstable_forceFrameRate=function(I){0>I||125>>1,G=I[B];if(G!==void 0&&0b(j,U))H!==void 0&&0>b(H,j)?(I[B]=H,I[V]=U,B=V):(I[B]=j,I[N]=U,B=N);else if(H!==void 0&&0>b(H,U))I[B]=H,I[V]=U,B=V;else break e}}return R}return null}function b(I,R){var U=I.sortIndex-R.sortIndex;return U!==0?U:I.id-R.id}var d=[],v=[],x=1,g=null,y=3,k=!1,h=!1,M=!1;function A(I){for(var R=p(v);R!==null;){if(R.callback===null)c(v);else if(R.startTime<=I)c(v),R.sortIndex=R.expirationTime,u(d,R);else break;R=p(v)}}function C(I){if(M=!1,A(I),!h)if(p(d)!==null)h=!0,F(L);else{var R=p(v);R!==null&&J(C,R.startTime-I)}}function L(I,R){h=!1,M&&(M=!1,ce()),k=!0;var U=y;try{for(A(R),g=p(d);g!==null&&(!(g.expirationTime>R)||I&&!P.unstable_shouldYield());){var B=g.callback;if(typeof B=="function"){g.callback=null,y=g.priorityLevel;var G=B(g.expirationTime<=R);R=P.unstable_now(),typeof G=="function"?g.callback=G:g===p(d)&&c(d),A(R)}else c(d);g=p(d)}if(g!==null)var N=!0;else{var j=p(v);j!==null&&J(C,j.startTime-R),N=!1}return N}finally{g=null,y=U,k=!1}}var O=Pe;P.unstable_IdlePriority=5,P.unstable_ImmediatePriority=1,P.unstable_LowPriority=4,P.unstable_NormalPriority=3,P.unstable_Profiling=null,P.unstable_UserBlockingPriority=2,P.unstable_cancelCallback=function(I){I.callback=null},P.unstable_continueExecution=function(){h||k||(h=!0,F(L))},P.unstable_getCurrentPriorityLevel=function(){return y},P.unstable_getFirstCallbackNode=function(){return p(d)},P.unstable_next=function(I){switch(y){case 1:case 2:case 3:var R=3;break;default:R=y}var U=y;y=R;try{return I()}finally{y=U}},P.unstable_pauseExecution=function(){},P.unstable_requestPaint=O,P.unstable_runWithPriority=function(I,R){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var U=y;y=I;try{return R()}finally{y=U}},P.unstable_scheduleCallback=function(I,R,U){var B=P.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0B?(I.sortIndex=U,u(v,I),p(d)===null&&I===p(v)&&(M?ce():M=!0,J(C,U-B))):(I.sortIndex=G,u(d,I),h||k||(h=!0,F(L))),I},P.unstable_wrapCallback=function(I){var R=y;return function(){var U=y;y=R;try{return I.apply(this,arguments)}finally{y=U}}}})(h_);f_.exports=h_;var j4=f_.exports;/** @license React v17.0.2 * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. @@ -69,24 +69,24 @@ `+ng+P}var rg=!1;function zd(P,F){if(!P||rg)return"";rg=!0;var J=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(F)if(F=function(){throw Error()},Object.defineProperty(F.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(F,[])}catch(_){var ce=_}Reflect.construct(P,[],F)}else{try{F.call()}catch(_){ce=_}P.call(F.prototype)}else{try{throw Error()}catch(_){ce=_}P()}}catch(_){if(_&&ce&&typeof _.stack=="string"){for(var Pe=_.stack.split(` `),D=ce.stack.split(` `),E=Pe.length-1,e=D.length-1;1<=E&&0<=e&&Pe[E]!==D[e];)e--;for(;1<=E&&0<=e;E--,e--)if(Pe[E]!==D[e]){if(E!==1||e!==1)do if(E--,e--,0>e||Pe[E]!==D[e])return` -`+Pe[E].replace(" at new "," at ");while(1<=E&&0<=e);break}}}finally{rg=!1,Error.prepareStackTrace=J}return(P=P?P.displayName||P.name:"")?np(P):""}function G4(P){switch(P.tag){case 5:return np(P.type);case 16:return np("Lazy");case 13:return np("Suspense");case 19:return np("SuspenseList");case 0:case 2:case 15:return P=zd(P.type,!1),P;case 11:return P=zd(P.type.render,!1),P;case 22:return P=zd(P.type._render,!1),P;case 1:return P=zd(P.type,!0),P;default:return""}}function Zf(P){if(P==null)return null;if(typeof P=="function")return P.displayName||P.name||null;if(typeof P=="string")return P;switch(P){case tc:return"Fragment";case Xc:return"Portal";case lp:return"Profiler";case nm:return"StrictMode";case up:return"Suspense";case x0:return"SuspenseList"}if(typeof P=="object")switch(P.$$typeof){case im:return(P.displayName||"Context")+".Consumer";case rm:return(P._context.displayName||"Context")+".Provider";case X0:var F=P.render;return F=F.displayName||F.name||"",P.displayName||(F!==""?"ForwardRef("+F+")":"ForwardRef");case $0:return Zf(P.type);case om:return Zf(P._render);case am:F=P._payload,P=P._init;try{return Zf(P(F))}catch{}}return null}function bc(P){switch(typeof P){case"boolean":case"number":case"object":case"string":case"undefined":return P;default:return""}}function g_(P){var F=P.type;return(P=P.nodeName)&&P.toLowerCase()==="input"&&(F==="checkbox"||F==="radio")}function W4(P){var F=g_(P)?"checked":"value",J=Object.getOwnPropertyDescriptor(P.constructor.prototype,F),ce=""+P[F];if(!P.hasOwnProperty(F)&&typeof J<"u"&&typeof J.get=="function"&&typeof J.set=="function"){var Pe=J.get,D=J.set;return Object.defineProperty(P,F,{configurable:!0,get:function(){return Pe.call(this)},set:function(E){ce=""+E,D.call(this,E)}}),Object.defineProperty(P,F,{enumerable:J.enumerable}),{getValue:function(){return ce},setValue:function(E){ce=""+E},stopTracking:function(){P._valueTracker=null,delete P[F]}}}}function Dd(P){P._valueTracker||(P._valueTracker=W4(P))}function v_(P){if(!P)return!1;var F=P._valueTracker;if(!F)return!0;var J=F.getValue(),ce="";return P&&(ce=g_(P)?P.checked?"true":"false":P.value),P=ce,P!==J?(F.setValue(P),!0):!1}function b0(P){if(P=P||(typeof document<"u"?document:void 0),typeof P>"u")return null;try{return P.activeElement||P.body}catch{return P.body}}function Ug(P,F){var J=F.checked;return da({},F,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:J??P._wrapperState.initialChecked})}function qx(P,F){var J=F.defaultValue==null?"":F.defaultValue,ce=F.checked!=null?F.checked:F.defaultChecked;J=bc(F.value!=null?F.value:J),P._wrapperState={initialChecked:ce,initialValue:J,controlled:F.type==="checkbox"||F.type==="radio"?F.checked!=null:F.value!=null}}function m_(P,F){F=F.checked,F!=null&&tm(P,"checked",F,!1)}function Vg(P,F){m_(P,F);var J=bc(F.value),ce=F.type;if(J!=null)ce==="number"?(J===0&&P.value===""||P.value!=J)&&(P.value=""+J):P.value!==""+J&&(P.value=""+J);else if(ce==="submit"||ce==="reset"){P.removeAttribute("value");return}F.hasOwnProperty("value")?Hg(P,F.type,J):F.hasOwnProperty("defaultValue")&&Hg(P,F.type,bc(F.defaultValue)),F.checked==null&&F.defaultChecked!=null&&(P.defaultChecked=!!F.defaultChecked)}function Gx(P,F,J){if(F.hasOwnProperty("value")||F.hasOwnProperty("defaultValue")){var ce=F.type;if(!(ce!=="submit"&&ce!=="reset"||F.value!==void 0&&F.value!==null))return;F=""+P._wrapperState.initialValue,J||F===P.value||(P.value=F),P.defaultValue=F}J=P.name,J!==""&&(P.name=""),P.defaultChecked=!!P._wrapperState.initialChecked,J!==""&&(P.name=J)}function Hg(P,F,J){(F!=="number"||b0(P.ownerDocument)!==P)&&(J==null?P.defaultValue=""+P._wrapperState.initialValue:P.defaultValue!==""+J&&(P.defaultValue=""+J))}function Z4(P){var F="";return Y0.Children.forEach(P,function(J){J!=null&&(F+=J)}),F}function qg(P,F){return P=da({children:void 0},F),(F=Z4(F.children))&&(P.children=F),P}function Yf(P,F,J,ce){if(P=P.options,F){F={};for(var Pe=0;Pe=J.length))throw Error(Dr(93));J=J[0]}F=J}F==null&&(F=""),J=F}P._wrapperState={initialValue:bc(J)}}function y_(P,F){var J=bc(F.value),ce=bc(F.defaultValue);J!=null&&(J=""+J,J!==P.value&&(P.value=J),F.defaultValue==null&&P.defaultValue!==J&&(P.defaultValue=J)),ce!=null&&(P.defaultValue=""+ce)}function Zx(P){var F=P.textContent;F===P._wrapperState.initialValue&&F!==""&&F!==null&&(P.value=F)}var Wg={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function x_(P){switch(P){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Zg(P,F){return P==null||P==="http://www.w3.org/1999/xhtml"?x_(F):P==="http://www.w3.org/2000/svg"&&F==="foreignObject"?"http://www.w3.org/1999/xhtml":P}var Fd,b_=function(P){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(F,J,ce,Pe){MSApp.execUnsafeLocalFunction(function(){return P(F,J,ce,Pe)})}:P}(function(P,F){if(P.namespaceURI!==Wg.svg||"innerHTML"in P)P.innerHTML=F;else{for(Fd=Fd||document.createElement("div"),Fd.innerHTML=""+F.valueOf().toString()+"",F=Fd.firstChild;P.firstChild;)P.removeChild(P.firstChild);for(;F.firstChild;)P.appendChild(F.firstChild)}});function Tp(P,F){if(F){var J=P.firstChild;if(J&&J===P.lastChild&&J.nodeType===3){J.nodeValue=F;return}}P.textContent=F}var cp={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Y4=["Webkit","ms","Moz","O"];Object.keys(cp).forEach(function(P){Y4.forEach(function(F){F=F+P.charAt(0).toUpperCase()+P.substring(1),cp[F]=cp[P]})});function __(P,F,J){return F==null||typeof F=="boolean"||F===""?"":J||typeof F!="number"||F===0||cp.hasOwnProperty(P)&&cp[P]?(""+F).trim():F+"px"}function w_(P,F){P=P.style;for(var J in F)if(F.hasOwnProperty(J)){var ce=J.indexOf("--")===0,Pe=__(J,F[J],ce);J==="float"&&(J="cssFloat"),ce?P.setProperty(J,Pe):P[J]=Pe}}var X4=da({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Yg(P,F){if(F){if(X4[P]&&(F.children!=null||F.dangerouslySetInnerHTML!=null))throw Error(Dr(137,P));if(F.dangerouslySetInnerHTML!=null){if(F.children!=null)throw Error(Dr(60));if(!(typeof F.dangerouslySetInnerHTML=="object"&&"__html"in F.dangerouslySetInnerHTML))throw Error(Dr(61))}if(F.style!=null&&typeof F.style!="object")throw Error(Dr(62))}}function Xg(P,F){if(P.indexOf("-")===-1)return typeof F.is=="string";switch(P){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function um(P){return P=P.target||P.srcElement||window,P.correspondingUseElement&&(P=P.correspondingUseElement),P.nodeType===3?P.parentNode:P}var $g=null,Xf=null,$f=null;function Yx(P){if(P=qp(P)){if(typeof $g!="function")throw Error(Dr(280));var F=P.stateNode;F&&(F=n1(F),$g(P.stateNode,P.type,F))}}function T_(P){Xf?$f?$f.push(P):$f=[P]:Xf=P}function k_(){if(Xf){var P=Xf,F=$f;if($f=Xf=null,Yx(P),F)for(P=0;Pce?0:1<J;J++)F.push(P);return F}function K0(P,F,J){P.pendingLanes|=F;var ce=F-1;P.suspendedLanes&=ce,P.pingedLanes&=ce,P=P.eventTimes,F=31-_c(F),P[F]=J}var _c=Math.clz32?Math.clz32:f6,u6=Math.log,c6=Math.LN2;function f6(P){return P===0?32:31-(u6(P)/c6|0)|0}var h6=xo.unstable_UserBlockingPriority,p6=xo.unstable_runWithPriority,i0=!0;function d6(P,F,J,ce){$c||fm();var Pe=vm,D=$c;$c=!0;try{A_(Pe,P,F,J,ce)}finally{($c=D)||hm()}}function g6(P,F,J,ce){p6(h6,vm.bind(null,P,F,J,ce))}function vm(P,F,J,ce){if(i0){var Pe;if((Pe=(F&4)===0)&&0=hp),i2=String.fromCharCode(32),a2=!1;function V_(P,F){switch(P){case"keyup":return B6.indexOf(F.keyCode)!==-1;case"keydown":return F.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function H_(P){return P=P.detail,typeof P=="object"&&"data"in P?P.data:null}var Uf=!1;function j6(P,F){switch(P){case"compositionend":return H_(F);case"keypress":return F.which!==32?null:(a2=!0,i2);case"textInput":return P=F.data,P===i2&&a2?null:P;default:return null}}function U6(P,F){if(Uf)return P==="compositionend"||!_m&&V_(P,F)?(P=j_(),a0=ym=ic=null,Uf=!1,P):null;switch(P){case"paste":return null;case"keypress":if(!(F.ctrlKey||F.altKey||F.metaKey)||F.ctrlKey&&F.altKey){if(F.char&&1=F)return{node:J,offset:F-P};P=ce}e:{for(;J;){if(J.nextSibling){J=J.nextSibling;break e}J=J.parentNode}J=void 0}J=u2(J)}}function Z_(P,F){return P&&F?P===F?!0:P&&P.nodeType===3?!1:F&&F.nodeType===3?Z_(P,F.parentNode):"contains"in P?P.contains(F):P.compareDocumentPosition?!!(P.compareDocumentPosition(F)&16):!1:!1}function f2(){for(var P=window,F=b0();F instanceof P.HTMLIFrameElement;){try{var J=typeof F.contentWindow.location.href=="string"}catch{J=!1}if(J)P=F.contentWindow;else break;F=b0(P.document)}return F}function tv(P){var F=P&&P.nodeName&&P.nodeName.toLowerCase();return F&&(F==="input"&&(P.type==="text"||P.type==="search"||P.type==="tel"||P.type==="url"||P.type==="password")||F==="textarea"||P.contentEditable==="true")}var J6=Bu&&"documentMode"in document&&11>=document.documentMode,Vf=null,nv=null,dp=null,rv=!1;function h2(P,F,J){var ce=J.window===J?J.document:J.nodeType===9?J:J.ownerDocument;rv||Vf==null||Vf!==b0(ce)||(ce=Vf,"selectionStart"in ce&&tv(ce)?ce={start:ce.selectionStart,end:ce.selectionEnd}:(ce=(ce.ownerDocument&&ce.ownerDocument.defaultView||window).getSelection(),ce={anchorNode:ce.anchorNode,anchorOffset:ce.anchorOffset,focusNode:ce.focusNode,focusOffset:ce.focusOffset}),dp&&Cp(dp,ce)||(dp=ce,ce=k0(nv,"onSelect"),0qf||(P.current=av[qf],av[qf]=null,qf--)}function Pa(P,F){qf++,av[qf]=P.current,P.current=F}var wc={},Go=Mc(wc),Es=Mc(!1),af=wc;function ih(P,F){var J=P.type.contextTypes;if(!J)return wc;var ce=P.stateNode;if(ce&&ce.__reactInternalMemoizedUnmaskedChildContext===F)return ce.__reactInternalMemoizedMaskedChildContext;var Pe={},D;for(D in J)Pe[D]=F[D];return ce&&(P=P.stateNode,P.__reactInternalMemoizedUnmaskedChildContext=F,P.__reactInternalMemoizedMaskedChildContext=Pe),Pe}function Cs(P){return P=P.childContextTypes,P!=null}function S0(){ca(Es),ca(Go)}function _2(P,F,J){if(Go.current!==wc)throw Error(Dr(168));Pa(Go,F),Pa(Es,J)}function t3(P,F,J){var ce=P.stateNode;if(P=F.childContextTypes,typeof ce.getChildContext!="function")return J;ce=ce.getChildContext();for(var Pe in ce)if(!(Pe in P))throw Error(Dr(108,Zf(F)||"Unknown",Pe));return da({},J,ce)}function s0(P){return P=(P=P.stateNode)&&P.__reactInternalMemoizedMergedChildContext||wc,af=Go.current,Pa(Go,P),Pa(Es,Es.current),!0}function w2(P,F,J){var ce=P.stateNode;if(!ce)throw Error(Dr(169));J?(P=t3(P,F,af),ce.__reactInternalMemoizedMergedChildContext=P,ca(Es),ca(Go),Pa(Go,P)):ca(Es),Pa(Es,J)}var Tm=null,ef=null,e8=xo.unstable_runWithPriority,km=xo.unstable_scheduleCallback,ov=xo.unstable_cancelCallback,t8=xo.unstable_shouldYield,T2=xo.unstable_requestPaint,sv=xo.unstable_now,n8=xo.unstable_getCurrentPriorityLevel,r1=xo.unstable_ImmediatePriority,n3=xo.unstable_UserBlockingPriority,r3=xo.unstable_NormalPriority,i3=xo.unstable_LowPriority,a3=xo.unstable_IdlePriority,vg={},r8=T2!==void 0?T2:function(){},Ou=null,l0=null,mg=!1,k2=sv(),Ho=1e4>k2?sv:function(){return sv()-k2};function ah(){switch(n8()){case r1:return 99;case n3:return 98;case r3:return 97;case i3:return 96;case a3:return 95;default:throw Error(Dr(332))}}function o3(P){switch(P){case 99:return r1;case 98:return n3;case 97:return r3;case 96:return i3;case 95:return a3;default:throw Error(Dr(332))}}function of(P,F){return P=o3(P),e8(P,F)}function Pp(P,F,J){return P=o3(P),km(P,F,J)}function hu(){if(l0!==null){var P=l0;l0=null,ov(P)}s3()}function s3(){if(!mg&&Ou!==null){mg=!0;var P=0;try{var F=Ou;of(99,function(){for(;Pc?(b=p,p=null):b=p.sibling;var d=y(i,p,n[c],o);if(d===null){p===null&&(p=b);break}P&&p&&d.alternate===null&&F(i,p),r=D(d,r,c),u===null?a=d:u.sibling=d,u=d,p=b}if(c===n.length)return J(i,p),a;if(p===null){for(;cc?(b=p,p=null):b=p.sibling;var v=y(i,p,d.value,o);if(v===null){p===null&&(p=b);break}P&&p&&v.alternate===null&&F(i,p),r=D(v,r,c),u===null?a=v:u.sibling=v,u=v,p=b}if(d.done)return J(i,p),a;if(p===null){for(;!d.done;c++,d=n.next())d=T(i,d.value,o),d!==null&&(r=D(d,r,c),u===null?a=d:u.sibling=d,u=d);return a}for(p=ce(i,p);!d.done;c++,d=n.next())d=f(p,i,c,d.value,o),d!==null&&(P&&d.alternate!==null&&p.delete(d.key===null?c:d.key),r=D(d,r,c),u===null?a=d:u.sibling=d,u=d);return P&&p.forEach(function(x){return F(i,x)}),a}return function(i,r,n,o){var a=typeof n=="object"&&n!==null&&n.type===tc&&n.key===null;a&&(n=n.props.children);var u=typeof n=="object"&&n!==null;if(u)switch(n.$$typeof){case tp:e:{for(u=n.key,a=r;a!==null;){if(a.key===u){switch(a.tag){case 7:if(n.type===tc){J(i,a.sibling),r=Pe(a,n.props.children),r.return=i,i=r;break e}break;default:if(a.elementType===n.type){J(i,a.sibling),r=Pe(a,n.props),r.ref=Zh(i,a,n),r.return=i,i=r;break e}}J(i,a);break}else F(i,a);a=a.sibling}n.type===tc?(r=nh(n.props.children,i.mode,o,n.key),r.return=i,i=r):(o=h0(n.type,n.key,n.props,null,i.mode,o),o.ref=Zh(i,r,n),o.return=i,i=o)}return E(i);case Xc:e:{for(a=n.key;r!==null;){if(r.key===a)if(r.tag===4&&r.stateNode.containerInfo===n.containerInfo&&r.stateNode.implementation===n.implementation){J(i,r.sibling),r=Pe(r,n.children||[]),r.return=i,i=r;break e}else{J(i,r);break}else F(i,r);r=r.sibling}r=Tg(n,i.mode,o),r.return=i,i=r}return E(i)}if(typeof n=="string"||typeof n=="number")return n=""+n,r!==null&&r.tag===6?(J(i,r.sibling),r=Pe(r,n),r.return=i,i=r):(J(i,r),r=wg(n,i.mode,o),r.return=i,i=r),E(i);if(jd(n))return l(i,r,n,o);if(Uh(n))return t(i,r,n,o);if(u&&Ud(i,n),typeof n>"u"&&!a)switch(i.tag){case 1:case 22:case 0:case 11:case 15:throw Error(Dr(152,Zf(i.type)||"Component"))}return J(i,r)}}var O0=h3(!0),p3=h3(!1),Gp={},uu=Mc(Gp),Ip=Mc(Gp),Rp=Mc(Gp);function Kc(P){if(P===Gp)throw Error(Dr(174));return P}function uv(P,F){switch(Pa(Rp,F),Pa(Ip,P),Pa(uu,Gp),P=F.nodeType,P){case 9:case 11:F=(F=F.documentElement)?F.namespaceURI:Zg(null,"");break;default:P=P===8?F.parentNode:F,F=P.namespaceURI||null,P=P.tagName,F=Zg(F,P)}ca(uu),Pa(uu,F)}function oh(){ca(uu),ca(Ip),ca(Rp)}function C2(P){Kc(Rp.current);var F=Kc(uu.current),J=Zg(F,P.type);F!==J&&(Pa(Ip,P),Pa(uu,J))}function Em(P){Ip.current===P&&(ca(uu),ca(Ip))}var La=Mc(0);function I0(P){for(var F=P;F!==null;){if(F.tag===13){var J=F.memoizedState;if(J!==null&&(J=J.dehydrated,J===null||J.data==="$?"||J.data==="$!"))return F}else if(F.tag===19&&F.memoizedProps.revealOrder!==void 0){if(F.flags&64)return F}else if(F.child!==null){F.child.return=F,F=F.child;continue}if(F===P)break;for(;F.sibling===null;){if(F.return===null||F.return===P)return null;F=F.return}F.sibling.return=F.return,F=F.sibling}return null}var zu=null,oc=null,cu=!1;function d3(P,F){var J=hl(5,null,null,0);J.elementType="DELETED",J.type="DELETED",J.stateNode=F,J.return=P,J.flags=8,P.lastEffect!==null?(P.lastEffect.nextEffect=J,P.lastEffect=J):P.firstEffect=P.lastEffect=J}function L2(P,F){switch(P.tag){case 5:var J=P.type;return F=F.nodeType!==1||J.toLowerCase()!==F.nodeName.toLowerCase()?null:F,F!==null?(P.stateNode=F,!0):!1;case 6:return F=P.pendingProps===""||F.nodeType!==3?null:F,F!==null?(P.stateNode=F,!0):!1;case 13:return!1;default:return!1}}function cv(P){if(cu){var F=oc;if(F){var J=F;if(!L2(P,F)){if(F=Jf(J.nextSibling),!F||!L2(P,F)){P.flags=P.flags&-1025|2,cu=!1,zu=P;return}d3(zu,J)}zu=P,oc=Jf(F.firstChild)}else P.flags=P.flags&-1025|2,cu=!1,zu=P}}function P2(P){for(P=P.return;P!==null&&P.tag!==5&&P.tag!==3&&P.tag!==13;)P=P.return;zu=P}function Vd(P){if(P!==zu)return!1;if(!cu)return P2(P),cu=!0,!1;var F=P.type;if(P.tag!==5||F!=="head"&&F!=="body"&&!iv(F,P.memoizedProps))for(F=oc;F;)d3(P,F),F=Jf(F.nextSibling);if(P2(P),P.tag===13){if(P=P.memoizedState,P=P!==null?P.dehydrated:null,!P)throw Error(Dr(317));e:{for(P=P.nextSibling,F=0;P;){if(P.nodeType===8){var J=P.data;if(J==="/$"){if(F===0){oc=Jf(P.nextSibling);break e}F--}else J!=="$"&&J!=="$!"&&J!=="$?"||F++}P=P.nextSibling}oc=null}}else oc=zu?Jf(P.stateNode.nextSibling):null;return!0}function yg(){oc=zu=null,cu=!1}var Qf=[];function Cm(){for(var P=0;PD))throw Error(Dr(301));D+=1,Co=Uo=null,F.updateQueue=null,gp.current=l8,P=J(ce,Pe)}while(vp)}if(gp.current=B0,F=Uo!==null&&Uo.next!==null,zp=0,Co=Uo=Ha=null,R0=!1,F)throw Error(Dr(300));return P}function Qc(){var P={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Co===null?Ha.memoizedState=Co=P:Co=Co.next=P,Co}function pf(){if(Uo===null){var P=Ha.alternate;P=P!==null?P.memoizedState:null}else P=Uo.next;var F=Co===null?Ha.memoizedState:Co.next;if(F!==null)Co=F,Uo=P;else{if(P===null)throw Error(Dr(310));Uo=P,P={memoizedState:Uo.memoizedState,baseState:Uo.baseState,baseQueue:Uo.baseQueue,queue:Uo.queue,next:null},Co===null?Ha.memoizedState=Co=P:Co=Co.next=P}return Co}function ou(P,F){return typeof F=="function"?F(P):F}function Yh(P){var F=pf(),J=F.queue;if(J===null)throw Error(Dr(311));J.lastRenderedReducer=P;var ce=Uo,Pe=ce.baseQueue,D=J.pending;if(D!==null){if(Pe!==null){var E=Pe.next;Pe.next=D.next,D.next=E}ce.baseQueue=Pe=D,J.pending=null}if(Pe!==null){Pe=Pe.next,ce=ce.baseState;var e=E=D=null,_=Pe;do{var w=_.lane;if((zp&w)===w)e!==null&&(e=e.next={lane:0,action:_.action,eagerReducer:_.eagerReducer,eagerState:_.eagerState,next:null}),ce=_.eagerReducer===P?_.eagerState:P(ce,_.action);else{var s={lane:w,action:_.action,eagerReducer:_.eagerReducer,eagerState:_.eagerState,next:null};e===null?(E=e=s,D=ce):e=e.next=s,Ha.lanes|=w,Wp|=w}_=_.next}while(_!==null&&_!==Pe);e===null?D=ce:e.next=E,fl(ce,F.memoizedState)||(jl=!0),F.memoizedState=ce,F.baseState=D,F.baseQueue=e,J.lastRenderedState=ce}return[F.memoizedState,J.dispatch]}function Xh(P){var F=pf(),J=F.queue;if(J===null)throw Error(Dr(311));J.lastRenderedReducer=P;var ce=J.dispatch,Pe=J.pending,D=F.memoizedState;if(Pe!==null){J.pending=null;var E=Pe=Pe.next;do D=P(D,E.action),E=E.next;while(E!==Pe);fl(D,F.memoizedState)||(jl=!0),F.memoizedState=D,F.baseQueue===null&&(F.baseState=D),J.lastRenderedState=D}return[D,ce]}function O2(P,F,J){var ce=F._getVersion;ce=ce(F._source);var Pe=F._workInProgressVersionPrimary;if(Pe!==null?P=Pe===ce:(P=P.mutableReadLanes,(P=(zp&P)===P)&&(F._workInProgressVersionPrimary=ce,Qf.push(F))),P)return J(F._source);throw Qf.push(F),Error(Dr(350))}function g3(P,F,J,ce){var Pe=us;if(Pe===null)throw Error(Dr(349));var D=F._getVersion,E=D(F._source),e=gp.current,_=e.useState(function(){return O2(Pe,F,J)}),w=_[1],s=_[0];_=Co;var T=P.memoizedState,y=T.refs,f=y.getSnapshot,l=T.source;T=T.subscribe;var t=Ha;return P.memoizedState={refs:y,source:F,subscribe:ce},e.useEffect(function(){y.getSnapshot=J,y.setSnapshot=w;var i=D(F._source);if(!fl(E,i)){i=J(F._source),fl(s,i)||(w(i),i=dc(t),Pe.mutableReadLanes|=i&Pe.pendingLanes),i=Pe.mutableReadLanes,Pe.entangledLanes|=i;for(var r=Pe.entanglements,n=i;0J?98:J,function(){P(!0)}),of(97<\/script>",P=P.removeChild(P.firstChild)):typeof ce.is=="string"?P=E.createElement(J,{is:ce.is}):(P=E.createElement(J),J==="select"&&(E=P,ce.multiple?E.multiple=!0:ce.size&&(E.size=ce.size))):P=E.createElementNS(P,J),P[ac]=F,P[M0]=ce,k3(P,F,!1,!1),F.stateNode=P,E=Xg(J,ce),J){case"dialog":la("cancel",P),la("close",P),Pe=ce;break;case"iframe":case"object":case"embed":la("load",P),Pe=ce;break;case"video":case"audio":for(Pe=0;Pebv&&(F.flags|=64,D=!0,Jh(ce,!1),F.lanes=33554432)}else{if(!D)if(P=I0(E),P!==null){if(F.flags|=64,D=!0,J=P.updateQueue,J!==null&&(F.updateQueue=J,F.flags|=4),Jh(ce,!0),ce.tail===null&&ce.tailMode==="hidden"&&!E.alternate&&!cu)return F=F.lastEffect=ce.lastEffect,F!==null&&(F.nextEffect=null),null}else 2*Ho()-ce.renderingStartTime>bv&&J!==1073741824&&(F.flags|=64,D=!0,Jh(ce,!1),F.lanes=33554432);ce.isBackwards?(E.sibling=F.child,F.child=E):(J=ce.last,J!==null?J.sibling=E:F.child=E,ce.last=E)}return ce.tail!==null?(J=ce.tail,ce.rendering=J,ce.tail=J.sibling,ce.lastEffect=F.lastEffect,ce.renderingStartTime=Ho(),J.sibling=null,F=La.current,Pa(La,D?F&1|2:F&1),J):null;case 23:case 24:return Nm(),P!==null&&P.memoizedState!==null!=(F.memoizedState!==null)&&ce.mode!=="unstable-defer-without-hiding"&&(F.flags|=4),null}throw Error(Dr(156,F.tag))}function f8(P){switch(P.tag){case 1:Cs(P.type)&&S0();var F=P.flags;return F&4096?(P.flags=F&-4097|64,P):null;case 3:if(oh(),ca(Es),ca(Go),Cm(),F=P.flags,F&64)throw Error(Dr(285));return P.flags=F&-4097|64,P;case 5:return Em(P),null;case 13:return ca(La),F=P.flags,F&4096?(P.flags=F&-4097|64,P):null;case 19:return ca(La),null;case 4:return oh(),null;case 10:return Mm(P),null;case 23:case 24:return Nm(),null;default:return null}}function zm(P,F){try{var J="",ce=F;do J+=G4(ce),ce=ce.return;while(ce);var Pe=J}catch(D){Pe=` +`+Pe[E].replace(" at new "," at ");while(1<=E&&0<=e);break}}}finally{rg=!1,Error.prepareStackTrace=J}return(P=P?P.displayName||P.name:"")?np(P):""}function G4(P){switch(P.tag){case 5:return np(P.type);case 16:return np("Lazy");case 13:return np("Suspense");case 19:return np("SuspenseList");case 0:case 2:case 15:return P=zd(P.type,!1),P;case 11:return P=zd(P.type.render,!1),P;case 22:return P=zd(P.type._render,!1),P;case 1:return P=zd(P.type,!0),P;default:return""}}function Zf(P){if(P==null)return null;if(typeof P=="function")return P.displayName||P.name||null;if(typeof P=="string")return P;switch(P){case tc:return"Fragment";case Xc:return"Portal";case lp:return"Profiler";case nm:return"StrictMode";case up:return"Suspense";case x0:return"SuspenseList"}if(typeof P=="object")switch(P.$$typeof){case im:return(P.displayName||"Context")+".Consumer";case rm:return(P._context.displayName||"Context")+".Provider";case X0:var F=P.render;return F=F.displayName||F.name||"",P.displayName||(F!==""?"ForwardRef("+F+")":"ForwardRef");case $0:return Zf(P.type);case om:return Zf(P._render);case am:F=P._payload,P=P._init;try{return Zf(P(F))}catch{}}return null}function bc(P){switch(typeof P){case"boolean":case"number":case"object":case"string":case"undefined":return P;default:return""}}function g_(P){var F=P.type;return(P=P.nodeName)&&P.toLowerCase()==="input"&&(F==="checkbox"||F==="radio")}function W4(P){var F=g_(P)?"checked":"value",J=Object.getOwnPropertyDescriptor(P.constructor.prototype,F),ce=""+P[F];if(!P.hasOwnProperty(F)&&typeof J<"u"&&typeof J.get=="function"&&typeof J.set=="function"){var Pe=J.get,D=J.set;return Object.defineProperty(P,F,{configurable:!0,get:function(){return Pe.call(this)},set:function(E){ce=""+E,D.call(this,E)}}),Object.defineProperty(P,F,{enumerable:J.enumerable}),{getValue:function(){return ce},setValue:function(E){ce=""+E},stopTracking:function(){P._valueTracker=null,delete P[F]}}}}function Dd(P){P._valueTracker||(P._valueTracker=W4(P))}function v_(P){if(!P)return!1;var F=P._valueTracker;if(!F)return!0;var J=F.getValue(),ce="";return P&&(ce=g_(P)?P.checked?"true":"false":P.value),P=ce,P!==J?(F.setValue(P),!0):!1}function b0(P){if(P=P||(typeof document<"u"?document:void 0),typeof P>"u")return null;try{return P.activeElement||P.body}catch{return P.body}}function Ug(P,F){var J=F.checked;return da({},F,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:J??P._wrapperState.initialChecked})}function qx(P,F){var J=F.defaultValue==null?"":F.defaultValue,ce=F.checked!=null?F.checked:F.defaultChecked;J=bc(F.value!=null?F.value:J),P._wrapperState={initialChecked:ce,initialValue:J,controlled:F.type==="checkbox"||F.type==="radio"?F.checked!=null:F.value!=null}}function m_(P,F){F=F.checked,F!=null&&tm(P,"checked",F,!1)}function Vg(P,F){m_(P,F);var J=bc(F.value),ce=F.type;if(J!=null)ce==="number"?(J===0&&P.value===""||P.value!=J)&&(P.value=""+J):P.value!==""+J&&(P.value=""+J);else if(ce==="submit"||ce==="reset"){P.removeAttribute("value");return}F.hasOwnProperty("value")?Hg(P,F.type,J):F.hasOwnProperty("defaultValue")&&Hg(P,F.type,bc(F.defaultValue)),F.checked==null&&F.defaultChecked!=null&&(P.defaultChecked=!!F.defaultChecked)}function Gx(P,F,J){if(F.hasOwnProperty("value")||F.hasOwnProperty("defaultValue")){var ce=F.type;if(!(ce!=="submit"&&ce!=="reset"||F.value!==void 0&&F.value!==null))return;F=""+P._wrapperState.initialValue,J||F===P.value||(P.value=F),P.defaultValue=F}J=P.name,J!==""&&(P.name=""),P.defaultChecked=!!P._wrapperState.initialChecked,J!==""&&(P.name=J)}function Hg(P,F,J){(F!=="number"||b0(P.ownerDocument)!==P)&&(J==null?P.defaultValue=""+P._wrapperState.initialValue:P.defaultValue!==""+J&&(P.defaultValue=""+J))}function Z4(P){var F="";return Y0.Children.forEach(P,function(J){J!=null&&(F+=J)}),F}function qg(P,F){return P=da({children:void 0},F),(F=Z4(F.children))&&(P.children=F),P}function Yf(P,F,J,ce){if(P=P.options,F){F={};for(var Pe=0;Pe=J.length))throw Error(Dr(93));J=J[0]}F=J}F==null&&(F=""),J=F}P._wrapperState={initialValue:bc(J)}}function y_(P,F){var J=bc(F.value),ce=bc(F.defaultValue);J!=null&&(J=""+J,J!==P.value&&(P.value=J),F.defaultValue==null&&P.defaultValue!==J&&(P.defaultValue=J)),ce!=null&&(P.defaultValue=""+ce)}function Zx(P){var F=P.textContent;F===P._wrapperState.initialValue&&F!==""&&F!==null&&(P.value=F)}var Wg={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function x_(P){switch(P){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Zg(P,F){return P==null||P==="http://www.w3.org/1999/xhtml"?x_(F):P==="http://www.w3.org/2000/svg"&&F==="foreignObject"?"http://www.w3.org/1999/xhtml":P}var Fd,b_=function(P){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(F,J,ce,Pe){MSApp.execUnsafeLocalFunction(function(){return P(F,J,ce,Pe)})}:P}(function(P,F){if(P.namespaceURI!==Wg.svg||"innerHTML"in P)P.innerHTML=F;else{for(Fd=Fd||document.createElement("div"),Fd.innerHTML=""+F.valueOf().toString()+"",F=Fd.firstChild;P.firstChild;)P.removeChild(P.firstChild);for(;F.firstChild;)P.appendChild(F.firstChild)}});function Tp(P,F){if(F){var J=P.firstChild;if(J&&J===P.lastChild&&J.nodeType===3){J.nodeValue=F;return}}P.textContent=F}var cp={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Y4=["Webkit","ms","Moz","O"];Object.keys(cp).forEach(function(P){Y4.forEach(function(F){F=F+P.charAt(0).toUpperCase()+P.substring(1),cp[F]=cp[P]})});function __(P,F,J){return F==null||typeof F=="boolean"||F===""?"":J||typeof F!="number"||F===0||cp.hasOwnProperty(P)&&cp[P]?(""+F).trim():F+"px"}function w_(P,F){P=P.style;for(var J in F)if(F.hasOwnProperty(J)){var ce=J.indexOf("--")===0,Pe=__(J,F[J],ce);J==="float"&&(J="cssFloat"),ce?P.setProperty(J,Pe):P[J]=Pe}}var X4=da({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Yg(P,F){if(F){if(X4[P]&&(F.children!=null||F.dangerouslySetInnerHTML!=null))throw Error(Dr(137,P));if(F.dangerouslySetInnerHTML!=null){if(F.children!=null)throw Error(Dr(60));if(!(typeof F.dangerouslySetInnerHTML=="object"&&"__html"in F.dangerouslySetInnerHTML))throw Error(Dr(61))}if(F.style!=null&&typeof F.style!="object")throw Error(Dr(62))}}function Xg(P,F){if(P.indexOf("-")===-1)return typeof F.is=="string";switch(P){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function um(P){return P=P.target||P.srcElement||window,P.correspondingUseElement&&(P=P.correspondingUseElement),P.nodeType===3?P.parentNode:P}var $g=null,Xf=null,$f=null;function Yx(P){if(P=qp(P)){if(typeof $g!="function")throw Error(Dr(280));var F=P.stateNode;F&&(F=n1(F),$g(P.stateNode,P.type,F))}}function T_(P){Xf?$f?$f.push(P):$f=[P]:Xf=P}function k_(){if(Xf){var P=Xf,F=$f;if($f=Xf=null,Yx(P),F)for(P=0;Pce?0:1<J;J++)F.push(P);return F}function K0(P,F,J){P.pendingLanes|=F;var ce=F-1;P.suspendedLanes&=ce,P.pingedLanes&=ce,P=P.eventTimes,F=31-_c(F),P[F]=J}var _c=Math.clz32?Math.clz32:f6,u6=Math.log,c6=Math.LN2;function f6(P){return P===0?32:31-(u6(P)/c6|0)|0}var h6=xo.unstable_UserBlockingPriority,p6=xo.unstable_runWithPriority,i0=!0;function d6(P,F,J,ce){$c||fm();var Pe=vm,D=$c;$c=!0;try{A_(Pe,P,F,J,ce)}finally{($c=D)||hm()}}function g6(P,F,J,ce){p6(h6,vm.bind(null,P,F,J,ce))}function vm(P,F,J,ce){if(i0){var Pe;if((Pe=(F&4)===0)&&0=hp),i2=String.fromCharCode(32),a2=!1;function V_(P,F){switch(P){case"keyup":return B6.indexOf(F.keyCode)!==-1;case"keydown":return F.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function H_(P){return P=P.detail,typeof P=="object"&&"data"in P?P.data:null}var Uf=!1;function j6(P,F){switch(P){case"compositionend":return H_(F);case"keypress":return F.which!==32?null:(a2=!0,i2);case"textInput":return P=F.data,P===i2&&a2?null:P;default:return null}}function U6(P,F){if(Uf)return P==="compositionend"||!_m&&V_(P,F)?(P=j_(),a0=ym=ic=null,Uf=!1,P):null;switch(P){case"paste":return null;case"keypress":if(!(F.ctrlKey||F.altKey||F.metaKey)||F.ctrlKey&&F.altKey){if(F.char&&1=F)return{node:J,offset:F-P};P=ce}e:{for(;J;){if(J.nextSibling){J=J.nextSibling;break e}J=J.parentNode}J=void 0}J=u2(J)}}function Z_(P,F){return P&&F?P===F?!0:P&&P.nodeType===3?!1:F&&F.nodeType===3?Z_(P,F.parentNode):"contains"in P?P.contains(F):P.compareDocumentPosition?!!(P.compareDocumentPosition(F)&16):!1:!1}function f2(){for(var P=window,F=b0();F instanceof P.HTMLIFrameElement;){try{var J=typeof F.contentWindow.location.href=="string"}catch{J=!1}if(J)P=F.contentWindow;else break;F=b0(P.document)}return F}function tv(P){var F=P&&P.nodeName&&P.nodeName.toLowerCase();return F&&(F==="input"&&(P.type==="text"||P.type==="search"||P.type==="tel"||P.type==="url"||P.type==="password")||F==="textarea"||P.contentEditable==="true")}var J6=Bu&&"documentMode"in document&&11>=document.documentMode,Vf=null,nv=null,dp=null,rv=!1;function h2(P,F,J){var ce=J.window===J?J.document:J.nodeType===9?J:J.ownerDocument;rv||Vf==null||Vf!==b0(ce)||(ce=Vf,"selectionStart"in ce&&tv(ce)?ce={start:ce.selectionStart,end:ce.selectionEnd}:(ce=(ce.ownerDocument&&ce.ownerDocument.defaultView||window).getSelection(),ce={anchorNode:ce.anchorNode,anchorOffset:ce.anchorOffset,focusNode:ce.focusNode,focusOffset:ce.focusOffset}),dp&&Cp(dp,ce)||(dp=ce,ce=k0(nv,"onSelect"),0qf||(P.current=av[qf],av[qf]=null,qf--)}function Pa(P,F){qf++,av[qf]=P.current,P.current=F}var wc={},Go=Mc(wc),Es=Mc(!1),af=wc;function ih(P,F){var J=P.type.contextTypes;if(!J)return wc;var ce=P.stateNode;if(ce&&ce.__reactInternalMemoizedUnmaskedChildContext===F)return ce.__reactInternalMemoizedMaskedChildContext;var Pe={},D;for(D in J)Pe[D]=F[D];return ce&&(P=P.stateNode,P.__reactInternalMemoizedUnmaskedChildContext=F,P.__reactInternalMemoizedMaskedChildContext=Pe),Pe}function Cs(P){return P=P.childContextTypes,P!=null}function S0(){ca(Es),ca(Go)}function _2(P,F,J){if(Go.current!==wc)throw Error(Dr(168));Pa(Go,F),Pa(Es,J)}function t3(P,F,J){var ce=P.stateNode;if(P=F.childContextTypes,typeof ce.getChildContext!="function")return J;ce=ce.getChildContext();for(var Pe in ce)if(!(Pe in P))throw Error(Dr(108,Zf(F)||"Unknown",Pe));return da({},J,ce)}function s0(P){return P=(P=P.stateNode)&&P.__reactInternalMemoizedMergedChildContext||wc,af=Go.current,Pa(Go,P),Pa(Es,Es.current),!0}function w2(P,F,J){var ce=P.stateNode;if(!ce)throw Error(Dr(169));J?(P=t3(P,F,af),ce.__reactInternalMemoizedMergedChildContext=P,ca(Es),ca(Go),Pa(Go,P)):ca(Es),Pa(Es,J)}var Tm=null,ef=null,e8=xo.unstable_runWithPriority,km=xo.unstable_scheduleCallback,ov=xo.unstable_cancelCallback,t8=xo.unstable_shouldYield,T2=xo.unstable_requestPaint,sv=xo.unstable_now,n8=xo.unstable_getCurrentPriorityLevel,r1=xo.unstable_ImmediatePriority,n3=xo.unstable_UserBlockingPriority,r3=xo.unstable_NormalPriority,i3=xo.unstable_LowPriority,a3=xo.unstable_IdlePriority,vg={},r8=T2!==void 0?T2:function(){},Ou=null,l0=null,mg=!1,k2=sv(),Ho=1e4>k2?sv:function(){return sv()-k2};function ah(){switch(n8()){case r1:return 99;case n3:return 98;case r3:return 97;case i3:return 96;case a3:return 95;default:throw Error(Dr(332))}}function o3(P){switch(P){case 99:return r1;case 98:return n3;case 97:return r3;case 96:return i3;case 95:return a3;default:throw Error(Dr(332))}}function of(P,F){return P=o3(P),e8(P,F)}function Pp(P,F,J){return P=o3(P),km(P,F,J)}function hu(){if(l0!==null){var P=l0;l0=null,ov(P)}s3()}function s3(){if(!mg&&Ou!==null){mg=!0;var P=0;try{var F=Ou;of(99,function(){for(;Pc?(b=p,p=null):b=p.sibling;var d=m(i,p,n[c],o);if(d===null){p===null&&(p=b);break}P&&p&&d.alternate===null&&F(i,p),r=D(d,r,c),u===null?a=d:u.sibling=d,u=d,p=b}if(c===n.length)return J(i,p),a;if(p===null){for(;cc?(b=p,p=null):b=p.sibling;var v=m(i,p,d.value,o);if(v===null){p===null&&(p=b);break}P&&p&&v.alternate===null&&F(i,p),r=D(v,r,c),u===null?a=v:u.sibling=v,u=v,p=b}if(d.done)return J(i,p),a;if(p===null){for(;!d.done;c++,d=n.next())d=T(i,d.value,o),d!==null&&(r=D(d,r,c),u===null?a=d:u.sibling=d,u=d);return a}for(p=ce(i,p);!d.done;c++,d=n.next())d=f(p,i,c,d.value,o),d!==null&&(P&&d.alternate!==null&&p.delete(d.key===null?c:d.key),r=D(d,r,c),u===null?a=d:u.sibling=d,u=d);return P&&p.forEach(function(x){return F(i,x)}),a}return function(i,r,n,o){var a=typeof n=="object"&&n!==null&&n.type===tc&&n.key===null;a&&(n=n.props.children);var u=typeof n=="object"&&n!==null;if(u)switch(n.$$typeof){case tp:e:{for(u=n.key,a=r;a!==null;){if(a.key===u){switch(a.tag){case 7:if(n.type===tc){J(i,a.sibling),r=Pe(a,n.props.children),r.return=i,i=r;break e}break;default:if(a.elementType===n.type){J(i,a.sibling),r=Pe(a,n.props),r.ref=Zh(i,a,n),r.return=i,i=r;break e}}J(i,a);break}else F(i,a);a=a.sibling}n.type===tc?(r=nh(n.props.children,i.mode,o,n.key),r.return=i,i=r):(o=h0(n.type,n.key,n.props,null,i.mode,o),o.ref=Zh(i,r,n),o.return=i,i=o)}return E(i);case Xc:e:{for(a=n.key;r!==null;){if(r.key===a)if(r.tag===4&&r.stateNode.containerInfo===n.containerInfo&&r.stateNode.implementation===n.implementation){J(i,r.sibling),r=Pe(r,n.children||[]),r.return=i,i=r;break e}else{J(i,r);break}else F(i,r);r=r.sibling}r=Tg(n,i.mode,o),r.return=i,i=r}return E(i)}if(typeof n=="string"||typeof n=="number")return n=""+n,r!==null&&r.tag===6?(J(i,r.sibling),r=Pe(r,n),r.return=i,i=r):(J(i,r),r=wg(n,i.mode,o),r.return=i,i=r),E(i);if(jd(n))return l(i,r,n,o);if(Uh(n))return t(i,r,n,o);if(u&&Ud(i,n),typeof n>"u"&&!a)switch(i.tag){case 1:case 22:case 0:case 11:case 15:throw Error(Dr(152,Zf(i.type)||"Component"))}return J(i,r)}}var O0=h3(!0),p3=h3(!1),Gp={},uu=Mc(Gp),Ip=Mc(Gp),Rp=Mc(Gp);function Kc(P){if(P===Gp)throw Error(Dr(174));return P}function uv(P,F){switch(Pa(Rp,F),Pa(Ip,P),Pa(uu,Gp),P=F.nodeType,P){case 9:case 11:F=(F=F.documentElement)?F.namespaceURI:Zg(null,"");break;default:P=P===8?F.parentNode:F,F=P.namespaceURI||null,P=P.tagName,F=Zg(F,P)}ca(uu),Pa(uu,F)}function oh(){ca(uu),ca(Ip),ca(Rp)}function C2(P){Kc(Rp.current);var F=Kc(uu.current),J=Zg(F,P.type);F!==J&&(Pa(Ip,P),Pa(uu,J))}function Em(P){Ip.current===P&&(ca(uu),ca(Ip))}var La=Mc(0);function I0(P){for(var F=P;F!==null;){if(F.tag===13){var J=F.memoizedState;if(J!==null&&(J=J.dehydrated,J===null||J.data==="$?"||J.data==="$!"))return F}else if(F.tag===19&&F.memoizedProps.revealOrder!==void 0){if(F.flags&64)return F}else if(F.child!==null){F.child.return=F,F=F.child;continue}if(F===P)break;for(;F.sibling===null;){if(F.return===null||F.return===P)return null;F=F.return}F.sibling.return=F.return,F=F.sibling}return null}var zu=null,oc=null,cu=!1;function d3(P,F){var J=hl(5,null,null,0);J.elementType="DELETED",J.type="DELETED",J.stateNode=F,J.return=P,J.flags=8,P.lastEffect!==null?(P.lastEffect.nextEffect=J,P.lastEffect=J):P.firstEffect=P.lastEffect=J}function L2(P,F){switch(P.tag){case 5:var J=P.type;return F=F.nodeType!==1||J.toLowerCase()!==F.nodeName.toLowerCase()?null:F,F!==null?(P.stateNode=F,!0):!1;case 6:return F=P.pendingProps===""||F.nodeType!==3?null:F,F!==null?(P.stateNode=F,!0):!1;case 13:return!1;default:return!1}}function cv(P){if(cu){var F=oc;if(F){var J=F;if(!L2(P,F)){if(F=Jf(J.nextSibling),!F||!L2(P,F)){P.flags=P.flags&-1025|2,cu=!1,zu=P;return}d3(zu,J)}zu=P,oc=Jf(F.firstChild)}else P.flags=P.flags&-1025|2,cu=!1,zu=P}}function P2(P){for(P=P.return;P!==null&&P.tag!==5&&P.tag!==3&&P.tag!==13;)P=P.return;zu=P}function Vd(P){if(P!==zu)return!1;if(!cu)return P2(P),cu=!0,!1;var F=P.type;if(P.tag!==5||F!=="head"&&F!=="body"&&!iv(F,P.memoizedProps))for(F=oc;F;)d3(P,F),F=Jf(F.nextSibling);if(P2(P),P.tag===13){if(P=P.memoizedState,P=P!==null?P.dehydrated:null,!P)throw Error(Dr(317));e:{for(P=P.nextSibling,F=0;P;){if(P.nodeType===8){var J=P.data;if(J==="/$"){if(F===0){oc=Jf(P.nextSibling);break e}F--}else J!=="$"&&J!=="$!"&&J!=="$?"||F++}P=P.nextSibling}oc=null}}else oc=zu?Jf(P.stateNode.nextSibling):null;return!0}function yg(){oc=zu=null,cu=!1}var Qf=[];function Cm(){for(var P=0;PD))throw Error(Dr(301));D+=1,Co=Uo=null,F.updateQueue=null,gp.current=l8,P=J(ce,Pe)}while(vp)}if(gp.current=B0,F=Uo!==null&&Uo.next!==null,zp=0,Co=Uo=Ha=null,R0=!1,F)throw Error(Dr(300));return P}function Qc(){var P={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Co===null?Ha.memoizedState=Co=P:Co=Co.next=P,Co}function pf(){if(Uo===null){var P=Ha.alternate;P=P!==null?P.memoizedState:null}else P=Uo.next;var F=Co===null?Ha.memoizedState:Co.next;if(F!==null)Co=F,Uo=P;else{if(P===null)throw Error(Dr(310));Uo=P,P={memoizedState:Uo.memoizedState,baseState:Uo.baseState,baseQueue:Uo.baseQueue,queue:Uo.queue,next:null},Co===null?Ha.memoizedState=Co=P:Co=Co.next=P}return Co}function ou(P,F){return typeof F=="function"?F(P):F}function Yh(P){var F=pf(),J=F.queue;if(J===null)throw Error(Dr(311));J.lastRenderedReducer=P;var ce=Uo,Pe=ce.baseQueue,D=J.pending;if(D!==null){if(Pe!==null){var E=Pe.next;Pe.next=D.next,D.next=E}ce.baseQueue=Pe=D,J.pending=null}if(Pe!==null){Pe=Pe.next,ce=ce.baseState;var e=E=D=null,_=Pe;do{var w=_.lane;if((zp&w)===w)e!==null&&(e=e.next={lane:0,action:_.action,eagerReducer:_.eagerReducer,eagerState:_.eagerState,next:null}),ce=_.eagerReducer===P?_.eagerState:P(ce,_.action);else{var s={lane:w,action:_.action,eagerReducer:_.eagerReducer,eagerState:_.eagerState,next:null};e===null?(E=e=s,D=ce):e=e.next=s,Ha.lanes|=w,Wp|=w}_=_.next}while(_!==null&&_!==Pe);e===null?D=ce:e.next=E,fl(ce,F.memoizedState)||(jl=!0),F.memoizedState=ce,F.baseState=D,F.baseQueue=e,J.lastRenderedState=ce}return[F.memoizedState,J.dispatch]}function Xh(P){var F=pf(),J=F.queue;if(J===null)throw Error(Dr(311));J.lastRenderedReducer=P;var ce=J.dispatch,Pe=J.pending,D=F.memoizedState;if(Pe!==null){J.pending=null;var E=Pe=Pe.next;do D=P(D,E.action),E=E.next;while(E!==Pe);fl(D,F.memoizedState)||(jl=!0),F.memoizedState=D,F.baseQueue===null&&(F.baseState=D),J.lastRenderedState=D}return[D,ce]}function O2(P,F,J){var ce=F._getVersion;ce=ce(F._source);var Pe=F._workInProgressVersionPrimary;if(Pe!==null?P=Pe===ce:(P=P.mutableReadLanes,(P=(zp&P)===P)&&(F._workInProgressVersionPrimary=ce,Qf.push(F))),P)return J(F._source);throw Qf.push(F),Error(Dr(350))}function g3(P,F,J,ce){var Pe=us;if(Pe===null)throw Error(Dr(349));var D=F._getVersion,E=D(F._source),e=gp.current,_=e.useState(function(){return O2(Pe,F,J)}),w=_[1],s=_[0];_=Co;var T=P.memoizedState,m=T.refs,f=m.getSnapshot,l=T.source;T=T.subscribe;var t=Ha;return P.memoizedState={refs:m,source:F,subscribe:ce},e.useEffect(function(){m.getSnapshot=J,m.setSnapshot=w;var i=D(F._source);if(!fl(E,i)){i=J(F._source),fl(s,i)||(w(i),i=dc(t),Pe.mutableReadLanes|=i&Pe.pendingLanes),i=Pe.mutableReadLanes,Pe.entangledLanes|=i;for(var r=Pe.entanglements,n=i;0J?98:J,function(){P(!0)}),of(97<\/script>",P=P.removeChild(P.firstChild)):typeof ce.is=="string"?P=E.createElement(J,{is:ce.is}):(P=E.createElement(J),J==="select"&&(E=P,ce.multiple?E.multiple=!0:ce.size&&(E.size=ce.size))):P=E.createElementNS(P,J),P[ac]=F,P[M0]=ce,k3(P,F,!1,!1),F.stateNode=P,E=Xg(J,ce),J){case"dialog":la("cancel",P),la("close",P),Pe=ce;break;case"iframe":case"object":case"embed":la("load",P),Pe=ce;break;case"video":case"audio":for(Pe=0;Pebv&&(F.flags|=64,D=!0,Jh(ce,!1),F.lanes=33554432)}else{if(!D)if(P=I0(E),P!==null){if(F.flags|=64,D=!0,J=P.updateQueue,J!==null&&(F.updateQueue=J,F.flags|=4),Jh(ce,!0),ce.tail===null&&ce.tailMode==="hidden"&&!E.alternate&&!cu)return F=F.lastEffect=ce.lastEffect,F!==null&&(F.nextEffect=null),null}else 2*Ho()-ce.renderingStartTime>bv&&J!==1073741824&&(F.flags|=64,D=!0,Jh(ce,!1),F.lanes=33554432);ce.isBackwards?(E.sibling=F.child,F.child=E):(J=ce.last,J!==null?J.sibling=E:F.child=E,ce.last=E)}return ce.tail!==null?(J=ce.tail,ce.rendering=J,ce.tail=J.sibling,ce.lastEffect=F.lastEffect,ce.renderingStartTime=Ho(),J.sibling=null,F=La.current,Pa(La,D?F&1|2:F&1),J):null;case 23:case 24:return Nm(),P!==null&&P.memoizedState!==null!=(F.memoizedState!==null)&&ce.mode!=="unstable-defer-without-hiding"&&(F.flags|=4),null}throw Error(Dr(156,F.tag))}function f8(P){switch(P.tag){case 1:Cs(P.type)&&S0();var F=P.flags;return F&4096?(P.flags=F&-4097|64,P):null;case 3:if(oh(),ca(Es),ca(Go),Cm(),F=P.flags,F&64)throw Error(Dr(285));return P.flags=F&-4097|64,P;case 5:return Em(P),null;case 13:return ca(La),F=P.flags,F&4096?(P.flags=F&-4097|64,P):null;case 19:return ca(La),null;case 4:return oh(),null;case 10:return Mm(P),null;case 23:case 24:return Nm(),null;default:return null}}function zm(P,F){try{var J="",ce=F;do J+=G4(ce),ce=ce.return;while(ce);var Pe=J}catch(D){Pe=` Error generating stack: `+D.message+` -`+D.stack}return{value:P,source:F,stack:Pe}}function gv(P,F){try{console.error(F.value)}catch(J){setTimeout(function(){throw J})}}var h8=typeof WeakMap=="function"?WeakMap:Map;function S3(P,F,J){J=hc(-1,J),J.tag=3,J.payload={element:null};var ce=F.value;return J.callback=function(){j0||(j0=!0,_v=ce),gv(P,F)},J}function E3(P,F,J){J=hc(-1,J),J.tag=3;var ce=P.type.getDerivedStateFromError;if(typeof ce=="function"){var Pe=F.value;J.payload=function(){return gv(P,F),ce(Pe)}}var D=P.stateNode;return D!==null&&typeof D.componentDidCatch=="function"&&(J.callback=function(){typeof ce!="function"&&(su===null?su=new Set([this]):su.add(this),gv(P,F));var E=F.stack;this.componentDidCatch(F.value,{componentStack:E!==null?E:""})}),J}var p8=typeof WeakSet=="function"?WeakSet:Set;function G2(P){var F=P.ref;if(F!==null)if(typeof F=="function")try{F(null)}catch(J){vc(P,J)}else F.current=null}function d8(P,F){switch(F.tag){case 0:case 11:case 15:case 22:return;case 1:if(F.flags&256&&P!==null){var J=P.memoizedProps,ce=P.memoizedState;P=F.stateNode,F=P.getSnapshotBeforeUpdate(F.elementType===F.type?J:Bl(F.type,J),ce),P.__reactInternalSnapshotBeforeUpdate=F}return;case 3:F.flags&256&&wm(F.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(Dr(163))}function g8(P,F,J){switch(J.tag){case 0:case 11:case 15:case 22:if(F=J.updateQueue,F=F!==null?F.lastEffect:null,F!==null){P=F=F.next;do{if((P.tag&3)===3){var ce=P.create;P.destroy=ce()}P=P.next}while(P!==F)}if(F=J.updateQueue,F=F!==null?F.lastEffect:null,F!==null){P=F=F.next;do{var Pe=P;ce=Pe.next,Pe=Pe.tag,Pe&4&&Pe&1&&(F3(J,P),T8(J,P)),P=ce}while(P!==F)}return;case 1:P=J.stateNode,J.flags&4&&(F===null?P.componentDidMount():(ce=J.elementType===J.type?F.memoizedProps:Bl(J.type,F.memoizedProps),P.componentDidUpdate(ce,F.memoizedState,P.__reactInternalSnapshotBeforeUpdate))),F=J.updateQueue,F!==null&&M2(J,F,P);return;case 3:if(F=J.updateQueue,F!==null){if(P=null,J.child!==null)switch(J.child.tag){case 5:P=J.child.stateNode;break;case 1:P=J.child.stateNode}M2(J,F,P)}return;case 5:P=J.stateNode,F===null&&J.flags&4&&Q_(J.type,J.memoizedProps)&&P.focus();return;case 6:return;case 4:return;case 12:return;case 13:J.memoizedState===null&&(J=J.alternate,J!==null&&(J=J.memoizedState,J!==null&&(J=J.dehydrated,J!==null&&O_(J))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(Dr(163))}function W2(P,F){for(var J=P;;){if(J.tag===5){var ce=J.stateNode;if(F)ce=ce.style,typeof ce.setProperty=="function"?ce.setProperty("display","none","important"):ce.display="none";else{ce=J.stateNode;var Pe=J.memoizedProps.style;Pe=Pe!=null&&Pe.hasOwnProperty("display")?Pe.display:null,ce.style.display=__("display",Pe)}}else if(J.tag===6)J.stateNode.nodeValue=F?"":J.memoizedProps;else if((J.tag!==23&&J.tag!==24||J.memoizedState===null||J===P)&&J.child!==null){J.child.return=J,J=J.child;continue}if(J===P)break;for(;J.sibling===null;){if(J.return===null||J.return===P)return;J=J.return}J.sibling.return=J.return,J=J.sibling}}function Z2(P,F){if(ef&&typeof ef.onCommitFiberUnmount=="function")try{ef.onCommitFiberUnmount(Tm,F)}catch{}switch(F.tag){case 0:case 11:case 14:case 15:case 22:if(P=F.updateQueue,P!==null&&(P=P.lastEffect,P!==null)){var J=P=P.next;do{var ce=J,Pe=ce.destroy;if(ce=ce.tag,Pe!==void 0)if(ce&4)F3(F,J);else{ce=F;try{Pe()}catch(D){vc(ce,D)}}J=J.next}while(J!==P)}break;case 1:if(G2(F),P=F.stateNode,typeof P.componentWillUnmount=="function")try{P.props=F.memoizedProps,P.state=F.memoizedState,P.componentWillUnmount()}catch(D){vc(F,D)}break;case 5:G2(F);break;case 4:C3(P,F)}}function Y2(P){P.alternate=null,P.child=null,P.dependencies=null,P.firstEffect=null,P.lastEffect=null,P.memoizedProps=null,P.memoizedState=null,P.pendingProps=null,P.return=null,P.updateQueue=null}function X2(P){return P.tag===5||P.tag===3||P.tag===4}function $2(P){e:{for(var F=P.return;F!==null;){if(X2(F))break e;F=F.return}throw Error(Dr(160))}var J=F;switch(F=J.stateNode,J.tag){case 5:var ce=!1;break;case 3:F=F.containerInfo,ce=!0;break;case 4:F=F.containerInfo,ce=!0;break;default:throw Error(Dr(161))}J.flags&16&&(Tp(F,""),J.flags&=-17);e:t:for(J=P;;){for(;J.sibling===null;){if(J.return===null||X2(J.return)){J=null;break e}J=J.return}for(J.sibling.return=J.return,J=J.sibling;J.tag!==5&&J.tag!==6&&J.tag!==18;){if(J.flags&2||J.child===null||J.tag===4)continue t;J.child.return=J,J=J.child}if(!(J.flags&2)){J=J.stateNode;break e}}ce?vv(P,J,F):mv(P,J,F)}function vv(P,F,J){var ce=P.tag,Pe=ce===5||ce===6;if(Pe)P=Pe?P.stateNode:P.stateNode.instance,F?J.nodeType===8?J.parentNode.insertBefore(P,F):J.insertBefore(P,F):(J.nodeType===8?(F=J.parentNode,F.insertBefore(P,J)):(F=J,F.appendChild(P)),J=J._reactRootContainer,J!=null||F.onclick!==null||(F.onclick=A0));else if(ce!==4&&(P=P.child,P!==null))for(vv(P,F,J),P=P.sibling;P!==null;)vv(P,F,J),P=P.sibling}function mv(P,F,J){var ce=P.tag,Pe=ce===5||ce===6;if(Pe)P=Pe?P.stateNode:P.stateNode.instance,F?J.insertBefore(P,F):J.appendChild(P);else if(ce!==4&&(P=P.child,P!==null))for(mv(P,F,J),P=P.sibling;P!==null;)mv(P,F,J),P=P.sibling}function C3(P,F){for(var J=F,ce=!1,Pe,D;;){if(!ce){ce=J.return;e:for(;;){if(ce===null)throw Error(Dr(160));switch(Pe=ce.stateNode,ce.tag){case 5:D=!1;break e;case 3:Pe=Pe.containerInfo,D=!0;break e;case 4:Pe=Pe.containerInfo,D=!0;break e}ce=ce.return}ce=!0}if(J.tag===5||J.tag===6){e:for(var E=P,e=J,_=e;;)if(Z2(E,_),_.child!==null&&_.tag!==4)_.child.return=_,_=_.child;else{if(_===e)break e;for(;_.sibling===null;){if(_.return===null||_.return===e)break e;_=_.return}_.sibling.return=_.return,_=_.sibling}D?(E=Pe,e=J.stateNode,E.nodeType===8?E.parentNode.removeChild(e):E.removeChild(e)):Pe.removeChild(J.stateNode)}else if(J.tag===4){if(J.child!==null){Pe=J.stateNode.containerInfo,D=!0,J.child.return=J,J=J.child;continue}}else if(Z2(P,J),J.child!==null){J.child.return=J,J=J.child;continue}if(J===F)break;for(;J.sibling===null;){if(J.return===null||J.return===F)return;J=J.return,J.tag===4&&(ce=!1)}J.sibling.return=J.return,J=J.sibling}}function _g(P,F){switch(F.tag){case 0:case 11:case 14:case 15:case 22:var J=F.updateQueue;if(J=J!==null?J.lastEffect:null,J!==null){var ce=J=J.next;do(ce.tag&3)===3&&(P=ce.destroy,ce.destroy=void 0,P!==void 0&&P()),ce=ce.next;while(ce!==J)}return;case 1:return;case 5:if(J=F.stateNode,J!=null){ce=F.memoizedProps;var Pe=P!==null?P.memoizedProps:ce;P=F.type;var D=F.updateQueue;if(F.updateQueue=null,D!==null){for(J[M0]=ce,P==="input"&&ce.type==="radio"&&ce.name!=null&&m_(J,ce),Xg(P,Pe),F=Xg(P,ce),Pe=0;PePe&&(Pe=E),J&=~D}if(J=Pe,J=Ho()-J,J=(120>J?120:480>J?480:1080>J?1080:1920>J?1920:3e3>J?3e3:4320>J?4320:1960*m8(J/1960))-J,10Pe&&(Pe=E),J&=~D}if(J=Pe,J=Ho()-J,J=(120>J?120:480>J?480:1080>J?1080:1920>J?1920:3e3>J?3e3:4320>J?4320:1960*m8(J/1960))-J,10 component higher in the tree to provide a loading indicator or placeholder to display.`)}Po!==5&&(Po=2),_=zm(_,e),y=E;do{switch(y.tag){case 3:D=_,y.flags|=4096,F&=-F,y.lanes|=F;var u=S3(y,D,F);A2(y,u);break e;case 1:D=_;var p=y.type,c=y.stateNode;if(!(y.flags&64)&&(typeof p.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(su===null||!su.has(c)))){y.flags|=4096,F&=-F,y.lanes|=F;var b=E3(y,D,F);A2(y,b);break e}}y=y.return}while(y!==null)}D3(J)}catch(d){F=d,io===J&&J!==null&&(io=J=J.return);continue}break}while(1)}function R3(){var P=N0.current;return N0.current=B0,P===null?B0:P}function ap(P,F){var J=ri;ri|=16;var ce=R3();us===P&&qo===F||th(P,F);do try{x8();break}catch(Pe){I3(P,Pe)}while(1);if(Am(),ri=J,N0.current=ce,io!==null)throw Error(Dr(261));return us=null,qo=0,Po}function x8(){for(;io!==null;)z3(io)}function b8(){for(;io!==null&&!t8();)z3(io)}function z3(P){var F=B3(P.alternate,P,sf);P.memoizedProps=P.pendingProps,F===null?D3(P):io=F,Dm.current=null}function D3(P){var F=P;do{var J=F.alternate;if(P=F.return,F.flags&2048){if(J=f8(F),J!==null){J.flags&=2047,io=J;return}P!==null&&(P.firstEffect=P.lastEffect=null,P.flags|=2048)}else{if(J=c8(J,F,sf),J!==null){io=J;return}if(J=F,J.tag!==24&&J.tag!==23||J.memoizedState===null||sf&1073741824||!(J.mode&4)){for(var ce=0,Pe=J.child;Pe!==null;)ce|=Pe.lanes|Pe.childLanes,Pe=Pe.sibling;J.childLanes=ce}P!==null&&!(P.flags&2048)&&(P.firstEffect===null&&(P.firstEffect=F.firstEffect),F.lastEffect!==null&&(P.lastEffect!==null&&(P.lastEffect.nextEffect=F.firstEffect),P.lastEffect=F.lastEffect),1E&&(e=E,E=u,u=e),e=c2(n,u),D=c2(n,E),e&&D&&(a.rangeCount!==1||a.anchorNode!==e.node||a.anchorOffset!==e.offset||a.focusNode!==D.node||a.focusOffset!==D.offset)&&(o=o.createRange(),o.setStart(e.node,e.offset),a.removeAllRanges(),u>E?(a.addRange(o),a.extend(D.node,D.offset)):(o.setEnd(D.node,D.offset),a.addRange(o)))))),o=[],a=n;a=a.parentNode;)a.nodeType===1&&o.push({element:a,left:a.scrollLeft,top:a.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;nHo()-Bm?th(P,0):Fm|=J),vl(P,F)}function M8(P,F){var J=P.stateNode;J!==null&&J.delete(F),F=0,F===0&&(F=P.mode,F&2?F&4?(Iu===0&&(Iu=hh),F=Nf(62914560&~Iu),F===0&&(F=4194304)):F=ah()===99?1:2:F=1),J=Ws(),P=o1(P,F),P!==null&&(K0(P,F,J),vl(P,J))}var B3;B3=function(P,F,J){var ce=F.lanes;if(P!==null)if(P.memoizedProps!==F.pendingProps||Es.current)jl=!0;else if(J&ce)jl=!!(P.flags&16384);else{switch(jl=!1,F.tag){case 3:B2(F),yg();break;case 5:C2(F);break;case 1:Cs(F.type)&&s0(F);break;case 4:uv(F,F.stateNode.containerInfo);break;case 10:ce=F.memoizedProps.value;var Pe=F.type._context;Pa(E0,Pe._currentValue),Pe._currentValue=ce;break;case 13:if(F.memoizedState!==null)return J&F.child.childLanes?N2(P,F,J):(Pa(La,La.current&1),F=Du(P,F,J),F!==null?F.sibling:null);Pa(La,La.current&1);break;case 19:if(ce=(J&F.childLanes)!==0,P.flags&64){if(ce)return q2(P,F,J);F.flags|=64}if(Pe=F.memoizedState,Pe!==null&&(Pe.rendering=null,Pe.tail=null,Pe.lastEffect=null),Pa(La,La.current),ce)break;return null;case 23:case 24:return F.lanes=0,xg(P,F,J)}return Du(P,F,J)}else jl=!1;switch(F.lanes=0,F.tag){case 2:if(ce=F.type,P!==null&&(P.alternate=null,F.alternate=null,F.flags|=2),P=F.pendingProps,Pe=ih(F,Go.current),Kf(F,J),Pe=Pm(null,F,ce,P,Pe,J),F.flags|=1,typeof Pe=="object"&&Pe!==null&&typeof Pe.render=="function"&&Pe.$$typeof===void 0){if(F.tag=1,F.memoizedState=null,F.updateQueue=null,Cs(ce)){var D=!0;s0(F)}else D=!1;F.memoizedState=Pe.state!==null&&Pe.state!==void 0?Pe.state:null,Sm(F);var E=ce.getDerivedStateFromProps;typeof E=="function"&&P0(F,ce,E,P),Pe.updater=i1,F.stateNode=Pe,Pe._reactInternals=F,lv(F,ce,P,J),F=pv(null,F,ce,!0,D,J)}else F.tag=0,Ms(null,F,Pe,J),F=F.child;return F;case 16:Pe=F.elementType;e:{switch(P!==null&&(P.alternate=null,F.alternate=null,F.flags|=2),P=F.pendingProps,D=Pe._init,Pe=D(Pe._payload),F.type=Pe,D=F.tag=E8(Pe),P=Bl(Pe,P),D){case 0:F=hv(null,F,Pe,P,J);break e;case 1:F=F2(null,F,Pe,P,J);break e;case 11:F=z2(null,F,Pe,P,J);break e;case 14:F=D2(null,F,Pe,Bl(Pe.type,P),ce,J);break e}throw Error(Dr(306,Pe,""))}return F;case 0:return ce=F.type,Pe=F.pendingProps,Pe=F.elementType===ce?Pe:Bl(ce,Pe),hv(P,F,ce,Pe,J);case 1:return ce=F.type,Pe=F.pendingProps,Pe=F.elementType===ce?Pe:Bl(ce,Pe),F2(P,F,ce,Pe,J);case 3:if(B2(F),ce=F.updateQueue,P===null||ce===null)throw Error(Dr(282));if(ce=F.pendingProps,Pe=F.memoizedState,Pe=Pe!==null?Pe.element:null,u3(P,F),Op(F,ce,null,J),ce=F.memoizedState.element,ce===Pe)yg(),F=Du(P,F,J);else{if(Pe=F.stateNode,(D=Pe.hydrate)&&(oc=Jf(F.stateNode.containerInfo.firstChild),zu=F,D=cu=!0),D){if(P=Pe.mutableSourceEagerHydrationData,P!=null)for(Pe=0;Pe"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(j3)}catch(P){console.error(P)}}j3(),c_.exports=ml;var qm=c_.exports;const z8=jp(qm);function eb(P,F){var J=Object.keys(P);if(Object.getOwnPropertySymbols){var ce=Object.getOwnPropertySymbols(P);F&&(ce=ce.filter(function(Pe){return Object.getOwnPropertyDescriptor(P,Pe).enumerable})),J.push.apply(J,ce)}return J}function yi(P){for(var F=1;F=0||(s[_]=E[_]);return s}(P,F);if(Object.getOwnPropertySymbols){var D=Object.getOwnPropertySymbols(P);for(ce=0;ce=0||Object.prototype.propertyIsEnumerable.call(P,J)&&(Pe[J]=P[J])}return Pe}function F8(P,F){if(F&&(typeof F=="object"||typeof F=="function"))return F;if(F!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(J){if(J===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return J}(P)}function V3(P){var F=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var J,ce=V0(P);if(F){var Pe=V0(this).constructor;J=Reflect.construct(ce,arguments,Pe)}else J=ce.apply(this,arguments);return F8(this,J)}}function l1(P,F){return function(J){if(Array.isArray(J))return J}(P)||function(J,ce){var Pe=J==null?null:typeof Symbol<"u"&&J[Symbol.iterator]||J["@@iterator"];if(Pe!=null){var D,E,e=[],_=!0,w=!1;try{for(Pe=Pe.call(J);!(_=(D=Pe.next()).done)&&(e.push(D.value),!ce||e.length!==ce);_=!0);}catch(s){w=!0,E=s}finally{try{_||Pe.return==null||Pe.return()}finally{if(w)throw E}}return e}}(P,F)||Gm(P,F)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +Add a component higher in the tree to provide a loading indicator or placeholder to display.`)}Po!==5&&(Po=2),_=zm(_,e),m=E;do{switch(m.tag){case 3:D=_,m.flags|=4096,F&=-F,m.lanes|=F;var u=S3(m,D,F);A2(m,u);break e;case 1:D=_;var p=m.type,c=m.stateNode;if(!(m.flags&64)&&(typeof p.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(su===null||!su.has(c)))){m.flags|=4096,F&=-F,m.lanes|=F;var b=E3(m,D,F);A2(m,b);break e}}m=m.return}while(m!==null)}D3(J)}catch(d){F=d,io===J&&J!==null&&(io=J=J.return);continue}break}while(1)}function R3(){var P=N0.current;return N0.current=B0,P===null?B0:P}function ap(P,F){var J=ri;ri|=16;var ce=R3();us===P&&qo===F||th(P,F);do try{x8();break}catch(Pe){I3(P,Pe)}while(1);if(Am(),ri=J,N0.current=ce,io!==null)throw Error(Dr(261));return us=null,qo=0,Po}function x8(){for(;io!==null;)z3(io)}function b8(){for(;io!==null&&!t8();)z3(io)}function z3(P){var F=B3(P.alternate,P,sf);P.memoizedProps=P.pendingProps,F===null?D3(P):io=F,Dm.current=null}function D3(P){var F=P;do{var J=F.alternate;if(P=F.return,F.flags&2048){if(J=f8(F),J!==null){J.flags&=2047,io=J;return}P!==null&&(P.firstEffect=P.lastEffect=null,P.flags|=2048)}else{if(J=c8(J,F,sf),J!==null){io=J;return}if(J=F,J.tag!==24&&J.tag!==23||J.memoizedState===null||sf&1073741824||!(J.mode&4)){for(var ce=0,Pe=J.child;Pe!==null;)ce|=Pe.lanes|Pe.childLanes,Pe=Pe.sibling;J.childLanes=ce}P!==null&&!(P.flags&2048)&&(P.firstEffect===null&&(P.firstEffect=F.firstEffect),F.lastEffect!==null&&(P.lastEffect!==null&&(P.lastEffect.nextEffect=F.firstEffect),P.lastEffect=F.lastEffect),1E&&(e=E,E=u,u=e),e=c2(n,u),D=c2(n,E),e&&D&&(a.rangeCount!==1||a.anchorNode!==e.node||a.anchorOffset!==e.offset||a.focusNode!==D.node||a.focusOffset!==D.offset)&&(o=o.createRange(),o.setStart(e.node,e.offset),a.removeAllRanges(),u>E?(a.addRange(o),a.extend(D.node,D.offset)):(o.setEnd(D.node,D.offset),a.addRange(o)))))),o=[],a=n;a=a.parentNode;)a.nodeType===1&&o.push({element:a,left:a.scrollLeft,top:a.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;nHo()-Bm?th(P,0):Fm|=J),vl(P,F)}function M8(P,F){var J=P.stateNode;J!==null&&J.delete(F),F=0,F===0&&(F=P.mode,F&2?F&4?(Iu===0&&(Iu=hh),F=Nf(62914560&~Iu),F===0&&(F=4194304)):F=ah()===99?1:2:F=1),J=Ws(),P=o1(P,F),P!==null&&(K0(P,F,J),vl(P,J))}var B3;B3=function(P,F,J){var ce=F.lanes;if(P!==null)if(P.memoizedProps!==F.pendingProps||Es.current)jl=!0;else if(J&ce)jl=!!(P.flags&16384);else{switch(jl=!1,F.tag){case 3:B2(F),yg();break;case 5:C2(F);break;case 1:Cs(F.type)&&s0(F);break;case 4:uv(F,F.stateNode.containerInfo);break;case 10:ce=F.memoizedProps.value;var Pe=F.type._context;Pa(E0,Pe._currentValue),Pe._currentValue=ce;break;case 13:if(F.memoizedState!==null)return J&F.child.childLanes?N2(P,F,J):(Pa(La,La.current&1),F=Du(P,F,J),F!==null?F.sibling:null);Pa(La,La.current&1);break;case 19:if(ce=(J&F.childLanes)!==0,P.flags&64){if(ce)return q2(P,F,J);F.flags|=64}if(Pe=F.memoizedState,Pe!==null&&(Pe.rendering=null,Pe.tail=null,Pe.lastEffect=null),Pa(La,La.current),ce)break;return null;case 23:case 24:return F.lanes=0,xg(P,F,J)}return Du(P,F,J)}else jl=!1;switch(F.lanes=0,F.tag){case 2:if(ce=F.type,P!==null&&(P.alternate=null,F.alternate=null,F.flags|=2),P=F.pendingProps,Pe=ih(F,Go.current),Kf(F,J),Pe=Pm(null,F,ce,P,Pe,J),F.flags|=1,typeof Pe=="object"&&Pe!==null&&typeof Pe.render=="function"&&Pe.$$typeof===void 0){if(F.tag=1,F.memoizedState=null,F.updateQueue=null,Cs(ce)){var D=!0;s0(F)}else D=!1;F.memoizedState=Pe.state!==null&&Pe.state!==void 0?Pe.state:null,Sm(F);var E=ce.getDerivedStateFromProps;typeof E=="function"&&P0(F,ce,E,P),Pe.updater=i1,F.stateNode=Pe,Pe._reactInternals=F,lv(F,ce,P,J),F=pv(null,F,ce,!0,D,J)}else F.tag=0,Ms(null,F,Pe,J),F=F.child;return F;case 16:Pe=F.elementType;e:{switch(P!==null&&(P.alternate=null,F.alternate=null,F.flags|=2),P=F.pendingProps,D=Pe._init,Pe=D(Pe._payload),F.type=Pe,D=F.tag=E8(Pe),P=Bl(Pe,P),D){case 0:F=hv(null,F,Pe,P,J);break e;case 1:F=F2(null,F,Pe,P,J);break e;case 11:F=z2(null,F,Pe,P,J);break e;case 14:F=D2(null,F,Pe,Bl(Pe.type,P),ce,J);break e}throw Error(Dr(306,Pe,""))}return F;case 0:return ce=F.type,Pe=F.pendingProps,Pe=F.elementType===ce?Pe:Bl(ce,Pe),hv(P,F,ce,Pe,J);case 1:return ce=F.type,Pe=F.pendingProps,Pe=F.elementType===ce?Pe:Bl(ce,Pe),F2(P,F,ce,Pe,J);case 3:if(B2(F),ce=F.updateQueue,P===null||ce===null)throw Error(Dr(282));if(ce=F.pendingProps,Pe=F.memoizedState,Pe=Pe!==null?Pe.element:null,u3(P,F),Op(F,ce,null,J),ce=F.memoizedState.element,ce===Pe)yg(),F=Du(P,F,J);else{if(Pe=F.stateNode,(D=Pe.hydrate)&&(oc=Jf(F.stateNode.containerInfo.firstChild),zu=F,D=cu=!0),D){if(P=Pe.mutableSourceEagerHydrationData,P!=null)for(Pe=0;Pe"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(j3)}catch(P){console.error(P)}}j3(),c_.exports=ml;var qm=c_.exports;const z8=jp(qm);function eb(P,F){var J=Object.keys(P);if(Object.getOwnPropertySymbols){var ce=Object.getOwnPropertySymbols(P);F&&(ce=ce.filter(function(Pe){return Object.getOwnPropertyDescriptor(P,Pe).enumerable})),J.push.apply(J,ce)}return J}function yi(P){for(var F=1;F=0||(s[_]=E[_]);return s}(P,F);if(Object.getOwnPropertySymbols){var D=Object.getOwnPropertySymbols(P);for(ce=0;ce=0||Object.prototype.propertyIsEnumerable.call(P,J)&&(Pe[J]=P[J])}return Pe}function F8(P,F){if(F&&(typeof F=="object"||typeof F=="function"))return F;if(F!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(J){if(J===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return J}(P)}function V3(P){var F=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var J,ce=V0(P);if(F){var Pe=V0(this).constructor;J=Reflect.construct(ce,arguments,Pe)}else J=ce.apply(this,arguments);return F8(this,J)}}function l1(P,F){return function(J){if(Array.isArray(J))return J}(P)||function(J,ce){var Pe=J==null?null:typeof Symbol<"u"&&J[Symbol.iterator]||J["@@iterator"];if(Pe!=null){var D,E,e=[],_=!0,w=!1;try{for(Pe=Pe.call(J);!(_=(D=Pe.next()).done)&&(e.push(D.value),!ce||e.length!==ce);_=!0);}catch(s){w=!0,E=s}finally{try{_||Pe.return==null||Pe.return()}finally{if(w)throw E}}return e}}(P,F)||Gm(P,F)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Sv(P){return function(F){if(Array.isArray(F))return Ev(F)}(P)||function(F){if(typeof Symbol<"u"&&F[Symbol.iterator]!=null||F["@@iterator"]!=null)return Array.from(F)}(P)||Gm(P)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Gm(P,F){if(P){if(typeof P=="string")return Ev(P,F);var J=Object.prototype.toString.call(P).slice(8,-1);return J==="Object"&&P.constructor&&(J=P.constructor.name),J==="Map"||J==="Set"?Array.from(P):J==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(J)?Ev(P,F):void 0}}function Ev(P,F){(F==null||F>P.length)&&(F=P.length);for(var J=0,ce=new Array(F);J=P.length?{done:!0}:{done:!1,value:P[ce++]}},e:function(_){throw _},f:Pe}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var D,E=!0,e=!1;return{s:function(){J=J.call(P)},n:function(){var _=J.next();return E=_.done,_},e:function(_){e=!0,D=_},f:function(){try{E||J.return==null||J.return()}finally{if(e)throw D}}}}var Uc=String.fromCharCode,nb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",rb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",Wd={};function ib(P,F){if(!Wd[P]){Wd[P]={};for(var J=0;J>>8,J[2*ce+1]=D%256}return J},decompressFromUint8Array:function(P){if(P==null)return qs.decompress(P);for(var F=new Array(P.length/2),J=0,ce=F.length;J>=1}else{for(Pe=1,ce=0;ce>=1}--w==0&&(w=Math.pow(2,T),T++),delete t[_]}else for(Pe=l[_],ce=0;ce>=1;--w==0&&(w=Math.pow(2,T),T++),l[e]=s++,_=String(E)}if(_!==""){if(Object.prototype.hasOwnProperty.call(t,_)){if(_.charCodeAt(0)<256){for(ce=0;ce>=1}else{for(Pe=1,ce=0;ce>=1}--w==0&&(w=Math.pow(2,T),T++),delete t[_]}else for(Pe=l[_],ce=0;ce>=1;--w==0&&(w=Math.pow(2,T),T++)}for(Pe=2,ce=0;ce>=1;for(;;){if(y<<=1,f==F-1){i.push(J(y));break}f++}return i.join("")},decompress:function(P){return P==null?"":P==""?null:qs._decompress(P.length,32768,function(F){return P.charCodeAt(F)})},_decompress:function(P,F,J){var ce,Pe,D,E,e,_,w,s=[],T=[],y={val:J(0),position:F,index:1},f=4,l=4,t=3,i="";for(ce=0;ce<3;ce+=1)s[ce]=ce;for(D=0,e=Math.pow(2,2),_=1;_!=e;)E=y.val&y.position,y.position>>=1,y.position==0&&(y.position=F,y.val=J(y.index++)),D|=(E>0?1:0)*_,_<<=1;switch(D){case 0:for(D=0,e=Math.pow(2,8),_=1;_!=e;)E=y.val&y.position,y.position>>=1,y.position==0&&(y.position=F,y.val=J(y.index++)),D|=(E>0?1:0)*_,_<<=1;w=Uc(D);break;case 1:for(D=0,e=Math.pow(2,16),_=1;_!=e;)E=y.val&y.position,y.position>>=1,y.position==0&&(y.position=F,y.val=J(y.index++)),D|=(E>0?1:0)*_,_<<=1;w=Uc(D);break;case 2:return""}for(s[3]=w,Pe=w,T.push(w);;){if(y.index>P)return"";for(D=0,e=Math.pow(2,t),_=1;_!=e;)E=y.val&y.position,y.position>>=1,y.position==0&&(y.position=F,y.val=J(y.index++)),D|=(E>0?1:0)*_,_<<=1;switch(w=D){case 0:for(D=0,e=Math.pow(2,8),_=1;_!=e;)E=y.val&y.position,y.position>>=1,y.position==0&&(y.position=F,y.val=J(y.index++)),D|=(E>0?1:0)*_,_<<=1;s[l++]=Uc(D),w=l-1,f--;break;case 1:for(D=0,e=Math.pow(2,16),_=1;_!=e;)E=y.val&y.position,y.position>>=1,y.position==0&&(y.position=F,y.val=J(y.index++)),D|=(E>0?1:0)*_,_<<=1;s[l++]=Uc(D),w=l-1,f--;break;case 2:return T.join("")}if(f==0&&(f=Math.pow(2,t),t++),s[w])i=s[w];else{if(w!==l)return null;i=Pe+Pe.charAt(0)}T.push(i),s[l++]=Pe+i.charAt(0),Pe=i,--f==0&&(f=Math.pow(2,t),t++)}}},fu={DEBUG:!1,LIB_VERSION:"1.55.0"},H3=Array.prototype,q3=Object.prototype,u1=q3.toString,B8=q3.hasOwnProperty,gi=typeof window<"u"?window:{},Gc=gi.navigator||{userAgent:""},Vo=gi.document||{},Nl=Gc.userAgent,N8=["localhost","127.0.0.1"],H0=H3.forEach,ab=H3.indexOf,j8=Array.isArray,q0={},Ja={log:function(){if(fu.DEBUG&&!Ul(window.console)&&window.console){for(var P=("__rrweb_original__"in window.console.log)?window.console.log.__rrweb_original__:window.console.log,F=arguments.length,J=new Array(F),ce=0;ce1?F-1:0),ce=1;ce0&&(F[ce]=J)}),F},q8=["$performance_raw"];function Y3(P,F){return J=P,ce=function(D,E){return E&&q8.indexOf(E)>-1?D:typeof D=="string"&&F!==null?D.slice(0,F):D},Pe=new Set,function D(E,e){return E!==Object(E)?ce?ce(E,e):E:Pe.has(E)?void 0:(Pe.add(E),Ru(E)?(_=[],mc(E,function(w){_.push(D(w))})):(_={},Yi(E,function(w,s){Pe.has(w)||(_[s]=D(w,s))})),_);var _}(J);var J,ce,Pe}function c1(P){var F,J,ce,Pe,D,E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",e=0,_=0,w="",s=[];if(!P)return P;P=G8(P);do F=(D=P.charCodeAt(e++)<<16|P.charCodeAt(e++)<<8|P.charCodeAt(e++))>>18&63,J=D>>12&63,ce=D>>6&63,Pe=63&D,s[_++]=E.charAt(F)+E.charAt(J)+E.charAt(ce)+E.charAt(Pe);while(e>>8,J[2*ce+1]=D%256}return J},decompressFromUint8Array:function(P){if(P==null)return qs.decompress(P);for(var F=new Array(P.length/2),J=0,ce=F.length;J>=1}else{for(Pe=1,ce=0;ce>=1}--w==0&&(w=Math.pow(2,T),T++),delete t[_]}else for(Pe=l[_],ce=0;ce>=1;--w==0&&(w=Math.pow(2,T),T++),l[e]=s++,_=String(E)}if(_!==""){if(Object.prototype.hasOwnProperty.call(t,_)){if(_.charCodeAt(0)<256){for(ce=0;ce>=1}else{for(Pe=1,ce=0;ce>=1}--w==0&&(w=Math.pow(2,T),T++),delete t[_]}else for(Pe=l[_],ce=0;ce>=1;--w==0&&(w=Math.pow(2,T),T++)}for(Pe=2,ce=0;ce>=1;for(;;){if(m<<=1,f==F-1){i.push(J(m));break}f++}return i.join("")},decompress:function(P){return P==null?"":P==""?null:qs._decompress(P.length,32768,function(F){return P.charCodeAt(F)})},_decompress:function(P,F,J){var ce,Pe,D,E,e,_,w,s=[],T=[],m={val:J(0),position:F,index:1},f=4,l=4,t=3,i="";for(ce=0;ce<3;ce+=1)s[ce]=ce;for(D=0,e=Math.pow(2,2),_=1;_!=e;)E=m.val&m.position,m.position>>=1,m.position==0&&(m.position=F,m.val=J(m.index++)),D|=(E>0?1:0)*_,_<<=1;switch(D){case 0:for(D=0,e=Math.pow(2,8),_=1;_!=e;)E=m.val&m.position,m.position>>=1,m.position==0&&(m.position=F,m.val=J(m.index++)),D|=(E>0?1:0)*_,_<<=1;w=Uc(D);break;case 1:for(D=0,e=Math.pow(2,16),_=1;_!=e;)E=m.val&m.position,m.position>>=1,m.position==0&&(m.position=F,m.val=J(m.index++)),D|=(E>0?1:0)*_,_<<=1;w=Uc(D);break;case 2:return""}for(s[3]=w,Pe=w,T.push(w);;){if(m.index>P)return"";for(D=0,e=Math.pow(2,t),_=1;_!=e;)E=m.val&m.position,m.position>>=1,m.position==0&&(m.position=F,m.val=J(m.index++)),D|=(E>0?1:0)*_,_<<=1;switch(w=D){case 0:for(D=0,e=Math.pow(2,8),_=1;_!=e;)E=m.val&m.position,m.position>>=1,m.position==0&&(m.position=F,m.val=J(m.index++)),D|=(E>0?1:0)*_,_<<=1;s[l++]=Uc(D),w=l-1,f--;break;case 1:for(D=0,e=Math.pow(2,16),_=1;_!=e;)E=m.val&m.position,m.position>>=1,m.position==0&&(m.position=F,m.val=J(m.index++)),D|=(E>0?1:0)*_,_<<=1;s[l++]=Uc(D),w=l-1,f--;break;case 2:return T.join("")}if(f==0&&(f=Math.pow(2,t),t++),s[w])i=s[w];else{if(w!==l)return null;i=Pe+Pe.charAt(0)}T.push(i),s[l++]=Pe+i.charAt(0),Pe=i,--f==0&&(f=Math.pow(2,t),t++)}}},fu={DEBUG:!1,LIB_VERSION:"1.55.0"},H3=Array.prototype,q3=Object.prototype,u1=q3.toString,B8=q3.hasOwnProperty,gi=typeof window<"u"?window:{},Gc=gi.navigator||{userAgent:""},Vo=gi.document||{},Nl=Gc.userAgent,N8=["localhost","127.0.0.1"],H0=H3.forEach,ab=H3.indexOf,j8=Array.isArray,q0={},Ja={log:function(){if(fu.DEBUG&&!Ul(window.console)&&window.console){for(var P=("__rrweb_original__"in window.console.log)?window.console.log.__rrweb_original__:window.console.log,F=arguments.length,J=new Array(F),ce=0;ce1?F-1:0),ce=1;ce0&&(F[ce]=J)}),F},q8=["$performance_raw"];function Y3(P,F){return J=P,ce=function(D,E){return E&&q8.indexOf(E)>-1?D:typeof D=="string"&&F!==null?D.slice(0,F):D},Pe=new Set,function D(E,e){return E!==Object(E)?ce?ce(E,e):E:Pe.has(E)?void 0:(Pe.add(E),Ru(E)?(_=[],mc(E,function(w){_.push(D(w))})):(_={},Yi(E,function(w,s){Pe.has(w)||(_[s]=D(w,s))})),_);var _}(J);var J,ce,Pe}function c1(P){var F,J,ce,Pe,D,E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",e=0,_=0,w="",s=[];if(!P)return P;P=G8(P);do F=(D=P.charCodeAt(e++)<<16|P.charCodeAt(e++)<<8|P.charCodeAt(e++))>>18&63,J=D>>12&63,ce=D>>6&63,Pe=63&D,s[_++]=E.charAt(F)+E.charAt(J)+E.charAt(ce)+E.charAt(Pe);while(e127&&E<2048?String.fromCharCode(E>>6|192,63&E|128):String.fromCharCode(E>>12|224,E>>6&63|128,63&E|128),e!==null&&(J>F&&(D+=P.substring(F,J)),D+=e,F=J=Pe+1)}return J>F&&(D+=P.substring(F,P.length)),D},xc=(Ag=function(){for(var P=new Date().valueOf(),F=0;P==new Date().valueOf();)F++;return P.toString(16)+F.toString(16)},function(){var P=typeof window<"u"?(window.screen.height*window.screen.width).toString(16):"0";return Ag()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var F,J,ce=Nl,Pe=0,D=[];function E(e,_){var w,s=0;for(w=0;w<_.length;w++)s|=D[w]<<8*w;return e^s}for(F=0;F=4&&(Pe=E(Pe,D),D=[]);return D.length>0&&(Pe=E(Pe,D)),Pe.toString(16)}()+"-"+P+"-"+Ag()}),W8=function(P){return!!/(google web preview|baiduspider|yandexbot|bingbot|googlebot|yahoo! slurp|ahrefsbot|facebookexternalhit|facebookcatalog|applebot|semrushbot|duckduckbot|twitterbot|rogerbot|linkedinbot|mj12bot|sitebulb|bot.htm|bot.php|hubspot|crawler)/i.test(P)},ob=function(P,F){var J=F.replace(/[[]/,"\\[").replace(/[\]]/,"\\]"),ce=new RegExp("[\\?&]"+J+"=([^&#]*)").exec(P);if(ce===null||ce&&typeof ce[1]!="string"&&ce[1].length)return"";var Pe=ce[1];try{Pe=decodeURIComponent(Pe)}catch{Ja.error("Skipping decoding for malformed query param: "+Pe)}return Pe.replace(/\+/g," ")},sb=function(P,F){var J=P.match(new RegExp(F+"=([^&]*)"));return J?J[1]:null},bp=function(){function P(F){return F&&(F.preventDefault=P.preventDefault,F.stopPropagation=P.stopPropagation),F}return P.preventDefault=function(){this.returnValue=!1},P.stopPropagation=function(){this.cancelBubble=!0},function(F,J,ce,Pe,D){if(F)if(F.addEventListener&&!Pe)F.addEventListener(J,ce,!!D);else{var E="on"+J,e=F[E];F[E]=function(_,w,s){return function(T){if(T=T||P(window.event)){var y,f=!0;G3(s)&&(y=s(T));var l=w.call(_,T);return y!==!1&&l!==!1||(f=!1),f}}}(F,ce,e)}else Ja.error("No valid element provided to register_event")}}(),yo={campaignParams:function(P){var F=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gclid","fbclid","msclkid"].concat(P||[]),J={};return Yi(F,function(ce){var Pe=ob(Vo.URL,ce);Pe.length&&(J[ce]=Pe)}),J},searchEngine:function(){var P=Vo.referrer;return P?P.search("https?://(.*)google.([^/?]*)")===0?"google":P.search("https?://(.*)bing.com")===0?"bing":P.search("https?://(.*)yahoo.com")===0?"yahoo":P.search("https?://(.*)duckduckgo.com")===0?"duckduckgo":null:null},searchInfo:function(){var P=yo.searchEngine(),F=P!="yahoo"?"q":"p",J={};if(P!==null){J.$search_engine=P;var ce=ob(Vo.referrer,F);ce.length&&(J.ph_keyword=ce)}return J},browser:function(P,F,J){return F=F||"",J||Ki(P," OPR/")?Ki(P,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(P)?"BlackBerry":Ki(P,"IEMobile")||Ki(P,"WPDesktop")?"Internet Explorer Mobile":Ki(P,"SamsungBrowser/")?"Samsung Internet":Ki(P,"Edge")||Ki(P,"Edg/")?"Microsoft Edge":Ki(P,"FBIOS")?"Facebook Mobile":Ki(P,"Chrome")?"Chrome":Ki(P,"CriOS")?"Chrome iOS":Ki(P,"UCWEB")||Ki(P,"UCBrowser")?"UC Browser":Ki(P,"FxiOS")?"Firefox iOS":Ki(F,"Apple")?Ki(P,"Mobile")?"Mobile Safari":"Safari":Ki(P,"Android")?"Android Mobile":Ki(P,"Konqueror")?"Konqueror":Ki(P,"Firefox")?"Firefox":Ki(P,"MSIE")||Ki(P,"Trident/")?"Internet Explorer":Ki(P,"Gecko")?"Mozilla":""},browserVersion:function(P,F,J){var ce={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/}[yo.browser(P,F,J)];if(ce===void 0)return null;var Pe=P.match(ce);return Pe?parseFloat(Pe[Pe.length-2]):null},browserLanguage:function(){return Gc.language||Gc.userLanguage},os:function(){var P=Nl;return/Windows/i.test(P)?/Phone/.test(P)||/WPDesktop/.test(P)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(P)?"iOS":/Android/.test(P)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(P)?"BlackBerry":/Mac/i.test(P)?"Mac OS X":/Linux/.test(P)?"Linux":/CrOS/.test(P)?"Chrome OS":""},device:function(P){return/Windows Phone/i.test(P)||/WPDesktop/.test(P)?"Windows Phone":/iPad/.test(P)?"iPad":/iPod/.test(P)?"iPod Touch":/iPhone/.test(P)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(P)?"BlackBerry":/Android/.test(P)&&!/Mobile/.test(P)?"Android Tablet":/Android/.test(P)?"Android":""},deviceType:function(P){var F=this.device(P);return F==="iPad"||F==="Android Tablet"?"Tablet":F?"Mobile":"Desktop"},referrer:function(){return Vo.referrer||"$direct"},referringDomain:function(){if(!Vo.referrer)return"$direct";var P=Vo.createElement("a");return P.href=Vo.referrer,P.host},properties:function(){return So(Lv({$os:yo.os(),$browser:yo.browser(Nl,Gc.vendor,gi.opera),$device:yo.device(Nl),$device_type:yo.deviceType(Nl)}),{$current_url:gi==null?void 0:gi.location.href,$host:gi==null?void 0:gi.location.host,$pathname:gi==null?void 0:gi.location.pathname,$browser_version:yo.browserVersion(Nl,Gc.vendor,gi.opera),$browser_language:yo.browserLanguage(),$screen_height:gi==null?void 0:gi.screen.height,$screen_width:gi==null?void 0:gi.screen.width,$viewport_height:gi==null?void 0:gi.innerHeight,$viewport_width:gi==null?void 0:gi.innerWidth,$lib:"web",$lib_version:fu.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:(Date.now=Date.now||function(){return+new Date},Date.now()/1e3)})},people_properties:function(){return So(Lv({$os:yo.os(),$browser:yo.browser(Nl,Gc.vendor,gi.opera)}),{$browser_version:yo.browserVersion(Nl,Gc.vendor,gi.opera)})}};function G0(P){switch(tf(P.className)){case"string":return P.className;case"object":return("baseVal"in P.className?P.className.baseVal:null)||P.getAttribute("class")||"";default:return""}}function W0(P){var F="";return p0(P)&&!$3(P)&&P.childNodes&&P.childNodes.length&&Yi(P.childNodes,function(J){X3(J)&&J.textContent&&(F+=Cv(J.textContent).split(/(\s+)/).filter(Wf).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))}),Cv(F)}function lb(P){return!!P&&P.nodeType===1}function nf(P,F){return!!P&&!!P.tagName&&P.tagName.toLowerCase()===F.toLowerCase()}function X3(P){return!!P&&P.nodeType===3}function ub(P){return!!P&&P.nodeType===11}var Mg=["a","button","form","input","select","textarea","label"];function p0(P){for(var F=P;F.parentNode&&!nf(F,"body");F=F.parentNode){var J=G0(F).split(" ");if(Ki(J,"ph-sensitive")||Ki(J,"ph-no-capture"))return!1}if(Ki(G0(P).split(" "),"ph-include"))return!0;var ce=P.type||"";if(typeof ce=="string")switch(ce.toLowerCase()){case"hidden":case"password":return!1}var Pe=P.name||P.id||"";return!(typeof Pe=="string"&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(Pe.replace(/[^a-zA-Z0-9]/g,"")))}function $3(P){return!!(nf(P,"input")&&!["button","checkbox","submit","reset"].includes(P.type)||nf(P,"select")||nf(P,"textarea")||P.getAttribute("contenteditable")==="true")}function Wf(P){return!(P===null||Ul(P)||typeof P=="string"&&(P=Cv(P),/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test((P||"").replace(/[- ]/g,""))||/(^\d{3}-?\d{2}-?\d{4}$)/.test(P)))}function J3(P,F){var J=document.createElement("script");J.type="text/javascript",J.src=P,J.onload=F;var ce,Pe=document.querySelectorAll("body > script");Pe.length>0?(ce=Pe[0].parentNode)===null||ce===void 0||ce.insertBefore(J,Pe[0]):document.body.appendChild(J)}function cb(P){var F=W0(P);return Wf(F="".concat(F," ").concat(K3(P)).trim())?F:""}function K3(P){var F="";return P&&P.childNodes&&P.childNodes.length&&Yi(P.childNodes,function(J){var ce;if(J&&((ce=J.tagName)===null||ce===void 0?void 0:ce.toLowerCase())==="span")try{var Pe=W0(J);F="".concat(F," ").concat(Pe).trim(),J.childNodes&&J.childNodes.length&&(F="".concat(F," ").concat(K3(J)).trim())}catch(D){console.error(D)}}),F}var Z8=function(){function P(F){Wo(this,P),this.clicks=[],this.enabled=F}return Zo(P,[{key:"isRageClick",value:function(F,J,ce){if(!this.enabled)return!1;var Pe=this.clicks[this.clicks.length-1];if(Pe&&Math.abs(F-Pe.x)+Math.abs(J-Pe.y)<30&&ce-Pe.timestamp<1e3){if(this.clicks.push({x:F,y:J,timestamp:ce}),this.clicks.length===3)return!0}else this.clicks=[{x:F,y:J,timestamp:ce}];return!1}}]),P}(),Y8=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,lu={is_supported:function(){return!0},error:function(P){Ja.error("cookieStore error: "+P)},get:function(P){try{for(var F=P+"=",J=document.cookie.split(";"),ce=0;ce-1&&!J&&(ce.toLowerCase()==="a"||ce.toLowerCase()==="button"?Pe.$el_text=cb(P):Pe.$el_text=W0(P));var D=G0(P);D.length>0&&(Pe.classes=D.split(" ").filter(function(w){return w!==""})),Yi(P.attributes,function(w){var s;$3(P)&&["name","id","class"].indexOf(w.name)===-1||!F&&Wf(w.value)&&(typeof(s=w.name)!="string"||s.substring(0,10)!=="_ngcontent"&&s.substring(0,7)!=="_nghost")&&(Pe["attr__"+w.name]=w.value)});for(var E=1,e=1,_=P;_=this._previousElementSibling(_);)E++,_.tagName===P.tagName&&e++;return Pe.nth_child=E,Pe.nth_of_type=e,Pe},_getDefaultProperties:function(P){return{$event_type:P,$ce_version:1}},_extractCustomPropertyValue:function(P){var F=[];return Yi(document.querySelectorAll(P.css_selector),function(J){var ce;["input","select"].indexOf(J.tagName.toLowerCase())>-1?ce=J.value:J.textContent&&(ce=J.textContent),Wf(ce)&&F.push(ce)}),F.join(", ")},_getCustomProperties:function(P){var F=this,J={};return Yi(this._customProperties,function(ce){Yi(ce.event_selectors,function(Pe){Yi(document.querySelectorAll(Pe),function(D){Ki(P,D)&&p0(D)&&(J[ce.name]=F._extractCustomPropertyValue(ce))})})}),J},_getEventTarget:function(P){return P.target===void 0?P.srcElement||null:(F=P.target)!==null&&F!==void 0&&F.shadowRoot?P.composedPath()[0]||null:P.target||null;var F},_captureEvent:function(P,F){var J,ce=this,Pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"$autocapture",D=this._getEventTarget(P);if(X3(D)&&(D=D.parentNode||null),Pe==="$autocapture"&&P.type==="click"&&P instanceof MouseEvent&&(J=this.rageclicks)!==null&&J!==void 0&&J.isRageClick(P.clientX,P.clientY,new Date().getTime())&&this._captureEvent(P,F,"$rageclick"),D&&function(f,l){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;if(!f||nf(f,"html")||!lb(f))return!1;if(t!=null&&t.url_allowlist){var i=window.location.href,r=t.url_allowlist;if(r&&!r.some(function(g){return i.match(g)}))return!1}if(t!=null&&t.dom_event_allowlist){var n=t.dom_event_allowlist;if(n&&!n.some(function(g){return l.type===g}))return!1}if(t!=null&&t.element_allowlist){var o=t.element_allowlist;if(o&&!o.some(function(g){return f.tagName.toLowerCase()===g}))return!1}if(t!=null&&t.css_selector_allowlist){var a=t.css_selector_allowlist;if(a&&!a.some(function(g){return f.matches(g)}))return!1}for(var u=!1,p=[f],c=!0,b=f;b.parentNode&&!nf(b,"body");)if(ub(b.parentNode))p.push(b.parentNode.host),b=b.parentNode.host;else{if(!(c=b.parentNode||!1))break;if(Mg.indexOf(c.tagName.toLowerCase())>-1)u=!0;else{var d=window.getComputedStyle(c);d&&d.getPropertyValue("cursor")==="pointer"&&(u=!0)}p.push(c),b=c}var v=window.getComputedStyle(f);if(v&&v.getPropertyValue("cursor")==="pointer"&&l.type==="click")return!0;var x=f.tagName.toLowerCase();switch(x){case"html":return!1;case"form":return l.type==="submit";case"input":case"select":case"textarea":return l.type==="change"||l.type==="click";default:return u?l.type==="click":l.type==="click"&&(Mg.indexOf(x)>-1||f.getAttribute("contenteditable")==="true")}}(D,P,this.config)){for(var E=[D],e=D;e.parentNode&&!nf(e,"body");)ub(e.parentNode)?(E.push(e.parentNode.host),e=e.parentNode.host):(E.push(e.parentNode),e=e.parentNode);var _,w=[],s={},T=!1;if(Yi(E,function(f){var l=p0(f);f.tagName.toLowerCase()==="a"&&(_=f.getAttribute("href"),_=l&&Wf(_)&&_),Ki(G0(f).split(" "),"ph-no-capture")&&(T=!0),w.push(ce._getPropertiesFromElement(f,F.get_config("mask_all_element_attributes"),F.get_config("mask_all_text")));var t=ce._getAugmentPropertiesFromElement(f);So(s,t)}),F.get_config("mask_all_text")||(D.tagName.toLowerCase()==="a"||D.tagName.toLowerCase()==="button"?w[0].$el_text=cb(D):w[0].$el_text=W0(D)),_&&(w[0].attr__href=_),T)return!1;var y=So(this._getDefaultProperties(P.type),{$elements:w},this._getCustomProperties(E),s);return F.capture(Pe,y),!0}},_navigate:function(P){window.location.href=P},_addDomEventHandlers:function(P){var F=this,J=function(ce){ce=ce||window.event,F._captureEvent(ce,P)};bp(document,"submit",J,!1,!0),bp(document,"change",J,!1,!0),bp(document,"click",J,!1,!0)},_customProperties:[],rageclicks:null,config:void 0,init:function(P){var F;typeof P.__autocapture!="boolean"&&(this.config=P.__autocapture),(F=this.config)!==null&&F!==void 0&&F.url_allowlist&&(this.config.url_allowlist=this.config.url_allowlist.map(function(J){return new RegExp(J)})),this.rageclicks=new Z8(P.get_config("rageclick"))},afterDecideResponse:function(P,F){this._setIsAutocaptureEnabled(F);var J=F.get_config("token");this._initializedTokens.indexOf(J)>-1?Ja.log('autocapture already initialized for token "'+J+'"'):(F.persistence&&F.persistence.register(Bi({},fb,!!P.autocapture_opt_out)),this._initializedTokens.push(J),P&&P.config&&P.config.enable_collect_everything&&this._isAutocaptureEnabled?(P.custom_properties&&(this._customProperties=P.custom_properties),this._addDomEventHandlers(F)):F.__autocapture=!1)},enabledForProject:function(P,F,J){if(!P)return!0;F=Ul(F)?10:F,J=Ul(J)?10:J;for(var ce=0,Pe=0;Pe1&&arguments[1]!==void 0?arguments[1]:{};if(!this.getFlags())return console.warn('getFeatureFlag for key "'+F+`" failed. Feature flags didn't load in time.`),!1;var ce=this.getFlagVariants()[F];return!J.send_event&&"send_event"in J||this.flagCallReported[F]||(this.flagCallReported[F]=!0,this.instance.capture("$feature_flag_called",{$feature_flag:F,$feature_flag_response:ce})),ce}},{key:"getFeatureFlagPayload",value:function(F){return this.getFlagPayloads()[F]}},{key:"isFeatureEnabled",value:function(F){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.getFlags()?!!this.getFeatureFlag(F,J):(console.warn('isFeatureEnabled for key "'+F+`" failed. Feature flags didn't load in time.`),!1)}},{key:"addFeatureFlagsHandler",value:function(F){this.featureFlagEventHandlers.push(F)}},{key:"removeFeatureFlagsHandler",value:function(F){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(function(J){return J!==F})}},{key:"receivedFeatureFlags",value:function(F){this.instance.decideEndpointWasHit=!0;var J=this.getFlagVariants(),ce=this.getFlagPayloads();(function(Pe,D){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},_=Pe.featureFlags,w=Pe.featureFlagPayloads;if(_)if(Array.isArray(_)){var s,T={};if(_)for(var y=0;y<_.length;y++)T[_[y]]=!0;D&&D.register((Bi(s={},Yd,_),Bi(s,Yc,T),s))}else{var f,l=_,t=w;Pe.errorsWhileComputingFlags&&(l=yi(yi({},E),l),t=yi(yi({},e),t)),D&&D.register((Bi(f={},Yd,Object.keys(vb(l))),Bi(f,Yc,l||{}),Bi(f,Cg,t||{}),f))}else D&&(D.unregister(Yd),D.unregister(Yc),D.unregister(Cg))})(F,this.instance.persistence,J,ce),this._fireFeatureFlagsCallbacks()}},{key:"override",value:function(F){if(this._override_warning=!1,F===!1)this.instance.persistence.unregister(Xd);else if(Array.isArray(F)){for(var J={},ce=0;ce1&&arguments[1]!==void 0&&arguments[1],Pe=this.instance.get_property(Rv);if(Pe&&!ce)return F(Pe);this.instance._send_request("".concat(this.instance.get_config("api_host"),"/api/early_access_features/?token=").concat(this.instance.get_config("token")),{},{method:"GET"},function(D){var E=D.earlyAccessFeatures;return J.instance.persistence.register(Bi({},Rv,E)),F(E)})}},{key:"_prepareFeatureFlagsForCallbacks",value:function(){var F=this.getFlags(),J=this.getFlagVariants();return{flags:F.filter(function(ce){return J[ce]}),flagVariants:Object.keys(J).filter(function(ce){return J[ce]}).reduce(function(ce,Pe){return ce[Pe]=J[Pe],ce},{})}}},{key:"_fireFeatureFlagsCallbacks",value:function(){var F=this._prepareFeatureFlagsForCallbacks(),J=F.flags,ce=F.flagVariants;this.featureFlagEventHandlers.forEach(function(Pe){return Pe(J,ce)})}},{key:"setPersonPropertiesForFlags",value:function(F){var J=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],ce=this.instance.get_property(sp)||{};this.instance.register(Bi({},sp,yi(yi({},ce),F))),J&&this.instance.reloadFeatureFlags()}},{key:"resetPersonPropertiesForFlags",value:function(){this.instance.unregister(sp)}},{key:"setGroupPropertiesForFlags",value:function(F){var J=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],ce=this.instance.get_property(Wc)||{};Object.keys(ce).length!==0&&Object.keys(ce).forEach(function(Pe){ce[Pe]=yi(yi({},ce[Pe]),F[Pe]),delete F[Pe]}),this.instance.register(Bi({},Wc,yi(yi({},ce),F))),J&&this.instance.reloadFeatureFlags()}},{key:"resetGroupPropertiesForFlags",value:function(F){if(F){var J=this.instance.get_property(Wc)||{};this.instance.register(Bi({},Wc,yi(yi({},J),{},Bi({},F,{}))))}else this.instance.unregister(Wc)}}]),P}(),aT="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJibGFjayIvPgo8cGF0aCBkPSJNOCAwSDE2TDAgMTZWOEw4IDBaIiBmaWxsPSIjMkQyRDJEIi8+CjxwYXRoIGQ9Ik0xNiA4VjE2SDhMMTYgOFoiIGZpbGw9IiMyRDJEMkQiLz4KPC9zdmc+Cg==",mb=2,oT=4,sT=6,lT="rrweb/console@1",uT="/e/",cT=function(){function P(F){Wo(this,P),this.instance=F,this.captureStarted=!1,this.snapshots=[],this.emit=!1,this.endpoint=uT,this.stopRrweb=void 0,this.windowId=null,this.sessionId=null,this.receivedDecide=!1}return Zo(P,[{key:"startRecordingIfEnabled",value:function(){this.isRecordingEnabled()?this.startCaptureAndTrySendingQueuedSnapshots():this.stopRecording()}},{key:"started",value:function(){return this.captureStarted}},{key:"stopRecording",value:function(){this.captureStarted&&this.stopRrweb&&(this.stopRrweb(),this.stopRrweb=void 0,this.captureStarted=!1)}},{key:"isRecordingEnabled",value:function(){var F=!!this.instance.get_property(Ov),J=!this.instance.get_config("disable_session_recording");return F&&J}},{key:"isConsoleLogCaptureEnabled",value:function(){var F=!!this.instance.get_property(hb),J=this.instance.get_config("enable_recording_console_log");return J??F}},{key:"getRecordingVersion",value:function(){var F,J=this.instance.get_property(pb);return((F=this.instance.get_config("session_recording"))===null||F===void 0?void 0:F.recorderVersion)||J||"v1"}},{key:"afterDecideResponse",value:function(F){var J,ce,Pe,D,E,e;this.receivedDecide=!0,this.instance.persistence&&this.instance.persistence.register((Bi(E={},Ov,!!F.sessionRecording),Bi(E,hb,(Pe=F.sessionRecording)===null||Pe===void 0?void 0:Pe.consoleLogRecordingEnabled),Bi(E,pb,(D=F.sessionRecording)===null||D===void 0?void 0:D.recorderVersion),E)),(J=F.sessionRecording)!==null&&J!==void 0&&J.endpoint&&(this.endpoint=(e=F.sessionRecording)===null||e===void 0?void 0:e.endpoint),(ce=F.sessionRecording)!==null&&ce!==void 0&&ce.recorderVersion&&(this.recorderVersion=F.sessionRecording.recorderVersion),this.startRecordingIfEnabled()}},{key:"startCaptureAndTrySendingQueuedSnapshots",value:function(){var F=this;this.receivedDecide&&(this.emit=!0,this.snapshots.forEach(function(J){return F._captureSnapshot(J)})),this._startCapture()}},{key:"_startCapture",value:function(){if(Object.assign!==void 0&&!this.captureStarted&&!this.instance.get_config("disable_session_recording")){this.captureStarted=!0;var F=this.getRecordingVersion()==="v2"?"recorder-v2.js":"recorder.js";this.instance.__loaded_recorder_version!==this.getRecordingVersion()?J3(this.instance.get_config("api_host")+"/static/".concat(F,"?v=").concat(fu.LIB_VERSION),this._onScriptLoaded.bind(this)):this._onScriptLoaded()}}},{key:"_updateWindowAndSessionIds",value:function(F){var J,ce=F.type===3&&((J=F.data)===null||J===void 0?void 0:J.source)===0,Pe=this.instance.sessionManager.checkAndGetSessionAndWindowId(ce,F.timestamp),D=Pe.windowId,E=Pe.sessionId;if(this.captureStarted&&(this.windowId!==D||this.sessionId!==E)&&[mb,oT].indexOf(F.type)===-1)try{var e;(e=this.rrwebRecord)===null||e===void 0||e.takeFullSnapshot()}catch(_){Ja.error("Error taking full snapshot.",_)}this.windowId=D,this.sessionId=E}},{key:"_onScriptLoaded",value:function(){var F=this,J={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskAllInputs:!0,maskInputOptions:{},maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0};this.rrwebRecord=window.rrweb?window.rrweb.record:window.rrwebRecord;for(var ce=this.instance.get_config("session_recording"),Pe=0,D=Object.entries(ce||{});Pe10&&(ce.data.payload.payload=ce.data.payload.payload.slice(0,10),ce.data.payload.payload.push("...[truncated]"));for(var Pe=[],D=0;D2e3?Pe.push(ce.data.payload.payload[D].slice(0,2e3)+"...[truncated]"):Pe.push(ce.data.payload.payload[D]);return ce.data.payload.payload=Pe,ce}return ce}(function(ce){if(ce&&tf(ce)==="object"){var Pe=JSON.stringify(ce);if(Pe.length>5e6){var D,E=Ac(Pe.matchAll(/data:([\w\/\-\.]+);(\w+),([^)"]*)/gim));try{for(E.s();!(D=E.n()).done;){var e=D.value;Pe=e[1].toLocaleLowerCase().slice(0,6)==="image/"?Pe.replace(e[0],aT):Pe.replace(e[0],"")}}catch(_){E.e(_)}finally{E.f()}}return JSON.parse(Pe)}return ce}(F)),this._updateWindowAndSessionIds(F);var J={$snapshot_data:F,$session_id:this.sessionId,$window_id:this.windowId};this.instance._captureMetrics.incr("rrweb-record"),this.instance._captureMetrics.incr("rrweb-record-".concat(F.type)),this.emit?this._captureSnapshot(J):this.snapshots.push(J)}},{key:"_captureSnapshot",value:function(F){this.instance.capture("$snapshot",F,{transport:"XHR",method:"POST",endpoint:this.endpoint,_noTruncate:!0,_batchKey:"sessionRecording",_metrics:{rrweb_full_snapshot:F.$snapshot_data.type===mb}})}}]),P}(),ru={entryType:0,timeOrigin:1,name:2,startTime:3,redirectStart:4,redirectEnd:5,workerStart:6,fetchStart:7,domainLookupStart:8,domainLookupEnd:9,connectStart:10,secureConnectionStart:11,connectEnd:12,requestStart:13,responseStart:14,responseEnd:15,decodedBodySize:16,encodedBodySize:17,initiatorType:18,nextHopProtocol:19,renderBlockingStatus:20,responseStatus:21,transferSize:22,element:23,renderTime:24,loadTime:25,size:26,id:27,url:28,domComplete:29,domContentLoadedEvent:30,domInteractive:31,loadEventEnd:32,loadEventStart:33,redirectCount:34,navigationType:35,unloadEventEnd:36,unloadEventStart:37,duration:39,timestamp:40},fT=["first-input","navigation","paint","resource"],hT=["/s/","/e/"],pT=function(){function P(F){Wo(this,P),Bi(this,"_forceAllowLocalhost",!1),this.instance=F}return Zo(P,[{key:"startObservingIfEnabled",value:function(){this.isEnabled()?this.startObserving():this.stopObserving()}},{key:"startObserving",value:function(){var F=this;if(!this.observer)if(!N8.includes(location.hostname)||this._forceAllowLocalhost)try{this.observer=new PerformanceObserver(function(ce){ce.getEntries().forEach(function(Pe){F._capturePerformanceEvent(Pe)})});var J=PerformanceObserver.supportedEntryTypes.filter(function(ce){return fT.includes(ce)});J.forEach(function(ce){var Pe;(Pe=F.observer)===null||Pe===void 0||Pe.observe({type:ce,buffered:!0})})}catch(ce){console.error("PostHog failed to start performance observer",ce),this.stopObserving()}else Ja.log("PostHog Peformance observer not started because we are on localhost.")}},{key:"stopObserving",value:function(){this.observer&&(this.observer.disconnect(),this.observer=void 0)}},{key:"isObserving",value:function(){return!!this.observer}},{key:"isEnabled",value:function(){var F,J;return(F=(J=this.instance.get_config("capture_performance"))!==null&&J!==void 0?J:this.remoteEnabled)!==null&&F!==void 0&&F}},{key:"afterDecideResponse",value:function(F){this.remoteEnabled=F.capturePerformance||!1,this.isEnabled()&&this.startObserving()}},{key:"_capturePerformanceEvent",value:function(F){if(F.name.startsWith(this.instance.get_config("api_host"))){var J=F.name.replace(this.instance.get_config("api_host"),"");if(hT.find(function(T){return J.startsWith(T)}))return}var ce=F.toJSON(),Pe={},D=Math.floor(Date.now()-performance.now());for(var E in Pe[ru.timeOrigin]=D,Pe[ru.timestamp]=Math.floor(D+F.startTime),ru)ce[E]!==void 0&&(Pe[ru[E]]=ce[E]);if(this.capturePerformanceEvent(Pe),dT(F)){var e,_=Ac(F.serverTiming||[]);try{for(_.s();!(e=_.n()).done;){var w,s=e.value;this.capturePerformanceEvent((Bi(w={},ru.timeOrigin,D),Bi(w,ru.timestamp,Math.floor(D+F.startTime)),Bi(w,ru.name,s.name),Bi(w,ru.duration,s.duration),Bi(w,ru.entryType,"serverTiming"),w))}}catch(T){_.e(T)}finally{_.f()}}}},{key:"capturePerformanceEvent",value:function(F){var J,ce=F[ru.timestamp];(J=this.instance.sessionRecording)===null||J===void 0||J.onRRwebEmit({type:6,data:{plugin:"posthog/network@1",payload:F},timestamp:ce})}}]),P}(),dT=function(P){return P.entryType==="navigation"||P.entryType==="resource"},gT=function(){function P(F){Wo(this,P),this.instance=F,this.instance.decideEndpointWasHit=this.instance._hasBootstrappedFeatureFlags()}return Zo(P,[{key:"call",value:function(){var F=this,J=c1(JSON.stringify({token:this.instance.get_config("token"),distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups()}));this.instance._send_request("".concat(this.instance.get_config("api_host"),"/decide/?v=3"),{data:J,verbose:!0},{method:"POST"},function(ce){return F.parseDecideResponse(ce)})}},{key:"parseDecideResponse",value:function(F){var J,ce,Pe=this;if((F==null?void 0:F.status)!==0){if(this.instance.decideEndpointWasHit=!0,!document||!document.body)return console.log("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(function(){Pe.parseDecideResponse(F)},500);if(this.instance.toolbar.afterDecideResponse(F),(J=this.instance.sessionRecording)===null||J===void 0||J.afterDecideResponse(F),nc.afterDecideResponse(F,this.instance),(ce=this.instance.webPerformance)===null||ce===void 0||ce.afterDecideResponse(F),this.instance.featureFlags.receivedFeatureFlags(F),this.instance.compression={},F.supportedCompression&&!this.instance.get_config("disable_compression")){var D,E={},e=Ac(F.supportedCompression);try{for(e.s();!(D=e.n()).done;)E[D.value]=!0}catch(y){e.e(y)}finally{e.f()}this.instance.compression=E}if(F.siteApps)if(this.instance.get_config("opt_in_site_apps")){var _,w=this.instance.get_config("api_host"),s=Ac(F.siteApps);try{var T=function(){var y=_.value,f=y.id,l=y.url,t=document.createElement("script");t.src=[w,w[w.length-1]==="/"&&l[0]==="/"?l.substring(1):l].join(""),t.onerror=function(i){console.error("Error while initializing PostHog app with config id ".concat(f),i)},window["__$$ph_site_app_".concat(f)]=Pe.instance,document.body.appendChild(t)};for(s.s();!(_=s.n()).done;)T()}catch(y){s.e(y)}finally{s.f()}}else F.siteApps.length>0&&console.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}else console.error("Failed to fetch feature flags from PostHog.")}}]),P}(),vT=["https://app.posthog.com","https://eu.posthog.com"],mT=["source"],yT=function(){function P(F){Wo(this,P),this.instance=F}return Zo(P,[{key:"afterDecideResponse",value:function(F){var J=F.toolbarParams||F.editorParams||(F.toolbarVersion?{toolbarVersion:F.toolbarVersion}:{});F.isAuthenticated&&J.toolbarVersion&&J.toolbarVersion.indexOf("toolbar")===0&&this.loadToolbar(yi(yi({},J),{},{apiURL:this.instance.get_config("api_host")}))}},{key:"maybeLoadToolbar",value:function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.location,J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:window.history;try{if(!J){try{window.localStorage.setItem("test","test"),window.localStorage.removeItem("test")}catch{return!1}J=window.localStorage}var Pe,D=sb(F.hash,"__posthog")||sb(F.hash,"state"),E=D?JSON.parse(decodeURIComponent(D)):null;return E&&E.action==="ph_authorize"?((Pe=E).source="url",Pe&&Object.keys(Pe).length>0&&(E.desiredHash?F.hash=E.desiredHash:ce?ce.replaceState("",document.title,F.pathname+F.search):F.hash="")):((Pe=JSON.parse(J.getItem("_postHogToolbarParams")||"{}")).source="localstorage",delete Pe.userIntent),Pe.apiURL||(Pe.apiURL=this.instance.get_config("api_host")),!(!Pe.token||this.instance.get_config("token")!==Pe.token)&&(this.loadToolbar(Pe),!0)}catch{return!1}}},{key:"loadToolbar",value:function(F){var J=this;if(window._postHogToolbarLoaded)return!1;window._postHogToolbarLoaded=!0;var ce=(F==null?void 0:F.apiURL)||this.instance.get_config("api_host"),Pe=3e4*Math.floor(Date.now()/3e4),D="".concat(ce).concat(ce.endsWith("/")?"":"/","static/toolbar.js?_ts=").concat(Pe),E=!vT.includes(this.instance.get_config("api_host"))&&this.instance.get_config("advanced_disable_toolbar_metrics"),e=yi(yi({apiURL:ce,jsURL:ce,token:this.instance.get_config("token")},F),E?{instrument:!1}:{});e.source;var _=D8(e,mT);return window.localStorage.setItem("_postHogToolbarParams",JSON.stringify(_)),J3(D,function(){(window.ph_load_toolbar||window.ph_load_editor)(e,J.instance)}),bp(window,"turbolinks:load",function(){window._postHogToolbarLoaded=!1,J.loadToolbar(e)}),!0}},{key:"_loadEditor",value:function(F){return this.loadToolbar(F)}},{key:"maybeLoadEditor",value:function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.location,J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:window.history;return this.maybeLoadToolbar(F,J,ce)}}]),P}(),iw=function(){function P(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:3e3;Wo(this,P),this.isPolling=!0,this._event_queue=[],this._empty_queue_count=0,this._poller=void 0,this._pollInterval=F}return Zo(P,[{key:"setPollInterval",value:function(F){this._pollInterval=F,this.isPolling&&this.poll()}},{key:"poll",value:function(){}},{key:"unload",value:function(){}},{key:"getTime",value:function(){return new Date().getTime()}}]),P}(),xT=function(P){U3(J,iw);var F=V3(J);function J(ce,Pe){var D,E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:3e3;return Wo(this,J),(D=F.call(this,E)).handlePollRequest=Pe,D.captureMetrics=ce,D}return Zo(J,[{key:"enqueue",value:function(ce,Pe,D){this.captureMetrics.incr("batch-enqueue"),this._event_queue.push({url:ce,data:Pe,options:D}),this.isPolling||(this.isPolling=!0,this.poll())}},{key:"poll",value:function(){var ce=this;clearTimeout(this._poller),this._poller=setTimeout(function(){if(ce._event_queue.length>0){var Pe=ce.formatQueue(),D=function(e){var _=Pe[e],w=_.url,s=_.data,T=_.options;Yi(s,function(y,f){s[f].offset=Math.abs(s[f].timestamp-ce.getTime()),delete s[f].timestamp}),ce.handlePollRequest(w,s,T),ce.captureMetrics.incr("batch-requests"),ce.captureMetrics.incr("batch-requests-".concat(w.slice(w.length-2))),ce.captureMetrics.incr("batch-handle",s.length),ce.captureMetrics.incr("batch-handle-".concat(w.slice(w.length-2)),s.length)};for(var E in Pe)D(E);ce._event_queue.length=0,ce._empty_queue_count=0}else ce._empty_queue_count++;ce._empty_queue_count>4&&(ce.isPolling=!1,ce._empty_queue_count=0),ce.isPolling&&ce.poll()},this._pollInterval)}},{key:"updateUnloadMetrics",value:function(){var ce=this.formatQueue();for(var Pe in ce){var D=ce[Pe],E=D.url,e=D.data;this.captureMetrics.incr("batch-unload-requests"),this.captureMetrics.incr("batch-unload-requests-".concat(E.slice(E.length-2))),this.captureMetrics.incr("batch-unload",e.length),this.captureMetrics.incr("batch-unload-".concat(E.slice(E.length-2)),e.length)}}},{key:"unload",value:function(){var ce=this;clearTimeout(this._poller);var Pe=this._event_queue.length>0?this.formatQueue():{};this._event_queue.length=0;var D=Object.values(Pe);[].concat(Sv(D.filter(function(E){return E.url.indexOf("/e")===0})),Sv(D.filter(function(E){return E.url.indexOf("/e")!==0}))).map(function(E){var e=E.url,_=E.data,w=E.options;ce.handlePollRequest(e,_,yi(yi({},w),{},{transport:"sendBeacon"}))})}},{key:"formatQueue",value:function(){var ce={};return Yi(this._event_queue,function(Pe){var D=Pe.url,E=Pe.data,e=Pe.options,_=(e?e._batchKey:null)||D;ce[_]===void 0&&(ce[_]={data:[],url:D,options:e}),e&&ce[_].options&&ce[_].options._metrics&&!ce[_].options._metrics.rrweb_full_snapshot&&(ce[_].options._metrics.rrweb_full_snapshot=e._metrics.rrweb_full_snapshot),ce[_].data.push(E)}),ce}}]),J}(),bT=function(){function P(F){Wo(this,P),this.enabled=F,this.metrics={}}return Zo(P,[{key:"incr",value:function(F){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.enabled&&(F="phjs-".concat(F),this.metrics[F]=(this.metrics[F]||0)+J)}},{key:"decr",value:function(F){this.enabled&&(F="phjs-".concat(F),this.metrics[F]=(this.metrics[F]||0)-1)}}]),P}(),Zs=Uint8Array,ls=Uint16Array,sh=Uint32Array,Ym=new Zs([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Xm=new Zs([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),yb=new Zs([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),aw=function(P,F){for(var J=new ls(31),ce=0;ce<31;++ce)J[ce]=F+=1<>>1|(21845&ua)<<1;Hc=(61680&(Hc=(52428&Hc)>>>2|(13107&Hc)<<2))>>>4|(3855&Hc)<<4,Fv[ua]=((65280&Hc)>>>8|(255&Hc)<<8)>>>1}var _p=function(P,F,J){for(var ce=P.length,Pe=0,D=new ls(F);Pe>>_]=w}else for(E=new ls(ce),Pe=0;Pe>>15-P[Pe];return E},lf=new Zs(288);for(ua=0;ua<144;++ua)lf[ua]=8;for(ua=144;ua<256;++ua)lf[ua]=9;for(ua=256;ua<280;++ua)lf[ua]=7;for(ua=280;ua<288;++ua)lf[ua]=8;var Z0=new Zs(32);for(ua=0;ua<32;++ua)Z0[ua]=5;var Fl,wT=_p(lf,9,0),TT=_p(Z0,5,0),sw=function(P){return(P/8>>0)+(7&P&&1)},lw=function(P,F,J){(F==null||F<0)&&(F=0),(J==null||J>P.length)&&(J=P.length);var ce=new(P instanceof ls?ls:P instanceof sh?sh:Zs)(J-F);return ce.set(P.subarray(F,J)),ce},Lu=function(P,F,J){J<<=7&F;var ce=F/8>>0;P[ce]|=J,P[ce+1]|=J>>>8},Qh=function(P,F,J){J<<=7&F;var ce=F/8>>0;P[ce]|=J,P[ce+1]|=J>>>8,P[ce+2]|=J>>>16},Lg=function(P,F){for(var J=[],ce=0;cey&&(y=D[ce].s);var f=new ls(y+1),l=kT(J[s-1],f,0);if(l>F){ce=0;var t=0,i=l-F,r=1<F))break;t+=r-(1<>>=i;t>0;){var o=D[ce].s;f[o]=0&&t;--ce){var a=D[ce].s;f[a]==F&&(--f[a],++t)}l=F}return[new Zs(f),l]},kT=function P(F,J,ce){return F.s==-1?Math.max(P(F.l,J,ce+1),P(F.r,J,ce+1)):J[F.s]=ce},bb=function(P){for(var F=P.length;F&&!P[--F];);for(var J=new ls(++F),ce=0,Pe=P[0],D=1,E=function(_){J[ce++]=_},e=1;e<=F;++e)if(P[e]==Pe&&e!=F)++D;else{if(!Pe&&D>2){for(;D>138;D-=138)E(32754);D>2&&(E(D>10?D-11<<5|28690:D-3<<5|12305),D=0)}else if(D>3){for(E(Pe),--D;D>6;D-=6)E(8304);D>2&&(E(D-3<<5|8208),D=0)}for(;D--;)E(Pe);D=1,Pe=P[e]}return[J.subarray(0,ce),F]},ep=function(P,F){for(var J=0,ce=0;ce>>8,P[Pe+2]=255^P[Pe],P[Pe+3]=255^P[Pe+1];for(var D=0;D4&&!v[yb[g-1]];--g);var m,k,h,M,A=w+5<<3,C=ep(Pe,lf)+ep(D,Z0)+E,L=ep(Pe,y)+ep(D,t)+E+14+3*g+ep(c,v)+(2*c[16]+3*c[17]+7*c[18]);if(A<=C&&A<=L)return g0(F,s,P.subarray(_,_+w));if(Lu(F,s,1+(L15&&(Lu(F,s,U[b]>>>5&127),s+=U[b]>>>12)}}}else m=wT,k=lf,h=TT,M=Z0;for(b=0;b255){B=ce[b]>>>18&31,Qh(F,s,m[B+257]),s+=k[B+257],B>7&&(Lu(F,s,ce[b]>>>23&31),s+=Ym[B]);var G=31&ce[b];Qh(F,s,h[G]),s+=M[G],G>3&&(Qh(F,s,ce[b]>>>5&8191),s+=Xm[G])}else Qh(F,s,m[ce[b]]),s+=k[ce[b]];return Qh(F,s,m[256]),s+k[256]},AT=new sh([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),MT=new Zs(0),ST=function(){for(var P=new sh(256),F=0;F<256;++F){for(var J=F,ce=9;--ce;)J=(1&J&&3988292384)^J>>>1;P[F]=J}return P}(),ET=function(){var P=4294967295;return{p:function(F){for(var J=P,ce=0;ce>>8;P=J},d:function(){return 4294967295^P}}},CT=function(P,F,J,ce,Pe){return function(D,E,e,_,w,s){var T=D.length,y=new Zs(_+T+5*(1+Math.floor(T/7e3))+w),f=y.subarray(_,y.length-w),l=0;if(!E||T<8)for(var t=0;t<=T;t+=65535){var i=t+65535;i>>13,o=8191&r,a=(1<7e3||h>24576)&&I>423){l=_b(D,f,0,v,x,g,k,h,A,t-A,l),h=m=k=0,A=t;for(var R=0;R<286;++R)x[R]=0;for(R=0;R<30;++R)g[R]=0}var U=2,B=0,G=o,N=L-O&32767;if(I>2&&C==d(t-N))for(var j=Math.min(n,I)-1,V=Math.min(32767,t),H=Math.min(258,I);N<=V&&--G&&L!=O;){if(D[t+U]==D[t+U-N]){for(var ee=0;eeU){if(U=ee,B=N,ee>j)break;var Q=Math.min(N,ee-2),X=0;for(R=0;RX&&(X=K,O=Y)}}}N+=(L=O)-(O=u[L])+32768&32767}if(B){v[h++]=268435456|Dv[U]<<18|xb[B];var te=31&Dv[U],ae=31&xb[B];k+=Ym[te]+Xm[ae],++x[257+te],++g[ae],M=t+U,++m}else v[h++]=D[t],++x[D[t]]}}l=_b(D,f,s,v,x,g,k,h,A,t-A,l),s||(l=g0(f,l,MT))}return lw(y,0,_+sw(l)+w)}(P,F.level==null?6:F.level,F.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(P.length)))):12+F.mem,J,ce,!Pe)},Bv=function(P,F,J){for(;J;++F)P[F]=J,J>>>=8},LT=function(P,F){var J=F.filename;if(P[0]=31,P[1]=139,P[2]=8,P[8]=F.level<2?4:F.level==9?2:0,P[9]=3,F.mtime!=0&&Bv(P,4,Math.floor(new Date(F.mtime||Date.now())/1e3)),J){P[3]=8;for(var ce=0;ce<=J.length;++ce)P[ce+10]=J.charCodeAt(ce)}},PT=function(P){return 10+(P.filename&&P.filename.length+1||0)};function OT(P,F){F===void 0&&(F={});var J=ET(),ce=P.length;J.p(P);var Pe=CT(P,F,PT(F),8),D=Pe.length;return LT(Pe,F),Bv(Pe,D-8,J.d()),Bv(Pe,D-4,ce),Pe}function IT(P,F){var J=P.length;if(!F&&typeof TextEncoder<"u")return new TextEncoder().encode(P);for(var ce=new Zs(P.length+(P.length>>>1)),Pe=0,D=function(w){ce[Pe++]=w},E=0;Ece.length){var e=new Zs(Pe+8+(J-E<<1));e.set(ce),ce=e}var _=P.charCodeAt(E);_<128||F?D(_):_<2048?(D(192|_>>>6),D(128|63&_)):_>55295&&_<57344?(D(240|(_=65536+(1047552&_)|1023&P.charCodeAt(++E))>>>18),D(128|_>>>12&63),D(128|_>>>6&63),D(128|63&_)):(D(224|_>>>12),D(128|_>>>6&63),D(128|63&_))}return lw(ce,0,Pe)}(function(P){P.GZipJS="gzip-js",P.LZ64="lz64",P.Base64="base64"})(Fl||(Fl={}));var Dp,$m,Eo,RT=function(P,F,J){var ce=F||{};ce.ip=J.ip?1:0,ce._=new Date().getTime().toString(),ce.ver=fu.LIB_VERSION;var Pe=P.split("?");if(Pe.length>1){var D,E=Ac(Pe[1].split("&"));try{for(E.s();!(D=E.n()).done;){var e=D.value.split("=")[0];ce[e]&&delete ce[e]}}catch(w){E.e(w)}finally{E.f()}}var _=P.indexOf("?")>-1?"&":"?";return P+_+function(w){var s,T,y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"&",f=[];return Yi(w,function(l,t){s=encodeURIComponent(l.toString()),T=encodeURIComponent(t),f[f.length]=T+"="+s}),f.join(y)}(ce)},Jm=function P(F,J){if(J.blob&&F.buffer)return new Blob([F.buffer],{type:"text/plain"});if(J.sendBeacon||J.blob){var ce=P(F,{method:"POST"});return new Blob([ce],{type:"application/x-www-form-urlencoded"})}if(J.method!=="POST")return null;var Pe,D;return Pe=Array.isArray(F)||(D=F,Object.prototype.toString.call(D)==="[object Uint8Array]")?"data="+encodeURIComponent(F):"data="+encodeURIComponent(F.data),"compression"in F&&F.compression&&(Pe+="&compression="+F.compression),Pe},uw=function(P){var F=P.url,J=P.data,ce=P.headers,Pe=P.options,D=P.captureMetrics,E=P.callback,e=P.retriesPerformedSoFar,_=P.retryQueue,w=P.onXHRError,s=P.timeout,T=s===void 0?1e4:s,y=new XMLHttpRequest;y.open(Pe.method||"GET",F,!0);var f=Jm(J,Pe);D.incr("_send_request"),D.incr("_send_request_inflight"),Yi(ce,function(l,t){y.setRequestHeader(t,l)}),Pe.method!=="POST"||Pe.blob||y.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),y.timeout=T,y.withCredentials=!0,y.onreadystatechange=function(){if(y.readyState===4)if(D.incr("xhr-response"),D.incr("xhr-response-".concat(y.status)),D.decr("_send_request_inflight"),y.status===200){if(E){var l;try{l=JSON.parse(y.responseText)}catch(t){return void Ja.error(t)}E(l)}}else typeof w=="function"&&w(y),[401,403,404,500].indexOf(y.status)<0&&_.enqueue({url:F,data:J,options:Pe,headers:ce,retriesPerformedSoFar:(e||0)+1,callback:E}),E&&E({status:0})},y.send(f)},zT=function(P){U3(J,iw);var F=V3(J);function J(ce,Pe){var D;return Wo(this,J),(D=F.call(this)).captureMetrics=ce,D.isPolling=!1,D.queue=[],D.areWeOnline=!0,D.onXHRError=Pe,typeof window<"u"&&"onLine"in window.navigator&&(D.areWeOnline=window.navigator.onLine,window.addEventListener("online",function(){D._handleWeAreNowOnline()}),window.addEventListener("offline",function(){D.areWeOnline=!1})),D}return Zo(J,[{key:"enqueue",value:function(ce){var Pe=ce.retriesPerformedSoFar||0;if(!(Pe>=10)){var D=3e3*Math.pow(2,Pe),E=new Date(Date.now()+D);console.warn("Enqueued failed request for retry in ".concat(D)),this.queue.push({retryAt:E,requestData:ce}),this.isPolling||(this.isPolling=!0,this.poll())}}},{key:"poll",value:function(){var ce=this;this._poller&&clearTimeout(this._poller),this._poller=setTimeout(function(){ce.areWeOnline&&ce.queue.length>0&&ce.flush(),ce.poll()},this._pollInterval)}},{key:"flush",value:function(){var ce=new Date(Date.now()),Pe=this.queue.filter(function(_){return _.retryAt0){this.queue=this.queue.filter(function(_){return _.retryAt>=ce});var D,E=Ac(Pe);try{for(E.s();!(D=E.n()).done;){var e=D.value.requestData;this._executeXhrRequest(e)}}catch(_){E.e(_)}finally{E.f()}}}},{key:"unload",value:function(){this._poller&&(clearTimeout(this._poller),this._poller=void 0);var ce,Pe=Ac(this.queue);try{for(Pe.s();!(ce=Pe.n()).done;){var D=ce.value.requestData,E=D.url,e=D.data,_=D.options;try{window.navigator.sendBeacon(E,Jm(e,yi(yi({},_),{},{sendBeacon:!0})))}catch(w){fu.DEBUG&&console.error(w)}}}catch(w){Pe.e(w)}finally{Pe.f()}this.queue=[]}},{key:"_executeXhrRequest",value:function(ce){var Pe=ce.url,D=ce.data,E=ce.options,e=ce.headers,_=ce.callback,w=ce.retriesPerformedSoFar;uw({url:Pe,data:D||{},options:E||{},headers:e||{},retriesPerformedSoFar:w||0,callback:_,captureMetrics:this.captureMetrics,retryQueue:this,onXHRError:this.onXHRError})}},{key:"_handleWeAreNowOnline",value:function(){this.areWeOnline=!0,this.flush()}}]),J}(),DT=18e5,FT=864e5,BT=function(){function P(F,J){Wo(this,P),this.config=F,this.persistence=J,this._windowId=void 0,this._sessionId=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null;var ce=F.persistence_name||F.token;if(this.window_id_storage_key="ph_"+ce+"_window_id",this.primary_window_exists_storage_key="ph_"+ce+"_primary_window_exists",this._canUseSessionStorage()){var Pe=Lo.parse(this.window_id_storage_key),D=Lo.parse(this.primary_window_exists_storage_key);Pe&&!D?this._windowId=Pe:Lo.remove(this.window_id_storage_key),Lo.set(this.primary_window_exists_storage_key,!0)}this._listenToReloadWindow()}return Zo(P,[{key:"_canUseSessionStorage",value:function(){return this.config.persistence!=="memory"&&!this.persistence.disabled&&Lo.is_supported()}},{key:"_setWindowId",value:function(F){F!==this._windowId&&(this._windowId=F,this._canUseSessionStorage()&&Lo.set(this.window_id_storage_key,F))}},{key:"_getWindowId",value:function(){return this._windowId?this._windowId:this._canUseSessionStorage()?Lo.parse(this.window_id_storage_key):null}},{key:"_setSessionId",value:function(F,J,ce){F===this._sessionId&&J===this._sessionActivityTimestamp&&ce===this._sessionStartTimestamp||(this._sessionStartTimestamp=ce,this._sessionActivityTimestamp=J,this._sessionId=F,this.persistence.register(Bi({},Iv,[J,F,ce])))}},{key:"_getSessionId",value:function(){if(this._sessionId&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this._sessionId,this._sessionStartTimestamp];var F=this.persistence.props[Iv];return Array.isArray(F)&&F.length===2&&F.push(F[0]),F||[0,null,0]}},{key:"resetSessionId",value:function(){this._setSessionId(null,null,null)}},{key:"_listenToReloadWindow",value:function(){var F=this;window.addEventListener("beforeunload",function(){F._canUseSessionStorage()&&Lo.remove(F.primary_window_exists_storage_key)})}},{key:"checkAndGetSessionAndWindowId",value:function(){var F=arguments.length>0&&arguments[0]!==void 0&&arguments[0],J=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:null)||new Date().getTime(),ce=l1(this._getSessionId(),3),Pe=ce[0],D=ce[1],E=ce[2],e=this._getWindowId(),_=E&&E>0&&Math.abs(J-E)>FT;!D||!F&&Math.abs(J-Pe)>DT||_?(D=xc(),e=xc(),E=J):e||(e=xc());var w=Pe===0||!F||_?J:Pe,s=E===0?new Date().getTime():E;return this._setWindowId(e),this._setSessionId(D,w,s),{sessionId:D,windowId:e}}}]),P}(),NT=Zo(function P(F,J,ce,Pe){Wo(this,P),this.name="posthog-js",this.setupOnce=function(D){D(function(E){var e,_,w;if(E.level!=="error"||!F.__loaded)return E;E.tags||(E.tags={});var s=F.config.ui_host||F.config.api_host;E.tags["PostHog Person URL"]=s+"/person/"+F.get_distinct_id(),F.sessionRecordingStarted()&&(E.tags["PostHog Recording URL"]=s+"/recordings/"+F.sessionManager.checkAndGetSessionAndWindowId(!0).sessionId);var T=((e=E.exception)===null||e===void 0?void 0:e.values)||[],y={$sentry_event_id:E.event_id,$sentry_exception:E.exception,$sentry_exception_message:(_=T[0])===null||_===void 0?void 0:_.value,$sentry_exception_type:(w=T[0])===null||w===void 0?void 0:w.type,$sentry_tags:E.tags};return J&&ce&&(y.$sentry_url=(Pe||"https://sentry.io/organizations/")+J+"/issues/?project="+ce+"&query="+E.event_id),F.capture("$exception",y),E})}}),jT=function(P){var F=function(J,ce){J.event.userId||J.event.anonymousId===P.get_distinct_id()||P.reset(),J.event.userId&&J.event.userId!==P.get_distinct_id()&&(P.register({distinct_id:J.event.userId}),P.reloadFeatureFlags());var Pe=P._calculate_event_properties(ce,J.event.properties);return J.event.properties=Object.assign({},Pe,J.event.properties),J};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:function(J){return F(J,J.event.event)},page:function(J){return F(J,"$pageview")},identify:function(J){return F(J,"$identify")},screen:function(J){return F(J,"$screen")}}},UT=function(){function P(){Wo(this,P),Bi(this,"_seenFirstPageView",!1)}return Zo(P,[{key:"onPageview",value:function(){this._seenFirstPageView&&(this._pageViewId=xc()),this._seenFirstPageView=!0}},{key:"getPageViewId",value:function(){return this._pageViewId||(this._pageViewId=xc()),this._pageViewId}}]),P}();(function(P){P[P.INIT_MODULE=0]="INIT_MODULE",P[P.INIT_SNIPPET=1]="INIT_SNIPPET"})(Dp||(Dp={}));var Nv=function(){},$d={},Ss="posthog",v0=gi.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,cw=!v0&&Nl.indexOf("MSIE")===-1&&Nl.indexOf("Mozilla")===-1,wb=function(){var P,F,J;return{api_host:"https://app.posthog.com",api_method:"POST",api_transport:"XHR",ui_host:null,token:"",autocapture:!0,rageclick:!0,cross_subdomain_cookie:(Vo==null||(P=Vo.location)===null||P===void 0||(F=P.hostname)===null||F===void 0?void 0:F.indexOf("herokuapp.com"))===-1,persistence:"cookie",persistence_name:"",cookie_name:"",loaded:Nv,store_google:!0,custom_campaign_params:[],save_referrer:!0,test:!1,verbose:!1,img:!1,capture_pageview:!0,capture_pageleave:!0,debug:!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_cookie:!1,enable_recording_console_log:void 0,secure_cookie:(gi==null||(J=gi.location)===null||J===void 0?void 0:J.protocol)==="https:",ip:!0,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_capturing_persistence_type:"localStorage",opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_blacklist:[],respect_dnt:!1,sanitize_properties:null,xhr_headers:{},inapp_protocol:"//",inapp_link_new_window:!1,request_batching:!0,properties_string_max_length:65535,session_recording:{blockClass:"ph-no-capture",blockSelector:null,ignoreClass:"ph-ignore-input",maskAllInputs:!0,maskInputOptions:{},maskInputFn:null,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0},mask_all_element_attributes:!1,mask_all_text:!1,advanced_disable_decide:!1,advanced_disable_toolbar_metrics:!1,on_xhr_error:function(ce){var Pe="Bad HTTP status: "+ce.status+" "+ce.statusText;console.error(Pe)},get_device_id:function(ce){return ce},_onCapture:Nv,_capture_metrics:!1,capture_performance:void 0,name:"posthog",callback_fn:"posthog._jsc",bootstrap:{},disable_compression:!1}},jv=function(P,F,J,ce){var Pe,D=J!==Ss&&Eo?J?Eo[J]:void 0:Eo,E={initComplete:!1,syncCode:!1},e=function(_){return function(w){E[_]||(E[_]=!0,E.initComplete&&E.syncCode&&(ce==null||ce(w)))}};if(D&&$m===Dp.INIT_MODULE)Pe=D;else{if(D&&!Ru(D))return void console.error("You have already initialized "+J);Pe=new Km}return Pe._init(P,F,J,e("initComplete")),Pe.toolbar.maybeLoadToolbar(),Pe.sessionRecording=new cT(Pe),Pe.sessionRecording.startRecordingIfEnabled(),Pe.webPerformance=new pT(Pe),Pe.webPerformance.startObservingIfEnabled(),Pe.__autocapture=Pe.get_config("autocapture"),nc._setIsAutocaptureEnabled(Pe),nc._isAutocaptureEnabled&&(Pe.__autocapture=Pe.get_config("autocapture"),nc.enabledForProject(Pe.get_config("token"),100,100)?nc.isBrowserSupported()?nc.init(Pe):(Pe.__autocapture=!1,Ja.log("Disabling Automatic Event Collection because this browser is not supported")):(Pe.__autocapture=!1,Ja.log("Not in active bucket: disabling Automatic Event Collection."))),fu.DEBUG=fu.DEBUG||Pe.get_config("debug"),D!==void 0&&Ru(D)&&(Pe._execute_array.call(Pe.people,D.people),Pe._execute_array(D)),e("syncCode")(Pe),Pe},Km=function(){function P(){var F=this;Wo(this,P),this.config=wb(),this.compression={},this.decideEndpointWasHit=!1,this.SentryIntegration=NT,this.segmentIntegration=function(){return jT(F)},this.__captureHooks=[],this.__request_queue=[],this.__loaded=!1,this.__loaded_recorder_version=void 0,this.__autocapture=void 0,this._jsc=function(){},this.people=new rT(this),this.featureFlags=new iT(this),this.feature_flags=this.featureFlags,this.toolbar=new yT(this),this.pageViewIdManager=new UT,this._captureMetrics=void 0,this._requestQueue=void 0,this._retryQueue=void 0,this.persistence=void 0,this.sessionPersistence=void 0,this.sessionManager=void 0}return Zo(P,[{key:"init",value:function(F,J,ce){if(Ul(ce))console.error("You must name your new library: init(token, config, name)");else{if(ce!==Ss){var Pe=jv(F,J,ce,function(D){Eo[ce]=D,D._loaded()});return Eo[ce]=Pe,Pe}console.error("You must initialize the main posthog object right after you include the PostHog js snippet")}}},{key:"_init",value:function(F){var J,ce,Pe=this,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E=arguments.length>2?arguments[2]:void 0,e=arguments.length>3?arguments[3]:void 0;this.__loaded=!0,this.config={},this._triggered_notifs=[];var _,w={segmentRegister:!1,syncCode:!1},s=function(a){return function(){w[a]||(w[a]=!0,w.segmentRegister&&w.syncCode&&(e==null||e(Pe)))}};if(this.set_config(So({},wb(),D,{name:E,token:F,callback_fn:(E===Ss?E:Ss+"."+E)+"._jsc"})),this._jsc=function(){},(gi!=null&&(J=gi.rrweb)!==null&&J!==void 0&&J.record||gi!=null&&gi.rrwebRecord)&&(this.__loaded_recorder_version=gi==null||(_=gi.rrweb)===null||_===void 0?void 0:_.version),this._captureMetrics=new bT(this.get_config("_capture_metrics")),this._requestQueue=new xT(this._captureMetrics,this._handle_queued_event.bind(this)),this._retryQueue=new zT(this._captureMetrics,this.get_config("on_xhr_error")),this.__captureHooks=[],this.__request_queue=[],this.persistence=new db(this.config),this.sessionManager=new BT(this.config,this.persistence),this.sessionPersistence=this.config.persistence==="sessionStorage"?this.persistence:new db(yi(yi({},this.config),{},{persistence:"sessionStorage"})),this._gdpr_init(),D.segment?(this.config.get_device_id=function(){return D.segment.user().anonymousId()},D.segment.user().id()&&(this.register({distinct_id:D.segment.user().id()}),this.persistence.set_user_state("identified")),D.segment.register(this.segmentIntegration()).then(s("segmentRegister"))):s("segmentRegister")(),((ce=D.bootstrap)===null||ce===void 0?void 0:ce.distinctID)!==void 0){var T,y,f=this.get_config("get_device_id")(xc()),l=(T=D.bootstrap)!==null&&T!==void 0&&T.isIdentifiedID?f:D.bootstrap.distinctID;this.persistence.set_user_state((y=D.bootstrap)!==null&&y!==void 0&&y.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:D.bootstrap.distinctID,$device_id:l})}if(this._hasBootstrappedFeatureFlags()){var t,i,r=Object.keys(((t=D.bootstrap)===null||t===void 0?void 0:t.featureFlags)||{}).filter(function(a){var u,p;return!((u=D.bootstrap)===null||u===void 0||(p=u.featureFlags)===null||p===void 0||!p[a])}).reduce(function(a,u){var p,c;return a[u]=((p=D.bootstrap)===null||p===void 0||(c=p.featureFlags)===null||c===void 0?void 0:c[u])||!1,a},{}),n=Object.keys(((i=D.bootstrap)===null||i===void 0?void 0:i.featureFlagPayloads)||{}).filter(function(a){return r[a]}).reduce(function(a,u){var p,c,b,d;return(p=D.bootstrap)!==null&&p!==void 0&&(c=p.featureFlagPayloads)!==null&&c!==void 0&&c[u]&&(a[u]=(b=D.bootstrap)===null||b===void 0||(d=b.featureFlagPayloads)===null||d===void 0?void 0:d[u]),a},{});this.featureFlags.receivedFeatureFlags({featureFlags:r,featureFlagPayloads:n})}if(!this.get_distinct_id()){var o=this.get_config("get_device_id")(xc());this.register_once({distinct_id:o,$device_id:o},""),this.persistence.set_user_state("anonymous")}gi.addEventListener&&gi.addEventListener("onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this)),s("syncCode")()}},{key:"_loaded",value:function(){this.featureFlags.setReloadingPaused(!0);try{this.get_config("loaded")(this)}catch(F){console.error("`loaded` function failed",F)}this._start_queue_if_opted_in(),this.get_config("capture_pageview")&&this.capture("$pageview",{},{send_instantly:!0}),this.get_config("advanced_disable_decide")||new gT(this).call(),this.featureFlags.resetRequestQueue(),this.featureFlags.setReloadingPaused(!1)}},{key:"_start_queue_if_opted_in",value:function(){this.has_opted_out_capturing()||this.get_config("request_batching")&&this._requestQueue.poll()}},{key:"_dom_loaded",value:function(){var F=this;this.has_opted_out_capturing()||mc(this.__request_queue,function(J){F._send_request.apply(F,Sv(J))}),this.__request_queue=[],this._start_queue_if_opted_in()}},{key:"_prepare_callback",value:function(F,J){if(Ul(F))return null;if(v0)return function(E){F(E,J)};var ce=this._jsc,Pe=""+Math.floor(1e8*Math.random()),D=this.get_config("callback_fn")+"["+Pe+"]";return ce[Pe]=function(E){delete ce[Pe],F(E,J)},D}},{key:"_handle_unload",value:function(){this.get_config("request_batching")?(this.get_config("capture_pageview")&&this.get_config("capture_pageleave")&&this.capture("$pageleave"),this.get_config("_capture_metrics")&&(this._requestQueue.updateUnloadMetrics(),this.capture("$capture_metrics",this._captureMetrics.metrics)),this._requestQueue.unload(),this._retryQueue.unload()):this.get_config("capture_pageview")&&this.get_config("capture_pageleave")&&this.capture("$pageleave",null,{transport:"sendBeacon"})}},{key:"_handle_queued_event",value:function(F,J,ce){var Pe=JSON.stringify(J);this.__compress_and_send_json_request(F,Pe,ce||$d,Nv)}},{key:"__compress_and_send_json_request",value:function(F,J,ce,Pe){var D,E=function(s,T,y){return s===Fl.LZ64?[{data:qs.compressToBase64(T),compression:Fl.LZ64},y]:s===Fl.GZipJS?[OT(IT(T),{mtime:0}),yi(yi({},y),{},{blob:!0,urlQueryArgs:{compression:Fl.GZipJS}})]:[{data:c1(T)},y]}((D=this.compression)[Fl.GZipJS]?Fl.GZipJS:D[Fl.LZ64]?Fl.LZ64:Fl.Base64,J,ce),e=l1(E,2),_=e[0],w=e[1];this._send_request(F,_,w,Pe)}},{key:"_send_request",value:function(F,J,ce,Pe){if(cw)this.__request_queue.push([F,J,ce,Pe]);else{var D={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")};ce=So(D,ce||{}),v0||(ce.method="GET");var E="sendBeacon"in gi.navigator&&ce.transport==="sendBeacon";if(F=RT(F,ce.urlQueryArgs||{},{ip:this.get_config("ip")}),yc(J)&&this.get_config("img")){var e=Vo.createElement("img");e.src=F,Vo.body.appendChild(e)}else if(E)try{gi.navigator.sendBeacon(F,Jm(J,yi(yi({},ce),{},{sendBeacon:!0})))}catch(T){this.get_config("debug")&&console.error(T)}else if(v0)try{uw({url:F,data:J,headers:this.get_config("xhr_headers"),options:ce,captureMetrics:this._captureMetrics,callback:Pe,retriesPerformedSoFar:0,retryQueue:this._retryQueue,onXHRError:this.get_config("on_xhr_error")})}catch(T){console.error(T)}else{var _,w=Vo.createElement("script");w.type="text/javascript",w.async=!0,w.defer=!0,w.src=F;var s=Vo.getElementsByTagName("script")[0];(_=s.parentNode)===null||_===void 0||_.insertBefore(w,s)}}}},{key:"_execute_array",value:function(F){var J,ce=this,Pe=[],D=[],E=[];mc(F,function(_){_&&(J=_[0],Ru(J)?E.push(_):typeof _=="function"?_.call(ce):Ru(_)&&J==="alias"?Pe.push(_):Ru(_)&&J.indexOf("capture")!==-1&&typeof ce[J]=="function"?E.push(_):D.push(_))});var e=function(_,w){mc(_,function(s){if(Ru(s[0])){var T=w;Yi(s,function(y){T=T[y[0]].apply(T,y.slice(1))})}else this[s[0]].apply(this,s.slice(1))},w)};e(Pe,this),e(D,this),e(E,this)}},{key:"_hasBootstrappedFeatureFlags",value:function(){var F,J;return((F=this.config.bootstrap)===null||F===void 0?void 0:F.featureFlags)&&Object.keys((J=this.config.bootstrap)===null||J===void 0?void 0:J.featureFlags).length>0||!1}},{key:"push",value:function(F){this._execute_array([F])}},{key:"capture",value:function(F,J){var ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$d;if(this.__loaded&&!rw(this,!1)){this._captureMetrics.incr("capture"),F==="$snapshot"&&this._captureMetrics.incr("snapshot");var Pe=(ce=ce||$d).transport;if(Pe&&(ce.transport=Pe),Ul(F)||typeof F!="string")console.error("No event name provided to posthog.capture");else if(!W8(Nl)){this.sessionPersistence.update_search_keyword(),this.get_config("store_google")&&this.sessionPersistence.update_campaign_params(),this.get_config("save_referrer")&&this.sessionPersistence.update_referrer_info();var D={event:F,properties:this._calculate_event_properties(F,J||{})};F==="$identify"&&ce.$set&&(D.$set=ce.$set),(D=Y3(D,ce._noTruncate?null:this.get_config("properties_string_max_length"))).timestamp=ce.timestamp||new Date,this.get_config("debug")&&Ja.log("PostHog.js send",D);var E=JSON.stringify(D),e=this.get_config("api_host")+(ce.endpoint||"/e/"),_=ce!==$d;return!this.get_config("request_batching")||_&&!ce._batchKey||ce.send_instantly?this.__compress_and_send_json_request(e,E,ce):this._requestQueue.enqueue(e,D,ce),this._invokeCaptureHooks(F,D),D}}}},{key:"_addCaptureHook",value:function(F){this.__captureHooks.push(F)}},{key:"_invokeCaptureHooks",value:function(F,J){this.config._onCapture(F,J),Yi(this.__captureHooks,function(ce){return ce(F)})}},{key:"_calculate_event_properties",value:function(F,J){var ce,Pe=this.persistence.remove_event_timer(F),D=yi({},J);if(D.token=this.get_config("token"),F==="$snapshot"){var E=yi(yi({},this.persistence.properties()),this.sessionPersistence.properties());return D.distinct_id=E.distinct_id,D}var e=yo.properties();if(this.sessionManager){var _=this.sessionManager.checkAndGetSessionAndWindowId(),w=_.sessionId,s=_.windowId;D.$session_id=w,D.$window_id=s}if((ce=this.webPerformance)!==null&&ce!==void 0&&ce.isEnabled&&(F==="$pageview"&&this.pageViewIdManager.onPageview(),D=So(D,{$pageview_id:this.pageViewIdManager.getPageViewId()})),F==="$performance_event"){var T=this.persistence.properties();return D.distinct_id=T.distinct_id,D.$current_url=e.$current_url,D}if(Pe!==void 0){var y=new Date().getTime()-Pe;D.$duration=parseFloat((y/1e3).toFixed(3))}D=So({},yo.properties(),this.persistence.properties(),this.sessionPersistence.properties(),D);var f=this.get_config("property_blacklist");Ru(f)?Yi(f,function(t){delete D[t]}):console.error("Invalid value for property_blacklist config: "+f);var l=this.get_config("sanitize_properties");return l&&(D=l(D,F)),D}},{key:"register",value:function(F,J){this.persistence.register(F,J)}},{key:"register_once",value:function(F,J,ce){this.persistence.register_once(F,J,ce)}},{key:"register_for_session",value:function(F){this.sessionPersistence.register(F)}},{key:"unregister",value:function(F){this.persistence.unregister(F)}},{key:"unregister_for_session",value:function(F){this.sessionPersistence.unregister(F)}},{key:"_register_single",value:function(F,J){this.register(Bi({},F,J))}},{key:"getFeatureFlag",value:function(F,J){return this.featureFlags.getFeatureFlag(F,J)}},{key:"getFeatureFlagPayload",value:function(F){var J=this.featureFlags.getFeatureFlagPayload(F);try{return JSON.parse(J)}catch{return J}}},{key:"isFeatureEnabled",value:function(F,J){return this.featureFlags.isFeatureEnabled(F,J)}},{key:"reloadFeatureFlags",value:function(){this.featureFlags.reloadFeatureFlags()}},{key:"updateEarlyAccessFeatureEnrollment",value:function(F,J){this.featureFlags.updateEarlyAccessFeatureEnrollment(F,J)}},{key:"getEarlyAccessFeatures",value:function(F){var J=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this.featureFlags.getEarlyAccessFeatures(F,J)}},{key:"onFeatureFlags",value:function(F){return this.featureFlags.onFeatureFlags(F)}},{key:"identify",value:function(F,J,ce){if(F){this._captureMetrics.incr("identify");var Pe=this.get_distinct_id();if(this.register({$user_id:F}),!this.get_property("$device_id")){var D=Pe;this.register_once({$had_persisted_distinct_id:!0,$device_id:D},"")}F!==Pe&&F!==this.get_property(d0)&&(this.unregister(d0),this.register({distinct_id:F}));var E=this.persistence.get_user_state()==="anonymous";F!==Pe&&E?(this.persistence.set_user_state("identified"),this.capture("$identify",{distinct_id:F,$anon_distinct_id:Pe},{$set:J||{},$set_once:ce||{}}),this.featureFlags.setAnonymousDistinctId(Pe)):(J&&this.people.set(J),ce&&this.people.set_once(ce)),F!==Pe&&this.reloadFeatureFlags()}else console.error("Unique user id has not been set in posthog.identify")}},{key:"group",value:function(F,J,ce){if(F&&J){this._captureMetrics.incr("group");var Pe=this.getGroups();Pe[F]!==J&&this.resetGroupPropertiesForFlags(F),this.register({$groups:yi(yi({},Pe),{},Bi({},F,J))}),ce&&(this.capture("$groupidentify",{$group_type:F,$group_key:J,$group_set:ce}),this.setGroupPropertiesForFlags(Bi({},F,ce))),Pe[F]===J||ce||this.reloadFeatureFlags()}else console.error("posthog.group requires a group type and group key")}},{key:"resetGroups",value:function(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}},{key:"setPersonPropertiesForFlags",value:function(F){var J=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.featureFlags.setPersonPropertiesForFlags(F,J)}},{key:"resetPersonPropertiesForFlags",value:function(){this.featureFlags.resetPersonPropertiesForFlags()}},{key:"setGroupPropertiesForFlags",value:function(F){var J=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.featureFlags.setGroupPropertiesForFlags(F,J)}},{key:"resetGroupPropertiesForFlags",value:function(F){this.featureFlags.resetGroupPropertiesForFlags(F)}},{key:"reset",value:function(F){var J=this.get_property("$device_id");this.persistence.clear(),this.sessionPersistence.clear(),this.persistence.set_user_state("anonymous"),this.sessionManager.resetSessionId();var ce=this.get_config("get_device_id")(xc());this.register_once({distinct_id:ce,$device_id:F?ce:J},"")}},{key:"get_distinct_id",value:function(){return this.get_property("distinct_id")}},{key:"getGroups",value:function(){return this.get_property("$groups")||{}}},{key:"alias",value:function(F,J){return F===this.get_property(Q3)?(Ja.critical("Attempting to create alias for existing People user - aborting."),-2):(Ul(J)&&(J=this.get_distinct_id()),F!==J?(this._register_single(d0,F),this.capture("$create_alias",{alias:F,distinct_id:J})):(console.error("alias matches current distinct_id - skipping api call."),this.identify(F),-1))}},{key:"set_config",value:function(F){var J=yi({},this.config);yc(F)&&(So(this.config,F),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),this.sessionPersistence&&this.sessionPersistence.update_config(this.config),$a.is_supported()&&$a.get("ph_debug")==="true"&&(this.config.debug=!0),this.get_config("debug")&&(fu.DEBUG=!0),this.sessionRecording&&F.disable_session_recording!==void 0&&J.disable_session_recording!==F.disable_session_recording&&(F.disable_session_recording?this.sessionRecording.stopRecording():this.sessionRecording.startRecordingIfEnabled()))}},{key:"startSessionRecording",value:function(){this.set_config({disable_session_recording:!1})}},{key:"stopSessionRecording",value:function(){this.set_config({disable_session_recording:!0})}},{key:"sessionRecordingStarted",value:function(){var F;return!((F=this.sessionRecording)===null||F===void 0||!F.started())}},{key:"loadToolbar",value:function(F){return this.toolbar.loadToolbar(F)}},{key:"get_config",value:function(F){var J;return(J=this.config)===null||J===void 0?void 0:J[F]}},{key:"get_property",value:function(F){return this.persistence.props[F]}},{key:"getSessionProperty",value:function(F){return this.sessionPersistence.props[F]}},{key:"toString",value:function(){var F,J=(F=this.get_config("name"))!==null&&F!==void 0?F:Ss;return J!==Ss&&(J=Ss+"."+J),J}},{key:"_gdpr_init",value:function(){this.get_config("opt_out_capturing_persistence_type")==="localStorage"&&$a.is_supported()&&(!this.has_opted_in_capturing()&&this.has_opted_in_capturing({persistence_type:"cookie"})&&this.opt_in_capturing({enable_persistence:!1}),!this.has_opted_out_capturing()&&this.has_opted_out_capturing({persistence_type:"cookie"})&&this.opt_out_capturing({clear_persistence:!1}),this.clear_opt_in_out_capturing({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_capturing()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_capturing()||!this.get_config("opt_out_capturing_by_default")&&!lu.get("ph_optout")||(lu.remove("ph_optout"),this.opt_out_capturing({clear_persistence:this.get_config("opt_out_persistence_by_default")}))}},{key:"_gdpr_update_persistence",value:function(F){var J;if(F&&F.clear_persistence)J=!0;else{if(!F||!F.enable_persistence)return;J=!1}this.get_config("disable_persistence")||this.persistence.disabled===J||this.persistence.set_disabled(J),this.get_config("disable_persistence")||this.sessionPersistence.disabled===J||this.sessionPersistence.set_disabled(J)}},{key:"_gdpr_call_func",value:function(F,J){return J=So({capture:this.capture.bind(this),persistence_type:this.get_config("opt_out_capturing_persistence_type"),cookie_prefix:this.get_config("opt_out_capturing_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),secure_cookie:this.get_config("secure_cookie")},J||{}),$a.is_supported()||J.persistence_type!=="localStorage"||(J.persistence_type="cookie"),F(this.get_config("token"),{capture:J.capture,captureEventName:J.capture_event_name,captureProperties:J.capture_properties,persistenceType:J.persistence_type,persistencePrefix:J.cookie_prefix,cookieExpiration:J.cookie_expiration,crossSubdomainCookie:J.cross_subdomain_cookie,secureCookie:J.secure_cookie})}},{key:"opt_in_capturing",value:function(F){F=So({enable_persistence:!0},F||{}),this._gdpr_call_func(Q8,F),this._gdpr_update_persistence(F)}},{key:"opt_out_capturing",value:function(F){var J=So({clear_persistence:!0},F||{});this._gdpr_call_func(eT,J),this._gdpr_update_persistence(J)}},{key:"has_opted_in_capturing",value:function(F){return this._gdpr_call_func(tT,F)}},{key:"has_opted_out_capturing",value:function(F){return this._gdpr_call_func(ew,F)}},{key:"clear_opt_in_out_capturing",value:function(F){var J=So({enable_persistence:!0},F??{});this._gdpr_call_func(nT,J),this._gdpr_update_persistence(J)}},{key:"debug",value:function(F){F===!1?(gi.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(gi.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),localStorage&&localStorage.setItem("ph_debug","true"),this.set_config({debug:!0}))}},{key:"decodeLZ64",value:function(F){return qs.decompressFromBase64(F||null)}}]),P}();(function(P,F){for(var J=0;J: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(var s in w){var T=s.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");_.addStyleRule(T,w[s])}},98222:function(D,E,e){D.exports=e(82887)},27206:function(D,E,e){D.exports=e(60822)},59893:function(D,E,e){D.exports=e(23381)},5224:function(D,E,e){D.exports=e(83832)},59509:function(D,E,e){D.exports=e(72201)},75557:function(D,E,e){D.exports=e(91815)},40338:function(D,E,e){D.exports=e(21462)},35080:function(D,E,e){D.exports=e(51319)},61396:function(D,E,e){D.exports=e(57516)},40549:function(D,E,e){D.exports=e(98128)},49866:function(D,E,e){D.exports=e(99442)},36089:function(D,E,e){D.exports=e(93740)},19548:function(D,E,e){D.exports=e(8729)},35831:function(D,E,e){D.exports=e(93814)},61039:function(D,E,e){D.exports=e(14382)},97040:function(D,E,e){D.exports=e(51759)},77986:function(D,E,e){D.exports=e(10421)},24296:function(D,E,e){D.exports=e(43102)},58872:function(D,E,e){D.exports=e(92165)},29626:function(D,E,e){D.exports=e(3325)},65591:function(D,E,e){D.exports=e(36071)},69738:function(D,E,e){D.exports=e(43905)},92650:function(D,E,e){D.exports=e(35902)},35630:function(D,E,e){D.exports=e(69816)},73434:function(D,E,e){D.exports=e(94507)},27909:function(D,E,e){var _=e(19548);_.register([e(27206),e(5224),e(58872),e(65591),e(69738),e(92650),e(49866),e(25743),e(6197),e(97040),e(85461),e(73434),e(54201),e(81299),e(47645),e(35630),e(77986),e(83043),e(93005),e(96881),e(4534),e(50581),e(40549),e(77900),e(47582),e(35080),e(21641),e(17280),e(5861),e(29626),e(10021),e(65317),e(96268),e(61396),e(35831),e(16122),e(46163),e(40344),e(40338),e(48131),e(36089),e(55334),e(75557),e(19440),e(99488),e(59893),e(97393),e(98222),e(61039),e(24296),e(66398),e(59509)]),D.exports=_},46163:function(D,E,e){D.exports=e(15154)},96881:function(D,E,e){D.exports=e(64943)},50581:function(D,E,e){D.exports=e(21164)},55334:function(D,E,e){D.exports=e(54186)},65317:function(D,E,e){D.exports=e(94873)},10021:function(D,E,e){D.exports=e(67618)},54201:function(D,E,e){D.exports=e(58810)},5861:function(D,E,e){D.exports=e(20593)},16122:function(D,E,e){D.exports=e(29396)},83043:function(D,E,e){D.exports=e(13551)},48131:function(D,E,e){D.exports=e(46858)},47582:function(D,E,e){D.exports=e(17988)},21641:function(D,E,e){D.exports=e(68868)},96268:function(D,E,e){D.exports=e(20467)},19440:function(D,E,e){D.exports=e(91271)},99488:function(D,E,e){D.exports=e(21461)},97393:function(D,E,e){D.exports=e(85956)},25743:function(D,E,e){D.exports=e(52979)},66398:function(D,E,e){D.exports=e(32275)},17280:function(D,E,e){D.exports=e(6419)},77900:function(D,E,e){D.exports=e(61510)},81299:function(D,E,e){D.exports=e(87619)},93005:function(D,E,e){D.exports=e(93601)},40344:function(D,E,e){D.exports=e(96595)},47645:function(D,E,e){D.exports=e(70954)},6197:function(D,E,e){D.exports=e(47462)},4534:function(D,E,e){D.exports=e(17659)},85461:function(D,E,e){D.exports=e(19990)},82884:function(D){D.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}]},50215:function(D,E,e){var _=e(82884),w=e(41940),s=e(85555),T=e(44467).templatedArray;e(24695),D.exports=T("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:w({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:_.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:_.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",s.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",s.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",s.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",s.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:w({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},3749:function(D,E,e){var _=e(71828),w=e(89298),s=e(92605).draw;function T(f){var l=f._fullLayout;_.filterVisible(l.annotations).forEach(function(t){var i=w.getFromId(f,t.xref),r=w.getFromId(f,t.yref),n=w.getRefType(t.xref),o=w.getRefType(t.yref);t._extremes={},n==="range"&&y(t,i),o==="range"&&y(t,r)})}function y(f,l){var t,i=l._id,r=i.charAt(0),n=f[r],o=f["a"+r],a=f[r+"ref"],u=f["a"+r+"ref"],p=f["_"+r+"padplus"],c=f["_"+r+"padminus"],b={x:1,y:-1}[r]*f[r+"shift"],d=3*f.arrowsize*f.arrowwidth||0,v=d+b,x=d-b,g=3*f.startarrowsize*f.arrowwidth||0,m=g+b,k=g-b;if(u===a){var h=w.findExtremes(l,[l.r2c(n)],{ppadplus:v,ppadminus:x}),M=w.findExtremes(l,[l.r2c(o)],{ppadplus:Math.max(p,m),ppadminus:Math.max(c,k)});t={min:[h.min[0],M.min[0]],max:[h.max[0],M.max[0]]}}else m=o?m+o:m,k=o?k-o:k,t=w.findExtremes(l,[l.r2c(n)],{ppadplus:Math.max(p,v,m),ppadminus:Math.max(c,x,k)});f._extremes[i]=t}D.exports=function(f){var l=f._fullLayout;if(_.filterVisible(l.annotations).length&&f._fullData.length)return _.syncOrAsync([s,T],f)}},44317:function(D,E,e){var _=e(71828),w=e(73972),s=e(44467).arrayEditor;function T(f,l){var t,i,r,n,o,a,u,p=f._fullLayout.annotations,c=[],b=[],d=[],v=(l||[]).length;for(t=0;t0||t.explicitOff.length>0},onClick:function(f,l){var t,i,r=T(f,l),n=r.on,o=r.off.concat(r.explicitOff),a={},u=f._fullLayout.annotations;if(n.length||o.length){for(t=0;t.6666666666666666?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[mt]}for(var Ue=!1,De=["x","y"],je=0;je1)&&(ot===st?((Nt=ft.r2fraction(v["a"+Ze]))<0||Nt>1)&&(Ue=!0):Ue=!0),ge=ft._offset+ft.r2p(v[Ze]),Ne=.5}else{var Je=qt==="domain";Ze==="x"?(Se=v[Ze],ge=Je?ft._offset+ft._length*Se:ge=C.l+C.w*Se):(Se=1-v[Ze],ge=Je?ft._offset+ft._length*Se:ge=C.t+C.h*Se),Ne=v.showarrow?.5:Se}if(v.showarrow){Ft.head=ge;var Ke=v["a"+Ze];if(Ye=Et*Ee(.5,v.xanchor)-Tt*Ee(.5,v.yanchor),ot===st){var Ge=f.getRefType(ot);Ge==="domain"?(Ze==="y"&&(Ke=1-Ke),Ft.tail=ft._offset+ft._length*Ke):Ge==="paper"?Ze==="y"?(Ke=1-Ke,Ft.tail=C.t+C.h*Ke):Ft.tail=C.l+C.w*Ke:Ft.tail=ft._offset+ft.r2p(Ke),be=Ye}else Ft.tail=ge+Ke,be=Ye+Ke;Ft.text=Ft.tail+Ye;var nt=A[Ze==="x"?"width":"height"];if(st==="paper"&&(Ft.head=T.constrain(Ft.head,1,nt-1)),ot==="pixel"){var ht=-Math.max(Ft.tail-3,Ft.text),Oe=Math.min(Ft.tail+3,Ft.text)-nt;ht>0?(Ft.tail+=ht,Ft.text+=ht):Oe>0&&(Ft.tail-=Oe,Ft.text-=Oe)}Ft.tail+=It,Ft.head+=It}else be=Ye=xt*Ee(Ne,Dt),Ft.text=ge+Ye;Ft.text+=It,Ye+=It,be+=It,v["_"+Ze+"padplus"]=xt/2+be,v["_"+Ze+"padminus"]=xt/2-be,v["_"+Ze+"size"]=xt,v["_"+Ze+"shift"]=Ye}if(Ue)Q.remove();else{var Be=0,Qe=0;if(v.align!=="left"&&(Be=(ne-Me)*(v.align==="center"?.5:1)),v.valign!=="top"&&(Qe=(ue-Ce)*(v.valign==="middle"?.5:1)),we)Re.select("svg").attr({x:K+Be-1,y:K+Qe}).call(t.setClipUrl,ae?B:null,d);else{var ut=K+Qe-Ae.top,pt=K+Be-Ae.left;ye.call(r.positionText,pt,ut).call(t.setClipUrl,ae?B:null,d)}oe.select("rect").call(t.setRect,K,K,ne,ue),te.call(t.setRect,X/2,X/2,me-X,Te-X),Q.call(t.setTranslate,Math.round(G.x.text-me/2),Math.round(G.y.text-Te/2)),V.attr({transform:"rotate("+N+","+G.x.text+","+G.y.text+")"});var bt,Lt=function(Ct,mt){j.selectAll(".annotation-arrow-g").remove();var Ot=G.x.head,_t=G.y.head,Pt=G.x.tail+Ct,Bt=G.y.tail+mt,Wt=G.x.text+Ct,Gt=G.y.text+mt,Xt=T.rotationXYMatrix(N,Wt,Gt),Kt=T.apply2DTransform(Xt),nn=T.apply2DTransform2(Xt),yn=+te.attr("width"),ln=+te.attr("height"),kn=Wt-.5*yn,Wn=kn+yn,wn=Gt-.5*ln,on=wn+ln,_n=[[kn,wn,kn,on],[kn,on,Wn,on],[Wn,on,Wn,wn],[Wn,wn,kn,wn]].map(nn);if(!_n.reduce(function(ir,dr){return ir^!!T.segmentsIntersect(Ot,_t,Ot+1e6,_t+1e6,dr[0],dr[1],dr[2],dr[3])},!1)){_n.forEach(function(ir){var dr=T.segmentsIntersect(Pt,Bt,Ot,_t,ir[0],ir[1],ir[2],ir[3]);dr&&(Pt=dr.x,Bt=dr.y)});var fn=v.arrowwidth,hn=v.arrowcolor,In=v.arrowside,Cn=j.append("g").style({opacity:l.opacity(hn)}).classed("annotation-arrow-g",!0),Nn=Cn.append("path").attr("d","M"+Pt+","+Bt+"L"+Ot+","+_t).style("stroke-width",fn+"px").call(l.stroke,l.rgb(hn));if(u(Nn,In,v),L.annotationPosition&&Nn.node().parentNode&&!g){var Hn=Ot,qn=_t;if(v.standoff){var or=Math.sqrt(Math.pow(Ot-Pt,2)+Math.pow(_t-Bt,2));Hn+=v.standoff*(Pt-Ot)/or,qn+=v.standoff*(Bt-_t)/or}var tr,kr,gr=Cn.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Pt-Hn)+","+(Bt-qn),transform:y(Hn,qn)}).style("stroke-width",fn+6+"px").call(l.stroke,"rgba(0,0,0,0)").call(l.fill,"rgba(0,0,0,0)");o.init({element:gr.node(),gd:d,prepFn:function(){var ir=t.getTranslate(Q);tr=ir.x,kr=ir.y,m&&m.autorange&&I(m._name+".autorange",!0),k&&k.autorange&&I(k._name+".autorange",!0)},moveFn:function(ir,dr){var yr=Kt(tr,kr),$t=yr[0]+ir,mn=yr[1]+dr;Q.call(t.setTranslate,$t,mn),R("x",c(m,ir,"x",C,v)),R("y",c(k,dr,"y",C,v)),v.axref===v.xref&&R("ax",c(m,ir,"ax",C,v)),v.ayref===v.yref&&R("ay",c(k,dr,"ay",C,v)),Cn.attr("transform",y(ir,dr)),V.attr({transform:"rotate("+N+","+$t+","+mn+")"})},doneFn:function(){w.call("_guiRelayout",d,U());var ir=document.querySelector(".js-notes-box-panel");ir&&ir.redraw(ir.selectedObj)}})}}};v.showarrow&&Lt(0,0),H&&o.init({element:Q.node(),gd:d,prepFn:function(){bt=V.attr("transform")},moveFn:function(Ct,mt){var Ot="pointer";if(v.showarrow)v.axref===v.xref?R("ax",c(m,Ct,"ax",C,v)):R("ax",v.ax+Ct),v.ayref===v.yref?R("ay",c(k,mt,"ay",C.w,v)):R("ay",v.ay+mt),Lt(Ct,mt);else{if(g)return;var _t,Pt;if(m)_t=c(m,Ct,"x",C,v);else{var Bt=v._xsize/C.w,Wt=v.x+(v._xshift-v.xshift)/C.w-Bt/2;_t=o.align(Wt+Ct/C.w,Bt,0,1,v.xanchor)}if(k)Pt=c(k,mt,"y",C,v);else{var Gt=v._ysize/C.h,Xt=v.y-(v._yshift+v.yshift)/C.h-Gt/2;Pt=o.align(Xt-mt/C.h,Gt,0,1,v.yanchor)}R("x",_t),R("y",Pt),m&&k||(Ot=o.getCursor(m?.5:_t,k?.5:Pt,v.xanchor,v.yanchor))}V.attr({transform:y(Ct,mt)+bt}),n(Q,Ot)},clickFn:function(Ct,mt){v.captureevents&&d.emit("plotly_clickannotation",pe(mt))},doneFn:function(){n(Q),w.call("_guiRelayout",d,U());var Ct=document.querySelector(".js-notes-box-panel");Ct&&Ct.redraw(Ct.selectedObj)}})}}}D.exports={draw:function(d){var v=d._fullLayout;v._infolayer.selectAll(".annotation").remove();for(var x=0;x=0,g=i.indexOf("end")>=0,m=c.backoff*d+r.standoff,k=b.backoff*v+r.startstandoff;if(p.nodeName==="line"){n={x:+t.attr("x1"),y:+t.attr("y1")},o={x:+t.attr("x2"),y:+t.attr("y2")};var h=n.x-o.x,M=n.y-o.y;if(u=(a=Math.atan2(M,h))+Math.PI,m&&k&&m+k>Math.sqrt(h*h+M*M))return void j();if(m){if(m*m>h*h+M*M)return void j();var A=m*Math.cos(a),C=m*Math.sin(a);o.x+=A,o.y+=C,t.attr({x2:o.x,y2:o.y})}if(k){if(k*k>h*h+M*M)return void j();var L=k*Math.cos(a),O=k*Math.sin(a);n.x-=L,n.y-=O,t.attr({x1:n.x,y1:n.y})}}else if(p.nodeName==="path"){var I=p.getTotalLength(),R="";if(I1){r=!0;break}}r?T.fullLayout._infolayer.select(".annotation-"+T.id+'[data-index="'+t+'"]').remove():(i._pdata=w(T.glplot.cameraParams,[y.xaxis.r2l(i.x)*f[0],y.yaxis.r2l(i.y)*f[1],y.zaxis.r2l(i.z)*f[2]]),_(T.graphDiv,i,t,T.id,i._xa,i._ya))}}},2468:function(D,E,e){var _=e(73972),w=e(71828);D.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:e(26997)}}},layoutAttributes:e(26997),handleDefaults:e(20226),includeBasePlot:function(s,T){var y=_.subplotsRegistry.gl3d;if(y)for(var f=y.attrRegex,l=Object.keys(s),t=0;t=0)))return i;if(u===3)o[u]>1&&(o[u]=1);else if(o[u]>=1)return i}var p=Math.round(255*o[0])+", "+Math.round(255*o[1])+", "+Math.round(255*o[2]);return a?"rgba("+p+", "+o[3]+")":"rgb("+p+")"}T.tinyRGB=function(i){var r=i.toRgb();return"rgb("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+")"},T.rgb=function(i){return T.tinyRGB(_(i))},T.opacity=function(i){return i?_(i).getAlpha():0},T.addOpacity=function(i,r){var n=_(i).toRgb();return"rgba("+Math.round(n.r)+", "+Math.round(n.g)+", "+Math.round(n.b)+", "+r+")"},T.combine=function(i,r){var n=_(i).toRgb();if(n.a===1)return _(i).toRgbString();var o=_(r||l).toRgb(),a=o.a===1?o:{r:255*(1-o.a)+o.r*o.a,g:255*(1-o.a)+o.g*o.a,b:255*(1-o.a)+o.b*o.a},u={r:a.r*(1-n.a)+n.r*n.a,g:a.g*(1-n.a)+n.g*n.a,b:a.b*(1-n.a)+n.b*n.a};return _(u).toRgbString()},T.contrast=function(i,r,n){var o=_(i);return o.getAlpha()!==1&&(o=_(T.combine(i,l))),(o.isDark()?r?o.lighten(r):l:n?o.darken(n):f).toString()},T.stroke=function(i,r){var n=_(r);i.style({stroke:T.tinyRGB(n),"stroke-opacity":n.getAlpha()})},T.fill=function(i,r){var n=_(r);i.style({fill:T.tinyRGB(n),"fill-opacity":n.getAlpha()})},T.clean=function(i){if(i&&typeof i=="object"){var r,n,o,a,u=Object.keys(i);for(r=0;r0?Ke>=Be:Ke<=Be));Ge++)Ke>ut&&Ke0?Ke>=Be:Ke<=Be));Ge++)Ke>Je[0]&&Ke1){var ot=Math.pow(10,Math.floor(Math.log(st)/Math.LN10));Ye*=ot*l.roundUp(st/ot,[2,5,10]),(Math.abs(we.start)/we.size+1e-6)%1<2e-6&&(Se.tick0=0)}Se.dtick=Ye}Se.domain=U?[ge+K/se.h,ge+Te-K/se.h]:[ge+Y/se.w,ge+Te-Y/se.w],Se.setScale(),O.attr("transform",t(Math.round(se.l),Math.round(se.t)));var ft,yt=O.select("."+k.cbtitleunshift).attr("transform",t(-Math.round(se.l),-Math.round(se.t))),Et=Se.ticklabelposition,Tt=Se.title.font.size,xt=O.select("."+k.cbaxis),Dt=0,It=0;function Ft(qt,Nt){var Je={propContainer:Se,propName:I._propPrefix+"title",traceIndex:I._traceIndex,_meta:I._meta,placeholder:oe._dfltTitle.colorbar,containerGroup:O.select("."+k.cbtitle)},Ke=qt.charAt(0)==="h"?qt.substr(1):"h"+qt;O.selectAll("."+Ke+",."+Ke+"-math-group").remove(),a.draw(R,qt,i(Je,Nt||{}))}return l.syncOrAsync([s.previousPromises,function(){var qt,Nt;(U&&Ne||!U&&!Ne)&&(de==="top"&&(qt=Y+se.l+se.w*te,Nt=K+se.t+se.h*(1-ge-Te)+3+.75*Tt),de==="bottom"&&(qt=Y+se.l+se.w*te,Nt=K+se.t+se.h*(1-ge)-3-.25*Tt),de==="right"&&(Nt=K+se.t+se.h*ae+3+.75*Tt,qt=Y+se.l+se.w*ge),Ft(Se._id+"title",{attributes:{x:qt,y:Nt,"text-anchor":U?"start":"middle"}}))},function(){if(!U&&!Ne||U&&Ne){var qt,Nt=O.select("."+k.cbtitle),Je=Nt.select("text"),Ke=[-V/2,V/2],Ge=Nt.select(".h"+Se._id+"title-math-group").node(),nt=15.6;if(Je.node()&&(nt=parseInt(Je.node().style.fontSize,10)*x),Ge?(qt=n.bBox(Ge),It=qt.width,(Dt=qt.height)>nt&&(Ke[1]-=(Dt-nt)/2)):Je.node()&&!Je.classed(k.jsPlaceholder)&&(qt=n.bBox(Je.node()),It=qt.width,Dt=qt.height),U){if(Dt){if(Dt+=5,de==="top")Se.domain[1]-=Dt/se.h,Ke[1]*=-1;else{Se.domain[0]+=Dt/se.h;var ht=u.lineCount(Je);Ke[1]+=(1-ht)*nt}Nt.attr("transform",t(Ke[0],Ke[1])),Se.setScale()}}else It&&(de==="right"&&(Se.domain[0]+=(It+Tt/2)/se.w),Nt.attr("transform",t(Ke[0],Ke[1])),Se.setScale())}O.selectAll("."+k.cbfills+",."+k.cblines).attr("transform",U?t(0,Math.round(se.h*(1-Se.domain[1]))):t(Math.round(se.w*Se.domain[0]),0)),xt.attr("transform",U?t(0,Math.round(-se.t)):t(Math.round(-se.l),0));var Oe=O.select("."+k.cbfills).selectAll("rect."+k.cbfill).attr("style","").data(Me);Oe.enter().append("rect").classed(k.cbfill,!0).style("stroke","none"),Oe.exit().remove();var Be=he.map(Se.c2p).map(Math.round).sort(function(Lt,Ct){return Lt-Ct});Oe.each(function(Lt,Ct){var mt=[Ct===0?he[0]:(Me[Ct]+Me[Ct-1])/2,Ct===Me.length-1?he[1]:(Me[Ct]+Me[Ct+1])/2].map(Se.c2p).map(Math.round);U&&(mt[1]=l.constrain(mt[1]+(mt[1]>mt[0])?1:-1,Be[0],Be[1]));var Ot=_.select(this).attr(U?"x":"y",Ee).attr(U?"y":"x",_.min(mt)).attr(U?"width":"height",Math.max(ne,2)).attr(U?"height":"width",Math.max(_.max(mt)-_.min(mt),2));if(I._fillgradient)n.gradient(Ot,R,I._id,U?"vertical":"horizontalreversed",I._fillgradient,"fill");else{var _t=Re(Lt).replace("e-","");Ot.attr("fill",w(_t).toHexString())}});var Qe=O.select("."+k.cblines).selectAll("path."+k.cbline).data(ye.color&&ye.width?Ce:[]);Qe.enter().append("path").classed(k.cbline,!0),Qe.exit().remove(),Qe.each(function(Lt){var Ct=Ee,mt=Math.round(Se.c2p(Lt))+ye.width/2%1;_.select(this).attr("d","M"+(U?Ct+","+mt:mt+","+Ct)+(U?"h":"v")+ne).call(n.lineGroupStyle,ye.width,xe(Lt),ye.dash)}),xt.selectAll("g."+Se._id+"tick,path").remove();var ut=Ee+ne+(V||0)/2-(I.ticks==="outside"?1:0),pt=y.calcTicks(Se),bt=y.getTickSigns(Se)[2];return y.drawTicks(R,Se,{vals:Se.ticks==="inside"?y.clipEnds(Se,pt):pt,layer:xt,path:y.makeTickPath(Se,ut,bt),transFn:y.makeTransTickFn(Se)}),y.drawLabels(R,Se,{vals:pt,layer:xt,transFn:y.makeTransTickLabelFn(Se),labelFns:y.makeLabelFns(Se,ut)})},function(){if(U&&!Ne||!U&&Ne){var qt,Nt,Je=Se.position||0,Ke=Se._offset+Se._length/2;if(de==="right")Nt=Ke,qt=se.l+se.w*Je+10+Tt*(Se.showticklabels?1:.5);else if(qt=Ke,de==="bottom"&&(Nt=se.t+se.h*Je+10+(Et.indexOf("inside")===-1?Se.tickfont.size:0)+(Se.ticks!=="intside"&&I.ticklen||0)),de==="top"){var Ge=pe.text.split("
").length;Nt=se.t+se.h*Je+10-ne-x*Tt*Ge}Ft((U?"h":"v")+Se._id+"title",{avoid:{selection:_.select(R).selectAll("g."+Se._id+"tick"),side:de,offsetTop:U?0:se.t,offsetLeft:U?se.l:0,maxShift:U?oe.width:oe.height},attributes:{x:qt,y:Nt,"text-anchor":"middle"},transform:{rotate:U?-90:0,offset:0}})}},s.previousPromises,function(){var qt,Nt=ne+V/2;Et.indexOf("inside")===-1&&(qt=n.bBox(xt.node()),Nt+=U?qt.width:qt.height),ft=yt.select("text");var Je=0,Ke=U&&de==="top",Ge=!U&&de==="right",nt=0;if(ft.node()&&!ft.classed(k.jsPlaceholder)){var ht,Oe=yt.select(".h"+Se._id+"title-math-group").node();Oe&&(U&&Ne||!U&&!Ne)?(Je=(qt=n.bBox(Oe)).width,ht=qt.height):(Je=(qt=n.bBox(yt.node())).right-se.l-(U?Ee:be),ht=qt.bottom-se.t-(U?be:Ee),U||de!=="top"||(Nt+=qt.height,nt=qt.height)),Ge&&(ft.attr("transform",t(Je/2+Tt/2,0)),Je*=2),Nt=Math.max(Nt,U?Je:ht)}var Be=2*(U?Y:K)+Nt+H+V/2,Qe=0;!U&&pe.text&&X==="bottom"&&ae<=0&&(Be+=Qe=Be/2,nt+=Qe),oe._hColorbarMoveTitle=Qe,oe._hColorbarMoveCBTitle=nt;var ut=H+V;O.select("."+k.cbbg).attr("x",(U?Ee:be)-ut/2-(U?Y:0)).attr("y",(U?be:Ee)-(U?me:K+nt-Qe)).attr(U?"width":"height",Math.max(Be-Qe,2)).attr(U?"height":"width",Math.max(me+ut,2)).call(o.fill,ee).call(o.stroke,I.bordercolor).style("stroke-width",H);var pt=Ge?Math.max(Je-10,0):0;if(O.selectAll("."+k.cboutline).attr("x",(U?Ee:be+Y)+pt).attr("y",(U?be+K-me:Ee)+(Ke?Dt:0)).attr(U?"width":"height",Math.max(ne,2)).attr(U?"height":"width",Math.max(me-(U?2*K+Dt:2*Y+pt),2)).call(o.stroke,I.outlinecolor).style({fill:"none","stroke-width":V}),O.attr("transform",t(se.l-(U?Ue*Be:0),se.t-(U?0:(1-De)*Be-nt))),!U&&(H||w(ee).getAlpha()&&!w.equals(oe.paper_bgcolor,ee))){var bt=xt.selectAll("text"),Lt=bt[0].length,Ct=O.select("."+k.cbbg).node(),mt=n.bBox(Ct),Ot=n.getTranslate(O);bt.each(function(Kt,nn){var yn=Lt-1;if(nn===0||nn===yn){var ln,kn=n.bBox(this),Wn=n.getTranslate(this);if(nn===yn){var wn=kn.right+Wn.x;(ln=mt.right+Ot.x+be-H-2+te-wn)>0&&(ln=0)}else if(nn===0){var on=kn.left+Wn.x;(ln=mt.left+Ot.x+be+H+2-on)<0&&(ln=0)}ln&&(Lt<3?this.setAttribute("transform","translate("+ln+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var _t={},Pt=g[Q],Bt=m[Q],Wt=g[X],Gt=m[X],Xt=Be-ne;U?(G==="pixels"?(_t.y=ae,_t.t=me*Wt,_t.b=me*Gt):(_t.t=_t.b=0,_t.yt=ae+B*Wt,_t.yb=ae-B*Gt),j==="pixels"?(_t.x=te,_t.l=Be*Pt,_t.r=Be*Bt):(_t.l=Xt*Pt,_t.r=Xt*Bt,_t.xl=te-N*Pt,_t.xr=te+N*Bt)):(G==="pixels"?(_t.x=te,_t.l=me*Pt,_t.r=me*Bt):(_t.l=_t.r=0,_t.xl=te+B*Pt,_t.xr=te-B*Bt),j==="pixels"?(_t.y=1-ae,_t.t=Be*Wt,_t.b=Be*Gt):(_t.t=Xt*Wt,_t.b=Xt*Gt,_t.yt=ae-N*Wt,_t.yb=ae+N*Gt)),s.autoMargin(R,I._id,_t)}],R)}(C,A,h);L&&L.then&&(h._promises||[]).push(L),h._context.edits.colorbarPosition&&function(O,I,R){var U,B,G,N=I.orientation==="v",j=R._fullLayout._size;f.init({element:O.node(),gd:R,prepFn:function(){U=O.attr("transform"),r(O)},moveFn:function(V,H){O.attr("transform",U+t(V,H)),B=f.align((N?I._uFrac:I._vFrac)+V/j.w,N?I._thickFrac:I._lenFrac,0,1,I.xanchor),G=f.align((N?I._vFrac:1-I._uFrac)-H/j.h,N?I._lenFrac:I._thickFrac,0,1,I.yanchor);var ee=f.getCursor(B,G,I.xanchor,I.yanchor);r(O,ee)},doneFn:function(){if(r(O),B!==void 0&&G!==void 0){var V={};V[I._propPrefix+"x"]=B,V[I._propPrefix+"y"]=G,I._traceIndex!==void 0?T.call("_guiRestyle",R,V,I._traceIndex):T.call("_guiRelayout",R,V)}}})}(C,A,h)}),M.exit().each(function(A){s.autoMargin(h,A._id)}).remove(),M.order()}}},76228:function(D,E,e){var _=e(71828);D.exports=function(w){return _.isPlainObject(w.colorbar)}},12311:function(D,E,e){D.exports={moduleType:"component",name:"colorbar",attributes:e(63583),supplyDefaults:e(62499),draw:e(98981).draw,hasColorbar:e(76228)}},50693:function(D,E,e){var _=e(63583),w=e(30587).counter,s=e(78607),T=e(63282).scales;function y(f){return"`"+f+"`"}s(T),D.exports=function(f,l){f=f||"";var t,i=(l=l||{}).cLetter||"c",r=("onlyIfNumerical"in l&&l.onlyIfNumerical,"noScale"in l?l.noScale:f==="marker.line"),n="showScaleDflt"in l?l.showScaleDflt:i==="z",o=typeof l.colorscaleDflt=="string"?T[l.colorscaleDflt]:null,a=l.editTypeOverride||"",u=f?f+".":"";"colorAttr"in l?(t=l.colorAttr,l.colorAttr):y(u+(t={z:"z",c:"color"}[i]));var p=i+"auto",c=i+"min",b=i+"max",d=i+"mid",v={};v[c]=v[b]=void 0;var x={};x[p]=!1;var g={};return t==="color"&&(g.color={valType:"color",arrayOk:!0,editType:a||"style"},l.anim&&(g.color.anim=!0)),g[p]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:v},g[c]={valType:"number",dflt:null,editType:a||"plot",impliedEdits:x},g[b]={valType:"number",dflt:null,editType:a||"plot",impliedEdits:x},g[d]={valType:"number",dflt:null,editType:"calc",impliedEdits:v},g.colorscale={valType:"colorscale",editType:"calc",dflt:o,impliedEdits:{autocolorscale:!1}},g.autocolorscale={valType:"boolean",dflt:l.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},g.reversescale={valType:"boolean",dflt:!1,editType:"plot"},r||(g.showscale={valType:"boolean",dflt:n,editType:"calc"},g.colorbar=_),l.noColorAxis||(g.coloraxis={valType:"subplotid",regex:w("coloraxis"),dflt:null,editType:"calc"}),g}},78803:function(D,E,e){var _=e(92770),w=e(71828),s=e(52075).extractOpts;D.exports=function(T,y,f){var l,t=T._fullLayout,i=f.vals,r=f.containerStr,n=r?w.nestedProperty(y,r).get():y,o=s(n),a=o.auto!==!1,u=o.min,p=o.max,c=o.mid,b=function(){return w.aggNums(Math.min,null,i)},d=function(){return w.aggNums(Math.max,null,i)};u===void 0?u=b():a&&(u=n._colorAx&&_(u)?Math.min(u,b()):b()),p===void 0?p=d():a&&(p=n._colorAx&&_(p)?Math.max(p,d()):d()),a&&c!==void 0&&(p-c>c-u?u=c-(p-c):p-c=0?t.colorscale.sequential:t.colorscale.sequentialminus,o._sync("colorscale",l))}},33046:function(D,E,e){var _=e(71828),w=e(52075).hasColorscale,s=e(52075).extractOpts;D.exports=function(T,y){function f(a,u){var p=a["_"+u];p!==void 0&&(a[u]=p)}function l(a,u){var p=u.container?_.nestedProperty(a,u.container).get():a;if(p)if(p.coloraxis)p._colorAx=y[p.coloraxis];else{var c=s(p),b=c.auto;(b||c.min===void 0)&&f(p,u.min),(b||c.max===void 0)&&f(p,u.max),c.autocolorscale&&f(p,"colorscale")}}for(var t=0;t=0;b--,d++){var v=u[b];c[d]=[1-v[0],v[1]]}return c}function o(u,p){p=p||{};for(var c=u.domain,b=u.range,d=b.length,v=new Array(d),x=0;x1.3333333333333333-f?y:f}},70461:function(D,E,e){var _=e(71828),w=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];D.exports=function(s,T,y,f){return s=y==="left"?0:y==="center"?1:y==="right"?2:_.constrain(Math.floor(3*s),0,2),T=f==="bottom"?0:f==="middle"?1:f==="top"?2:_.constrain(Math.floor(3*T),0,2),w[T][s]}},64505:function(D,E){E.selectMode=function(e){return e==="lasso"||e==="select"},E.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"},E.openMode=function(e){return e==="drawline"||e==="drawopenpath"},E.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"},E.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"},E.selectingOrDrawing=function(e){return E.freeMode(e)||E.rectMode(e)}},28569:function(D,E,e){var _=e(48956),w=e(57035),s=e(38520),T=e(71828).removeElement,y=e(85555),f=D.exports={};f.align=e(92807),f.getCursor=e(70461);var l=e(26041);function t(){var r=document.createElement("div");r.className="dragcover";var n=r.style;return n.position="fixed",n.left=0,n.right=0,n.top=0,n.bottom=0,n.zIndex=999999999,n.background="none",document.body.appendChild(r),r}function i(r){return _(r.changedTouches?r.changedTouches[0]:r,document.body)}f.unhover=l.wrapped,f.unhoverRaw=l.raw,f.init=function(r){var n,o,a,u,p,c,b,d,v=r.gd,x=1,g=v._context.doubleClickDelay,m=r.element;v._mouseDownTime||(v._mouseDownTime=0),m.style.pointerEvents="all",m.onmousedown=h,s?(m._ontouchstart&&m.removeEventListener("touchstart",m._ontouchstart),m._ontouchstart=h,m.addEventListener("touchstart",h,{passive:!1})):m.ontouchstart=h;var k=r.clampFn||function(C,L,O){return Math.abs(C)g&&(x=Math.max(x-1,1)),v._dragged)r.doneFn&&r.doneFn();else if(r.clickFn&&r.clickFn(x,c),!d){var L;try{L=new MouseEvent("click",C)}catch{var O=i(C);(L=document.createEvent("MouseEvents")).initMouseEvent("click",C.bubbles,C.cancelable,C.view,C.detail,C.screenX,C.screenY,O[0],O[1],C.ctrlKey,C.altKey,C.shiftKey,C.metaKey,C.button,C.relatedTarget)}b.dispatchEvent(L)}v._dragging=!1,v._dragged=!1}else v._dragged=!1}},f.coverSlip=t},26041:function(D,E,e){var _=e(11086),w=e(79990),s=e(24401).getGraphDiv,T=e(26675),y=D.exports={};y.wrapped=function(f,l,t){(f=s(f))._fullLayout&&w.clear(f._fullLayout._uid+T.HOVERID),y.raw(f,l,t)},y.raw=function(f,l){var t=f._fullLayout,i=f._hoverdata;l||(l={}),l.target&&!f._dragged&&_.triggerHandler(f,"plotly_beforehover",l)===!1||(t._hoverlayer.selectAll("g").remove(),t._hoverlayer.selectAll("line").remove(),t._hoverlayer.selectAll("circle").remove(),f._hoverdata=void 0,l.target&&i&&f.emit("plotly_unhover",{event:l,points:i}))}},79952:function(D,E){E.P={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},E.u={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"}},91424:function(D,E,e){var _=e(39898),w=e(71828),s=w.numberFormat,T=e(92770),y=e(84267),f=e(73972),l=e(7901),t=e(21081),i=w.strTranslate,r=e(63893),n=e(77922),o=e(18783).LINE_SPACING,a=e(37822).DESELECTDIM,u=e(34098),p=e(39984),c=e(23469).appendArrayPointValue,b=D.exports={};function d(we,Ae,Me){var Ce=Ae.fillpattern,ne=Ce&&b.getPatternAttr(Ce.shape,0,"");if(ne){var ue=b.getPatternAttr(Ce.bgcolor,0,null),me=b.getPatternAttr(Ce.fgcolor,0,null),Te=Ce.fgopacity,Ee=b.getPatternAttr(Ce.size,0,8),Ue=b.getPatternAttr(Ce.solidity,0,.3),De=Ae.uid;b.pattern(we,"point",Me,De,ne,Ee,Ue,void 0,Ce.fillmode,ue,me,Te)}else Ae.fillcolor&&we.call(l.fill,Ae.fillcolor)}b.font=function(we,Ae,Me,Ce){w.isPlainObject(Ae)&&(Ce=Ae.color,Me=Ae.size,Ae=Ae.family),Ae&&we.style("font-family",Ae),Me+1&&we.style("font-size",Me+"px"),Ce&&we.call(l.fill,Ce)},b.setPosition=function(we,Ae,Me){we.attr("x",Ae).attr("y",Me)},b.setSize=function(we,Ae,Me){we.attr("width",Ae).attr("height",Me)},b.setRect=function(we,Ae,Me,Ce,ne){we.call(b.setPosition,Ae,Me).call(b.setSize,Ce,ne)},b.translatePoint=function(we,Ae,Me,Ce){var ne=Me.c2p(we.x),ue=Ce.c2p(we.y);return!!(T(ne)&&T(ue)&&Ae.node())&&(Ae.node().nodeName==="text"?Ae.attr("x",ne).attr("y",ue):Ae.attr("transform",i(ne,ue)),!0)},b.translatePoints=function(we,Ae,Me){we.each(function(Ce){var ne=_.select(this);b.translatePoint(Ce,ne,Ae,Me)})},b.hideOutsideRangePoint=function(we,Ae,Me,Ce,ne,ue){Ae.attr("display",Me.isPtWithinRange(we,ne)&&Ce.isPtWithinRange(we,ue)?null:"none")},b.hideOutsideRangePoints=function(we,Ae){if(Ae._hasClipOnAxisFalse){var Me=Ae.xaxis,Ce=Ae.yaxis;we.each(function(ne){var ue=ne[0].trace,me=ue.xcalendar,Te=ue.ycalendar,Ee=f.traceIs(ue,"bar-like")?".bartext":".point,.textpoint";we.selectAll(Ee).each(function(Ue){b.hideOutsideRangePoint(Ue,_.select(this),Me,Ce,me,Te)})})}},b.crispRound=function(we,Ae,Me){return Ae&&T(Ae)?we._context.staticPlot?Ae:Ae<1?1:Math.round(Ae):Me||0},b.singleLineStyle=function(we,Ae,Me,Ce,ne){Ae.style("fill","none");var ue=(((we||[])[0]||{}).trace||{}).line||{},me=Me||ue.width||0,Te=ne||ue.dash||"";l.stroke(Ae,Ce||ue.color),b.dashLine(Ae,Te,me)},b.lineGroupStyle=function(we,Ae,Me,Ce){we.style("fill","none").each(function(ne){var ue=(((ne||[])[0]||{}).trace||{}).line||{},me=Ae||ue.width||0,Te=Ce||ue.dash||"";_.select(this).call(l.stroke,Me||ue.color).call(b.dashLine,Te,me)})},b.dashLine=function(we,Ae,Me){Me=+Me||0,Ae=b.dashStyle(Ae,Me),we.style({"stroke-dasharray":Ae,"stroke-width":Me+"px"})},b.dashStyle=function(we,Ae){Ae=+Ae||1;var Me=Math.max(Ae,3);return we==="solid"?we="":we==="dot"?we=Me+"px,"+Me+"px":we==="dash"?we=3*Me+"px,"+3*Me+"px":we==="longdash"?we=5*Me+"px,"+5*Me+"px":we==="dashdot"?we=3*Me+"px,"+Me+"px,"+Me+"px,"+Me+"px":we==="longdashdot"&&(we=5*Me+"px,"+2*Me+"px,"+Me+"px,"+2*Me+"px"),we},b.singleFillStyle=function(we,Ae){var Me=_.select(we.node());d(we,((Me.data()[0]||[])[0]||{}).trace||{},Ae)},b.fillGroupStyle=function(we,Ae){we.style("stroke-width",0).each(function(Me){var Ce=_.select(this);Me[0].trace&&d(Ce,Me[0].trace,Ae)})};var v=e(90998);b.symbolNames=[],b.symbolFuncs=[],b.symbolBackOffs=[],b.symbolNeedLines={},b.symbolNoDot={},b.symbolNoFill={},b.symbolList=[],Object.keys(v).forEach(function(we){var Ae=v[we],Me=Ae.n;b.symbolList.push(Me,String(Me),we,Me+100,String(Me+100),we+"-open"),b.symbolNames[Me]=we,b.symbolFuncs[Me]=Ae.f,b.symbolBackOffs[Me]=Ae.backoff||0,Ae.needLine&&(b.symbolNeedLines[Me]=!0),Ae.noDot?b.symbolNoDot[Me]=!0:b.symbolList.push(Me+200,String(Me+200),we+"-dot",Me+300,String(Me+300),we+"-open-dot"),Ae.noFill&&(b.symbolNoFill[Me]=!0)});var x=b.symbolNames.length;function g(we,Ae,Me,Ce){var ne=we%100;return b.symbolFuncs[ne](Ae,Me,Ce)+(we>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}b.symbolNumber=function(we){if(T(we))we=+we;else if(typeof we=="string"){var Ae=0;we.indexOf("-open")>0&&(Ae=100,we=we.replace("-open","")),we.indexOf("-dot")>0&&(Ae+=200,we=we.replace("-dot","")),(we=b.symbolNames.indexOf(we))>=0&&(we+=Ae)}return we%100>=x||we>=400?0:Math.floor(Math.max(we,0))};var m={x1:1,x2:0,y1:0,y2:0},k={x1:0,x2:0,y1:1,y2:0},h=s("~f"),M={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:m},horizontalreversed:{node:"linearGradient",attrs:m,reversed:!0},vertical:{node:"linearGradient",attrs:k},verticalreversed:{node:"linearGradient",attrs:k,reversed:!0}};b.gradient=function(we,Ae,Me,Ce,ne,ue){for(var me=ne.length,Te=M[Ce],Ee=new Array(me),Ue=0;Ue=100;var Ue=Re(we,Me),De=K(we,Me);Ae.attr("d",g(Ee,Te,Ue,De))}var je,ge,be,Se=!1;if(we.so)be=me.outlierwidth,ge=me.outliercolor,je=ue.outliercolor;else{var Ne=(me||{}).width;be=(we.mlw+1||Ne+1||(we.trace?(we.trace.marker.line||{}).width:0)+1)-1||0,ge="mlc"in we?we.mlcc=Ce.lineScale(we.mlc):w.isArrayOrTypedArray(me.color)?l.defaultLine:me.color,w.isArrayOrTypedArray(ue.color)&&(je=l.defaultLine,Se=!0),je="mc"in we?we.mcc=Ce.markerScale(we.mc):ue.color||"rgba(0,0,0,0)",Ce.selectedColorFn&&(je=Ce.selectedColorFn(we))}if(we.om)Ae.call(l.stroke,je).style({"stroke-width":(be||1)+"px",fill:"none"});else{Ae.style("stroke-width",(we.isBlank?0:be)+"px");var Ye=ue.gradient,Ze=we.mgt;Ze?Se=!0:Ze=Ye&&Ye.type,w.isArrayOrTypedArray(Ze)&&(Ze=Ze[0],M[Ze]||(Ze=0));var st=ue.pattern,ot=st&&b.getPatternAttr(st.shape,we.i,"");if(Ze&&Ze!=="none"){var ft=we.mgc;ft?Se=!0:ft=Ye.color;var yt=Me.uid;Se&&(yt+="-"+we.i),b.gradient(Ae,ne,yt,Ze,[[0,ft],[1,je]],"fill")}else if(ot){var Et=b.getPatternAttr(st.bgcolor,we.i,null),Tt=b.getPatternAttr(st.fgcolor,we.i,null),xt=st.fgopacity,Dt=b.getPatternAttr(st.size,we.i,8),It=b.getPatternAttr(st.solidity,we.i,.3),Ft=we.mcc||w.isArrayOrTypedArray(st.shape)||w.isArrayOrTypedArray(st.bgcolor)||w.isArrayOrTypedArray(st.size)||w.isArrayOrTypedArray(st.solidity),qt=Me.uid;Ft&&(qt+="-"+we.i),b.pattern(Ae,"point",ne,qt,ot,Dt,It,we.mcc,st.fillmode,Et,Tt,xt)}else l.fill(Ae,je);be&&l.stroke(Ae,ge)}},b.makePointStyleFns=function(we){var Ae={},Me=we.marker;return Ae.markerScale=b.tryColorscale(Me,""),Ae.lineScale=b.tryColorscale(Me,"line"),f.traceIs(we,"symbols")&&(Ae.ms2mrc=u.isBubble(we)?p(we):function(){return(Me.size||6)/2}),we.selectedpoints&&w.extendFlat(Ae,b.makeSelectedPointStyleFns(we)),Ae},b.makeSelectedPointStyleFns=function(we){var Ae={},Me=we.selected||{},Ce=we.unselected||{},ne=we.marker||{},ue=Me.marker||{},me=Ce.marker||{},Te=ne.opacity,Ee=ue.opacity,Ue=me.opacity,De=Ee!==void 0,je=Ue!==void 0;(w.isArrayOrTypedArray(Te)||De||je)&&(Ae.selectedOpacityFn=function(ft){var yt=ft.mo===void 0?ne.opacity:ft.mo;return ft.selected?De?Ee:yt:je?Ue:a*yt});var ge=ne.color,be=ue.color,Se=me.color;(be||Se)&&(Ae.selectedColorFn=function(ft){var yt=ft.mcc||ge;return ft.selected?be||yt:Se||yt});var Ne=ne.size,Ye=ue.size,Ze=me.size,st=Ye!==void 0,ot=Ze!==void 0;return f.traceIs(we,"symbols")&&(st||ot)&&(Ae.selectedSizeFn=function(ft){var yt=ft.mrc||Ne/2;return ft.selected?st?Ye/2:yt:ot?Ze/2:yt}),Ae},b.makeSelectedTextStyleFns=function(we){var Ae={},Me=we.selected||{},Ce=we.unselected||{},ne=we.textfont||{},ue=Me.textfont||{},me=Ce.textfont||{},Te=ne.color,Ee=ue.color,Ue=me.color;return Ae.selectedTextColorFn=function(De){var je=De.tc||Te;return De.selected?Ee||je:Ue||(Ee?je:l.addOpacity(je,a))},Ae},b.selectedPointStyle=function(we,Ae){if(we.size()&&Ae.selectedpoints){var Me=b.makeSelectedPointStyleFns(Ae),Ce=Ae.marker||{},ne=[];Me.selectedOpacityFn&&ne.push(function(ue,me){ue.style("opacity",Me.selectedOpacityFn(me))}),Me.selectedColorFn&&ne.push(function(ue,me){l.fill(ue,Me.selectedColorFn(me))}),Me.selectedSizeFn&&ne.push(function(ue,me){var Te=me.mx||Ce.symbol||0,Ee=Me.selectedSizeFn(me);ue.attr("d",g(b.symbolNumber(Te),Ee,Re(me,Ae),K(me,Ae))),me.mrc2=Ee}),ne.length&&we.each(function(ue){for(var me=_.select(this),Te=0;Te0?Me:0}function R(we,Ae,Me){return Me&&(we=V(we)),Ae?B(we[1]):U(we[0])}function U(we){var Ae=_.round(we,2);return A=Ae,Ae}function B(we){var Ae=_.round(we,2);return C=Ae,Ae}function G(we,Ae,Me,Ce){var ne=we[0]-Ae[0],ue=we[1]-Ae[1],me=Me[0]-Ae[0],Te=Me[1]-Ae[1],Ee=Math.pow(ne*ne+ue*ue,.25),Ue=Math.pow(me*me+Te*Te,.25),De=(Ue*Ue*ne-Ee*Ee*me)*Ce,je=(Ue*Ue*ue-Ee*Ee*Te)*Ce,ge=3*Ue*(Ee+Ue),be=3*Ee*(Ee+Ue);return[[U(Ae[0]+(ge&&De/ge)),B(Ae[1]+(ge&&je/ge))],[U(Ae[0]-(be&&De/be)),B(Ae[1]-(be&&je/be))]]}b.textPointStyle=function(we,Ae,Me){if(we.size()){var Ce;if(Ae.selectedpoints){var ne=b.makeSelectedTextStyleFns(Ae);Ce=ne.selectedTextColorFn}var ue=Ae.texttemplate,me=Me._fullLayout;we.each(function(Te){var Ee=_.select(this),Ue=ue?w.extractOption(Te,Ae,"txt","texttemplate"):w.extractOption(Te,Ae,"tx","text");if(Ue||Ue===0){if(ue){var De=Ae._module.formatLabels,je=De?De(Te,Ae,me):{},ge={};c(ge,Ae,Te.i);var be=Ae._meta||{};Ue=w.texttemplateString(Ue,je,me._d3locale,ge,Te,be)}var Se=Te.tp||Ae.textposition,Ne=I(Te,Ae),Ye=Ce?Ce(Te):Te.tc||Ae.textfont.color;Ee.call(b.font,Te.tf||Ae.textfont.family,Ne,Ye).text(Ue).call(r.convertToTspans,Me).call(O,Se,Ne,Te.mrc)}else Ee.remove()})}},b.selectedTextStyle=function(we,Ae){if(we.size()&&Ae.selectedpoints){var Me=b.makeSelectedTextStyleFns(Ae);we.each(function(Ce){var ne=_.select(this),ue=Me.selectedTextColorFn(Ce),me=Ce.tp||Ae.textposition,Te=I(Ce,Ae);l.fill(ne,ue);var Ee=f.traceIs(Ae,"bar-like");O(ne,me,Te,Ce.mrc2||Ce.mrc,Ee)})}},b.smoothopen=function(we,Ae){if(we.length<3)return"M"+we.join("L");var Me,Ce="M"+we[0],ne=[];for(Me=1;Me=Ee||ft>=De&&ft<=Ee)&&(yt<=je&&yt>=Ue||yt>=je&&yt<=Ue)&&(we=[ft,yt])}return we}b.steps=function(we){var Ae=N[we]||j;return function(Me){for(var Ce="M"+U(Me[0][0])+","+B(Me[0][1]),ne=Me.length,ue=1;ue=1e4&&(b.savedBBoxes={},H=0),Me&&(b.savedBBoxes[Me]=be),H++,w.extendFlat({},be)},b.setClipUrl=function(we,Ae,Me){we.attr("clip-path",Q(Ae,Me))},b.getTranslate=function(we){var Ae=(we[we.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(Me,Ce,ne){return[Ce,ne].join(" ")}).split(" ");return{x:+Ae[0]||0,y:+Ae[1]||0}},b.setTranslate=function(we,Ae,Me){var Ce=we.attr?"attr":"getAttribute",ne=we.attr?"attr":"setAttribute",ue=we[Ce]("transform")||"";return Ae=Ae||0,Me=Me||0,ue=ue.replace(/(\btranslate\(.*?\);?)/,"").trim(),ue=(ue+=i(Ae,Me)).trim(),we[ne]("transform",ue),ue},b.getScale=function(we){var Ae=(we[we.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(Me,Ce,ne){return[Ce,ne].join(" ")}).split(" ");return{x:+Ae[0]||1,y:+Ae[1]||1}},b.setScale=function(we,Ae,Me){var Ce=we.attr?"attr":"getAttribute",ne=we.attr?"attr":"setAttribute",ue=we[Ce]("transform")||"";return Ae=Ae||1,Me=Me||1,ue=ue.replace(/(\bscale\(.*?\);?)/,"").trim(),ue=(ue+="scale("+Ae+","+Me+")").trim(),we[ne]("transform",ue),ue};var X=/\s*sc.*/;b.setPointGroupScale=function(we,Ae,Me){if(Ae=Ae||1,Me=Me||1,we){var Ce=Ae===1&&Me===1?"":"scale("+Ae+","+Me+")";we.each(function(){var ne=(this.getAttribute("transform")||"").replace(X,"");ne=(ne+=Ce).trim(),this.setAttribute("transform",ne)})}};var Y=/translate\([^)]*\)\s*$/;function K(we,Ae){var Me;return we&&(Me=we.mf),Me===void 0&&(Me=Ae.marker&&Ae.marker.standoff||0),Ae._geo||Ae._xA?Me:-Me}b.setTextPointsScale=function(we,Ae,Me){we&&we.each(function(){var Ce,ne=_.select(this),ue=ne.select("text");if(ue.node()){var me=parseFloat(ue.attr("x")||0),Te=parseFloat(ue.attr("y")||0),Ee=(ne.attr("transform")||"").match(Y);Ce=Ae===1&&Me===1?[]:[i(me,Te),"scale("+Ae+","+Me+")",i(-me,-Te)],Ee&&Ce.push(Ee),ne.attr("transform",Ce.join(""))}})},b.getMarkerStandoff=K;var te,ae,oe,se,fe,ye,pe=Math.atan2,de=Math.cos,he=Math.sin;function xe(we,Ae){var Me=Ae[0],Ce=Ae[1];return[Me*de(we)-Ce*he(we),Me*he(we)+Ce*de(we)]}function Re(we,Ae){var Me,Ce,ne=we.ma;ne===void 0&&(ne=Ae.marker.angle||0);var ue=Ae.marker.angleref;if(ue==="previous"||ue==="north"){if(Ae._geo){var me=Ae._geo.project(we.lonlat);Me=me[0],Ce=me[1]}else{var Te=Ae._xA,Ee=Ae._yA;if(!Te||!Ee)return 90;Me=Te.c2p(we.x),Ce=Ee.c2p(we.y)}if(Ae._geo){var Ue,De=we.lonlat[0],je=we.lonlat[1],ge=Ae._geo.project([De,je+1e-5]),be=Ae._geo.project([De+1e-5,je]),Se=pe(be[1]-Ce,be[0]-Me),Ne=pe(ge[1]-Ce,ge[0]-Me);if(ue==="north")Ue=ne/180*Math.PI;else if(ue==="previous"){var Ye=De/180*Math.PI,Ze=je/180*Math.PI,st=te/180*Math.PI,ot=ae/180*Math.PI,ft=st-Ye,yt=de(ot)*he(ft),Et=he(ot)*de(Ze)-de(ot)*he(Ze)*de(ft);Ue=-pe(yt,Et)-Math.PI,te=De,ae=je}var Tt=xe(Se,[de(Ue),0]),xt=xe(Ne,[he(Ue),0]);ne=pe(Tt[1]+xt[1],Tt[0]+xt[0])/Math.PI*180,ue!=="previous"||ye===Ae.uid&&we.i===fe+1||(ne=null)}if(ue==="previous"&&!Ae._geo)if(ye===Ae.uid&&we.i===fe+1&&T(Me)&&T(Ce)){var Dt=Me-oe,It=Ce-se,Ft=Ae.line&&Ae.line.shape||"",qt=Ft.slice(Ft.length-1);qt==="h"&&(It=0),qt==="v"&&(Dt=0),ne+=pe(It,Dt)/Math.PI*180+90}else ne=null}return oe=Me,se=Ce,fe=we.i,ye=Ae.uid,ne}b.getMarkerAngle=Re},90998:function(D,E,e){var _,w,s,T,y=e(95616),f=e(39898).round,l="M0,0Z",t=Math.sqrt(2),i=Math.sqrt(3),r=Math.PI,n=Math.cos,o=Math.sin;function a(p){return p===null}function u(p,c,b){if(!(p&&p%360!=0||c))return b;if(s===p&&T===c&&_===b)return w;function d(R,U){var B=n(R),G=o(R),N=U[0],j=U[1]+(c||0);return[N*B-j*G,N*G+j*B]}s=p,T=c,_=b;for(var v=p/180*r,x=0,g=0,m=y(b),k="",h=0;h0,o=y._context.staticPlot;f.each(function(a){var u,p=a[0].trace,c=p.error_x||{},b=p.error_y||{};p.ids&&(u=function(g){return g.id});var d=T.hasMarkers(p)&&p.marker.maxdisplayed>0;b.visible||c.visible||(a=[]);var v=_.select(this).selectAll("g.errorbar").data(a,u);if(v.exit().remove(),a.length){c.visible||v.selectAll("path.xerror").remove(),b.visible||v.selectAll("path.yerror").remove(),v.style("opacity",1);var x=v.enter().append("g").classed("errorbar",!0);n&&x.style("opacity",0).transition().duration(t.duration).style("opacity",1),s.setClipUrl(v,l.layerClipId,y),v.each(function(g){var m=_.select(this),k=function(O,I,R){var U={x:I.c2p(O.x),y:R.c2p(O.y)};return O.yh!==void 0&&(U.yh=R.c2p(O.yh),U.ys=R.c2p(O.ys),w(U.ys)||(U.noYS=!0,U.ys=R.c2p(O.ys,!0))),O.xh!==void 0&&(U.xh=I.c2p(O.xh),U.xs=I.c2p(O.xs),w(U.xs)||(U.noXS=!0,U.xs=I.c2p(O.xs,!0))),U}(g,i,r);if(!d||g.vis){var h,M=m.select("path.yerror");if(b.visible&&w(k.x)&&w(k.yh)&&w(k.ys)){var A=b.width;h="M"+(k.x-A)+","+k.yh+"h"+2*A+"m-"+A+",0V"+k.ys,k.noYS||(h+="m-"+A+",0h"+2*A),M.size()?n&&(M=M.transition().duration(t.duration).ease(t.easing)):M=m.append("path").style("vector-effect",o?"none":"non-scaling-stroke").classed("yerror",!0),M.attr("d",h)}else M.remove();var C=m.select("path.xerror");if(c.visible&&w(k.y)&&w(k.xh)&&w(k.xs)){var L=(c.copy_ystyle?b:c).width;h="M"+k.xh+","+(k.y-L)+"v"+2*L+"m0,-"+L+"H"+k.xs,k.noXS||(h+="m0,-"+L+"v"+2*L),C.size()?n&&(C=C.transition().duration(t.duration).ease(t.easing)):C=m.append("path").style("vector-effect",o?"none":"non-scaling-stroke").classed("xerror",!0),C.attr("d",h)}else C.remove()}})}})}},62662:function(D,E,e){var _=e(39898),w=e(7901);D.exports=function(s){s.each(function(T){var y=T[0].trace,f=y.error_y||{},l=y.error_x||{},t=_.select(this);t.selectAll("path.yerror").style("stroke-width",f.thickness+"px").call(w.stroke,f.color),l.copy_ystyle&&(l=f),t.selectAll("path.xerror").style("stroke-width",l.thickness+"px").call(w.stroke,l.color)})}},77914:function(D,E,e){var _=e(41940),w=e(528).hoverlabel,s=e(1426).extendFlat;D.exports={hoverlabel:{bgcolor:s({},w.bgcolor,{arrayOk:!0}),bordercolor:s({},w.bordercolor,{arrayOk:!0}),font:_({arrayOk:!0,editType:"none"}),align:s({},w.align,{arrayOk:!0}),namelength:s({},w.namelength,{arrayOk:!0}),editType:"none"}}},30732:function(D,E,e){var _=e(71828),w=e(73972);function s(T,y,f,l){l=l||_.identity,Array.isArray(T)&&(y[0][f]=l(T))}D.exports=function(T){var y=T.calcdata,f=T._fullLayout;function l(o){return function(a){return _.coerceHoverinfo({hoverinfo:a},{_module:o._module},f)}}for(var t=0;t=0&&i.indexne[0]._length||Ke<0||Ke>ue[0]._length)return o.unhoverRaw(se,fe)}else Je="xpx"in fe?fe.xpx:ne[0]._length/2,Ke="ypx"in fe?fe.ypx:ue[0]._length/2;if(fe.pointerX=Je+ne[0]._offset,fe.pointerY=Ke+ue[0]._offset,be="xval"in fe?p.flat(he,fe.xval):p.p2c(ne,Je),Se="yval"in fe?p.flat(he,fe.yval):p.p2c(ue,Ke),!w(be[0])||!w(Se[0]))return T.warn("Fx.hover failed",fe,se),o.unhoverRaw(se,fe)}var ht=1/0;function Oe($t,mn){for(Ye=0;YeDt&&(It.splice(0,Dt),ht=It[0].distance),Ae&&ge!==0&&It.length===0){xt.distance=ge,xt.index=!1;var Zn=st._module.hoverPoints(xt,Et,Tt,"closest",{hoverLayer:xe._hoverlayer});if(Zn&&(Zn=Zn.filter(function(Jt){return Jt.spikeDistance<=ge})),Zn&&Zn.length){var Qn,hr=Zn.filter(function(Jt){return Jt.xa.showspikes&&Jt.xa.spikesnap!=="hovered data"});if(hr.length){var tn=hr[0];w(tn.x0)&&w(tn.y0)&&(Qn=Qe(tn),(!qt.vLinePoint||qt.vLinePoint.spikeDistance>Qn.spikeDistance)&&(qt.vLinePoint=Qn))}var Pn=Zn.filter(function(Jt){return Jt.ya.showspikes&&Jt.ya.spikesnap!=="hovered data"});if(Pn.length){var jt=Pn[0];w(jt.x0)&&w(jt.y0)&&(Qn=Qe(jt),(!qt.hLinePoint||qt.hLinePoint.spikeDistance>Qn.spikeDistance)&&(qt.hLinePoint=Qn))}}}}}function Be($t,mn,Ln){for(var En,jn=null,$n=1/0,Zn=0;Zn<$t.length;Zn++)En=$t[Zn].spikeDistance,Ln&&Zn===0&&(En=-1/0),En<=$n&&En<=mn&&(jn=$t[Zn],$n=En);return jn}function Qe($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}Oe();var ut={fullLayout:xe,container:xe._hoverlayer,event:fe},pt=se._spikepoints,bt={vLinePoint:qt.vLinePoint,hLinePoint:qt.hLinePoint};se._spikepoints=bt;var Lt=function(){It.sort(function($t,mn){return $t.distance-mn.distance}),It=function($t,mn){for(var Ln=mn.charAt(0),En=[],jn=[],$n=[],Zn=0;Zn<$t.length;Zn++){var Qn=$t[Zn];u.traceIs(Qn.trace,"bar-like")||u.traceIs(Qn.trace,"box-violin")?$n.push(Qn):Qn.trace[Ln+"period"]?jn.push(Qn):En.push(Qn)}return En.concat(jn).concat($n)}(It,De)};Lt();var Ct=De.charAt(0),mt=(Ct==="x"||Ct==="y")&&It[0]&&C[It[0].trace.type];if(Ae&&ge!==0&&It.length!==0){var Ot=Be(It.filter(function($t){return $t.ya.showspikes}),ge,mt);qt.hLinePoint=Qe(Ot);var _t=Be(It.filter(function($t){return $t.xa.showspikes}),ge,mt);qt.vLinePoint=Qe(_t)}if(It.length===0){var Pt=o.unhoverRaw(se,fe);return!Ae||qt.hLinePoint===null&&qt.vLinePoint===null||j(pt)&&N(se,qt,ut),Pt}if(Ae&&j(pt)&&N(se,qt,ut),p.isXYhover(yt)&&It[0].length!==0&&It[0].trace.type!=="splom"){var Bt=It[0],Wt=(It=A[Bt.trace.type]?It.filter(function($t){return $t.trace.index===Bt.trace.index}):[Bt]).length;Oe(H("x",Bt,xe),H("y",Bt,xe));var Gt,Xt=[],Kt={},nn=0,yn=function($t){var mn=A[$t.trace.type]?L($t):$t.trace.index;if(Kt[mn]){var Ln=Kt[mn]-1,En=Xt[Ln];Ln>0&&Math.abs($t.distance)Wt-1;Gt--)yn(It[Gt]);It=Xt,Lt()}var ln=se._hoverdata,kn=[],Wn=ee(se),wn=Q(se);for(Ne=0;Ne1||It.length>1)||De==="closest"&&Nt&&It.length>1,gr=n.combine(xe.plot_bgcolor||n.background,xe.paper_bgcolor),ir=I(It,{gd:se,hovermode:De,rotateLabels:kr,bgColor:gr,container:xe._hoverlayer,outerContainer:xe._paper.node(),commonLabelOpts:xe.hoverlabel,hoverdistance:xe.hoverdistance}),dr=ir.hoverLabels;if(p.isUnifiedHover(De)||(function($t,mn,Ln,En){var jn,$n,Zn,Qn,hr,tn,Pn,jt=mn?"xa":"ya",Jt=mn?"ya":"xa",un=0,Rn=1,On=$t.size(),Sn=new Array(On),pn=0,bn=En.minX,dn=En.maxX,vn=En.minY,An=En.maxY,Bn=function(Mr){return Mr*Ln._invScaleX},Xn=function(Mr){return Mr*Ln._invScaleY};function er(Mr){var Lr=Mr[0],pr=Mr[Mr.length-1];if($n=Lr.pmin-Lr.pos-Lr.dp+Lr.size,Zn=pr.pos+pr.dp+pr.size-Lr.pmax,$n>.01){for(hr=Mr.length-1;hr>=0;hr--)Mr[hr].dp+=$n;jn=!1}if(!(Zn<.01)){if($n<-.01){for(hr=Mr.length-1;hr>=0;hr--)Mr[hr].dp-=Zn;jn=!1}if(jn){var Pr=0;for(Qn=0;QnLr.pmax&&Pr++;for(Qn=Mr.length-1;Qn>=0&&!(Pr<=0);Qn--)(tn=Mr[Qn]).pos>Lr.pmax-1&&(tn.del=!0,Pr--);for(Qn=0;Qn=0;hr--)Mr[hr].dp-=Zn;for(Qn=Mr.length-1;Qn>=0&&!(Pr<=0);Qn--)(tn=Mr[Qn]).pos+tn.dp+tn.size>Lr.pmax&&(tn.del=!0,Pr--)}}}for($t.each(function(Mr){var Lr=Mr[jt],pr=Mr[Jt],Pr=Lr._id.charAt(0)==="x",Hr=Lr.range;pn===0&&Hr&&Hr[0]>Hr[1]!==Pr&&(Rn=-1);var ci=0,Ti=Pr?Ln.width:Ln.height;if(Ln.hovermode==="x"||Ln.hovermode==="y"){var Mi,fa,Hi=U(Mr,mn),xi=Mr.anchor,Oa=xi==="end"?-1:1;if(xi==="middle")fa=(Mi=Mr.crossPos+(Pr?Xn(Hi.y-Mr.by/2):Bn(Mr.bx/2+Mr.tx2width/2)))+(Pr?Xn(Mr.by):Bn(Mr.bx));else if(Pr)fa=(Mi=Mr.crossPos+Xn(h+Hi.y)-Xn(Mr.by/2-h))+Xn(Mr.by);else{var Ka=Bn(Oa*h+Hi.x),Yo=Ka+Bn(Oa*Mr.bx);Mi=Mr.crossPos+Math.min(Ka,Yo),fa=Mr.crossPos+Math.max(Ka,Yo)}Pr?vn!==void 0&&An!==void 0&&Math.min(fa,An)-Math.max(Mi,vn)>1&&(pr.side==="left"?(ci=pr._mainLinePosition,Ti=Ln.width):Ti=pr._mainLinePosition):bn!==void 0&&dn!==void 0&&Math.min(fa,dn)-Math.max(Mi,bn)>1&&(pr.side==="top"?(ci=pr._mainLinePosition,Ti=Ln.height):Ti=pr._mainLinePosition)}Sn[pn++]=[{datum:Mr,traceIndex:Mr.trace.index,dp:0,pos:Mr.pos,posref:Mr.posref,size:Mr.by*(Pr?g:1)/2,pmin:ci,pmax:Ti}]}),Sn.sort(function(Mr,Lr){return Mr[0].posref-Lr[0].posref||Rn*(Lr[0].traceIndex-Mr[0].traceIndex)});!jn&&un<=On;){for(un++,jn=!0,Qn=0;Qn.01&&sr.pmin===fr.pmin&&sr.pmax===fr.pmax){for(hr=lr.length-1;hr>=0;hr--)lr[hr].dp+=$n;for(Jn.push.apply(Jn,lr),Sn.splice(Qn+1,1),Pn=0,hr=Jn.length-1;hr>=0;hr--)Pn+=Jn[hr].dp;for(Zn=Pn/Jn.length,hr=Jn.length-1;hr>=0;hr--)Jn[hr].dp-=Zn;jn=!1}else Qn++}Sn.forEach(er)}for(Qn=Sn.length-1;Qn>=0;Qn--){var cr=Sn[Qn];for(hr=cr.length-1;hr>=0;hr--){var vr=cr[hr],Sr=vr.datum;Sr.offset=vr.dp,Sr.del=vr.del}}}(dr,kr,xe,ir.commonLabelBoundingBox),B(dr,kr,xe._invScaleX,xe._invScaleY)),de&&de.tagName){var yr=u.getComponentMethod("annotations","hasClickToShow")(se,kn);i(_.select(de),yr?"pointer":"")}de&&!pe&&function($t,mn,Ln){if(!Ln||Ln.length!==$t._hoverdata.length)return!0;for(var En=Ln.length-1;En>=0;En--){var jn=Ln[En],$n=$t._hoverdata[En];if(jn.curveNumber!==$n.curveNumber||String(jn.pointNumber)!==String($n.pointNumber)||String(jn.pointNumbers)!==String($n.pointNumbers))return!0}return!1}(se,0,ln)&&(ln&&se.emit("plotly_unhover",{event:fe,points:ln}),se.emit("plotly_hover",{event:fe,points:se._hoverdata,xaxes:ne,yaxes:ue,xvals:be,yvals:Se}))})(Y,K,te,ae,oe)})},E.loneHover=function(Y,K){var te=!0;Array.isArray(Y)||(te=!1,Y=[Y]);var ae=K.gd,oe=ee(ae),se=Q(ae),fe=I(Y.map(function(de){var he=de._x0||de.x0||de.x||0,xe=de._x1||de.x1||de.x||0,Re=de._y0||de.y0||de.y||0,we=de._y1||de.y1||de.y||0,Ae=de.eventData;if(Ae){var Me=Math.min(he,xe),Ce=Math.max(he,xe),ne=Math.min(Re,we),ue=Math.max(Re,we),me=de.trace;if(u.traceIs(me,"gl3d")){var Te=ae._fullLayout[me.scene]._scene.container,Ee=Te.offsetLeft,Ue=Te.offsetTop;Me+=Ee,Ce+=Ee,ne+=Ue,ue+=Ue}Ae.bbox={x0:Me+se,x1:Ce+se,y0:ne+oe,y1:ue+oe},K.inOut_bbox&&K.inOut_bbox.push(Ae.bbox)}else Ae=!1;return{color:de.color||n.defaultLine,x0:de.x0||de.x||0,x1:de.x1||de.x||0,y0:de.y0||de.y||0,y1:de.y1||de.y||0,xLabel:de.xLabel,yLabel:de.yLabel,zLabel:de.zLabel,text:de.text,name:de.name,idealAlign:de.idealAlign,borderColor:de.borderColor,fontFamily:de.fontFamily,fontSize:de.fontSize,fontColor:de.fontColor,nameLength:de.nameLength,textAlign:de.textAlign,trace:de.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:de.hovertemplate||!1,hovertemplateLabels:de.hovertemplateLabels||!1,eventData:Ae}}),{gd:ae,hovermode:"closest",rotateLabels:!1,bgColor:K.bgColor||n.background,container:_.select(K.container),outerContainer:K.outerContainer||K.container}).hoverLabels,ye=0,pe=0;return fe.sort(function(de,he){return de.y0-he.y0}).each(function(de,he){var xe=de.y0-de.by/2;de.offset=xe-5([\s\S]*)<\/extra>/;function I(Y,K){var te=K.gd,ae=te._fullLayout,oe=K.hovermode,se=K.rotateLabels,fe=K.bgColor,ye=K.container,pe=K.outerContainer,de=K.commonLabelOpts||{};if(Y.length===0)return[[]];var he=K.fontFamily||c.HOVERFONT,xe=K.fontSize||c.HOVERFONTSIZE,Re=Y[0],we=Re.xa,Ae=Re.ya,Me=oe.charAt(0),Ce=Me+"Label",ne=Re[Ce];if(ne===void 0&&we.type==="multicategory")for(var ue=0;ueae.width-wn?(yn=ae.width-wn,Bt.attr("d","M"+(wn-h)+",0L"+wn+","+Wn+h+"v"+Wn+(2*M+kn.height)+"H-"+wn+"V"+Wn+h+"H"+(wn-2*h)+"Z")):Bt.attr("d","M0,0L"+h+","+Wn+h+"H"+wn+"v"+Wn+(2*M+kn.height)+"H-"+wn+"V"+Wn+h+"H-"+h+"Z"),Ye.minX=yn-wn,Ye.maxX=yn+wn,we.side==="top"?(Ye.minY=ln-(2*M+kn.height),Ye.maxY=ln-M):(Ye.minY=ln+M,Ye.maxY=ln+(2*M+kn.height))}else{var on,_n,fn;Ae.side==="right"?(on="start",_n=1,fn="",yn=we._offset+we._length):(on="end",_n=-1,fn="-",yn=we._offset),ln=Ae._offset+(Re.y0+Re.y1)/2,Wt.attr("text-anchor",on),Bt.attr("d","M0,0L"+fn+h+","+h+"V"+(M+kn.height/2)+"h"+fn+(2*M+kn.width)+"V-"+(M+kn.height/2)+"H"+fn+h+"V-"+h+"Z"),Ye.minY=ln-(M+kn.height/2),Ye.maxY=ln+(M+kn.height/2),Ae.side==="right"?(Ye.minX=yn+h,Ye.maxX=yn+h+(2*M+kn.width)):(Ye.minX=yn-h-(2*M+kn.width),Ye.maxX=yn-h);var hn,In=kn.height/2,Cn=Te-kn.top-In,Nn="clip"+ae._uid+"commonlabel"+Ae._id;if(yn=0?Ke:Ge+Oe=0?Ge:mt+Oe=0?Nt:Je+Be=0?Je:Ot+Be=0,Pt.idealAlign!=="top"&&tr||!kr?tr?(In+=Nn/2,Pt.anchor="start"):Pt.anchor="middle":(In-=Nn/2,Pt.anchor="end"),Pt.crossPos=In;else{if(Pt.pos=In,tr=hn+Cn/2+gr<=Ee,kr=hn-Cn/2-gr>=0,Pt.idealAlign!=="left"&&tr||!kr)if(tr)hn+=Cn/2,Pt.anchor="start";else{Pt.anchor="middle";var ir=gr/2,dr=hn+ir-Ee,yr=hn-ir;dr>0&&(hn-=dr),yr<0&&(hn+=-yr)}else hn-=Cn/2,Pt.anchor="end";Pt.crossPos=hn}Wn.attr("text-anchor",Pt.anchor),on&&wn.attr("text-anchor",Pt.anchor),Bt.attr("transform",y(hn,In)+(se?f(v):""))}),{hoverLabels:_t,commonLabelBoundingBox:Ye}}function R(Y,K,te,ae,oe,se){var fe="",ye="";Y.nameOverride!==void 0&&(Y.name=Y.nameOverride),Y.name&&(Y.trace._meta&&(Y.name=T.templateString(Y.name,Y.trace._meta)),fe=V(Y.name,Y.nameLength));var pe=te.charAt(0),de=pe==="x"?"y":"x";Y.zLabel!==void 0?(Y.xLabel!==void 0&&(ye+="x: "+Y.xLabel+"
"),Y.yLabel!==void 0&&(ye+="y: "+Y.yLabel+"
"),Y.trace.type!=="choropleth"&&Y.trace.type!=="choroplethmapbox"&&(ye+=(ye?"z: ":"")+Y.zLabel)):K&&Y[pe+"Label"]===oe?ye=Y[de+"Label"]||"":Y.xLabel===void 0?Y.yLabel!==void 0&&Y.trace.type!=="scattercarpet"&&(ye=Y.yLabel):ye=Y.yLabel===void 0?Y.xLabel:"("+Y.xLabel+", "+Y.yLabel+")",!Y.text&&Y.text!==0||Array.isArray(Y.text)||(ye+=(ye?"
":"")+Y.text),Y.extraText!==void 0&&(ye+=(ye?"
":"")+Y.extraText),se&&ye===""&&!Y.hovertemplate&&(fe===""&&se.remove(),ye=fe);var he=Y.hovertemplate||!1;if(he){var xe=Y.hovertemplateLabels||Y;Y[pe+"Label"]!==oe&&(xe[pe+"other"]=xe[pe+"Val"],xe[pe+"otherLabel"]=xe[pe+"Label"]),ye=(ye=T.hovertemplateString(he,xe,ae._d3locale,Y.eventData[0]||{},Y.trace._meta)).replace(O,function(Re,we){return fe=V(we,Y.nameLength),""})}return[ye,fe]}function U(Y,K){var te=0,ae=Y.offset;return K&&(ae*=-k,te=Y.offset*m),{x:te,y:ae}}function B(Y,K,te,ae){var oe=function(fe){return fe*te},se=function(fe){return fe*ae};Y.each(function(fe){var ye=_.select(this);if(fe.del)return ye.remove();var pe,de,he,xe,Re=ye.select("text.nums"),we=fe.anchor,Ae=we==="end"?-1:1,Me=(xe=(he=(de={start:1,end:-1,middle:0}[(pe=fe).anchor])*(h+M))+de*(pe.txwidth+M),pe.anchor==="middle"&&(he-=pe.tx2width/2,xe+=pe.txwidth/2+M),{alignShift:de,textShiftX:he,text2ShiftX:xe}),Ce=U(fe,K),ne=Ce.x,ue=Ce.y,me=we==="middle";ye.select("path").attr("d",me?"M-"+oe(fe.bx/2+fe.tx2width/2)+","+se(ue-fe.by/2)+"h"+oe(fe.bx)+"v"+se(fe.by)+"h-"+oe(fe.bx)+"Z":"M0,0L"+oe(Ae*h+ne)+","+se(h+ue)+"v"+se(fe.by/2-h)+"h"+oe(Ae*fe.bx)+"v-"+se(fe.by)+"H"+oe(Ae*h+ne)+"V"+se(ue-h)+"Z");var Te=ne+Me.textShiftX,Ee=ue+fe.ty0-fe.by/2+M,Ue=fe.textAlign||"auto";Ue!=="auto"&&(Ue==="left"&&we!=="start"?(Re.attr("text-anchor","start"),Te=me?-fe.bx/2-fe.tx2width/2+M:-fe.bx-M):Ue==="right"&&we!=="end"&&(Re.attr("text-anchor","end"),Te=me?fe.bx/2-fe.tx2width/2-M:fe.bx+M)),Re.call(t.positionText,oe(Te),se(Ee)),fe.tx2width&&(ye.select("text.name").call(t.positionText,oe(Me.text2ShiftX+Me.alignShift*M+ne),se(ue+fe.ty0-fe.by/2+M)),ye.select("rect").call(r.setRect,oe(Me.text2ShiftX+(Me.alignShift-1)*fe.tx2width/2+ne),se(ue-fe.by/2-1),oe(fe.tx2width),se(fe.by+2)))})}function G(Y,K){var te=Y.index,ae=Y.trace||{},oe=Y.cd[0],se=Y.cd[te]||{};function fe(Re){return Re||w(Re)&&Re===0}var ye=Array.isArray(te)?function(Re,we){var Ae=T.castOption(oe,te,Re);return fe(Ae)?Ae:T.extractOption({},ae,"",we)}:function(Re,we){return T.extractOption(se,ae,Re,we)};function pe(Re,we,Ae){var Me=ye(we,Ae);fe(Me)&&(Y[Re]=Me)}if(pe("hoverinfo","hi","hoverinfo"),pe("bgcolor","hbg","hoverlabel.bgcolor"),pe("borderColor","hbc","hoverlabel.bordercolor"),pe("fontFamily","htf","hoverlabel.font.family"),pe("fontSize","hts","hoverlabel.font.size"),pe("fontColor","htc","hoverlabel.font.color"),pe("nameLength","hnl","hoverlabel.namelength"),pe("textAlign","hta","hoverlabel.align"),Y.posref=K==="y"||K==="closest"&&ae.orientation==="h"?Y.xa._offset+(Y.x0+Y.x1)/2:Y.ya._offset+(Y.y0+Y.y1)/2,Y.x0=T.constrain(Y.x0,0,Y.xa._length),Y.x1=T.constrain(Y.x1,0,Y.xa._length),Y.y0=T.constrain(Y.y0,0,Y.ya._length),Y.y1=T.constrain(Y.y1,0,Y.ya._length),Y.xLabelVal!==void 0&&(Y.xLabel="xLabel"in Y?Y.xLabel:a.hoverLabelText(Y.xa,Y.xLabelVal,ae.xhoverformat),Y.xVal=Y.xa.c2d(Y.xLabelVal)),Y.yLabelVal!==void 0&&(Y.yLabel="yLabel"in Y?Y.yLabel:a.hoverLabelText(Y.ya,Y.yLabelVal,ae.yhoverformat),Y.yVal=Y.ya.c2d(Y.yLabelVal)),Y.zLabelVal!==void 0&&Y.zLabel===void 0&&(Y.zLabel=String(Y.zLabelVal)),!(isNaN(Y.xerr)||Y.xa.type==="log"&&Y.xerr<=0)){var de=a.tickText(Y.xa,Y.xa.c2l(Y.xerr),"hover").text;Y.xerrneg!==void 0?Y.xLabel+=" +"+de+" / -"+a.tickText(Y.xa,Y.xa.c2l(Y.xerrneg),"hover").text:Y.xLabel+=" ± "+de,K==="x"&&(Y.distance+=1)}if(!(isNaN(Y.yerr)||Y.ya.type==="log"&&Y.yerr<=0)){var he=a.tickText(Y.ya,Y.ya.c2l(Y.yerr),"hover").text;Y.yerrneg!==void 0?Y.yLabel+=" +"+he+" / -"+a.tickText(Y.ya,Y.ya.c2l(Y.yerrneg),"hover").text:Y.yLabel+=" ± "+he,K==="y"&&(Y.distance+=1)}var xe=Y.hoverinfo||Y.trace.hoverinfo;return xe&&xe!=="all"&&((xe=Array.isArray(xe)?xe:xe.split("+")).indexOf("x")===-1&&(Y.xLabel=void 0),xe.indexOf("y")===-1&&(Y.yLabel=void 0),xe.indexOf("z")===-1&&(Y.zLabel=void 0),xe.indexOf("text")===-1&&(Y.text=void 0),xe.indexOf("name")===-1&&(Y.name=void 0)),Y}function N(Y,K,te){var ae,oe,se=te.container,fe=te.fullLayout,ye=fe._size,pe=te.event,de=!!K.hLinePoint,he=!!K.vLinePoint;if(se.selectAll(".spikeline").remove(),he||de){var xe=n.combine(fe.plot_bgcolor,fe.paper_bgcolor);if(de){var Re,we,Ae=K.hLinePoint;ae=Ae&&Ae.xa,(oe=Ae&&Ae.ya).spikesnap==="cursor"?(Re=pe.pointerX,we=pe.pointerY):(Re=ae._offset+Ae.x,we=oe._offset+Ae.y);var Me,Ce,ne=s.readability(Ae.color,xe)<1.5?n.contrast(xe):Ae.color,ue=oe.spikemode,me=oe.spikethickness,Te=oe.spikecolor||ne,Ee=a.getPxPosition(Y,oe);if(ue.indexOf("toaxis")!==-1||ue.indexOf("across")!==-1){if(ue.indexOf("toaxis")!==-1&&(Me=Ee,Ce=Re),ue.indexOf("across")!==-1){var Ue=oe._counterDomainMin,De=oe._counterDomainMax;oe.anchor==="free"&&(Ue=Math.min(Ue,oe.position),De=Math.max(De,oe.position)),Me=ye.l+Ue*ye.w,Ce=ye.l+De*ye.w}se.insert("line",":first-child").attr({x1:Me,x2:Ce,y1:we,y2:we,"stroke-width":me,stroke:Te,"stroke-dasharray":r.dashStyle(oe.spikedash,me)}).classed("spikeline",!0).classed("crisp",!0),se.insert("line",":first-child").attr({x1:Me,x2:Ce,y1:we,y2:we,"stroke-width":me+2,stroke:xe}).classed("spikeline",!0).classed("crisp",!0)}ue.indexOf("marker")!==-1&&se.insert("circle",":first-child").attr({cx:Ee+(oe.side!=="right"?me:-me),cy:we,r:me,fill:Te}).classed("spikeline",!0)}if(he){var je,ge,be=K.vLinePoint;ae=be&&be.xa,oe=be&&be.ya,ae.spikesnap==="cursor"?(je=pe.pointerX,ge=pe.pointerY):(je=ae._offset+be.x,ge=oe._offset+be.y);var Se,Ne,Ye=s.readability(be.color,xe)<1.5?n.contrast(xe):be.color,Ze=ae.spikemode,st=ae.spikethickness,ot=ae.spikecolor||Ye,ft=a.getPxPosition(Y,ae);if(Ze.indexOf("toaxis")!==-1||Ze.indexOf("across")!==-1){if(Ze.indexOf("toaxis")!==-1&&(Se=ft,Ne=ge),Ze.indexOf("across")!==-1){var yt=ae._counterDomainMin,Et=ae._counterDomainMax;ae.anchor==="free"&&(yt=Math.min(yt,ae.position),Et=Math.max(Et,ae.position)),Se=ye.t+(1-Et)*ye.h,Ne=ye.t+(1-yt)*ye.h}se.insert("line",":first-child").attr({x1:je,x2:je,y1:Se,y2:Ne,"stroke-width":st,stroke:ot,"stroke-dasharray":r.dashStyle(ae.spikedash,st)}).classed("spikeline",!0).classed("crisp",!0),se.insert("line",":first-child").attr({x1:je,x2:je,y1:Se,y2:Ne,"stroke-width":st+2,stroke:xe}).classed("spikeline",!0).classed("crisp",!0)}Ze.indexOf("marker")!==-1&&se.insert("circle",":first-child").attr({cx:je,cy:ft-(ae.side!=="top"?st:-st),r:st,fill:ot}).classed("spikeline",!0)}}}function j(Y,K){return!K||K.vLinePoint!==Y._spikepoints.vLinePoint||K.hLinePoint!==Y._spikepoints.hLinePoint}function V(Y,K){return t.plainText(Y||"",{len:K,allowedTags:["br","sub","sup","b","i","em"]})}function H(Y,K,te){var ae=K[Y+"a"],oe=K[Y+"Val"],se=K.cd[0];if(ae.type==="category"||ae.type==="multicategory")oe=ae._categoriesMap[oe];else if(ae.type==="date"){var fe=K.trace[Y+"periodalignment"];if(fe){var ye=K.cd[K.index],pe=ye[Y+"Start"];pe===void 0&&(pe=ye[Y]);var de=ye[Y+"End"];de===void 0&&(de=ye[Y]);var he=de-pe;fe==="end"?oe+=he:fe==="middle"&&(oe+=he/2)}oe=ae.d2c(oe)}return se&&se.t&&se.t.posLetter===ae._id&&(te.boxmode!=="group"&&te.violinmode!=="group"||(oe+=se.t.dPos)),oe}function ee(Y){return Y.offsetTop+Y.clientTop}function Q(Y){return Y.offsetLeft+Y.clientLeft}function X(Y,K){var te=Y._fullLayout,ae=K.getBoundingClientRect(),oe=ae.left,se=ae.top,fe=oe+ae.width,ye=se+ae.height,pe=T.apply3DTransform(te._invTransform)(oe,se),de=T.apply3DTransform(te._invTransform)(fe,ye),he=pe[0],xe=pe[1],Re=de[0],we=de[1];return{x:he,y:xe,width:Re-he,height:we-xe,top:Math.min(xe,we),left:Math.min(he,Re),right:Math.max(he,Re),bottom:Math.max(xe,we)}}},38048:function(D,E,e){var _=e(71828),w=e(7901),s=e(23469).isUnifiedHover;D.exports=function(T,y,f,l){l=l||{};var t=y.legend;function i(r){l.font[r]||(l.font[r]=t?y.legend.font[r]:y.font[r])}y&&s(y.hovermode)&&(l.font||(l.font={}),i("size"),i("family"),i("color"),t?(l.bgcolor||(l.bgcolor=w.combine(y.legend.bgcolor,y.paper_bgcolor)),l.bordercolor||(l.bordercolor=y.legend.bordercolor)):l.bgcolor||(l.bgcolor=y.paper_bgcolor)),f("hoverlabel.bgcolor",l.bgcolor),f("hoverlabel.bordercolor",l.bordercolor),f("hoverlabel.namelength",l.namelength),_.coerceFont(f,"hoverlabel.font",l.font),f("hoverlabel.align",l.align)}},98212:function(D,E,e){var _=e(71828),w=e(528);D.exports=function(s,T){function y(f,l){return T[f]!==void 0?T[f]:_.coerce(s,T,w,f,l)}return y("clickmode"),y("hovermode")}},30211:function(D,E,e){var _=e(39898),w=e(71828),s=e(28569),T=e(23469),y=e(528),f=e(88335);D.exports={moduleType:"component",name:"fx",constants:e(26675),schema:{layout:y},attributes:e(77914),layoutAttributes:y,supplyLayoutGlobalDefaults:e(22774),supplyDefaults:e(54268),supplyLayoutDefaults:e(34938),calc:e(30732),getDistanceFunction:T.getDistanceFunction,getClosest:T.getClosest,inbox:T.inbox,quadrature:T.quadrature,appendArrayPointValue:T.appendArrayPointValue,castHoverOption:function(l,t,i){return w.castOption(l,t,"hoverlabel."+i)},castHoverinfo:function(l,t,i){return w.castOption(l,i,"hoverinfo",function(r){return w.coerceHoverinfo({hoverinfo:r},{_module:l._module},t)})},hover:f.hover,unhover:s.unhover,loneHover:f.loneHover,loneUnhover:function(l){var t=w.isD3Selection(l)?l:_.select(l);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()},click:e(75914)}},528:function(D,E,e){var _=e(26675),w=e(41940),s=w({editType:"none"});s.family.dflt=_.HOVERFONT,s.size.dflt=_.HOVERFONTSIZE,D.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"},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:s,grouptitlefont:w({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"}}},34938:function(D,E,e){var _=e(71828),w=e(528),s=e(98212),T=e(38048);D.exports=function(y,f){function l(n,o){return _.coerce(y,f,w,n,o)}s(y,f)&&(l("hoverdistance"),l("spikedistance")),l("dragmode")==="select"&&l("selectdirection");var t=f._has("mapbox"),i=f._has("geo"),r=f._basePlotModules.length;f.dragmode==="zoom"&&((t||i)&&r===1||t&&i&&r===2)&&(f.dragmode="pan"),T(y,f,l),_.coerceFont(l,"hoverlabel.grouptitlefont",f.hoverlabel.font)}},22774:function(D,E,e){var _=e(71828),w=e(38048),s=e(528);D.exports=function(T,y){w(T,y,function(f,l){return _.coerce(T,y,s,f,l)})}},83312:function(D,E,e){var _=e(71828),w=e(30587).counter,s=e(27670).Y,T=e(85555).idRegex,y=e(44467),f={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:[w("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[T.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[T.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:s({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 l(r,n,o){var a=n[o+"axes"],u=Object.keys((r._splomAxes||{})[o]||{});return Array.isArray(a)?a:u.length?u:void 0}function t(r,n,o,a,u,p){var c=n(r+"gap",o),b=n("domain."+r);n(r+"side",a);for(var d=new Array(u),v=b[0],x=(b[1]-v)/(u-c),g=x*(1-c),m=0;m1){b||d||v||O("pattern")==="independent"&&(b=!0),g._hasSubplotGrid=b;var h,M,A=O("roworder")==="top to bottom",C=b?.2:.1,L=b?.3:.1;x&&n._splomGridDflt&&(h=n._splomGridDflt.xside,M=n._splomGridDflt.yside),g._domains={x:t("x",O,C,h,k),y:t("y",O,L,M,m,A)}}else delete n.grid}function O(I,R){return _.coerce(o,g,f,I,R)}},contentDefaults:function(r,n){var o=n.grid;if(o&&o._domains){var a,u,p,c,b,d,v,x=r.grid||{},g=n._subplots,m=o._hasSubplotGrid,k=o.rows,h=o.columns,M=o.pattern==="independent",A=o._axisMap={};if(m){var C=x.subplots||[];d=o.subplots=new Array(k);var L=1;for(a=0;a1);if(M===!1&&(n.legend=void 0),(M!==!1||a.uirevision)&&(p("uirevision",n.uirevision),M!==!1)){p("borderwidth");var A,C,L,O=p("orientation")==="h";if(O?(A=0,_.getComponentMethod("rangeslider","isVisible")(r.xaxis)?(C=1.1,L="bottom"):(C=-.1,L="top")):(A=1.02,C=1,L="auto"),p("traceorder",k),l.isGrouped(n.legend)&&p("tracegroupgap"),p("entrywidth"),p("entrywidthmode"),p("itemsizing"),p("itemwidth"),p("itemclick"),p("itemdoubleclick"),p("groupclick"),p("x",A),p("xanchor"),p("y",C),p("yanchor",L),p("valign"),w.noneOrAll(a,u,["x","y"]),p("title.text")){p("title.side",O?"left":"top");var I=w.extendFlat({},c,{size:w.bigFont(c.size)});w.coerceFont(p,"title.font",I)}}}}D.exports=function(i,r,n){var o,a=["legend"];for(o=0;o1)}var ee=N.hiddenlabels||[];if(!(V||N.showlegend&&H.length))return B.selectAll("."+j).remove(),N._topdefs.select("#"+U).remove(),s.autoMargin(I,j);var Q=w.ensureSingle(B,"g",j,function(ye){V||ye.attr("pointer-events","all")}),X=w.ensureSingleById(N._topdefs,"clipPath",U,function(ye){ye.append("rect")}),Y=w.ensureSingle(Q,"rect","bg",function(ye){ye.attr("shape-rendering","crispEdges")});Y.call(t.stroke,G.bordercolor).call(t.fill,G.bgcolor).style("stroke-width",G.borderwidth+"px");var K=w.ensureSingle(Q,"g","scrollbox"),te=G.title;if(G._titleWidth=0,G._titleHeight=0,te.text){var ae=w.ensureSingle(K,"text",j+"titletext");ae.attr("text-anchor","start").call(l.font,te.font).text(te.text),A(ae,K,I,G,1)}else K.selectAll("."+j+"titletext").remove();var oe=w.ensureSingle(Q,"rect","scrollbar",function(ye){ye.attr(n.scrollBarEnterAttrs).call(t.fill,n.scrollBarColor)}),se=K.selectAll("g.groups").data(H);se.enter().append("g").attr("class","groups"),se.exit().remove();var fe=se.selectAll("g.traces").data(w.identity);fe.enter().append("g").attr("class","traces"),fe.exit().remove(),fe.style("opacity",function(ye){var pe=ye[0].trace;return T.traceIs(pe,"pie-like")?ee.indexOf(ye[0].label)!==-1?.5:1:pe.visible==="legendonly"?.5:1}).each(function(){_.select(this).call(k,I,G)}).call(b,I,G).each(function(){V||_.select(this).call(M,I,j)}),w.syncOrAsync([s.previousPromises,function(){return function(ye,pe,de,he){var xe=ye._fullLayout,Re=O(he);he||(he=xe[Re]);var we=xe._size,Ae=d.isVertical(he),Me=d.isGrouped(he),Ce=he.entrywidthmode==="fraction",ne=he.borderwidth,ue=2*ne,me=n.itemGap,Te=he.itemwidth+2*me,Ee=2*(ne+me),Ue=L(he),De=he.y<0||he.y===0&&Ue==="top",je=he.y>1||he.y===1&&Ue==="bottom",ge=he.tracegroupgap,be={};he._maxHeight=Math.max(De||je?xe.height/2:we.h,30);var Se=0;he._width=0,he._height=0;var Ne=function(Oe){var Be=0,Qe=0,ut=Oe.title.side;return ut&&(ut.indexOf("left")!==-1&&(Be=Oe._titleWidth),ut.indexOf("top")!==-1&&(Qe=Oe._titleHeight)),[Be,Qe]}(he);if(Ae)de.each(function(Oe){var Be=Oe[0].height;l.setTranslate(this,ne+Ne[0],ne+Ne[1]+he._height+Be/2+me),he._height+=Be,he._width=Math.max(he._width,Oe[0].width)}),Se=Te+he._width,he._width+=me+Te+ue,he._height+=Ee,Me&&(pe.each(function(Oe,Be){l.setTranslate(this,0,Be*he.tracegroupgap)}),he._height+=(he._lgroupsLength-1)*he.tracegroupgap);else{var Ye=C(he),Ze=he.x<0||he.x===0&&Ye==="right",st=he.x>1||he.x===1&&Ye==="left",ot=je||De,ft=xe.width/2;he._maxWidth=Math.max(Ze?ot&&Ye==="left"?we.l+we.w:ft:st?ot&&Ye==="right"?we.r+we.w:ft:we.w,2*Te);var yt=0,Et=0;de.each(function(Oe){var Be=g(Oe,he,Te);yt=Math.max(yt,Be),Et+=Be}),Se=null;var Tt=0;if(Me){var xt=0,Dt=0,It=0;pe.each(function(){var Oe=0,Be=0;_.select(this).selectAll("g.traces").each(function(ut){var pt=g(ut,he,Te),bt=ut[0].height;l.setTranslate(this,Ne[0],Ne[1]+ne+me+bt/2+Be),Be+=bt,Oe=Math.max(Oe,pt),be[ut[0].trace.legendgroup]=Oe});var Qe=Oe+me;Dt>0&&Qe+ne+Dt>he._maxWidth?(Tt=Math.max(Tt,Dt),Dt=0,It+=xt+ge,xt=Be):xt=Math.max(xt,Be),l.setTranslate(this,Dt,It),Dt+=Qe}),he._width=Math.max(Tt,Dt)+ne,he._height=It+xt+Ee}else{var Ft=de.size(),qt=Et+ue+(Ft-1)*me=he._maxWidth&&(Tt=Math.max(Tt,Ge),Je=0,Ke+=Nt,he._height+=Nt,Nt=0),l.setTranslate(this,Ne[0]+ne+Je,Ne[1]+ne+Ke+Be/2+me),Ge=Je+Qe+me,Je+=ut,Nt=Math.max(Nt,Be)}),qt?(he._width=Je+ue,he._height=Nt+Ee):(he._width=Math.max(Tt,Ge)+ue,he._height+=Nt+Ee)}}he._width=Math.ceil(Math.max(he._width+Ne[0],he._titleWidth+2*(ne+n.titlePad))),he._height=Math.ceil(Math.max(he._height+Ne[1],he._titleHeight+2*(ne+n.itemGap))),he._effHeight=Math.min(he._height,he._maxHeight);var nt=ye._context.edits,ht=nt.legendText||nt.legendPosition;de.each(function(Oe){var Be=_.select(this).select("."+Re+"toggle"),Qe=Oe[0].height,ut=Oe[0].trace.legendgroup,pt=g(Oe,he,Te);Me&&ut!==""&&(pt=be[ut]);var bt=ht?Te:Se||pt;Ae||Ce||(bt+=me/2),l.setRect(Be,0,-Qe/2,bt,Qe)})}(I,se,fe,G)},function(){var ye,pe,de,he,xe=N._size,Re=G.borderwidth;if(!V){var we=function(Ze,st){var ot=Ze._fullLayout[st],ft=C(ot),yt=L(ot);return s.autoMargin(Ze,st,{x:ot.x,y:ot.y,l:ot._width*u[ft],r:ot._width*p[ft],b:ot._effHeight*p[yt],t:ot._effHeight*u[yt]})}(I,j);if(we)return;var Ae=xe.l+xe.w*G.x-u[C(G)]*G._width,Me=xe.t+xe.h*(1-G.y)-u[L(G)]*G._effHeight;if(N.margin.autoexpand){var Ce=Ae,ne=Me;Ae=w.constrain(Ae,0,N.width-G._width),Me=w.constrain(Me,0,N.height-G._effHeight),Ae!==Ce&&w.log("Constrain "+j+".x to make legend fit inside graph"),Me!==ne&&w.log("Constrain "+j+".y to make legend fit inside graph")}l.setTranslate(Q,Ae,Me)}if(oe.on(".drag",null),Q.on("wheel",null),V||G._height<=G._maxHeight||I._context.staticPlot){var ue=G._effHeight;V&&(ue=G._height),Y.attr({width:G._width-Re,height:ue-Re,x:Re/2,y:Re/2}),l.setTranslate(K,0,0),X.select("rect").attr({width:G._width-2*Re,height:ue-2*Re,x:Re,y:Re}),l.setClipUrl(K,U,I),l.setRect(oe,0,0,0,0),delete G._scrollY}else{var me,Te,Ee,Ue=Math.max(n.scrollBarMinHeight,G._effHeight*G._effHeight/G._height),De=G._effHeight-Ue-2*n.scrollBarMargin,je=G._height-G._effHeight,ge=De/je,be=Math.min(G._scrollY||0,je);Y.attr({width:G._width-2*Re+n.scrollBarWidth+n.scrollBarMargin,height:G._effHeight-Re,x:Re/2,y:Re/2}),X.select("rect").attr({width:G._width-2*Re+n.scrollBarWidth+n.scrollBarMargin,height:G._effHeight-2*Re,x:Re,y:Re+be}),l.setClipUrl(K,U,I),Ye(be,Ue,ge),Q.on("wheel",function(){Ye(be=w.constrain(G._scrollY+_.event.deltaY/De*je,0,je),Ue,ge),be!==0&&be!==je&&_.event.preventDefault()});var Se=_.behavior.drag().on("dragstart",function(){var Ze=_.event.sourceEvent;me=Ze.type==="touchstart"?Ze.changedTouches[0].clientY:Ze.clientY,Ee=be}).on("drag",function(){var Ze=_.event.sourceEvent;Ze.buttons===2||Ze.ctrlKey||(Te=Ze.type==="touchmove"?Ze.changedTouches[0].clientY:Ze.clientY,be=function(st,ot,ft){var yt=(ft-ot)/ge+st;return w.constrain(yt,0,je)}(Ee,me,Te),Ye(be,Ue,ge))});oe.call(Se);var Ne=_.behavior.drag().on("dragstart",function(){var Ze=_.event.sourceEvent;Ze.type==="touchstart"&&(me=Ze.changedTouches[0].clientY,Ee=be)}).on("drag",function(){var Ze=_.event.sourceEvent;Ze.type==="touchmove"&&(Te=Ze.changedTouches[0].clientY,be=function(st,ot,ft){var yt=(ot-ft)/ge+st;return w.constrain(yt,0,je)}(Ee,me,Te),Ye(be,Ue,ge))});K.call(Ne)}function Ye(Ze,st,ot){G._scrollY=I._fullLayout[j]._scrollY=Ze,l.setTranslate(K,0,-Ze),l.setRect(oe,G._width,n.scrollBarMargin+Ze*ot,n.scrollBarWidth,st),X.select("rect").attr("y",Re+Ze)}I._context.edits.legendPosition&&(Q.classed("cursor-move",!0),f.init({element:Q.node(),gd:I,prepFn:function(){var Ze=l.getTranslate(Q);de=Ze.x,he=Ze.y},moveFn:function(Ze,st){var ot=de+Ze,ft=he+st;l.setTranslate(Q,ot,ft),ye=f.align(ot,G._width,xe.l,xe.l+xe.w,G.xanchor),pe=f.align(ft+G._height,-G._height,xe.t+xe.h,xe.t,G.yanchor)},doneFn:function(){if(ye!==void 0&&pe!==void 0){var Ze={};Ze[j+".x"]=ye,Ze[j+".y"]=pe,T.call("_guiRelayout",I,Ze)}},clickFn:function(Ze,st){var ot=se.selectAll("g.traces").filter(function(){var ft=this.getBoundingClientRect();return st.clientX>=ft.left&&st.clientX<=ft.right&&st.clientY>=ft.top&&st.clientY<=ft.bottom});ot.size()>0&&m(I,Q,ot,Ze,st)}}))}],I)}}function g(I,R,U){var B=I[0],G=B.width,N=R.entrywidthmode,j=B.trace.legendwidth||R.entrywidth;return N==="fraction"?R._maxWidth*j:U+(j||G)}function m(I,R,U,B,G){var N=U.data()[0][0].trace,j={event:G,node:U.node(),curveNumber:N.index,expandedIndex:N._expandedIndex,data:I.data,layout:I.layout,frames:I._transitionData._frames,config:I._context,fullData:I._fullData,fullLayout:I._fullLayout};N._group&&(j.group=N._group),T.traceIs(N,"pie-like")&&(j.label=U.datum()[0].label),y.triggerHandler(I,"plotly_legendclick",j)!==!1&&(B===1?R._clickTimeout=setTimeout(function(){I._fullLayout&&r(U,I,B)},I._context.doubleClickDelay):B===2&&(R._clickTimeout&&clearTimeout(R._clickTimeout),I._legendMouseDownTime=0,y.triggerHandler(I,"plotly_legenddoubleclick",j)!==!1&&r(U,I,B)))}function k(I,R,U){var B,G,N=O(U),j=I.data()[0][0],V=j.trace,H=T.traceIs(V,"pie-like"),ee=!U._inHover&&R._context.edits.legendText&&!H,Q=U._maxNameLength;j.groupTitle?(B=j.groupTitle.text,G=j.groupTitle.font):(G=U.font,U.entries?B=j.text:(B=H?j.label:V.name,V._meta&&(B=w.templateString(B,V._meta))));var X=w.ensureSingle(I,"text",N+"text");X.attr("text-anchor","start").call(l.font,G).text(ee?h(B,Q):B);var Y=U.itemwidth+2*n.itemGap;i.positionText(X,Y,0),ee?X.call(i.makeEditable,{gd:R,text:B}).call(A,I,R,U).on("edit",function(K){this.text(h(K,Q)).call(A,I,R,U);var te=j.trace._fullInput||{},ae={};if(T.hasTransform(te,"groupby")){var oe=T.getTransformIndices(te,"groupby"),se=oe[oe.length-1],fe=w.keyedContainer(te,"transforms["+se+"].styles","target","value.name");fe.set(j.trace._group,K),ae=fe.constructUpdate()}else ae.name=K;return T.call("_guiRestyle",R,ae,V.index)}):A(X,I,R,U)}function h(I,R){var U=Math.max(4,R);if(I&&I.trim().length>=U/2)return I;for(var B=U-(I=I||"").length;B>0;B--)I+=" ";return I}function M(I,R,U){var B,G=R._context.doubleClickDelay,N=1,j=w.ensureSingle(I,"rect",U+"toggle",function(V){R._context.staticPlot||V.style("cursor","pointer").attr("pointer-events","all"),V.call(t.fill,"rgba(0,0,0,0)")});R._context.staticPlot||(j.on("mousedown",function(){(B=new Date().getTime())-R._legendMouseDownTimeG&&(N=Math.max(N-1,1)),m(R,V,I,N,_.event)}}))}function A(I,R,U,B,G){B._inHover&&I.attr("data-notex",!0),i.convertToTspans(I,U,function(){(function(N,j,V,H){var ee=N.data()[0][0];if(V._inHover||!ee||ee.trace.showlegend){var Q=N.select("g[class*=math-group]"),X=Q.node(),Y=O(V);V||(V=j._fullLayout[Y]);var K,te,ae=V.borderwidth,oe=(H===1?V.title.font:ee.groupTitle?ee.groupTitle.font:V.font).size*a;if(X){var se=l.bBox(X);K=se.height,te=se.width,H===1?l.setTranslate(Q,ae,ae+.75*K):l.setTranslate(Q,0,.25*K)}else{var fe="."+Y+(H===1?"title":"")+"text",ye=N.select(fe),pe=i.lineCount(ye),de=ye.node();if(K=oe*pe,te=de?l.bBox(de).width:0,H===1)V.title.side==="left"&&(te+=2*n.itemGap),i.positionText(ye,ae+n.titlePad,ae+oe);else{var he=2*n.itemGap+V.itemwidth;ee.groupTitle&&(he=n.itemGap,te-=V.itemwidth),i.positionText(ye,he,-oe*((pe-1)/2-.3))}}H===1?(V._titleWidth=te,V._titleHeight=K):(ee.lineHeight=oe,ee.height=Math.max(K,16)+3,ee.width=te)}else N.remove()})(R,U,B,G)})}function C(I){return w.isRightAnchor(I)?"right":w.isCenterAnchor(I)?"center":"left"}function L(I){return w.isBottomAnchor(I)?"bottom":w.isMiddleAnchor(I)?"middle":"top"}function O(I){return I._id||"legend"}D.exports=function(I,R){if(R)x(I,R);else{var U=I._fullLayout,B=U._legends;U._infolayer.selectAll('[class^="legend"]').each(function(){var j=_.select(this),V=j.attr("class").split(" ")[0];V.match(v)&&B.indexOf(V)===-1&&j.remove()});for(var G=0;GL&&(C=L)}M[f][0]._groupMinRank=C,M[f][0]._preGroupSort=f}var O=function(G,N){return G.trace.legendrank-N.trace.legendrank||G._preSort-N._preSort};for(M.forEach(function(G,N){G[0]._preGroupSort=N}),M.sort(function(G,N){return G[0]._groupMinRank-N[0]._groupMinRank||G[0]._preGroupSort-N[0]._preGroupSort}),f=0;fb?b:p}D.exports=function(p,c,b){var d=c._fullLayout;b||(b=d.legend);var v=b.itemsizing==="constant",x=b.itemwidth,g=(x+2*n.itemGap)/2,m=T(g,0),k=function(A,C,L,O){var I;if(A+1)I=A;else{if(!(C&&C.width>0))return 0;I=C.width}return v?O:Math.min(I,L)};function h(A,C,L){var O=A[0].trace,I=O.marker||{},R=I.line||{},U=L?O.visible&&O.type===L:w.traceIs(O,"bar"),B=_.select(C).select("g.legendpoints").selectAll("path.legend"+L).data(U?[A]:[]);B.enter().append("path").classed("legend"+L,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",m),B.exit().remove(),B.each(function(G){var N=_.select(this),j=G[0],V=k(j.mlw,I.line,5,2);N.style("stroke-width",V+"px");var H=j.mcc;if(!b._inHover&&"mc"in j){var ee=l(I),Q=ee.mid;Q===void 0&&(Q=(ee.max+ee.min)/2),H=y.tryColorscale(I,"")(Q)}var X=H||j.mc||I.color,Y=I.pattern,K=Y&&y.getPatternAttr(Y.shape,0,"");if(K){var te=y.getPatternAttr(Y.bgcolor,0,null),ae=y.getPatternAttr(Y.fgcolor,0,null),oe=Y.fgopacity,se=u(Y.size,8,10),fe=u(Y.solidity,.5,1),ye="legend-"+O.uid;N.call(y.pattern,"legend",c,ye,K,se,fe,H,Y.fillmode,te,ae,oe)}else N.call(f.fill,X);V&&f.stroke(N,j.mlc||R.color)})}function M(A,C,L){var O=A[0],I=O.trace,R=L?I.visible&&I.type===L:w.traceIs(I,L),U=_.select(C).select("g.legendpoints").selectAll("path.legend"+L).data(R?[A]:[]);if(U.enter().append("path").classed("legend"+L,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",m),U.exit().remove(),U.size()){var B=(I.marker||{}).line,G=k(r(B.width,O.pts),B,5,2),N=s.minExtend(I,{marker:{line:{width:G}}});N.marker.line.color=B.color;var j=s.minExtend(O,{trace:N});i(U,j,N)}}p.each(function(A){var C=_.select(this),L=s.ensureSingle(C,"g","layers");L.style("opacity",A[0].trace.opacity);var O=b.valign,I=A[0].lineHeight,R=A[0].height;if(O!=="middle"&&I&&R){var U={top:1,bottom:-1}[O]*(.5*(I-R+3));L.attr("transform",T(0,U))}else L.attr("transform",null);L.selectAll("g.legendfill").data([A]).enter().append("g").classed("legendfill",!0),L.selectAll("g.legendlines").data([A]).enter().append("g").classed("legendlines",!0);var B=L.selectAll("g.legendsymbols").data([A]);B.enter().append("g").classed("legendsymbols",!0),B.selectAll("g.legendpoints").data([A]).enter().append("g").classed("legendpoints",!0)}).each(function(A){var C,L=A[0].trace,O=[];if(L.visible)switch(L.type){case"histogram2d":case"heatmap":O=[["M-15,-2V4H15V-2Z"]],C=!0;break;case"choropleth":case"choroplethmapbox":O=[["M-6,-6V6H6V-6Z"]],C=!0;break;case"densitymapbox":O=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],C="radial";break;case"cone":O=[["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":O=[["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":O=[["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":O=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],C=!1;break;case"volume":O=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],C=!0;break;case"isosurface":O=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],C=!1}var I=_.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(O);I.enter().append("path").classed("legend3dandfriends",!0).attr("transform",m).style("stroke-miterlimit",1),I.exit().remove(),I.each(function(R,U){var B,G=_.select(this),N=l(L),j=N.colorscale,V=N.reversescale;if(j){if(!C){var H=j.length;B=U===0?j[V?H-1:0][1]:U===1?j[V?0:H-1][1]:j[Math.floor((H-1)/2)][1]}}else{var ee=L.vertexcolor||L.facecolor||L.color;B=s.isArrayOrTypedArray(ee)?ee[U]||ee[0]:ee}G.attr("d",R[0]),B?G.call(f.fill,B):G.call(function(Q){if(Q.size()){var X="legendfill-"+L.uid;y.gradient(Q,c,X,o(V,C==="radial"),j,"fill")}})})}).each(function(A){var C=A[0].trace,L=C.type==="waterfall";if(A[0]._distinct&&L){var O=A[0].trace[A[0].dir].marker;return A[0].mc=O.color,A[0].mlw=O.line.width,A[0].mlc=O.line.color,h(A,this,"waterfall")}var I=[];C.visible&&L&&(I=A[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=_.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(I);R.enter().append("path").classed("legendwaterfall",!0).attr("transform",m).style("stroke-miterlimit",1),R.exit().remove(),R.each(function(U){var B=_.select(this),G=C[U[0]].marker,N=k(void 0,G.line,5,2);B.attr("d",U[1]).style("stroke-width",N+"px").call(f.fill,G.color),N&&B.call(f.stroke,G.line.color)})}).each(function(A){h(A,this,"funnel")}).each(function(A){h(A,this)}).each(function(A){var C=A[0].trace,L=_.select(this).select("g.legendpoints").selectAll("path.legendbox").data(C.visible&&w.traceIs(C,"box-violin")?[A]:[]);L.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",m),L.exit().remove(),L.each(function(){var O=_.select(this);if(C.boxpoints!=="all"&&C.points!=="all"||f.opacity(C.fillcolor)!==0||f.opacity((C.line||{}).color)!==0){var I=k(void 0,C.line,5,2);O.style("stroke-width",I+"px").call(f.fill,C.fillcolor),I&&f.stroke(O,C.line.color)}else{var R=s.minExtend(C,{marker:{size:v?12:s.constrain(C.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});L.call(y.pointStyle,R,c)}})}).each(function(A){M(A,this,"funnelarea")}).each(function(A){M(A,this,"pie")}).each(function(A){var C,L,O=a(A),I=O.showFill,R=O.showLine,U=O.showGradientLine,B=O.showGradientFill,G=O.anyFill,N=O.anyLine,j=A[0],V=j.trace,H=l(V),ee=H.colorscale,Q=H.reversescale,X=t.hasMarkers(V)||!G?"M5,0":N?"M5,-2":"M5,-3",Y=_.select(this),K=Y.select(".legendfill").selectAll("path").data(I||B?[A]:[]);if(K.enter().append("path").classed("js-fill",!0),K.exit().remove(),K.attr("d",X+"h"+x+"v6h-"+x+"z").call(function(oe){if(oe.size())if(I)y.fillGroupStyle(oe,c);else{var se="legendfill-"+V.uid;y.gradient(oe,c,se,o(Q),ee,"fill")}}),R||U){var te=k(void 0,V.line,10,5);L=s.minExtend(V,{line:{width:te}}),C=[s.minExtend(j,{trace:L})]}var ae=Y.select(".legendlines").selectAll("path").data(R||U?[C]:[]);ae.enter().append("path").classed("js-line",!0),ae.exit().remove(),ae.attr("d",X+(U?"l"+x+",0.0001":"h"+x)).call(R?y.lineGroupStyle:function(oe){if(oe.size()){var se="legendline-"+V.uid;y.lineGroupStyle(oe),y.gradient(oe,c,se,o(Q),ee,"stroke")}})}).each(function(A){var C,L,O=a(A),I=O.anyFill,R=O.anyLine,U=O.showLine,B=O.showMarker,G=A[0],N=G.trace,j=!B&&!R&&!I&&t.hasText(N);function V(ae,oe,se,fe){var ye=s.nestedProperty(N,ae).get(),pe=s.isArrayOrTypedArray(ye)&&oe?oe(ye):ye;if(v&&pe&&fe!==void 0&&(pe=fe),se){if(pese[1])return se[1]}return pe}function H(ae){return G._distinct&&G.index&&ae[G.index]?ae[G.index]:ae[0]}if(B||j||U){var ee={},Q={};if(B){ee.mc=V("marker.color",H),ee.mx=V("marker.symbol",H),ee.mo=V("marker.opacity",s.mean,[.2,1]),ee.mlc=V("marker.line.color",H),ee.mlw=V("marker.line.width",s.mean,[0,5],2),Q.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var X=V("marker.size",s.mean,[2,16],12);ee.ms=X,Q.marker.size=X}U&&(Q.line={width:V("line.width",H,[0,10],5)}),j&&(ee.tx="Aa",ee.tp=V("textposition",H),ee.ts=10,ee.tc=V("textfont.color",H),ee.tf=V("textfont.family",H)),C=[s.minExtend(G,ee)],(L=s.minExtend(N,Q)).selectedpoints=null,L.texttemplate=null}var Y=_.select(this).select("g.legendpoints"),K=Y.selectAll("path.scatterpts").data(B?C:[]);K.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",m),K.exit().remove(),K.call(y.pointStyle,L,c),B&&(C[0].mrc=3);var te=Y.selectAll("g.pointtext").data(j?C:[]);te.enter().append("g").classed("pointtext",!0).append("text").attr("transform",m),te.exit().remove(),te.selectAll("text").call(y.textPointStyle,L,c)}).each(function(A){var C=A[0].trace,L=_.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(C.visible&&C.type==="candlestick"?[A,A]:[]);L.enter().append("path").classed("legendcandle",!0).attr("d",function(O,I){return I?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",m).style("stroke-miterlimit",1),L.exit().remove(),L.each(function(O,I){var R=_.select(this),U=C[I?"increasing":"decreasing"],B=k(void 0,U.line,5,2);R.style("stroke-width",B+"px").call(f.fill,U.fillcolor),B&&f.stroke(R,U.line.color)})}).each(function(A){var C=A[0].trace,L=_.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(C.visible&&C.type==="ohlc"?[A,A]:[]);L.enter().append("path").classed("legendohlc",!0).attr("d",function(O,I){return I?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",m).style("stroke-miterlimit",1),L.exit().remove(),L.each(function(O,I){var R=_.select(this),U=C[I?"increasing":"decreasing"],B=k(void 0,U.line,5,2);R.style("fill","none").call(y.dashLine,U.line.dash,B),B&&f.stroke(R,U.line.color)})})}},42068:function(D,E,e){e(93348),D.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"}}},26023:function(D,E,e){var _=e(73972),w=e(74875),s=e(41675),T=e(24255),y=e(34031).eraseActiveShape,f=e(71828),l=f._,t=D.exports={};function i(d,v){var x,g,m=v.currentTarget,k=m.getAttribute("data-attr"),h=m.getAttribute("data-val")||!0,M=d._fullLayout,A={},C=s.list(d,null,!0),L=M._cartesianSpikesEnabled;if(k==="zoom"){var O,I=h==="in"?.5:2,R=(1+I)/2,U=(1-I)/2;for(g=0;g1?(X=["toggleHover"],Y=["resetViews"]):A?(Q=["zoomInGeo","zoomOutGeo"],X=["hoverClosestGeo"],Y=["resetGeo"]):M?(X=["hoverClosest3d"],Y=["resetCameraDefault3d","resetCameraLastSave3d"]):R?(Q=["zoomInMapbox","zoomOutMapbox"],X=["toggleHover"],Y=["resetViewMapbox"]):O?X=["hoverClosestGl2d"]:C?X=["hoverClosestPie"]:G?(X=["hoverClosestCartesian","hoverCompareCartesian"],Y=["resetViewSankey"]):X=["toggleHover"],h&&(X=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(function(ye){for(var pe=0;pe0)){var c=function(d,v,x){for(var g=x.filter(function(M){return v[M].anchor===d._id}),m=0,k=0;k=he.max)pe=oe[de+1];else if(ye=he.pmax)pe=oe[de+1];else if(yede._length||Te+Ne<0)return;ge=me+Ne,be=Te+Ne;break;case Re:if(Se="col-resize",me+Ne>de._length)return;ge=me+Ne,be=Te;break;case we:if(Se="col-resize",Te+Ne<0)return;ge=me,be=Te+Ne;break;default:Se="ew-resize",ge=ue,be=ue+Ne}if(be=0;O--){var I=v.append("path").attr(g).style("opacity",O?.1:m).call(T.stroke,h).call(T.fill,k).call(y.dashLine,O?"solid":A,O?4+M:M);if(o(I,u,b),C){var R=f(u.layout,"selections",b);I.style({cursor:"move"});var U={element:I.node(),plotinfo:d,gd:u,editHelpers:R,isActiveSelection:!0},B=_(x,u);w(B,I,U)}else I.style("pointer-events",O?"all":"none");L[O]=I}var G=L[0];L[1].node().addEventListener("click",function(){return function(N,j){if(r(N)){var V=+j.node().getAttribute("data-index");if(V>=0){if(V===N._fullLayout._activeSelectionIndex)return void a(N);N._fullLayout._activeSelectionIndex=V,N._fullLayout._deactivateSelection=a,i(N)}}}(u,G)})}(u._fullLayout._selectionLayer)}function o(u,p,c){var b=c.xref+c.yref;y.setClipUrl(u,"clip"+p._fullLayout._uid+b,p)}function a(u){r(u)&&u._fullLayout._activeSelectionIndex>=0&&(s(u),delete u._fullLayout._activeSelectionIndex,i(u))}D.exports={draw:i,drawOne:n,activateLastSelection:function(u){if(r(u)){var p=u._fullLayout.selections.length-1;u._fullLayout._activeSelectionIndex=p,u._fullLayout._deactivateSelection=a,i(u)}}}},53777:function(D,E,e){var _=e(79952).P,w=e(1426).extendFlat;D.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:w({},_,{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"}}},90849:function(D){D.exports=function(E,e,_){_("newselection.mode"),_("newselection.line.width")&&(_("newselection.line.color"),_("newselection.line.dash")),_("activeselection.fillcolor"),_("activeselection.opacity")}},35855:function(D,E,e){var _=e(64505).selectMode,w=e(51873).clearOutline,s=e(60165),T=s.readPaths,y=s.writePaths,f=s.fixDatesForPaths;D.exports=function(l,t){if(l.length){var i=l[0][0];if(i){var r=i.getAttribute("d"),n=t.gd,o=n._fullLayout.newselection,a=t.plotinfo,u=a.xaxis,p=a.yaxis,c=t.isActiveSelection,b=t.dragmode,d=(n.layout||{}).selections||[];if(!_(b)&&c!==void 0){var v=n._fullLayout._activeSelectionIndex;if(v-1,qt=[];if(function(nt){return nt&&Array.isArray(nt)&&nt[0].hoverOnBox!==!0}(It)){te(De,je,Ne);var Nt=function(nt,ht){var Oe,Be,Qe=nt[0],ut=-1,pt=[];for(Be=0;Be0?function(nt,ht){var Oe,Be,Qe,ut=[];for(Qe=0;Qe0&&ut.push(Oe);if(ut.length===1&&ut[0]===ht.searchInfo&&(Be=ht.searchInfo.cd[0].trace).selectedpoints.length===ht.pointNumbers.length){for(Qe=0;Qe1||(Be+=ht.selectedpoints.length)>1))return!1;return Be===1}(Ze)&&(Et=ye(Nt))){for(Ye&&Ye.remove(),Dt=0;Dt=0})(Se)&&Se._fullLayout._deactivateShape(Se),function(yt){return yt._fullLayout._activeSelectionIndex>=0}(Se)&&Se._fullLayout._deactivateSelection(Se);var Ne=Se._fullLayout._zoomlayer,Ye=n(ge),Ze=a(ge);if(Ye||Ze){var st,ot,ft=Ne.selectAll(".select-outline-"+be.id);ft&&Se._fullLayout._outlining&&(Ye&&(st=g(ft,De)),st&&s.call("_guiRelayout",Se,{shapes:st}),Ze&&!ee(De)&&(ot=m(ft,De)),ot&&(Se._fullLayout._noEmitSelectedAtStart=!0,s.call("_guiRelayout",Se,{selections:ot}).then(function(){je&&k(Se)})),Se._fullLayout._outlining=!1)}be.selection={},be.selection.selectionDefs=De.selectionDefs=[],be.selection.mergedPolygons=De.mergedPolygons=[]}function oe(De){return De._id}function se(De,je,ge,be){if(!De.calcdata)return[];var Se,Ne,Ye,Ze=[],st=je.map(oe),ot=ge.map(oe);for(Ye=0;Ye0?be[0]:ge;return!!je.selectedpoints&&je.selectedpoints.indexOf(Se)>-1}function pe(De,je,ge){var be,Se;for(be=0;be-1&&je;if(!Ne&&je){var _n=Ce(De,!0);if(_n.length){var fn=_n[0].xref,hn=_n[0].yref;if(fn&&hn){var In=me(_n);Te([L(De,fn,"x"),L(De,hn,"y")])(wn,In)}}De._fullLayout._noEmitSelectedAtStart?De._fullLayout._noEmitSelectedAtStart=!1:on&&Ee(De,wn),Et._reselect=!1}if(!Ne&&Et._deselect){var Cn=Et._deselect;(function(Nn,Hn,qn){for(var or=0;or=0)Tt._fullLayout._deactivateShape(Tt);else if(!ot){var hn=xt.clickmode;C.done(kn).then(function(){if(C.clear(kn),_n===2){for(Xt.remove(),Qe=0;Qe-1&&Q(fn,Tt,be.xaxes,be.yaxes,be.subplot,be,Xt),hn==="event"&&Ee(Tt,void 0);f.click(Tt,fn)}).catch(h.error)}},be.doneFn=function(){ln.remove(),C.done(kn).then(function(){C.clear(kn),!Dt&&Be&&be.selectionDefs&&(Be.subtract=Gt,be.selectionDefs.push(Be),be.mergedPolygons.length=0,[].push.apply(be.mergedPolygons,Oe)),(Dt||ot)&&ae(be,Dt),be.doneFnCompleted&&be.doneFnCompleted(Wn),ft&&Ee(Tt,pt)}).catch(h.error)}},clearOutline:b,clearSelectionsCache:ae,selectOnClick:Q}},89827:function(D,E,e){var _=e(50215),w=e(41940),s=e(82196).line,T=e(79952).P,y=e(1426).extendFlat,f=e(44467).templatedArray,l=(e(24695),e(5386).R),t=e(37281);D.exports=f("shape",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},xref:y({},_.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"},yref:y({},_.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"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:y({},s.color,{editType:"arraydraw"}),width:y({},s.width,{editType:"calc+arraydraw"}),dash:y({},T,{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:l({},{keys:Object.keys(t)}),font:w({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"})},5627:function(D,E,e){var _=e(71828),w=e(89298),s=e(21459),T=e(30477);function y(i){return l(i.line.width,i.xsizemode,i.x0,i.x1,i.path,!1)}function f(i){return l(i.line.width,i.ysizemode,i.y0,i.y1,i.path,!0)}function l(i,r,n,o,a,u){var p=i/2,c=u;if(r==="pixel"){var b=a?T.extractPathCoords(a,u?s.paramIsY:s.paramIsX):[n,o],d=_.aggNums(Math.max,null,b),v=_.aggNums(Math.min,null,b),x=v<0?Math.abs(v)+p:p,g=d>0?d+p:p;return{ppad:p,ppadplus:c?x:g,ppadminus:c?g:x}}return{ppad:p}}function t(i,r,n,o,a){var u=i.type==="category"||i.type==="multicategory"?i.r2c:i.d2c;if(r!==void 0)return[u(r),u(n)];if(o){var p,c,b,d,v=1/0,x=-1/0,g=o.match(s.segmentRE);for(i.type==="date"&&(u=T.decodeDate(u)),p=0;px&&(x=d)));return x>=v?[v,x]:void 0}}D.exports=function(i){var r=i._fullLayout,n=_.filterVisible(r.shapes);if(n.length&&i._fullData.length)for(var o=0;o1&&(ye.length!==2||ye[1][0]!=="Z")&&(U===0&&(ye[0][0]="M"),m[R]=ye,C(),L())}}()}}function Y(oe,se){(function(fe,ye){if(m.length)for(var pe=0;peMe?(ue=we,Ue="y0",me=Me,De="y1"):(ue=Me,Ue="y1",me=we,De="y0"),Ke(Be),ht(he,pe),function(Qe,ut,pt){var bt=ut.xref,Lt=ut.yref,Ct=T.getFromId(pt,bt),mt=T.getFromId(pt,Lt),Ot="";bt==="paper"||Ct.autorange||(Ot+=bt),Lt==="paper"||mt.autorange||(Ot+=Lt),i.setClipUrl(Qe,Ot?"clip"+pt._fullLayout._uid+Ot:null,pt)}(ye,pe,fe),Je.moveFn=Se==="move"?Ge:nt,Je.altKey=Be.altKey)},doneFn:function(){x(fe)||(o(ye),Oe(he),k(ye,fe,pe),w.call("_guiRelayout",fe,xe.getUpdateObj()))},clickFn:function(){x(fe)||Oe(he)}};function Ke(Be){if(x(fe))Se=null;else if(Ze)Se=Be.target.tagName==="path"?"move":Be.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var Qe=Je.element.getBoundingClientRect(),ut=Qe.right-Qe.left,pt=Qe.bottom-Qe.top,bt=Be.clientX-Qe.left,Lt=Be.clientY-Qe.top,Ct=!st&&ut>10&&pt>10&&!Be.shiftKey?n.getCursor(bt/ut,1-Lt/pt):"move";o(ye,Ct),Se=Ct.split("-")[0]}}function Ge(Be,Qe){if(pe.type==="path"){var ut=function(Lt){return Lt},pt=ut,bt=ut;Ne?ot("xanchor",pe.xanchor=Ft(Ce+Be)):(pt=function(Lt){return Ft(Dt(Lt)+Be)},yt&&yt.type==="date"&&(pt=p.encodeDate(pt))),Ye?ot("yanchor",pe.yanchor=qt(ne+Qe)):(bt=function(Lt){return qt(It(Lt)+Qe)},Tt&&Tt.type==="date"&&(bt=p.encodeDate(bt))),ot("path",pe.path=M(be,pt,bt))}else Ne?ot("xanchor",pe.xanchor=Ft(Ce+Be)):(ot("x0",pe.x0=Ft(Re+Be)),ot("x1",pe.x1=Ft(Ae+Be))),Ye?ot("yanchor",pe.yanchor=qt(ne+Qe)):(ot("y0",pe.y0=qt(we+Qe)),ot("y1",pe.y1=qt(Me+Qe)));ye.attr("d",c(fe,pe)),ht(he,pe),h(fe,de,pe,ft)}function nt(Be,Qe){if(st){var ut=function(ln){return ln},pt=ut,bt=ut;Ne?ot("xanchor",pe.xanchor=Ft(Ce+Be)):(pt=function(ln){return Ft(Dt(ln)+Be)},yt&&yt.type==="date"&&(pt=p.encodeDate(pt))),Ye?ot("yanchor",pe.yanchor=qt(ne+Qe)):(bt=function(ln){return qt(It(ln)+Qe)},Tt&&Tt.type==="date"&&(bt=p.encodeDate(bt))),ot("path",pe.path=M(be,pt,bt))}else if(Ze){if(Se==="resize-over-start-point"){var Lt=Re+Be,Ct=Ye?we-Qe:we+Qe;ot("x0",pe.x0=Ne?Lt:Ft(Lt)),ot("y0",pe.y0=Ye?Ct:qt(Ct))}else if(Se==="resize-over-end-point"){var mt=Ae+Be,Ot=Ye?Me-Qe:Me+Qe;ot("x1",pe.x1=Ne?mt:Ft(mt)),ot("y1",pe.y1=Ye?Ot:qt(Ot))}}else{var _t=function(ln){return Se.indexOf(ln)!==-1},Pt=_t("n"),Bt=_t("s"),Wt=_t("w"),Gt=_t("e"),Xt=Pt?ue+Qe:ue,Kt=Bt?me+Qe:me,nn=Wt?Te+Be:Te,yn=Gt?Ee+Be:Ee;Ye&&(Pt&&(Xt=ue-Qe),Bt&&(Kt=me-Qe)),(!Ye&&Kt-Xt>10||Ye&&Xt-Kt>10)&&(ot(Ue,pe[Ue]=Ye?Xt:qt(Xt)),ot(De,pe[De]=Ye?Kt:qt(Kt))),yn-nn>10&&(ot(je,pe[je]=Ne?nn:Ft(nn)),ot(ge,pe[ge]=Ne?yn:Ft(yn)))}ye.attr("d",c(fe,pe)),ht(he,pe),h(fe,de,pe,ft)}function ht(Be,Qe){(Ne||Ye)&&function(){var ut=Qe.type!=="path",pt=Be.selectAll(".visual-cue").data([0]);pt.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var bt=Dt(Ne?Qe.xanchor:s.midRange(ut?[Qe.x0,Qe.x1]:p.extractPathCoords(Qe.path,u.paramIsX))),Lt=It(Ye?Qe.yanchor:s.midRange(ut?[Qe.y0,Qe.y1]:p.extractPathCoords(Qe.path,u.paramIsY)));if(bt=p.roundPositionForSharpStrokeRendering(bt,1),Lt=p.roundPositionForSharpStrokeRendering(Lt,1),Ne&&Ye){var Ct="M"+(bt-1-1)+","+(Lt-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";pt.attr("d",Ct)}else if(Ne){var mt="M"+(bt-1-1)+","+(Lt-9-1)+"v18 h2 v-18 Z";pt.attr("d",mt)}else{var Ot="M"+(bt-9-1)+","+(Lt-1-1)+"h18 v2 h-18 Z";pt.attr("d",Ot)}}()}function Oe(Be){Be.selectAll(".visual-cue").remove()}n.init(Je),Nt.node().onmousemove=Ke}(C,ae,I,L,B,K):I.editable===!0&&ae.style("pointer-events",X||t.opacity(V)*j<=.5?"stroke":"all");ae.node().addEventListener("click",function(){return function(fe,ye){if(g(fe)){var pe=+ye.node().getAttribute("data-index");if(pe>=0){if(pe===fe._fullLayout._activeShapeIndex)return void A(fe);fe._fullLayout._activeShapeIndex=pe,fe._fullLayout._deactivateShape=A,v(fe)}}}(C,ae)})}I._input&&I.visible!==!1&&(I.layer!=="below"?U(C._fullLayout._shapeUpperLayer):I.xref==="paper"||I.yref==="paper"?U(C._fullLayout._shapeLowerLayer):R._hadPlotinfo?U((R.mainplotinfo||R).shapelayer):U(C._fullLayout._shapeLowerLayer))}function k(C,L,O){var I=(O.xref+O.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");i.setClipUrl(C,I?"clip"+L._fullLayout._uid+I:null,L)}function h(C,L,O,I){if(I.selectAll(".shape-label").remove(),O.label.text||O.label.texttemplate){var R;if(O.label.texttemplate){var U={};if(O.type!=="path"){var B=T.getFromId(C,O.xref),G=T.getFromId(C,O.yref);for(var N in b){var j=b[N](O,B,G);j!==void 0&&(U[N]=j)}}R=s.texttemplateStringForShapes(O.label.texttemplate,{},C._fullLayout._d3locale,U)}else R=O.label.text;var V,H,ee,Q,X={"data-index":L},Y=O.label.font,K=I.append("g").attr(X).classed("shape-label",!0).append("text").attr({"data-notex":1}).classed("shape-label-text",!0).text(R);if(O.path){var te=c(C,O),ae=y(te,C);V=1/0,ee=1/0,H=-1/0,Q=-1/0;for(var oe=0;oe=Ee?Ue-je:je-Ue,-180/Math.PI*Math.atan2(ge,be)}(V,ee,H,Q):0),K.call(function(Ee){return Ee.call(i.font,Y).attr({}),a.convertToTspans(Ee,C),Ee});var ne=function(Ee,Ue,De,je,ge,be,Se){var Ne,Ye,Ze,st,ot=ge.label.textposition,ft=ge.label.textangle,yt=ge.label.padding,Et=ge.type,Tt=Math.PI/180*be,xt=Math.sin(Tt),Dt=Math.cos(Tt),It=ge.label.xanchor,Ft=ge.label.yanchor;if(Et==="line"){ot==="start"?(Ne=Ee,Ye=Ue):ot==="end"?(Ne=De,Ye=je):(Ne=(Ee+De)/2,Ye=(Ue+je)/2),It==="auto"&&(It=ot==="start"?ft==="auto"?De>Ee?"left":DeEe?"right":DeEe?"right":DeEe?"left":De=N||(B[R]?j=L(j):G[R]&&(j=O(j)),R++),j})})}function A(C){g(C)&&C._fullLayout._activeShapeIndex>=0&&(l(C),delete C._fullLayout._activeShapeIndex,v(C))}D.exports={draw:v,drawOne:m,eraseActiveShape:function(C){if(g(C)){l(C);var L=C._fullLayout._activeShapeIndex,O=(C.layout||{}).shapes||[];if(L0&&xX&&(K="X"),K});return V>X&&(Y=Y.replace(/[\s,]*X.*/,""),w.log("Ignoring extra params in segment "+j)),H+Y})}(y,l,i);if(y.xsizemode==="pixel"){var x=l(y.xanchor);r=x+y.x0,n=x+y.x1}else r=l(y.x0),n=l(y.x1);if(y.ysizemode==="pixel"){var g=i(y.yanchor);o=g-y.y0,a=g-y.y1}else o=i(y.y0),a=i(y.y1);if(u==="line")return"M"+r+","+o+"L"+n+","+a;if(u==="rect")return"M"+r+","+o+"H"+n+"V"+a+"H"+r+"Z";var m=(r+n)/2,k=(o+a)/2,h=Math.abs(m-r),M=Math.abs(k-o),A="A"+h+","+M,C=m+h+","+k;return"M"+C+A+" 0 1,1 "+m+","+(k-M)+A+" 0 0,1 "+C+"Z"}},89853:function(D,E,e){var _=e(34031);D.exports={moduleType:"component",name:"shapes",layoutAttributes:e(89827),supplyLayoutDefaults:e(84726),supplyDrawNewShapeDefaults:e(45547),includeBasePlot:e(76325)("shapes"),calcAutorange:e(5627),draw:_.draw,drawOne:_.drawOne}},37281:function(D){function E(s,T){return T?T.d2l(s):s}function e(s,T){return T?T.l2d(s):s}function _(s,T){return E(s.x1,T)-E(s.x0,T)}function w(s,T,y){return E(s.y1,y)-E(s.y0,y)}D.exports={x0:function(s){return s.x0},x1:function(s){return s.x1},y0:function(s){return s.y0},y1:function(s){return s.y1},slope:function(s,T,y){return s.type!=="line"?void 0:w(s,0,y)/_(s,T)},dx:_,dy:w,width:function(s,T){return Math.abs(_(s,T))},height:function(s,T,y){return Math.abs(w(s,0,y))},length:function(s,T,y){return s.type!=="line"?void 0:Math.sqrt(Math.pow(_(s,T),2)+Math.pow(w(s,0,y),2))},xcenter:function(s,T){return e((E(s.x1,T)+E(s.x0,T))/2,T)},ycenter:function(s,T,y){return e((E(s.y1,y)+E(s.y0,y))/2,y)}}},75067:function(D,E,e){var _=e(41940),w=e(35025),s=e(1426).extendDeepAll,T=e(30962).overrideAll,y=e(85594),f=e(44467).templatedArray,l=e(98292),t=f("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}});D.exports=T(f("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:t,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:s(w({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:y.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:_({})},font:_({}),activebgcolor:{valType:"color",dflt:l.gripBgActiveColor},bgcolor:{valType:"color",dflt:l.railBgColor},bordercolor:{valType:"color",dflt:l.railBorderColor},borderwidth:{valType:"number",min:0,dflt:l.railBorderWidth},ticklen:{valType:"number",min:0,dflt:l.tickLength},tickcolor:{valType:"color",dflt:l.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:l.minorTickLength}}),"arraydraw","from-root")},98292:function(D){D.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}},12343:function(D,E,e){var _=e(71828),w=e(85501),s=e(75067),T=e(98292).name,y=s.steps;function f(t,i,r){function n(c,b){return _.coerce(t,i,s,c,b)}for(var o=w(t,i,{name:"steps",handleItemDefaults:l}),a=0,u=0;u0&&(V=V.transition().duration(R.transition.duration).ease(R.transition.easing)),V.attr("transform",f(j-.5*i.gripWidth,R._dims.currentValueTotalHeight))}}function A(I,R){var U=I._dims;return U.inputAreaStart+i.stepInset+(U.inputAreaLength-2*i.stepInset)*Math.min(1,Math.max(0,R))}function C(I,R){var U=I._dims;return Math.min(1,Math.max(0,(R-i.stepInset-U.inputAreaStart)/(U.inputAreaLength-2*i.stepInset-2*U.inputAreaStart)))}function L(I,R,U){var B=U._dims,G=y.ensureSingle(I,"rect",i.railTouchRectClass,function(N){N.call(k,R,I,U).style("pointer-events","all")});G.attr({width:B.inputAreaLength,height:Math.max(B.inputAreaWidth,i.tickOffset+U.ticklen+B.labelHeight)}).call(s.fill,U.bgcolor).attr("opacity",0),T.setTranslate(G,0,B.currentValueTotalHeight)}function O(I,R){var U=R._dims,B=U.inputAreaLength-2*i.railInset,G=y.ensureSingle(I,"rect",i.railRectClass);G.attr({width:B,height:i.railWidth,rx:i.railRadius,ry:i.railRadius,"shape-rendering":"crispEdges"}).call(s.stroke,R.bordercolor).call(s.fill,R.bgcolor).style("stroke-width",R.borderwidth+"px"),T.setTranslate(G,i.railInset,.5*(U.inputAreaWidth-i.railWidth)+U.currentValueTotalHeight)}D.exports=function(I){var R=I._context.staticPlot,U=I._fullLayout,B=function(ee,Q){for(var X=ee[i.name],Y=[],K=0;K0?[0]:[]);function N(ee){ee._commandObserver&&(ee._commandObserver.remove(),delete ee._commandObserver),w.autoMargin(I,u(ee))}if(G.enter().append("g").classed(i.containerClassName,!0).style("cursor",R?null:"ew-resize"),G.exit().each(function(){_.select(this).selectAll("g."+i.groupClassName).each(N)}).remove(),B.length!==0){var j=G.selectAll("g."+i.groupClassName).data(B,p);j.enter().append("g").classed(i.groupClassName,!0),j.exit().each(N).remove();for(var V=0;V0||xe<0){var Me={left:[-Re,0],right:[Re,0],top:[0,-Re],bottom:[0,Re]}[g.side];Y.attr("transform",f(Me[0],Me[1]))}}}return V.call(H),G&&(O?V.on(".opacity",null):(A=0,C=!0,V.text(v).on("mouseover.opacity",function(){_.select(this).transition().duration(r.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){_.select(this).transition().duration(r.HIDE_PLACEHOLDER).style("opacity",0)})),V.call(i.makeEditable,{gd:a}).on("edit",function(X){x!==void 0?T.call("_guiRestyle",a,d,X,x):T.call("_guiRelayout",a,d,X)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(H)}).on("input",function(X){this.text(X||" ").call(i.positionText,m.x,m.y)})),V.classed("js-placeholder",C),h}}},7163:function(D,E,e){var _=e(41940),w=e(22399),s=e(1426).extendFlat,T=e(30962).overrideAll,y=e(35025),f=e(44467).templatedArray,l=f("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}});D.exports=T(f("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:l,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:s(y({editType:"arraydraw"}),{}),font:_({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:w.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},75909:function(D){D.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:"◄",right:"►",up:"▲",down:"▼"}}},64897:function(D,E,e){var _=e(71828),w=e(85501),s=e(7163),T=e(75909).name,y=s.buttons;function f(t,i,r){function n(o,a){return _.coerce(t,i,s,o,a)}n("visible",w(t,i,{name:"buttons",handleItemDefaults:l}).length>0)&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),_.noneOrAll(t,i,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),_.coerceFont(n,"font",r.font),n("bgcolor",r.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function l(t,i){function r(n,o){return _.coerce(t,i,y,n,o)}r("visible",t.method==="skip"||Array.isArray(t.args))&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}D.exports=function(t,i){w(t,i,{name:T,handleItemDefaults:f})}},13689:function(D,E,e){var _=e(39898),w=e(74875),s=e(7901),T=e(91424),y=e(71828),f=e(63893),l=e(44467).arrayEditor,t=e(18783).LINE_SPACING,i=e(75909),r=e(25849);function n(A){return A._index}function o(A,C){return+A.attr(i.menuIndexAttrName)===C._index}function a(A,C,L,O,I,R,U,B){C.active=U,l(A.layout,i.name,C).applyUpdate("active",U),C.type==="buttons"?p(A,O,null,null,C):C.type==="dropdown"&&(I.attr(i.menuIndexAttrName,"-1"),u(A,O,I,R,C),B||p(A,O,I,R,C))}function u(A,C,L,O,I){var R=y.ensureSingle(C,"g",i.headerClassName,function(V){V.style("pointer-events","all")}),U=I._dims,B=I.active,G=I.buttons[B]||i.blankHeaderOpts,N={y:I.pad.t,yPad:0,x:I.pad.l,xPad:0,index:0},j={width:U.headerWidth,height:U.headerHeight};R.call(c,I,G,A).call(h,I,N,j),y.ensureSingle(C,"text",i.headerArrowClassName,function(V){V.attr("text-anchor","end").call(T.font,I.font).text(i.arrowSymbol[I.direction])}).attr({x:U.headerWidth-i.arrowOffsetX+I.pad.l,y:U.headerHeight/2+i.textOffsetY+I.pad.t}),R.on("click",function(){L.call(M,String(o(L,I)?-1:I._index)),p(A,C,L,O,I)}),R.on("mouseover",function(){R.call(x)}),R.on("mouseout",function(){R.call(g,I)}),T.setTranslate(C,U.lx,U.ly)}function p(A,C,L,O,I){L||(L=C).attr("pointer-events","all");var R=function(Y){return+Y.attr(i.menuIndexAttrName)==-1}(L)&&I.type!=="buttons"?[]:I.buttons,U=I.type==="dropdown"?i.dropdownButtonClassName:i.buttonClassName,B=L.selectAll("g."+U).data(y.filterVisible(R)),G=B.enter().append("g").classed(U,!0),N=B.exit();I.type==="dropdown"?(G.attr("opacity","0").transition().attr("opacity","1"),N.transition().attr("opacity","0").remove()):N.remove();var j=0,V=0,H=I._dims,ee=["up","down"].indexOf(I.direction)!==-1;I.type==="dropdown"&&(ee?V=H.headerHeight+i.gapButtonHeader:j=H.headerWidth+i.gapButtonHeader),I.type==="dropdown"&&I.direction==="up"&&(V=-i.gapButtonHeader+i.gapButton-H.openHeight),I.type==="dropdown"&&I.direction==="left"&&(j=-i.gapButtonHeader+i.gapButton-H.openWidth);var Q={x:H.lx+j+I.pad.l,y:H.ly+V+I.pad.t,yPad:i.gapButton,xPad:i.gapButton,index:0},X={l:Q.x+I.borderwidth,t:Q.y+I.borderwidth};B.each(function(Y,K){var te=_.select(this);te.call(c,I,Y,A).call(h,I,Q),te.on("click",function(){_.event.defaultPrevented||(Y.execute&&(Y.args2&&I.active===K?(a(A,I,0,C,L,O,-1),w.executeAPICommand(A,Y.method,Y.args2)):(a(A,I,0,C,L,O,K),w.executeAPICommand(A,Y.method,Y.args))),A.emit("plotly_buttonclicked",{menu:I,button:Y,active:I.active}))}),te.on("mouseover",function(){te.call(x)}),te.on("mouseout",function(){te.call(g,I),B.call(v,I)})}),B.call(v,I),ee?(X.w=Math.max(H.openWidth,H.headerWidth),X.h=Q.y-X.t):(X.w=Q.x-X.l,X.h=Math.max(H.openHeight,H.headerHeight)),X.direction=I.direction,O&&(B.size()?function(Y,K,te,ae,oe,se){var fe,ye,pe,de=oe.direction,he=de==="up"||de==="down",xe=oe._dims,Re=oe.active;if(he)for(ye=0,pe=0;pe0?[0]:[]);if(I.enter().append("g").classed(i.containerClassName,!0).style("cursor","pointer"),I.exit().each(function(){_.select(this).selectAll("g."+i.headerGroupClassName).each(O)}).remove(),L.length!==0){var R=I.selectAll("g."+i.headerGroupClassName).data(L,n);R.enter().append("g").classed(i.headerGroupClassName,!0);for(var U=y.ensureSingle(I,"g",i.dropdownButtonGroupClassName,function(V){V.style("pointer-events","all")}),B=0;Bh,C=y.barLength+2*y.barPad,L=y.barWidth+2*y.barPad,O=c,I=d+v;I+L>n&&(I=n-L);var R=this.container.selectAll("rect.scrollbar-horizontal").data(A?[0]:[]);R.exit().on(".drag",null).remove(),R.enter().append("rect").classed("scrollbar-horizontal",!0).call(w.fill,y.barColor),A?(this.hbar=R.attr({rx:y.barRadius,ry:y.barRadius,x:O,y:I,width:C,height:L}),this._hbarXMin=O+C/2,this._hbarTranslateMax=h-C):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var U=v>M,B=y.barWidth+2*y.barPad,G=y.barLength+2*y.barPad,N=c+b,j=d;N+B>r&&(N=r-B);var V=this.container.selectAll("rect.scrollbar-vertical").data(U?[0]:[]);V.exit().on(".drag",null).remove(),V.enter().append("rect").classed("scrollbar-vertical",!0).call(w.fill,y.barColor),U?(this.vbar=V.attr({rx:y.barRadius,ry:y.barRadius,x:N,y:j,width:B,height:G}),this._vbarYMin=j+G/2,this._vbarTranslateMax=M-G):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var H=this.id,ee=o-.5,Q=U?a+B+.5:a+.5,X=u-.5,Y=A?p+L+.5:p+.5,K=i._topdefs.selectAll("#"+H).data(A||U?[0]:[]);if(K.exit().remove(),K.enter().append("clipPath").attr("id",H).append("rect"),A||U?(this._clipRect=K.select("rect").attr({x:Math.floor(ee),y:Math.floor(X),width:Math.ceil(Q)-Math.floor(ee),height:Math.ceil(Y)-Math.floor(X)}),this.container.call(s.setClipUrl,H,this.gd),this.bg.attr({x:c,y:d,width:b,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(s.setClipUrl,null),delete this._clipRect),A||U){var te=_.behavior.drag().on("dragstart",function(){_.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(te);var ae=_.behavior.drag().on("dragstart",function(){_.event.sourceEvent.preventDefault(),_.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));A&&this.hbar.on(".drag",null).call(ae),U&&this.vbar.on(".drag",null).call(ae)}this.setTranslate(l,t)},y.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(s.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},y.prototype._onBoxDrag=function(){var f=this.translateX,l=this.translateY;this.hbar&&(f-=_.event.dx),this.vbar&&(l-=_.event.dy),this.setTranslate(f,l)},y.prototype._onBoxWheel=function(){var f=this.translateX,l=this.translateY;this.hbar&&(f+=_.event.deltaY),this.vbar&&(l+=_.event.deltaY),this.setTranslate(f,l)},y.prototype._onBarDrag=function(){var f=this.translateX,l=this.translateY;if(this.hbar){var t=f+this._hbarXMin,i=t+this._hbarTranslateMax;f=(T.constrain(_.event.x,t,i)-t)/(i-t)*(this.position.w-this._box.w)}if(this.vbar){var r=l+this._vbarYMin,n=r+this._vbarTranslateMax;l=(T.constrain(_.event.y,r,n)-r)/(n-r)*(this.position.h-this._box.h)}this.setTranslate(f,l)},y.prototype.setTranslate=function(f,l){var t=this.position.w-this._box.w,i=this.position.h-this._box.h;if(f=T.constrain(f||0,0,t),l=T.constrain(l||0,0,i),this.translateX=f,this.translateY=l,this.container.call(s.setTranslate,this._box.l-this.position.l-f,this._box.t-this.position.t-l),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+f-.5),y:Math.floor(this.position.t+l-.5)}),this.hbar){var r=f/t;this.hbar.call(s.setTranslate,f+r*this._hbarTranslateMax,l)}if(this.vbar){var n=l/i;this.vbar.call(s.setTranslate,f,l+n*this._vbarTranslateMax)}}},18783:function(D){D.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"}}},24695:function(D){D.exports={axisRefDescription:function(E,e,_){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",e,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",e,"("+_+"). 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",e,"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",e,"and the",_,"of the domain of the","second",E,"axis."].join(" ")}}},22372:function(D){D.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}},31562:function(D){D.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"}},74808:function(D){D.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},29659:function(D){D.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]}},87381:function(D){D.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}},37822:function(D){D.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},50606:function(D){D.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,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,EPOCHJD:24405875e-1,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"−"}},77922:function(D,E){E.xmlns="http://www.w3.org/2000/xmlns/",E.svg="http://www.w3.org/2000/svg",E.xlink="http://www.w3.org/1999/xlink",E.svgAttrs={xmlns:E.svg,"xmlns:xlink":E.xlink}},8729:function(D,E,e){E.version=e(11506).version,e(7417),e(98847);for(var _=e(73972),w=E.register=_.register,s=e(10641),T=Object.keys(s),y=0;y",""," ",""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},99863:function(D,E){E.isLeftAnchor=function(e){return e.xanchor==="left"||e.xanchor==="auto"&&e.x<=.3333333333333333},E.isCenterAnchor=function(e){return e.xanchor==="center"||e.xanchor==="auto"&&e.x>.3333333333333333&&e.x<.6666666666666666},E.isRightAnchor=function(e){return e.xanchor==="right"||e.xanchor==="auto"&&e.x>=.6666666666666666},E.isTopAnchor=function(e){return e.yanchor==="top"||e.yanchor==="auto"&&e.y>=.6666666666666666},E.isMiddleAnchor=function(e){return e.yanchor==="middle"||e.yanchor==="auto"&&e.y>.3333333333333333&&e.y<.6666666666666666},E.isBottomAnchor=function(e){return e.yanchor==="bottom"||e.yanchor==="auto"&&e.y<=.3333333333333333}},26348:function(D,E,e){var _=e(64872),w=_.mod,s=_.modHalf,T=Math.PI,y=2*T;function f(r){return Math.abs(r[1]-r[0])>y-1e-14}function l(r,n){return s(n-r,y)}function t(r,n){if(f(n))return!0;var o,a;n[0](a=w(a,y))&&(a+=y);var u=w(r,y),p=u+y;return u>=o&&u<=a||p>=o&&p<=a}function i(r,n,o,a,u,p,c){u=u||0,p=p||0;var b,d,v,x,g,m=f([o,a]);function k(C,L){return[C*Math.cos(L)+u,p-C*Math.sin(L)]}m?(b=0,d=T,v=y):o=u&&r<=p);var u,p},pathArc:function(r,n,o,a,u){return i(null,r,n,o,a,u,0)},pathSector:function(r,n,o,a,u){return i(null,r,n,o,a,u,1)},pathAnnulus:function(r,n,o,a,u,p){return i(r,n,o,a,u,p,1)}}},73627:function(D,E){var e=Array.isArray,_=ArrayBuffer,w=DataView;function s(f){return _.isView(f)&&!(f instanceof w)}function T(f){return e(f)||s(f)}function y(f,l,t){if(T(f)){if(T(f[0])){for(var i=t,r=0;rp.max?a.set(u):a.set(+o)}},integer:{coerceFunction:function(o,a,u,p){o%1||!_(o)||p.min!==void 0&&op.max?a.set(u):a.set(+o)}},string:{coerceFunction:function(o,a,u,p){if(typeof o!="string"){var c=typeof o=="number";p.strict!==!0&&c?a.set(String(o)):a.set(u)}else p.noBlank&&!o?a.set(u):a.set(o)}},color:{coerceFunction:function(o,a,u){w(o).isValid()?a.set(o):a.set(u)}},colorlist:{coerceFunction:function(o,a,u){Array.isArray(o)&&o.length&&o.every(function(p){return w(p).isValid()})?a.set(o):a.set(u)}},colorscale:{coerceFunction:function(o,a,u){a.set(T.get(o,u))}},angle:{coerceFunction:function(o,a,u){o==="auto"?a.set("auto"):_(o)?a.set(i(+o,360)):a.set(u)}},subplotid:{coerceFunction:function(o,a,u,p){var c=p.regex||t(u);typeof o=="string"&&c.test(o)?a.set(o):a.set(u)},validateFunction:function(o,a){var u=a.dflt;return o===u||typeof o=="string"&&!!t(u).test(o)}},flaglist:{coerceFunction:function(o,a,u,p){if((p.extras||[]).indexOf(o)===-1)if(typeof o=="string"){for(var c=o.split("+"),b=0;b=_&&R<=w?R:t}if(typeof R!="string"&&typeof R!="number")return t;R=String(R);var j=v(U),V=R.charAt(0);!j||V!=="G"&&V!=="g"||(R=R.substr(1),U="");var H=j&&U.substr(0,7)==="chinese",ee=R.match(H?b:c);if(!ee)return t;var Q=ee[1],X=ee[3]||"1",Y=Number(ee[5]||1),K=Number(ee[7]||0),te=Number(ee[9]||0),ae=Number(ee[11]||0);if(j){if(Q.length===2)return t;var oe;Q=Number(Q);try{var se=u.getComponentMethod("calendars","getCal")(U);if(H){var fe=X.charAt(X.length-1)==="i";X=parseInt(X,10),oe=se.newDate(Q,se.toMonthIndex(Q,X,fe),Y)}else oe=se.newDate(Q,Number(X),Y)}catch{return t}return oe?(oe.toJD()-a)*i+K*r+te*n+ae*o:t}Q=Q.length===2?(Number(Q)+2e3-d)%100+d:Number(Q),X-=1;var ye=new Date(Date.UTC(2e3,X,Y,K,te));return ye.setUTCFullYear(Q),ye.getUTCMonth()!==X||ye.getUTCDate()!==Y?t:ye.getTime()+ae*o},_=E.MIN_MS=E.dateTime2ms("-9999"),w=E.MAX_MS=E.dateTime2ms("9999-12-31 23:59:59.9999"),E.isDateTime=function(R,U){return E.dateTime2ms(R,U)!==t};var g=90*i,m=3*r,k=5*n;function h(R,U,B,G,N){if((U||B||G||N)&&(R+=" "+x(U,2)+":"+x(B,2),(G||N)&&(R+=":"+x(G,2),N))){for(var j=4;N%10==0;)j-=1,N/=10;R+="."+x(N,j)}return R}E.ms2DateTime=function(R,U,B){if(typeof R!="number"||!(R>=_&&R<=w))return t;U||(U=0);var G,N,j,V,H,ee,Q=Math.floor(10*f(R+.05,1)),X=Math.round(R-Q/10);if(v(B)){var Y=Math.floor(X/i)+a,K=Math.floor(f(R,i));try{G=u.getComponentMethod("calendars","getCal")(B).fromJD(Y).formatDate("yyyy-mm-dd")}catch{G=p("G%Y-%m-%d")(new Date(X))}if(G.charAt(0)==="-")for(;G.length<11;)G="-0"+G.substr(1);else for(;G.length<10;)G="0"+G;N=U=_+i&&R<=w-i))return t;var U=Math.floor(10*f(R+.05,1)),B=new Date(Math.round(R-U/10));return h(s("%Y-%m-%d")(B),B.getHours(),B.getMinutes(),B.getSeconds(),10*B.getUTCMilliseconds()+U)},E.cleanDate=function(R,U,B){if(R===t)return U;if(E.isJSDate(R)||typeof R=="number"&&isFinite(R)){if(v(B))return y.error("JS Dates and milliseconds are incompatible with world calendars",R),U;if(!(R=E.ms2DateTimeLocal(+R))&&U!==void 0)return U}else if(!E.isDateTime(R,B))return y.error("unrecognized date",R),U;return R};var M=/%\d?f/g,A=/%h/g,C={1:"1",2:"1",3:"2",4:"2"};function L(R,U,B,G){R=R.replace(M,function(j){var V=Math.min(+j.charAt(1)||6,6);return(U/1e3%1+2).toFixed(V).substr(2).replace(/0+$/,"")||"0"});var N=new Date(Math.floor(U+.05));if(R=R.replace(A,function(){return C[B("%q")(N)]}),v(G))try{R=u.getComponentMethod("calendars","worldCalFmt")(R,U,G)}catch{return"Invalid"}return B(R)(N)}var O=[59,59.9,59.99,59.999,59.9999];E.formatDate=function(R,U,B,G,N,j){if(N=v(N)&&N,!U)if(B==="y")U=j.year;else if(B==="m")U=j.month;else{if(B!=="d")return function(V,H){var ee=f(V+.05,i),Q=x(Math.floor(ee/r),2)+":"+x(f(Math.floor(ee/n),60),2);if(H!=="M"){T(H)||(H=0);var X=(100+Math.min(f(V/o,60),O[H])).toFixed(H).substr(1);H>0&&(X=X.replace(/0+$/,"").replace(/[\.]$/,"")),Q+=":"+X}return Q}(R,B)+` +`)).length,Pe=0;Pe127&&E<2048?String.fromCharCode(E>>6|192,63&E|128):String.fromCharCode(E>>12|224,E>>6&63|128,63&E|128),e!==null&&(J>F&&(D+=P.substring(F,J)),D+=e,F=J=Pe+1)}return J>F&&(D+=P.substring(F,P.length)),D},xc=(Ag=function(){for(var P=new Date().valueOf(),F=0;P==new Date().valueOf();)F++;return P.toString(16)+F.toString(16)},function(){var P=typeof window<"u"?(window.screen.height*window.screen.width).toString(16):"0";return Ag()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var F,J,ce=Nl,Pe=0,D=[];function E(e,_){var w,s=0;for(w=0;w<_.length;w++)s|=D[w]<<8*w;return e^s}for(F=0;F=4&&(Pe=E(Pe,D),D=[]);return D.length>0&&(Pe=E(Pe,D)),Pe.toString(16)}()+"-"+P+"-"+Ag()}),W8=function(P){return!!/(google web preview|baiduspider|yandexbot|bingbot|googlebot|yahoo! slurp|ahrefsbot|facebookexternalhit|facebookcatalog|applebot|semrushbot|duckduckbot|twitterbot|rogerbot|linkedinbot|mj12bot|sitebulb|bot.htm|bot.php|hubspot|crawler)/i.test(P)},ob=function(P,F){var J=F.replace(/[[]/,"\\[").replace(/[\]]/,"\\]"),ce=new RegExp("[\\?&]"+J+"=([^&#]*)").exec(P);if(ce===null||ce&&typeof ce[1]!="string"&&ce[1].length)return"";var Pe=ce[1];try{Pe=decodeURIComponent(Pe)}catch{Ja.error("Skipping decoding for malformed query param: "+Pe)}return Pe.replace(/\+/g," ")},sb=function(P,F){var J=P.match(new RegExp(F+"=([^&]*)"));return J?J[1]:null},bp=function(){function P(F){return F&&(F.preventDefault=P.preventDefault,F.stopPropagation=P.stopPropagation),F}return P.preventDefault=function(){this.returnValue=!1},P.stopPropagation=function(){this.cancelBubble=!0},function(F,J,ce,Pe,D){if(F)if(F.addEventListener&&!Pe)F.addEventListener(J,ce,!!D);else{var E="on"+J,e=F[E];F[E]=function(_,w,s){return function(T){if(T=T||P(window.event)){var m,f=!0;G3(s)&&(m=s(T));var l=w.call(_,T);return m!==!1&&l!==!1||(f=!1),f}}}(F,ce,e)}else Ja.error("No valid element provided to register_event")}}(),yo={campaignParams:function(P){var F=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gclid","fbclid","msclkid"].concat(P||[]),J={};return Yi(F,function(ce){var Pe=ob(Vo.URL,ce);Pe.length&&(J[ce]=Pe)}),J},searchEngine:function(){var P=Vo.referrer;return P?P.search("https?://(.*)google.([^/?]*)")===0?"google":P.search("https?://(.*)bing.com")===0?"bing":P.search("https?://(.*)yahoo.com")===0?"yahoo":P.search("https?://(.*)duckduckgo.com")===0?"duckduckgo":null:null},searchInfo:function(){var P=yo.searchEngine(),F=P!="yahoo"?"q":"p",J={};if(P!==null){J.$search_engine=P;var ce=ob(Vo.referrer,F);ce.length&&(J.ph_keyword=ce)}return J},browser:function(P,F,J){return F=F||"",J||Ki(P," OPR/")?Ki(P,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(P)?"BlackBerry":Ki(P,"IEMobile")||Ki(P,"WPDesktop")?"Internet Explorer Mobile":Ki(P,"SamsungBrowser/")?"Samsung Internet":Ki(P,"Edge")||Ki(P,"Edg/")?"Microsoft Edge":Ki(P,"FBIOS")?"Facebook Mobile":Ki(P,"Chrome")?"Chrome":Ki(P,"CriOS")?"Chrome iOS":Ki(P,"UCWEB")||Ki(P,"UCBrowser")?"UC Browser":Ki(P,"FxiOS")?"Firefox iOS":Ki(F,"Apple")?Ki(P,"Mobile")?"Mobile Safari":"Safari":Ki(P,"Android")?"Android Mobile":Ki(P,"Konqueror")?"Konqueror":Ki(P,"Firefox")?"Firefox":Ki(P,"MSIE")||Ki(P,"Trident/")?"Internet Explorer":Ki(P,"Gecko")?"Mozilla":""},browserVersion:function(P,F,J){var ce={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/}[yo.browser(P,F,J)];if(ce===void 0)return null;var Pe=P.match(ce);return Pe?parseFloat(Pe[Pe.length-2]):null},browserLanguage:function(){return Gc.language||Gc.userLanguage},os:function(){var P=Nl;return/Windows/i.test(P)?/Phone/.test(P)||/WPDesktop/.test(P)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(P)?"iOS":/Android/.test(P)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(P)?"BlackBerry":/Mac/i.test(P)?"Mac OS X":/Linux/.test(P)?"Linux":/CrOS/.test(P)?"Chrome OS":""},device:function(P){return/Windows Phone/i.test(P)||/WPDesktop/.test(P)?"Windows Phone":/iPad/.test(P)?"iPad":/iPod/.test(P)?"iPod Touch":/iPhone/.test(P)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(P)?"BlackBerry":/Android/.test(P)&&!/Mobile/.test(P)?"Android Tablet":/Android/.test(P)?"Android":""},deviceType:function(P){var F=this.device(P);return F==="iPad"||F==="Android Tablet"?"Tablet":F?"Mobile":"Desktop"},referrer:function(){return Vo.referrer||"$direct"},referringDomain:function(){if(!Vo.referrer)return"$direct";var P=Vo.createElement("a");return P.href=Vo.referrer,P.host},properties:function(){return So(Lv({$os:yo.os(),$browser:yo.browser(Nl,Gc.vendor,gi.opera),$device:yo.device(Nl),$device_type:yo.deviceType(Nl)}),{$current_url:gi==null?void 0:gi.location.href,$host:gi==null?void 0:gi.location.host,$pathname:gi==null?void 0:gi.location.pathname,$browser_version:yo.browserVersion(Nl,Gc.vendor,gi.opera),$browser_language:yo.browserLanguage(),$screen_height:gi==null?void 0:gi.screen.height,$screen_width:gi==null?void 0:gi.screen.width,$viewport_height:gi==null?void 0:gi.innerHeight,$viewport_width:gi==null?void 0:gi.innerWidth,$lib:"web",$lib_version:fu.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:(Date.now=Date.now||function(){return+new Date},Date.now()/1e3)})},people_properties:function(){return So(Lv({$os:yo.os(),$browser:yo.browser(Nl,Gc.vendor,gi.opera)}),{$browser_version:yo.browserVersion(Nl,Gc.vendor,gi.opera)})}};function G0(P){switch(tf(P.className)){case"string":return P.className;case"object":return("baseVal"in P.className?P.className.baseVal:null)||P.getAttribute("class")||"";default:return""}}function W0(P){var F="";return p0(P)&&!$3(P)&&P.childNodes&&P.childNodes.length&&Yi(P.childNodes,function(J){X3(J)&&J.textContent&&(F+=Cv(J.textContent).split(/(\s+)/).filter(Wf).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))}),Cv(F)}function lb(P){return!!P&&P.nodeType===1}function nf(P,F){return!!P&&!!P.tagName&&P.tagName.toLowerCase()===F.toLowerCase()}function X3(P){return!!P&&P.nodeType===3}function ub(P){return!!P&&P.nodeType===11}var Mg=["a","button","form","input","select","textarea","label"];function p0(P){for(var F=P;F.parentNode&&!nf(F,"body");F=F.parentNode){var J=G0(F).split(" ");if(Ki(J,"ph-sensitive")||Ki(J,"ph-no-capture"))return!1}if(Ki(G0(P).split(" "),"ph-include"))return!0;var ce=P.type||"";if(typeof ce=="string")switch(ce.toLowerCase()){case"hidden":case"password":return!1}var Pe=P.name||P.id||"";return!(typeof Pe=="string"&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(Pe.replace(/[^a-zA-Z0-9]/g,"")))}function $3(P){return!!(nf(P,"input")&&!["button","checkbox","submit","reset"].includes(P.type)||nf(P,"select")||nf(P,"textarea")||P.getAttribute("contenteditable")==="true")}function Wf(P){return!(P===null||Ul(P)||typeof P=="string"&&(P=Cv(P),/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test((P||"").replace(/[- ]/g,""))||/(^\d{3}-?\d{2}-?\d{4}$)/.test(P)))}function J3(P,F){var J=document.createElement("script");J.type="text/javascript",J.src=P,J.onload=F;var ce,Pe=document.querySelectorAll("body > script");Pe.length>0?(ce=Pe[0].parentNode)===null||ce===void 0||ce.insertBefore(J,Pe[0]):document.body.appendChild(J)}function cb(P){var F=W0(P);return Wf(F="".concat(F," ").concat(K3(P)).trim())?F:""}function K3(P){var F="";return P&&P.childNodes&&P.childNodes.length&&Yi(P.childNodes,function(J){var ce;if(J&&((ce=J.tagName)===null||ce===void 0?void 0:ce.toLowerCase())==="span")try{var Pe=W0(J);F="".concat(F," ").concat(Pe).trim(),J.childNodes&&J.childNodes.length&&(F="".concat(F," ").concat(K3(J)).trim())}catch(D){console.error(D)}}),F}var Z8=function(){function P(F){Wo(this,P),this.clicks=[],this.enabled=F}return Zo(P,[{key:"isRageClick",value:function(F,J,ce){if(!this.enabled)return!1;var Pe=this.clicks[this.clicks.length-1];if(Pe&&Math.abs(F-Pe.x)+Math.abs(J-Pe.y)<30&&ce-Pe.timestamp<1e3){if(this.clicks.push({x:F,y:J,timestamp:ce}),this.clicks.length===3)return!0}else this.clicks=[{x:F,y:J,timestamp:ce}];return!1}}]),P}(),Y8=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,lu={is_supported:function(){return!0},error:function(P){Ja.error("cookieStore error: "+P)},get:function(P){try{for(var F=P+"=",J=document.cookie.split(";"),ce=0;ce-1&&!J&&(ce.toLowerCase()==="a"||ce.toLowerCase()==="button"?Pe.$el_text=cb(P):Pe.$el_text=W0(P));var D=G0(P);D.length>0&&(Pe.classes=D.split(" ").filter(function(w){return w!==""})),Yi(P.attributes,function(w){var s;$3(P)&&["name","id","class"].indexOf(w.name)===-1||!F&&Wf(w.value)&&(typeof(s=w.name)!="string"||s.substring(0,10)!=="_ngcontent"&&s.substring(0,7)!=="_nghost")&&(Pe["attr__"+w.name]=w.value)});for(var E=1,e=1,_=P;_=this._previousElementSibling(_);)E++,_.tagName===P.tagName&&e++;return Pe.nth_child=E,Pe.nth_of_type=e,Pe},_getDefaultProperties:function(P){return{$event_type:P,$ce_version:1}},_extractCustomPropertyValue:function(P){var F=[];return Yi(document.querySelectorAll(P.css_selector),function(J){var ce;["input","select"].indexOf(J.tagName.toLowerCase())>-1?ce=J.value:J.textContent&&(ce=J.textContent),Wf(ce)&&F.push(ce)}),F.join(", ")},_getCustomProperties:function(P){var F=this,J={};return Yi(this._customProperties,function(ce){Yi(ce.event_selectors,function(Pe){Yi(document.querySelectorAll(Pe),function(D){Ki(P,D)&&p0(D)&&(J[ce.name]=F._extractCustomPropertyValue(ce))})})}),J},_getEventTarget:function(P){return P.target===void 0?P.srcElement||null:(F=P.target)!==null&&F!==void 0&&F.shadowRoot?P.composedPath()[0]||null:P.target||null;var F},_captureEvent:function(P,F){var J,ce=this,Pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"$autocapture",D=this._getEventTarget(P);if(X3(D)&&(D=D.parentNode||null),Pe==="$autocapture"&&P.type==="click"&&P instanceof MouseEvent&&(J=this.rageclicks)!==null&&J!==void 0&&J.isRageClick(P.clientX,P.clientY,new Date().getTime())&&this._captureEvent(P,F,"$rageclick"),D&&function(f,l){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;if(!f||nf(f,"html")||!lb(f))return!1;if(t!=null&&t.url_allowlist){var i=window.location.href,r=t.url_allowlist;if(r&&!r.some(function(g){return i.match(g)}))return!1}if(t!=null&&t.dom_event_allowlist){var n=t.dom_event_allowlist;if(n&&!n.some(function(g){return l.type===g}))return!1}if(t!=null&&t.element_allowlist){var o=t.element_allowlist;if(o&&!o.some(function(g){return f.tagName.toLowerCase()===g}))return!1}if(t!=null&&t.css_selector_allowlist){var a=t.css_selector_allowlist;if(a&&!a.some(function(g){return f.matches(g)}))return!1}for(var u=!1,p=[f],c=!0,b=f;b.parentNode&&!nf(b,"body");)if(ub(b.parentNode))p.push(b.parentNode.host),b=b.parentNode.host;else{if(!(c=b.parentNode||!1))break;if(Mg.indexOf(c.tagName.toLowerCase())>-1)u=!0;else{var d=window.getComputedStyle(c);d&&d.getPropertyValue("cursor")==="pointer"&&(u=!0)}p.push(c),b=c}var v=window.getComputedStyle(f);if(v&&v.getPropertyValue("cursor")==="pointer"&&l.type==="click")return!0;var x=f.tagName.toLowerCase();switch(x){case"html":return!1;case"form":return l.type==="submit";case"input":case"select":case"textarea":return l.type==="change"||l.type==="click";default:return u?l.type==="click":l.type==="click"&&(Mg.indexOf(x)>-1||f.getAttribute("contenteditable")==="true")}}(D,P,this.config)){for(var E=[D],e=D;e.parentNode&&!nf(e,"body");)ub(e.parentNode)?(E.push(e.parentNode.host),e=e.parentNode.host):(E.push(e.parentNode),e=e.parentNode);var _,w=[],s={},T=!1;if(Yi(E,function(f){var l=p0(f);f.tagName.toLowerCase()==="a"&&(_=f.getAttribute("href"),_=l&&Wf(_)&&_),Ki(G0(f).split(" "),"ph-no-capture")&&(T=!0),w.push(ce._getPropertiesFromElement(f,F.get_config("mask_all_element_attributes"),F.get_config("mask_all_text")));var t=ce._getAugmentPropertiesFromElement(f);So(s,t)}),F.get_config("mask_all_text")||(D.tagName.toLowerCase()==="a"||D.tagName.toLowerCase()==="button"?w[0].$el_text=cb(D):w[0].$el_text=W0(D)),_&&(w[0].attr__href=_),T)return!1;var m=So(this._getDefaultProperties(P.type),{$elements:w},this._getCustomProperties(E),s);return F.capture(Pe,m),!0}},_navigate:function(P){window.location.href=P},_addDomEventHandlers:function(P){var F=this,J=function(ce){ce=ce||window.event,F._captureEvent(ce,P)};bp(document,"submit",J,!1,!0),bp(document,"change",J,!1,!0),bp(document,"click",J,!1,!0)},_customProperties:[],rageclicks:null,config:void 0,init:function(P){var F;typeof P.__autocapture!="boolean"&&(this.config=P.__autocapture),(F=this.config)!==null&&F!==void 0&&F.url_allowlist&&(this.config.url_allowlist=this.config.url_allowlist.map(function(J){return new RegExp(J)})),this.rageclicks=new Z8(P.get_config("rageclick"))},afterDecideResponse:function(P,F){this._setIsAutocaptureEnabled(F);var J=F.get_config("token");this._initializedTokens.indexOf(J)>-1?Ja.log('autocapture already initialized for token "'+J+'"'):(F.persistence&&F.persistence.register(Bi({},fb,!!P.autocapture_opt_out)),this._initializedTokens.push(J),P&&P.config&&P.config.enable_collect_everything&&this._isAutocaptureEnabled?(P.custom_properties&&(this._customProperties=P.custom_properties),this._addDomEventHandlers(F)):F.__autocapture=!1)},enabledForProject:function(P,F,J){if(!P)return!0;F=Ul(F)?10:F,J=Ul(J)?10:J;for(var ce=0,Pe=0;Pe1&&arguments[1]!==void 0?arguments[1]:{};if(!this.getFlags())return console.warn('getFeatureFlag for key "'+F+`" failed. Feature flags didn't load in time.`),!1;var ce=this.getFlagVariants()[F];return!J.send_event&&"send_event"in J||this.flagCallReported[F]||(this.flagCallReported[F]=!0,this.instance.capture("$feature_flag_called",{$feature_flag:F,$feature_flag_response:ce})),ce}},{key:"getFeatureFlagPayload",value:function(F){return this.getFlagPayloads()[F]}},{key:"isFeatureEnabled",value:function(F){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.getFlags()?!!this.getFeatureFlag(F,J):(console.warn('isFeatureEnabled for key "'+F+`" failed. Feature flags didn't load in time.`),!1)}},{key:"addFeatureFlagsHandler",value:function(F){this.featureFlagEventHandlers.push(F)}},{key:"removeFeatureFlagsHandler",value:function(F){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(function(J){return J!==F})}},{key:"receivedFeatureFlags",value:function(F){this.instance.decideEndpointWasHit=!0;var J=this.getFlagVariants(),ce=this.getFlagPayloads();(function(Pe,D){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},_=Pe.featureFlags,w=Pe.featureFlagPayloads;if(_)if(Array.isArray(_)){var s,T={};if(_)for(var m=0;m<_.length;m++)T[_[m]]=!0;D&&D.register((Bi(s={},Yd,_),Bi(s,Yc,T),s))}else{var f,l=_,t=w;Pe.errorsWhileComputingFlags&&(l=yi(yi({},E),l),t=yi(yi({},e),t)),D&&D.register((Bi(f={},Yd,Object.keys(vb(l))),Bi(f,Yc,l||{}),Bi(f,Cg,t||{}),f))}else D&&(D.unregister(Yd),D.unregister(Yc),D.unregister(Cg))})(F,this.instance.persistence,J,ce),this._fireFeatureFlagsCallbacks()}},{key:"override",value:function(F){if(this._override_warning=!1,F===!1)this.instance.persistence.unregister(Xd);else if(Array.isArray(F)){for(var J={},ce=0;ce1&&arguments[1]!==void 0&&arguments[1],Pe=this.instance.get_property(Rv);if(Pe&&!ce)return F(Pe);this.instance._send_request("".concat(this.instance.get_config("api_host"),"/api/early_access_features/?token=").concat(this.instance.get_config("token")),{},{method:"GET"},function(D){var E=D.earlyAccessFeatures;return J.instance.persistence.register(Bi({},Rv,E)),F(E)})}},{key:"_prepareFeatureFlagsForCallbacks",value:function(){var F=this.getFlags(),J=this.getFlagVariants();return{flags:F.filter(function(ce){return J[ce]}),flagVariants:Object.keys(J).filter(function(ce){return J[ce]}).reduce(function(ce,Pe){return ce[Pe]=J[Pe],ce},{})}}},{key:"_fireFeatureFlagsCallbacks",value:function(){var F=this._prepareFeatureFlagsForCallbacks(),J=F.flags,ce=F.flagVariants;this.featureFlagEventHandlers.forEach(function(Pe){return Pe(J,ce)})}},{key:"setPersonPropertiesForFlags",value:function(F){var J=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],ce=this.instance.get_property(sp)||{};this.instance.register(Bi({},sp,yi(yi({},ce),F))),J&&this.instance.reloadFeatureFlags()}},{key:"resetPersonPropertiesForFlags",value:function(){this.instance.unregister(sp)}},{key:"setGroupPropertiesForFlags",value:function(F){var J=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],ce=this.instance.get_property(Wc)||{};Object.keys(ce).length!==0&&Object.keys(ce).forEach(function(Pe){ce[Pe]=yi(yi({},ce[Pe]),F[Pe]),delete F[Pe]}),this.instance.register(Bi({},Wc,yi(yi({},ce),F))),J&&this.instance.reloadFeatureFlags()}},{key:"resetGroupPropertiesForFlags",value:function(F){if(F){var J=this.instance.get_property(Wc)||{};this.instance.register(Bi({},Wc,yi(yi({},J),{},Bi({},F,{}))))}else this.instance.unregister(Wc)}}]),P}(),aT="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJibGFjayIvPgo8cGF0aCBkPSJNOCAwSDE2TDAgMTZWOEw4IDBaIiBmaWxsPSIjMkQyRDJEIi8+CjxwYXRoIGQ9Ik0xNiA4VjE2SDhMMTYgOFoiIGZpbGw9IiMyRDJEMkQiLz4KPC9zdmc+Cg==",mb=2,oT=4,sT=6,lT="rrweb/console@1",uT="/e/",cT=function(){function P(F){Wo(this,P),this.instance=F,this.captureStarted=!1,this.snapshots=[],this.emit=!1,this.endpoint=uT,this.stopRrweb=void 0,this.windowId=null,this.sessionId=null,this.receivedDecide=!1}return Zo(P,[{key:"startRecordingIfEnabled",value:function(){this.isRecordingEnabled()?this.startCaptureAndTrySendingQueuedSnapshots():this.stopRecording()}},{key:"started",value:function(){return this.captureStarted}},{key:"stopRecording",value:function(){this.captureStarted&&this.stopRrweb&&(this.stopRrweb(),this.stopRrweb=void 0,this.captureStarted=!1)}},{key:"isRecordingEnabled",value:function(){var F=!!this.instance.get_property(Ov),J=!this.instance.get_config("disable_session_recording");return F&&J}},{key:"isConsoleLogCaptureEnabled",value:function(){var F=!!this.instance.get_property(hb),J=this.instance.get_config("enable_recording_console_log");return J??F}},{key:"getRecordingVersion",value:function(){var F,J=this.instance.get_property(pb);return((F=this.instance.get_config("session_recording"))===null||F===void 0?void 0:F.recorderVersion)||J||"v1"}},{key:"afterDecideResponse",value:function(F){var J,ce,Pe,D,E,e;this.receivedDecide=!0,this.instance.persistence&&this.instance.persistence.register((Bi(E={},Ov,!!F.sessionRecording),Bi(E,hb,(Pe=F.sessionRecording)===null||Pe===void 0?void 0:Pe.consoleLogRecordingEnabled),Bi(E,pb,(D=F.sessionRecording)===null||D===void 0?void 0:D.recorderVersion),E)),(J=F.sessionRecording)!==null&&J!==void 0&&J.endpoint&&(this.endpoint=(e=F.sessionRecording)===null||e===void 0?void 0:e.endpoint),(ce=F.sessionRecording)!==null&&ce!==void 0&&ce.recorderVersion&&(this.recorderVersion=F.sessionRecording.recorderVersion),this.startRecordingIfEnabled()}},{key:"startCaptureAndTrySendingQueuedSnapshots",value:function(){var F=this;this.receivedDecide&&(this.emit=!0,this.snapshots.forEach(function(J){return F._captureSnapshot(J)})),this._startCapture()}},{key:"_startCapture",value:function(){if(Object.assign!==void 0&&!this.captureStarted&&!this.instance.get_config("disable_session_recording")){this.captureStarted=!0;var F=this.getRecordingVersion()==="v2"?"recorder-v2.js":"recorder.js";this.instance.__loaded_recorder_version!==this.getRecordingVersion()?J3(this.instance.get_config("api_host")+"/static/".concat(F,"?v=").concat(fu.LIB_VERSION),this._onScriptLoaded.bind(this)):this._onScriptLoaded()}}},{key:"_updateWindowAndSessionIds",value:function(F){var J,ce=F.type===3&&((J=F.data)===null||J===void 0?void 0:J.source)===0,Pe=this.instance.sessionManager.checkAndGetSessionAndWindowId(ce,F.timestamp),D=Pe.windowId,E=Pe.sessionId;if(this.captureStarted&&(this.windowId!==D||this.sessionId!==E)&&[mb,oT].indexOf(F.type)===-1)try{var e;(e=this.rrwebRecord)===null||e===void 0||e.takeFullSnapshot()}catch(_){Ja.error("Error taking full snapshot.",_)}this.windowId=D,this.sessionId=E}},{key:"_onScriptLoaded",value:function(){var F=this,J={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskAllInputs:!0,maskInputOptions:{},maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0};this.rrwebRecord=window.rrweb?window.rrweb.record:window.rrwebRecord;for(var ce=this.instance.get_config("session_recording"),Pe=0,D=Object.entries(ce||{});Pe10&&(ce.data.payload.payload=ce.data.payload.payload.slice(0,10),ce.data.payload.payload.push("...[truncated]"));for(var Pe=[],D=0;D2e3?Pe.push(ce.data.payload.payload[D].slice(0,2e3)+"...[truncated]"):Pe.push(ce.data.payload.payload[D]);return ce.data.payload.payload=Pe,ce}return ce}(function(ce){if(ce&&tf(ce)==="object"){var Pe=JSON.stringify(ce);if(Pe.length>5e6){var D,E=Ac(Pe.matchAll(/data:([\w\/\-\.]+);(\w+),([^)"]*)/gim));try{for(E.s();!(D=E.n()).done;){var e=D.value;Pe=e[1].toLocaleLowerCase().slice(0,6)==="image/"?Pe.replace(e[0],aT):Pe.replace(e[0],"")}}catch(_){E.e(_)}finally{E.f()}}return JSON.parse(Pe)}return ce}(F)),this._updateWindowAndSessionIds(F);var J={$snapshot_data:F,$session_id:this.sessionId,$window_id:this.windowId};this.instance._captureMetrics.incr("rrweb-record"),this.instance._captureMetrics.incr("rrweb-record-".concat(F.type)),this.emit?this._captureSnapshot(J):this.snapshots.push(J)}},{key:"_captureSnapshot",value:function(F){this.instance.capture("$snapshot",F,{transport:"XHR",method:"POST",endpoint:this.endpoint,_noTruncate:!0,_batchKey:"sessionRecording",_metrics:{rrweb_full_snapshot:F.$snapshot_data.type===mb}})}}]),P}(),ru={entryType:0,timeOrigin:1,name:2,startTime:3,redirectStart:4,redirectEnd:5,workerStart:6,fetchStart:7,domainLookupStart:8,domainLookupEnd:9,connectStart:10,secureConnectionStart:11,connectEnd:12,requestStart:13,responseStart:14,responseEnd:15,decodedBodySize:16,encodedBodySize:17,initiatorType:18,nextHopProtocol:19,renderBlockingStatus:20,responseStatus:21,transferSize:22,element:23,renderTime:24,loadTime:25,size:26,id:27,url:28,domComplete:29,domContentLoadedEvent:30,domInteractive:31,loadEventEnd:32,loadEventStart:33,redirectCount:34,navigationType:35,unloadEventEnd:36,unloadEventStart:37,duration:39,timestamp:40},fT=["first-input","navigation","paint","resource"],hT=["/s/","/e/"],pT=function(){function P(F){Wo(this,P),Bi(this,"_forceAllowLocalhost",!1),this.instance=F}return Zo(P,[{key:"startObservingIfEnabled",value:function(){this.isEnabled()?this.startObserving():this.stopObserving()}},{key:"startObserving",value:function(){var F=this;if(!this.observer)if(!N8.includes(location.hostname)||this._forceAllowLocalhost)try{this.observer=new PerformanceObserver(function(ce){ce.getEntries().forEach(function(Pe){F._capturePerformanceEvent(Pe)})});var J=PerformanceObserver.supportedEntryTypes.filter(function(ce){return fT.includes(ce)});J.forEach(function(ce){var Pe;(Pe=F.observer)===null||Pe===void 0||Pe.observe({type:ce,buffered:!0})})}catch(ce){console.error("PostHog failed to start performance observer",ce),this.stopObserving()}else Ja.log("PostHog Peformance observer not started because we are on localhost.")}},{key:"stopObserving",value:function(){this.observer&&(this.observer.disconnect(),this.observer=void 0)}},{key:"isObserving",value:function(){return!!this.observer}},{key:"isEnabled",value:function(){var F,J;return(F=(J=this.instance.get_config("capture_performance"))!==null&&J!==void 0?J:this.remoteEnabled)!==null&&F!==void 0&&F}},{key:"afterDecideResponse",value:function(F){this.remoteEnabled=F.capturePerformance||!1,this.isEnabled()&&this.startObserving()}},{key:"_capturePerformanceEvent",value:function(F){if(F.name.startsWith(this.instance.get_config("api_host"))){var J=F.name.replace(this.instance.get_config("api_host"),"");if(hT.find(function(T){return J.startsWith(T)}))return}var ce=F.toJSON(),Pe={},D=Math.floor(Date.now()-performance.now());for(var E in Pe[ru.timeOrigin]=D,Pe[ru.timestamp]=Math.floor(D+F.startTime),ru)ce[E]!==void 0&&(Pe[ru[E]]=ce[E]);if(this.capturePerformanceEvent(Pe),dT(F)){var e,_=Ac(F.serverTiming||[]);try{for(_.s();!(e=_.n()).done;){var w,s=e.value;this.capturePerformanceEvent((Bi(w={},ru.timeOrigin,D),Bi(w,ru.timestamp,Math.floor(D+F.startTime)),Bi(w,ru.name,s.name),Bi(w,ru.duration,s.duration),Bi(w,ru.entryType,"serverTiming"),w))}}catch(T){_.e(T)}finally{_.f()}}}},{key:"capturePerformanceEvent",value:function(F){var J,ce=F[ru.timestamp];(J=this.instance.sessionRecording)===null||J===void 0||J.onRRwebEmit({type:6,data:{plugin:"posthog/network@1",payload:F},timestamp:ce})}}]),P}(),dT=function(P){return P.entryType==="navigation"||P.entryType==="resource"},gT=function(){function P(F){Wo(this,P),this.instance=F,this.instance.decideEndpointWasHit=this.instance._hasBootstrappedFeatureFlags()}return Zo(P,[{key:"call",value:function(){var F=this,J=c1(JSON.stringify({token:this.instance.get_config("token"),distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups()}));this.instance._send_request("".concat(this.instance.get_config("api_host"),"/decide/?v=3"),{data:J,verbose:!0},{method:"POST"},function(ce){return F.parseDecideResponse(ce)})}},{key:"parseDecideResponse",value:function(F){var J,ce,Pe=this;if((F==null?void 0:F.status)!==0){if(this.instance.decideEndpointWasHit=!0,!document||!document.body)return console.log("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(function(){Pe.parseDecideResponse(F)},500);if(this.instance.toolbar.afterDecideResponse(F),(J=this.instance.sessionRecording)===null||J===void 0||J.afterDecideResponse(F),nc.afterDecideResponse(F,this.instance),(ce=this.instance.webPerformance)===null||ce===void 0||ce.afterDecideResponse(F),this.instance.featureFlags.receivedFeatureFlags(F),this.instance.compression={},F.supportedCompression&&!this.instance.get_config("disable_compression")){var D,E={},e=Ac(F.supportedCompression);try{for(e.s();!(D=e.n()).done;)E[D.value]=!0}catch(m){e.e(m)}finally{e.f()}this.instance.compression=E}if(F.siteApps)if(this.instance.get_config("opt_in_site_apps")){var _,w=this.instance.get_config("api_host"),s=Ac(F.siteApps);try{var T=function(){var m=_.value,f=m.id,l=m.url,t=document.createElement("script");t.src=[w,w[w.length-1]==="/"&&l[0]==="/"?l.substring(1):l].join(""),t.onerror=function(i){console.error("Error while initializing PostHog app with config id ".concat(f),i)},window["__$$ph_site_app_".concat(f)]=Pe.instance,document.body.appendChild(t)};for(s.s();!(_=s.n()).done;)T()}catch(m){s.e(m)}finally{s.f()}}else F.siteApps.length>0&&console.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}else console.error("Failed to fetch feature flags from PostHog.")}}]),P}(),vT=["https://app.posthog.com","https://eu.posthog.com"],mT=["source"],yT=function(){function P(F){Wo(this,P),this.instance=F}return Zo(P,[{key:"afterDecideResponse",value:function(F){var J=F.toolbarParams||F.editorParams||(F.toolbarVersion?{toolbarVersion:F.toolbarVersion}:{});F.isAuthenticated&&J.toolbarVersion&&J.toolbarVersion.indexOf("toolbar")===0&&this.loadToolbar(yi(yi({},J),{},{apiURL:this.instance.get_config("api_host")}))}},{key:"maybeLoadToolbar",value:function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.location,J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:window.history;try{if(!J){try{window.localStorage.setItem("test","test"),window.localStorage.removeItem("test")}catch{return!1}J=window.localStorage}var Pe,D=sb(F.hash,"__posthog")||sb(F.hash,"state"),E=D?JSON.parse(decodeURIComponent(D)):null;return E&&E.action==="ph_authorize"?((Pe=E).source="url",Pe&&Object.keys(Pe).length>0&&(E.desiredHash?F.hash=E.desiredHash:ce?ce.replaceState("",document.title,F.pathname+F.search):F.hash="")):((Pe=JSON.parse(J.getItem("_postHogToolbarParams")||"{}")).source="localstorage",delete Pe.userIntent),Pe.apiURL||(Pe.apiURL=this.instance.get_config("api_host")),!(!Pe.token||this.instance.get_config("token")!==Pe.token)&&(this.loadToolbar(Pe),!0)}catch{return!1}}},{key:"loadToolbar",value:function(F){var J=this;if(window._postHogToolbarLoaded)return!1;window._postHogToolbarLoaded=!0;var ce=(F==null?void 0:F.apiURL)||this.instance.get_config("api_host"),Pe=3e4*Math.floor(Date.now()/3e4),D="".concat(ce).concat(ce.endsWith("/")?"":"/","static/toolbar.js?_ts=").concat(Pe),E=!vT.includes(this.instance.get_config("api_host"))&&this.instance.get_config("advanced_disable_toolbar_metrics"),e=yi(yi({apiURL:ce,jsURL:ce,token:this.instance.get_config("token")},F),E?{instrument:!1}:{});e.source;var _=D8(e,mT);return window.localStorage.setItem("_postHogToolbarParams",JSON.stringify(_)),J3(D,function(){(window.ph_load_toolbar||window.ph_load_editor)(e,J.instance)}),bp(window,"turbolinks:load",function(){window._postHogToolbarLoaded=!1,J.loadToolbar(e)}),!0}},{key:"_loadEditor",value:function(F){return this.loadToolbar(F)}},{key:"maybeLoadEditor",value:function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.location,J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:window.history;return this.maybeLoadToolbar(F,J,ce)}}]),P}(),iw=function(){function P(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:3e3;Wo(this,P),this.isPolling=!0,this._event_queue=[],this._empty_queue_count=0,this._poller=void 0,this._pollInterval=F}return Zo(P,[{key:"setPollInterval",value:function(F){this._pollInterval=F,this.isPolling&&this.poll()}},{key:"poll",value:function(){}},{key:"unload",value:function(){}},{key:"getTime",value:function(){return new Date().getTime()}}]),P}(),xT=function(P){U3(J,iw);var F=V3(J);function J(ce,Pe){var D,E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:3e3;return Wo(this,J),(D=F.call(this,E)).handlePollRequest=Pe,D.captureMetrics=ce,D}return Zo(J,[{key:"enqueue",value:function(ce,Pe,D){this.captureMetrics.incr("batch-enqueue"),this._event_queue.push({url:ce,data:Pe,options:D}),this.isPolling||(this.isPolling=!0,this.poll())}},{key:"poll",value:function(){var ce=this;clearTimeout(this._poller),this._poller=setTimeout(function(){if(ce._event_queue.length>0){var Pe=ce.formatQueue(),D=function(e){var _=Pe[e],w=_.url,s=_.data,T=_.options;Yi(s,function(m,f){s[f].offset=Math.abs(s[f].timestamp-ce.getTime()),delete s[f].timestamp}),ce.handlePollRequest(w,s,T),ce.captureMetrics.incr("batch-requests"),ce.captureMetrics.incr("batch-requests-".concat(w.slice(w.length-2))),ce.captureMetrics.incr("batch-handle",s.length),ce.captureMetrics.incr("batch-handle-".concat(w.slice(w.length-2)),s.length)};for(var E in Pe)D(E);ce._event_queue.length=0,ce._empty_queue_count=0}else ce._empty_queue_count++;ce._empty_queue_count>4&&(ce.isPolling=!1,ce._empty_queue_count=0),ce.isPolling&&ce.poll()},this._pollInterval)}},{key:"updateUnloadMetrics",value:function(){var ce=this.formatQueue();for(var Pe in ce){var D=ce[Pe],E=D.url,e=D.data;this.captureMetrics.incr("batch-unload-requests"),this.captureMetrics.incr("batch-unload-requests-".concat(E.slice(E.length-2))),this.captureMetrics.incr("batch-unload",e.length),this.captureMetrics.incr("batch-unload-".concat(E.slice(E.length-2)),e.length)}}},{key:"unload",value:function(){var ce=this;clearTimeout(this._poller);var Pe=this._event_queue.length>0?this.formatQueue():{};this._event_queue.length=0;var D=Object.values(Pe);[].concat(Sv(D.filter(function(E){return E.url.indexOf("/e")===0})),Sv(D.filter(function(E){return E.url.indexOf("/e")!==0}))).map(function(E){var e=E.url,_=E.data,w=E.options;ce.handlePollRequest(e,_,yi(yi({},w),{},{transport:"sendBeacon"}))})}},{key:"formatQueue",value:function(){var ce={};return Yi(this._event_queue,function(Pe){var D=Pe.url,E=Pe.data,e=Pe.options,_=(e?e._batchKey:null)||D;ce[_]===void 0&&(ce[_]={data:[],url:D,options:e}),e&&ce[_].options&&ce[_].options._metrics&&!ce[_].options._metrics.rrweb_full_snapshot&&(ce[_].options._metrics.rrweb_full_snapshot=e._metrics.rrweb_full_snapshot),ce[_].data.push(E)}),ce}}]),J}(),bT=function(){function P(F){Wo(this,P),this.enabled=F,this.metrics={}}return Zo(P,[{key:"incr",value:function(F){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.enabled&&(F="phjs-".concat(F),this.metrics[F]=(this.metrics[F]||0)+J)}},{key:"decr",value:function(F){this.enabled&&(F="phjs-".concat(F),this.metrics[F]=(this.metrics[F]||0)-1)}}]),P}(),Zs=Uint8Array,ls=Uint16Array,sh=Uint32Array,Ym=new Zs([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Xm=new Zs([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),yb=new Zs([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),aw=function(P,F){for(var J=new ls(31),ce=0;ce<31;++ce)J[ce]=F+=1<>>1|(21845&ua)<<1;Hc=(61680&(Hc=(52428&Hc)>>>2|(13107&Hc)<<2))>>>4|(3855&Hc)<<4,Fv[ua]=((65280&Hc)>>>8|(255&Hc)<<8)>>>1}var _p=function(P,F,J){for(var ce=P.length,Pe=0,D=new ls(F);Pe>>_]=w}else for(E=new ls(ce),Pe=0;Pe>>15-P[Pe];return E},lf=new Zs(288);for(ua=0;ua<144;++ua)lf[ua]=8;for(ua=144;ua<256;++ua)lf[ua]=9;for(ua=256;ua<280;++ua)lf[ua]=7;for(ua=280;ua<288;++ua)lf[ua]=8;var Z0=new Zs(32);for(ua=0;ua<32;++ua)Z0[ua]=5;var Fl,wT=_p(lf,9,0),TT=_p(Z0,5,0),sw=function(P){return(P/8>>0)+(7&P&&1)},lw=function(P,F,J){(F==null||F<0)&&(F=0),(J==null||J>P.length)&&(J=P.length);var ce=new(P instanceof ls?ls:P instanceof sh?sh:Zs)(J-F);return ce.set(P.subarray(F,J)),ce},Lu=function(P,F,J){J<<=7&F;var ce=F/8>>0;P[ce]|=J,P[ce+1]|=J>>>8},Qh=function(P,F,J){J<<=7&F;var ce=F/8>>0;P[ce]|=J,P[ce+1]|=J>>>8,P[ce+2]|=J>>>16},Lg=function(P,F){for(var J=[],ce=0;cem&&(m=D[ce].s);var f=new ls(m+1),l=kT(J[s-1],f,0);if(l>F){ce=0;var t=0,i=l-F,r=1<F))break;t+=r-(1<>>=i;t>0;){var o=D[ce].s;f[o]=0&&t;--ce){var a=D[ce].s;f[a]==F&&(--f[a],++t)}l=F}return[new Zs(f),l]},kT=function P(F,J,ce){return F.s==-1?Math.max(P(F.l,J,ce+1),P(F.r,J,ce+1)):J[F.s]=ce},bb=function(P){for(var F=P.length;F&&!P[--F];);for(var J=new ls(++F),ce=0,Pe=P[0],D=1,E=function(_){J[ce++]=_},e=1;e<=F;++e)if(P[e]==Pe&&e!=F)++D;else{if(!Pe&&D>2){for(;D>138;D-=138)E(32754);D>2&&(E(D>10?D-11<<5|28690:D-3<<5|12305),D=0)}else if(D>3){for(E(Pe),--D;D>6;D-=6)E(8304);D>2&&(E(D-3<<5|8208),D=0)}for(;D--;)E(Pe);D=1,Pe=P[e]}return[J.subarray(0,ce),F]},ep=function(P,F){for(var J=0,ce=0;ce>>8,P[Pe+2]=255^P[Pe],P[Pe+3]=255^P[Pe+1];for(var D=0;D4&&!v[yb[g-1]];--g);var y,k,h,M,A=w+5<<3,C=ep(Pe,lf)+ep(D,Z0)+E,L=ep(Pe,m)+ep(D,t)+E+14+3*g+ep(c,v)+(2*c[16]+3*c[17]+7*c[18]);if(A<=C&&A<=L)return g0(F,s,P.subarray(_,_+w));if(Lu(F,s,1+(L15&&(Lu(F,s,U[b]>>>5&127),s+=U[b]>>>12)}}}else y=wT,k=lf,h=TT,M=Z0;for(b=0;b255){B=ce[b]>>>18&31,Qh(F,s,y[B+257]),s+=k[B+257],B>7&&(Lu(F,s,ce[b]>>>23&31),s+=Ym[B]);var G=31&ce[b];Qh(F,s,h[G]),s+=M[G],G>3&&(Qh(F,s,ce[b]>>>5&8191),s+=Xm[G])}else Qh(F,s,y[ce[b]]),s+=k[ce[b]];return Qh(F,s,y[256]),s+k[256]},AT=new sh([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),MT=new Zs(0),ST=function(){for(var P=new sh(256),F=0;F<256;++F){for(var J=F,ce=9;--ce;)J=(1&J&&3988292384)^J>>>1;P[F]=J}return P}(),ET=function(){var P=4294967295;return{p:function(F){for(var J=P,ce=0;ce>>8;P=J},d:function(){return 4294967295^P}}},CT=function(P,F,J,ce,Pe){return function(D,E,e,_,w,s){var T=D.length,m=new Zs(_+T+5*(1+Math.floor(T/7e3))+w),f=m.subarray(_,m.length-w),l=0;if(!E||T<8)for(var t=0;t<=T;t+=65535){var i=t+65535;i>>13,o=8191&r,a=(1<7e3||h>24576)&&I>423){l=_b(D,f,0,v,x,g,k,h,A,t-A,l),h=y=k=0,A=t;for(var R=0;R<286;++R)x[R]=0;for(R=0;R<30;++R)g[R]=0}var U=2,B=0,G=o,N=L-O&32767;if(I>2&&C==d(t-N))for(var j=Math.min(n,I)-1,V=Math.min(32767,t),H=Math.min(258,I);N<=V&&--G&&L!=O;){if(D[t+U]==D[t+U-N]){for(var ee=0;eeU){if(U=ee,B=N,ee>j)break;var Q=Math.min(N,ee-2),Y=0;for(R=0;RY&&(Y=K,O=X)}}}N+=(L=O)-(O=u[L])+32768&32767}if(B){v[h++]=268435456|Dv[U]<<18|xb[B];var te=31&Dv[U],ae=31&xb[B];k+=Ym[te]+Xm[ae],++x[257+te],++g[ae],M=t+U,++y}else v[h++]=D[t],++x[D[t]]}}l=_b(D,f,s,v,x,g,k,h,A,t-A,l),s||(l=g0(f,l,MT))}return lw(m,0,_+sw(l)+w)}(P,F.level==null?6:F.level,F.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(P.length)))):12+F.mem,J,ce,!Pe)},Bv=function(P,F,J){for(;J;++F)P[F]=J,J>>>=8},LT=function(P,F){var J=F.filename;if(P[0]=31,P[1]=139,P[2]=8,P[8]=F.level<2?4:F.level==9?2:0,P[9]=3,F.mtime!=0&&Bv(P,4,Math.floor(new Date(F.mtime||Date.now())/1e3)),J){P[3]=8;for(var ce=0;ce<=J.length;++ce)P[ce+10]=J.charCodeAt(ce)}},PT=function(P){return 10+(P.filename&&P.filename.length+1||0)};function OT(P,F){F===void 0&&(F={});var J=ET(),ce=P.length;J.p(P);var Pe=CT(P,F,PT(F),8),D=Pe.length;return LT(Pe,F),Bv(Pe,D-8,J.d()),Bv(Pe,D-4,ce),Pe}function IT(P,F){var J=P.length;if(!F&&typeof TextEncoder<"u")return new TextEncoder().encode(P);for(var ce=new Zs(P.length+(P.length>>>1)),Pe=0,D=function(w){ce[Pe++]=w},E=0;Ece.length){var e=new Zs(Pe+8+(J-E<<1));e.set(ce),ce=e}var _=P.charCodeAt(E);_<128||F?D(_):_<2048?(D(192|_>>>6),D(128|63&_)):_>55295&&_<57344?(D(240|(_=65536+(1047552&_)|1023&P.charCodeAt(++E))>>>18),D(128|_>>>12&63),D(128|_>>>6&63),D(128|63&_)):(D(224|_>>>12),D(128|_>>>6&63),D(128|63&_))}return lw(ce,0,Pe)}(function(P){P.GZipJS="gzip-js",P.LZ64="lz64",P.Base64="base64"})(Fl||(Fl={}));var Dp,$m,Eo,RT=function(P,F,J){var ce=F||{};ce.ip=J.ip?1:0,ce._=new Date().getTime().toString(),ce.ver=fu.LIB_VERSION;var Pe=P.split("?");if(Pe.length>1){var D,E=Ac(Pe[1].split("&"));try{for(E.s();!(D=E.n()).done;){var e=D.value.split("=")[0];ce[e]&&delete ce[e]}}catch(w){E.e(w)}finally{E.f()}}var _=P.indexOf("?")>-1?"&":"?";return P+_+function(w){var s,T,m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"&",f=[];return Yi(w,function(l,t){s=encodeURIComponent(l.toString()),T=encodeURIComponent(t),f[f.length]=T+"="+s}),f.join(m)}(ce)},Jm=function P(F,J){if(J.blob&&F.buffer)return new Blob([F.buffer],{type:"text/plain"});if(J.sendBeacon||J.blob){var ce=P(F,{method:"POST"});return new Blob([ce],{type:"application/x-www-form-urlencoded"})}if(J.method!=="POST")return null;var Pe,D;return Pe=Array.isArray(F)||(D=F,Object.prototype.toString.call(D)==="[object Uint8Array]")?"data="+encodeURIComponent(F):"data="+encodeURIComponent(F.data),"compression"in F&&F.compression&&(Pe+="&compression="+F.compression),Pe},uw=function(P){var F=P.url,J=P.data,ce=P.headers,Pe=P.options,D=P.captureMetrics,E=P.callback,e=P.retriesPerformedSoFar,_=P.retryQueue,w=P.onXHRError,s=P.timeout,T=s===void 0?1e4:s,m=new XMLHttpRequest;m.open(Pe.method||"GET",F,!0);var f=Jm(J,Pe);D.incr("_send_request"),D.incr("_send_request_inflight"),Yi(ce,function(l,t){m.setRequestHeader(t,l)}),Pe.method!=="POST"||Pe.blob||m.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),m.timeout=T,m.withCredentials=!0,m.onreadystatechange=function(){if(m.readyState===4)if(D.incr("xhr-response"),D.incr("xhr-response-".concat(m.status)),D.decr("_send_request_inflight"),m.status===200){if(E){var l;try{l=JSON.parse(m.responseText)}catch(t){return void Ja.error(t)}E(l)}}else typeof w=="function"&&w(m),[401,403,404,500].indexOf(m.status)<0&&_.enqueue({url:F,data:J,options:Pe,headers:ce,retriesPerformedSoFar:(e||0)+1,callback:E}),E&&E({status:0})},m.send(f)},zT=function(P){U3(J,iw);var F=V3(J);function J(ce,Pe){var D;return Wo(this,J),(D=F.call(this)).captureMetrics=ce,D.isPolling=!1,D.queue=[],D.areWeOnline=!0,D.onXHRError=Pe,typeof window<"u"&&"onLine"in window.navigator&&(D.areWeOnline=window.navigator.onLine,window.addEventListener("online",function(){D._handleWeAreNowOnline()}),window.addEventListener("offline",function(){D.areWeOnline=!1})),D}return Zo(J,[{key:"enqueue",value:function(ce){var Pe=ce.retriesPerformedSoFar||0;if(!(Pe>=10)){var D=3e3*Math.pow(2,Pe),E=new Date(Date.now()+D);console.warn("Enqueued failed request for retry in ".concat(D)),this.queue.push({retryAt:E,requestData:ce}),this.isPolling||(this.isPolling=!0,this.poll())}}},{key:"poll",value:function(){var ce=this;this._poller&&clearTimeout(this._poller),this._poller=setTimeout(function(){ce.areWeOnline&&ce.queue.length>0&&ce.flush(),ce.poll()},this._pollInterval)}},{key:"flush",value:function(){var ce=new Date(Date.now()),Pe=this.queue.filter(function(_){return _.retryAt0){this.queue=this.queue.filter(function(_){return _.retryAt>=ce});var D,E=Ac(Pe);try{for(E.s();!(D=E.n()).done;){var e=D.value.requestData;this._executeXhrRequest(e)}}catch(_){E.e(_)}finally{E.f()}}}},{key:"unload",value:function(){this._poller&&(clearTimeout(this._poller),this._poller=void 0);var ce,Pe=Ac(this.queue);try{for(Pe.s();!(ce=Pe.n()).done;){var D=ce.value.requestData,E=D.url,e=D.data,_=D.options;try{window.navigator.sendBeacon(E,Jm(e,yi(yi({},_),{},{sendBeacon:!0})))}catch(w){fu.DEBUG&&console.error(w)}}}catch(w){Pe.e(w)}finally{Pe.f()}this.queue=[]}},{key:"_executeXhrRequest",value:function(ce){var Pe=ce.url,D=ce.data,E=ce.options,e=ce.headers,_=ce.callback,w=ce.retriesPerformedSoFar;uw({url:Pe,data:D||{},options:E||{},headers:e||{},retriesPerformedSoFar:w||0,callback:_,captureMetrics:this.captureMetrics,retryQueue:this,onXHRError:this.onXHRError})}},{key:"_handleWeAreNowOnline",value:function(){this.areWeOnline=!0,this.flush()}}]),J}(),DT=18e5,FT=864e5,BT=function(){function P(F,J){Wo(this,P),this.config=F,this.persistence=J,this._windowId=void 0,this._sessionId=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null;var ce=F.persistence_name||F.token;if(this.window_id_storage_key="ph_"+ce+"_window_id",this.primary_window_exists_storage_key="ph_"+ce+"_primary_window_exists",this._canUseSessionStorage()){var Pe=Lo.parse(this.window_id_storage_key),D=Lo.parse(this.primary_window_exists_storage_key);Pe&&!D?this._windowId=Pe:Lo.remove(this.window_id_storage_key),Lo.set(this.primary_window_exists_storage_key,!0)}this._listenToReloadWindow()}return Zo(P,[{key:"_canUseSessionStorage",value:function(){return this.config.persistence!=="memory"&&!this.persistence.disabled&&Lo.is_supported()}},{key:"_setWindowId",value:function(F){F!==this._windowId&&(this._windowId=F,this._canUseSessionStorage()&&Lo.set(this.window_id_storage_key,F))}},{key:"_getWindowId",value:function(){return this._windowId?this._windowId:this._canUseSessionStorage()?Lo.parse(this.window_id_storage_key):null}},{key:"_setSessionId",value:function(F,J,ce){F===this._sessionId&&J===this._sessionActivityTimestamp&&ce===this._sessionStartTimestamp||(this._sessionStartTimestamp=ce,this._sessionActivityTimestamp=J,this._sessionId=F,this.persistence.register(Bi({},Iv,[J,F,ce])))}},{key:"_getSessionId",value:function(){if(this._sessionId&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this._sessionId,this._sessionStartTimestamp];var F=this.persistence.props[Iv];return Array.isArray(F)&&F.length===2&&F.push(F[0]),F||[0,null,0]}},{key:"resetSessionId",value:function(){this._setSessionId(null,null,null)}},{key:"_listenToReloadWindow",value:function(){var F=this;window.addEventListener("beforeunload",function(){F._canUseSessionStorage()&&Lo.remove(F.primary_window_exists_storage_key)})}},{key:"checkAndGetSessionAndWindowId",value:function(){var F=arguments.length>0&&arguments[0]!==void 0&&arguments[0],J=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:null)||new Date().getTime(),ce=l1(this._getSessionId(),3),Pe=ce[0],D=ce[1],E=ce[2],e=this._getWindowId(),_=E&&E>0&&Math.abs(J-E)>FT;!D||!F&&Math.abs(J-Pe)>DT||_?(D=xc(),e=xc(),E=J):e||(e=xc());var w=Pe===0||!F||_?J:Pe,s=E===0?new Date().getTime():E;return this._setWindowId(e),this._setSessionId(D,w,s),{sessionId:D,windowId:e}}}]),P}(),NT=Zo(function P(F,J,ce,Pe){Wo(this,P),this.name="posthog-js",this.setupOnce=function(D){D(function(E){var e,_,w;if(E.level!=="error"||!F.__loaded)return E;E.tags||(E.tags={});var s=F.config.ui_host||F.config.api_host;E.tags["PostHog Person URL"]=s+"/person/"+F.get_distinct_id(),F.sessionRecordingStarted()&&(E.tags["PostHog Recording URL"]=s+"/recordings/"+F.sessionManager.checkAndGetSessionAndWindowId(!0).sessionId);var T=((e=E.exception)===null||e===void 0?void 0:e.values)||[],m={$sentry_event_id:E.event_id,$sentry_exception:E.exception,$sentry_exception_message:(_=T[0])===null||_===void 0?void 0:_.value,$sentry_exception_type:(w=T[0])===null||w===void 0?void 0:w.type,$sentry_tags:E.tags};return J&&ce&&(m.$sentry_url=(Pe||"https://sentry.io/organizations/")+J+"/issues/?project="+ce+"&query="+E.event_id),F.capture("$exception",m),E})}}),jT=function(P){var F=function(J,ce){J.event.userId||J.event.anonymousId===P.get_distinct_id()||P.reset(),J.event.userId&&J.event.userId!==P.get_distinct_id()&&(P.register({distinct_id:J.event.userId}),P.reloadFeatureFlags());var Pe=P._calculate_event_properties(ce,J.event.properties);return J.event.properties=Object.assign({},Pe,J.event.properties),J};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:function(J){return F(J,J.event.event)},page:function(J){return F(J,"$pageview")},identify:function(J){return F(J,"$identify")},screen:function(J){return F(J,"$screen")}}},UT=function(){function P(){Wo(this,P),Bi(this,"_seenFirstPageView",!1)}return Zo(P,[{key:"onPageview",value:function(){this._seenFirstPageView&&(this._pageViewId=xc()),this._seenFirstPageView=!0}},{key:"getPageViewId",value:function(){return this._pageViewId||(this._pageViewId=xc()),this._pageViewId}}]),P}();(function(P){P[P.INIT_MODULE=0]="INIT_MODULE",P[P.INIT_SNIPPET=1]="INIT_SNIPPET"})(Dp||(Dp={}));var Nv=function(){},$d={},Ss="posthog",v0=gi.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,cw=!v0&&Nl.indexOf("MSIE")===-1&&Nl.indexOf("Mozilla")===-1,wb=function(){var P,F,J;return{api_host:"https://app.posthog.com",api_method:"POST",api_transport:"XHR",ui_host:null,token:"",autocapture:!0,rageclick:!0,cross_subdomain_cookie:(Vo==null||(P=Vo.location)===null||P===void 0||(F=P.hostname)===null||F===void 0?void 0:F.indexOf("herokuapp.com"))===-1,persistence:"cookie",persistence_name:"",cookie_name:"",loaded:Nv,store_google:!0,custom_campaign_params:[],save_referrer:!0,test:!1,verbose:!1,img:!1,capture_pageview:!0,capture_pageleave:!0,debug:!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_cookie:!1,enable_recording_console_log:void 0,secure_cookie:(gi==null||(J=gi.location)===null||J===void 0?void 0:J.protocol)==="https:",ip:!0,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_capturing_persistence_type:"localStorage",opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_blacklist:[],respect_dnt:!1,sanitize_properties:null,xhr_headers:{},inapp_protocol:"//",inapp_link_new_window:!1,request_batching:!0,properties_string_max_length:65535,session_recording:{blockClass:"ph-no-capture",blockSelector:null,ignoreClass:"ph-ignore-input",maskAllInputs:!0,maskInputOptions:{},maskInputFn:null,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0},mask_all_element_attributes:!1,mask_all_text:!1,advanced_disable_decide:!1,advanced_disable_toolbar_metrics:!1,on_xhr_error:function(ce){var Pe="Bad HTTP status: "+ce.status+" "+ce.statusText;console.error(Pe)},get_device_id:function(ce){return ce},_onCapture:Nv,_capture_metrics:!1,capture_performance:void 0,name:"posthog",callback_fn:"posthog._jsc",bootstrap:{},disable_compression:!1}},jv=function(P,F,J,ce){var Pe,D=J!==Ss&&Eo?J?Eo[J]:void 0:Eo,E={initComplete:!1,syncCode:!1},e=function(_){return function(w){E[_]||(E[_]=!0,E.initComplete&&E.syncCode&&(ce==null||ce(w)))}};if(D&&$m===Dp.INIT_MODULE)Pe=D;else{if(D&&!Ru(D))return void console.error("You have already initialized "+J);Pe=new Km}return Pe._init(P,F,J,e("initComplete")),Pe.toolbar.maybeLoadToolbar(),Pe.sessionRecording=new cT(Pe),Pe.sessionRecording.startRecordingIfEnabled(),Pe.webPerformance=new pT(Pe),Pe.webPerformance.startObservingIfEnabled(),Pe.__autocapture=Pe.get_config("autocapture"),nc._setIsAutocaptureEnabled(Pe),nc._isAutocaptureEnabled&&(Pe.__autocapture=Pe.get_config("autocapture"),nc.enabledForProject(Pe.get_config("token"),100,100)?nc.isBrowserSupported()?nc.init(Pe):(Pe.__autocapture=!1,Ja.log("Disabling Automatic Event Collection because this browser is not supported")):(Pe.__autocapture=!1,Ja.log("Not in active bucket: disabling Automatic Event Collection."))),fu.DEBUG=fu.DEBUG||Pe.get_config("debug"),D!==void 0&&Ru(D)&&(Pe._execute_array.call(Pe.people,D.people),Pe._execute_array(D)),e("syncCode")(Pe),Pe},Km=function(){function P(){var F=this;Wo(this,P),this.config=wb(),this.compression={},this.decideEndpointWasHit=!1,this.SentryIntegration=NT,this.segmentIntegration=function(){return jT(F)},this.__captureHooks=[],this.__request_queue=[],this.__loaded=!1,this.__loaded_recorder_version=void 0,this.__autocapture=void 0,this._jsc=function(){},this.people=new rT(this),this.featureFlags=new iT(this),this.feature_flags=this.featureFlags,this.toolbar=new yT(this),this.pageViewIdManager=new UT,this._captureMetrics=void 0,this._requestQueue=void 0,this._retryQueue=void 0,this.persistence=void 0,this.sessionPersistence=void 0,this.sessionManager=void 0}return Zo(P,[{key:"init",value:function(F,J,ce){if(Ul(ce))console.error("You must name your new library: init(token, config, name)");else{if(ce!==Ss){var Pe=jv(F,J,ce,function(D){Eo[ce]=D,D._loaded()});return Eo[ce]=Pe,Pe}console.error("You must initialize the main posthog object right after you include the PostHog js snippet")}}},{key:"_init",value:function(F){var J,ce,Pe=this,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E=arguments.length>2?arguments[2]:void 0,e=arguments.length>3?arguments[3]:void 0;this.__loaded=!0,this.config={},this._triggered_notifs=[];var _,w={segmentRegister:!1,syncCode:!1},s=function(a){return function(){w[a]||(w[a]=!0,w.segmentRegister&&w.syncCode&&(e==null||e(Pe)))}};if(this.set_config(So({},wb(),D,{name:E,token:F,callback_fn:(E===Ss?E:Ss+"."+E)+"._jsc"})),this._jsc=function(){},(gi!=null&&(J=gi.rrweb)!==null&&J!==void 0&&J.record||gi!=null&&gi.rrwebRecord)&&(this.__loaded_recorder_version=gi==null||(_=gi.rrweb)===null||_===void 0?void 0:_.version),this._captureMetrics=new bT(this.get_config("_capture_metrics")),this._requestQueue=new xT(this._captureMetrics,this._handle_queued_event.bind(this)),this._retryQueue=new zT(this._captureMetrics,this.get_config("on_xhr_error")),this.__captureHooks=[],this.__request_queue=[],this.persistence=new db(this.config),this.sessionManager=new BT(this.config,this.persistence),this.sessionPersistence=this.config.persistence==="sessionStorage"?this.persistence:new db(yi(yi({},this.config),{},{persistence:"sessionStorage"})),this._gdpr_init(),D.segment?(this.config.get_device_id=function(){return D.segment.user().anonymousId()},D.segment.user().id()&&(this.register({distinct_id:D.segment.user().id()}),this.persistence.set_user_state("identified")),D.segment.register(this.segmentIntegration()).then(s("segmentRegister"))):s("segmentRegister")(),((ce=D.bootstrap)===null||ce===void 0?void 0:ce.distinctID)!==void 0){var T,m,f=this.get_config("get_device_id")(xc()),l=(T=D.bootstrap)!==null&&T!==void 0&&T.isIdentifiedID?f:D.bootstrap.distinctID;this.persistence.set_user_state((m=D.bootstrap)!==null&&m!==void 0&&m.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:D.bootstrap.distinctID,$device_id:l})}if(this._hasBootstrappedFeatureFlags()){var t,i,r=Object.keys(((t=D.bootstrap)===null||t===void 0?void 0:t.featureFlags)||{}).filter(function(a){var u,p;return!((u=D.bootstrap)===null||u===void 0||(p=u.featureFlags)===null||p===void 0||!p[a])}).reduce(function(a,u){var p,c;return a[u]=((p=D.bootstrap)===null||p===void 0||(c=p.featureFlags)===null||c===void 0?void 0:c[u])||!1,a},{}),n=Object.keys(((i=D.bootstrap)===null||i===void 0?void 0:i.featureFlagPayloads)||{}).filter(function(a){return r[a]}).reduce(function(a,u){var p,c,b,d;return(p=D.bootstrap)!==null&&p!==void 0&&(c=p.featureFlagPayloads)!==null&&c!==void 0&&c[u]&&(a[u]=(b=D.bootstrap)===null||b===void 0||(d=b.featureFlagPayloads)===null||d===void 0?void 0:d[u]),a},{});this.featureFlags.receivedFeatureFlags({featureFlags:r,featureFlagPayloads:n})}if(!this.get_distinct_id()){var o=this.get_config("get_device_id")(xc());this.register_once({distinct_id:o,$device_id:o},""),this.persistence.set_user_state("anonymous")}gi.addEventListener&&gi.addEventListener("onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this)),s("syncCode")()}},{key:"_loaded",value:function(){this.featureFlags.setReloadingPaused(!0);try{this.get_config("loaded")(this)}catch(F){console.error("`loaded` function failed",F)}this._start_queue_if_opted_in(),this.get_config("capture_pageview")&&this.capture("$pageview",{},{send_instantly:!0}),this.get_config("advanced_disable_decide")||new gT(this).call(),this.featureFlags.resetRequestQueue(),this.featureFlags.setReloadingPaused(!1)}},{key:"_start_queue_if_opted_in",value:function(){this.has_opted_out_capturing()||this.get_config("request_batching")&&this._requestQueue.poll()}},{key:"_dom_loaded",value:function(){var F=this;this.has_opted_out_capturing()||mc(this.__request_queue,function(J){F._send_request.apply(F,Sv(J))}),this.__request_queue=[],this._start_queue_if_opted_in()}},{key:"_prepare_callback",value:function(F,J){if(Ul(F))return null;if(v0)return function(E){F(E,J)};var ce=this._jsc,Pe=""+Math.floor(1e8*Math.random()),D=this.get_config("callback_fn")+"["+Pe+"]";return ce[Pe]=function(E){delete ce[Pe],F(E,J)},D}},{key:"_handle_unload",value:function(){this.get_config("request_batching")?(this.get_config("capture_pageview")&&this.get_config("capture_pageleave")&&this.capture("$pageleave"),this.get_config("_capture_metrics")&&(this._requestQueue.updateUnloadMetrics(),this.capture("$capture_metrics",this._captureMetrics.metrics)),this._requestQueue.unload(),this._retryQueue.unload()):this.get_config("capture_pageview")&&this.get_config("capture_pageleave")&&this.capture("$pageleave",null,{transport:"sendBeacon"})}},{key:"_handle_queued_event",value:function(F,J,ce){var Pe=JSON.stringify(J);this.__compress_and_send_json_request(F,Pe,ce||$d,Nv)}},{key:"__compress_and_send_json_request",value:function(F,J,ce,Pe){var D,E=function(s,T,m){return s===Fl.LZ64?[{data:qs.compressToBase64(T),compression:Fl.LZ64},m]:s===Fl.GZipJS?[OT(IT(T),{mtime:0}),yi(yi({},m),{},{blob:!0,urlQueryArgs:{compression:Fl.GZipJS}})]:[{data:c1(T)},m]}((D=this.compression)[Fl.GZipJS]?Fl.GZipJS:D[Fl.LZ64]?Fl.LZ64:Fl.Base64,J,ce),e=l1(E,2),_=e[0],w=e[1];this._send_request(F,_,w,Pe)}},{key:"_send_request",value:function(F,J,ce,Pe){if(cw)this.__request_queue.push([F,J,ce,Pe]);else{var D={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")};ce=So(D,ce||{}),v0||(ce.method="GET");var E="sendBeacon"in gi.navigator&&ce.transport==="sendBeacon";if(F=RT(F,ce.urlQueryArgs||{},{ip:this.get_config("ip")}),yc(J)&&this.get_config("img")){var e=Vo.createElement("img");e.src=F,Vo.body.appendChild(e)}else if(E)try{gi.navigator.sendBeacon(F,Jm(J,yi(yi({},ce),{},{sendBeacon:!0})))}catch(T){this.get_config("debug")&&console.error(T)}else if(v0)try{uw({url:F,data:J,headers:this.get_config("xhr_headers"),options:ce,captureMetrics:this._captureMetrics,callback:Pe,retriesPerformedSoFar:0,retryQueue:this._retryQueue,onXHRError:this.get_config("on_xhr_error")})}catch(T){console.error(T)}else{var _,w=Vo.createElement("script");w.type="text/javascript",w.async=!0,w.defer=!0,w.src=F;var s=Vo.getElementsByTagName("script")[0];(_=s.parentNode)===null||_===void 0||_.insertBefore(w,s)}}}},{key:"_execute_array",value:function(F){var J,ce=this,Pe=[],D=[],E=[];mc(F,function(_){_&&(J=_[0],Ru(J)?E.push(_):typeof _=="function"?_.call(ce):Ru(_)&&J==="alias"?Pe.push(_):Ru(_)&&J.indexOf("capture")!==-1&&typeof ce[J]=="function"?E.push(_):D.push(_))});var e=function(_,w){mc(_,function(s){if(Ru(s[0])){var T=w;Yi(s,function(m){T=T[m[0]].apply(T,m.slice(1))})}else this[s[0]].apply(this,s.slice(1))},w)};e(Pe,this),e(D,this),e(E,this)}},{key:"_hasBootstrappedFeatureFlags",value:function(){var F,J;return((F=this.config.bootstrap)===null||F===void 0?void 0:F.featureFlags)&&Object.keys((J=this.config.bootstrap)===null||J===void 0?void 0:J.featureFlags).length>0||!1}},{key:"push",value:function(F){this._execute_array([F])}},{key:"capture",value:function(F,J){var ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$d;if(this.__loaded&&!rw(this,!1)){this._captureMetrics.incr("capture"),F==="$snapshot"&&this._captureMetrics.incr("snapshot");var Pe=(ce=ce||$d).transport;if(Pe&&(ce.transport=Pe),Ul(F)||typeof F!="string")console.error("No event name provided to posthog.capture");else if(!W8(Nl)){this.sessionPersistence.update_search_keyword(),this.get_config("store_google")&&this.sessionPersistence.update_campaign_params(),this.get_config("save_referrer")&&this.sessionPersistence.update_referrer_info();var D={event:F,properties:this._calculate_event_properties(F,J||{})};F==="$identify"&&ce.$set&&(D.$set=ce.$set),(D=Y3(D,ce._noTruncate?null:this.get_config("properties_string_max_length"))).timestamp=ce.timestamp||new Date,this.get_config("debug")&&Ja.log("PostHog.js send",D);var E=JSON.stringify(D),e=this.get_config("api_host")+(ce.endpoint||"/e/"),_=ce!==$d;return!this.get_config("request_batching")||_&&!ce._batchKey||ce.send_instantly?this.__compress_and_send_json_request(e,E,ce):this._requestQueue.enqueue(e,D,ce),this._invokeCaptureHooks(F,D),D}}}},{key:"_addCaptureHook",value:function(F){this.__captureHooks.push(F)}},{key:"_invokeCaptureHooks",value:function(F,J){this.config._onCapture(F,J),Yi(this.__captureHooks,function(ce){return ce(F)})}},{key:"_calculate_event_properties",value:function(F,J){var ce,Pe=this.persistence.remove_event_timer(F),D=yi({},J);if(D.token=this.get_config("token"),F==="$snapshot"){var E=yi(yi({},this.persistence.properties()),this.sessionPersistence.properties());return D.distinct_id=E.distinct_id,D}var e=yo.properties();if(this.sessionManager){var _=this.sessionManager.checkAndGetSessionAndWindowId(),w=_.sessionId,s=_.windowId;D.$session_id=w,D.$window_id=s}if((ce=this.webPerformance)!==null&&ce!==void 0&&ce.isEnabled&&(F==="$pageview"&&this.pageViewIdManager.onPageview(),D=So(D,{$pageview_id:this.pageViewIdManager.getPageViewId()})),F==="$performance_event"){var T=this.persistence.properties();return D.distinct_id=T.distinct_id,D.$current_url=e.$current_url,D}if(Pe!==void 0){var m=new Date().getTime()-Pe;D.$duration=parseFloat((m/1e3).toFixed(3))}D=So({},yo.properties(),this.persistence.properties(),this.sessionPersistence.properties(),D);var f=this.get_config("property_blacklist");Ru(f)?Yi(f,function(t){delete D[t]}):console.error("Invalid value for property_blacklist config: "+f);var l=this.get_config("sanitize_properties");return l&&(D=l(D,F)),D}},{key:"register",value:function(F,J){this.persistence.register(F,J)}},{key:"register_once",value:function(F,J,ce){this.persistence.register_once(F,J,ce)}},{key:"register_for_session",value:function(F){this.sessionPersistence.register(F)}},{key:"unregister",value:function(F){this.persistence.unregister(F)}},{key:"unregister_for_session",value:function(F){this.sessionPersistence.unregister(F)}},{key:"_register_single",value:function(F,J){this.register(Bi({},F,J))}},{key:"getFeatureFlag",value:function(F,J){return this.featureFlags.getFeatureFlag(F,J)}},{key:"getFeatureFlagPayload",value:function(F){var J=this.featureFlags.getFeatureFlagPayload(F);try{return JSON.parse(J)}catch{return J}}},{key:"isFeatureEnabled",value:function(F,J){return this.featureFlags.isFeatureEnabled(F,J)}},{key:"reloadFeatureFlags",value:function(){this.featureFlags.reloadFeatureFlags()}},{key:"updateEarlyAccessFeatureEnrollment",value:function(F,J){this.featureFlags.updateEarlyAccessFeatureEnrollment(F,J)}},{key:"getEarlyAccessFeatures",value:function(F){var J=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this.featureFlags.getEarlyAccessFeatures(F,J)}},{key:"onFeatureFlags",value:function(F){return this.featureFlags.onFeatureFlags(F)}},{key:"identify",value:function(F,J,ce){if(F){this._captureMetrics.incr("identify");var Pe=this.get_distinct_id();if(this.register({$user_id:F}),!this.get_property("$device_id")){var D=Pe;this.register_once({$had_persisted_distinct_id:!0,$device_id:D},"")}F!==Pe&&F!==this.get_property(d0)&&(this.unregister(d0),this.register({distinct_id:F}));var E=this.persistence.get_user_state()==="anonymous";F!==Pe&&E?(this.persistence.set_user_state("identified"),this.capture("$identify",{distinct_id:F,$anon_distinct_id:Pe},{$set:J||{},$set_once:ce||{}}),this.featureFlags.setAnonymousDistinctId(Pe)):(J&&this.people.set(J),ce&&this.people.set_once(ce)),F!==Pe&&this.reloadFeatureFlags()}else console.error("Unique user id has not been set in posthog.identify")}},{key:"group",value:function(F,J,ce){if(F&&J){this._captureMetrics.incr("group");var Pe=this.getGroups();Pe[F]!==J&&this.resetGroupPropertiesForFlags(F),this.register({$groups:yi(yi({},Pe),{},Bi({},F,J))}),ce&&(this.capture("$groupidentify",{$group_type:F,$group_key:J,$group_set:ce}),this.setGroupPropertiesForFlags(Bi({},F,ce))),Pe[F]===J||ce||this.reloadFeatureFlags()}else console.error("posthog.group requires a group type and group key")}},{key:"resetGroups",value:function(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}},{key:"setPersonPropertiesForFlags",value:function(F){var J=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.featureFlags.setPersonPropertiesForFlags(F,J)}},{key:"resetPersonPropertiesForFlags",value:function(){this.featureFlags.resetPersonPropertiesForFlags()}},{key:"setGroupPropertiesForFlags",value:function(F){var J=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.featureFlags.setGroupPropertiesForFlags(F,J)}},{key:"resetGroupPropertiesForFlags",value:function(F){this.featureFlags.resetGroupPropertiesForFlags(F)}},{key:"reset",value:function(F){var J=this.get_property("$device_id");this.persistence.clear(),this.sessionPersistence.clear(),this.persistence.set_user_state("anonymous"),this.sessionManager.resetSessionId();var ce=this.get_config("get_device_id")(xc());this.register_once({distinct_id:ce,$device_id:F?ce:J},"")}},{key:"get_distinct_id",value:function(){return this.get_property("distinct_id")}},{key:"getGroups",value:function(){return this.get_property("$groups")||{}}},{key:"alias",value:function(F,J){return F===this.get_property(Q3)?(Ja.critical("Attempting to create alias for existing People user - aborting."),-2):(Ul(J)&&(J=this.get_distinct_id()),F!==J?(this._register_single(d0,F),this.capture("$create_alias",{alias:F,distinct_id:J})):(console.error("alias matches current distinct_id - skipping api call."),this.identify(F),-1))}},{key:"set_config",value:function(F){var J=yi({},this.config);yc(F)&&(So(this.config,F),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),this.sessionPersistence&&this.sessionPersistence.update_config(this.config),$a.is_supported()&&$a.get("ph_debug")==="true"&&(this.config.debug=!0),this.get_config("debug")&&(fu.DEBUG=!0),this.sessionRecording&&F.disable_session_recording!==void 0&&J.disable_session_recording!==F.disable_session_recording&&(F.disable_session_recording?this.sessionRecording.stopRecording():this.sessionRecording.startRecordingIfEnabled()))}},{key:"startSessionRecording",value:function(){this.set_config({disable_session_recording:!1})}},{key:"stopSessionRecording",value:function(){this.set_config({disable_session_recording:!0})}},{key:"sessionRecordingStarted",value:function(){var F;return!((F=this.sessionRecording)===null||F===void 0||!F.started())}},{key:"loadToolbar",value:function(F){return this.toolbar.loadToolbar(F)}},{key:"get_config",value:function(F){var J;return(J=this.config)===null||J===void 0?void 0:J[F]}},{key:"get_property",value:function(F){return this.persistence.props[F]}},{key:"getSessionProperty",value:function(F){return this.sessionPersistence.props[F]}},{key:"toString",value:function(){var F,J=(F=this.get_config("name"))!==null&&F!==void 0?F:Ss;return J!==Ss&&(J=Ss+"."+J),J}},{key:"_gdpr_init",value:function(){this.get_config("opt_out_capturing_persistence_type")==="localStorage"&&$a.is_supported()&&(!this.has_opted_in_capturing()&&this.has_opted_in_capturing({persistence_type:"cookie"})&&this.opt_in_capturing({enable_persistence:!1}),!this.has_opted_out_capturing()&&this.has_opted_out_capturing({persistence_type:"cookie"})&&this.opt_out_capturing({clear_persistence:!1}),this.clear_opt_in_out_capturing({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_capturing()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_capturing()||!this.get_config("opt_out_capturing_by_default")&&!lu.get("ph_optout")||(lu.remove("ph_optout"),this.opt_out_capturing({clear_persistence:this.get_config("opt_out_persistence_by_default")}))}},{key:"_gdpr_update_persistence",value:function(F){var J;if(F&&F.clear_persistence)J=!0;else{if(!F||!F.enable_persistence)return;J=!1}this.get_config("disable_persistence")||this.persistence.disabled===J||this.persistence.set_disabled(J),this.get_config("disable_persistence")||this.sessionPersistence.disabled===J||this.sessionPersistence.set_disabled(J)}},{key:"_gdpr_call_func",value:function(F,J){return J=So({capture:this.capture.bind(this),persistence_type:this.get_config("opt_out_capturing_persistence_type"),cookie_prefix:this.get_config("opt_out_capturing_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),secure_cookie:this.get_config("secure_cookie")},J||{}),$a.is_supported()||J.persistence_type!=="localStorage"||(J.persistence_type="cookie"),F(this.get_config("token"),{capture:J.capture,captureEventName:J.capture_event_name,captureProperties:J.capture_properties,persistenceType:J.persistence_type,persistencePrefix:J.cookie_prefix,cookieExpiration:J.cookie_expiration,crossSubdomainCookie:J.cross_subdomain_cookie,secureCookie:J.secure_cookie})}},{key:"opt_in_capturing",value:function(F){F=So({enable_persistence:!0},F||{}),this._gdpr_call_func(Q8,F),this._gdpr_update_persistence(F)}},{key:"opt_out_capturing",value:function(F){var J=So({clear_persistence:!0},F||{});this._gdpr_call_func(eT,J),this._gdpr_update_persistence(J)}},{key:"has_opted_in_capturing",value:function(F){return this._gdpr_call_func(tT,F)}},{key:"has_opted_out_capturing",value:function(F){return this._gdpr_call_func(ew,F)}},{key:"clear_opt_in_out_capturing",value:function(F){var J=So({enable_persistence:!0},F??{});this._gdpr_call_func(nT,J),this._gdpr_update_persistence(J)}},{key:"debug",value:function(F){F===!1?(gi.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(gi.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),localStorage&&localStorage.setItem("ph_debug","true"),this.set_config({debug:!0}))}},{key:"decodeLZ64",value:function(F){return qs.decompressFromBase64(F||null)}}]),P}();(function(P,F){for(var J=0;J: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(var s in w){var T=s.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");_.addStyleRule(T,w[s])}},98222:function(D,E,e){D.exports=e(82887)},27206:function(D,E,e){D.exports=e(60822)},59893:function(D,E,e){D.exports=e(23381)},5224:function(D,E,e){D.exports=e(83832)},59509:function(D,E,e){D.exports=e(72201)},75557:function(D,E,e){D.exports=e(91815)},40338:function(D,E,e){D.exports=e(21462)},35080:function(D,E,e){D.exports=e(51319)},61396:function(D,E,e){D.exports=e(57516)},40549:function(D,E,e){D.exports=e(98128)},49866:function(D,E,e){D.exports=e(99442)},36089:function(D,E,e){D.exports=e(93740)},19548:function(D,E,e){D.exports=e(8729)},35831:function(D,E,e){D.exports=e(93814)},61039:function(D,E,e){D.exports=e(14382)},97040:function(D,E,e){D.exports=e(51759)},77986:function(D,E,e){D.exports=e(10421)},24296:function(D,E,e){D.exports=e(43102)},58872:function(D,E,e){D.exports=e(92165)},29626:function(D,E,e){D.exports=e(3325)},65591:function(D,E,e){D.exports=e(36071)},69738:function(D,E,e){D.exports=e(43905)},92650:function(D,E,e){D.exports=e(35902)},35630:function(D,E,e){D.exports=e(69816)},73434:function(D,E,e){D.exports=e(94507)},27909:function(D,E,e){var _=e(19548);_.register([e(27206),e(5224),e(58872),e(65591),e(69738),e(92650),e(49866),e(25743),e(6197),e(97040),e(85461),e(73434),e(54201),e(81299),e(47645),e(35630),e(77986),e(83043),e(93005),e(96881),e(4534),e(50581),e(40549),e(77900),e(47582),e(35080),e(21641),e(17280),e(5861),e(29626),e(10021),e(65317),e(96268),e(61396),e(35831),e(16122),e(46163),e(40344),e(40338),e(48131),e(36089),e(55334),e(75557),e(19440),e(99488),e(59893),e(97393),e(98222),e(61039),e(24296),e(66398),e(59509)]),D.exports=_},46163:function(D,E,e){D.exports=e(15154)},96881:function(D,E,e){D.exports=e(64943)},50581:function(D,E,e){D.exports=e(21164)},55334:function(D,E,e){D.exports=e(54186)},65317:function(D,E,e){D.exports=e(94873)},10021:function(D,E,e){D.exports=e(67618)},54201:function(D,E,e){D.exports=e(58810)},5861:function(D,E,e){D.exports=e(20593)},16122:function(D,E,e){D.exports=e(29396)},83043:function(D,E,e){D.exports=e(13551)},48131:function(D,E,e){D.exports=e(46858)},47582:function(D,E,e){D.exports=e(17988)},21641:function(D,E,e){D.exports=e(68868)},96268:function(D,E,e){D.exports=e(20467)},19440:function(D,E,e){D.exports=e(91271)},99488:function(D,E,e){D.exports=e(21461)},97393:function(D,E,e){D.exports=e(85956)},25743:function(D,E,e){D.exports=e(52979)},66398:function(D,E,e){D.exports=e(32275)},17280:function(D,E,e){D.exports=e(6419)},77900:function(D,E,e){D.exports=e(61510)},81299:function(D,E,e){D.exports=e(87619)},93005:function(D,E,e){D.exports=e(93601)},40344:function(D,E,e){D.exports=e(96595)},47645:function(D,E,e){D.exports=e(70954)},6197:function(D,E,e){D.exports=e(47462)},4534:function(D,E,e){D.exports=e(17659)},85461:function(D,E,e){D.exports=e(19990)},82884:function(D){D.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}]},50215:function(D,E,e){var _=e(82884),w=e(41940),s=e(85555),T=e(44467).templatedArray;e(24695),D.exports=T("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:w({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:_.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:_.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",s.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",s.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",s.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",s.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:w({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},3749:function(D,E,e){var _=e(71828),w=e(89298),s=e(92605).draw;function T(f){var l=f._fullLayout;_.filterVisible(l.annotations).forEach(function(t){var i=w.getFromId(f,t.xref),r=w.getFromId(f,t.yref),n=w.getRefType(t.xref),o=w.getRefType(t.yref);t._extremes={},n==="range"&&m(t,i),o==="range"&&m(t,r)})}function m(f,l){var t,i=l._id,r=i.charAt(0),n=f[r],o=f["a"+r],a=f[r+"ref"],u=f["a"+r+"ref"],p=f["_"+r+"padplus"],c=f["_"+r+"padminus"],b={x:1,y:-1}[r]*f[r+"shift"],d=3*f.arrowsize*f.arrowwidth||0,v=d+b,x=d-b,g=3*f.startarrowsize*f.arrowwidth||0,y=g+b,k=g-b;if(u===a){var h=w.findExtremes(l,[l.r2c(n)],{ppadplus:v,ppadminus:x}),M=w.findExtremes(l,[l.r2c(o)],{ppadplus:Math.max(p,y),ppadminus:Math.max(c,k)});t={min:[h.min[0],M.min[0]],max:[h.max[0],M.max[0]]}}else y=o?y+o:y,k=o?k-o:k,t=w.findExtremes(l,[l.r2c(n)],{ppadplus:Math.max(p,v,y),ppadminus:Math.max(c,x,k)});f._extremes[i]=t}D.exports=function(f){var l=f._fullLayout;if(_.filterVisible(l.annotations).length&&f._fullData.length)return _.syncOrAsync([s,T],f)}},44317:function(D,E,e){var _=e(71828),w=e(73972),s=e(44467).arrayEditor;function T(f,l){var t,i,r,n,o,a,u,p=f._fullLayout.annotations,c=[],b=[],d=[],v=(l||[]).length;for(t=0;t0||t.explicitOff.length>0},onClick:function(f,l){var t,i,r=T(f,l),n=r.on,o=r.off.concat(r.explicitOff),a={},u=f._fullLayout.annotations;if(n.length||o.length){for(t=0;t.6666666666666666?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[mt]}for(var Ue=!1,De=["x","y"],je=0;je1)&&(ot===st?((Nt=ft.r2fraction(v["a"+Ze]))<0||Nt>1)&&(Ue=!0):Ue=!0),ge=ft._offset+ft.r2p(v[Ze]),Ne=.5}else{var Je=qt==="domain";Ze==="x"?(Se=v[Ze],ge=Je?ft._offset+ft._length*Se:ge=C.l+C.w*Se):(Se=1-v[Ze],ge=Je?ft._offset+ft._length*Se:ge=C.t+C.h*Se),Ne=v.showarrow?.5:Se}if(v.showarrow){Ft.head=ge;var Ke=v["a"+Ze];if(Ye=Et*Ee(.5,v.xanchor)-Tt*Ee(.5,v.yanchor),ot===st){var Ge=f.getRefType(ot);Ge==="domain"?(Ze==="y"&&(Ke=1-Ke),Ft.tail=ft._offset+ft._length*Ke):Ge==="paper"?Ze==="y"?(Ke=1-Ke,Ft.tail=C.t+C.h*Ke):Ft.tail=C.l+C.w*Ke:Ft.tail=ft._offset+ft.r2p(Ke),be=Ye}else Ft.tail=ge+Ke,be=Ye+Ke;Ft.text=Ft.tail+Ye;var nt=A[Ze==="x"?"width":"height"];if(st==="paper"&&(Ft.head=T.constrain(Ft.head,1,nt-1)),ot==="pixel"){var ht=-Math.max(Ft.tail-3,Ft.text),Oe=Math.min(Ft.tail+3,Ft.text)-nt;ht>0?(Ft.tail+=ht,Ft.text+=ht):Oe>0&&(Ft.tail-=Oe,Ft.text-=Oe)}Ft.tail+=It,Ft.head+=It}else be=Ye=xt*Ee(Ne,Dt),Ft.text=ge+Ye;Ft.text+=It,Ye+=It,be+=It,v["_"+Ze+"padplus"]=xt/2+be,v["_"+Ze+"padminus"]=xt/2-be,v["_"+Ze+"size"]=xt,v["_"+Ze+"shift"]=Ye}if(Ue)Q.remove();else{var Be=0,Qe=0;if(v.align!=="left"&&(Be=(ne-Me)*(v.align==="center"?.5:1)),v.valign!=="top"&&(Qe=(ue-Ce)*(v.valign==="middle"?.5:1)),we)Re.select("svg").attr({x:K+Be-1,y:K+Qe}).call(t.setClipUrl,ae?B:null,d);else{var ut=K+Qe-Ae.top,pt=K+Be-Ae.left;xe.call(r.positionText,pt,ut).call(t.setClipUrl,ae?B:null,d)}oe.select("rect").call(t.setRect,K,K,ne,ue),te.call(t.setRect,Y/2,Y/2,me-Y,Te-Y),Q.call(t.setTranslate,Math.round(G.x.text-me/2),Math.round(G.y.text-Te/2)),V.attr({transform:"rotate("+N+","+G.x.text+","+G.y.text+")"});var bt,Lt=function(Ct,mt){j.selectAll(".annotation-arrow-g").remove();var Ot=G.x.head,_t=G.y.head,Pt=G.x.tail+Ct,Bt=G.y.tail+mt,Wt=G.x.text+Ct,Gt=G.y.text+mt,Xt=T.rotationXYMatrix(N,Wt,Gt),Kt=T.apply2DTransform(Xt),nn=T.apply2DTransform2(Xt),yn=+te.attr("width"),ln=+te.attr("height"),kn=Wt-.5*yn,Wn=kn+yn,wn=Gt-.5*ln,on=wn+ln,_n=[[kn,wn,kn,on],[kn,on,Wn,on],[Wn,on,Wn,wn],[Wn,wn,kn,wn]].map(nn);if(!_n.reduce(function(ir,dr){return ir^!!T.segmentsIntersect(Ot,_t,Ot+1e6,_t+1e6,dr[0],dr[1],dr[2],dr[3])},!1)){_n.forEach(function(ir){var dr=T.segmentsIntersect(Pt,Bt,Ot,_t,ir[0],ir[1],ir[2],ir[3]);dr&&(Pt=dr.x,Bt=dr.y)});var fn=v.arrowwidth,hn=v.arrowcolor,In=v.arrowside,Cn=j.append("g").style({opacity:l.opacity(hn)}).classed("annotation-arrow-g",!0),Nn=Cn.append("path").attr("d","M"+Pt+","+Bt+"L"+Ot+","+_t).style("stroke-width",fn+"px").call(l.stroke,l.rgb(hn));if(u(Nn,In,v),L.annotationPosition&&Nn.node().parentNode&&!g){var Hn=Ot,qn=_t;if(v.standoff){var or=Math.sqrt(Math.pow(Ot-Pt,2)+Math.pow(_t-Bt,2));Hn+=v.standoff*(Pt-Ot)/or,qn+=v.standoff*(Bt-_t)/or}var tr,kr,gr=Cn.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Pt-Hn)+","+(Bt-qn),transform:m(Hn,qn)}).style("stroke-width",fn+6+"px").call(l.stroke,"rgba(0,0,0,0)").call(l.fill,"rgba(0,0,0,0)");o.init({element:gr.node(),gd:d,prepFn:function(){var ir=t.getTranslate(Q);tr=ir.x,kr=ir.y,y&&y.autorange&&I(y._name+".autorange",!0),k&&k.autorange&&I(k._name+".autorange",!0)},moveFn:function(ir,dr){var yr=Kt(tr,kr),$t=yr[0]+ir,mn=yr[1]+dr;Q.call(t.setTranslate,$t,mn),R("x",c(y,ir,"x",C,v)),R("y",c(k,dr,"y",C,v)),v.axref===v.xref&&R("ax",c(y,ir,"ax",C,v)),v.ayref===v.yref&&R("ay",c(k,dr,"ay",C,v)),Cn.attr("transform",m(ir,dr)),V.attr({transform:"rotate("+N+","+$t+","+mn+")"})},doneFn:function(){w.call("_guiRelayout",d,U());var ir=document.querySelector(".js-notes-box-panel");ir&&ir.redraw(ir.selectedObj)}})}}};v.showarrow&&Lt(0,0),H&&o.init({element:Q.node(),gd:d,prepFn:function(){bt=V.attr("transform")},moveFn:function(Ct,mt){var Ot="pointer";if(v.showarrow)v.axref===v.xref?R("ax",c(y,Ct,"ax",C,v)):R("ax",v.ax+Ct),v.ayref===v.yref?R("ay",c(k,mt,"ay",C.w,v)):R("ay",v.ay+mt),Lt(Ct,mt);else{if(g)return;var _t,Pt;if(y)_t=c(y,Ct,"x",C,v);else{var Bt=v._xsize/C.w,Wt=v.x+(v._xshift-v.xshift)/C.w-Bt/2;_t=o.align(Wt+Ct/C.w,Bt,0,1,v.xanchor)}if(k)Pt=c(k,mt,"y",C,v);else{var Gt=v._ysize/C.h,Xt=v.y-(v._yshift+v.yshift)/C.h-Gt/2;Pt=o.align(Xt-mt/C.h,Gt,0,1,v.yanchor)}R("x",_t),R("y",Pt),y&&k||(Ot=o.getCursor(y?.5:_t,k?.5:Pt,v.xanchor,v.yanchor))}V.attr({transform:m(Ct,mt)+bt}),n(Q,Ot)},clickFn:function(Ct,mt){v.captureevents&&d.emit("plotly_clickannotation",he(mt))},doneFn:function(){n(Q),w.call("_guiRelayout",d,U());var Ct=document.querySelector(".js-notes-box-panel");Ct&&Ct.redraw(Ct.selectedObj)}})}}}D.exports={draw:function(d){var v=d._fullLayout;v._infolayer.selectAll(".annotation").remove();for(var x=0;x=0,g=i.indexOf("end")>=0,y=c.backoff*d+r.standoff,k=b.backoff*v+r.startstandoff;if(p.nodeName==="line"){n={x:+t.attr("x1"),y:+t.attr("y1")},o={x:+t.attr("x2"),y:+t.attr("y2")};var h=n.x-o.x,M=n.y-o.y;if(u=(a=Math.atan2(M,h))+Math.PI,y&&k&&y+k>Math.sqrt(h*h+M*M))return void j();if(y){if(y*y>h*h+M*M)return void j();var A=y*Math.cos(a),C=y*Math.sin(a);o.x+=A,o.y+=C,t.attr({x2:o.x,y2:o.y})}if(k){if(k*k>h*h+M*M)return void j();var L=k*Math.cos(a),O=k*Math.sin(a);n.x-=L,n.y-=O,t.attr({x1:n.x,y1:n.y})}}else if(p.nodeName==="path"){var I=p.getTotalLength(),R="";if(I1){r=!0;break}}r?T.fullLayout._infolayer.select(".annotation-"+T.id+'[data-index="'+t+'"]').remove():(i._pdata=w(T.glplot.cameraParams,[m.xaxis.r2l(i.x)*f[0],m.yaxis.r2l(i.y)*f[1],m.zaxis.r2l(i.z)*f[2]]),_(T.graphDiv,i,t,T.id,i._xa,i._ya))}}},2468:function(D,E,e){var _=e(73972),w=e(71828);D.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:e(26997)}}},layoutAttributes:e(26997),handleDefaults:e(20226),includeBasePlot:function(s,T){var m=_.subplotsRegistry.gl3d;if(m)for(var f=m.attrRegex,l=Object.keys(s),t=0;t=0)))return i;if(u===3)o[u]>1&&(o[u]=1);else if(o[u]>=1)return i}var p=Math.round(255*o[0])+", "+Math.round(255*o[1])+", "+Math.round(255*o[2]);return a?"rgba("+p+", "+o[3]+")":"rgb("+p+")"}T.tinyRGB=function(i){var r=i.toRgb();return"rgb("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+")"},T.rgb=function(i){return T.tinyRGB(_(i))},T.opacity=function(i){return i?_(i).getAlpha():0},T.addOpacity=function(i,r){var n=_(i).toRgb();return"rgba("+Math.round(n.r)+", "+Math.round(n.g)+", "+Math.round(n.b)+", "+r+")"},T.combine=function(i,r){var n=_(i).toRgb();if(n.a===1)return _(i).toRgbString();var o=_(r||l).toRgb(),a=o.a===1?o:{r:255*(1-o.a)+o.r*o.a,g:255*(1-o.a)+o.g*o.a,b:255*(1-o.a)+o.b*o.a},u={r:a.r*(1-n.a)+n.r*n.a,g:a.g*(1-n.a)+n.g*n.a,b:a.b*(1-n.a)+n.b*n.a};return _(u).toRgbString()},T.contrast=function(i,r,n){var o=_(i);return o.getAlpha()!==1&&(o=_(T.combine(i,l))),(o.isDark()?r?o.lighten(r):l:n?o.darken(n):f).toString()},T.stroke=function(i,r){var n=_(r);i.style({stroke:T.tinyRGB(n),"stroke-opacity":n.getAlpha()})},T.fill=function(i,r){var n=_(r);i.style({fill:T.tinyRGB(n),"fill-opacity":n.getAlpha()})},T.clean=function(i){if(i&&typeof i=="object"){var r,n,o,a,u=Object.keys(i);for(r=0;r0?Ke>=Be:Ke<=Be));Ge++)Ke>ut&&Ke0?Ke>=Be:Ke<=Be));Ge++)Ke>Je[0]&&Ke1){var ot=Math.pow(10,Math.floor(Math.log(st)/Math.LN10));Ye*=ot*l.roundUp(st/ot,[2,5,10]),(Math.abs(we.start)/we.size+1e-6)%1<2e-6&&(Se.tick0=0)}Se.dtick=Ye}Se.domain=U?[ge+K/se.h,ge+Te-K/se.h]:[ge+X/se.w,ge+Te-X/se.w],Se.setScale(),O.attr("transform",t(Math.round(se.l),Math.round(se.t)));var ft,yt=O.select("."+k.cbtitleunshift).attr("transform",t(-Math.round(se.l),-Math.round(se.t))),Et=Se.ticklabelposition,Tt=Se.title.font.size,xt=O.select("."+k.cbaxis),Dt=0,It=0;function Ft(qt,Nt){var Je={propContainer:Se,propName:I._propPrefix+"title",traceIndex:I._traceIndex,_meta:I._meta,placeholder:oe._dfltTitle.colorbar,containerGroup:O.select("."+k.cbtitle)},Ke=qt.charAt(0)==="h"?qt.substr(1):"h"+qt;O.selectAll("."+Ke+",."+Ke+"-math-group").remove(),a.draw(R,qt,i(Je,Nt||{}))}return l.syncOrAsync([s.previousPromises,function(){var qt,Nt;(U&&Ne||!U&&!Ne)&&(de==="top"&&(qt=X+se.l+se.w*te,Nt=K+se.t+se.h*(1-ge-Te)+3+.75*Tt),de==="bottom"&&(qt=X+se.l+se.w*te,Nt=K+se.t+se.h*(1-ge)-3-.25*Tt),de==="right"&&(Nt=K+se.t+se.h*ae+3+.75*Tt,qt=X+se.l+se.w*ge),Ft(Se._id+"title",{attributes:{x:qt,y:Nt,"text-anchor":U?"start":"middle"}}))},function(){if(!U&&!Ne||U&&Ne){var qt,Nt=O.select("."+k.cbtitle),Je=Nt.select("text"),Ke=[-V/2,V/2],Ge=Nt.select(".h"+Se._id+"title-math-group").node(),nt=15.6;if(Je.node()&&(nt=parseInt(Je.node().style.fontSize,10)*x),Ge?(qt=n.bBox(Ge),It=qt.width,(Dt=qt.height)>nt&&(Ke[1]-=(Dt-nt)/2)):Je.node()&&!Je.classed(k.jsPlaceholder)&&(qt=n.bBox(Je.node()),It=qt.width,Dt=qt.height),U){if(Dt){if(Dt+=5,de==="top")Se.domain[1]-=Dt/se.h,Ke[1]*=-1;else{Se.domain[0]+=Dt/se.h;var ht=u.lineCount(Je);Ke[1]+=(1-ht)*nt}Nt.attr("transform",t(Ke[0],Ke[1])),Se.setScale()}}else It&&(de==="right"&&(Se.domain[0]+=(It+Tt/2)/se.w),Nt.attr("transform",t(Ke[0],Ke[1])),Se.setScale())}O.selectAll("."+k.cbfills+",."+k.cblines).attr("transform",U?t(0,Math.round(se.h*(1-Se.domain[1]))):t(Math.round(se.w*Se.domain[0]),0)),xt.attr("transform",U?t(0,Math.round(-se.t)):t(Math.round(-se.l),0));var Oe=O.select("."+k.cbfills).selectAll("rect."+k.cbfill).attr("style","").data(Me);Oe.enter().append("rect").classed(k.cbfill,!0).style("stroke","none"),Oe.exit().remove();var Be=pe.map(Se.c2p).map(Math.round).sort(function(Lt,Ct){return Lt-Ct});Oe.each(function(Lt,Ct){var mt=[Ct===0?pe[0]:(Me[Ct]+Me[Ct-1])/2,Ct===Me.length-1?pe[1]:(Me[Ct]+Me[Ct+1])/2].map(Se.c2p).map(Math.round);U&&(mt[1]=l.constrain(mt[1]+(mt[1]>mt[0])?1:-1,Be[0],Be[1]));var Ot=_.select(this).attr(U?"x":"y",Ee).attr(U?"y":"x",_.min(mt)).attr(U?"width":"height",Math.max(ne,2)).attr(U?"height":"width",Math.max(_.max(mt)-_.min(mt),2));if(I._fillgradient)n.gradient(Ot,R,I._id,U?"vertical":"horizontalreversed",I._fillgradient,"fill");else{var _t=Re(Lt).replace("e-","");Ot.attr("fill",w(_t).toHexString())}});var Qe=O.select("."+k.cblines).selectAll("path."+k.cbline).data(xe.color&&xe.width?Ce:[]);Qe.enter().append("path").classed(k.cbline,!0),Qe.exit().remove(),Qe.each(function(Lt){var Ct=Ee,mt=Math.round(Se.c2p(Lt))+xe.width/2%1;_.select(this).attr("d","M"+(U?Ct+","+mt:mt+","+Ct)+(U?"h":"v")+ne).call(n.lineGroupStyle,xe.width,ye(Lt),xe.dash)}),xt.selectAll("g."+Se._id+"tick,path").remove();var ut=Ee+ne+(V||0)/2-(I.ticks==="outside"?1:0),pt=m.calcTicks(Se),bt=m.getTickSigns(Se)[2];return m.drawTicks(R,Se,{vals:Se.ticks==="inside"?m.clipEnds(Se,pt):pt,layer:xt,path:m.makeTickPath(Se,ut,bt),transFn:m.makeTransTickFn(Se)}),m.drawLabels(R,Se,{vals:pt,layer:xt,transFn:m.makeTransTickLabelFn(Se),labelFns:m.makeLabelFns(Se,ut)})},function(){if(U&&!Ne||!U&&Ne){var qt,Nt,Je=Se.position||0,Ke=Se._offset+Se._length/2;if(de==="right")Nt=Ke,qt=se.l+se.w*Je+10+Tt*(Se.showticklabels?1:.5);else if(qt=Ke,de==="bottom"&&(Nt=se.t+se.h*Je+10+(Et.indexOf("inside")===-1?Se.tickfont.size:0)+(Se.ticks!=="intside"&&I.ticklen||0)),de==="top"){var Ge=he.text.split("
").length;Nt=se.t+se.h*Je+10-ne-x*Tt*Ge}Ft((U?"h":"v")+Se._id+"title",{avoid:{selection:_.select(R).selectAll("g."+Se._id+"tick"),side:de,offsetTop:U?0:se.t,offsetLeft:U?se.l:0,maxShift:U?oe.width:oe.height},attributes:{x:qt,y:Nt,"text-anchor":"middle"},transform:{rotate:U?-90:0,offset:0}})}},s.previousPromises,function(){var qt,Nt=ne+V/2;Et.indexOf("inside")===-1&&(qt=n.bBox(xt.node()),Nt+=U?qt.width:qt.height),ft=yt.select("text");var Je=0,Ke=U&&de==="top",Ge=!U&&de==="right",nt=0;if(ft.node()&&!ft.classed(k.jsPlaceholder)){var ht,Oe=yt.select(".h"+Se._id+"title-math-group").node();Oe&&(U&&Ne||!U&&!Ne)?(Je=(qt=n.bBox(Oe)).width,ht=qt.height):(Je=(qt=n.bBox(yt.node())).right-se.l-(U?Ee:be),ht=qt.bottom-se.t-(U?be:Ee),U||de!=="top"||(Nt+=qt.height,nt=qt.height)),Ge&&(ft.attr("transform",t(Je/2+Tt/2,0)),Je*=2),Nt=Math.max(Nt,U?Je:ht)}var Be=2*(U?X:K)+Nt+H+V/2,Qe=0;!U&&he.text&&Y==="bottom"&&ae<=0&&(Be+=Qe=Be/2,nt+=Qe),oe._hColorbarMoveTitle=Qe,oe._hColorbarMoveCBTitle=nt;var ut=H+V;O.select("."+k.cbbg).attr("x",(U?Ee:be)-ut/2-(U?X:0)).attr("y",(U?be:Ee)-(U?me:K+nt-Qe)).attr(U?"width":"height",Math.max(Be-Qe,2)).attr(U?"height":"width",Math.max(me+ut,2)).call(o.fill,ee).call(o.stroke,I.bordercolor).style("stroke-width",H);var pt=Ge?Math.max(Je-10,0):0;if(O.selectAll("."+k.cboutline).attr("x",(U?Ee:be+X)+pt).attr("y",(U?be+K-me:Ee)+(Ke?Dt:0)).attr(U?"width":"height",Math.max(ne,2)).attr(U?"height":"width",Math.max(me-(U?2*K+Dt:2*X+pt),2)).call(o.stroke,I.outlinecolor).style({fill:"none","stroke-width":V}),O.attr("transform",t(se.l-(U?Ue*Be:0),se.t-(U?0:(1-De)*Be-nt))),!U&&(H||w(ee).getAlpha()&&!w.equals(oe.paper_bgcolor,ee))){var bt=xt.selectAll("text"),Lt=bt[0].length,Ct=O.select("."+k.cbbg).node(),mt=n.bBox(Ct),Ot=n.getTranslate(O);bt.each(function(Kt,nn){var yn=Lt-1;if(nn===0||nn===yn){var ln,kn=n.bBox(this),Wn=n.getTranslate(this);if(nn===yn){var wn=kn.right+Wn.x;(ln=mt.right+Ot.x+be-H-2+te-wn)>0&&(ln=0)}else if(nn===0){var on=kn.left+Wn.x;(ln=mt.left+Ot.x+be+H+2-on)<0&&(ln=0)}ln&&(Lt<3?this.setAttribute("transform","translate("+ln+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var _t={},Pt=g[Q],Bt=y[Q],Wt=g[Y],Gt=y[Y],Xt=Be-ne;U?(G==="pixels"?(_t.y=ae,_t.t=me*Wt,_t.b=me*Gt):(_t.t=_t.b=0,_t.yt=ae+B*Wt,_t.yb=ae-B*Gt),j==="pixels"?(_t.x=te,_t.l=Be*Pt,_t.r=Be*Bt):(_t.l=Xt*Pt,_t.r=Xt*Bt,_t.xl=te-N*Pt,_t.xr=te+N*Bt)):(G==="pixels"?(_t.x=te,_t.l=me*Pt,_t.r=me*Bt):(_t.l=_t.r=0,_t.xl=te+B*Pt,_t.xr=te-B*Bt),j==="pixels"?(_t.y=1-ae,_t.t=Be*Wt,_t.b=Be*Gt):(_t.t=Xt*Wt,_t.b=Xt*Gt,_t.yt=ae-N*Wt,_t.yb=ae+N*Gt)),s.autoMargin(R,I._id,_t)}],R)}(C,A,h);L&&L.then&&(h._promises||[]).push(L),h._context.edits.colorbarPosition&&function(O,I,R){var U,B,G,N=I.orientation==="v",j=R._fullLayout._size;f.init({element:O.node(),gd:R,prepFn:function(){U=O.attr("transform"),r(O)},moveFn:function(V,H){O.attr("transform",U+t(V,H)),B=f.align((N?I._uFrac:I._vFrac)+V/j.w,N?I._thickFrac:I._lenFrac,0,1,I.xanchor),G=f.align((N?I._vFrac:1-I._uFrac)-H/j.h,N?I._lenFrac:I._thickFrac,0,1,I.yanchor);var ee=f.getCursor(B,G,I.xanchor,I.yanchor);r(O,ee)},doneFn:function(){if(r(O),B!==void 0&&G!==void 0){var V={};V[I._propPrefix+"x"]=B,V[I._propPrefix+"y"]=G,I._traceIndex!==void 0?T.call("_guiRestyle",R,V,I._traceIndex):T.call("_guiRelayout",R,V)}}})}(C,A,h)}),M.exit().each(function(A){s.autoMargin(h,A._id)}).remove(),M.order()}}},76228:function(D,E,e){var _=e(71828);D.exports=function(w){return _.isPlainObject(w.colorbar)}},12311:function(D,E,e){D.exports={moduleType:"component",name:"colorbar",attributes:e(63583),supplyDefaults:e(62499),draw:e(98981).draw,hasColorbar:e(76228)}},50693:function(D,E,e){var _=e(63583),w=e(30587).counter,s=e(78607),T=e(63282).scales;function m(f){return"`"+f+"`"}s(T),D.exports=function(f,l){f=f||"";var t,i=(l=l||{}).cLetter||"c",r=("onlyIfNumerical"in l&&l.onlyIfNumerical,"noScale"in l?l.noScale:f==="marker.line"),n="showScaleDflt"in l?l.showScaleDflt:i==="z",o=typeof l.colorscaleDflt=="string"?T[l.colorscaleDflt]:null,a=l.editTypeOverride||"",u=f?f+".":"";"colorAttr"in l?(t=l.colorAttr,l.colorAttr):m(u+(t={z:"z",c:"color"}[i]));var p=i+"auto",c=i+"min",b=i+"max",d=i+"mid",v={};v[c]=v[b]=void 0;var x={};x[p]=!1;var g={};return t==="color"&&(g.color={valType:"color",arrayOk:!0,editType:a||"style"},l.anim&&(g.color.anim=!0)),g[p]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:v},g[c]={valType:"number",dflt:null,editType:a||"plot",impliedEdits:x},g[b]={valType:"number",dflt:null,editType:a||"plot",impliedEdits:x},g[d]={valType:"number",dflt:null,editType:"calc",impliedEdits:v},g.colorscale={valType:"colorscale",editType:"calc",dflt:o,impliedEdits:{autocolorscale:!1}},g.autocolorscale={valType:"boolean",dflt:l.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},g.reversescale={valType:"boolean",dflt:!1,editType:"plot"},r||(g.showscale={valType:"boolean",dflt:n,editType:"calc"},g.colorbar=_),l.noColorAxis||(g.coloraxis={valType:"subplotid",regex:w("coloraxis"),dflt:null,editType:"calc"}),g}},78803:function(D,E,e){var _=e(92770),w=e(71828),s=e(52075).extractOpts;D.exports=function(T,m,f){var l,t=T._fullLayout,i=f.vals,r=f.containerStr,n=r?w.nestedProperty(m,r).get():m,o=s(n),a=o.auto!==!1,u=o.min,p=o.max,c=o.mid,b=function(){return w.aggNums(Math.min,null,i)},d=function(){return w.aggNums(Math.max,null,i)};u===void 0?u=b():a&&(u=n._colorAx&&_(u)?Math.min(u,b()):b()),p===void 0?p=d():a&&(p=n._colorAx&&_(p)?Math.max(p,d()):d()),a&&c!==void 0&&(p-c>c-u?u=c-(p-c):p-c=0?t.colorscale.sequential:t.colorscale.sequentialminus,o._sync("colorscale",l))}},33046:function(D,E,e){var _=e(71828),w=e(52075).hasColorscale,s=e(52075).extractOpts;D.exports=function(T,m){function f(a,u){var p=a["_"+u];p!==void 0&&(a[u]=p)}function l(a,u){var p=u.container?_.nestedProperty(a,u.container).get():a;if(p)if(p.coloraxis)p._colorAx=m[p.coloraxis];else{var c=s(p),b=c.auto;(b||c.min===void 0)&&f(p,u.min),(b||c.max===void 0)&&f(p,u.max),c.autocolorscale&&f(p,"colorscale")}}for(var t=0;t=0;b--,d++){var v=u[b];c[d]=[1-v[0],v[1]]}return c}function o(u,p){p=p||{};for(var c=u.domain,b=u.range,d=b.length,v=new Array(d),x=0;x1.3333333333333333-f?m:f}},70461:function(D,E,e){var _=e(71828),w=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];D.exports=function(s,T,m,f){return s=m==="left"?0:m==="center"?1:m==="right"?2:_.constrain(Math.floor(3*s),0,2),T=f==="bottom"?0:f==="middle"?1:f==="top"?2:_.constrain(Math.floor(3*T),0,2),w[T][s]}},64505:function(D,E){E.selectMode=function(e){return e==="lasso"||e==="select"},E.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"},E.openMode=function(e){return e==="drawline"||e==="drawopenpath"},E.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"},E.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"},E.selectingOrDrawing=function(e){return E.freeMode(e)||E.rectMode(e)}},28569:function(D,E,e){var _=e(48956),w=e(57035),s=e(38520),T=e(71828).removeElement,m=e(85555),f=D.exports={};f.align=e(92807),f.getCursor=e(70461);var l=e(26041);function t(){var r=document.createElement("div");r.className="dragcover";var n=r.style;return n.position="fixed",n.left=0,n.right=0,n.top=0,n.bottom=0,n.zIndex=999999999,n.background="none",document.body.appendChild(r),r}function i(r){return _(r.changedTouches?r.changedTouches[0]:r,document.body)}f.unhover=l.wrapped,f.unhoverRaw=l.raw,f.init=function(r){var n,o,a,u,p,c,b,d,v=r.gd,x=1,g=v._context.doubleClickDelay,y=r.element;v._mouseDownTime||(v._mouseDownTime=0),y.style.pointerEvents="all",y.onmousedown=h,s?(y._ontouchstart&&y.removeEventListener("touchstart",y._ontouchstart),y._ontouchstart=h,y.addEventListener("touchstart",h,{passive:!1})):y.ontouchstart=h;var k=r.clampFn||function(C,L,O){return Math.abs(C)g&&(x=Math.max(x-1,1)),v._dragged)r.doneFn&&r.doneFn();else if(r.clickFn&&r.clickFn(x,c),!d){var L;try{L=new MouseEvent("click",C)}catch{var O=i(C);(L=document.createEvent("MouseEvents")).initMouseEvent("click",C.bubbles,C.cancelable,C.view,C.detail,C.screenX,C.screenY,O[0],O[1],C.ctrlKey,C.altKey,C.shiftKey,C.metaKey,C.button,C.relatedTarget)}b.dispatchEvent(L)}v._dragging=!1,v._dragged=!1}else v._dragged=!1}},f.coverSlip=t},26041:function(D,E,e){var _=e(11086),w=e(79990),s=e(24401).getGraphDiv,T=e(26675),m=D.exports={};m.wrapped=function(f,l,t){(f=s(f))._fullLayout&&w.clear(f._fullLayout._uid+T.HOVERID),m.raw(f,l,t)},m.raw=function(f,l){var t=f._fullLayout,i=f._hoverdata;l||(l={}),l.target&&!f._dragged&&_.triggerHandler(f,"plotly_beforehover",l)===!1||(t._hoverlayer.selectAll("g").remove(),t._hoverlayer.selectAll("line").remove(),t._hoverlayer.selectAll("circle").remove(),f._hoverdata=void 0,l.target&&i&&f.emit("plotly_unhover",{event:l,points:i}))}},79952:function(D,E){E.P={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},E.u={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"}},91424:function(D,E,e){var _=e(39898),w=e(71828),s=w.numberFormat,T=e(92770),m=e(84267),f=e(73972),l=e(7901),t=e(21081),i=w.strTranslate,r=e(63893),n=e(77922),o=e(18783).LINE_SPACING,a=e(37822).DESELECTDIM,u=e(34098),p=e(39984),c=e(23469).appendArrayPointValue,b=D.exports={};function d(we,Ae,Me){var Ce=Ae.fillpattern,ne=Ce&&b.getPatternAttr(Ce.shape,0,"");if(ne){var ue=b.getPatternAttr(Ce.bgcolor,0,null),me=b.getPatternAttr(Ce.fgcolor,0,null),Te=Ce.fgopacity,Ee=b.getPatternAttr(Ce.size,0,8),Ue=b.getPatternAttr(Ce.solidity,0,.3),De=Ae.uid;b.pattern(we,"point",Me,De,ne,Ee,Ue,void 0,Ce.fillmode,ue,me,Te)}else Ae.fillcolor&&we.call(l.fill,Ae.fillcolor)}b.font=function(we,Ae,Me,Ce){w.isPlainObject(Ae)&&(Ce=Ae.color,Me=Ae.size,Ae=Ae.family),Ae&&we.style("font-family",Ae),Me+1&&we.style("font-size",Me+"px"),Ce&&we.call(l.fill,Ce)},b.setPosition=function(we,Ae,Me){we.attr("x",Ae).attr("y",Me)},b.setSize=function(we,Ae,Me){we.attr("width",Ae).attr("height",Me)},b.setRect=function(we,Ae,Me,Ce,ne){we.call(b.setPosition,Ae,Me).call(b.setSize,Ce,ne)},b.translatePoint=function(we,Ae,Me,Ce){var ne=Me.c2p(we.x),ue=Ce.c2p(we.y);return!!(T(ne)&&T(ue)&&Ae.node())&&(Ae.node().nodeName==="text"?Ae.attr("x",ne).attr("y",ue):Ae.attr("transform",i(ne,ue)),!0)},b.translatePoints=function(we,Ae,Me){we.each(function(Ce){var ne=_.select(this);b.translatePoint(Ce,ne,Ae,Me)})},b.hideOutsideRangePoint=function(we,Ae,Me,Ce,ne,ue){Ae.attr("display",Me.isPtWithinRange(we,ne)&&Ce.isPtWithinRange(we,ue)?null:"none")},b.hideOutsideRangePoints=function(we,Ae){if(Ae._hasClipOnAxisFalse){var Me=Ae.xaxis,Ce=Ae.yaxis;we.each(function(ne){var ue=ne[0].trace,me=ue.xcalendar,Te=ue.ycalendar,Ee=f.traceIs(ue,"bar-like")?".bartext":".point,.textpoint";we.selectAll(Ee).each(function(Ue){b.hideOutsideRangePoint(Ue,_.select(this),Me,Ce,me,Te)})})}},b.crispRound=function(we,Ae,Me){return Ae&&T(Ae)?we._context.staticPlot?Ae:Ae<1?1:Math.round(Ae):Me||0},b.singleLineStyle=function(we,Ae,Me,Ce,ne){Ae.style("fill","none");var ue=(((we||[])[0]||{}).trace||{}).line||{},me=Me||ue.width||0,Te=ne||ue.dash||"";l.stroke(Ae,Ce||ue.color),b.dashLine(Ae,Te,me)},b.lineGroupStyle=function(we,Ae,Me,Ce){we.style("fill","none").each(function(ne){var ue=(((ne||[])[0]||{}).trace||{}).line||{},me=Ae||ue.width||0,Te=Ce||ue.dash||"";_.select(this).call(l.stroke,Me||ue.color).call(b.dashLine,Te,me)})},b.dashLine=function(we,Ae,Me){Me=+Me||0,Ae=b.dashStyle(Ae,Me),we.style({"stroke-dasharray":Ae,"stroke-width":Me+"px"})},b.dashStyle=function(we,Ae){Ae=+Ae||1;var Me=Math.max(Ae,3);return we==="solid"?we="":we==="dot"?we=Me+"px,"+Me+"px":we==="dash"?we=3*Me+"px,"+3*Me+"px":we==="longdash"?we=5*Me+"px,"+5*Me+"px":we==="dashdot"?we=3*Me+"px,"+Me+"px,"+Me+"px,"+Me+"px":we==="longdashdot"&&(we=5*Me+"px,"+2*Me+"px,"+Me+"px,"+2*Me+"px"),we},b.singleFillStyle=function(we,Ae){var Me=_.select(we.node());d(we,((Me.data()[0]||[])[0]||{}).trace||{},Ae)},b.fillGroupStyle=function(we,Ae){we.style("stroke-width",0).each(function(Me){var Ce=_.select(this);Me[0].trace&&d(Ce,Me[0].trace,Ae)})};var v=e(90998);b.symbolNames=[],b.symbolFuncs=[],b.symbolBackOffs=[],b.symbolNeedLines={},b.symbolNoDot={},b.symbolNoFill={},b.symbolList=[],Object.keys(v).forEach(function(we){var Ae=v[we],Me=Ae.n;b.symbolList.push(Me,String(Me),we,Me+100,String(Me+100),we+"-open"),b.symbolNames[Me]=we,b.symbolFuncs[Me]=Ae.f,b.symbolBackOffs[Me]=Ae.backoff||0,Ae.needLine&&(b.symbolNeedLines[Me]=!0),Ae.noDot?b.symbolNoDot[Me]=!0:b.symbolList.push(Me+200,String(Me+200),we+"-dot",Me+300,String(Me+300),we+"-open-dot"),Ae.noFill&&(b.symbolNoFill[Me]=!0)});var x=b.symbolNames.length;function g(we,Ae,Me,Ce){var ne=we%100;return b.symbolFuncs[ne](Ae,Me,Ce)+(we>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}b.symbolNumber=function(we){if(T(we))we=+we;else if(typeof we=="string"){var Ae=0;we.indexOf("-open")>0&&(Ae=100,we=we.replace("-open","")),we.indexOf("-dot")>0&&(Ae+=200,we=we.replace("-dot","")),(we=b.symbolNames.indexOf(we))>=0&&(we+=Ae)}return we%100>=x||we>=400?0:Math.floor(Math.max(we,0))};var y={x1:1,x2:0,y1:0,y2:0},k={x1:0,x2:0,y1:1,y2:0},h=s("~f"),M={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:y},horizontalreversed:{node:"linearGradient",attrs:y,reversed:!0},vertical:{node:"linearGradient",attrs:k},verticalreversed:{node:"linearGradient",attrs:k,reversed:!0}};b.gradient=function(we,Ae,Me,Ce,ne,ue){for(var me=ne.length,Te=M[Ce],Ee=new Array(me),Ue=0;Ue=100;var Ue=Re(we,Me),De=K(we,Me);Ae.attr("d",g(Ee,Te,Ue,De))}var je,ge,be,Se=!1;if(we.so)be=me.outlierwidth,ge=me.outliercolor,je=ue.outliercolor;else{var Ne=(me||{}).width;be=(we.mlw+1||Ne+1||(we.trace?(we.trace.marker.line||{}).width:0)+1)-1||0,ge="mlc"in we?we.mlcc=Ce.lineScale(we.mlc):w.isArrayOrTypedArray(me.color)?l.defaultLine:me.color,w.isArrayOrTypedArray(ue.color)&&(je=l.defaultLine,Se=!0),je="mc"in we?we.mcc=Ce.markerScale(we.mc):ue.color||"rgba(0,0,0,0)",Ce.selectedColorFn&&(je=Ce.selectedColorFn(we))}if(we.om)Ae.call(l.stroke,je).style({"stroke-width":(be||1)+"px",fill:"none"});else{Ae.style("stroke-width",(we.isBlank?0:be)+"px");var Ye=ue.gradient,Ze=we.mgt;Ze?Se=!0:Ze=Ye&&Ye.type,w.isArrayOrTypedArray(Ze)&&(Ze=Ze[0],M[Ze]||(Ze=0));var st=ue.pattern,ot=st&&b.getPatternAttr(st.shape,we.i,"");if(Ze&&Ze!=="none"){var ft=we.mgc;ft?Se=!0:ft=Ye.color;var yt=Me.uid;Se&&(yt+="-"+we.i),b.gradient(Ae,ne,yt,Ze,[[0,ft],[1,je]],"fill")}else if(ot){var Et=b.getPatternAttr(st.bgcolor,we.i,null),Tt=b.getPatternAttr(st.fgcolor,we.i,null),xt=st.fgopacity,Dt=b.getPatternAttr(st.size,we.i,8),It=b.getPatternAttr(st.solidity,we.i,.3),Ft=we.mcc||w.isArrayOrTypedArray(st.shape)||w.isArrayOrTypedArray(st.bgcolor)||w.isArrayOrTypedArray(st.size)||w.isArrayOrTypedArray(st.solidity),qt=Me.uid;Ft&&(qt+="-"+we.i),b.pattern(Ae,"point",ne,qt,ot,Dt,It,we.mcc,st.fillmode,Et,Tt,xt)}else l.fill(Ae,je);be&&l.stroke(Ae,ge)}},b.makePointStyleFns=function(we){var Ae={},Me=we.marker;return Ae.markerScale=b.tryColorscale(Me,""),Ae.lineScale=b.tryColorscale(Me,"line"),f.traceIs(we,"symbols")&&(Ae.ms2mrc=u.isBubble(we)?p(we):function(){return(Me.size||6)/2}),we.selectedpoints&&w.extendFlat(Ae,b.makeSelectedPointStyleFns(we)),Ae},b.makeSelectedPointStyleFns=function(we){var Ae={},Me=we.selected||{},Ce=we.unselected||{},ne=we.marker||{},ue=Me.marker||{},me=Ce.marker||{},Te=ne.opacity,Ee=ue.opacity,Ue=me.opacity,De=Ee!==void 0,je=Ue!==void 0;(w.isArrayOrTypedArray(Te)||De||je)&&(Ae.selectedOpacityFn=function(ft){var yt=ft.mo===void 0?ne.opacity:ft.mo;return ft.selected?De?Ee:yt:je?Ue:a*yt});var ge=ne.color,be=ue.color,Se=me.color;(be||Se)&&(Ae.selectedColorFn=function(ft){var yt=ft.mcc||ge;return ft.selected?be||yt:Se||yt});var Ne=ne.size,Ye=ue.size,Ze=me.size,st=Ye!==void 0,ot=Ze!==void 0;return f.traceIs(we,"symbols")&&(st||ot)&&(Ae.selectedSizeFn=function(ft){var yt=ft.mrc||Ne/2;return ft.selected?st?Ye/2:yt:ot?Ze/2:yt}),Ae},b.makeSelectedTextStyleFns=function(we){var Ae={},Me=we.selected||{},Ce=we.unselected||{},ne=we.textfont||{},ue=Me.textfont||{},me=Ce.textfont||{},Te=ne.color,Ee=ue.color,Ue=me.color;return Ae.selectedTextColorFn=function(De){var je=De.tc||Te;return De.selected?Ee||je:Ue||(Ee?je:l.addOpacity(je,a))},Ae},b.selectedPointStyle=function(we,Ae){if(we.size()&&Ae.selectedpoints){var Me=b.makeSelectedPointStyleFns(Ae),Ce=Ae.marker||{},ne=[];Me.selectedOpacityFn&&ne.push(function(ue,me){ue.style("opacity",Me.selectedOpacityFn(me))}),Me.selectedColorFn&&ne.push(function(ue,me){l.fill(ue,Me.selectedColorFn(me))}),Me.selectedSizeFn&&ne.push(function(ue,me){var Te=me.mx||Ce.symbol||0,Ee=Me.selectedSizeFn(me);ue.attr("d",g(b.symbolNumber(Te),Ee,Re(me,Ae),K(me,Ae))),me.mrc2=Ee}),ne.length&&we.each(function(ue){for(var me=_.select(this),Te=0;Te0?Me:0}function R(we,Ae,Me){return Me&&(we=V(we)),Ae?B(we[1]):U(we[0])}function U(we){var Ae=_.round(we,2);return A=Ae,Ae}function B(we){var Ae=_.round(we,2);return C=Ae,Ae}function G(we,Ae,Me,Ce){var ne=we[0]-Ae[0],ue=we[1]-Ae[1],me=Me[0]-Ae[0],Te=Me[1]-Ae[1],Ee=Math.pow(ne*ne+ue*ue,.25),Ue=Math.pow(me*me+Te*Te,.25),De=(Ue*Ue*ne-Ee*Ee*me)*Ce,je=(Ue*Ue*ue-Ee*Ee*Te)*Ce,ge=3*Ue*(Ee+Ue),be=3*Ee*(Ee+Ue);return[[U(Ae[0]+(ge&&De/ge)),B(Ae[1]+(ge&&je/ge))],[U(Ae[0]-(be&&De/be)),B(Ae[1]-(be&&je/be))]]}b.textPointStyle=function(we,Ae,Me){if(we.size()){var Ce;if(Ae.selectedpoints){var ne=b.makeSelectedTextStyleFns(Ae);Ce=ne.selectedTextColorFn}var ue=Ae.texttemplate,me=Me._fullLayout;we.each(function(Te){var Ee=_.select(this),Ue=ue?w.extractOption(Te,Ae,"txt","texttemplate"):w.extractOption(Te,Ae,"tx","text");if(Ue||Ue===0){if(ue){var De=Ae._module.formatLabels,je=De?De(Te,Ae,me):{},ge={};c(ge,Ae,Te.i);var be=Ae._meta||{};Ue=w.texttemplateString(Ue,je,me._d3locale,ge,Te,be)}var Se=Te.tp||Ae.textposition,Ne=I(Te,Ae),Ye=Ce?Ce(Te):Te.tc||Ae.textfont.color;Ee.call(b.font,Te.tf||Ae.textfont.family,Ne,Ye).text(Ue).call(r.convertToTspans,Me).call(O,Se,Ne,Te.mrc)}else Ee.remove()})}},b.selectedTextStyle=function(we,Ae){if(we.size()&&Ae.selectedpoints){var Me=b.makeSelectedTextStyleFns(Ae);we.each(function(Ce){var ne=_.select(this),ue=Me.selectedTextColorFn(Ce),me=Ce.tp||Ae.textposition,Te=I(Ce,Ae);l.fill(ne,ue);var Ee=f.traceIs(Ae,"bar-like");O(ne,me,Te,Ce.mrc2||Ce.mrc,Ee)})}},b.smoothopen=function(we,Ae){if(we.length<3)return"M"+we.join("L");var Me,Ce="M"+we[0],ne=[];for(Me=1;Me=Ee||ft>=De&&ft<=Ee)&&(yt<=je&&yt>=Ue||yt>=je&&yt<=Ue)&&(we=[ft,yt])}return we}b.steps=function(we){var Ae=N[we]||j;return function(Me){for(var Ce="M"+U(Me[0][0])+","+B(Me[0][1]),ne=Me.length,ue=1;ue=1e4&&(b.savedBBoxes={},H=0),Me&&(b.savedBBoxes[Me]=be),H++,w.extendFlat({},be)},b.setClipUrl=function(we,Ae,Me){we.attr("clip-path",Q(Ae,Me))},b.getTranslate=function(we){var Ae=(we[we.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(Me,Ce,ne){return[Ce,ne].join(" ")}).split(" ");return{x:+Ae[0]||0,y:+Ae[1]||0}},b.setTranslate=function(we,Ae,Me){var Ce=we.attr?"attr":"getAttribute",ne=we.attr?"attr":"setAttribute",ue=we[Ce]("transform")||"";return Ae=Ae||0,Me=Me||0,ue=ue.replace(/(\btranslate\(.*?\);?)/,"").trim(),ue=(ue+=i(Ae,Me)).trim(),we[ne]("transform",ue),ue},b.getScale=function(we){var Ae=(we[we.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(Me,Ce,ne){return[Ce,ne].join(" ")}).split(" ");return{x:+Ae[0]||1,y:+Ae[1]||1}},b.setScale=function(we,Ae,Me){var Ce=we.attr?"attr":"getAttribute",ne=we.attr?"attr":"setAttribute",ue=we[Ce]("transform")||"";return Ae=Ae||1,Me=Me||1,ue=ue.replace(/(\bscale\(.*?\);?)/,"").trim(),ue=(ue+="scale("+Ae+","+Me+")").trim(),we[ne]("transform",ue),ue};var Y=/\s*sc.*/;b.setPointGroupScale=function(we,Ae,Me){if(Ae=Ae||1,Me=Me||1,we){var Ce=Ae===1&&Me===1?"":"scale("+Ae+","+Me+")";we.each(function(){var ne=(this.getAttribute("transform")||"").replace(Y,"");ne=(ne+=Ce).trim(),this.setAttribute("transform",ne)})}};var X=/translate\([^)]*\)\s*$/;function K(we,Ae){var Me;return we&&(Me=we.mf),Me===void 0&&(Me=Ae.marker&&Ae.marker.standoff||0),Ae._geo||Ae._xA?Me:-Me}b.setTextPointsScale=function(we,Ae,Me){we&&we.each(function(){var Ce,ne=_.select(this),ue=ne.select("text");if(ue.node()){var me=parseFloat(ue.attr("x")||0),Te=parseFloat(ue.attr("y")||0),Ee=(ne.attr("transform")||"").match(X);Ce=Ae===1&&Me===1?[]:[i(me,Te),"scale("+Ae+","+Me+")",i(-me,-Te)],Ee&&Ce.push(Ee),ne.attr("transform",Ce.join(""))}})},b.getMarkerStandoff=K;var te,ae,oe,se,fe,xe,he=Math.atan2,de=Math.cos,pe=Math.sin;function ye(we,Ae){var Me=Ae[0],Ce=Ae[1];return[Me*de(we)-Ce*pe(we),Me*pe(we)+Ce*de(we)]}function Re(we,Ae){var Me,Ce,ne=we.ma;ne===void 0&&(ne=Ae.marker.angle||0);var ue=Ae.marker.angleref;if(ue==="previous"||ue==="north"){if(Ae._geo){var me=Ae._geo.project(we.lonlat);Me=me[0],Ce=me[1]}else{var Te=Ae._xA,Ee=Ae._yA;if(!Te||!Ee)return 90;Me=Te.c2p(we.x),Ce=Ee.c2p(we.y)}if(Ae._geo){var Ue,De=we.lonlat[0],je=we.lonlat[1],ge=Ae._geo.project([De,je+1e-5]),be=Ae._geo.project([De+1e-5,je]),Se=he(be[1]-Ce,be[0]-Me),Ne=he(ge[1]-Ce,ge[0]-Me);if(ue==="north")Ue=ne/180*Math.PI;else if(ue==="previous"){var Ye=De/180*Math.PI,Ze=je/180*Math.PI,st=te/180*Math.PI,ot=ae/180*Math.PI,ft=st-Ye,yt=de(ot)*pe(ft),Et=pe(ot)*de(Ze)-de(ot)*pe(Ze)*de(ft);Ue=-he(yt,Et)-Math.PI,te=De,ae=je}var Tt=ye(Se,[de(Ue),0]),xt=ye(Ne,[pe(Ue),0]);ne=he(Tt[1]+xt[1],Tt[0]+xt[0])/Math.PI*180,ue!=="previous"||xe===Ae.uid&&we.i===fe+1||(ne=null)}if(ue==="previous"&&!Ae._geo)if(xe===Ae.uid&&we.i===fe+1&&T(Me)&&T(Ce)){var Dt=Me-oe,It=Ce-se,Ft=Ae.line&&Ae.line.shape||"",qt=Ft.slice(Ft.length-1);qt==="h"&&(It=0),qt==="v"&&(Dt=0),ne+=he(It,Dt)/Math.PI*180+90}else ne=null}return oe=Me,se=Ce,fe=we.i,xe=Ae.uid,ne}b.getMarkerAngle=Re},90998:function(D,E,e){var _,w,s,T,m=e(95616),f=e(39898).round,l="M0,0Z",t=Math.sqrt(2),i=Math.sqrt(3),r=Math.PI,n=Math.cos,o=Math.sin;function a(p){return p===null}function u(p,c,b){if(!(p&&p%360!=0||c))return b;if(s===p&&T===c&&_===b)return w;function d(R,U){var B=n(R),G=o(R),N=U[0],j=U[1]+(c||0);return[N*B-j*G,N*G+j*B]}s=p,T=c,_=b;for(var v=p/180*r,x=0,g=0,y=m(b),k="",h=0;h0,o=m._context.staticPlot;f.each(function(a){var u,p=a[0].trace,c=p.error_x||{},b=p.error_y||{};p.ids&&(u=function(g){return g.id});var d=T.hasMarkers(p)&&p.marker.maxdisplayed>0;b.visible||c.visible||(a=[]);var v=_.select(this).selectAll("g.errorbar").data(a,u);if(v.exit().remove(),a.length){c.visible||v.selectAll("path.xerror").remove(),b.visible||v.selectAll("path.yerror").remove(),v.style("opacity",1);var x=v.enter().append("g").classed("errorbar",!0);n&&x.style("opacity",0).transition().duration(t.duration).style("opacity",1),s.setClipUrl(v,l.layerClipId,m),v.each(function(g){var y=_.select(this),k=function(O,I,R){var U={x:I.c2p(O.x),y:R.c2p(O.y)};return O.yh!==void 0&&(U.yh=R.c2p(O.yh),U.ys=R.c2p(O.ys),w(U.ys)||(U.noYS=!0,U.ys=R.c2p(O.ys,!0))),O.xh!==void 0&&(U.xh=I.c2p(O.xh),U.xs=I.c2p(O.xs),w(U.xs)||(U.noXS=!0,U.xs=I.c2p(O.xs,!0))),U}(g,i,r);if(!d||g.vis){var h,M=y.select("path.yerror");if(b.visible&&w(k.x)&&w(k.yh)&&w(k.ys)){var A=b.width;h="M"+(k.x-A)+","+k.yh+"h"+2*A+"m-"+A+",0V"+k.ys,k.noYS||(h+="m-"+A+",0h"+2*A),M.size()?n&&(M=M.transition().duration(t.duration).ease(t.easing)):M=y.append("path").style("vector-effect",o?"none":"non-scaling-stroke").classed("yerror",!0),M.attr("d",h)}else M.remove();var C=y.select("path.xerror");if(c.visible&&w(k.y)&&w(k.xh)&&w(k.xs)){var L=(c.copy_ystyle?b:c).width;h="M"+k.xh+","+(k.y-L)+"v"+2*L+"m0,-"+L+"H"+k.xs,k.noXS||(h+="m0,-"+L+"v"+2*L),C.size()?n&&(C=C.transition().duration(t.duration).ease(t.easing)):C=y.append("path").style("vector-effect",o?"none":"non-scaling-stroke").classed("xerror",!0),C.attr("d",h)}else C.remove()}})}})}},62662:function(D,E,e){var _=e(39898),w=e(7901);D.exports=function(s){s.each(function(T){var m=T[0].trace,f=m.error_y||{},l=m.error_x||{},t=_.select(this);t.selectAll("path.yerror").style("stroke-width",f.thickness+"px").call(w.stroke,f.color),l.copy_ystyle&&(l=f),t.selectAll("path.xerror").style("stroke-width",l.thickness+"px").call(w.stroke,l.color)})}},77914:function(D,E,e){var _=e(41940),w=e(528).hoverlabel,s=e(1426).extendFlat;D.exports={hoverlabel:{bgcolor:s({},w.bgcolor,{arrayOk:!0}),bordercolor:s({},w.bordercolor,{arrayOk:!0}),font:_({arrayOk:!0,editType:"none"}),align:s({},w.align,{arrayOk:!0}),namelength:s({},w.namelength,{arrayOk:!0}),editType:"none"}}},30732:function(D,E,e){var _=e(71828),w=e(73972);function s(T,m,f,l){l=l||_.identity,Array.isArray(T)&&(m[0][f]=l(T))}D.exports=function(T){var m=T.calcdata,f=T._fullLayout;function l(o){return function(a){return _.coerceHoverinfo({hoverinfo:a},{_module:o._module},f)}}for(var t=0;t=0&&i.indexne[0]._length||Ke<0||Ke>ue[0]._length)return o.unhoverRaw(se,fe)}else Je="xpx"in fe?fe.xpx:ne[0]._length/2,Ke="ypx"in fe?fe.ypx:ue[0]._length/2;if(fe.pointerX=Je+ne[0]._offset,fe.pointerY=Ke+ue[0]._offset,be="xval"in fe?p.flat(pe,fe.xval):p.p2c(ne,Je),Se="yval"in fe?p.flat(pe,fe.yval):p.p2c(ue,Ke),!w(be[0])||!w(Se[0]))return T.warn("Fx.hover failed",fe,se),o.unhoverRaw(se,fe)}var ht=1/0;function Oe($t,mn){for(Ye=0;YeDt&&(It.splice(0,Dt),ht=It[0].distance),Ae&&ge!==0&&It.length===0){xt.distance=ge,xt.index=!1;var Zn=st._module.hoverPoints(xt,Et,Tt,"closest",{hoverLayer:ye._hoverlayer});if(Zn&&(Zn=Zn.filter(function(Jt){return Jt.spikeDistance<=ge})),Zn&&Zn.length){var Qn,hr=Zn.filter(function(Jt){return Jt.xa.showspikes&&Jt.xa.spikesnap!=="hovered data"});if(hr.length){var tn=hr[0];w(tn.x0)&&w(tn.y0)&&(Qn=Qe(tn),(!qt.vLinePoint||qt.vLinePoint.spikeDistance>Qn.spikeDistance)&&(qt.vLinePoint=Qn))}var Pn=Zn.filter(function(Jt){return Jt.ya.showspikes&&Jt.ya.spikesnap!=="hovered data"});if(Pn.length){var jt=Pn[0];w(jt.x0)&&w(jt.y0)&&(Qn=Qe(jt),(!qt.hLinePoint||qt.hLinePoint.spikeDistance>Qn.spikeDistance)&&(qt.hLinePoint=Qn))}}}}}function Be($t,mn,Ln){for(var En,jn=null,$n=1/0,Zn=0;Zn<$t.length;Zn++)En=$t[Zn].spikeDistance,Ln&&Zn===0&&(En=-1/0),En<=$n&&En<=mn&&(jn=$t[Zn],$n=En);return jn}function Qe($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}Oe();var ut={fullLayout:ye,container:ye._hoverlayer,event:fe},pt=se._spikepoints,bt={vLinePoint:qt.vLinePoint,hLinePoint:qt.hLinePoint};se._spikepoints=bt;var Lt=function(){It.sort(function($t,mn){return $t.distance-mn.distance}),It=function($t,mn){for(var Ln=mn.charAt(0),En=[],jn=[],$n=[],Zn=0;Zn<$t.length;Zn++){var Qn=$t[Zn];u.traceIs(Qn.trace,"bar-like")||u.traceIs(Qn.trace,"box-violin")?$n.push(Qn):Qn.trace[Ln+"period"]?jn.push(Qn):En.push(Qn)}return En.concat(jn).concat($n)}(It,De)};Lt();var Ct=De.charAt(0),mt=(Ct==="x"||Ct==="y")&&It[0]&&C[It[0].trace.type];if(Ae&&ge!==0&&It.length!==0){var Ot=Be(It.filter(function($t){return $t.ya.showspikes}),ge,mt);qt.hLinePoint=Qe(Ot);var _t=Be(It.filter(function($t){return $t.xa.showspikes}),ge,mt);qt.vLinePoint=Qe(_t)}if(It.length===0){var Pt=o.unhoverRaw(se,fe);return!Ae||qt.hLinePoint===null&&qt.vLinePoint===null||j(pt)&&N(se,qt,ut),Pt}if(Ae&&j(pt)&&N(se,qt,ut),p.isXYhover(yt)&&It[0].length!==0&&It[0].trace.type!=="splom"){var Bt=It[0],Wt=(It=A[Bt.trace.type]?It.filter(function($t){return $t.trace.index===Bt.trace.index}):[Bt]).length;Oe(H("x",Bt,ye),H("y",Bt,ye));var Gt,Xt=[],Kt={},nn=0,yn=function($t){var mn=A[$t.trace.type]?L($t):$t.trace.index;if(Kt[mn]){var Ln=Kt[mn]-1,En=Xt[Ln];Ln>0&&Math.abs($t.distance)Wt-1;Gt--)yn(It[Gt]);It=Xt,Lt()}var ln=se._hoverdata,kn=[],Wn=ee(se),wn=Q(se);for(Ne=0;Ne1||It.length>1)||De==="closest"&&Nt&&It.length>1,gr=n.combine(ye.plot_bgcolor||n.background,ye.paper_bgcolor),ir=I(It,{gd:se,hovermode:De,rotateLabels:kr,bgColor:gr,container:ye._hoverlayer,outerContainer:ye._paper.node(),commonLabelOpts:ye.hoverlabel,hoverdistance:ye.hoverdistance}),dr=ir.hoverLabels;if(p.isUnifiedHover(De)||(function($t,mn,Ln,En){var jn,$n,Zn,Qn,hr,tn,Pn,jt=mn?"xa":"ya",Jt=mn?"ya":"xa",un=0,Rn=1,On=$t.size(),Sn=new Array(On),pn=0,bn=En.minX,dn=En.maxX,vn=En.minY,An=En.maxY,Bn=function(Mr){return Mr*Ln._invScaleX},Xn=function(Mr){return Mr*Ln._invScaleY};function er(Mr){var Lr=Mr[0],pr=Mr[Mr.length-1];if($n=Lr.pmin-Lr.pos-Lr.dp+Lr.size,Zn=pr.pos+pr.dp+pr.size-Lr.pmax,$n>.01){for(hr=Mr.length-1;hr>=0;hr--)Mr[hr].dp+=$n;jn=!1}if(!(Zn<.01)){if($n<-.01){for(hr=Mr.length-1;hr>=0;hr--)Mr[hr].dp-=Zn;jn=!1}if(jn){var Pr=0;for(Qn=0;QnLr.pmax&&Pr++;for(Qn=Mr.length-1;Qn>=0&&!(Pr<=0);Qn--)(tn=Mr[Qn]).pos>Lr.pmax-1&&(tn.del=!0,Pr--);for(Qn=0;Qn=0;hr--)Mr[hr].dp-=Zn;for(Qn=Mr.length-1;Qn>=0&&!(Pr<=0);Qn--)(tn=Mr[Qn]).pos+tn.dp+tn.size>Lr.pmax&&(tn.del=!0,Pr--)}}}for($t.each(function(Mr){var Lr=Mr[jt],pr=Mr[Jt],Pr=Lr._id.charAt(0)==="x",Hr=Lr.range;pn===0&&Hr&&Hr[0]>Hr[1]!==Pr&&(Rn=-1);var ci=0,Ti=Pr?Ln.width:Ln.height;if(Ln.hovermode==="x"||Ln.hovermode==="y"){var Mi,fa,Hi=U(Mr,mn),xi=Mr.anchor,Oa=xi==="end"?-1:1;if(xi==="middle")fa=(Mi=Mr.crossPos+(Pr?Xn(Hi.y-Mr.by/2):Bn(Mr.bx/2+Mr.tx2width/2)))+(Pr?Xn(Mr.by):Bn(Mr.bx));else if(Pr)fa=(Mi=Mr.crossPos+Xn(h+Hi.y)-Xn(Mr.by/2-h))+Xn(Mr.by);else{var Ka=Bn(Oa*h+Hi.x),Yo=Ka+Bn(Oa*Mr.bx);Mi=Mr.crossPos+Math.min(Ka,Yo),fa=Mr.crossPos+Math.max(Ka,Yo)}Pr?vn!==void 0&&An!==void 0&&Math.min(fa,An)-Math.max(Mi,vn)>1&&(pr.side==="left"?(ci=pr._mainLinePosition,Ti=Ln.width):Ti=pr._mainLinePosition):bn!==void 0&&dn!==void 0&&Math.min(fa,dn)-Math.max(Mi,bn)>1&&(pr.side==="top"?(ci=pr._mainLinePosition,Ti=Ln.height):Ti=pr._mainLinePosition)}Sn[pn++]=[{datum:Mr,traceIndex:Mr.trace.index,dp:0,pos:Mr.pos,posref:Mr.posref,size:Mr.by*(Pr?g:1)/2,pmin:ci,pmax:Ti}]}),Sn.sort(function(Mr,Lr){return Mr[0].posref-Lr[0].posref||Rn*(Lr[0].traceIndex-Mr[0].traceIndex)});!jn&&un<=On;){for(un++,jn=!0,Qn=0;Qn.01&&sr.pmin===fr.pmin&&sr.pmax===fr.pmax){for(hr=lr.length-1;hr>=0;hr--)lr[hr].dp+=$n;for(Jn.push.apply(Jn,lr),Sn.splice(Qn+1,1),Pn=0,hr=Jn.length-1;hr>=0;hr--)Pn+=Jn[hr].dp;for(Zn=Pn/Jn.length,hr=Jn.length-1;hr>=0;hr--)Jn[hr].dp-=Zn;jn=!1}else Qn++}Sn.forEach(er)}for(Qn=Sn.length-1;Qn>=0;Qn--){var cr=Sn[Qn];for(hr=cr.length-1;hr>=0;hr--){var vr=cr[hr],Sr=vr.datum;Sr.offset=vr.dp,Sr.del=vr.del}}}(dr,kr,ye,ir.commonLabelBoundingBox),B(dr,kr,ye._invScaleX,ye._invScaleY)),de&&de.tagName){var yr=u.getComponentMethod("annotations","hasClickToShow")(se,kn);i(_.select(de),yr?"pointer":"")}de&&!he&&function($t,mn,Ln){if(!Ln||Ln.length!==$t._hoverdata.length)return!0;for(var En=Ln.length-1;En>=0;En--){var jn=Ln[En],$n=$t._hoverdata[En];if(jn.curveNumber!==$n.curveNumber||String(jn.pointNumber)!==String($n.pointNumber)||String(jn.pointNumbers)!==String($n.pointNumbers))return!0}return!1}(se,0,ln)&&(ln&&se.emit("plotly_unhover",{event:fe,points:ln}),se.emit("plotly_hover",{event:fe,points:se._hoverdata,xaxes:ne,yaxes:ue,xvals:be,yvals:Se}))})(X,K,te,ae,oe)})},E.loneHover=function(X,K){var te=!0;Array.isArray(X)||(te=!1,X=[X]);var ae=K.gd,oe=ee(ae),se=Q(ae),fe=I(X.map(function(de){var pe=de._x0||de.x0||de.x||0,ye=de._x1||de.x1||de.x||0,Re=de._y0||de.y0||de.y||0,we=de._y1||de.y1||de.y||0,Ae=de.eventData;if(Ae){var Me=Math.min(pe,ye),Ce=Math.max(pe,ye),ne=Math.min(Re,we),ue=Math.max(Re,we),me=de.trace;if(u.traceIs(me,"gl3d")){var Te=ae._fullLayout[me.scene]._scene.container,Ee=Te.offsetLeft,Ue=Te.offsetTop;Me+=Ee,Ce+=Ee,ne+=Ue,ue+=Ue}Ae.bbox={x0:Me+se,x1:Ce+se,y0:ne+oe,y1:ue+oe},K.inOut_bbox&&K.inOut_bbox.push(Ae.bbox)}else Ae=!1;return{color:de.color||n.defaultLine,x0:de.x0||de.x||0,x1:de.x1||de.x||0,y0:de.y0||de.y||0,y1:de.y1||de.y||0,xLabel:de.xLabel,yLabel:de.yLabel,zLabel:de.zLabel,text:de.text,name:de.name,idealAlign:de.idealAlign,borderColor:de.borderColor,fontFamily:de.fontFamily,fontSize:de.fontSize,fontColor:de.fontColor,nameLength:de.nameLength,textAlign:de.textAlign,trace:de.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:de.hovertemplate||!1,hovertemplateLabels:de.hovertemplateLabels||!1,eventData:Ae}}),{gd:ae,hovermode:"closest",rotateLabels:!1,bgColor:K.bgColor||n.background,container:_.select(K.container),outerContainer:K.outerContainer||K.container}).hoverLabels,xe=0,he=0;return fe.sort(function(de,pe){return de.y0-pe.y0}).each(function(de,pe){var ye=de.y0-de.by/2;de.offset=ye-5([\s\S]*)<\/extra>/;function I(X,K){var te=K.gd,ae=te._fullLayout,oe=K.hovermode,se=K.rotateLabels,fe=K.bgColor,xe=K.container,he=K.outerContainer,de=K.commonLabelOpts||{};if(X.length===0)return[[]];var pe=K.fontFamily||c.HOVERFONT,ye=K.fontSize||c.HOVERFONTSIZE,Re=X[0],we=Re.xa,Ae=Re.ya,Me=oe.charAt(0),Ce=Me+"Label",ne=Re[Ce];if(ne===void 0&&we.type==="multicategory")for(var ue=0;ueae.width-wn?(yn=ae.width-wn,Bt.attr("d","M"+(wn-h)+",0L"+wn+","+Wn+h+"v"+Wn+(2*M+kn.height)+"H-"+wn+"V"+Wn+h+"H"+(wn-2*h)+"Z")):Bt.attr("d","M0,0L"+h+","+Wn+h+"H"+wn+"v"+Wn+(2*M+kn.height)+"H-"+wn+"V"+Wn+h+"H-"+h+"Z"),Ye.minX=yn-wn,Ye.maxX=yn+wn,we.side==="top"?(Ye.minY=ln-(2*M+kn.height),Ye.maxY=ln-M):(Ye.minY=ln+M,Ye.maxY=ln+(2*M+kn.height))}else{var on,_n,fn;Ae.side==="right"?(on="start",_n=1,fn="",yn=we._offset+we._length):(on="end",_n=-1,fn="-",yn=we._offset),ln=Ae._offset+(Re.y0+Re.y1)/2,Wt.attr("text-anchor",on),Bt.attr("d","M0,0L"+fn+h+","+h+"V"+(M+kn.height/2)+"h"+fn+(2*M+kn.width)+"V-"+(M+kn.height/2)+"H"+fn+h+"V-"+h+"Z"),Ye.minY=ln-(M+kn.height/2),Ye.maxY=ln+(M+kn.height/2),Ae.side==="right"?(Ye.minX=yn+h,Ye.maxX=yn+h+(2*M+kn.width)):(Ye.minX=yn-h-(2*M+kn.width),Ye.maxX=yn-h);var hn,In=kn.height/2,Cn=Te-kn.top-In,Nn="clip"+ae._uid+"commonlabel"+Ae._id;if(yn=0?Ke:Ge+Oe=0?Ge:mt+Oe=0?Nt:Je+Be=0?Je:Ot+Be=0,Pt.idealAlign!=="top"&&tr||!kr?tr?(In+=Nn/2,Pt.anchor="start"):Pt.anchor="middle":(In-=Nn/2,Pt.anchor="end"),Pt.crossPos=In;else{if(Pt.pos=In,tr=hn+Cn/2+gr<=Ee,kr=hn-Cn/2-gr>=0,Pt.idealAlign!=="left"&&tr||!kr)if(tr)hn+=Cn/2,Pt.anchor="start";else{Pt.anchor="middle";var ir=gr/2,dr=hn+ir-Ee,yr=hn-ir;dr>0&&(hn-=dr),yr<0&&(hn+=-yr)}else hn-=Cn/2,Pt.anchor="end";Pt.crossPos=hn}Wn.attr("text-anchor",Pt.anchor),on&&wn.attr("text-anchor",Pt.anchor),Bt.attr("transform",m(hn,In)+(se?f(v):""))}),{hoverLabels:_t,commonLabelBoundingBox:Ye}}function R(X,K,te,ae,oe,se){var fe="",xe="";X.nameOverride!==void 0&&(X.name=X.nameOverride),X.name&&(X.trace._meta&&(X.name=T.templateString(X.name,X.trace._meta)),fe=V(X.name,X.nameLength));var he=te.charAt(0),de=he==="x"?"y":"x";X.zLabel!==void 0?(X.xLabel!==void 0&&(xe+="x: "+X.xLabel+"
"),X.yLabel!==void 0&&(xe+="y: "+X.yLabel+"
"),X.trace.type!=="choropleth"&&X.trace.type!=="choroplethmapbox"&&(xe+=(xe?"z: ":"")+X.zLabel)):K&&X[he+"Label"]===oe?xe=X[de+"Label"]||"":X.xLabel===void 0?X.yLabel!==void 0&&X.trace.type!=="scattercarpet"&&(xe=X.yLabel):xe=X.yLabel===void 0?X.xLabel:"("+X.xLabel+", "+X.yLabel+")",!X.text&&X.text!==0||Array.isArray(X.text)||(xe+=(xe?"
":"")+X.text),X.extraText!==void 0&&(xe+=(xe?"
":"")+X.extraText),se&&xe===""&&!X.hovertemplate&&(fe===""&&se.remove(),xe=fe);var pe=X.hovertemplate||!1;if(pe){var ye=X.hovertemplateLabels||X;X[he+"Label"]!==oe&&(ye[he+"other"]=ye[he+"Val"],ye[he+"otherLabel"]=ye[he+"Label"]),xe=(xe=T.hovertemplateString(pe,ye,ae._d3locale,X.eventData[0]||{},X.trace._meta)).replace(O,function(Re,we){return fe=V(we,X.nameLength),""})}return[xe,fe]}function U(X,K){var te=0,ae=X.offset;return K&&(ae*=-k,te=X.offset*y),{x:te,y:ae}}function B(X,K,te,ae){var oe=function(fe){return fe*te},se=function(fe){return fe*ae};X.each(function(fe){var xe=_.select(this);if(fe.del)return xe.remove();var he,de,pe,ye,Re=xe.select("text.nums"),we=fe.anchor,Ae=we==="end"?-1:1,Me=(ye=(pe=(de={start:1,end:-1,middle:0}[(he=fe).anchor])*(h+M))+de*(he.txwidth+M),he.anchor==="middle"&&(pe-=he.tx2width/2,ye+=he.txwidth/2+M),{alignShift:de,textShiftX:pe,text2ShiftX:ye}),Ce=U(fe,K),ne=Ce.x,ue=Ce.y,me=we==="middle";xe.select("path").attr("d",me?"M-"+oe(fe.bx/2+fe.tx2width/2)+","+se(ue-fe.by/2)+"h"+oe(fe.bx)+"v"+se(fe.by)+"h-"+oe(fe.bx)+"Z":"M0,0L"+oe(Ae*h+ne)+","+se(h+ue)+"v"+se(fe.by/2-h)+"h"+oe(Ae*fe.bx)+"v-"+se(fe.by)+"H"+oe(Ae*h+ne)+"V"+se(ue-h)+"Z");var Te=ne+Me.textShiftX,Ee=ue+fe.ty0-fe.by/2+M,Ue=fe.textAlign||"auto";Ue!=="auto"&&(Ue==="left"&&we!=="start"?(Re.attr("text-anchor","start"),Te=me?-fe.bx/2-fe.tx2width/2+M:-fe.bx-M):Ue==="right"&&we!=="end"&&(Re.attr("text-anchor","end"),Te=me?fe.bx/2-fe.tx2width/2-M:fe.bx+M)),Re.call(t.positionText,oe(Te),se(Ee)),fe.tx2width&&(xe.select("text.name").call(t.positionText,oe(Me.text2ShiftX+Me.alignShift*M+ne),se(ue+fe.ty0-fe.by/2+M)),xe.select("rect").call(r.setRect,oe(Me.text2ShiftX+(Me.alignShift-1)*fe.tx2width/2+ne),se(ue-fe.by/2-1),oe(fe.tx2width),se(fe.by+2)))})}function G(X,K){var te=X.index,ae=X.trace||{},oe=X.cd[0],se=X.cd[te]||{};function fe(Re){return Re||w(Re)&&Re===0}var xe=Array.isArray(te)?function(Re,we){var Ae=T.castOption(oe,te,Re);return fe(Ae)?Ae:T.extractOption({},ae,"",we)}:function(Re,we){return T.extractOption(se,ae,Re,we)};function he(Re,we,Ae){var Me=xe(we,Ae);fe(Me)&&(X[Re]=Me)}if(he("hoverinfo","hi","hoverinfo"),he("bgcolor","hbg","hoverlabel.bgcolor"),he("borderColor","hbc","hoverlabel.bordercolor"),he("fontFamily","htf","hoverlabel.font.family"),he("fontSize","hts","hoverlabel.font.size"),he("fontColor","htc","hoverlabel.font.color"),he("nameLength","hnl","hoverlabel.namelength"),he("textAlign","hta","hoverlabel.align"),X.posref=K==="y"||K==="closest"&&ae.orientation==="h"?X.xa._offset+(X.x0+X.x1)/2:X.ya._offset+(X.y0+X.y1)/2,X.x0=T.constrain(X.x0,0,X.xa._length),X.x1=T.constrain(X.x1,0,X.xa._length),X.y0=T.constrain(X.y0,0,X.ya._length),X.y1=T.constrain(X.y1,0,X.ya._length),X.xLabelVal!==void 0&&(X.xLabel="xLabel"in X?X.xLabel:a.hoverLabelText(X.xa,X.xLabelVal,ae.xhoverformat),X.xVal=X.xa.c2d(X.xLabelVal)),X.yLabelVal!==void 0&&(X.yLabel="yLabel"in X?X.yLabel:a.hoverLabelText(X.ya,X.yLabelVal,ae.yhoverformat),X.yVal=X.ya.c2d(X.yLabelVal)),X.zLabelVal!==void 0&&X.zLabel===void 0&&(X.zLabel=String(X.zLabelVal)),!(isNaN(X.xerr)||X.xa.type==="log"&&X.xerr<=0)){var de=a.tickText(X.xa,X.xa.c2l(X.xerr),"hover").text;X.xerrneg!==void 0?X.xLabel+=" +"+de+" / -"+a.tickText(X.xa,X.xa.c2l(X.xerrneg),"hover").text:X.xLabel+=" ± "+de,K==="x"&&(X.distance+=1)}if(!(isNaN(X.yerr)||X.ya.type==="log"&&X.yerr<=0)){var pe=a.tickText(X.ya,X.ya.c2l(X.yerr),"hover").text;X.yerrneg!==void 0?X.yLabel+=" +"+pe+" / -"+a.tickText(X.ya,X.ya.c2l(X.yerrneg),"hover").text:X.yLabel+=" ± "+pe,K==="y"&&(X.distance+=1)}var ye=X.hoverinfo||X.trace.hoverinfo;return ye&&ye!=="all"&&((ye=Array.isArray(ye)?ye:ye.split("+")).indexOf("x")===-1&&(X.xLabel=void 0),ye.indexOf("y")===-1&&(X.yLabel=void 0),ye.indexOf("z")===-1&&(X.zLabel=void 0),ye.indexOf("text")===-1&&(X.text=void 0),ye.indexOf("name")===-1&&(X.name=void 0)),X}function N(X,K,te){var ae,oe,se=te.container,fe=te.fullLayout,xe=fe._size,he=te.event,de=!!K.hLinePoint,pe=!!K.vLinePoint;if(se.selectAll(".spikeline").remove(),pe||de){var ye=n.combine(fe.plot_bgcolor,fe.paper_bgcolor);if(de){var Re,we,Ae=K.hLinePoint;ae=Ae&&Ae.xa,(oe=Ae&&Ae.ya).spikesnap==="cursor"?(Re=he.pointerX,we=he.pointerY):(Re=ae._offset+Ae.x,we=oe._offset+Ae.y);var Me,Ce,ne=s.readability(Ae.color,ye)<1.5?n.contrast(ye):Ae.color,ue=oe.spikemode,me=oe.spikethickness,Te=oe.spikecolor||ne,Ee=a.getPxPosition(X,oe);if(ue.indexOf("toaxis")!==-1||ue.indexOf("across")!==-1){if(ue.indexOf("toaxis")!==-1&&(Me=Ee,Ce=Re),ue.indexOf("across")!==-1){var Ue=oe._counterDomainMin,De=oe._counterDomainMax;oe.anchor==="free"&&(Ue=Math.min(Ue,oe.position),De=Math.max(De,oe.position)),Me=xe.l+Ue*xe.w,Ce=xe.l+De*xe.w}se.insert("line",":first-child").attr({x1:Me,x2:Ce,y1:we,y2:we,"stroke-width":me,stroke:Te,"stroke-dasharray":r.dashStyle(oe.spikedash,me)}).classed("spikeline",!0).classed("crisp",!0),se.insert("line",":first-child").attr({x1:Me,x2:Ce,y1:we,y2:we,"stroke-width":me+2,stroke:ye}).classed("spikeline",!0).classed("crisp",!0)}ue.indexOf("marker")!==-1&&se.insert("circle",":first-child").attr({cx:Ee+(oe.side!=="right"?me:-me),cy:we,r:me,fill:Te}).classed("spikeline",!0)}if(pe){var je,ge,be=K.vLinePoint;ae=be&&be.xa,oe=be&&be.ya,ae.spikesnap==="cursor"?(je=he.pointerX,ge=he.pointerY):(je=ae._offset+be.x,ge=oe._offset+be.y);var Se,Ne,Ye=s.readability(be.color,ye)<1.5?n.contrast(ye):be.color,Ze=ae.spikemode,st=ae.spikethickness,ot=ae.spikecolor||Ye,ft=a.getPxPosition(X,ae);if(Ze.indexOf("toaxis")!==-1||Ze.indexOf("across")!==-1){if(Ze.indexOf("toaxis")!==-1&&(Se=ft,Ne=ge),Ze.indexOf("across")!==-1){var yt=ae._counterDomainMin,Et=ae._counterDomainMax;ae.anchor==="free"&&(yt=Math.min(yt,ae.position),Et=Math.max(Et,ae.position)),Se=xe.t+(1-Et)*xe.h,Ne=xe.t+(1-yt)*xe.h}se.insert("line",":first-child").attr({x1:je,x2:je,y1:Se,y2:Ne,"stroke-width":st,stroke:ot,"stroke-dasharray":r.dashStyle(ae.spikedash,st)}).classed("spikeline",!0).classed("crisp",!0),se.insert("line",":first-child").attr({x1:je,x2:je,y1:Se,y2:Ne,"stroke-width":st+2,stroke:ye}).classed("spikeline",!0).classed("crisp",!0)}Ze.indexOf("marker")!==-1&&se.insert("circle",":first-child").attr({cx:je,cy:ft-(ae.side!=="top"?st:-st),r:st,fill:ot}).classed("spikeline",!0)}}}function j(X,K){return!K||K.vLinePoint!==X._spikepoints.vLinePoint||K.hLinePoint!==X._spikepoints.hLinePoint}function V(X,K){return t.plainText(X||"",{len:K,allowedTags:["br","sub","sup","b","i","em"]})}function H(X,K,te){var ae=K[X+"a"],oe=K[X+"Val"],se=K.cd[0];if(ae.type==="category"||ae.type==="multicategory")oe=ae._categoriesMap[oe];else if(ae.type==="date"){var fe=K.trace[X+"periodalignment"];if(fe){var xe=K.cd[K.index],he=xe[X+"Start"];he===void 0&&(he=xe[X]);var de=xe[X+"End"];de===void 0&&(de=xe[X]);var pe=de-he;fe==="end"?oe+=pe:fe==="middle"&&(oe+=pe/2)}oe=ae.d2c(oe)}return se&&se.t&&se.t.posLetter===ae._id&&(te.boxmode!=="group"&&te.violinmode!=="group"||(oe+=se.t.dPos)),oe}function ee(X){return X.offsetTop+X.clientTop}function Q(X){return X.offsetLeft+X.clientLeft}function Y(X,K){var te=X._fullLayout,ae=K.getBoundingClientRect(),oe=ae.left,se=ae.top,fe=oe+ae.width,xe=se+ae.height,he=T.apply3DTransform(te._invTransform)(oe,se),de=T.apply3DTransform(te._invTransform)(fe,xe),pe=he[0],ye=he[1],Re=de[0],we=de[1];return{x:pe,y:ye,width:Re-pe,height:we-ye,top:Math.min(ye,we),left:Math.min(pe,Re),right:Math.max(pe,Re),bottom:Math.max(ye,we)}}},38048:function(D,E,e){var _=e(71828),w=e(7901),s=e(23469).isUnifiedHover;D.exports=function(T,m,f,l){l=l||{};var t=m.legend;function i(r){l.font[r]||(l.font[r]=t?m.legend.font[r]:m.font[r])}m&&s(m.hovermode)&&(l.font||(l.font={}),i("size"),i("family"),i("color"),t?(l.bgcolor||(l.bgcolor=w.combine(m.legend.bgcolor,m.paper_bgcolor)),l.bordercolor||(l.bordercolor=m.legend.bordercolor)):l.bgcolor||(l.bgcolor=m.paper_bgcolor)),f("hoverlabel.bgcolor",l.bgcolor),f("hoverlabel.bordercolor",l.bordercolor),f("hoverlabel.namelength",l.namelength),_.coerceFont(f,"hoverlabel.font",l.font),f("hoverlabel.align",l.align)}},98212:function(D,E,e){var _=e(71828),w=e(528);D.exports=function(s,T){function m(f,l){return T[f]!==void 0?T[f]:_.coerce(s,T,w,f,l)}return m("clickmode"),m("hovermode")}},30211:function(D,E,e){var _=e(39898),w=e(71828),s=e(28569),T=e(23469),m=e(528),f=e(88335);D.exports={moduleType:"component",name:"fx",constants:e(26675),schema:{layout:m},attributes:e(77914),layoutAttributes:m,supplyLayoutGlobalDefaults:e(22774),supplyDefaults:e(54268),supplyLayoutDefaults:e(34938),calc:e(30732),getDistanceFunction:T.getDistanceFunction,getClosest:T.getClosest,inbox:T.inbox,quadrature:T.quadrature,appendArrayPointValue:T.appendArrayPointValue,castHoverOption:function(l,t,i){return w.castOption(l,t,"hoverlabel."+i)},castHoverinfo:function(l,t,i){return w.castOption(l,i,"hoverinfo",function(r){return w.coerceHoverinfo({hoverinfo:r},{_module:l._module},t)})},hover:f.hover,unhover:s.unhover,loneHover:f.loneHover,loneUnhover:function(l){var t=w.isD3Selection(l)?l:_.select(l);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()},click:e(75914)}},528:function(D,E,e){var _=e(26675),w=e(41940),s=w({editType:"none"});s.family.dflt=_.HOVERFONT,s.size.dflt=_.HOVERFONTSIZE,D.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"},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:s,grouptitlefont:w({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"}}},34938:function(D,E,e){var _=e(71828),w=e(528),s=e(98212),T=e(38048);D.exports=function(m,f){function l(n,o){return _.coerce(m,f,w,n,o)}s(m,f)&&(l("hoverdistance"),l("spikedistance")),l("dragmode")==="select"&&l("selectdirection");var t=f._has("mapbox"),i=f._has("geo"),r=f._basePlotModules.length;f.dragmode==="zoom"&&((t||i)&&r===1||t&&i&&r===2)&&(f.dragmode="pan"),T(m,f,l),_.coerceFont(l,"hoverlabel.grouptitlefont",f.hoverlabel.font)}},22774:function(D,E,e){var _=e(71828),w=e(38048),s=e(528);D.exports=function(T,m){w(T,m,function(f,l){return _.coerce(T,m,s,f,l)})}},83312:function(D,E,e){var _=e(71828),w=e(30587).counter,s=e(27670).Y,T=e(85555).idRegex,m=e(44467),f={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:[w("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[T.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[T.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:s({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 l(r,n,o){var a=n[o+"axes"],u=Object.keys((r._splomAxes||{})[o]||{});return Array.isArray(a)?a:u.length?u:void 0}function t(r,n,o,a,u,p){var c=n(r+"gap",o),b=n("domain."+r);n(r+"side",a);for(var d=new Array(u),v=b[0],x=(b[1]-v)/(u-c),g=x*(1-c),y=0;y1){b||d||v||O("pattern")==="independent"&&(b=!0),g._hasSubplotGrid=b;var h,M,A=O("roworder")==="top to bottom",C=b?.2:.1,L=b?.3:.1;x&&n._splomGridDflt&&(h=n._splomGridDflt.xside,M=n._splomGridDflt.yside),g._domains={x:t("x",O,C,h,k),y:t("y",O,L,M,y,A)}}else delete n.grid}function O(I,R){return _.coerce(o,g,f,I,R)}},contentDefaults:function(r,n){var o=n.grid;if(o&&o._domains){var a,u,p,c,b,d,v,x=r.grid||{},g=n._subplots,y=o._hasSubplotGrid,k=o.rows,h=o.columns,M=o.pattern==="independent",A=o._axisMap={};if(y){var C=x.subplots||[];d=o.subplots=new Array(k);var L=1;for(a=0;a1);if(M===!1&&(n.legend=void 0),(M!==!1||a.uirevision)&&(p("uirevision",n.uirevision),M!==!1)){p("borderwidth");var A,C,L,O=p("orientation")==="h";if(O?(A=0,_.getComponentMethod("rangeslider","isVisible")(r.xaxis)?(C=1.1,L="bottom"):(C=-.1,L="top")):(A=1.02,C=1,L="auto"),p("traceorder",k),l.isGrouped(n.legend)&&p("tracegroupgap"),p("entrywidth"),p("entrywidthmode"),p("itemsizing"),p("itemwidth"),p("itemclick"),p("itemdoubleclick"),p("groupclick"),p("x",A),p("xanchor"),p("y",C),p("yanchor",L),p("valign"),w.noneOrAll(a,u,["x","y"]),p("title.text")){p("title.side",O?"left":"top");var I=w.extendFlat({},c,{size:w.bigFont(c.size)});w.coerceFont(p,"title.font",I)}}}}D.exports=function(i,r,n){var o,a=["legend"];for(o=0;o1)}var ee=N.hiddenlabels||[];if(!(V||N.showlegend&&H.length))return B.selectAll("."+j).remove(),N._topdefs.select("#"+U).remove(),s.autoMargin(I,j);var Q=w.ensureSingle(B,"g",j,function(xe){V||xe.attr("pointer-events","all")}),Y=w.ensureSingleById(N._topdefs,"clipPath",U,function(xe){xe.append("rect")}),X=w.ensureSingle(Q,"rect","bg",function(xe){xe.attr("shape-rendering","crispEdges")});X.call(t.stroke,G.bordercolor).call(t.fill,G.bgcolor).style("stroke-width",G.borderwidth+"px");var K=w.ensureSingle(Q,"g","scrollbox"),te=G.title;if(G._titleWidth=0,G._titleHeight=0,te.text){var ae=w.ensureSingle(K,"text",j+"titletext");ae.attr("text-anchor","start").call(l.font,te.font).text(te.text),A(ae,K,I,G,1)}else K.selectAll("."+j+"titletext").remove();var oe=w.ensureSingle(Q,"rect","scrollbar",function(xe){xe.attr(n.scrollBarEnterAttrs).call(t.fill,n.scrollBarColor)}),se=K.selectAll("g.groups").data(H);se.enter().append("g").attr("class","groups"),se.exit().remove();var fe=se.selectAll("g.traces").data(w.identity);fe.enter().append("g").attr("class","traces"),fe.exit().remove(),fe.style("opacity",function(xe){var he=xe[0].trace;return T.traceIs(he,"pie-like")?ee.indexOf(xe[0].label)!==-1?.5:1:he.visible==="legendonly"?.5:1}).each(function(){_.select(this).call(k,I,G)}).call(b,I,G).each(function(){V||_.select(this).call(M,I,j)}),w.syncOrAsync([s.previousPromises,function(){return function(xe,he,de,pe){var ye=xe._fullLayout,Re=O(pe);pe||(pe=ye[Re]);var we=ye._size,Ae=d.isVertical(pe),Me=d.isGrouped(pe),Ce=pe.entrywidthmode==="fraction",ne=pe.borderwidth,ue=2*ne,me=n.itemGap,Te=pe.itemwidth+2*me,Ee=2*(ne+me),Ue=L(pe),De=pe.y<0||pe.y===0&&Ue==="top",je=pe.y>1||pe.y===1&&Ue==="bottom",ge=pe.tracegroupgap,be={};pe._maxHeight=Math.max(De||je?ye.height/2:we.h,30);var Se=0;pe._width=0,pe._height=0;var Ne=function(Oe){var Be=0,Qe=0,ut=Oe.title.side;return ut&&(ut.indexOf("left")!==-1&&(Be=Oe._titleWidth),ut.indexOf("top")!==-1&&(Qe=Oe._titleHeight)),[Be,Qe]}(pe);if(Ae)de.each(function(Oe){var Be=Oe[0].height;l.setTranslate(this,ne+Ne[0],ne+Ne[1]+pe._height+Be/2+me),pe._height+=Be,pe._width=Math.max(pe._width,Oe[0].width)}),Se=Te+pe._width,pe._width+=me+Te+ue,pe._height+=Ee,Me&&(he.each(function(Oe,Be){l.setTranslate(this,0,Be*pe.tracegroupgap)}),pe._height+=(pe._lgroupsLength-1)*pe.tracegroupgap);else{var Ye=C(pe),Ze=pe.x<0||pe.x===0&&Ye==="right",st=pe.x>1||pe.x===1&&Ye==="left",ot=je||De,ft=ye.width/2;pe._maxWidth=Math.max(Ze?ot&&Ye==="left"?we.l+we.w:ft:st?ot&&Ye==="right"?we.r+we.w:ft:we.w,2*Te);var yt=0,Et=0;de.each(function(Oe){var Be=g(Oe,pe,Te);yt=Math.max(yt,Be),Et+=Be}),Se=null;var Tt=0;if(Me){var xt=0,Dt=0,It=0;he.each(function(){var Oe=0,Be=0;_.select(this).selectAll("g.traces").each(function(ut){var pt=g(ut,pe,Te),bt=ut[0].height;l.setTranslate(this,Ne[0],Ne[1]+ne+me+bt/2+Be),Be+=bt,Oe=Math.max(Oe,pt),be[ut[0].trace.legendgroup]=Oe});var Qe=Oe+me;Dt>0&&Qe+ne+Dt>pe._maxWidth?(Tt=Math.max(Tt,Dt),Dt=0,It+=xt+ge,xt=Be):xt=Math.max(xt,Be),l.setTranslate(this,Dt,It),Dt+=Qe}),pe._width=Math.max(Tt,Dt)+ne,pe._height=It+xt+Ee}else{var Ft=de.size(),qt=Et+ue+(Ft-1)*me=pe._maxWidth&&(Tt=Math.max(Tt,Ge),Je=0,Ke+=Nt,pe._height+=Nt,Nt=0),l.setTranslate(this,Ne[0]+ne+Je,Ne[1]+ne+Ke+Be/2+me),Ge=Je+Qe+me,Je+=ut,Nt=Math.max(Nt,Be)}),qt?(pe._width=Je+ue,pe._height=Nt+Ee):(pe._width=Math.max(Tt,Ge)+ue,pe._height+=Nt+Ee)}}pe._width=Math.ceil(Math.max(pe._width+Ne[0],pe._titleWidth+2*(ne+n.titlePad))),pe._height=Math.ceil(Math.max(pe._height+Ne[1],pe._titleHeight+2*(ne+n.itemGap))),pe._effHeight=Math.min(pe._height,pe._maxHeight);var nt=xe._context.edits,ht=nt.legendText||nt.legendPosition;de.each(function(Oe){var Be=_.select(this).select("."+Re+"toggle"),Qe=Oe[0].height,ut=Oe[0].trace.legendgroup,pt=g(Oe,pe,Te);Me&&ut!==""&&(pt=be[ut]);var bt=ht?Te:Se||pt;Ae||Ce||(bt+=me/2),l.setRect(Be,0,-Qe/2,bt,Qe)})}(I,se,fe,G)},function(){var xe,he,de,pe,ye=N._size,Re=G.borderwidth;if(!V){var we=function(Ze,st){var ot=Ze._fullLayout[st],ft=C(ot),yt=L(ot);return s.autoMargin(Ze,st,{x:ot.x,y:ot.y,l:ot._width*u[ft],r:ot._width*p[ft],b:ot._effHeight*p[yt],t:ot._effHeight*u[yt]})}(I,j);if(we)return;var Ae=ye.l+ye.w*G.x-u[C(G)]*G._width,Me=ye.t+ye.h*(1-G.y)-u[L(G)]*G._effHeight;if(N.margin.autoexpand){var Ce=Ae,ne=Me;Ae=w.constrain(Ae,0,N.width-G._width),Me=w.constrain(Me,0,N.height-G._effHeight),Ae!==Ce&&w.log("Constrain "+j+".x to make legend fit inside graph"),Me!==ne&&w.log("Constrain "+j+".y to make legend fit inside graph")}l.setTranslate(Q,Ae,Me)}if(oe.on(".drag",null),Q.on("wheel",null),V||G._height<=G._maxHeight||I._context.staticPlot){var ue=G._effHeight;V&&(ue=G._height),X.attr({width:G._width-Re,height:ue-Re,x:Re/2,y:Re/2}),l.setTranslate(K,0,0),Y.select("rect").attr({width:G._width-2*Re,height:ue-2*Re,x:Re,y:Re}),l.setClipUrl(K,U,I),l.setRect(oe,0,0,0,0),delete G._scrollY}else{var me,Te,Ee,Ue=Math.max(n.scrollBarMinHeight,G._effHeight*G._effHeight/G._height),De=G._effHeight-Ue-2*n.scrollBarMargin,je=G._height-G._effHeight,ge=De/je,be=Math.min(G._scrollY||0,je);X.attr({width:G._width-2*Re+n.scrollBarWidth+n.scrollBarMargin,height:G._effHeight-Re,x:Re/2,y:Re/2}),Y.select("rect").attr({width:G._width-2*Re+n.scrollBarWidth+n.scrollBarMargin,height:G._effHeight-2*Re,x:Re,y:Re+be}),l.setClipUrl(K,U,I),Ye(be,Ue,ge),Q.on("wheel",function(){Ye(be=w.constrain(G._scrollY+_.event.deltaY/De*je,0,je),Ue,ge),be!==0&&be!==je&&_.event.preventDefault()});var Se=_.behavior.drag().on("dragstart",function(){var Ze=_.event.sourceEvent;me=Ze.type==="touchstart"?Ze.changedTouches[0].clientY:Ze.clientY,Ee=be}).on("drag",function(){var Ze=_.event.sourceEvent;Ze.buttons===2||Ze.ctrlKey||(Te=Ze.type==="touchmove"?Ze.changedTouches[0].clientY:Ze.clientY,be=function(st,ot,ft){var yt=(ft-ot)/ge+st;return w.constrain(yt,0,je)}(Ee,me,Te),Ye(be,Ue,ge))});oe.call(Se);var Ne=_.behavior.drag().on("dragstart",function(){var Ze=_.event.sourceEvent;Ze.type==="touchstart"&&(me=Ze.changedTouches[0].clientY,Ee=be)}).on("drag",function(){var Ze=_.event.sourceEvent;Ze.type==="touchmove"&&(Te=Ze.changedTouches[0].clientY,be=function(st,ot,ft){var yt=(ot-ft)/ge+st;return w.constrain(yt,0,je)}(Ee,me,Te),Ye(be,Ue,ge))});K.call(Ne)}function Ye(Ze,st,ot){G._scrollY=I._fullLayout[j]._scrollY=Ze,l.setTranslate(K,0,-Ze),l.setRect(oe,G._width,n.scrollBarMargin+Ze*ot,n.scrollBarWidth,st),Y.select("rect").attr("y",Re+Ze)}I._context.edits.legendPosition&&(Q.classed("cursor-move",!0),f.init({element:Q.node(),gd:I,prepFn:function(){var Ze=l.getTranslate(Q);de=Ze.x,pe=Ze.y},moveFn:function(Ze,st){var ot=de+Ze,ft=pe+st;l.setTranslate(Q,ot,ft),xe=f.align(ot,G._width,ye.l,ye.l+ye.w,G.xanchor),he=f.align(ft+G._height,-G._height,ye.t+ye.h,ye.t,G.yanchor)},doneFn:function(){if(xe!==void 0&&he!==void 0){var Ze={};Ze[j+".x"]=xe,Ze[j+".y"]=he,T.call("_guiRelayout",I,Ze)}},clickFn:function(Ze,st){var ot=se.selectAll("g.traces").filter(function(){var ft=this.getBoundingClientRect();return st.clientX>=ft.left&&st.clientX<=ft.right&&st.clientY>=ft.top&&st.clientY<=ft.bottom});ot.size()>0&&y(I,Q,ot,Ze,st)}}))}],I)}}function g(I,R,U){var B=I[0],G=B.width,N=R.entrywidthmode,j=B.trace.legendwidth||R.entrywidth;return N==="fraction"?R._maxWidth*j:U+(j||G)}function y(I,R,U,B,G){var N=U.data()[0][0].trace,j={event:G,node:U.node(),curveNumber:N.index,expandedIndex:N._expandedIndex,data:I.data,layout:I.layout,frames:I._transitionData._frames,config:I._context,fullData:I._fullData,fullLayout:I._fullLayout};N._group&&(j.group=N._group),T.traceIs(N,"pie-like")&&(j.label=U.datum()[0].label),m.triggerHandler(I,"plotly_legendclick",j)!==!1&&(B===1?R._clickTimeout=setTimeout(function(){I._fullLayout&&r(U,I,B)},I._context.doubleClickDelay):B===2&&(R._clickTimeout&&clearTimeout(R._clickTimeout),I._legendMouseDownTime=0,m.triggerHandler(I,"plotly_legenddoubleclick",j)!==!1&&r(U,I,B)))}function k(I,R,U){var B,G,N=O(U),j=I.data()[0][0],V=j.trace,H=T.traceIs(V,"pie-like"),ee=!U._inHover&&R._context.edits.legendText&&!H,Q=U._maxNameLength;j.groupTitle?(B=j.groupTitle.text,G=j.groupTitle.font):(G=U.font,U.entries?B=j.text:(B=H?j.label:V.name,V._meta&&(B=w.templateString(B,V._meta))));var Y=w.ensureSingle(I,"text",N+"text");Y.attr("text-anchor","start").call(l.font,G).text(ee?h(B,Q):B);var X=U.itemwidth+2*n.itemGap;i.positionText(Y,X,0),ee?Y.call(i.makeEditable,{gd:R,text:B}).call(A,I,R,U).on("edit",function(K){this.text(h(K,Q)).call(A,I,R,U);var te=j.trace._fullInput||{},ae={};if(T.hasTransform(te,"groupby")){var oe=T.getTransformIndices(te,"groupby"),se=oe[oe.length-1],fe=w.keyedContainer(te,"transforms["+se+"].styles","target","value.name");fe.set(j.trace._group,K),ae=fe.constructUpdate()}else ae.name=K;return T.call("_guiRestyle",R,ae,V.index)}):A(Y,I,R,U)}function h(I,R){var U=Math.max(4,R);if(I&&I.trim().length>=U/2)return I;for(var B=U-(I=I||"").length;B>0;B--)I+=" ";return I}function M(I,R,U){var B,G=R._context.doubleClickDelay,N=1,j=w.ensureSingle(I,"rect",U+"toggle",function(V){R._context.staticPlot||V.style("cursor","pointer").attr("pointer-events","all"),V.call(t.fill,"rgba(0,0,0,0)")});R._context.staticPlot||(j.on("mousedown",function(){(B=new Date().getTime())-R._legendMouseDownTimeG&&(N=Math.max(N-1,1)),y(R,V,I,N,_.event)}}))}function A(I,R,U,B,G){B._inHover&&I.attr("data-notex",!0),i.convertToTspans(I,U,function(){(function(N,j,V,H){var ee=N.data()[0][0];if(V._inHover||!ee||ee.trace.showlegend){var Q=N.select("g[class*=math-group]"),Y=Q.node(),X=O(V);V||(V=j._fullLayout[X]);var K,te,ae=V.borderwidth,oe=(H===1?V.title.font:ee.groupTitle?ee.groupTitle.font:V.font).size*a;if(Y){var se=l.bBox(Y);K=se.height,te=se.width,H===1?l.setTranslate(Q,ae,ae+.75*K):l.setTranslate(Q,0,.25*K)}else{var fe="."+X+(H===1?"title":"")+"text",xe=N.select(fe),he=i.lineCount(xe),de=xe.node();if(K=oe*he,te=de?l.bBox(de).width:0,H===1)V.title.side==="left"&&(te+=2*n.itemGap),i.positionText(xe,ae+n.titlePad,ae+oe);else{var pe=2*n.itemGap+V.itemwidth;ee.groupTitle&&(pe=n.itemGap,te-=V.itemwidth),i.positionText(xe,pe,-oe*((he-1)/2-.3))}}H===1?(V._titleWidth=te,V._titleHeight=K):(ee.lineHeight=oe,ee.height=Math.max(K,16)+3,ee.width=te)}else N.remove()})(R,U,B,G)})}function C(I){return w.isRightAnchor(I)?"right":w.isCenterAnchor(I)?"center":"left"}function L(I){return w.isBottomAnchor(I)?"bottom":w.isMiddleAnchor(I)?"middle":"top"}function O(I){return I._id||"legend"}D.exports=function(I,R){if(R)x(I,R);else{var U=I._fullLayout,B=U._legends;U._infolayer.selectAll('[class^="legend"]').each(function(){var j=_.select(this),V=j.attr("class").split(" ")[0];V.match(v)&&B.indexOf(V)===-1&&j.remove()});for(var G=0;GL&&(C=L)}M[f][0]._groupMinRank=C,M[f][0]._preGroupSort=f}var O=function(G,N){return G.trace.legendrank-N.trace.legendrank||G._preSort-N._preSort};for(M.forEach(function(G,N){G[0]._preGroupSort=N}),M.sort(function(G,N){return G[0]._groupMinRank-N[0]._groupMinRank||G[0]._preGroupSort-N[0]._preGroupSort}),f=0;fb?b:p}D.exports=function(p,c,b){var d=c._fullLayout;b||(b=d.legend);var v=b.itemsizing==="constant",x=b.itemwidth,g=(x+2*n.itemGap)/2,y=T(g,0),k=function(A,C,L,O){var I;if(A+1)I=A;else{if(!(C&&C.width>0))return 0;I=C.width}return v?O:Math.min(I,L)};function h(A,C,L){var O=A[0].trace,I=O.marker||{},R=I.line||{},U=L?O.visible&&O.type===L:w.traceIs(O,"bar"),B=_.select(C).select("g.legendpoints").selectAll("path.legend"+L).data(U?[A]:[]);B.enter().append("path").classed("legend"+L,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",y),B.exit().remove(),B.each(function(G){var N=_.select(this),j=G[0],V=k(j.mlw,I.line,5,2);N.style("stroke-width",V+"px");var H=j.mcc;if(!b._inHover&&"mc"in j){var ee=l(I),Q=ee.mid;Q===void 0&&(Q=(ee.max+ee.min)/2),H=m.tryColorscale(I,"")(Q)}var Y=H||j.mc||I.color,X=I.pattern,K=X&&m.getPatternAttr(X.shape,0,"");if(K){var te=m.getPatternAttr(X.bgcolor,0,null),ae=m.getPatternAttr(X.fgcolor,0,null),oe=X.fgopacity,se=u(X.size,8,10),fe=u(X.solidity,.5,1),xe="legend-"+O.uid;N.call(m.pattern,"legend",c,xe,K,se,fe,H,X.fillmode,te,ae,oe)}else N.call(f.fill,Y);V&&f.stroke(N,j.mlc||R.color)})}function M(A,C,L){var O=A[0],I=O.trace,R=L?I.visible&&I.type===L:w.traceIs(I,L),U=_.select(C).select("g.legendpoints").selectAll("path.legend"+L).data(R?[A]:[]);if(U.enter().append("path").classed("legend"+L,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",y),U.exit().remove(),U.size()){var B=(I.marker||{}).line,G=k(r(B.width,O.pts),B,5,2),N=s.minExtend(I,{marker:{line:{width:G}}});N.marker.line.color=B.color;var j=s.minExtend(O,{trace:N});i(U,j,N)}}p.each(function(A){var C=_.select(this),L=s.ensureSingle(C,"g","layers");L.style("opacity",A[0].trace.opacity);var O=b.valign,I=A[0].lineHeight,R=A[0].height;if(O!=="middle"&&I&&R){var U={top:1,bottom:-1}[O]*(.5*(I-R+3));L.attr("transform",T(0,U))}else L.attr("transform",null);L.selectAll("g.legendfill").data([A]).enter().append("g").classed("legendfill",!0),L.selectAll("g.legendlines").data([A]).enter().append("g").classed("legendlines",!0);var B=L.selectAll("g.legendsymbols").data([A]);B.enter().append("g").classed("legendsymbols",!0),B.selectAll("g.legendpoints").data([A]).enter().append("g").classed("legendpoints",!0)}).each(function(A){var C,L=A[0].trace,O=[];if(L.visible)switch(L.type){case"histogram2d":case"heatmap":O=[["M-15,-2V4H15V-2Z"]],C=!0;break;case"choropleth":case"choroplethmapbox":O=[["M-6,-6V6H6V-6Z"]],C=!0;break;case"densitymapbox":O=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],C="radial";break;case"cone":O=[["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":O=[["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":O=[["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":O=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],C=!1;break;case"volume":O=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],C=!0;break;case"isosurface":O=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],C=!1}var I=_.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(O);I.enter().append("path").classed("legend3dandfriends",!0).attr("transform",y).style("stroke-miterlimit",1),I.exit().remove(),I.each(function(R,U){var B,G=_.select(this),N=l(L),j=N.colorscale,V=N.reversescale;if(j){if(!C){var H=j.length;B=U===0?j[V?H-1:0][1]:U===1?j[V?0:H-1][1]:j[Math.floor((H-1)/2)][1]}}else{var ee=L.vertexcolor||L.facecolor||L.color;B=s.isArrayOrTypedArray(ee)?ee[U]||ee[0]:ee}G.attr("d",R[0]),B?G.call(f.fill,B):G.call(function(Q){if(Q.size()){var Y="legendfill-"+L.uid;m.gradient(Q,c,Y,o(V,C==="radial"),j,"fill")}})})}).each(function(A){var C=A[0].trace,L=C.type==="waterfall";if(A[0]._distinct&&L){var O=A[0].trace[A[0].dir].marker;return A[0].mc=O.color,A[0].mlw=O.line.width,A[0].mlc=O.line.color,h(A,this,"waterfall")}var I=[];C.visible&&L&&(I=A[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=_.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(I);R.enter().append("path").classed("legendwaterfall",!0).attr("transform",y).style("stroke-miterlimit",1),R.exit().remove(),R.each(function(U){var B=_.select(this),G=C[U[0]].marker,N=k(void 0,G.line,5,2);B.attr("d",U[1]).style("stroke-width",N+"px").call(f.fill,G.color),N&&B.call(f.stroke,G.line.color)})}).each(function(A){h(A,this,"funnel")}).each(function(A){h(A,this)}).each(function(A){var C=A[0].trace,L=_.select(this).select("g.legendpoints").selectAll("path.legendbox").data(C.visible&&w.traceIs(C,"box-violin")?[A]:[]);L.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",y),L.exit().remove(),L.each(function(){var O=_.select(this);if(C.boxpoints!=="all"&&C.points!=="all"||f.opacity(C.fillcolor)!==0||f.opacity((C.line||{}).color)!==0){var I=k(void 0,C.line,5,2);O.style("stroke-width",I+"px").call(f.fill,C.fillcolor),I&&f.stroke(O,C.line.color)}else{var R=s.minExtend(C,{marker:{size:v?12:s.constrain(C.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});L.call(m.pointStyle,R,c)}})}).each(function(A){M(A,this,"funnelarea")}).each(function(A){M(A,this,"pie")}).each(function(A){var C,L,O=a(A),I=O.showFill,R=O.showLine,U=O.showGradientLine,B=O.showGradientFill,G=O.anyFill,N=O.anyLine,j=A[0],V=j.trace,H=l(V),ee=H.colorscale,Q=H.reversescale,Y=t.hasMarkers(V)||!G?"M5,0":N?"M5,-2":"M5,-3",X=_.select(this),K=X.select(".legendfill").selectAll("path").data(I||B?[A]:[]);if(K.enter().append("path").classed("js-fill",!0),K.exit().remove(),K.attr("d",Y+"h"+x+"v6h-"+x+"z").call(function(oe){if(oe.size())if(I)m.fillGroupStyle(oe,c);else{var se="legendfill-"+V.uid;m.gradient(oe,c,se,o(Q),ee,"fill")}}),R||U){var te=k(void 0,V.line,10,5);L=s.minExtend(V,{line:{width:te}}),C=[s.minExtend(j,{trace:L})]}var ae=X.select(".legendlines").selectAll("path").data(R||U?[C]:[]);ae.enter().append("path").classed("js-line",!0),ae.exit().remove(),ae.attr("d",Y+(U?"l"+x+",0.0001":"h"+x)).call(R?m.lineGroupStyle:function(oe){if(oe.size()){var se="legendline-"+V.uid;m.lineGroupStyle(oe),m.gradient(oe,c,se,o(Q),ee,"stroke")}})}).each(function(A){var C,L,O=a(A),I=O.anyFill,R=O.anyLine,U=O.showLine,B=O.showMarker,G=A[0],N=G.trace,j=!B&&!R&&!I&&t.hasText(N);function V(ae,oe,se,fe){var xe=s.nestedProperty(N,ae).get(),he=s.isArrayOrTypedArray(xe)&&oe?oe(xe):xe;if(v&&he&&fe!==void 0&&(he=fe),se){if(hese[1])return se[1]}return he}function H(ae){return G._distinct&&G.index&&ae[G.index]?ae[G.index]:ae[0]}if(B||j||U){var ee={},Q={};if(B){ee.mc=V("marker.color",H),ee.mx=V("marker.symbol",H),ee.mo=V("marker.opacity",s.mean,[.2,1]),ee.mlc=V("marker.line.color",H),ee.mlw=V("marker.line.width",s.mean,[0,5],2),Q.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var Y=V("marker.size",s.mean,[2,16],12);ee.ms=Y,Q.marker.size=Y}U&&(Q.line={width:V("line.width",H,[0,10],5)}),j&&(ee.tx="Aa",ee.tp=V("textposition",H),ee.ts=10,ee.tc=V("textfont.color",H),ee.tf=V("textfont.family",H)),C=[s.minExtend(G,ee)],(L=s.minExtend(N,Q)).selectedpoints=null,L.texttemplate=null}var X=_.select(this).select("g.legendpoints"),K=X.selectAll("path.scatterpts").data(B?C:[]);K.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",y),K.exit().remove(),K.call(m.pointStyle,L,c),B&&(C[0].mrc=3);var te=X.selectAll("g.pointtext").data(j?C:[]);te.enter().append("g").classed("pointtext",!0).append("text").attr("transform",y),te.exit().remove(),te.selectAll("text").call(m.textPointStyle,L,c)}).each(function(A){var C=A[0].trace,L=_.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(C.visible&&C.type==="candlestick"?[A,A]:[]);L.enter().append("path").classed("legendcandle",!0).attr("d",function(O,I){return I?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",y).style("stroke-miterlimit",1),L.exit().remove(),L.each(function(O,I){var R=_.select(this),U=C[I?"increasing":"decreasing"],B=k(void 0,U.line,5,2);R.style("stroke-width",B+"px").call(f.fill,U.fillcolor),B&&f.stroke(R,U.line.color)})}).each(function(A){var C=A[0].trace,L=_.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(C.visible&&C.type==="ohlc"?[A,A]:[]);L.enter().append("path").classed("legendohlc",!0).attr("d",function(O,I){return I?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",y).style("stroke-miterlimit",1),L.exit().remove(),L.each(function(O,I){var R=_.select(this),U=C[I?"increasing":"decreasing"],B=k(void 0,U.line,5,2);R.style("fill","none").call(m.dashLine,U.line.dash,B),B&&f.stroke(R,U.line.color)})})}},42068:function(D,E,e){e(93348),D.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"}}},26023:function(D,E,e){var _=e(73972),w=e(74875),s=e(41675),T=e(24255),m=e(34031).eraseActiveShape,f=e(71828),l=f._,t=D.exports={};function i(d,v){var x,g,y=v.currentTarget,k=y.getAttribute("data-attr"),h=y.getAttribute("data-val")||!0,M=d._fullLayout,A={},C=s.list(d,null,!0),L=M._cartesianSpikesEnabled;if(k==="zoom"){var O,I=h==="in"?.5:2,R=(1+I)/2,U=(1-I)/2;for(g=0;g1?(Y=["toggleHover"],X=["resetViews"]):A?(Q=["zoomInGeo","zoomOutGeo"],Y=["hoverClosestGeo"],X=["resetGeo"]):M?(Y=["hoverClosest3d"],X=["resetCameraDefault3d","resetCameraLastSave3d"]):R?(Q=["zoomInMapbox","zoomOutMapbox"],Y=["toggleHover"],X=["resetViewMapbox"]):O?Y=["hoverClosestGl2d"]:C?Y=["hoverClosestPie"]:G?(Y=["hoverClosestCartesian","hoverCompareCartesian"],X=["resetViewSankey"]):Y=["toggleHover"],h&&(Y=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(function(xe){for(var he=0;he0)){var c=function(d,v,x){for(var g=x.filter(function(M){return v[M].anchor===d._id}),y=0,k=0;k=pe.max)he=oe[de+1];else if(xe=pe.pmax)he=oe[de+1];else if(xede._length||Te+Ne<0)return;ge=me+Ne,be=Te+Ne;break;case Re:if(Se="col-resize",me+Ne>de._length)return;ge=me+Ne,be=Te;break;case we:if(Se="col-resize",Te+Ne<0)return;ge=me,be=Te+Ne;break;default:Se="ew-resize",ge=ue,be=ue+Ne}if(be=0;O--){var I=v.append("path").attr(g).style("opacity",O?.1:y).call(T.stroke,h).call(T.fill,k).call(m.dashLine,O?"solid":A,O?4+M:M);if(o(I,u,b),C){var R=f(u.layout,"selections",b);I.style({cursor:"move"});var U={element:I.node(),plotinfo:d,gd:u,editHelpers:R,isActiveSelection:!0},B=_(x,u);w(B,I,U)}else I.style("pointer-events",O?"all":"none");L[O]=I}var G=L[0];L[1].node().addEventListener("click",function(){return function(N,j){if(r(N)){var V=+j.node().getAttribute("data-index");if(V>=0){if(V===N._fullLayout._activeSelectionIndex)return void a(N);N._fullLayout._activeSelectionIndex=V,N._fullLayout._deactivateSelection=a,i(N)}}}(u,G)})}(u._fullLayout._selectionLayer)}function o(u,p,c){var b=c.xref+c.yref;m.setClipUrl(u,"clip"+p._fullLayout._uid+b,p)}function a(u){r(u)&&u._fullLayout._activeSelectionIndex>=0&&(s(u),delete u._fullLayout._activeSelectionIndex,i(u))}D.exports={draw:i,drawOne:n,activateLastSelection:function(u){if(r(u)){var p=u._fullLayout.selections.length-1;u._fullLayout._activeSelectionIndex=p,u._fullLayout._deactivateSelection=a,i(u)}}}},53777:function(D,E,e){var _=e(79952).P,w=e(1426).extendFlat;D.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:w({},_,{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"}}},90849:function(D){D.exports=function(E,e,_){_("newselection.mode"),_("newselection.line.width")&&(_("newselection.line.color"),_("newselection.line.dash")),_("activeselection.fillcolor"),_("activeselection.opacity")}},35855:function(D,E,e){var _=e(64505).selectMode,w=e(51873).clearOutline,s=e(60165),T=s.readPaths,m=s.writePaths,f=s.fixDatesForPaths;D.exports=function(l,t){if(l.length){var i=l[0][0];if(i){var r=i.getAttribute("d"),n=t.gd,o=n._fullLayout.newselection,a=t.plotinfo,u=a.xaxis,p=a.yaxis,c=t.isActiveSelection,b=t.dragmode,d=(n.layout||{}).selections||[];if(!_(b)&&c!==void 0){var v=n._fullLayout._activeSelectionIndex;if(v-1,qt=[];if(function(nt){return nt&&Array.isArray(nt)&&nt[0].hoverOnBox!==!0}(It)){te(De,je,Ne);var Nt=function(nt,ht){var Oe,Be,Qe=nt[0],ut=-1,pt=[];for(Be=0;Be0?function(nt,ht){var Oe,Be,Qe,ut=[];for(Qe=0;Qe0&&ut.push(Oe);if(ut.length===1&&ut[0]===ht.searchInfo&&(Be=ht.searchInfo.cd[0].trace).selectedpoints.length===ht.pointNumbers.length){for(Qe=0;Qe1||(Be+=ht.selectedpoints.length)>1))return!1;return Be===1}(Ze)&&(Et=xe(Nt))){for(Ye&&Ye.remove(),Dt=0;Dt=0})(Se)&&Se._fullLayout._deactivateShape(Se),function(yt){return yt._fullLayout._activeSelectionIndex>=0}(Se)&&Se._fullLayout._deactivateSelection(Se);var Ne=Se._fullLayout._zoomlayer,Ye=n(ge),Ze=a(ge);if(Ye||Ze){var st,ot,ft=Ne.selectAll(".select-outline-"+be.id);ft&&Se._fullLayout._outlining&&(Ye&&(st=g(ft,De)),st&&s.call("_guiRelayout",Se,{shapes:st}),Ze&&!ee(De)&&(ot=y(ft,De)),ot&&(Se._fullLayout._noEmitSelectedAtStart=!0,s.call("_guiRelayout",Se,{selections:ot}).then(function(){je&&k(Se)})),Se._fullLayout._outlining=!1)}be.selection={},be.selection.selectionDefs=De.selectionDefs=[],be.selection.mergedPolygons=De.mergedPolygons=[]}function oe(De){return De._id}function se(De,je,ge,be){if(!De.calcdata)return[];var Se,Ne,Ye,Ze=[],st=je.map(oe),ot=ge.map(oe);for(Ye=0;Ye0?be[0]:ge;return!!je.selectedpoints&&je.selectedpoints.indexOf(Se)>-1}function he(De,je,ge){var be,Se;for(be=0;be-1&&je;if(!Ne&&je){var _n=Ce(De,!0);if(_n.length){var fn=_n[0].xref,hn=_n[0].yref;if(fn&&hn){var In=me(_n);Te([L(De,fn,"x"),L(De,hn,"y")])(wn,In)}}De._fullLayout._noEmitSelectedAtStart?De._fullLayout._noEmitSelectedAtStart=!1:on&&Ee(De,wn),Et._reselect=!1}if(!Ne&&Et._deselect){var Cn=Et._deselect;(function(Nn,Hn,qn){for(var or=0;or=0)Tt._fullLayout._deactivateShape(Tt);else if(!ot){var hn=xt.clickmode;C.done(kn).then(function(){if(C.clear(kn),_n===2){for(Xt.remove(),Qe=0;Qe-1&&Q(fn,Tt,be.xaxes,be.yaxes,be.subplot,be,Xt),hn==="event"&&Ee(Tt,void 0);f.click(Tt,fn)}).catch(h.error)}},be.doneFn=function(){ln.remove(),C.done(kn).then(function(){C.clear(kn),!Dt&&Be&&be.selectionDefs&&(Be.subtract=Gt,be.selectionDefs.push(Be),be.mergedPolygons.length=0,[].push.apply(be.mergedPolygons,Oe)),(Dt||ot)&&ae(be,Dt),be.doneFnCompleted&&be.doneFnCompleted(Wn),ft&&Ee(Tt,pt)}).catch(h.error)}},clearOutline:b,clearSelectionsCache:ae,selectOnClick:Q}},89827:function(D,E,e){var _=e(50215),w=e(41940),s=e(82196).line,T=e(79952).P,m=e(1426).extendFlat,f=e(44467).templatedArray,l=(e(24695),e(5386).R),t=e(37281);D.exports=f("shape",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},xref:m({},_.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"},yref:m({},_.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"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:m({},s.color,{editType:"arraydraw"}),width:m({},s.width,{editType:"calc+arraydraw"}),dash:m({},T,{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:l({},{keys:Object.keys(t)}),font:w({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"})},5627:function(D,E,e){var _=e(71828),w=e(89298),s=e(21459),T=e(30477);function m(i){return l(i.line.width,i.xsizemode,i.x0,i.x1,i.path,!1)}function f(i){return l(i.line.width,i.ysizemode,i.y0,i.y1,i.path,!0)}function l(i,r,n,o,a,u){var p=i/2,c=u;if(r==="pixel"){var b=a?T.extractPathCoords(a,u?s.paramIsY:s.paramIsX):[n,o],d=_.aggNums(Math.max,null,b),v=_.aggNums(Math.min,null,b),x=v<0?Math.abs(v)+p:p,g=d>0?d+p:p;return{ppad:p,ppadplus:c?x:g,ppadminus:c?g:x}}return{ppad:p}}function t(i,r,n,o,a){var u=i.type==="category"||i.type==="multicategory"?i.r2c:i.d2c;if(r!==void 0)return[u(r),u(n)];if(o){var p,c,b,d,v=1/0,x=-1/0,g=o.match(s.segmentRE);for(i.type==="date"&&(u=T.decodeDate(u)),p=0;px&&(x=d)));return x>=v?[v,x]:void 0}}D.exports=function(i){var r=i._fullLayout,n=_.filterVisible(r.shapes);if(n.length&&i._fullData.length)for(var o=0;o1&&(xe.length!==2||xe[1][0]!=="Z")&&(U===0&&(xe[0][0]="M"),y[R]=xe,C(),L())}}()}}function X(oe,se){(function(fe,xe){if(y.length)for(var he=0;heMe?(ue=we,Ue="y0",me=Me,De="y1"):(ue=Me,Ue="y1",me=we,De="y0"),Ke(Be),ht(pe,he),function(Qe,ut,pt){var bt=ut.xref,Lt=ut.yref,Ct=T.getFromId(pt,bt),mt=T.getFromId(pt,Lt),Ot="";bt==="paper"||Ct.autorange||(Ot+=bt),Lt==="paper"||mt.autorange||(Ot+=Lt),i.setClipUrl(Qe,Ot?"clip"+pt._fullLayout._uid+Ot:null,pt)}(xe,he,fe),Je.moveFn=Se==="move"?Ge:nt,Je.altKey=Be.altKey)},doneFn:function(){x(fe)||(o(xe),Oe(pe),k(xe,fe,he),w.call("_guiRelayout",fe,ye.getUpdateObj()))},clickFn:function(){x(fe)||Oe(pe)}};function Ke(Be){if(x(fe))Se=null;else if(Ze)Se=Be.target.tagName==="path"?"move":Be.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var Qe=Je.element.getBoundingClientRect(),ut=Qe.right-Qe.left,pt=Qe.bottom-Qe.top,bt=Be.clientX-Qe.left,Lt=Be.clientY-Qe.top,Ct=!st&&ut>10&&pt>10&&!Be.shiftKey?n.getCursor(bt/ut,1-Lt/pt):"move";o(xe,Ct),Se=Ct.split("-")[0]}}function Ge(Be,Qe){if(he.type==="path"){var ut=function(Lt){return Lt},pt=ut,bt=ut;Ne?ot("xanchor",he.xanchor=Ft(Ce+Be)):(pt=function(Lt){return Ft(Dt(Lt)+Be)},yt&&yt.type==="date"&&(pt=p.encodeDate(pt))),Ye?ot("yanchor",he.yanchor=qt(ne+Qe)):(bt=function(Lt){return qt(It(Lt)+Qe)},Tt&&Tt.type==="date"&&(bt=p.encodeDate(bt))),ot("path",he.path=M(be,pt,bt))}else Ne?ot("xanchor",he.xanchor=Ft(Ce+Be)):(ot("x0",he.x0=Ft(Re+Be)),ot("x1",he.x1=Ft(Ae+Be))),Ye?ot("yanchor",he.yanchor=qt(ne+Qe)):(ot("y0",he.y0=qt(we+Qe)),ot("y1",he.y1=qt(Me+Qe)));xe.attr("d",c(fe,he)),ht(pe,he),h(fe,de,he,ft)}function nt(Be,Qe){if(st){var ut=function(ln){return ln},pt=ut,bt=ut;Ne?ot("xanchor",he.xanchor=Ft(Ce+Be)):(pt=function(ln){return Ft(Dt(ln)+Be)},yt&&yt.type==="date"&&(pt=p.encodeDate(pt))),Ye?ot("yanchor",he.yanchor=qt(ne+Qe)):(bt=function(ln){return qt(It(ln)+Qe)},Tt&&Tt.type==="date"&&(bt=p.encodeDate(bt))),ot("path",he.path=M(be,pt,bt))}else if(Ze){if(Se==="resize-over-start-point"){var Lt=Re+Be,Ct=Ye?we-Qe:we+Qe;ot("x0",he.x0=Ne?Lt:Ft(Lt)),ot("y0",he.y0=Ye?Ct:qt(Ct))}else if(Se==="resize-over-end-point"){var mt=Ae+Be,Ot=Ye?Me-Qe:Me+Qe;ot("x1",he.x1=Ne?mt:Ft(mt)),ot("y1",he.y1=Ye?Ot:qt(Ot))}}else{var _t=function(ln){return Se.indexOf(ln)!==-1},Pt=_t("n"),Bt=_t("s"),Wt=_t("w"),Gt=_t("e"),Xt=Pt?ue+Qe:ue,Kt=Bt?me+Qe:me,nn=Wt?Te+Be:Te,yn=Gt?Ee+Be:Ee;Ye&&(Pt&&(Xt=ue-Qe),Bt&&(Kt=me-Qe)),(!Ye&&Kt-Xt>10||Ye&&Xt-Kt>10)&&(ot(Ue,he[Ue]=Ye?Xt:qt(Xt)),ot(De,he[De]=Ye?Kt:qt(Kt))),yn-nn>10&&(ot(je,he[je]=Ne?nn:Ft(nn)),ot(ge,he[ge]=Ne?yn:Ft(yn)))}xe.attr("d",c(fe,he)),ht(pe,he),h(fe,de,he,ft)}function ht(Be,Qe){(Ne||Ye)&&function(){var ut=Qe.type!=="path",pt=Be.selectAll(".visual-cue").data([0]);pt.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var bt=Dt(Ne?Qe.xanchor:s.midRange(ut?[Qe.x0,Qe.x1]:p.extractPathCoords(Qe.path,u.paramIsX))),Lt=It(Ye?Qe.yanchor:s.midRange(ut?[Qe.y0,Qe.y1]:p.extractPathCoords(Qe.path,u.paramIsY)));if(bt=p.roundPositionForSharpStrokeRendering(bt,1),Lt=p.roundPositionForSharpStrokeRendering(Lt,1),Ne&&Ye){var Ct="M"+(bt-1-1)+","+(Lt-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";pt.attr("d",Ct)}else if(Ne){var mt="M"+(bt-1-1)+","+(Lt-9-1)+"v18 h2 v-18 Z";pt.attr("d",mt)}else{var Ot="M"+(bt-9-1)+","+(Lt-1-1)+"h18 v2 h-18 Z";pt.attr("d",Ot)}}()}function Oe(Be){Be.selectAll(".visual-cue").remove()}n.init(Je),Nt.node().onmousemove=Ke}(C,ae,I,L,B,K):I.editable===!0&&ae.style("pointer-events",Y||t.opacity(V)*j<=.5?"stroke":"all");ae.node().addEventListener("click",function(){return function(fe,xe){if(g(fe)){var he=+xe.node().getAttribute("data-index");if(he>=0){if(he===fe._fullLayout._activeShapeIndex)return void A(fe);fe._fullLayout._activeShapeIndex=he,fe._fullLayout._deactivateShape=A,v(fe)}}}(C,ae)})}I._input&&I.visible!==!1&&(I.layer!=="below"?U(C._fullLayout._shapeUpperLayer):I.xref==="paper"||I.yref==="paper"?U(C._fullLayout._shapeLowerLayer):R._hadPlotinfo?U((R.mainplotinfo||R).shapelayer):U(C._fullLayout._shapeLowerLayer))}function k(C,L,O){var I=(O.xref+O.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");i.setClipUrl(C,I?"clip"+L._fullLayout._uid+I:null,L)}function h(C,L,O,I){if(I.selectAll(".shape-label").remove(),O.label.text||O.label.texttemplate){var R;if(O.label.texttemplate){var U={};if(O.type!=="path"){var B=T.getFromId(C,O.xref),G=T.getFromId(C,O.yref);for(var N in b){var j=b[N](O,B,G);j!==void 0&&(U[N]=j)}}R=s.texttemplateStringForShapes(O.label.texttemplate,{},C._fullLayout._d3locale,U)}else R=O.label.text;var V,H,ee,Q,Y={"data-index":L},X=O.label.font,K=I.append("g").attr(Y).classed("shape-label",!0).append("text").attr({"data-notex":1}).classed("shape-label-text",!0).text(R);if(O.path){var te=c(C,O),ae=m(te,C);V=1/0,ee=1/0,H=-1/0,Q=-1/0;for(var oe=0;oe=Ee?Ue-je:je-Ue,-180/Math.PI*Math.atan2(ge,be)}(V,ee,H,Q):0),K.call(function(Ee){return Ee.call(i.font,X).attr({}),a.convertToTspans(Ee,C),Ee});var ne=function(Ee,Ue,De,je,ge,be,Se){var Ne,Ye,Ze,st,ot=ge.label.textposition,ft=ge.label.textangle,yt=ge.label.padding,Et=ge.type,Tt=Math.PI/180*be,xt=Math.sin(Tt),Dt=Math.cos(Tt),It=ge.label.xanchor,Ft=ge.label.yanchor;if(Et==="line"){ot==="start"?(Ne=Ee,Ye=Ue):ot==="end"?(Ne=De,Ye=je):(Ne=(Ee+De)/2,Ye=(Ue+je)/2),It==="auto"&&(It=ot==="start"?ft==="auto"?De>Ee?"left":DeEe?"right":DeEe?"right":DeEe?"left":De=N||(B[R]?j=L(j):G[R]&&(j=O(j)),R++),j})})}function A(C){g(C)&&C._fullLayout._activeShapeIndex>=0&&(l(C),delete C._fullLayout._activeShapeIndex,v(C))}D.exports={draw:v,drawOne:y,eraseActiveShape:function(C){if(g(C)){l(C);var L=C._fullLayout._activeShapeIndex,O=(C.layout||{}).shapes||[];if(L0&&xY&&(K="X"),K});return V>Y&&(X=X.replace(/[\s,]*X.*/,""),w.log("Ignoring extra params in segment "+j)),H+X})}(m,l,i);if(m.xsizemode==="pixel"){var x=l(m.xanchor);r=x+m.x0,n=x+m.x1}else r=l(m.x0),n=l(m.x1);if(m.ysizemode==="pixel"){var g=i(m.yanchor);o=g-m.y0,a=g-m.y1}else o=i(m.y0),a=i(m.y1);if(u==="line")return"M"+r+","+o+"L"+n+","+a;if(u==="rect")return"M"+r+","+o+"H"+n+"V"+a+"H"+r+"Z";var y=(r+n)/2,k=(o+a)/2,h=Math.abs(y-r),M=Math.abs(k-o),A="A"+h+","+M,C=y+h+","+k;return"M"+C+A+" 0 1,1 "+y+","+(k-M)+A+" 0 0,1 "+C+"Z"}},89853:function(D,E,e){var _=e(34031);D.exports={moduleType:"component",name:"shapes",layoutAttributes:e(89827),supplyLayoutDefaults:e(84726),supplyDrawNewShapeDefaults:e(45547),includeBasePlot:e(76325)("shapes"),calcAutorange:e(5627),draw:_.draw,drawOne:_.drawOne}},37281:function(D){function E(s,T){return T?T.d2l(s):s}function e(s,T){return T?T.l2d(s):s}function _(s,T){return E(s.x1,T)-E(s.x0,T)}function w(s,T,m){return E(s.y1,m)-E(s.y0,m)}D.exports={x0:function(s){return s.x0},x1:function(s){return s.x1},y0:function(s){return s.y0},y1:function(s){return s.y1},slope:function(s,T,m){return s.type!=="line"?void 0:w(s,0,m)/_(s,T)},dx:_,dy:w,width:function(s,T){return Math.abs(_(s,T))},height:function(s,T,m){return Math.abs(w(s,0,m))},length:function(s,T,m){return s.type!=="line"?void 0:Math.sqrt(Math.pow(_(s,T),2)+Math.pow(w(s,0,m),2))},xcenter:function(s,T){return e((E(s.x1,T)+E(s.x0,T))/2,T)},ycenter:function(s,T,m){return e((E(s.y1,m)+E(s.y0,m))/2,m)}}},75067:function(D,E,e){var _=e(41940),w=e(35025),s=e(1426).extendDeepAll,T=e(30962).overrideAll,m=e(85594),f=e(44467).templatedArray,l=e(98292),t=f("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}});D.exports=T(f("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:t,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:s(w({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:m.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:_({})},font:_({}),activebgcolor:{valType:"color",dflt:l.gripBgActiveColor},bgcolor:{valType:"color",dflt:l.railBgColor},bordercolor:{valType:"color",dflt:l.railBorderColor},borderwidth:{valType:"number",min:0,dflt:l.railBorderWidth},ticklen:{valType:"number",min:0,dflt:l.tickLength},tickcolor:{valType:"color",dflt:l.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:l.minorTickLength}}),"arraydraw","from-root")},98292:function(D){D.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}},12343:function(D,E,e){var _=e(71828),w=e(85501),s=e(75067),T=e(98292).name,m=s.steps;function f(t,i,r){function n(c,b){return _.coerce(t,i,s,c,b)}for(var o=w(t,i,{name:"steps",handleItemDefaults:l}),a=0,u=0;u0&&(V=V.transition().duration(R.transition.duration).ease(R.transition.easing)),V.attr("transform",f(j-.5*i.gripWidth,R._dims.currentValueTotalHeight))}}function A(I,R){var U=I._dims;return U.inputAreaStart+i.stepInset+(U.inputAreaLength-2*i.stepInset)*Math.min(1,Math.max(0,R))}function C(I,R){var U=I._dims;return Math.min(1,Math.max(0,(R-i.stepInset-U.inputAreaStart)/(U.inputAreaLength-2*i.stepInset-2*U.inputAreaStart)))}function L(I,R,U){var B=U._dims,G=m.ensureSingle(I,"rect",i.railTouchRectClass,function(N){N.call(k,R,I,U).style("pointer-events","all")});G.attr({width:B.inputAreaLength,height:Math.max(B.inputAreaWidth,i.tickOffset+U.ticklen+B.labelHeight)}).call(s.fill,U.bgcolor).attr("opacity",0),T.setTranslate(G,0,B.currentValueTotalHeight)}function O(I,R){var U=R._dims,B=U.inputAreaLength-2*i.railInset,G=m.ensureSingle(I,"rect",i.railRectClass);G.attr({width:B,height:i.railWidth,rx:i.railRadius,ry:i.railRadius,"shape-rendering":"crispEdges"}).call(s.stroke,R.bordercolor).call(s.fill,R.bgcolor).style("stroke-width",R.borderwidth+"px"),T.setTranslate(G,i.railInset,.5*(U.inputAreaWidth-i.railWidth)+U.currentValueTotalHeight)}D.exports=function(I){var R=I._context.staticPlot,U=I._fullLayout,B=function(ee,Q){for(var Y=ee[i.name],X=[],K=0;K0?[0]:[]);function N(ee){ee._commandObserver&&(ee._commandObserver.remove(),delete ee._commandObserver),w.autoMargin(I,u(ee))}if(G.enter().append("g").classed(i.containerClassName,!0).style("cursor",R?null:"ew-resize"),G.exit().each(function(){_.select(this).selectAll("g."+i.groupClassName).each(N)}).remove(),B.length!==0){var j=G.selectAll("g."+i.groupClassName).data(B,p);j.enter().append("g").classed(i.groupClassName,!0),j.exit().each(N).remove();for(var V=0;V0||ye<0){var Me={left:[-Re,0],right:[Re,0],top:[0,-Re],bottom:[0,Re]}[g.side];X.attr("transform",f(Me[0],Me[1]))}}}return V.call(H),G&&(O?V.on(".opacity",null):(A=0,C=!0,V.text(v).on("mouseover.opacity",function(){_.select(this).transition().duration(r.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){_.select(this).transition().duration(r.HIDE_PLACEHOLDER).style("opacity",0)})),V.call(i.makeEditable,{gd:a}).on("edit",function(Y){x!==void 0?T.call("_guiRestyle",a,d,Y,x):T.call("_guiRelayout",a,d,Y)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(H)}).on("input",function(Y){this.text(Y||" ").call(i.positionText,y.x,y.y)})),V.classed("js-placeholder",C),h}}},7163:function(D,E,e){var _=e(41940),w=e(22399),s=e(1426).extendFlat,T=e(30962).overrideAll,m=e(35025),f=e(44467).templatedArray,l=f("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}});D.exports=T(f("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:l,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:s(m({editType:"arraydraw"}),{}),font:_({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:w.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},75909:function(D){D.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:"◄",right:"►",up:"▲",down:"▼"}}},64897:function(D,E,e){var _=e(71828),w=e(85501),s=e(7163),T=e(75909).name,m=s.buttons;function f(t,i,r){function n(o,a){return _.coerce(t,i,s,o,a)}n("visible",w(t,i,{name:"buttons",handleItemDefaults:l}).length>0)&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),_.noneOrAll(t,i,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),_.coerceFont(n,"font",r.font),n("bgcolor",r.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function l(t,i){function r(n,o){return _.coerce(t,i,m,n,o)}r("visible",t.method==="skip"||Array.isArray(t.args))&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}D.exports=function(t,i){w(t,i,{name:T,handleItemDefaults:f})}},13689:function(D,E,e){var _=e(39898),w=e(74875),s=e(7901),T=e(91424),m=e(71828),f=e(63893),l=e(44467).arrayEditor,t=e(18783).LINE_SPACING,i=e(75909),r=e(25849);function n(A){return A._index}function o(A,C){return+A.attr(i.menuIndexAttrName)===C._index}function a(A,C,L,O,I,R,U,B){C.active=U,l(A.layout,i.name,C).applyUpdate("active",U),C.type==="buttons"?p(A,O,null,null,C):C.type==="dropdown"&&(I.attr(i.menuIndexAttrName,"-1"),u(A,O,I,R,C),B||p(A,O,I,R,C))}function u(A,C,L,O,I){var R=m.ensureSingle(C,"g",i.headerClassName,function(V){V.style("pointer-events","all")}),U=I._dims,B=I.active,G=I.buttons[B]||i.blankHeaderOpts,N={y:I.pad.t,yPad:0,x:I.pad.l,xPad:0,index:0},j={width:U.headerWidth,height:U.headerHeight};R.call(c,I,G,A).call(h,I,N,j),m.ensureSingle(C,"text",i.headerArrowClassName,function(V){V.attr("text-anchor","end").call(T.font,I.font).text(i.arrowSymbol[I.direction])}).attr({x:U.headerWidth-i.arrowOffsetX+I.pad.l,y:U.headerHeight/2+i.textOffsetY+I.pad.t}),R.on("click",function(){L.call(M,String(o(L,I)?-1:I._index)),p(A,C,L,O,I)}),R.on("mouseover",function(){R.call(x)}),R.on("mouseout",function(){R.call(g,I)}),T.setTranslate(C,U.lx,U.ly)}function p(A,C,L,O,I){L||(L=C).attr("pointer-events","all");var R=function(X){return+X.attr(i.menuIndexAttrName)==-1}(L)&&I.type!=="buttons"?[]:I.buttons,U=I.type==="dropdown"?i.dropdownButtonClassName:i.buttonClassName,B=L.selectAll("g."+U).data(m.filterVisible(R)),G=B.enter().append("g").classed(U,!0),N=B.exit();I.type==="dropdown"?(G.attr("opacity","0").transition().attr("opacity","1"),N.transition().attr("opacity","0").remove()):N.remove();var j=0,V=0,H=I._dims,ee=["up","down"].indexOf(I.direction)!==-1;I.type==="dropdown"&&(ee?V=H.headerHeight+i.gapButtonHeader:j=H.headerWidth+i.gapButtonHeader),I.type==="dropdown"&&I.direction==="up"&&(V=-i.gapButtonHeader+i.gapButton-H.openHeight),I.type==="dropdown"&&I.direction==="left"&&(j=-i.gapButtonHeader+i.gapButton-H.openWidth);var Q={x:H.lx+j+I.pad.l,y:H.ly+V+I.pad.t,yPad:i.gapButton,xPad:i.gapButton,index:0},Y={l:Q.x+I.borderwidth,t:Q.y+I.borderwidth};B.each(function(X,K){var te=_.select(this);te.call(c,I,X,A).call(h,I,Q),te.on("click",function(){_.event.defaultPrevented||(X.execute&&(X.args2&&I.active===K?(a(A,I,0,C,L,O,-1),w.executeAPICommand(A,X.method,X.args2)):(a(A,I,0,C,L,O,K),w.executeAPICommand(A,X.method,X.args))),A.emit("plotly_buttonclicked",{menu:I,button:X,active:I.active}))}),te.on("mouseover",function(){te.call(x)}),te.on("mouseout",function(){te.call(g,I),B.call(v,I)})}),B.call(v,I),ee?(Y.w=Math.max(H.openWidth,H.headerWidth),Y.h=Q.y-Y.t):(Y.w=Q.x-Y.l,Y.h=Math.max(H.openHeight,H.headerHeight)),Y.direction=I.direction,O&&(B.size()?function(X,K,te,ae,oe,se){var fe,xe,he,de=oe.direction,pe=de==="up"||de==="down",ye=oe._dims,Re=oe.active;if(pe)for(xe=0,he=0;he0?[0]:[]);if(I.enter().append("g").classed(i.containerClassName,!0).style("cursor","pointer"),I.exit().each(function(){_.select(this).selectAll("g."+i.headerGroupClassName).each(O)}).remove(),L.length!==0){var R=I.selectAll("g."+i.headerGroupClassName).data(L,n);R.enter().append("g").classed(i.headerGroupClassName,!0);for(var U=m.ensureSingle(I,"g",i.dropdownButtonGroupClassName,function(V){V.style("pointer-events","all")}),B=0;Bh,C=m.barLength+2*m.barPad,L=m.barWidth+2*m.barPad,O=c,I=d+v;I+L>n&&(I=n-L);var R=this.container.selectAll("rect.scrollbar-horizontal").data(A?[0]:[]);R.exit().on(".drag",null).remove(),R.enter().append("rect").classed("scrollbar-horizontal",!0).call(w.fill,m.barColor),A?(this.hbar=R.attr({rx:m.barRadius,ry:m.barRadius,x:O,y:I,width:C,height:L}),this._hbarXMin=O+C/2,this._hbarTranslateMax=h-C):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var U=v>M,B=m.barWidth+2*m.barPad,G=m.barLength+2*m.barPad,N=c+b,j=d;N+B>r&&(N=r-B);var V=this.container.selectAll("rect.scrollbar-vertical").data(U?[0]:[]);V.exit().on(".drag",null).remove(),V.enter().append("rect").classed("scrollbar-vertical",!0).call(w.fill,m.barColor),U?(this.vbar=V.attr({rx:m.barRadius,ry:m.barRadius,x:N,y:j,width:B,height:G}),this._vbarYMin=j+G/2,this._vbarTranslateMax=M-G):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var H=this.id,ee=o-.5,Q=U?a+B+.5:a+.5,Y=u-.5,X=A?p+L+.5:p+.5,K=i._topdefs.selectAll("#"+H).data(A||U?[0]:[]);if(K.exit().remove(),K.enter().append("clipPath").attr("id",H).append("rect"),A||U?(this._clipRect=K.select("rect").attr({x:Math.floor(ee),y:Math.floor(Y),width:Math.ceil(Q)-Math.floor(ee),height:Math.ceil(X)-Math.floor(Y)}),this.container.call(s.setClipUrl,H,this.gd),this.bg.attr({x:c,y:d,width:b,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(s.setClipUrl,null),delete this._clipRect),A||U){var te=_.behavior.drag().on("dragstart",function(){_.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(te);var ae=_.behavior.drag().on("dragstart",function(){_.event.sourceEvent.preventDefault(),_.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));A&&this.hbar.on(".drag",null).call(ae),U&&this.vbar.on(".drag",null).call(ae)}this.setTranslate(l,t)},m.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(s.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},m.prototype._onBoxDrag=function(){var f=this.translateX,l=this.translateY;this.hbar&&(f-=_.event.dx),this.vbar&&(l-=_.event.dy),this.setTranslate(f,l)},m.prototype._onBoxWheel=function(){var f=this.translateX,l=this.translateY;this.hbar&&(f+=_.event.deltaY),this.vbar&&(l+=_.event.deltaY),this.setTranslate(f,l)},m.prototype._onBarDrag=function(){var f=this.translateX,l=this.translateY;if(this.hbar){var t=f+this._hbarXMin,i=t+this._hbarTranslateMax;f=(T.constrain(_.event.x,t,i)-t)/(i-t)*(this.position.w-this._box.w)}if(this.vbar){var r=l+this._vbarYMin,n=r+this._vbarTranslateMax;l=(T.constrain(_.event.y,r,n)-r)/(n-r)*(this.position.h-this._box.h)}this.setTranslate(f,l)},m.prototype.setTranslate=function(f,l){var t=this.position.w-this._box.w,i=this.position.h-this._box.h;if(f=T.constrain(f||0,0,t),l=T.constrain(l||0,0,i),this.translateX=f,this.translateY=l,this.container.call(s.setTranslate,this._box.l-this.position.l-f,this._box.t-this.position.t-l),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+f-.5),y:Math.floor(this.position.t+l-.5)}),this.hbar){var r=f/t;this.hbar.call(s.setTranslate,f+r*this._hbarTranslateMax,l)}if(this.vbar){var n=l/i;this.vbar.call(s.setTranslate,f,l+n*this._vbarTranslateMax)}}},18783:function(D){D.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"}}},24695:function(D){D.exports={axisRefDescription:function(E,e,_){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",e,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",e,"("+_+"). 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",e,"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",e,"and the",_,"of the domain of the","second",E,"axis."].join(" ")}}},22372:function(D){D.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}},31562:function(D){D.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"}},74808:function(D){D.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},29659:function(D){D.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]}},87381:function(D){D.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}},37822:function(D){D.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},50606:function(D){D.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,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,EPOCHJD:24405875e-1,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"−"}},77922:function(D,E){E.xmlns="http://www.w3.org/2000/xmlns/",E.svg="http://www.w3.org/2000/svg",E.xlink="http://www.w3.org/1999/xlink",E.svgAttrs={xmlns:E.svg,"xmlns:xlink":E.xlink}},8729:function(D,E,e){E.version=e(11506).version,e(7417),e(98847);for(var _=e(73972),w=E.register=_.register,s=e(10641),T=Object.keys(s),m=0;m",""," ",""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},99863:function(D,E){E.isLeftAnchor=function(e){return e.xanchor==="left"||e.xanchor==="auto"&&e.x<=.3333333333333333},E.isCenterAnchor=function(e){return e.xanchor==="center"||e.xanchor==="auto"&&e.x>.3333333333333333&&e.x<.6666666666666666},E.isRightAnchor=function(e){return e.xanchor==="right"||e.xanchor==="auto"&&e.x>=.6666666666666666},E.isTopAnchor=function(e){return e.yanchor==="top"||e.yanchor==="auto"&&e.y>=.6666666666666666},E.isMiddleAnchor=function(e){return e.yanchor==="middle"||e.yanchor==="auto"&&e.y>.3333333333333333&&e.y<.6666666666666666},E.isBottomAnchor=function(e){return e.yanchor==="bottom"||e.yanchor==="auto"&&e.y<=.3333333333333333}},26348:function(D,E,e){var _=e(64872),w=_.mod,s=_.modHalf,T=Math.PI,m=2*T;function f(r){return Math.abs(r[1]-r[0])>m-1e-14}function l(r,n){return s(n-r,m)}function t(r,n){if(f(n))return!0;var o,a;n[0](a=w(a,m))&&(a+=m);var u=w(r,m),p=u+m;return u>=o&&u<=a||p>=o&&p<=a}function i(r,n,o,a,u,p,c){u=u||0,p=p||0;var b,d,v,x,g,y=f([o,a]);function k(C,L){return[C*Math.cos(L)+u,p-C*Math.sin(L)]}y?(b=0,d=T,v=m):o=u&&r<=p);var u,p},pathArc:function(r,n,o,a,u){return i(null,r,n,o,a,u,0)},pathSector:function(r,n,o,a,u){return i(null,r,n,o,a,u,1)},pathAnnulus:function(r,n,o,a,u,p){return i(r,n,o,a,u,p,1)}}},73627:function(D,E){var e=Array.isArray,_=ArrayBuffer,w=DataView;function s(f){return _.isView(f)&&!(f instanceof w)}function T(f){return e(f)||s(f)}function m(f,l,t){if(T(f)){if(T(f[0])){for(var i=t,r=0;rp.max?a.set(u):a.set(+o)}},integer:{coerceFunction:function(o,a,u,p){o%1||!_(o)||p.min!==void 0&&op.max?a.set(u):a.set(+o)}},string:{coerceFunction:function(o,a,u,p){if(typeof o!="string"){var c=typeof o=="number";p.strict!==!0&&c?a.set(String(o)):a.set(u)}else p.noBlank&&!o?a.set(u):a.set(o)}},color:{coerceFunction:function(o,a,u){w(o).isValid()?a.set(o):a.set(u)}},colorlist:{coerceFunction:function(o,a,u){Array.isArray(o)&&o.length&&o.every(function(p){return w(p).isValid()})?a.set(o):a.set(u)}},colorscale:{coerceFunction:function(o,a,u){a.set(T.get(o,u))}},angle:{coerceFunction:function(o,a,u){o==="auto"?a.set("auto"):_(o)?a.set(i(+o,360)):a.set(u)}},subplotid:{coerceFunction:function(o,a,u,p){var c=p.regex||t(u);typeof o=="string"&&c.test(o)?a.set(o):a.set(u)},validateFunction:function(o,a){var u=a.dflt;return o===u||typeof o=="string"&&!!t(u).test(o)}},flaglist:{coerceFunction:function(o,a,u,p){if((p.extras||[]).indexOf(o)===-1)if(typeof o=="string"){for(var c=o.split("+"),b=0;b=_&&R<=w?R:t}if(typeof R!="string"&&typeof R!="number")return t;R=String(R);var j=v(U),V=R.charAt(0);!j||V!=="G"&&V!=="g"||(R=R.substr(1),U="");var H=j&&U.substr(0,7)==="chinese",ee=R.match(H?b:c);if(!ee)return t;var Q=ee[1],Y=ee[3]||"1",X=Number(ee[5]||1),K=Number(ee[7]||0),te=Number(ee[9]||0),ae=Number(ee[11]||0);if(j){if(Q.length===2)return t;var oe;Q=Number(Q);try{var se=u.getComponentMethod("calendars","getCal")(U);if(H){var fe=Y.charAt(Y.length-1)==="i";Y=parseInt(Y,10),oe=se.newDate(Q,se.toMonthIndex(Q,Y,fe),X)}else oe=se.newDate(Q,Number(Y),X)}catch{return t}return oe?(oe.toJD()-a)*i+K*r+te*n+ae*o:t}Q=Q.length===2?(Number(Q)+2e3-d)%100+d:Number(Q),Y-=1;var xe=new Date(Date.UTC(2e3,Y,X,K,te));return xe.setUTCFullYear(Q),xe.getUTCMonth()!==Y||xe.getUTCDate()!==X?t:xe.getTime()+ae*o},_=E.MIN_MS=E.dateTime2ms("-9999"),w=E.MAX_MS=E.dateTime2ms("9999-12-31 23:59:59.9999"),E.isDateTime=function(R,U){return E.dateTime2ms(R,U)!==t};var g=90*i,y=3*r,k=5*n;function h(R,U,B,G,N){if((U||B||G||N)&&(R+=" "+x(U,2)+":"+x(B,2),(G||N)&&(R+=":"+x(G,2),N))){for(var j=4;N%10==0;)j-=1,N/=10;R+="."+x(N,j)}return R}E.ms2DateTime=function(R,U,B){if(typeof R!="number"||!(R>=_&&R<=w))return t;U||(U=0);var G,N,j,V,H,ee,Q=Math.floor(10*f(R+.05,1)),Y=Math.round(R-Q/10);if(v(B)){var X=Math.floor(Y/i)+a,K=Math.floor(f(R,i));try{G=u.getComponentMethod("calendars","getCal")(B).fromJD(X).formatDate("yyyy-mm-dd")}catch{G=p("G%Y-%m-%d")(new Date(Y))}if(G.charAt(0)==="-")for(;G.length<11;)G="-0"+G.substr(1);else for(;G.length<10;)G="0"+G;N=U=_+i&&R<=w-i))return t;var U=Math.floor(10*f(R+.05,1)),B=new Date(Math.round(R-U/10));return h(s("%Y-%m-%d")(B),B.getHours(),B.getMinutes(),B.getSeconds(),10*B.getUTCMilliseconds()+U)},E.cleanDate=function(R,U,B){if(R===t)return U;if(E.isJSDate(R)||typeof R=="number"&&isFinite(R)){if(v(B))return m.error("JS Dates and milliseconds are incompatible with world calendars",R),U;if(!(R=E.ms2DateTimeLocal(+R))&&U!==void 0)return U}else if(!E.isDateTime(R,B))return m.error("unrecognized date",R),U;return R};var M=/%\d?f/g,A=/%h/g,C={1:"1",2:"1",3:"2",4:"2"};function L(R,U,B,G){R=R.replace(M,function(j){var V=Math.min(+j.charAt(1)||6,6);return(U/1e3%1+2).toFixed(V).substr(2).replace(/0+$/,"")||"0"});var N=new Date(Math.floor(U+.05));if(R=R.replace(A,function(){return C[B("%q")(N)]}),v(G))try{R=u.getComponentMethod("calendars","worldCalFmt")(R,U,G)}catch{return"Invalid"}return B(R)(N)}var O=[59,59.9,59.99,59.999,59.9999];E.formatDate=function(R,U,B,G,N,j){if(N=v(N)&&N,!U)if(B==="y")U=j.year;else if(B==="m")U=j.month;else{if(B!=="d")return function(V,H){var ee=f(V+.05,i),Q=x(Math.floor(ee/r),2)+":"+x(f(Math.floor(ee/n),60),2);if(H!=="M"){T(H)||(H=0);var Y=(100+Math.min(f(V/o,60),O[H])).toFixed(H).substr(1);H>0&&(Y=Y.replace(/0+$/,"").replace(/[\.]$/,"")),Q+=":"+Y}return Q}(R,B)+` `+L(j.dayMonthYear,R,G,N);U=j.dayMonth+` -`+j.year}return L(U,R,G,N)};var I=3*i;E.incrementMonth=function(R,U,B){B=v(B)&&B;var G=f(R,i);if(R=Math.round(R-G),B)try{var N=Math.round(R/i)+a,j=u.getComponentMethod("calendars","getCal")(B),V=j.fromJD(N);return U%12?j.add(V,U,"m"):j.add(V,U/12,"y"),(V.toJD()-a)*i+G}catch{y.error("invalid ms "+R+" in calendar "+B)}var H=new Date(R+I);return H.setUTCMonth(H.getUTCMonth()+U)+G-I},E.findExactDates=function(R,U){for(var B,G,N=0,j=0,V=0,H=0,ee=v(U)&&u.getComponentMethod("calendars","getCal")(U),Q=0;Q0&&h[M+1][0]<0)return M;return null}switch(p=g==="RUS"||g==="FJI"?function(h){var M;if(k(h)===null)M=h;else for(M=new Array(h.length),d=0;dM?A[C++]=[h[d][0]+360,h[d][1]]:d===M?(A[C++]=h[d],A[C++]=[h[d][0],-90]):A[C++]=h[d];var L=r.tester(A);L.pts.pop(),m.push(L)}:function(h){m.push(r.tester(h))},v.type){case"MultiPolygon":for(c=0;cB&&(B=j,I=N)}else I=R;return T.default(I).geometry.coordinates}(L),A.fIn=h,A.fOut=L,v.push(L)}else l.log(["Location",A.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete d[M]}switch(c.type){case"FeatureCollection":var m=c.features;for(b=0;b100?(clearInterval(M),k("Unexpected error while fetching from "+g)):void h++},50)})}for(var v=0;v0&&(T.push(y),y=[])}return y.length>0&&T.push(y),T},E.makeLine=function(w){return w.length===1?{type:"LineString",coordinates:w[0]}:{type:"MultiLineString",coordinates:w}},E.makePolygon=function(w){if(w.length===1)return{type:"Polygon",coordinates:w};for(var s=new Array(w.length),T=0;T1||m<0||m>1?null:{x:l+p*m,y:t+d*m}}function f(l,t,i,r,n){var o=r*l+n*t;if(o<0)return r*r+n*n;if(o>i){var a=r-l,u=n-t;return a*a+u*u}var p=r*t-n*l;return p*p/i}E.segmentsIntersect=y,E.segmentDistance=function(l,t,i,r,n,o,a,u){if(y(l,t,i,r,n,o,a,u))return 0;var p=i-l,c=r-t,b=a-n,d=u-o,v=p*p+c*c,x=b*b+d*d,g=Math.min(f(p,c,v,n-l,o-t),f(p,c,v,a-l,u-t),f(b,d,x,l-n,t-o),f(b,d,x,i-n,r-o));return Math.sqrt(g)},E.getTextLocation=function(l,t,i,r){if(l===w&&r===s||(_={},w=l,s=r),_[i])return _[i];var n=l.getPointAtLength(T(i-r/2,t)),o=l.getPointAtLength(T(i+r/2,t)),a=Math.atan((o.y-n.y)/(o.x-n.x)),u=l.getPointAtLength(T(i,t)),p={x:(4*u.x+n.x+o.x)/6,y:(4*u.y+n.y+o.y)/6,theta:a};return _[i]=p,p},E.clearLocationCache=function(){w=null},E.getVisibleSegment=function(l,t,i){var r,n,o=t.left,a=t.right,u=t.top,p=t.bottom,c=0,b=l.getTotalLength(),d=b;function v(g){var m=l.getPointAtLength(g);g===0?r=m:g===b&&(n=m);var k=m.xa?m.x-a:0,h=m.yp?m.y-p:0;return Math.sqrt(k*k+h*h)}for(var x=v(c);x;){if((c+=x+i)>d)return;x=v(c)}for(x=v(d);x;){if(c>(d-=x+i))return;x=v(d)}return{min:c,max:d,len:d-c,total:b,isClosed:c===0&&d===b&&Math.abs(r.x-n.x)<.1&&Math.abs(r.y-n.y)<.1}},E.findPointOnPath=function(l,t,i,r){for(var n,o,a,u=(r=r||{}).pathLength||l.getTotalLength(),p=r.tolerance||.001,c=r.iterationLimit||30,b=l.getPointAtLength(0)[i]>l.getPointAtLength(u)[i]?-1:1,d=0,v=0,x=u;d0?x=n:v=n,d++}return o}},81697:function(D,E,e){var _=e(92770),w=e(84267),s=e(25075),T=e(21081),y=e(22399).defaultLine,f=e(73627).isArrayOrTypedArray,l=s(y);function t(n,o){var a=n;return a[3]*=o,a}function i(n){if(_(n))return l;var o=s(n);return o.length?o:l}function r(n){return _(n)?n:1}D.exports={formatColor:function(n,o,a){var u,p,c,b,d,v=n.color,x=f(v),g=f(o),m=T.extractOpts(n),k=[];if(u=m.colorscale!==void 0?T.makeColorScaleFuncFromTrace(n):i,p=x?function(M,A){return M[A]===void 0?l:s(u(M[A]))}:i,c=g?function(M,A){return M[A]===void 0?1:r(M[A])}:r,x||g)for(var h=0;h1?(_*E+_*e)/_:E+e,s=String(w).length;if(s>16){var T=String(e).length;if(s>=String(E).length+T){var y=parseFloat(w).toPrecision(12);y.indexOf("e+")===-1&&(w=+y)}}return w}},71828:function(D,E,e){var _=e(39898),w=e(84096).g0,s=e(60721).WU,T=e(92770),y=e(50606),f=y.FP_SAFE,l=-f,t=y.BADNUM,i=D.exports={};i.adjustFormat=function(K){return!K||/^\d[.]\df/.test(K)||/[.]\d%/.test(K)?K:K==="0.f"?"~f":/^\d%/.test(K)?"~%":/^\ds/.test(K)?"~s":!/^[~,.0$]/.test(K)&&/[&fps]/.test(K)?"~"+K:K};var r={};i.warnBadFormat=function(K){var te=String(K);r[te]||(r[te]=1,i.warn('encountered bad format: "'+te+'"'))},i.noFormat=function(K){return String(K)},i.numberFormat=function(K){var te;try{te=s(i.adjustFormat(K))}catch{return i.warnBadFormat(K),i.noFormat}return te},i.nestedProperty=e(65487),i.keyedContainer=e(66636),i.relativeAttr=e(6962),i.isPlainObject=e(41965),i.toLogRange=e(58163),i.relinkPrivateKeys=e(51332);var n=e(73627);i.isTypedArray=n.isTypedArray,i.isArrayOrTypedArray=n.isArrayOrTypedArray,i.isArray1D=n.isArray1D,i.ensureArray=n.ensureArray,i.concat=n.concat,i.maxRowLength=n.maxRowLength,i.minRowLength=n.minRowLength;var o=e(64872);i.mod=o.mod,i.modHalf=o.modHalf;var a=e(96554);i.valObjectMeta=a.valObjectMeta,i.coerce=a.coerce,i.coerce2=a.coerce2,i.coerceFont=a.coerceFont,i.coercePattern=a.coercePattern,i.coerceHoverinfo=a.coerceHoverinfo,i.coerceSelectionMarkerOpacity=a.coerceSelectionMarkerOpacity,i.validate=a.validate;var u=e(41631);i.dateTime2ms=u.dateTime2ms,i.isDateTime=u.isDateTime,i.ms2DateTime=u.ms2DateTime,i.ms2DateTimeLocal=u.ms2DateTimeLocal,i.cleanDate=u.cleanDate,i.isJSDate=u.isJSDate,i.formatDate=u.formatDate,i.incrementMonth=u.incrementMonth,i.dateTick0=u.dateTick0,i.dfltRange=u.dfltRange,i.findExactDates=u.findExactDates,i.MIN_MS=u.MIN_MS,i.MAX_MS=u.MAX_MS;var p=e(65888);i.findBin=p.findBin,i.sorterAsc=p.sorterAsc,i.sorterDes=p.sorterDes,i.distinctVals=p.distinctVals,i.roundUp=p.roundUp,i.sort=p.sort,i.findIndexOfMin=p.findIndexOfMin,i.sortObjectKeys=e(78607);var c=e(80038);i.aggNums=c.aggNums,i.len=c.len,i.mean=c.mean,i.median=c.median,i.midRange=c.midRange,i.variance=c.variance,i.stdev=c.stdev,i.interp=c.interp;var b=e(35657);i.init2dArray=b.init2dArray,i.transposeRagged=b.transposeRagged,i.dot=b.dot,i.translationMatrix=b.translationMatrix,i.rotationMatrix=b.rotationMatrix,i.rotationXYMatrix=b.rotationXYMatrix,i.apply3DTransform=b.apply3DTransform,i.apply2DTransform=b.apply2DTransform,i.apply2DTransform2=b.apply2DTransform2,i.convertCssMatrix=b.convertCssMatrix,i.inverseTransformMatrix=b.inverseTransformMatrix;var d=e(26348);i.deg2rad=d.deg2rad,i.rad2deg=d.rad2deg,i.angleDelta=d.angleDelta,i.angleDist=d.angleDist,i.isFullCircle=d.isFullCircle,i.isAngleInsideSector=d.isAngleInsideSector,i.isPtInsideSector=d.isPtInsideSector,i.pathArc=d.pathArc,i.pathSector=d.pathSector,i.pathAnnulus=d.pathAnnulus;var v=e(99863);i.isLeftAnchor=v.isLeftAnchor,i.isCenterAnchor=v.isCenterAnchor,i.isRightAnchor=v.isRightAnchor,i.isTopAnchor=v.isTopAnchor,i.isMiddleAnchor=v.isMiddleAnchor,i.isBottomAnchor=v.isBottomAnchor;var x=e(87642);i.segmentsIntersect=x.segmentsIntersect,i.segmentDistance=x.segmentDistance,i.getTextLocation=x.getTextLocation,i.clearLocationCache=x.clearLocationCache,i.getVisibleSegment=x.getVisibleSegment,i.findPointOnPath=x.findPointOnPath;var g=e(1426);i.extendFlat=g.extendFlat,i.extendDeep=g.extendDeep,i.extendDeepAll=g.extendDeepAll,i.extendDeepNoArrays=g.extendDeepNoArrays;var m=e(47769);i.log=m.log,i.warn=m.warn,i.error=m.error;var k=e(30587);i.counterRegex=k.counter;var h=e(79990);i.throttle=h.throttle,i.throttleDone=h.done,i.clearThrottle=h.clear;var M=e(24401);function A(K){var te={};for(var ae in K)for(var oe=K[ae],se=0;sef||K=te)&&T(K)&&K>=0&&K%1==0},i.noop=e(64213),i.identity=e(23389),i.repeat=function(K,te){for(var ae=new Array(te),oe=0;oeae?Math.max(ae,Math.min(te,K)):Math.max(te,Math.min(ae,K))},i.bBoxIntersect=function(K,te,ae){return ae=ae||0,K.left<=te.right+ae&&te.left<=K.right+ae&&K.top<=te.bottom+ae&&te.top<=K.bottom+ae},i.simpleMap=function(K,te,ae,oe,se){for(var fe=K.length,ye=new Array(fe),pe=0;pe=Math.pow(2,ae)?se>10?(i.warn("randstr failed uniqueness"),de):K(te,ae,oe,(se||0)+1):de},i.OptionControl=function(K,te){K||(K={}),te||(te="opt");var ae={optionList:[],_newoption:function(oe){oe[te]=K,ae[oe.name]=oe,ae.optionList.push(oe)}};return ae["_"+te]=K,ae},i.smooth=function(K,te){if((te=Math.round(te)||0)<2)return K;var ae,oe,se,fe,ye=K.length,pe=2*ye,de=2*te-1,he=new Array(de),xe=new Array(ye);for(ae=0;ae=pe&&(se-=pe*Math.floor(se/pe)),se<0?se=-1-se:se>=ye&&(se=pe-1-se),fe+=K[se]*he[oe];xe[ae]=fe}return xe},i.syncOrAsync=function(K,te,ae){var oe;function se(){return i.syncOrAsync(K,te,ae)}for(;K.length;)if((oe=(0,K.splice(0,1)[0])(te))&&oe.then)return oe.then(se);return ae&&ae(te)},i.stripTrailingSlash=function(K){return K.substr(-1)==="/"?K.substr(0,K.length-1):K},i.noneOrAll=function(K,te,ae){if(K){var oe,se=!1,fe=!0;for(oe=0;oe0?se:0})},i.fillArray=function(K,te,ae,oe){if(oe=oe||i.identity,i.isArrayOrTypedArray(K))for(var se=0;se1?se+ye[1]:"";if(fe&&(ye.length>1||pe.length>4||ae))for(;oe.test(pe);)pe=pe.replace(oe,"$1"+fe+"$2");return pe+de},i.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var U=/^\w*$/;i.templateString=function(K,te){var ae={};return K.replace(i.TEMPLATE_STRING_REGEX,function(oe,se){var fe;return U.test(se)?fe=te[se]:(ae[se]=ae[se]||i.nestedProperty(te,se).get,fe=ae[se]()),i.isValidTextValue(fe)?fe:""})};var B={max:10,count:0,name:"hovertemplate"};i.hovertemplateString=function(){return ee.apply(B,arguments)};var G={max:10,count:0,name:"texttemplate"};i.texttemplateString=function(){return ee.apply(G,arguments)};var N=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function j(K){var te=K.match(N);return te?{key:te[1],op:te[2],number:Number(te[3])}:{key:K,op:null,number:null}}var V={max:10,count:0,name:"texttemplate",parseMultDiv:!0};i.texttemplateStringForShapes=function(){return ee.apply(V,arguments)};var H=/^[:|\|]/;function ee(K,te,ae){var oe=this,se=arguments;te||(te={});var fe={};return K.replace(i.TEMPLATE_STRING_REGEX,function(ye,pe,de){var he=pe==="_xother"||pe==="_yother",xe=pe==="_xother_"||pe==="_yother_",Re=pe==="xother_"||pe==="yother_",we=pe==="xother"||pe==="yother"||he||Re||xe,Ae=pe;(he||xe)&&(Ae=Ae.substring(1)),(Re||xe)&&(Ae=Ae.substring(0,Ae.length-1));var Me,Ce,ne,ue=null,me=null;if(oe.parseMultDiv){var Te=j(Ae);Ae=Te.key,ue=Te.op,me=Te.number}if(we){if((Me=te[Ae])===void 0)return""}else for(ne=3;ne=48&&ye<=57,he=pe>=48&&pe<=57;if(de&&(oe=10*oe+ye-48),he&&(se=10*se+pe-48),!de||!he){if(oe!==se)return oe-se;if(ye!==pe)return ye-pe}}return se-oe};var Q=2e9;i.seedPseudoRandom=function(){Q=2e9},i.pseudoRandom=function(){var K=Q;return Q=(69069*Q+1)%4294967296,Math.abs(Q-K)<429496729?i.pseudoRandom():Q/4294967296},i.fillText=function(K,te,ae){var oe=Array.isArray(ae)?function(ye){ae.push(ye)}:function(ye){ae.text=ye},se=i.extractOption(K,te,"htx","hovertext");if(i.isValidTextValue(se))return oe(se);var fe=i.extractOption(K,te,"tx","text");return i.isValidTextValue(fe)?oe(fe):void 0},i.isValidTextValue=function(K){return K||K===0},i.formatPercent=function(K,te){te=te||0;for(var ae=(Math.round(100*K*Math.pow(10,te))*Math.pow(.1,te)).toFixed(te)+"%",oe=0;oe1&&(he=1):he=0,i.strTranslate(se-he*(ae+ye),fe-he*(oe+pe))+i.strScale(he)+(de?"rotate("+de+(te?"":" "+ae+" "+oe)+")":"")},i.setTransormAndDisplay=function(K,te){K.attr("transform",i.getTextTransform(te)),K.style("display",te.scale?null:"none")},i.ensureUniformFontSize=function(K,te){var ae=i.extendFlat({},te);return ae.size=Math.max(te.size,K._fullLayout.uniformtext.minsize||0),ae},i.join2=function(K,te,ae){var oe=K.length;return oe>1?K.slice(0,-1).join(te)+ae+K[oe-1]:K.join(te)},i.bigFont=function(K){return Math.round(1.2*K)};var X=i.getFirefoxVersion(),Y=X!==null&&X<86;i.getPositionFromD3Event=function(){return Y?[_.event.layerX,_.event.layerY]:[_.event.offsetX,_.event.offsetY]}},41965:function(D){D.exports=function(E){return window&&window.process&&window.process.versions?Object.prototype.toString.call(E)==="[object Object]":Object.prototype.toString.call(E)==="[object Object]"&&Object.getPrototypeOf(E).hasOwnProperty("hasOwnProperty")}},66636:function(D,E,e){var _=e(65487),w=/^\w*$/;D.exports=function(s,T,y,f){var l,t,i;y=y||"name",f=f||"value";var r={};T&&T.length?(i=_(s,T),t=i.get()):t=s,T=T||"";var n={};if(t)for(l=0;l2)return r[p]=2|r[p],a.set(u,null);if(o){for(l=p;l1){var y=["LOG:"];for(T=0;T1){var f=[];for(T=0;T"),"long")}},s.warn=function(){var T;if(_.logging>0){var y=["WARN:"];for(T=0;T0){var f=[];for(T=0;T"),"stick")}},s.error=function(){var T;if(_.logging>0){var y=["ERROR:"];for(T=0;T0){var f=[];for(T=0;T"),"stick")}}},77310:function(D,E,e){var _=e(39898);D.exports=function(w,s,T){var y=w.selectAll("g."+T.replace(/\s/g,".")).data(s,function(l){return l[0].trace.uid});y.exit().remove(),y.enter().append("g").attr("class",T),y.order();var f=w.classed("rangeplot")?"nodeRangePlot3":"node3";return y.each(function(l){l[0][f]=_.select(this)}),y}},35657:function(D,E,e){var _=e(79576);E.init2dArray=function(w,s){for(var T=new Array(w),y=0;ye/2?E-Math.round(E/e)*e:E}}},65487:function(D,E,e){var _=e(92770),w=e(73627).isArrayOrTypedArray;function s(r,n){return function(){var o,a,u,p,c,b=r;for(p=0;p/g),a=0;at||d===w||dr||c&&n(p))}:function(p,c){var b=p[0],d=p[1];if(b===w||bt||d===w||dr)return!1;var v,x,g,m,k,h=f.length,M=f[0][0],A=f[0][1],C=0;for(v=1;vMath.max(x,M)||d>Math.max(g,A)))if(da||Math.abs(_(i,p))>l)return!0;return!1},s.filter=function(T,y){var f=[T[0]],l=0,t=0;function i(r){T.push(r);var n=f.length,o=l;f.splice(t+1);for(var a=o+1;a1&&i(T.pop()),{addPt:i,raw:T,filtered:f}}},79749:function(D,E,e){var _=e(58617),w=e(98580);D.exports=function(s,T,y){var f=s._fullLayout,l=!0;return f._glcanvas.each(function(t){if(t.regl)t.regl.preloadCachedCode(y);else if(!t.pick||f._has("parcoords")){try{t.regl=w({canvas:this,attributes:{antialias:!t.pick,preserveDrawingBuffer:!0},pixelRatio:s._context.plotGlPixelRatio||e.g.devicePixelRatio,extensions:T||[],cachedCode:y||{}})}catch{l=!1}t.regl||(l=!1),l&&this.addEventListener("webglcontextlost",function(i){s&&s.emit&&s.emit("plotly_webglcontextlost",{event:i,layer:t.key})},!1)}}),l||_({container:f._glcontainer.node()}),l}},45142:function(D,E,e){var _=e(92770),w=e(35791);D.exports=function(s){var T;if(typeof(T=s&&s.hasOwnProperty("userAgent")?s.userAgent:function(){var n;return typeof navigator<"u"&&(n=navigator.userAgent),n&&n.headers&&typeof n.headers["user-agent"]=="string"&&(n=n.headers["user-agent"]),n}())!="string")return!0;var y=w({ua:{headers:{"user-agent":T}},tablet:!0,featureDetect:!1});if(!y){for(var f=T.split(" "),l=1;l-1;t--){var i=f[t];if(i.substr(0,8)==="Version/"){var r=i.substr(8).split(".")[0];if(_(r)&&(r=+r),r>=13)return!0}}}return y}},75138:function(D){D.exports=function(E,e){if(e instanceof RegExp){for(var _=e.toString(),w=0;ww.queueLength&&(T.undoQueue.queue.shift(),T.undoQueue.index--))},startSequence:function(T){T.undoQueue=T.undoQueue||{index:0,queue:[],sequence:!1},T.undoQueue.sequence=!0,T.undoQueue.beginSequence=!0},stopSequence:function(T){T.undoQueue=T.undoQueue||{index:0,queue:[],sequence:!1},T.undoQueue.sequence=!1,T.undoQueue.beginSequence=!1},undo:function(T){var y,f;if(!(T.undoQueue===void 0||isNaN(T.undoQueue.index)||T.undoQueue.index<=0)){for(T.undoQueue.index--,y=T.undoQueue.queue[T.undoQueue.index],T.undoQueue.inSequence=!0,f=0;f=T.undoQueue.queue.length)){for(y=T.undoQueue.queue[T.undoQueue.index],T.undoQueue.inSequence=!0,f=0;fn}function i(r,n){return r>=n}E.findBin=function(r,n,o){if(_(n.start))return o?Math.ceil((r-n.start)/n.size-y)-1:Math.floor((r-n.start)/n.size+y);var a,u,p=0,c=n.length,b=0,d=c>1?(n[c-1]-n[0])/(c-1):1;for(u=d>=0?o?f:l:o?i:t,r+=d*y*(o?-1:1)*(d>=0?1:-1);p90&&w.log("Long binary search..."),p-1},E.sorterAsc=function(r,n){return r-n},E.sorterDes=function(r,n){return n-r},E.distinctVals=function(r){var n,o=r.slice();for(o.sort(E.sorterAsc),n=o.length-1;n>-1&&o[n]===T;n--);for(var a,u=o[n]-o[0]||1,p=u/(n||1)/1e4,c=[],b=0;b<=n;b++){var d=o[b],v=d-a;a===void 0?(c.push(d),a=d):v>p&&(u=Math.min(u,v),c.push(d),a=d)}return{vals:c,minDiff:u}},E.roundUp=function(r,n,o){for(var a,u=0,p=n.length-1,c=0,b=o?0:1,d=o?1:0,v=o?Math.ceil:Math.floor;u0&&(a=1),o&&a)return r.sort(n)}return a?r:r.reverse()},E.findIndexOfMin=function(r,n){n=n||s;for(var o,a=1/0,u=0;uy.length)&&(f=y.length),_(T)||(T=!1),w(y[0])){for(t=new Array(f),l=0;ls.length-1)return s[s.length-1];var y=T%1;return y*s[Math.ceil(T)]+(1-y)*s[Math.floor(T)]}},78614:function(D,E,e){var _=e(25075);D.exports=function(w){return w?_(w):[0,0,0,1]}},63893:function(D,E,e){var _=e(39898),w=e(71828),s=w.strTranslate,T=e(77922),y=e(18783).LINE_SPACING,f=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;E.convertToTspans=function(R,U,B){var G=R.text(),N=!R.attr("data-notex")&&U&&U._context.typesetMath&&typeof MathJax<"u"&&G.match(f),j=_.select(R.node().parentNode);if(!j.empty()){var V=R.attr("class")?R.attr("class").split(" ")[0]:"text";return V+="-math",j.selectAll("svg."+V).remove(),j.selectAll("g."+V+"-group").remove(),R.style("display",null).attr({"data-unformatted":G,"data-math":"N"}),N?(U&&U._promises||[]).push(new Promise(function(ee){R.style("display","none");var Q=parseInt(R.node().style.fontSize,10),X={fontSize:Q};(function(Y,K,te){var ae,oe,se,fe,ye=parseInt((MathJax.version||"").split(".")[0]);if(ye===2||ye===3){var pe=function(){var he="math-output-"+w.randstr({},64),xe=(fe=_.select("body").append("div").attr({id:he}).style({visibility:"hidden",position:"absolute","font-size":K.fontSize+"px"}).text(Y.replace(l,"\\lt ").replace(t,"\\gt "))).node();return ye===2?MathJax.Hub.Typeset(xe):MathJax.typeset([xe])},de=function(){var he=fe.select(ye===2?".MathJax_SVG":".MathJax"),xe=!he.empty()&&fe.select("svg").node();if(xe){var Re,we=xe.getBoundingClientRect();Re=ye===2?_.select("body").select("#MathJax_SVG_glyphs"):he.select("defs"),te(he,Re,we)}else w.log("There was an error in the tex syntax.",Y),te();fe.remove()};ye===2?MathJax.Hub.Queue(function(){return oe=w.extendDeepAll({},MathJax.Hub.config),se=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:i},displayAlign:"left"})},function(){if((ae=MathJax.Hub.config.menuSettings.renderer)!=="SVG")return MathJax.Hub.setRenderer("SVG")},pe,de,function(){if(ae!=="SVG")return MathJax.Hub.setRenderer(ae)},function(){return se!==void 0&&(MathJax.Hub.processSectionDelay=se),MathJax.Hub.Config(oe)}):ye===3&&(oe=w.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=i,(ae=MathJax.config.startup.output)!=="svg"&&(MathJax.config.startup.output="svg"),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){pe(),de(),ae!=="svg"&&(MathJax.config.startup.output=ae),MathJax.config=oe}))}else w.warn("No MathJax version:",MathJax.version)})(N[2],X,function(Y,K,te){j.selectAll("svg."+V).remove(),j.selectAll("g."+V+"-group").remove();var ae=Y&&Y.select("svg");if(!ae||!ae.node())return H(),void ee();var oe=j.append("g").classed(V+"-group",!0).attr({"pointer-events":"none","data-unformatted":G,"data-math":"Y"});oe.node().appendChild(ae.node()),K&&K.node()&&ae.node().insertBefore(K.node().cloneNode(!0),ae.node().firstChild);var se=te.width,fe=te.height;ae.attr({class:V,height:fe,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var ye=R.node().style.fill||"black",pe=ae.select("g");pe.attr({fill:ye,stroke:ye});var de=pe.node().getBoundingClientRect(),he=de.width,xe=de.height;(he>se||xe>fe)&&(ae.style("overflow","hidden"),he=(de=ae.node().getBoundingClientRect()).width,xe=de.height);var Re=+R.attr("x"),we=+R.attr("y"),Ae=-(Q||R.node().getBoundingClientRect().height)/4;if(V[0]==="y")oe.attr({transform:"rotate("+[-90,Re,we]+")"+s(-he/2,Ae-xe/2)});else if(V[0]==="l")we=Ae-xe/2;else if(V[0]==="a"&&V.indexOf("atitle")!==0)Re=0,we=Ae;else{var Me=R.attr("text-anchor");Re-=he*(Me==="middle"?.5:Me==="end"?1:0),we=we+Ae-xe/2}ae.attr({x:Re,y:we}),B&&B.call(R,oe),ee(oe)})})):H(),R}function H(){j.empty()||(V=R.attr("class")+"-math",j.select("svg."+V).remove()),R.text("").style("white-space","pre");var ee=function(Q,X){X=X.replace(p," ");var Y,K=!1,te=[],ae=-1;function oe(){ae++;var me=document.createElementNS(T.svg,"tspan");_.select(me).attr({class:"line",dy:ae*y+"em"}),Q.appendChild(me),Y=me;var Te=te;if(te=[{node:me}],Te.length>1)for(var Ee=1;Ee doesnt match end tag <"+me+">. Pretending it did match.",X),Y=te[te.length-1].node}else w.log("Ignoring unexpected end tag .",X)}d.test(X)?oe():(Y=Q,te=[{node:Q}]);for(var pe=X.split(c),de=0;de|>|>)/g,i=[["$","$"],["\\(","\\)"]],r={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},n={sub:"0.3em",sup:"-0.6em"},o={sub:"-0.21em",sup:"0.42em"},a="​",u=["http:","https:","mailto:","",void 0,":"],p=E.NEWLINES=/(\r\n?|\n)/g,c=/(<[^<>]*>)/,b=/<(\/?)([^ >]*)(\s+(.*))?>/i,d=//i;E.BR_TAG_ALL=//gi;var v=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,x=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,g=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,m=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function k(R,U){if(!R)return null;var B=R.match(U),G=B&&(B[3]||B[4]);return G&&C(G)}var h=/(^|;)\s*color:/;E.plainText=function(R,U){for(var B=(U=U||{}).len!==void 0&&U.len!==-1?U.len:1/0,G=U.allowedTags!==void 0?U.allowedTags:["br"],N=3,j=R.split(c),V=[],H="",ee=0,Q=0;QN?V.push(X.substr(0,ae-N)+"..."):V.push(X.substr(0,ae));break}H=""}}return V.join("")};var M={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},A=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function C(R){return R.replace(A,function(U,B){return(B.charAt(0)==="#"?function(G){if(!(G>1114111)){var N=String.fromCodePoint;if(N)return N(G);var j=String.fromCharCode;return G<=65535?j(G):j(55232+(G>>10),G%1024+56320)}}(B.charAt(1)==="x"?parseInt(B.substr(2),16):parseInt(B.substr(1),10)):M[B])||U})}function L(R){var U=encodeURI(decodeURI(R)),B=document.createElement("a"),G=document.createElement("a");B.href=R,G.href=U;var N=B.protocol,j=G.protocol;return u.indexOf(N)!==-1&&u.indexOf(j)!==-1?U:""}function O(R,U,B){var G,N,j,V=B.horizontalAlign,H=B.verticalAlign||"top",ee=R.node().getBoundingClientRect(),Q=U.node().getBoundingClientRect();return N=H==="bottom"?function(){return ee.bottom-G.height}:H==="middle"?function(){return ee.top+(ee.height-G.height)/2}:function(){return ee.top},j=V==="right"?function(){return ee.right-G.width}:V==="center"?function(){return ee.left+(ee.width-G.width)/2}:function(){return ee.left},function(){G=this.node().getBoundingClientRect();var X=j()-Q.left,Y=N()-Q.top,K=B.gd||{};if(B.gd){K._fullLayout._calcInverseTransform(K);var te=w.apply3DTransform(K._fullLayout._invTransform)(X,Y);X=te[0],Y=te[1]}return this.style({top:Y+"px",left:X+"px","z-index":1e3}),this}}E.convertEntities=C,E.sanitizeHTML=function(R){R=R.replace(p," ");for(var U=document.createElement("p"),B=U,G=[],N=R.split(c),j=0;jy.ts+s?t():y.timer=setTimeout(function(){t(),y.timer=null},s)},E.done=function(w){var s=e[w];return s&&s.timer?new Promise(function(T){var y=s.onDone;s.onDone=function(){y&&y(),T(),s.onDone=null}}):Promise.resolve()},E.clear=function(w){if(w)_(e[w]),delete e[w];else for(var s in e)E.clear(s)}},58163:function(D,E,e){var _=e(92770);D.exports=function(w,s){if(w>0)return Math.log(w)/Math.LN10;var T=Math.log(Math.min(s[0],s[1]))/Math.LN10;return _(T)||(T=Math.log(Math.max(s[0],s[1]))/Math.LN10-6),T}},90973:function(D,E,e){var _=D.exports={},w=e(78776).locationmodeToLayer,s=e(96892).zL;_.getTopojsonName=function(T){return[T.scope.replace(/ /g,"-"),"_",T.resolution.toString(),"m"].join("")},_.getTopojsonPath=function(T,y){return T+y+".json"},_.getTopojsonFeatures=function(T,y){var f=w[T.locationmode],l=y.objects[f];return s(y,l).features}},37815:function(D){D.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},92177:function(D){D.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"}}},14458:function(D,E,e){var _=e(73972);D.exports=function(w){for(var s,T,y=_.layoutArrayContainers,f=_.layoutArrayRegexes,l=w.split("[")[0],t=0;t0&&T.log("Clearing previous rejected promises from queue."),x._promises=[]},E.cleanLayout=function(x){var g,m;x||(x={}),x.xaxis1&&(x.xaxis||(x.xaxis=x.xaxis1),delete x.xaxis1),x.yaxis1&&(x.yaxis||(x.yaxis=x.yaxis1),delete x.yaxis1),x.scene1&&(x.scene||(x.scene=x.scene1),delete x.scene1);var k=(y.subplotsRegistry.cartesian||{}).attrRegex,h=(y.subplotsRegistry.polar||{}).attrRegex,M=(y.subplotsRegistry.ternary||{}).attrRegex,A=(y.subplotsRegistry.gl3d||{}).attrRegex,C=Object.keys(x);for(g=0;g3?(te.x=1.02,te.xanchor="left"):te.x<-2&&(te.x=-.02,te.xanchor="right"),te.y>3?(te.y=1.02,te.yanchor="bottom"):te.y<-2&&(te.y=-.02,te.yanchor="top")),o(x),x.dragmode==="rotate"&&(x.dragmode="orbit"),l.clean(x),x.template&&x.template.layout&&E.cleanLayout(x.template.layout),x},E.cleanData=function(x){for(var g=0;g0)return x.substr(0,g)}E.hasParent=function(x,g){for(var m=d(g);m;){if(m in x)return!0;m=d(m)}return!1};var v=["x","y","z"];E.clearAxisTypes=function(x,g,m){for(var k=0;k1&&s.warn("Full array edits are incompatible with other edits",a);var x=r[""][""];if(l(x))i.set(null);else{if(!Array.isArray(x))return s.warn("Unrecognized full array edit value",a,x),!0;i.set(x)}return!b&&(u(d,v),p(t),!0)}var g,m,k,h,M,A,C,L,O=Object.keys(r).map(Number).sort(T),I=i.get(),R=I||[],U=o(v,a).get(),B=[],G=-1,N=R.length;for(g=0;gR.length-(C?0:1))s.warn("index out of range",a,k);else if(A!==void 0)M.length>1&&s.warn("Insertion & removal are incompatible with edits to the same index.",a,k),l(A)?B.push(k):C?(A==="add"&&(A={}),R.splice(k,0,A),U&&U.splice(k,0,{})):s.warn("Unrecognized full object edit value",a,k,A),G===-1&&(G=k);else for(m=0;m=0;g--)R.splice(B[g],1),U&&U.splice(B[g],1);if(R.length?I||i.set(R):i.set(null),b)return!1;if(u(d,v),c!==w){var j;if(G===-1)j=O;else{for(N=Math.max(R.length,N),j=[],g=0;g=G);g++)j.push(k);for(g=G;g=ne.data.length||Ee<-ne.data.length)throw new Error(me+" must be valid indices for gd.data.");if(ue.indexOf(Ee,Te+1)>-1||Ee>=0&&ue.indexOf(-ne.data.length+Ee)>-1||Ee<0&&ue.indexOf(ne.data.length+Ee)>-1)throw new Error("each index in "+me+" must be unique.")}}function I(ne,ue,me){if(!Array.isArray(ne.data))throw new Error("gd.data must be an array.");if(ue===void 0)throw new Error("currentIndices is a required argument.");if(Array.isArray(ue)||(ue=[ue]),O(ne,ue,"currentIndices"),me===void 0||Array.isArray(me)||(me=[me]),me!==void 0&&O(ne,me,"newIndices"),me!==void 0&&ue.length!==me.length)throw new Error("current and new indices must be of equal length.")}function R(ne,ue,me,Te,Ee){(function(Ye,Ze,st,ot){var ft=T.isPlainObject(ot);if(!Array.isArray(Ye.data))throw new Error("gd.data must be an array");if(!T.isPlainObject(Ze))throw new Error("update must be a key:value object");if(st===void 0)throw new Error("indices must be an integer or array of integers");for(var yt in O(Ye,st,"indices"),Ze){if(!Array.isArray(Ze[yt])||Ze[yt].length!==st.length)throw new Error("attribute "+yt+" must be an array of length equal to indices array length");if(ft&&(!(yt in ot)||!Array.isArray(ot[yt])||ot[yt].length!==Ze[yt].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}})(ne,ue,me,Te);for(var Ue=function(Ye,Ze,st,ot){var ft,yt,Et,Tt,xt,Dt=T.isPlainObject(ot),It=[];for(var Ft in Array.isArray(st)||(st=[st]),st=L(st,Ye.data.length-1),Ze)for(var qt=0;qt-1&&me.indexOf("grouptitlefont")===-1?je(me,me.replace("titlefont","title.font")):me.indexOf("titleposition")>-1?je(me,me.replace("titleposition","title.position")):me.indexOf("titleside")>-1?je(me,me.replace("titleside","title.side")):me.indexOf("titleoffset")>-1&&je(me,me.replace("titleoffset","title.offset")):je(me,me.replace("title","title.text"));function je(ge,be){ne[be]=ne[ge],delete ne[ge]}}function ee(ne,ue,me){ne=T.getGraphDiv(ne),v.clearPromiseQueue(ne);var Te={};if(typeof ue=="string")Te[ue]=me;else{if(!T.isPlainObject(ue))return T.warn("Relayout fail.",ue,me),Promise.reject();Te=T.extendFlat({},ue)}Object.keys(Te).length&&(ne.changed=!0);var Ee=ae(ne,Te),Ue=Ee.flags;Ue.calc&&(ne.calcdata=void 0);var De=[r.previousPromises];Ue.layoutReplot?De.push(x.layoutReplot):Object.keys(Te).length&&(Q(ne,Ue,Ee)||r.supplyDefaults(ne),Ue.legend&&De.push(x.doLegend),Ue.layoutstyle&&De.push(x.layoutStyles),Ue.axrange&&X(De,Ee.rangesAltered),Ue.ticks&&De.push(x.doTicksRelayout),Ue.modebar&&De.push(x.doModeBar),Ue.camera&&De.push(x.doCamera),Ue.colorbars&&De.push(x.doColorBars),De.push(h)),De.push(r.rehover,r.redrag,r.reselect),l.add(ne,ee,[ne,Ee.undoit],ee,[ne,Ee.redoit]);var je=T.syncOrAsync(De,ne);return je&&je.then||(je=Promise.resolve(ne)),je.then(function(){return ne.emit("plotly_relayout",Ee.eventData),ne})}function Q(ne,ue,me){var Te=ne._fullLayout;if(!ue.axrange)return!1;for(var Ee in ue)if(Ee!=="axrange"&&ue[Ee])return!1;for(var Ue in me.rangesAltered){var De=n.id2name(Ue),je=ne.layout[De],ge=Te[De];if(ge.autorange=je.autorange,je.range&&(ge.range=je.range.slice()),ge.cleanRange(),ge._matchGroup){for(var be in ge._matchGroup)if(be!==Ue){var Se=Te[n.id2name(be)];Se.autorange=ge.autorange,Se.range=ge.range.slice(),Se._input.range=ge.range.slice()}}}return!0}function X(ne,ue){var me=ue?function(Te){var Ee=[];for(var Ue in ue){var De=n.getFromId(Te,Ue);if(Ee.push(Ue),(De.ticklabelposition||"").indexOf("inside")!==-1&&De._anchorAxis&&Ee.push(De._anchorAxis._id),De._matchGroup)for(var je in De._matchGroup)ue[je]||Ee.push(je)}return n.draw(Te,Ee,{skipTitle:!0})}:function(Te){return n.draw(Te,"redraw")};ne.push(c,x.doAutoRangeAndConstraints,me,x.drawData,x.finalDraw)}var Y=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,K=/^[xyz]axis[0-9]*\.autorange$/,te=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function ae(ne,ue){var me,Te,Ee,Ue=ne.layout,De=ne._fullLayout,je=De._guiEditing,ge=N(De._preGUI,je),be=Object.keys(ue),Se=n.list(ne),Ne=T.extendDeepAll({},ue),Ye={};for(H(ue),be=Object.keys(ue),Te=0;Te0&&typeof qt.parts[Je]!="string";)Je--;var Ke=qt.parts[Je],Ge=qt.parts[Je-1]+"."+Ke,nt=qt.parts.slice(0,Je).join("."),ht=y(ne.layout,nt).get(),Oe=y(De,nt).get(),Be=qt.get();if(Nt!==void 0){yt[Ft]=Nt,Et[Ft]=Ke==="reverse"?Nt:G(Be);var Qe=i.getLayoutValObject(De,qt.parts);if(Qe&&Qe.impliedEdits&&Nt!==null)for(var ut in Qe.impliedEdits)Tt(T.relativeAttr(Ft,ut),Qe.impliedEdits[ut]);if(["width","height"].indexOf(Ft)!==-1)if(Nt){Tt("autosize",null);var pt=Ft==="height"?"width":"height";Tt(pt,De[pt])}else De[Ft]=ne._initialAutoSize[Ft];else if(Ft==="autosize")Tt("width",Nt?null:De.width),Tt("height",Nt?null:De.height);else if(Ge.match(Y))It(Ge),y(De,nt+"._inputRange").set(null);else if(Ge.match(K)){It(Ge),y(De,nt+"._inputRange").set(null);var bt=y(De,nt).get();bt._inputDomain&&(bt._input.domain=bt._inputDomain.slice())}else Ge.match(te)&&y(De,nt+"._inputDomain").set(null);if(Ke==="type"){xt=ht;var Lt=Oe.type==="linear"&&Nt==="log",Ct=Oe.type==="log"&&Nt==="linear";if(Lt||Ct){if(xt&&xt.range)if(Oe.autorange)Lt&&(xt.range=xt.range[1]>xt.range[0]?[1,2]:[2,1]);else{var mt=xt.range[0],Ot=xt.range[1];Lt?(mt<=0&&Ot<=0&&Tt(nt+".autorange",!0),mt<=0?mt=Ot/1e6:Ot<=0&&(Ot=mt/1e6),Tt(nt+".range[0]",Math.log(mt)/Math.LN10),Tt(nt+".range[1]",Math.log(Ot)/Math.LN10)):(Tt(nt+".range[0]",Math.pow(10,mt)),Tt(nt+".range[1]",Math.pow(10,Ot)))}else Tt(nt+".autorange",!0);Array.isArray(De._subplots.polar)&&De._subplots.polar.length&&De[qt.parts[0]]&&qt.parts[1]==="radialaxis"&&delete De[qt.parts[0]]._subplot.viewInitial["radialaxis.range"],t.getComponentMethod("annotations","convertCoords")(ne,Oe,Nt,Tt),t.getComponentMethod("images","convertCoords")(ne,Oe,Nt,Tt)}else Tt(nt+".autorange",!0),Tt(nt+".range",null);y(De,nt+"._inputRange").set(null)}else if(Ke.match(m)){var _t=y(De,Ft).get(),Pt=(Nt||{}).type;Pt&&Pt!=="-"||(Pt="linear"),t.getComponentMethod("annotations","convertCoords")(ne,_t,Pt,Tt),t.getComponentMethod("images","convertCoords")(ne,_t,Pt,Tt)}var Bt=d.containerArrayMatch(Ft);if(Bt){me=Bt.array,Te=Bt.index;var Wt=Bt.property,Gt=Qe||{editType:"calc"};Te!==""&&Wt===""&&(d.isAddVal(Nt)?Et[Ft]=null:d.isRemoveVal(Nt)?Et[Ft]=(y(Ue,me).get()||[])[Te]:T.warn("unrecognized full object value",ue)),g.update(ft,Gt),Ye[me]||(Ye[me]={});var Xt=Ye[me][Te];Xt||(Xt=Ye[me][Te]={}),Xt[Wt]=Nt,delete ue[Ft]}else Ke==="reverse"?(ht.range?ht.range.reverse():(Tt(nt+".autorange",!0),ht.range=[1,0]),Oe.autorange?ft.calc=!0:ft.plot=!0):(Ft==="dragmode"&&(Nt===!1&&Be!==!1||Nt!==!1&&Be===!1)||De._has("scatter-like")&&De._has("regl")&&Ft==="dragmode"&&(Nt==="lasso"||Nt==="select")&&Be!=="lasso"&&Be!=="select"||De._has("gl2d")?ft.plot=!0:Qe?g.update(ft,Qe):ft.calc=!0,qt.set(Nt))}}for(me in Ye)d.applyContainerArrayChanges(ne,ge(Ue,me),Ye[me],ft,ge)||(ft.plot=!0);for(var Kt in Dt){var nn=(xt=n.getFromId(ne,Kt))&&xt._constraintGroup;if(nn)for(var yn in ft.calc=!0,nn)Dt[yn]||(n.getFromId(ne,yn)._constraintShrinkable=!0)}return(oe(ne)||ue.height||ue.width)&&(ft.plot=!0),(ft.plot||ft.calc)&&(ft.layoutReplot=!0),{flags:ft,rangesAltered:Dt,undoit:Et,redoit:yt,eventData:Ne}}function oe(ne){var ue=ne._fullLayout,me=ue.width,Te=ue.height;return ne.layout.autosize&&r.plotAutoSize(ne,ne.layout,ue),ue.width!==me||ue.height!==Te}function se(ne,ue,me,Te){ne=T.getGraphDiv(ne),v.clearPromiseQueue(ne),T.isPlainObject(ue)||(ue={}),T.isPlainObject(me)||(me={}),Object.keys(ue).length&&(ne.changed=!0),Object.keys(me).length&&(ne.changed=!0);var Ee=v.coerceTraceIndices(ne,Te),Ue=V(ne,T.extendFlat({},ue),Ee),De=Ue.flags,je=ae(ne,T.extendFlat({},me)),ge=je.flags;(De.calc||ge.calc)&&(ne.calcdata=void 0),De.clearAxisTypes&&v.clearAxisTypes(ne,Ee,me);var be=[];ge.layoutReplot?be.push(x.layoutReplot):De.fullReplot?be.push(E._doPlot):(be.push(r.previousPromises),Q(ne,ge,je)||r.supplyDefaults(ne),De.style&&be.push(x.doTraceStyle),(De.colorbars||ge.colorbars)&&be.push(x.doColorBars),ge.legend&&be.push(x.doLegend),ge.layoutstyle&&be.push(x.layoutStyles),ge.axrange&&X(be,je.rangesAltered),ge.ticks&&be.push(x.doTicksRelayout),ge.modebar&&be.push(x.doModeBar),ge.camera&&be.push(x.doCamera),be.push(h)),be.push(r.rehover,r.redrag,r.reselect),l.add(ne,se,[ne,Ue.undoit,je.undoit,Ue.traces],se,[ne,Ue.redoit,je.redoit,Ue.traces]);var Se=T.syncOrAsync(be,ne);return Se&&Se.then||(Se=Promise.resolve(ne)),Se.then(function(){return ne.emit("plotly_update",{data:Ue.eventData,layout:je.eventData}),ne})}function fe(ne){return function(ue){ue._fullLayout._guiEditing=!0;var me=ne.apply(null,arguments);return ue._fullLayout._guiEditing=!1,me}}var ye=[{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:/^legend\.(x|y)$/,attr:"editrevision"},{pattern:/^(shapes|annotations)/,attr:"editrevision"},{pattern:/^title\.text$/,attr:"editrevision"}],pe=[{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 de(ne,ue){for(var me=0;me1;)if(Te.pop(),(me=y(ue,Te.join(".")+".uirevision").get())!==void 0)return me;return ue.uirevision}function xe(ne,ue){for(var me=0;me=Ee.length?Ee[0]:Ee[be]:Ee}function je(be){return Array.isArray(Ue)?be>=Ue.length?Ue[0]:Ue[be]:Ue}function ge(be,Se){var Ne=0;return function(){if(be&&++Ne===Se)return be()}}return Te._frameWaitingCnt===void 0&&(Te._frameWaitingCnt=0),new Promise(function(be,Se){function Ne(){ne.emit("plotly_animating"),Te._lastFrameAt=-1/0,Te._timeToNext=0,Te._runningTransitions=0,Te._currentFrame=null;var Ft=function(){Te._animationRaf=window.requestAnimationFrame(Ft),Date.now()-Te._lastFrameAt>Te._timeToNext&&function(){Te._currentFrame&&Te._currentFrame.onComplete&&Te._currentFrame.onComplete();var qt=Te._currentFrame=Te._frameQueue.shift();if(qt){var Nt=qt.name?qt.name.toString():null;ne._fullLayout._currentFrame=Nt,Te._lastFrameAt=Date.now(),Te._timeToNext=qt.frameOpts.duration,r.transition(ne,qt.frame.data,qt.frame.layout,v.coerceTraceIndices(ne,qt.frame.traces),qt.frameOpts,qt.transitionOpts).then(function(){qt.onComplete&&qt.onComplete()}),ne.emit("plotly_animatingframe",{name:Nt,frame:qt.frame,animation:{frame:qt.frameOpts,transition:qt.transitionOpts}})}else ne.emit("plotly_animated"),window.cancelAnimationFrame(Te._animationRaf),Te._animationRaf=null}()};Ft()}var Ye,Ze,st=0;function ot(Ft){return Array.isArray(Ee)?st>=Ee.length?Ft.transitionOpts=Ee[st]:Ft.transitionOpts=Ee[0]:Ft.transitionOpts=Ee,st++,Ft}var ft=[],yt=ue==null,Et=Array.isArray(ue);if(yt||Et||!T.isPlainObject(ue)){if(yt||["string","number"].indexOf(typeof ue)!==-1)for(Ye=0;Ye0&&DtDt)&&It.push(Ze);ft=It}}ft.length>0?function(Ft){if(Ft.length!==0){for(var qt=0;qt=0;Te--)if(T.isPlainObject(ue[Te])){var Ye=ue[Te].name,Ze=(ge[Ye]||Ne[Ye]||{}).name,st=ue[Te].name,ot=ge[Ze]||Ne[Ze];Ze&&st&&typeof st=="number"&&ot&&k<5&&(k++,T.warn('addFrames: overwriting frame "'+(ge[Ze]||Ne[Ze]).name+'" with a frame whose name of type "number" also equates to "'+Ze+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),k===5&&T.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),Ne[Ye]={name:Ye},Se.push({frame:r.supplyFrameDefaults(ue[Te]),index:me&&me[Te]!==void 0&&me[Te]!==null?me[Te]:be+Te})}Se.sort(function(Ft,qt){return Ft.index>qt.index?-1:Ft.index=0;Te--){if(typeof(Ee=Se[Te].frame).name=="number"&&T.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!Ee.name)for(;ge[Ee.name="frame "+ne._transitionData._counter++];);if(ge[Ee.name]){for(Ue=0;Ue=0;me--)Te=ue[me],Ue.push({type:"delete",index:Te}),De.unshift({type:"insert",index:Te,value:Ee[Te]});var je=r.modifyFrames,ge=r.modifyFrames,be=[ne,De],Se=[ne,Ue];return l&&l.add(ne,je,be,ge,Se),r.modifyFrames(ne,Ue)},E.addTraces=function ne(ue,me,Te){ue=T.getGraphDiv(ue);var Ee,Ue,De=[],je=E.deleteTraces,ge=ne,be=[ue,De],Se=[ue,me];for(function(Ne,Ye,Ze){var st,ot;if(!Array.isArray(Ne.data))throw new Error("gd.data must be an array.");if(Ye===void 0)throw new Error("traces must be defined.");for(Array.isArray(Ye)||(Ye=[Ye]),st=0;st=0&&Ne=0&&Ne=O.length)return!1;if(h.dimensions===2){if(A++,M.length===A)return h;var I=M[A];if(!v(I))return!1;h=O[L][I]}else h=O[L]}else h=O}}return h}function v(h){return h===Math.round(h)&&h>=0}function x(){var h,M,A={};for(h in i(A,T),_.subplotsRegistry)if((M=_.subplotsRegistry[h]).layoutAttributes)if(Array.isArray(M.attr))for(var C=0;C=I.length)return!1;C=(A=(_.transformsRegistry[I[R].type]||{}).attributes)&&A[M[2]],O=3}else{var U=h._module;if(U||(U=(_.modules[h.type||s.type.dflt]||{})._module),!U)return!1;if(!(C=(A=U.attributes)&&A[L])){var B=U.basePlotModule;B&&B.attributes&&(C=B.attributes[L])}C||(C=s[L])}return d(C,M,O)},E.getLayoutValObject=function(h,M){var A=function(C,L){var O,I,R,U,B=C._basePlotModules;if(B){var G;for(O=0;O=i&&(t._input||{})._templateitemname;n&&(r=i);var o,a=l+"["+r+"]";function u(){o={},n&&(o[a]={},o[a].templateitemname=n)}function p(b,d){n?_.nestedProperty(o[a],b).set(d):o[a+"."+b]=d}function c(){var b=o;return u(),b}return u(),{modifyBase:function(b,d){o[b]=d},modifyItem:p,getUpdateObj:c,applyUpdate:function(b,d){b&&p(b,d);var v=c();for(var x in v)_.nestedProperty(f,x).set(v[x])}}}},61549:function(D,E,e){var _=e(39898),w=e(73972),s=e(74875),T=e(71828),y=e(63893),f=e(33306),l=e(7901),t=e(91424),i=e(92998),r=e(64168),n=e(89298),o=e(18783),a=e(99082),u=a.enforce,p=a.clean,c=e(71739).doAutoRange,b="start";function d(k,h,M){for(var A=0;A=k[1]||C[1]<=k[0])&&L[0]h[0])return!0}return!1}function v(k){var h,M,A,C,L,O,I=k._fullLayout,R=I._size,U=R.p,B=n.list(k,"",!0);if(I._paperdiv.style({width:k._context.responsive&&I.autosize&&!k._context._hasZeroWidth&&!k.layout.width?"100%":I.width+"px",height:k._context.responsive&&I.autosize&&!k._context._hasZeroHeight&&!k.layout.height?"100%":I.height+"px"}).selectAll(".main-svg").call(t.setSize,I.width,I.height),k._context.setBackground(k,I.paper_bgcolor),E.drawMainTitle(k),r.manage(k),!I._has("cartesian"))return s.previousPromises(k);function G(Ne,Ye,Ze){var st=Ne._lw/2;return Ne._id.charAt(0)==="x"?Ye?Ze==="top"?Ye._offset-U-st:Ye._offset+Ye._length+U+st:R.t+R.h*(1-(Ne.position||0))+st%1:Ye?Ze==="right"?Ye._offset+Ye._length+U+st:Ye._offset-U-st:R.l+R.w*(Ne.position||0)+st%1}for(h=0;h.5?"t":"b",Q=G._fullLayout.margin[ee],X=0;return N.yref==="paper"?X=j+N.pad.t+N.pad.b:N.yref==="container"&&(X=function(Y,K,te,ae,oe){var se=0;return te==="middle"&&(se+=oe/2),Y==="t"?(te==="top"&&(se+=oe),se+=ae-K*ae):(te==="bottom"&&(se+=oe),se+=K*ae),se}(ee,V,H,G._fullLayout.height,j)+N.pad.t+N.pad.b),X>Q?X:0}(k,M,U);B>0&&(function(G,N,j,V){var H="title.automargin",ee=G._fullLayout.title,Q=ee.y>.5?"t":"b",X={x:ee.x,y:ee.y,t:0,b:0},Y={};ee.yref==="paper"&&function(K,te,ae,oe,se){var fe=te.yref==="paper"?K._fullLayout._size.h:K._fullLayout.height,ye=T.isTopAnchor(te)?oe:oe-se,pe=ae==="b"?fe-ye:ye;return!(T.isTopAnchor(te)&&ae==="t"||T.isBottomAnchor(te)&&ae==="b")&&peR?m.push({code:"unused",traceType:A,templateCount:I,dataCount:R}):R>I&&m.push({code:"reused",traceType:A,templateCount:I,dataCount:R})}}else m.push({code:"data"});if(function U(B,G){for(var N in B)if(N.charAt(0)!=="_"){var j=B[N],V=a(B,N,G);w(j)?(Array.isArray(B)&&j._template===!1&&j.templateitemname&&m.push({code:"missing",path:V,templateitemname:j.templateitemname}),U(j,V)):Array.isArray(j)&&u(j)&&U(j,V)}}({data:h,layout:k},""),m.length)return m.map(p)}},403:function(D,E,e){var _=e(92770),w=e(72391),s=e(74875),T=e(71828),y=e(25095),f=e(5900),l=e(70942),t=e(11506).version,i={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}};D.exports=function(r,n){var o,a,u,p;function c(R){return!(R in n)||T.validate(n[R],i[R])}if(n=n||{},T.isPlainObject(r)?(o=r.data||[],a=r.layout||{},u=r.config||{},p={}):(r=T.getGraphDiv(r),o=T.extendDeep([],r.data),a=T.extendDeep({},r.layout),u=r._context,p=r._fullLayout||{}),!c("width")&&n.width!==null||!c("height")&&n.height!==null)throw new Error("Height and width should be pixel values.");if(!c("format"))throw new Error("Export format is not "+T.join2(i.format.values,", "," or ")+".");var b={};function d(R,U){return T.coerce(n,b,i,R,U)}var v=d("format"),x=d("width"),g=d("height"),m=d("scale"),k=d("setBackground"),h=d("imageDataOnly"),M=document.createElement("div");M.style.position="absolute",M.style.left="-5000px",document.body.appendChild(M);var A=T.extendFlat({},a);x?A.width=x:n.width===null&&_(p.width)&&(A.width=p.width),g?A.height=g:n.height===null&&_(p.height)&&(A.height=p.height);var C=T.extendFlat({},u,{_exportedPlot:!0,staticPlot:!0,setBackground:k}),L=y.getRedrawFunc(M);function O(){return new Promise(function(R){setTimeout(R,y.getDelay(M._fullLayout))})}function I(){return new Promise(function(R,U){var B=f(M,v,m),G=M._fullLayout.width,N=M._fullLayout.height;function j(){w.purge(M),document.body.removeChild(M)}if(v==="full-json"){var V=s.graphJson(M,!1,"keepdata","object",!0,!0);return V.version=t,V=JSON.stringify(V),j(),R(h?V:y.encodeJSON(V))}if(j(),v==="svg")return R(h?B:y.encodeSVG(B));var H=document.createElement("canvas");H.id=T.randstr(),l({format:v,width:G,height:N,scale:m,canvas:H,svg:B,promise:!0}).then(R).catch(U)})}return new Promise(function(R,U){w.newPlot(M,o,A,C).then(L).then(O).then(I).then(function(B){R(function(G){return h?G.replace(y.IMAGE_URL_PREFIX,""):G}(B))}).catch(function(B){U(B)})})}},84936:function(D,E,e){var _=e(71828),w=e(74875),s=e(86281),T=e(72075).dfltConfig,y=_.isPlainObject,f=Array.isArray,l=_.isArrayOrTypedArray;function t(b,d,v,x,g,m){m=m||[];for(var k=Object.keys(b),h=0;hL.length&&x.push(o("unused",g,A.concat(L.length)));var G,N,j,V,H,ee=L.length,Q=Array.isArray(B);if(Q&&(ee=Math.min(ee,B.length)),O.dimensions===2)for(N=0;NL[N].length&&x.push(o("unused",g,A.concat(N,L[N].length)));var X=L[N].length;for(G=0;G<(Q?Math.min(X,B[N].length):X);G++)j=Q?B[N][G]:B,V=C[N][G],H=L[N][G],_.validate(V,j)?H!==V&&H!==+V&&x.push(o("dynamic",g,A.concat(N,G),V,H)):x.push(o("value",g,A.concat(N,G),V))}else x.push(o("array",g,A.concat(N),C[N]));else for(N=0;N1&&m.push(o("object","layout"))),w.supplyDefaults(k);for(var h=k._fullData,M=v.length,A=0;A0&&Math.round(a)===a))return{vals:i};n=a}for(var u=l.calendar,p=r==="start",c=r==="end",b=f[t+"period0"],d=s(b,u)||0,v=[],x=[],g=[],m=i.length,k=0;kC;)A=T(A,-n,u);for(;A<=C;)A=T(A,n,u);M=T(A,-n,u)}else{for(A=d+(h=Math.round((C-d)/o))*o;A>C;)A-=o;for(;A<=C;)A+=o;M=A-o}v[k]=p?M:c?A:(M+A)/2,x[k]=M,g[k]=A}return{vals:v,starts:x,ends:g}}},89502:function(D){D.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},71739:function(D,E,e){var _=e(39898),w=e(92770),s=e(71828),T=e(50606).FP_SAFE,y=e(73972),f=e(91424),l=e(41675),t=l.getFromId,i=l.isLinked;function r(x,g){var m,k,h=[],M=x._fullLayout,A=o(M,g,0),C=o(M,g,1),L=a(x,g),O=L.min,I=L.max;if(O.length===0||I.length===0)return s.simpleMap(g.range,g.r2l);var R=O[0].val,U=I[0].val;for(m=1;m0&&((ee=te-A(N)-C(j))>ae?Q/ee>oe&&(V=N,H=j,oe=Q/ee):Q/te>oe&&(V={val:N.val,nopad:1},H={val:j.val,nopad:1},oe=Q/te));if(R===U){var se=R-1,fe=R+1;if(Y)if(R===0)h=[0,1];else{var ye=(R>0?I:O).reduce(function(de,he){return Math.max(de,C(he))},0),pe=R/(1-Math.min(.5,ye/te));h=R>0?[0,pe]:[pe,0]}else h=K?[Math.max(0,se),Math.max(1,fe)]:[se,fe]}else Y?(V.val>=0&&(V={val:0,nopad:1}),H.val<=0&&(H={val:0,nopad:1})):K&&(V.val-oe*A(V)<0&&(V={val:0,nopad:1}),H.val<=0&&(H={val:1,nopad:1})),oe=(H.val-V.val-n(g,N.val,j.val))/(te-A(V)-C(H)),h=[V.val-oe*A(V),H.val+oe*C(H)];return B&&h.reverse(),s.simpleMap(h,g.l2r||Number)}function n(x,g,m){var k=0;if(x.rangebreaks)for(var h=x.locateBreaks(g,m),M=0;M=m&&(O.extrapad||!A)){C=!1;break}h(g,O.val)&&O.pad<=m&&(A||!O.extrapad)&&(x.splice(L,1),L--)}if(C){var I=M&&g===0;x.push({val:g,pad:I?0:m,extrapad:!I&&A})}}function b(x){return w(x)&&Math.abs(x)=g}D.exports={getAutoRange:r,makePadFn:o,doAutoRange:function(x,g,m){if(g.setScale(),g.autorange){g.range=m?m.slice():r(x,g),g._r=g.range.slice(),g._rl=s.simpleMap(g._r,g.r2l);var k=g._input,h={};h[g._attr+".range"]=g.range,h[g._attr+".autorange"]=g.autorange,y.call("_storeDirectGUIEdit",x.layout,x._fullLayout._preGUI,h),k.range=g.range.slice(),k.autorange=g.autorange}var M=g._anchorAxis;if(M&&M.rangeslider){var A=M.rangeslider[g._name];A&&A.rangemode==="auto"&&(A.range=r(x,g)),M._input.rangeslider[g._name]=s.extendFlat({},A)}},findExtremes:function(x,g,m){m||(m={}),x._m||x.setScale();var k,h,M,A,C,L,O,I,R,U=[],B=[],G=g.length,N=m.padded||!1,j=m.tozero&&(x.type==="linear"||x.type==="-"),V=x.type==="log",H=!1,ee=m.vpadLinearized||!1;function Q(fe){if(Array.isArray(fe))return H=!0,function(pe){return Math.max(Number(fe[pe]||0),0)};var ye=Math.max(Number(fe||0),0);return function(){return ye}}var X=Q((x._m>0?m.ppadplus:m.ppadminus)||m.ppad||0),Y=Q((x._m>0?m.ppadminus:m.ppadplus)||m.ppad||0),K=Q(m.vpadplus||m.vpad),te=Q(m.vpadminus||m.vpad);if(!H){if(I=1/0,R=-1/0,V)for(k=0;k0&&(I=h),h>R&&h-T&&(I=h),h>R&&h=se;k--)oe(k);return{min:U,max:B,opts:m}},concatExtremes:a}},89298:function(D,E,e){var _=e(39898),w=e(92770),s=e(74875),T=e(73972),y=e(71828),f=y.strTranslate,l=e(63893),t=e(92998),i=e(7901),r=e(91424),n=e(13838),o=e(66287),a=e(50606),u=a.ONEMAXYEAR,p=a.ONEAVGYEAR,c=a.ONEMINYEAR,b=a.ONEMAXQUARTER,d=a.ONEAVGQUARTER,v=a.ONEMINQUARTER,x=a.ONEMAXMONTH,g=a.ONEAVGMONTH,m=a.ONEMINMONTH,k=a.ONEWEEK,h=a.ONEDAY,M=h/2,A=a.ONEHOUR,C=a.ONEMIN,L=a.ONESEC,O=a.MINUS_SIGN,I=a.BADNUM,R={K:"zeroline"},U={K:"gridline",L:"path"},B={K:"minor-gridline",L:"path"},G={K:"tick",L:"path"},N={K:"tick",L:"text"},j={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},V=e(18783),H=V.MID_SHIFT,ee=V.CAP_SHIFT,Q=V.LINE_SPACING,X=V.OPPOSITE_SIDE,Y=D.exports={};Y.setConvert=e(21994);var K=e(4322),te=e(41675),ae=te.idSort,oe=te.isLinked;Y.id2name=te.id2name,Y.name2id=te.name2id,Y.cleanId=te.cleanId,Y.list=te.list,Y.listIds=te.listIds,Y.getFromId=te.getFromId,Y.getFromTrace=te.getFromTrace;var se=e(71739);function fe(Oe){var Be=1e-4*(Oe[1]-Oe[0]);return[Oe[0]-Be,Oe[1]+Be]}Y.getAutoRange=se.getAutoRange,Y.findExtremes=se.findExtremes,Y.coerceRef=function(Oe,Be,Qe,ut,pt,bt){var Lt=ut.charAt(ut.length-1),Ct=Qe._fullLayout._subplots[Lt+"axis"],mt=ut+"ref",Ot={};return pt||(pt=Ct[0]||(typeof bt=="string"?bt:bt[0])),bt||(bt=pt),Ct=Ct.concat(Ct.map(function(_t){return _t+" domain"})),Ot[mt]={valType:"enumerated",values:Ct.concat(bt?typeof bt=="string"?[bt]:bt:[]),dflt:pt},y.coerce(Oe,Be,Ot,mt)},Y.getRefType=function(Oe){return Oe===void 0?Oe:Oe==="paper"?"paper":Oe==="pixel"?"pixel":/( domain)$/.test(Oe)?"domain":"range"},Y.coercePosition=function(Oe,Be,Qe,ut,pt,bt){var Lt,Ct;if(Y.getRefType(ut)!=="range")Lt=y.ensureNumber,Ct=Qe(pt,bt);else{var mt=Y.getFromId(Be,ut);Ct=Qe(pt,bt=mt.fraction2r(bt)),Lt=mt.cleanPos}Oe[pt]=Lt(Ct)},Y.cleanPosition=function(Oe,Be,Qe){return(Qe==="paper"||Qe==="pixel"?y.ensureNumber:Y.getFromId(Be,Qe).cleanPos)(Oe)},Y.redrawComponents=function(Oe,Be){Be=Be||Y.listIds(Oe);var Qe=Oe._fullLayout;function ut(pt,bt,Lt,Ct){for(var mt=T.getComponentMethod(pt,bt),Ot={},_t=0;_tQe&&_t2e-6||((Qe-Oe._forceTick0)/Oe._minDtick%1+1.000001)%1>2e-6)&&(Oe._minDtick=0)):Oe._minDtick=0},Y.saveRangeInitial=function(Oe,Be){for(var Qe=Y.list(Oe,"",!0),ut=!1,pt=0;pt.3*In||fn(ln)||fn(kn))){var Cn=yn.dtick/2;Kt+=Kt+Cn.8){var wn=Number(yn.substr(1));Wn.exactYears>.8&&wn%12==0?Kt=Y.tickIncrement(Kt,"M6","reverse")+1.5*h:Wn.exactMonths>.8?Kt=Y.tickIncrement(Kt,"M1","reverse")+15.5*h:Kt-=M;var on=Y.tickIncrement(Kt,yn);if(on<=ln)return on}return Kt}(Xt,Oe,Gt,Ct,pt)),Wt=Xt;Wt<=mt;)Wt=Y.tickIncrement(Wt,Gt,!1,pt);return{start:Be.c2r(Xt,0,pt),end:Be.c2r(Wt,0,pt),size:Gt,_dataSpan:mt-Ct}},Y.prepMinorTicks=function(Oe,Be,Qe){if(!Be.minor.dtick){delete Oe.dtick;var ut,pt=Be.dtick&&w(Be._tmin);if(pt){var bt=Y.tickIncrement(Be._tmin,Be.dtick,!0);ut=[Be._tmin,.99*bt+.01*Be._tmin]}else{var Lt=y.simpleMap(Be.range,Be.r2l);ut=[Lt[0],.8*Lt[0]+.2*Lt[1]]}if(Oe.range=y.simpleMap(ut,Be.l2r),Oe._isMinor=!0,Y.prepTicks(Oe,Qe),pt){var Ct=w(Be.dtick),mt=w(Oe.dtick),Ot=Ct?Be.dtick:+Be.dtick.substring(1),_t=mt?Oe.dtick:+Oe.dtick.substring(1);Ct&&mt?he(Ot,_t)?Ot===2*k&&_t===2*h&&(Oe.dtick=k):Ot===2*k&&_t===3*h?Oe.dtick=k:Ot!==k||(Be._input.minor||{}).nticks?xe(Ot/_t,2.5)?Oe.dtick=Ot/2:Oe.dtick=Ot:Oe.dtick=h:String(Be.dtick).charAt(0)==="M"?mt?Oe.dtick="M1":he(Ot,_t)?Ot>=12&&_t===2&&(Oe.dtick="M3"):Oe.dtick=Be.dtick:String(Oe.dtick).charAt(0)==="L"?String(Be.dtick).charAt(0)==="L"?he(Ot,_t)||(Oe.dtick=xe(Ot/_t,2.5)?Be.dtick/2:Be.dtick):Oe.dtick="D1":Oe.dtick==="D2"&&+Be.dtick>1&&(Oe.dtick=1)}Oe.range=Be.range}Be.minor._tick0Init===void 0&&(Oe.tick0=Be.tick0)},Y.prepTicks=function(Oe,Be){var Qe=y.simpleMap(Oe.range,Oe.r2l,void 0,void 0,Be);if(Oe.tickmode==="auto"||!Oe.dtick){var ut,pt=Oe.nticks;pt||(Oe.type==="category"||Oe.type==="multicategory"?(ut=Oe.tickfont?y.bigFont(Oe.tickfont.size||12):15,pt=Oe._length/ut):(ut=Oe._id.charAt(0)==="y"?40:80,pt=y.constrain(Oe._length/ut,4,9)+1),Oe._name==="radialaxis"&&(pt*=2)),Oe.minor&&Oe.minor.tickmode!=="array"||Oe.tickmode==="array"&&(pt*=100),Oe._roughDTick=Math.abs(Qe[1]-Qe[0])/pt,Y.autoTicks(Oe,Oe._roughDTick),Oe._minDtick>0&&Oe.dtick<2*Oe._minDtick&&(Oe.dtick=Oe._minDtick,Oe.tick0=Oe.l2r(Oe._forceTick0))}Oe.ticklabelmode==="period"&&function(bt){var Lt;function Ct(){return!(w(bt.dtick)||bt.dtick.charAt(0)!=="M")}var mt=Ct(),Ot=Y.getTickFormat(bt);if(Ot){var _t=bt._dtickInit!==bt.dtick;/%[fLQsSMX]/.test(Ot)||(/%[HI]/.test(Ot)?(Lt=A,_t&&!mt&&bt.dtick=(nn?0:1);yn--){var ln=!yn;yn?(Oe._dtickInit=Oe.dtick,Oe._tick0Init=Oe.tick0):(Oe.minor._dtickInit=Oe.minor.dtick,Oe.minor._tick0Init=Oe.minor.tick0);var kn=yn?Oe:y.extendFlat({},Oe,Oe.minor);if(ln?Y.prepMinorTicks(kn,Oe,Be):Y.prepTicks(kn,Be),kn.tickmode!=="array")if(kn.tickmode!=="sync"){var Wn=fe(mt),wn=Wn[0],on=Wn[1],_n=w(kn.dtick),fn=pt==="log"&&!(_n||kn.dtick.charAt(0)==="L"),hn=Y.tickFirst(kn,Be);if(yn){if(Oe._tmin=hn,hn=on:Hn<=on;Hn=Y.tickIncrement(Hn,qn,Ot,bt)){if(yn&&In++,kn.rangebreaks&&!Ot){if(Hn=Pt)break}if(Xt.length>Bt||Hn===Nn)break;Nn=Hn;var or={value:Hn};yn?(fn&&Hn!==(0|Hn)&&(or.simpleLabel=!0),Lt>1&&In%Lt&&(or.skipLabel=!0),Xt.push(or)):(or.minor=!0,Kt.push(or))}}else Xt=[],Wt=Ae(Oe);else yn?(Xt=[],Wt=Me(Oe)):(Kt=[],Gt=Me(Oe))}if(nn&&!(Oe.minor.ticks==="inside"&&Oe.ticks==="outside"||Oe.minor.ticks==="outside"&&Oe.ticks==="inside")){for(var tr=Xt.map(function(Pn){return Pn.value}),kr=[],gr=0;gr0?(On=un-1,Sn=un):(On=un,Sn=un);var pn,bn=Pn[On].value,dn=Pn[Sn].value,vn=Math.abs(dn-bn),An=Jt||vn,Bn=0;An>=c?Bn=vn>=c&&vn<=u?vn:p:Jt===d&&An>=v?Bn=vn>=v&&vn<=b?vn:d:An>=m?Bn=vn>=m&&vn<=x?vn:g:Jt===k&&An>=k?Bn=k:An>=h?Bn=h:Jt===M&&An>=M?Bn=M:Jt===A&&An>=A&&(Bn=A),Bn>=vn&&(Bn=vn,pn=!0);var Xn=Rn+Bn;if(jt.rangebreaks&&Bn>0){for(var er=0,Jn=0;Jn<84;Jn++){var lr=(Jn+.5)/84;jt.maskBreaks(Rn*(1-lr)+lr*Xn)!==I&&er++}(Bn*=er/84)||(Pn[un].drop=!0),pn&&vn>k&&(Bn=vn)}(Bn>0||un===0)&&(Pn[un].periodX=Rn+Bn/2)}}(Xt,Oe,Oe._definedDelta),Oe.rangebreaks){var mn=Oe._id.charAt(0)==="y",Ln=1;Oe.tickmode==="auto"&&(Ln=Oe.tickfont?Oe.tickfont.size:12);var En=NaN;for(Qe=Xt.length-1;Qe>-1;Qe--)if(Xt[Qe].drop)Xt.splice(Qe,1);else{Xt[Qe].value=Ke(Xt[Qe].value,Oe);var jn=Oe.c2p(Xt[Qe].value);(mn?En>jn-Ln:EnPt||Zn<_t)&&(Zn>Pt&&($n.periodX=Pt),Zn<_t&&($n.periodX=_t),Qn($n))),Xt[Qe].skipLabel&&Qn($n),Wt.push($n))}return Wt=Wt.concat(Gt),Oe._inCalcTicks=!1,Ct&&Wt.length&&(Wt[0].noTick=!0),Wt};var Ce=[2,5,10],ne=[1,2,3,6,12],ue=[1,2,5,10,15,30],me=[1,2,3,7,14],Te=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],Ee=[-.301,0,.301,.699,1],Ue=[15,30,45,90,180];function De(Oe,Be,Qe){return Be*y.roundUp(Oe/Be,Qe)}function je(Oe){var Be=Oe.dtick;if(Oe._tickexponent=0,w(Be)||typeof Be=="string"||(Be=1),Oe.type!=="category"&&Oe.type!=="multicategory"||(Oe._tickround=null),Oe.type==="date"){var Qe=Oe.r2l(Oe.tick0),ut=Oe.l2r(Qe).replace(/(^-|i)/g,""),pt=ut.length;if(String(Be).charAt(0)==="M")pt>10||ut.substr(5)!=="01-01"?Oe._tickround="d":Oe._tickround=+Be.substr(1)%12==0?"y":"m";else if(Be>=h&&pt<=10||Be>=15*h)Oe._tickround="d";else if(Be>=C&&pt<=16||Be>=A)Oe._tickround="M";else if(Be>=L&&pt<=19||Be>=C)Oe._tickround="S";else{var bt=Oe.l2r(Qe+Be).replace(/^-/,"").length;Oe._tickround=Math.max(pt,bt)-20,Oe._tickround<0&&(Oe._tickround=4)}}else if(w(Be)||Be.charAt(0)==="L"){var Lt=Oe.range.map(Oe.r2d||Number);w(Be)||(Be=Number(Be.substr(1))),Oe._tickround=2-Math.floor(Math.log(Be)/Math.LN10+.01);var Ct=Math.max(Math.abs(Lt[0]),Math.abs(Lt[1])),mt=Math.floor(Math.log(Ct)/Math.LN10+.01),Ot=Oe.minexponent===void 0?3:Oe.minexponent;Math.abs(mt)>Ot&&(Se(Oe.exponentformat)&&!Ne(mt)?Oe._tickexponent=3*Math.round((mt-1)/3):Oe._tickexponent=mt)}else Oe._tickround=null}function ge(Oe,Be,Qe){var ut=Oe.tickfont||{};return{x:Be,dx:0,dy:0,text:Qe||"",fontSize:ut.size,font:ut.family,fontColor:ut.color}}Y.autoTicks=function(Oe,Be,Qe){var ut;function pt(Pt){return Math.pow(Pt,Math.floor(Math.log(Be)/Math.LN10))}if(Oe.type==="date"){Oe.tick0=y.dateTick0(Oe.calendar,0);var bt=2*Be;if(bt>p)Be/=p,ut=pt(10),Oe.dtick="M"+12*De(Be,ut,Ce);else if(bt>g)Be/=g,Oe.dtick="M"+De(Be,1,ne);else if(bt>h){if(Oe.dtick=De(Be,h,Oe._hasDayOfWeekBreaks?[1,2,7,14]:me),!Qe){var Lt=Y.getTickFormat(Oe),Ct=Oe.ticklabelmode==="period";Ct&&(Oe._rawTick0=Oe.tick0),/%[uVW]/.test(Lt)?Oe.tick0=y.dateTick0(Oe.calendar,2):Oe.tick0=y.dateTick0(Oe.calendar,1),Ct&&(Oe._dowTick0=Oe.tick0)}}else bt>A?Oe.dtick=De(Be,A,ne):bt>C?Oe.dtick=De(Be,C,ue):bt>L?Oe.dtick=De(Be,L,ue):(ut=pt(10),Oe.dtick=De(Be,ut,Ce))}else if(Oe.type==="log"){Oe.tick0=0;var mt=y.simpleMap(Oe.range,Oe.r2l);if(Oe._isMinor&&(Be*=1.5),Be>.7)Oe.dtick=Math.ceil(Be);else if(Math.abs(mt[1]-mt[0])<1){var Ot=1.5*Math.abs((mt[1]-mt[0])/Be);Be=Math.abs(Math.pow(10,mt[1])-Math.pow(10,mt[0]))/Ot,ut=pt(10),Oe.dtick="L"+De(Be,ut,Ce)}else Oe.dtick=Be>.3?"D2":"D1"}else Oe.type==="category"||Oe.type==="multicategory"?(Oe.tick0=0,Oe.dtick=Math.ceil(Math.max(Be,1))):Je(Oe)?(Oe.tick0=0,ut=1,Oe.dtick=De(Be,ut,Ue)):(Oe.tick0=0,ut=pt(10),Oe.dtick=De(Be,ut,Ce));if(Oe.dtick===0&&(Oe.dtick=1),!w(Oe.dtick)&&typeof Oe.dtick!="string"){var _t=Oe.dtick;throw Oe.dtick=1,"ax.dtick error: "+String(_t)}},Y.tickIncrement=function(Oe,Be,Qe,ut){var pt=Qe?-1:1;if(w(Be))return y.increment(Oe,pt*Be);var bt=Be.charAt(0),Lt=pt*Number(Be.substr(1));if(bt==="M")return y.incrementMonth(Oe,Lt,ut);if(bt==="L")return Math.log(Math.pow(10,Oe)+Lt)/Math.LN10;if(bt==="D"){var Ct=Be==="D2"?Ee:Te,mt=Oe+.01*pt,Ot=y.roundUp(y.mod(mt,1),Ct,Qe);return Math.floor(mt)+Math.log(_.round(Math.pow(10,Ot),1))/Math.LN10}throw"unrecognized dtick "+String(Be)},Y.tickFirst=function(Oe,Be){var Qe=Oe.r2l||Number,ut=y.simpleMap(Oe.range,Qe,void 0,void 0,Be),pt=ut[1] ")}else Kt._prevDateHead=wn,on+="
"+wn;nn.text=on}(Oe,bt,Qe,Ct):mt==="log"?function(Kt,nn,yn,ln,kn){var Wn=Kt.dtick,wn=nn.x,on=Kt.tickformat,_n=typeof Wn=="string"&&Wn.charAt(0);if(kn==="never"&&(kn=""),ln&&_n!=="L"&&(Wn="L3",_n="L"),on||_n==="L")nn.text=Ye(Math.pow(10,wn),Kt,kn,ln);else if(w(Wn)||_n==="D"&&y.mod(wn+.01,1)<.1){var fn=Math.round(wn),hn=Math.abs(fn),In=Kt.exponentformat;In==="power"||Se(In)&&Ne(fn)?(nn.text=fn===0?1:fn===1?"10":"10"+(fn>1?"":O)+hn+"",nn.fontSize*=1.25):(In==="e"||In==="E")&&hn>2?nn.text="1"+In+(fn>0?"+":O)+hn:(nn.text=Ye(Math.pow(10,wn),Kt,"","fakehover"),Wn==="D1"&&Kt._id.charAt(0)==="y"&&(nn.dy-=nn.fontSize/6))}else{if(_n!=="D")throw"unrecognized dtick "+String(Wn);nn.text=String(Math.round(Math.pow(10,y.mod(wn,1)))),nn.fontSize*=.75}if(Kt.dtick==="D1"){var Cn=String(nn.text).charAt(0);Cn!=="0"&&Cn!=="1"||(Kt._id.charAt(0)==="y"?nn.dx-=nn.fontSize/4:(nn.dy+=nn.fontSize/2,nn.dx+=(Kt.range[1]>Kt.range[0]?1:-1)*nn.fontSize*(wn<0?.5:.25)))}}(Oe,bt,0,Ct,Wt):mt==="category"?function(Kt,nn){var yn=Kt._categories[Math.round(nn.x)];yn===void 0&&(yn=""),nn.text=String(yn)}(Oe,bt):mt==="multicategory"?function(Kt,nn,yn){var ln=Math.round(nn.x),kn=Kt._categories[ln]||[],Wn=kn[1]===void 0?"":String(kn[1]),wn=kn[0]===void 0?"":String(kn[0]);yn?nn.text=wn+" - "+Wn:(nn.text=Wn,nn.text2=wn)}(Oe,bt,Qe):Je(Oe)?function(Kt,nn,yn,ln,kn){if(Kt.thetaunit!=="radians"||yn)nn.text=Ye(nn.x,Kt,kn,ln);else{var Wn=nn.x/180;if(Wn===0)nn.text="0";else{var wn=function(_n){function fn(Nn,Hn){return Math.abs(Nn-Hn)<=1e-6}var hn=function(Nn){for(var Hn=1;!fn(Math.round(Nn*Hn)/Hn,Nn);)Hn*=10;return Hn}(_n),In=_n*hn,Cn=Math.abs(function Nn(Hn,qn){return fn(qn,0)?Hn:Nn(qn,Hn%qn)}(In,hn));return[Math.round(In/Cn),Math.round(hn/Cn)]}(Wn);if(wn[1]>=100)nn.text=Ye(y.deg2rad(nn.x),Kt,kn,ln);else{var on=nn.x<0;wn[1]===1?wn[0]===1?nn.text="π":nn.text=wn[0]+"π":nn.text=["",wn[0],"","⁄","",wn[1],"","π"].join(""),on&&(nn.text=O+nn.text)}}}}(Oe,bt,Qe,Ct,Wt):function(Kt,nn,yn,ln,kn){kn==="never"?kn="":Kt.showexponent==="all"&&Math.abs(nn.x/Kt.dtick)<1e-6&&(kn="hide"),nn.text=Ye(nn.x,Kt,kn,ln)}(Oe,bt,0,Ct,Wt),ut||(Oe.tickprefix&&!Bt(Oe.showtickprefix)&&(bt.text=Oe.tickprefix+bt.text),Oe.ticksuffix&&!Bt(Oe.showticksuffix)&&(bt.text+=Oe.ticksuffix)),Oe.labelalias&&Oe.labelalias.hasOwnProperty(bt.text)){var Gt=Oe.labelalias[bt.text];typeof Gt=="string"&&(bt.text=Gt)}if(Oe.tickson==="boundaries"||Oe.showdividers){var Xt=function(Kt){var nn=Oe.l2p(Kt);return nn>=0&&nn<=Oe._length?Kt:null};bt.xbnd=[Xt(bt.x-.5),Xt(bt.x+Oe.dtick-.5)]}return bt},Y.hoverLabelText=function(Oe,Be,Qe){Qe&&(Oe=y.extendFlat({},Oe,{hoverformat:Qe}));var ut=Array.isArray(Be)?Be[0]:Be,pt=Array.isArray(Be)?Be[1]:void 0;if(pt!==void 0&&pt!==ut)return Y.hoverLabelText(Oe,ut,Qe)+" - "+Y.hoverLabelText(Oe,pt,Qe);var bt=Oe.type==="log"&&ut<=0,Lt=Y.tickText(Oe,Oe.c2l(bt?-ut:ut),"hover").text;return bt?ut===0?"0":O+Lt:Lt};var be=["f","p","n","μ","m","","k","M","G","T"];function Se(Oe){return Oe==="SI"||Oe==="B"}function Ne(Oe){return Oe>14||Oe<-15}function Ye(Oe,Be,Qe,ut){var pt=Oe<0,bt=Be._tickround,Lt=Qe||Be.exponentformat||"B",Ct=Be._tickexponent,mt=Y.getTickFormat(Be),Ot=Be.separatethousands;if(ut){var _t={exponentformat:Lt,minexponent:Be.minexponent,dtick:Be.showexponent==="none"?Be.dtick:w(Oe)&&Math.abs(Oe)||1,range:Be.showexponent==="none"?Be.range.map(Be.r2d):[0,Oe||1]};je(_t),bt=(Number(_t._tickround)||0)+4,Ct=_t._tickexponent,Be.hoverformat&&(mt=Be.hoverformat)}if(mt)return Be._numFormat(mt)(Oe).replace(/-/g,O);var Pt,Bt=Math.pow(10,-bt)/2;if(Lt==="none"&&(Ct=0),(Oe=Math.abs(Oe))"+Pt+"":Lt==="B"&&Ct===9?Oe+="B":Se(Lt)&&(Oe+=be[Ct/3+5])),pt?O+Oe:Oe}function Ze(Oe,Be){if(Oe){var Qe=Object.keys(j).reduce(function(ut,pt){return Be.indexOf(pt)!==-1&&j[pt].forEach(function(bt){ut[bt]=1}),ut},{});Object.keys(Oe).forEach(function(ut){Qe[ut]||(ut.length===1?Oe[ut]=0:delete Oe[ut])})}}function st(Oe,Be){for(var Qe=[],ut={},pt=0;pt1&&Qe=pt.min&&Oe=0,nn=_t(Bt,Wt[1])<=0;return(Gt||Kt)&&(Xt||nn)}if(Oe.tickformatstops&&Oe.tickformatstops.length>0)switch(Oe.type){case"date":case"linear":for(Be=0;Be=Lt(pt)))){Qe=ut;break}break;case"log":for(Be=0;Be=0&&pt.unshift(pt.splice(Ot,1).shift())}});var Lt={false:{left:0,right:0}};return y.syncOrAsync(pt.map(function(Ct){return function(){if(Ct){var mt=Y.getFromId(Oe,Ct);Qe||(Qe={}),Qe.axShifts=Lt,Qe.overlayingShiftedAx=bt;var Ot=Y.drawOne(Oe,mt,Qe);return mt._shiftPusher&&ht(mt,mt._fullDepth||0,Lt,!0),mt._r=mt.range.slice(),mt._rl=y.simpleMap(mt._r,mt.r2l),Ot}}}))},Y.drawOne=function(Oe,Be,Qe){var ut,pt,bt,Lt=(Qe=Qe||{}).axShifts||{},Ct=Qe.overlayingShiftedAx||[];Be.setScale();var mt=Oe._fullLayout,Ot=Be._id,_t=Ot.charAt(0),Pt=Y.counterLetter(Ot),Bt=mt._plots[Be._mainSubplot];if(Bt){if(Be._shiftPusher=Be.autoshift||Ct.indexOf(Be._id)!==-1||Ct.indexOf(Be.overlaying)!==-1,Be._shiftPusher&Be.anchor==="free"){var Wt=Be.linewidth/2||0;Be.ticks==="inside"&&(Wt+=Be.ticklen),ht(Be,Wt,Lt,!0),ht(Be,Be.shift||0,Lt,!1)}Qe.skipTitle===!0&&Be._shift!==void 0||(Be._shift=function(Sn,pn){return Sn.autoshift?pn[Sn.overlaying][Sn.side]:Sn.shift||0}(Be,Lt));var Gt=Bt[_t+"axislayer"],Xt=Be._mainLinePosition,Kt=Xt+=Be._shift,nn=Be._mainMirrorPosition,yn=Be._vals=Y.calcTicks(Be),ln=[Be.mirror,Kt,nn].join("_");for(ut=0;ut0?Sn.bottom-Bn:0,Xn))));var er=0,Jn=0;if(Be._shiftPusher&&(er=Math.max(Xn,Sn.height>0?vn==="l"?Bn-Sn.left:Sn.right-Bn:0),Be.title.text!==mt._dfltTitle[_t]&&(Jn=(Be._titleStandoff||0)+(Be._titleScoot||0),vn==="l"&&(Jn+=yt(Be))),Be._fullDepth=Math.max(er,Jn)),Be.automargin){pn={x:0,y:0,r:0,l:0,t:0,b:0};var lr=[0,1],sr=typeof Be._shift=="number"?Be._shift:0;if(_t==="x"){if(vn==="b"?pn[vn]=Be._depth:(pn[vn]=Be._depth=Math.max(Sn.width>0?Bn-Sn.top:0,Xn),lr.reverse()),Sn.width>0){var fr=Sn.right-(Be._offset+Be._length);fr>0&&(pn.xr=1,pn.r=fr);var cr=Be._offset-Sn.left;cr>0&&(pn.xl=0,pn.l=cr)}}else if(vn==="l"?(Be._depth=Math.max(Sn.height>0?Bn-Sn.left:0,Xn),pn[vn]=Be._depth-sr):(Be._depth=Math.max(Sn.height>0?Sn.right-Bn:0,Xn),pn[vn]=Be._depth+sr,lr.reverse()),Sn.height>0){var vr=Sn.bottom-(Be._offset+Be._length);vr>0&&(pn.yb=0,pn.b=vr);var Sr=Be._offset-Sn.top;Sr>0&&(pn.yt=1,pn.t=Sr)}pn[Pt]=Be.anchor==="free"?Be.position:Be._anchorAxis.domain[lr[0]],Be.title.text!==mt._dfltTitle[_t]&&(pn[vn]+=yt(Be)+(Be.title.standoff||0)),Be.mirror&&Be.anchor!=="free"&&((bn={x:0,y:0,r:0,l:0,t:0,b:0})[An]=Be.linewidth,Be.mirror&&Be.mirror!==!0&&(bn[An]+=Xn),Be.mirror===!0||Be.mirror==="ticks"?bn[Pt]=Be._anchorAxis.domain[lr[1]]:Be.mirror!=="all"&&Be.mirror!=="allticks"||(bn[Pt]=[Be._counterDomainMin,Be._counterDomainMax][lr[1]]))}Rn&&(dn=T.getComponentMethod("rangeslider","autoMarginOpts")(Oe,Be)),typeof Be.automargin=="string"&&(Ze(pn,Be.automargin),Ze(bn,Be.automargin)),s.autoMargin(Oe,xt(Be),pn),s.autoMargin(Oe,Dt(Be),bn),s.autoMargin(Oe,It(Be),dn)}),y.syncOrAsync(Jt)}}function On(Sn){var pn=Ot+(Sn||"tick");return kn[pn]||(kn[pn]=function(bn,dn){var vn,An,Bn,Xn;return bn._selections[dn].size()?(vn=1/0,An=-1/0,Bn=1/0,Xn=-1/0,bn._selections[dn].each(function(){var er=Tt(this),Jn=r.bBox(er.node().parentNode);vn=Math.min(vn,Jn.top),An=Math.max(An,Jn.bottom),Bn=Math.min(Bn,Jn.left),Xn=Math.max(Xn,Jn.right)})):(vn=0,An=0,Bn=0,Xn=0),{top:vn,bottom:An,left:Bn,right:Xn,height:An-vn,width:Xn-Bn}}(Be,pn)),kn[pn]}},Y.getTickSigns=function(Oe,Be){var Qe=Oe._id.charAt(0),ut={x:"top",y:"right"}[Qe],pt=Oe.side===ut?1:-1,bt=[-1,1,pt,-pt];return(Be?(Oe.minor||{}).ticks:Oe.ticks)!=="inside"==(Qe==="x")&&(bt=bt.map(function(Lt){return-Lt})),Oe.side&&bt.push({l:-1,t:-1,r:1,b:1}[Oe.side.charAt(0)]),bt},Y.makeTransTickFn=function(Oe){return Oe._id.charAt(0)==="x"?function(Be){return f(Oe._offset+Oe.l2p(Be.x),0)}:function(Be){return f(0,Oe._offset+Oe.l2p(Be.x))}},Y.makeTransTickLabelFn=function(Oe){var Be=function(pt){var bt=pt.ticklabelposition||"",Lt=function(nn){return bt.indexOf(nn)!==-1},Ct=Lt("top"),mt=Lt("left"),Ot=Lt("right"),_t=Lt("bottom"),Pt=Lt("inside"),Bt=_t||mt||Ct||Ot;if(!Bt&&!Pt)return[0,0];var Wt=pt.side,Gt=Bt?(pt.tickwidth||0)/2:0,Xt=3,Kt=pt.tickfont?pt.tickfont.size:12;return(_t||Ct)&&(Gt+=Kt*ee,Xt+=(pt.linewidth||0)/2),(mt||Ot)&&(Gt+=(pt.linewidth||0)/2,Xt+=3),Pt&&Wt==="top"&&(Xt-=Kt*(1-ee)),(mt||Ct)&&(Gt=-Gt),Wt!=="bottom"&&Wt!=="right"||(Xt=-Xt),[Bt?Gt:0,Pt?Xt:0]}(Oe),Qe=Be[0],ut=Be[1];return Oe._id.charAt(0)==="x"?function(pt){return f(Qe+Oe._offset+Oe.l2p(ot(pt)),ut)}:function(pt){return f(ut,Qe+Oe._offset+Oe.l2p(ot(pt)))}},Y.makeTickPath=function(Oe,Be,Qe,ut){ut||(ut={});var pt=ut.minor;if(pt&&!Oe.minor)return"";var bt=ut.len!==void 0?ut.len:pt?Oe.minor.ticklen:Oe.ticklen,Lt=Oe._id.charAt(0),Ct=(Oe.linewidth||1)/2;return Lt==="x"?"M0,"+(Be+Ct*Qe)+"v"+bt*Qe:"M"+(Be+Ct*Qe)+",0h"+bt*Qe},Y.makeLabelFns=function(Oe,Be,Qe){var ut=Oe.ticklabelposition||"",pt=function(In){return ut.indexOf(In)!==-1},bt=pt("top"),Lt=pt("left"),Ct=pt("right"),mt=pt("bottom")||Lt||bt||Ct,Ot=pt("inside"),_t=ut==="inside"&&Oe.ticks==="inside"||!Ot&&Oe.ticks==="outside"&&Oe.tickson!=="boundaries",Pt=0,Bt=0,Wt=_t?Oe.ticklen:0;if(Ot?Wt*=-1:mt&&(Wt=0),_t&&(Pt+=Wt,Qe)){var Gt=y.deg2rad(Qe);Pt=Wt*Math.cos(Gt)+1,Bt=Wt*Math.sin(Gt)}Oe.showticklabels&&(_t||Oe.showline)&&(Pt+=.2*Oe.tickfont.size);var Xt,Kt,nn,yn,ln,kn={labelStandoff:Pt+=(Oe.linewidth||1)/2*(Ot?-1:1),labelShift:Bt},Wn=0,wn=Oe.side,on=Oe._id.charAt(0),_n=Oe.tickangle;if(on==="x")yn=(ln=!Ot&&wn==="bottom"||Ot&&wn==="top")?1:-1,Ot&&(yn*=-1),Xt=Bt*yn,Kt=Be+Pt*yn,nn=ln?1:-.2,Math.abs(_n)===90&&(Ot?nn+=H:nn=_n===-90&&wn==="bottom"?ee:_n===90&&wn==="top"?H:.5,Wn=H/2*(_n/90)),kn.xFn=function(In){return In.dx+Xt+Wn*In.fontSize},kn.yFn=function(In){return In.dy+Kt+In.fontSize*nn},kn.anchorFn=function(In,Cn){if(mt){if(Lt)return"end";if(Ct)return"start"}return w(Cn)&&Cn!==0&&Cn!==180?Cn*yn<0!==Ot?"end":"start":"middle"},kn.heightFn=function(In,Cn,Nn){return Cn<-60||Cn>60?-.5*Nn:Oe.side==="top"!==Ot?-Nn:0};else if(on==="y"){if(yn=(ln=!Ot&&wn==="left"||Ot&&wn==="right")?1:-1,Ot&&(yn*=-1),Xt=Pt,Kt=Bt*yn,nn=0,Ot||Math.abs(_n)!==90||(nn=_n===-90&&wn==="left"||_n===90&&wn==="right"?ee:.5),Ot){var fn=w(_n)?+_n:0;if(fn!==0){var hn=y.deg2rad(fn);Wn=Math.abs(Math.sin(hn))*ee*yn,nn=0}}kn.xFn=function(In){return In.dx+Be-(Xt+In.fontSize*nn)*yn+Wn*In.fontSize},kn.yFn=function(In){return In.dy+Kt+In.fontSize*H},kn.anchorFn=function(In,Cn){return w(Cn)&&Math.abs(Cn)===90?"middle":ln?"end":"start"},kn.heightFn=function(In,Cn,Nn){return Oe.side==="right"&&(Cn*=-1),Cn<-30?-Nn:Cn<30?-.5*Nn:0}}return kn},Y.drawTicks=function(Oe,Be,Qe){Qe=Qe||{};var ut=Be._id+"tick",pt=[].concat(Be.minor&&Be.minor.ticks?Qe.vals.filter(function(Lt){return Lt.minor&&!Lt.noTick}):[]).concat(Be.ticks?Qe.vals.filter(function(Lt){return!Lt.minor&&!Lt.noTick}):[]),bt=Qe.layer.selectAll("path."+ut).data(pt,ft);bt.exit().remove(),bt.enter().append("path").classed(ut,1).classed("ticks",1).classed("crisp",Qe.crisp!==!1).each(function(Lt){return i.stroke(_.select(this),Lt.minor?Be.minor.tickcolor:Be.tickcolor)}).style("stroke-width",function(Lt){return r.crispRound(Oe,Lt.minor?Be.minor.tickwidth:Be.tickwidth,1)+"px"}).attr("d",Qe.path).style("display",null),nt(Be,[G]),bt.attr("transform",Qe.transFn)},Y.drawGrid=function(Oe,Be,Qe){if(Qe=Qe||{},Be.tickmode!=="sync"){var ut=Be._id+"grid",pt=Be.minor&&Be.minor.showgrid,bt=pt?Qe.vals.filter(function(nn){return nn.minor}):[],Lt=Be.showgrid?Qe.vals.filter(function(nn){return!nn.minor}):[],Ct=Qe.counterAxis;if(Ct&&Y.shouldShowZeroLine(Oe,Be,Ct))for(var mt=Be.tickmode==="array",Ot=0;Ot=0;Gt--){var Xt=Gt?Bt:Wt;if(Xt){var Kt=Xt.selectAll("path."+ut).data(Gt?Lt:bt,ft);Kt.exit().remove(),Kt.enter().append("path").classed(ut,1).classed("crisp",Qe.crisp!==!1),Kt.attr("transform",Qe.transFn).attr("d",Qe.path).each(function(nn){return i.stroke(_.select(this),nn.minor?Be.minor.gridcolor:Be.gridcolor||"#ddd")}).style("stroke-dasharray",function(nn){return r.dashStyle(nn.minor?Be.minor.griddash:Be.griddash,nn.minor?Be.minor.gridwidth:Be.gridwidth)}).style("stroke-width",function(nn){return(nn.minor?Pt:Be._gw)+"px"}).style("display",null),typeof Qe.path=="function"&&Kt.attr("d",Qe.path)}}nt(Be,[U,B])}},Y.drawZeroLine=function(Oe,Be,Qe){Qe=Qe||Qe;var ut=Be._id+"zl",pt=Y.shouldShowZeroLine(Oe,Be,Qe.counterAxis),bt=Qe.layer.selectAll("path."+ut).data(pt?[{x:0,id:Be._id}]:[]);bt.exit().remove(),bt.enter().append("path").classed(ut,1).classed("zl",1).classed("crisp",Qe.crisp!==!1).each(function(){Qe.layer.selectAll("path").sort(function(Lt,Ct){return ae(Lt.id,Ct.id)})}),bt.attr("transform",Qe.transFn).attr("d",Qe.path).call(i.stroke,Be.zerolinecolor||i.defaultLine).style("stroke-width",r.crispRound(Oe,Be.zerolinewidth,Be._gw||1)+"px").style("display",null),nt(Be,[R])},Y.drawLabels=function(Oe,Be,Qe){Qe=Qe||{};var ut=Oe._fullLayout,pt=Be._id,bt=pt.charAt(0),Lt=Qe.cls||pt+"tick",Ct=Qe.vals.filter(function(yn){return yn.text}),mt=Qe.labelFns,Ot=Qe.secondary?0:Be.tickangle,_t=(Be._prevTickAngles||{})[Lt],Pt=Qe.layer.selectAll("g."+Lt).data(Be.showticklabels?Ct:[],ft),Bt=[];function Wt(yn,ln){yn.each(function(kn){var Wn=_.select(this),wn=Wn.select(".text-math-group"),on=mt.anchorFn(kn,ln),_n=Qe.transFn.call(Wn.node(),kn)+(w(ln)&&+ln!=0?" rotate("+ln+","+mt.xFn(kn)+","+(mt.yFn(kn)-kn.fontSize/2)+")":""),fn=l.lineCount(Wn),hn=Q*kn.fontSize,In=mt.heightFn(kn,w(ln)?+ln:0,(fn-1)*hn);if(In&&(_n+=f(0,In)),wn.empty()){var Cn=Wn.select("text");Cn.attr({transform:_n,"text-anchor":on}),Cn.style("opacity",1),Be._adjustTickLabelsOverflow&&Be._adjustTickLabelsOverflow()}else{var Nn=r.bBox(wn.node()).width*{end:-.5,start:.5}[on];wn.attr("transform",_n+f(Nn,0))}})}Pt.enter().append("g").classed(Lt,1).append("text").attr("text-anchor","middle").each(function(yn){var ln=_.select(this),kn=Oe._promises.length;ln.call(l.positionText,mt.xFn(yn),mt.yFn(yn)).call(r.font,yn.font,yn.fontSize,yn.fontColor).text(yn.text).call(l.convertToTspans,Oe),Oe._promises[kn]?Bt.push(Oe._promises.pop().then(function(){Wt(ln,Ot)})):Wt(ln,Ot)}),nt(Be,[N]),Pt.exit().remove(),Qe.repositionOnUpdate&&Pt.each(function(yn){_.select(this).select("text").call(l.positionText,mt.xFn(yn),mt.yFn(yn))}),Be._adjustTickLabelsOverflow=function(){var yn=Be.ticklabeloverflow;if(yn&&yn!=="allow"){var ln=yn.indexOf("hide")!==-1,kn=Be._id.charAt(0)==="x",Wn=0,wn=kn?Oe._fullLayout.width:Oe._fullLayout.height;if(yn.indexOf("domain")!==-1){var on=y.simpleMap(Be.range,Be.r2l);Wn=Be.l2p(on[0])+Be._offset,wn=Be.l2p(on[1])+Be._offset}var _n=Math.min(Wn,wn),fn=Math.max(Wn,wn),hn=Be.side,In=1/0,Cn=-1/0;for(var Nn in Pt.each(function(or){var tr=_.select(this);if(tr.select(".text-math-group").empty()){var kr=r.bBox(tr.node()),gr=0;kn?(kr.right>fn||kr.left<_n)&&(gr=1):(kr.bottom>fn||kr.top+(Be.tickangle?0:or.fontSize/4)<_n)&&(gr=1);var ir=tr.select("text");gr?ln&&ir.style("opacity",0):(ir.style("opacity",1),In=hn==="bottom"||hn==="right"?Math.min(In,kn?kr.top:kr.left):-1/0,Cn=hn==="top"||hn==="left"?Math.max(Cn,kn?kr.bottom:kr.right):1/0)}}),ut._plots){var Hn=ut._plots[Nn];if(Be._id===Hn.xaxis._id||Be._id===Hn.yaxis._id){var qn=kn?Hn.yaxis:Hn.xaxis;qn&&(qn["_visibleLabelMin_"+Be._id]=In,qn["_visibleLabelMax_"+Be._id]=Cn)}}}},Be._hideCounterAxisInsideTickLabels=function(yn){var ln=Be._id.charAt(0)==="x",kn=[];for(var Wn in ut._plots){var wn=ut._plots[Wn];Be._id!==wn.xaxis._id&&Be._id!==wn.yaxis._id||kn.push(ln?wn.yaxis:wn.xaxis)}kn.forEach(function(on,_n){on&&Ge(on)&&(yn||[R,B,U,G,N]).forEach(function(fn){var hn=fn.K==="tick"&&fn.L==="text"&&Be.ticklabelmode==="period",In=ut._plots[Be._mainSubplot];(fn.K===R.K?In.zerolinelayer.selectAll("."+Be._id+"zl"):fn.K===B.K?In.minorGridlayer.selectAll("."+Be._id):fn.K===U.K?In.gridlayer.selectAll("."+Be._id):In[Be._id.charAt(0)+"axislayer"]).each(function(){var Cn=_.select(this);fn.L&&(Cn=Cn.selectAll(fn.L)),Cn.each(function(Nn){var Hn=Be.l2p(hn?ot(Nn):Nn.x)+Be._offset,qn=_.select(this);HnBe["_visibleLabelMin_"+on._id]?qn.style("display","none"):fn.K!=="tick"||_n||qn.style("display",null)})})})})},Wt(Pt,_t+1?_t:Ot);var Gt=null;Be._selections&&(Be._selections[Lt]=Pt);var Xt=[function(){return Bt.length&&Promise.all(Bt)}];Be.automargin&&ut._redrawFromAutoMarginCount&&_t===90?(Gt=90,Xt.push(function(){Wt(Pt,_t)})):Xt.push(function(){if(Wt(Pt,Ot),Ct.length&&bt==="x"&&!w(Ot)&&(Be.type!=="log"||String(Be.dtick).charAt(0)!=="D")){Gt=0;var yn,ln=0,kn=[];if(Pt.each(function(tr){ln=Math.max(ln,tr.fontSize);var kr=Be.l2p(tr.x),gr=Tt(this),ir=r.bBox(gr.node());kn.push({top:0,bottom:10,height:10,left:kr-ir.width/2,right:kr+ir.width/2+2,width:ir.width+2})}),Be.tickson!=="boundaries"&&!Be.showdividers||Qe.secondary){var Wn=Ct.length,wn=Math.abs((Ct[Wn-1].x-Ct[0].x)*Be._m)/(Wn-1),on=Be.ticklabelposition||"",_n=function(tr){return on.indexOf(tr)!==-1},fn=_n("top"),hn=_n("left"),In=_n("right"),Cn=_n("bottom")||hn||fn||In?(Be.tickwidth||0)+6:0,Nn=wn<2.5*ln||Be.type==="multicategory"||Be._name==="realaxis";for(yn=0;yn1)for(Ct=1;Ct2*h}(a,n))return"date";var d=o.autotypenumbers!=="strict";return function(v,x){for(var g=v.length,m=i(g),k=0,h=0,M={},A=0;A2*k}(a,d)?"category":function(v,x){for(var g=v.length,m=0;m=2){var h,M,A="";if(k.length===2){for(h=0;h<2;h++)if(M=d(k[h])){A=u;break}}var C=m("pattern",A);if(C===u)for(h=0;h<2;h++)(M=d(k[h]))&&(x.bounds[h]=k[h]=M-1);if(C)for(h=0;h<2;h++)switch(M=k[h],C){case u:if(!_(M)||(M=+M)!==Math.floor(M)||M<0||M>=7)return void(x.enabled=!1);x.bounds[h]=k[h]=M;break;case p:if(!_(M)||(M=+M)<0||M>24)return void(x.enabled=!1);x.bounds[h]=k[h]=M}if(g.autorange===!1){var L=g.range;if(L[0]L[1])return void(x.enabled=!1)}else if(k[0]>L[0]&&k[1]l?1:-1:+(T.substr(1)||1)-+(y.substr(1)||1)},E.ref2id=function(T){return!!/^[xyz]/.test(T)&&T.split(" ")[0]},E.isLinked=function(T,y){return s(y,T._axisMatchGroups)||s(y,T._axisConstraintGroups)}},15258:function(D){D.exports=function(E,e,_,w){if(e.type==="category"){var s,T=E.categoryarray,y=Array.isArray(T)&&T.length>0;y&&(s="array");var f,l=_("categoryorder",s);l==="array"&&(f=_("categoryarray")),y||l!=="array"||(l=e.categoryorder="trace"),l==="trace"?e._initialCategories=[]:l==="array"?e._initialCategories=f.slice():(f=function(t,i){var r,n,o,a=i.dataAttr||t._id.charAt(0),u={};if(i.axData)r=i.axData;else for(r=[],n=0;nv?x.substr(v):g.substr(d))+m:x+g+c*b:m}function u(c,b){for(var d=b._size,v=d.h/d.w,x={},g=Object.keys(c),m=0;ml*O)||B){for(d=0;dK&&seX&&(X=se);h/=(X-Q)/(2*Y),Q=g.l2r(Q),X=g.l2r(X),g.range=g._input.range=V=0?Math.min(se,.9):1/(1/Math.max(se,-.3)+3.222))}function V(se,fe,ye,pe,de){return se.append("path").attr("class","zoombox").style({fill:fe>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",l(ye,pe)).attr("d",de+"Z")}function H(se,fe,ye){return se.append("path").attr("class","zoombox-corners").style({fill:i.background,stroke:i.defaultLine,"stroke-width":1,opacity:0}).attr("transform",l(fe,ye)).attr("d","M0,0Z")}function ee(se,fe,ye,pe,de,he){se.attr("d",pe+"M"+ye.l+","+ye.t+"v"+ye.h+"h"+ye.w+"v-"+ye.h+"h-"+ye.w+"Z"),Q(se,fe,de,he)}function Q(se,fe,ye,pe){ye||(se.transition().style("fill",pe>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),fe.transition().style("opacity",1).duration(200))}function X(se){_.select(se).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function Y(se){I&&se.data&&se._context.showTips&&(w.notifier(w._(se,"Double-click to zoom back out"),"long"),I=!1)}function K(se){var fe=Math.floor(Math.min(se.b-se.t,se.r-se.l,O)/2);return"M"+(se.l-3.5)+","+(se.t-.5+fe)+"h3v"+-fe+"h"+fe+"v-3h-"+(fe+3)+"ZM"+(se.r+3.5)+","+(se.t-.5+fe)+"h-3v"+-fe+"h"+-fe+"v-3h"+(fe+3)+"ZM"+(se.r+3.5)+","+(se.b+.5-fe)+"h-3v"+fe+"h"+-fe+"v3h"+(fe+3)+"ZM"+(se.l-3.5)+","+(se.b+.5-fe)+"h3v"+fe+"h"+fe+"v3h-"+(fe+3)+"Z"}function te(se,fe,ye,pe,de){for(var he,xe,Re,we,Ae=!1,Me={},Ce={},ne=(de||{}).xaHash,ue=(de||{}).yaHash,me=0;me=0)fn._fullLayout._deactivateShape(fn);else{var hn=fn._fullLayout.clickmode;if(X(fn),on!==2||Dt||nn(),xt)hn.indexOf("select")>-1&&M(_n,fn,ne,ue,fe.id,pt),hn.indexOf("event")>-1&&n.click(fn,_n,fe.id);else if(on===1&&Dt){var In=xe?Ae:we,Cn=xe==="s"||Re==="w"?0:1,Nn=In._name+".range["+Cn+"]",Hn=function(tr,kr){var gr,ir=tr.range[kr],dr=Math.abs(ir-tr.range[1-kr]);return tr.type==="date"?ir:tr.type==="log"?(gr=Math.ceil(Math.max(0,-Math.log(dr)/Math.LN10))+3,s("."+gr+"g")(Math.pow(10,ir))):(gr=Math.floor(Math.log(Math.abs(ir))/Math.LN10)-Math.floor(Math.log(dr)/Math.LN10)+4,s("."+String(gr)+"g")(ir))}(In,Cn),qn="left",or="middle";if(In.fixedrange)return;xe?(or=xe==="n"?"top":"bottom",In.side==="right"&&(qn="right")):Re==="e"&&(qn="right"),fn._context.showAxisRangeEntryBoxes&&_.select(qt).call(t.makeEditable,{gd:fn,immediate:!0,background:fn._fullLayout.paper_bgcolor,text:String(Hn),fill:In.tickfont?In.tickfont.color:"#444",horizontalAlign:qn,verticalAlign:or}).on("edit",function(tr){var kr=In.d2r(tr);kr!==void 0&&f.call("_guiRelayout",fn,Nn,kr)})}}}function Ct(on,_n){if(se._transitioningWithDuration)return!1;var fn=Math.max(0,Math.min(Ee,yt*on+Nt)),hn=Math.max(0,Math.min(Ue,Et*_n+Je)),In=Math.abs(fn-Nt),Cn=Math.abs(hn-Je);function Nn(){Oe="",Ke.r=Ke.l,Ke.t=Ke.b,Qe.attr("d","M0,0Z")}if(Ke.l=Math.min(Nt,fn),Ke.r=Math.max(Nt,fn),Ke.t=Math.min(Je,hn),Ke.b=Math.max(Je,hn),De.isSubplotConstrained)In>O||Cn>O?(Oe="xy",In/Ee>Cn/Ue?(Cn=In*Ue/Ee,Je>hn?Ke.t=Je-Cn:Ke.b=Je+Cn):(In=Cn*Ee/Ue,Nt>fn?Ke.l=Nt-In:Ke.r=Nt+In),Qe.attr("d",K(Ke))):Nn();else if(je.isSubplotConstrained)if(In>O||Cn>O){Oe="xy";var Hn=Math.min(Ke.l/Ee,(Ue-Ke.b)/Ue),qn=Math.max(Ke.r/Ee,(Ue-Ke.t)/Ue);Ke.l=Hn*Ee,Ke.r=qn*Ee,Ke.b=(1-Hn)*Ue,Ke.t=(1-qn)*Ue,Qe.attr("d",K(Ke))}else Nn();else!be||Cn0){var or;if(je.isSubplotConstrained||!ge&&be.length===1){for(or=0;org[1]-.000244140625&&(T.domain=t),w.noneOrAll(s.domain,T.domain,t),T.tickmode==="sync"&&(T.tickmode="auto")}return y("layer"),T}},89426:function(D,E,e){var _=e(59652);D.exports=function(w,s,T,y,f){f||(f={});var l=f.tickSuffixDflt,t=_(w);T("tickprefix")&&T("showtickprefix",t),T("ticksuffix",l)&&T("showticksuffix",t)}},42449:function(D,E,e){var _=e(18783).FROM_BL;D.exports=function(w,s,T){T===void 0&&(T=_[w.constraintoward||"center"]);var y=[w.r2l(w.range[0]),w.r2l(w.range[1])],f=y[0]+(y[1]-y[0])*T;w.range=w._input.range=[w.l2r(f+(y[0]-f)*s),w.l2r(f+(y[1]-f)*s)],w.setScale()}},21994:function(D,E,e){var _=e(39898),w=e(84096).g0,s=e(71828),T=s.numberFormat,y=e(92770),f=s.cleanNumber,l=s.ms2DateTime,t=s.dateTime2ms,i=s.ensureNumber,r=s.isArrayOrTypedArray,n=e(50606),o=n.FP_SAFE,a=n.BADNUM,u=n.LOG_CLIP,p=n.ONEWEEK,c=n.ONEDAY,b=n.ONEHOUR,d=n.ONEMIN,v=n.ONESEC,x=e(41675),g=e(85555),m=g.HOUR_PATTERN,k=g.WEEKDAY_PATTERN;function h(A){return Math.pow(10,A)}function M(A){return A!=null}D.exports=function(A,C){C=C||{};var L=A._id||"x",O=L.charAt(0);function I(te,ae){if(te>0)return Math.log(te)/Math.LN10;if(te<=0&&ae&&A.range&&A.range.length===2){var oe=A.range[0],se=A.range[1];return .5*(oe+se-2*u*Math.abs(oe-se))}return a}function R(te,ae,oe,se){if((se||{}).msUTC&&y(te))return+te;var fe=t(te,oe||A.calendar);if(fe===a){if(!y(te))return a;te=+te;var ye=Math.floor(10*s.mod(te+.05,1)),pe=Math.round(te-ye/10);fe=t(new Date(pe))+ye/10}return fe}function U(te,ae,oe){return l(te,ae,oe||A.calendar)}function B(te){return A._categories[Math.round(te)]}function G(te){if(M(te)){if(A._categoriesMap===void 0&&(A._categoriesMap={}),A._categoriesMap[te]!==void 0)return A._categoriesMap[te];A._categories.push(typeof te=="number"?String(te):te);var ae=A._categories.length-1;return A._categoriesMap[te]=ae,ae}return a}function N(te){if(A._categoriesMap)return A._categoriesMap[te]}function j(te){var ae=N(te);return ae!==void 0?ae:y(te)?+te:void 0}function V(te){return y(te)?+te:N(te)}function H(te,ae,oe){return _.round(oe+ae*te,2)}function ee(te,ae,oe){return(te-oe)/ae}var Q=function(te){return y(te)?H(te,A._m,A._b):a},X=function(te){return ee(te,A._m,A._b)};if(A.rangebreaks){var Y=O==="y";Q=function(te){if(!y(te))return a;var ae=A._rangebreaks.length;if(!ae)return H(te,A._m,A._b);var oe=Y;A.range[0]>A.range[1]&&(oe=!oe);for(var se=oe?-1:1,fe=se*te,ye=0,pe=0;pehe)){ye=fe<(de+he)/2?pe:pe+1;break}ye=pe+1}var xe=A._B[ye]||0;return isFinite(xe)?H(te,A._m2,xe):0},X=function(te){var ae=A._rangebreaks.length;if(!ae)return ee(te,A._m,A._b);for(var oe=0,se=0;seA._rangebreaks[se].pmax&&(oe=se+1);return ee(te,A._m2,A._B[oe])}}A.c2l=A.type==="log"?I:i,A.l2c=A.type==="log"?h:i,A.l2p=Q,A.p2l=X,A.c2p=A.type==="log"?function(te,ae){return Q(I(te,ae))}:Q,A.p2c=A.type==="log"?function(te){return h(X(te))}:X,["linear","-"].indexOf(A.type)!==-1?(A.d2r=A.r2d=A.d2c=A.r2c=A.d2l=A.r2l=f,A.c2d=A.c2r=A.l2d=A.l2r=i,A.d2p=A.r2p=function(te){return A.l2p(f(te))},A.p2d=A.p2r=X,A.cleanPos=i):A.type==="log"?(A.d2r=A.d2l=function(te,ae){return I(f(te),ae)},A.r2d=A.r2c=function(te){return h(f(te))},A.d2c=A.r2l=f,A.c2d=A.l2r=i,A.c2r=I,A.l2d=h,A.d2p=function(te,ae){return A.l2p(A.d2r(te,ae))},A.p2d=function(te){return h(X(te))},A.r2p=function(te){return A.l2p(f(te))},A.p2r=X,A.cleanPos=i):A.type==="date"?(A.d2r=A.r2d=s.identity,A.d2c=A.r2c=A.d2l=A.r2l=R,A.c2d=A.c2r=A.l2d=A.l2r=U,A.d2p=A.r2p=function(te,ae,oe){return A.l2p(R(te,0,oe))},A.p2d=A.p2r=function(te,ae,oe){return U(X(te),ae,oe)},A.cleanPos=function(te){return s.cleanDate(te,a,A.calendar)}):A.type==="category"?(A.d2c=A.d2l=G,A.r2d=A.c2d=A.l2d=B,A.d2r=A.d2l_noadd=j,A.r2c=function(te){var ae=V(te);return ae!==void 0?ae:A.fraction2r(.5)},A.l2r=A.c2r=i,A.r2l=V,A.d2p=function(te){return A.l2p(A.r2c(te))},A.p2d=function(te){return B(X(te))},A.r2p=A.d2p,A.p2r=X,A.cleanPos=function(te){return typeof te=="string"&&te!==""?te:i(te)}):A.type==="multicategory"&&(A.r2d=A.c2d=A.l2d=B,A.d2r=A.d2l_noadd=j,A.r2c=function(te){var ae=j(te);return ae!==void 0?ae:A.fraction2r(.5)},A.r2c_just_indices=N,A.l2r=A.c2r=i,A.r2l=j,A.d2p=function(te){return A.l2p(A.r2c(te))},A.p2d=function(te){return B(X(te))},A.r2p=A.d2p,A.p2r=X,A.cleanPos=function(te){return Array.isArray(te)||typeof te=="string"&&te!==""?te:i(te)},A.setupMultiCategory=function(te){var ae,oe,se=A._traceIndices,fe=A._matchGroup;if(fe&&A._categories.length===0){for(var ye in fe)if(ye!==L){var pe=C[x.id2name(ye)];se=se.concat(pe._traceIndices)}}var de=[[0,{}],[0,{}]],he=[];for(ae=0;aeo&&(fe[oe]=o),fe[0]===fe[1]){var pe=Math.max(1,Math.abs(1e-6*fe[0]));fe[0]-=pe,fe[1]+=pe}}else s.nestedProperty(A,te).set(se)},A.setScale=function(te){var ae=C._size;if(A.overlaying){var oe=x.getFromId({_fullLayout:C},A.overlaying);A.domain=oe.domain}var se=te&&A._r?"_r":"range",fe=A.calendar;A.cleanRange(se);var ye,pe,de=A.r2l(A[se][0],fe),he=A.r2l(A[se][1],fe),xe=O==="y";if(xe?(A._offset=ae.t+(1-A.domain[1])*ae.h,A._length=ae.h*(A.domain[1]-A.domain[0]),A._m=A._length/(de-he),A._b=-A._m*he):(A._offset=ae.l+A.domain[0]*ae.w,A._length=ae.w*(A.domain[1]-A.domain[0]),A._m=A._length/(he-de),A._b=-A._m*de),A._rangebreaks=[],A._lBreaks=0,A._m2=0,A._B=[],A.rangebreaks&&(A._rangebreaks=A.locateBreaks(Math.min(de,he),Math.max(de,he)),A._rangebreaks.length)){for(ye=0;yehe&&(Re=!Re),Re&&A._rangebreaks.reverse();var we=Re?-1:1;for(A._m2=we*A._length/(Math.abs(he-de)-A._lBreaks),A._B.push(-A._m2*(xe?he:de)),ye=0;yese&&(se+=7,fese&&(se+=24,fe=oe&&fe=oe&&te=je.min&&(Teje.max&&(je.max=Ee),Ue=!1)}Ue&&pe.push({min:Te,max:Ee})}};for(oe=0;oet.duration?(function(){for(var m={},k=0;k rect").call(T.setTranslate,0,0).call(T.setScale,1,1),d.plot.call(T.setTranslate,v._offset,x._offset).call(T.setScale,1,1);var g=d.plot.selectAll(".scatterlayer .trace");g.selectAll(".point").call(T.setPointGroupScale,1,1),g.selectAll(".textpoint").call(T.setTextPointsScale,1,1),g.call(T.hideOutsideRangePoints,d)}function b(d,v){var x=d.plotinfo,g=x.xaxis,m=x.yaxis,k=g._length,h=m._length,M=!!d.xr1,A=!!d.yr1,C=[];if(M){var L=s.simpleMap(d.xr0,g.r2l),O=s.simpleMap(d.xr1,g.r2l),I=L[1]-L[0],R=O[1]-O[0];C[0]=(L[0]*(1-v)+v*O[0]-L[0])/(L[1]-L[0])*k,C[2]=k*(1-v+v*R/I),g.range[0]=g.l2r(L[0]*(1-v)+v*O[0]),g.range[1]=g.l2r(L[1]*(1-v)+v*O[1])}else C[0]=0,C[2]=k;if(A){var U=s.simpleMap(d.yr0,m.r2l),B=s.simpleMap(d.yr1,m.r2l),G=U[1]-U[0],N=B[1]-B[0];C[1]=(U[1]*(1-v)+v*B[1]-U[1])/(U[0]-U[1])*h,C[3]=h*(1-v+v*N/G),m.range[0]=g.l2r(U[0]*(1-v)+v*B[0]),m.range[1]=m.l2r(U[1]*(1-v)+v*B[1])}else C[1]=0,C[3]=h;y.drawOne(f,g,{skipTitle:!0}),y.drawOne(f,m,{skipTitle:!0}),y.redrawComponents(f,[g._id,m._id]);var j=M?k/C[2]:1,V=A?h/C[3]:1,H=M?C[0]:0,ee=A?C[1]:0,Q=M?C[0]/C[2]*k:0,X=A?C[1]/C[3]*h:0,Y=g._offset-Q,K=m._offset-X;x.clipRect.call(T.setTranslate,H,ee).call(T.setScale,1/j,1/V),x.plot.call(T.setTranslate,Y,K).call(T.setScale,j,V),T.setPointGroupScale(x.zoomScalePts,1/j,1/V),T.setTextPointsScale(x.zoomScaleTxt,1/j,1/V)}y.redrawComponents(f)}},951:function(D,E,e){var _=e(73972).traceIs,w=e(4322);function s(y){return{v:"x",h:"y"}[y.orientation||"v"]}function T(y,f){var l=s(y),t=_(y,"box-violin"),i=_(y._fullInput||{},"candlestick");return t&&!i&&f===l&&y[l]===void 0&&y[l+"0"]===void 0}D.exports=function(y,f,l,t){l("autotypenumbers",t.autotypenumbersDflt),l("type",(t.splomStash||{}).type)==="-"&&(function(i,r){if(i.type==="-"){var n,o=i._id,a=o.charAt(0);o.indexOf("scene")!==-1&&(o=a);var u=function(m,k,h){for(var M=0;M0&&(A["_"+h+"axes"]||{})[k]||(A[h+"axis"]||h)===k&&(T(A,h)||(A[h]||[]).length||A[h+"0"]))return A}}(r,o,a);if(u)if(u.type!=="histogram"||a!=={v:"y",h:"x"}[u.orientation||"v"]){var p=a+"calendar",c=u[p],b={noMultiCategory:!_(u,"cartesian")||_(u,"noMultiCategory")};if(u.type==="box"&&u._hasPreCompStats&&a==={h:"x",v:"y"}[u.orientation||"v"]&&(b.noMultiCategory=!0),b.autotypenumbers=i.autotypenumbers,T(u,a)){var d=s(u),v=[];for(n=0;n0?".":"")+n;w.isPlainObject(o)?f(o,t,a,r+1):t(a,n,o)}})}E.manageCommandObserver=function(l,t,i,r){var n={},o=!0;t&&t._commandObserver&&(n=t._commandObserver),n.cache||(n.cache={}),n.lookupTable={};var a=E.hasSimpleAPICommandBindings(l,i,n.lookupTable);if(t&&t._commandObserver){if(a)return n;if(t._commandObserver.remove)return t._commandObserver.remove(),t._commandObserver=null,n}if(a){s(l,a,n.cache),n.check=function(){if(o){var c=s(l,a,n.cache);return c.changed&&r&&n.lookupTable[c.value]!==void 0&&(n.disable(),Promise.resolve(r({value:c.value,type:a.type,prop:a.prop,traces:a.traces,index:n.lookupTable[c.value]})).then(n.enable,n.enable)),c.changed}};for(var u=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],p=0;p0&&R<0&&(R+=360);var G=(R-I)/4;return{type:"Polygon",coordinates:[[[I,U],[I,B],[I+G,B],[I+2*G,B],[I+3*G,B],[R,B],[R,U],[R-G,U],[R-2*G,U],[R-3*G,U],[I,U]]]}}D.exports=function(C){return new h(C)},M.plot=function(C,L,O,I){var R=this;if(I)return R.update(C,L,!0);R._geoCalcData=C,R._fullLayout=L;var U=L[this.id],B=[],G=!1;for(var N in x.layerNameToAdjective)if(N!=="frame"&&U["show"+N]){G=!0;break}for(var j=!1,V=0;V0&&B._module.calcGeoJSON(U,L)}if(!O){if(this.updateProjection(C,L))return;this.viewInitial&&this.scope===I.scope||this.saveViewInitial(I)}this.scope=I.scope,this.updateBaseLayers(L,I),this.updateDims(L,I),this.updateFx(L,I),o.generalUpdatePerTraceModule(this.graphDiv,this,C,I);var G=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=G.selectAll(".point"),this.dataPoints.text=G.selectAll("text"),this.dataPaths.line=G.selectAll(".js-line");var N=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=N.selectAll("path"),this._render()},M.updateProjection=function(C,L){var O=this.graphDiv,I=L[this.id],R=L._size,U=I.domain,B=I.projection,G=I.lonaxis,N=I.lataxis,j=G._ax,V=N._ax,H=this.projection=function(Ce){var ne=Ce.projection,ue=ne.type,me=x.projNames[ue];me="geo"+l.titleCase(me);for(var Te=(w[me]||y[me])(),Ee=Ce._isSatellite?180*Math.acos(1/ne.distance)/Math.PI:Ce._isClipped?x.lonaxisSpan[ue]/2:null,Ue=["center","rotate","parallels","clipExtent"],De=function(be){return be?Te:[]},je=0;jeEe*Math.PI/180}return!1},Te.getPath=function(){return s().projection(Te)},Te.getBounds=function(be){return Te.getPath().bounds(be)},Te.precision(x.precision),Ce._isSatellite&&Te.tilt(ne.tilt).distance(ne.distance),Ee&&Te.clipAngle(Ee-x.clipPad),Te}(I),ee=[[R.l+R.w*U.x[0],R.t+R.h*(1-U.y[1])],[R.l+R.w*U.x[1],R.t+R.h*(1-U.y[0])]],Q=I.center||{},X=B.rotation||{},Y=G.range||[],K=N.range||[];if(I.fitbounds){j._length=ee[1][0]-ee[0][0],V._length=ee[1][1]-ee[0][1],j.range=u(O,j),V.range=u(O,V);var te=(j.range[0]+j.range[1])/2,ae=(V.range[0]+V.range[1])/2;if(I._isScoped)Q={lon:te,lat:ae};else if(I._isClipped){Q={lon:te,lat:ae},X={lon:te,lat:ae,roll:X.roll};var oe=B.type,se=x.lonaxisSpan[oe]/2||180,fe=x.lataxisSpan[oe]/2||90;Y=[te-se,te+se],K=[ae-fe,ae+fe]}else Q={lon:te,lat:ae},X={lon:te,lat:X.lat,roll:X.roll}}H.center([Q.lon-X.lon,Q.lat-X.lat]).rotate([-X.lon,-X.lat,X.roll]).parallels(B.parallels);var ye=A(Y,K);H.fitExtent(ee,ye);var pe=this.bounds=H.getBounds(ye),de=this.fitScale=H.scale(),he=H.translate();if(I.fitbounds){var xe=H.getBounds(A(j.range,V.range)),Re=Math.min((pe[1][0]-pe[0][0])/(xe[1][0]-xe[0][0]),(pe[1][1]-pe[0][1])/(xe[1][1]-xe[0][1]));isFinite(Re)?H.scale(Re*de):l.warn("Something went wrong during"+this.id+"fitbounds computations.")}else H.scale(B.scale*de);var we=this.midPt=[(pe[0][0]+pe[1][0])/2,(pe[0][1]+pe[1][1])/2];if(H.translate([he[0]+(we[0]-he[0]),he[1]+(we[1]-he[1])]).clipExtent(pe),I._isAlbersUsa){var Ae=H([Q.lon,Q.lat]),Me=H.translate();H.translate([Me[0]-(Ae[0]-Me[0]),Me[1]-(Ae[1]-Me[1])])}},M.updateBaseLayers=function(C,L){var O=this,I=O.topojson,R=O.layers,U=O.basePaths;function B(H){return H==="lonaxis"||H==="lataxis"}function G(H){return!!x.lineLayers[H]}function N(H){return!!x.fillLayers[H]}var j=(this.hasChoropleth?x.layersForChoropleth:x.layers).filter(function(H){return G(H)||N(H)?L["show"+H]:!B(H)||L[H].showgrid}),V=O.framework.selectAll(".layer").data(j,String);V.exit().each(function(H){delete R[H],delete U[H],_.select(this).remove()}),V.enter().append("g").attr("class",function(H){return"layer "+H}).each(function(H){var ee=R[H]=_.select(this);H==="bg"?O.bgRect=ee.append("rect").style("pointer-events","all"):B(H)?U[H]=ee.append("path").style("fill","none"):H==="backplot"?ee.append("g").classed("choroplethlayer",!0):H==="frontplot"?ee.append("g").classed("scatterlayer",!0):G(H)?U[H]=ee.append("path").style("fill","none").style("stroke-miterlimit",2):N(H)&&(U[H]=ee.append("path").style("stroke","none"))}),V.order(),V.each(function(H){var ee=U[H],Q=x.layerNameToAdjective[H];H==="frame"?ee.datum(x.sphereSVG):G(H)||N(H)?ee.datum(k(I,I.objects[H])):B(H)&&ee.datum(function(X,Y,K){var te,ae,oe,se=Y[X],fe=x.scopeDefaults[Y.scope];X==="lonaxis"?(te=fe.lonaxisRange,ae=fe.lataxisRange,oe=function(Me,Ce){return[Me,Ce]}):X==="lataxis"&&(te=fe.lataxisRange,ae=fe.lonaxisRange,oe=function(Me,Ce){return[Ce,Me]});var ye={type:"linear",range:[te[0],te[1]-1e-6],tick0:se.tick0,dtick:se.dtick};a.setConvert(ye,K);var pe=a.calcTicks(ye);Y.isScoped||X!=="lonaxis"||pe.pop();for(var de=pe.length,he=new Array(de),xe=0;xe-1&&d(_.event,I,[O.xaxis],[O.yaxis],O.id,G),B.indexOf("event")>-1&&n.click(I,_.event))})}function N(j){return O.projection.invert([j[0]+O.xaxis._offset,j[1]+O.yaxis._offset])}},M.makeFramework=function(){var C=this,L=C.graphDiv,O=L._fullLayout,I="clip"+O._uid+C.id;C.clipDef=O._clips.append("clipPath").attr("id",I),C.clipRect=C.clipDef.append("rect"),C.framework=_.select(C.container).append("g").attr("class","geo "+C.id).call(r.setClipUrl,I,L),C.project=function(R){var U=C.projection(R);return U?[U[0]-C.xaxis._offset,U[1]-C.yaxis._offset]:[null,null]},C.xaxis={_id:"x",c2p:function(R){return C.project(R)[0]}},C.yaxis={_id:"y",c2p:function(R){return C.project(R)[1]}},C.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},a.setConvert(C.mockAxis,O)},M.saveViewInitial=function(C){var L,O=C.center||{},I=C.projection,R=I.rotation||{};this.viewInitial={fitbounds:C.fitbounds,"projection.scale":I.scale},L=C._isScoped?{"center.lon":O.lon,"center.lat":O.lat}:C._isClipped?{"projection.rotation.lon":R.lon,"projection.rotation.lat":R.lat}:{"center.lon":O.lon,"center.lat":O.lat,"projection.rotation.lon":R.lon},l.extendFlat(this.viewInitial,L)},M.render=function(C){this._hasMarkerAngles&&C?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},M._render=function(){var C,L=this.projection,O=L.getPath();function I(U){var B=L(U.lonlat);return B?t(B[0],B[1]):null}function R(U){return L.isLonLatOverEdges(U.lonlat)?"none":null}for(C in this.basePaths)this.basePaths[C].attr("d",O);for(C in this.dataPaths)this.dataPaths[C].attr("d",function(U){return O(U.geojson)});for(C in this.dataPoints)this.dataPoints[C].attr("display",R).attr("transform",I)}},44622:function(D,E,e){var _=e(27659).AU,w=e(71828).counterRegex,s=e(69082),T="geo",y=w(T),f={};f.geo={valType:"subplotid",dflt:T,editType:"calc"},D.exports={attr:T,name:T,idRoot:T,idRegex:y,attrRegex:y,attributes:f,layoutAttributes:e(77519),supplyLayoutDefaults:e(82161),plot:function(l){for(var t=l._fullLayout,i=l.calcdata,r=t._subplots.geo,n=0;n0&&N<0&&(N+=360);var j,V,H,ee=(G+N)/2;if(!b){var Q=d?p.projRotate:[ee,0,0];j=r("projection.rotation.lon",Q[0]),r("projection.rotation.lat",Q[1]),r("projection.rotation.roll",Q[2]),r("showcoastlines",!d&&k)&&(r("coastlinecolor"),r("coastlinewidth")),r("showocean",!!k&&void 0)&&r("oceancolor")}b?(V=-96.6,H=38.7):(V=d?ee:j,H=(B[0]+B[1])/2),r("center.lon",V),r("center.lat",H),v&&(r("projection.tilt"),r("projection.distance")),x&&r("projection.parallels",p.projParallels||[0,60]),r("projection.scale"),r("showland",!!k&&void 0)&&r("landcolor"),r("showlakes",!!k&&void 0)&&r("lakecolor"),r("showrivers",!!k&&void 0)&&(r("rivercolor"),r("riverwidth")),r("showcountries",d&&u!=="usa"&&k)&&(r("countrycolor"),r("countrywidth")),(u==="usa"||u==="north america"&&a===50)&&(r("showsubunits",k),r("subunitcolor"),r("subunitwidth")),d||r("showframe",k)&&(r("framecolor"),r("framewidth")),r("bgcolor"),r("fitbounds")&&(delete i.projection.scale,d?(delete i.center.lon,delete i.center.lat):g?(delete i.center.lon,delete i.center.lat,delete i.projection.rotation.lon,delete i.projection.rotation.lat,delete i.lonaxis.range,delete i.lataxis.range):(delete i.center.lon,delete i.center.lat,delete i.projection.rotation.lon))}D.exports=function(t,i,r){w(t,i,r,{type:"geo",attributes:y,handleDefaults:l,fullData:r,partition:"y"})}},74455:function(D,E,e){var _=e(39898),w=e(71828),s=e(73972),T=Math.PI/180,y=180/Math.PI,f={cursor:"pointer"},l={cursor:"auto"};function t(k,h){return _.behavior.zoom().translate(h.translate()).scale(h.scale())}function i(k,h,M){var A=k.id,C=k.graphDiv,L=C.layout,O=L[A],I=C._fullLayout,R=I[A],U={},B={};function G(N,j){U[A+"."+N]=w.nestedProperty(O,N).get(),s.call("_storeDirectGUIEdit",L,I._preGUI,U);var V=w.nestedProperty(R,N);V.get()!==j&&(V.set(j),w.nestedProperty(O,N).set(j),B[A+"."+N]=j)}M(G),G("projection.scale",h.scale()/k.fitScale),G("fitbounds",!1),C.emit("plotly_relayout",B)}function r(k,h){var M=t(0,h);function A(C){var L=h.invert(k.midPt);C("center.lon",L[0]),C("center.lat",L[1])}return M.on("zoomstart",function(){_.select(this).style(f)}).on("zoom",function(){h.scale(_.event.scale).translate(_.event.translate),k.render(!0);var C=h.invert(k.midPt);k.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":h.scale()/k.fitScale,"geo.center.lon":C[0],"geo.center.lat":C[1]})}).on("zoomend",function(){_.select(this).style(l),i(k,h,A)}),M}function n(k,h){var M,A,C,L,O,I,R,U,B,G=t(0,h);function N(V){return h.invert(V)}function j(V){var H=h.rotate(),ee=h.invert(k.midPt);V("projection.rotation.lon",-H[0]),V("center.lon",ee[0]),V("center.lat",ee[1])}return G.on("zoomstart",function(){_.select(this).style(f),M=_.mouse(this),A=h.rotate(),C=h.translate(),L=A,O=N(M)}).on("zoom",function(){if(I=_.mouse(this),function(ee){var Q=N(ee);if(!Q)return!0;var X=h(Q);return Math.abs(X[0]-ee[0])>2||Math.abs(X[1]-ee[1])>2}(M))return G.scale(h.scale()),void G.translate(h.translate());h.scale(_.event.scale),h.translate([C[0],_.event.translate[1]]),O?N(I)&&(U=N(I),R=[L[0]+(U[0]-O[0]),A[1],A[2]],h.rotate(R),L=R):O=N(M=I),B=!0,k.render(!0);var V=h.rotate(),H=h.invert(k.midPt);k.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":h.scale()/k.fitScale,"geo.center.lon":H[0],"geo.center.lat":H[1],"geo.projection.rotation.lon":-V[0]})}).on("zoomend",function(){_.select(this).style(l),B&&i(k,h,j)}),G}function o(k,h){var M;h.rotate(),h.scale();var A=t(0,h),C=function(G){for(var N=0,j=arguments.length,V=[];++Nj?(L=(B>0?90:-90)-N,C=0):(L=Math.asin(B/j)*y-N,C=Math.sqrt(j*j-B*B));var V=180-L-2*N,H=(Math.atan2(G,U)-Math.atan2(R,C))*y,ee=(Math.atan2(G,U)-Math.atan2(R,-C))*y;return d(M[0],M[1],L,H)<=d(M[0],M[1],V,ee)?[L,H,M[2]]:[V,ee,M[2]]}function d(k,h,M,A){var C=v(M-k),L=v(A-h);return Math.sqrt(C*C+L*L)}function v(k){return(k%360+540)%360-180}function x(k,h,M){var A=M*T,C=k.slice(),L=h===0?1:0,O=h===2?1:2,I=Math.cos(A),R=Math.sin(A);return C[L]=k[L]*I-k[O]*R,C[O]=k[O]*I+k[L]*R,C}function g(k){return[Math.atan2(2*(k[0]*k[1]+k[2]*k[3]),1-2*(k[1]*k[1]+k[2]*k[2]))*y,Math.asin(Math.max(-1,Math.min(1,2*(k[0]*k[2]-k[3]*k[1]))))*y,Math.atan2(2*(k[0]*k[3]+k[1]*k[2]),1-2*(k[2]*k[2]+k[3]*k[3]))*y]}function m(k,h){for(var M=0,A=0,C=k.length;AMath.abs(b)?(r.boxEnd[1]=r.boxStart[1]+Math.abs(c)*O*(b>=0?1:-1),r.boxEnd[1]d[3]&&(r.boxEnd[1]=d[3],r.boxEnd[0]=r.boxStart[0]+(d[3]-r.boxStart[1])/Math.abs(O))):(r.boxEnd[0]=r.boxStart[0]+Math.abs(b)/O*(c>=0?1:-1),r.boxEnd[0]d[2]&&(r.boxEnd[0]=d[2],r.boxEnd[1]=r.boxStart[1]+(d[2]-r.boxStart[0])*Math.abs(O)))}}else r.boxEnabled?(c=r.boxStart[0]!==r.boxEnd[0],b=r.boxStart[1]!==r.boxEnd[1],c||b?(c&&(h(0,r.boxStart[0],r.boxEnd[0]),l.xaxis.autorange=!1),b&&(h(1,r.boxStart[1],r.boxEnd[1]),l.yaxis.autorange=!1),l.relayoutCallback()):l.glplot.setDirty(),r.boxEnabled=!1,r.boxInited=!1):r.boxInited&&(r.boxInited=!1);break;case"pan":r.boxEnabled=!1,r.boxInited=!1,a?(r.panning||(r.dragStart[0]=u,r.dragStart[1]=p),Math.abs(r.dragStart[0]-u).999&&(g="turntable"):g="turntable")}else g="turntable";o("dragmode",g),o("hovermode",a.getDfltFromLayout("hovermode"))}D.exports=function(r,n,o){var a=n._basePlotModules.length>1;T(r,n,o,{type:t,attributes:f,handleDefaults:i,fullLayout:n,font:n.font,fullData:o,getDfltFromLayout:function(u){if(!a)return _.validate(r[u],f[u])?r[u]:void 0},autotypenumbersDflt:n.autotypenumbers,paper_bgcolor:n.paper_bgcolor,calendar:n.calendar})}},65500:function(D,E,e){var _=e(77894),w=e(27670).Y,s=e(1426).extendFlat,T=e(71828).counterRegex;function y(f,l,t){return{x:{valType:"number",dflt:f,editType:"camera"},y:{valType:"number",dflt:l,editType:"camera"},z:{valType:"number",dflt:t,editType:"camera"},editType:"camera"}}D.exports={_arrayAttrRegexps:[T("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:s(y(0,0,1),{}),center:s(y(0,0,0),{}),eye:s(y(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:w({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:_,yaxis:_,zaxis:_,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",_deprecated:{cameraposition:{valType:"info_array",editType:"camera"}}}},13133:function(D,E,e){var _=e(78614),w=["xaxis","yaxis","zaxis"];function s(){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]}s.prototype.merge=function(T){for(var y=0;y<3;++y){var f=T[w[y]];f.visible?(this.enabled[y]=f.showspikes,this.colors[y]=_(f.spikecolor),this.drawSides[y]=f.spikesides,this.lineWidth[y]=f.spikethickness):(this.enabled[y]=!1,this.drawSides[y]=!1)}},D.exports=function(T){var y=new s;return y.merge(T),y}},96085:function(D,E,e){D.exports=function(y){for(var f=y.axesOptions,l=y.glplot.axesPixels,t=y.fullSceneLayout,i=[[],[],[]],r=0;r<3;++r){var n=t[s[r]];if(n._length=(l[r].hi-l[r].lo)*l[r].pixelsPerDataUnit/y.dataScale[r],Math.abs(n._length)===1/0||isNaN(n._length))i[r]=[];else{n._input_range=n.range.slice(),n.range[0]=l[r].lo/y.dataScale[r],n.range[1]=l[r].hi/y.dataScale[r],n._m=1/(y.dataScale[r]*l[r].pixelsPerDataUnit),n.range[0]===n.range[1]&&(n.range[0]-=1,n.range[1]+=1);var o=n.tickmode;if(n.tickmode==="auto"){n.tickmode="linear";var a=n.nticks||w.constrain(n._length/40,4,9);_.autoTicks(n,Math.abs(n.range[1]-n.range[0])/a)}for(var u=_.calcTicks(n,{msUTC:!0}),p=0;p/g," "));i[r]=u,n.tickmode=o}}for(f.ticks=i,r=0;r<3;++r)for(T[r]=.5*(y.glplot.bounds[0][r]+y.glplot.bounds[1][r]),p=0;p<2;++p)f.bounds[p][r]=y.glplot.bounds[p][r];y.contourLevels=function(c){for(var b=new Array(3),d=0;d<3;++d){for(var v=c[d],x=new Array(v.length),g=0;gI.deltaY?1.1:.9090909090909091,U=M.glplot.getAspectratio();M.glplot.setAspectratio({x:R*U.x,y:R*U.y,z:R*U.z})}O(M)}},!!l&&{passive:!1}),M.glplot.canvas.addEventListener("mousemove",function(){if(M.fullSceneLayout.dragmode!==!1&&M.camera.mouseListener.buttons!==0){var I=L();M.graphDiv.emit("plotly_relayouting",I)}}),M.staticMode||M.glplot.canvas.addEventListener("webglcontextlost",function(I){A&&A.emit&&A.emit("plotly_webglcontextlost",{event:I,layer:M.id})},!1)),M.glplot.oncontextloss=function(){M.recoverContext()},M.glplot.onrender=function(){M.render()},!0},g.render=function(){var M,A=this,C=A.graphDiv,L=A.svgContainer,O=A.container.getBoundingClientRect();C._fullLayout._calcInverseTransform(C);var I=C._fullLayout._invScaleX,R=C._fullLayout._invScaleY,U=O.width*I,B=O.height*R;L.setAttributeNS(null,"viewBox","0 0 "+U+" "+B),L.setAttributeNS(null,"width",U),L.setAttributeNS(null,"height",B),d(A),A.glplot.axes.update(A.axesOptions);for(var G=Object.keys(A.traces),N=null,j=A.glplot.selection,V=0;V")):M.type==="isosurface"||M.type==="volume"?(K.valueLabel=n.hoverLabelText(A._mockAxis,A._mockAxis.d2l(j.traceCoordinate[3]),M.valuehoverformat),se.push("value: "+K.valueLabel),j.textLabel&&se.push(j.textLabel),Q=se.join("
")):Q=j.textLabel;var fe={x:j.traceCoordinate[0],y:j.traceCoordinate[1],z:j.traceCoordinate[2],data:X._input,fullData:X,curveNumber:X.index,pointNumber:Y};o.appendArrayPointValue(fe,X,Y),M._module.eventData&&(fe=X._module.eventData(fe,j,X,{},Y));var ye={points:[fe]};if(A.fullSceneLayout.hovermode){var pe=[];o.loneHover({trace:X,x:(.5+.5*ee[0]/ee[3])*U,y:(.5-.5*ee[1]/ee[3])*B,xLabel:K.xLabel,yLabel:K.yLabel,zLabel:K.zLabel,text:Q,name:N.name,color:o.castHoverOption(X,Y,"bgcolor")||N.color,borderColor:o.castHoverOption(X,Y,"bordercolor"),fontFamily:o.castHoverOption(X,Y,"font.family"),fontSize:o.castHoverOption(X,Y,"font.size"),fontColor:o.castHoverOption(X,Y,"font.color"),nameLength:o.castHoverOption(X,Y,"namelength"),textAlign:o.castHoverOption(X,Y,"align"),hovertemplate:i.castOption(X,Y,"hovertemplate"),hovertemplateLabels:i.extendFlat({},fe,K),eventData:[fe]},{container:L,gd:C,inOut_bbox:pe}),fe.bbox=pe[0]}j.distance<5&&(j.buttons||v)?C.emit("plotly_click",ye):C.emit("plotly_hover",ye),this.oldEventData=ye}else o.loneUnhover(L),this.oldEventData&&C.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;A.drawAnnotations(A)},g.recoverContext=function(){var M=this;M.glplot.dispose();var A=function(){M.glplot.gl.isContextLost()?requestAnimationFrame(A):M.initializeGLPlot()?M.plot.apply(M,M.plotArgs):i.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(A)};var k=["xaxis","yaxis","zaxis"];function h(M,A,C){for(var L=M.fullSceneLayout,O=0;O<3;O++){var I=k[O],R=I.charAt(0),U=L[I],B=A[R],G=A[R+"calendar"],N=A["_"+R+"length"];if(i.isArrayOrTypedArray(B))for(var j,V=0;V<(N||B.length);V++)if(i.isArrayOrTypedArray(B[V]))for(var H=0;HX[1][R])X[0][R]=-1,X[1][R]=1;else{var he=X[1][R]-X[0][R];X[0][R]-=he/32,X[1][R]+=he/32}if(B.autorange==="reversed"){var xe=X[0][R];X[0][R]=X[1][R],X[1][R]=xe}}else{var Re=B.range;X[0][R]=B.r2l(Re[0]),X[1][R]=B.r2l(Re[1])}X[0][R]===X[1][R]&&(X[0][R]-=1,X[1][R]+=1),Y[R]=X[1][R]-X[0][R],L.glplot.setBounds(R,{min:X[0][R]*H[R],max:X[1][R]*H[R]})}var we=N.aspectmode;if(we==="cube")Q=[1,1,1];else if(we==="manual"){var Ae=N.aspectratio;Q=[Ae.x,Ae.y,Ae.z]}else{if(we!=="auto"&&we!=="data")throw new Error("scene.js aspectRatio was not one of the enumerated types");var Me=[1,1,1];for(R=0;R<3;++R){var Ce=K[G=(B=N[k[R]]).type];Me[R]=Math.pow(Ce.acc,1/Ce.count)/H[R]}Q=we==="data"||Math.max.apply(null,Me)/Math.min.apply(null,Me)<=4?Me:[1,1,1]}N.aspectratio.x=j.aspectratio.x=Q[0],N.aspectratio.y=j.aspectratio.y=Q[1],N.aspectratio.z=j.aspectratio.z=Q[2],L.glplot.setAspectratio(N.aspectratio),L.viewInitial.aspectratio||(L.viewInitial.aspectratio={x:N.aspectratio.x,y:N.aspectratio.y,z:N.aspectratio.z}),L.viewInitial.aspectmode||(L.viewInitial.aspectmode=N.aspectmode);var ne=N.domain||null,ue=A._size||null;if(ne&&ue){var me=L.container.style;me.position="absolute",me.left=ue.l+ne.x[0]*ue.w+"px",me.top=ue.t+(1-ne.y[1])*ue.h+"px",me.width=ue.w*(ne.x[1]-ne.x[0])+"px",me.height=ue.h*(ne.y[1]-ne.y[0])+"px"}L.glplot.redraw()}},g.destroy=function(){var M=this;M.glplot&&(M.camera.mouseListener.enabled=!1,M.container.removeEventListener("wheel",M.camera.wheelListener),M.camera=null,M.glplot.dispose(),M.container.parentNode.removeChild(M.container),M.glplot=null)},g.getCamera=function(){var M,A=this;return A.camera.view.recalcMatrix(A.camera.view.lastT()),{up:{x:(M=A.camera).up[0],y:M.up[1],z:M.up[2]},center:{x:M.center[0],y:M.center[1],z:M.center[2]},eye:{x:M.eye[0],y:M.eye[1],z:M.eye[2]},projection:{type:M._ortho===!0?"orthographic":"perspective"}}},g.setViewport=function(M){var A,C=this,L=M.camera;C.camera.lookAt.apply(this,[[(A=L).eye.x,A.eye.y,A.eye.z],[A.center.x,A.center.y,A.center.z],[A.up.x,A.up.y,A.up.z]]),C.glplot.setAspectratio(M.aspectratio),L.projection.type==="orthographic"!==C.camera._ortho&&(C.glplot.redraw(),C.glplot.clearRGBA(),C.glplot.dispose(),C.initializeGLPlot())},g.isCameraChanged=function(M){var A=this.getCamera(),C=i.nestedProperty(M,this.id+".camera").get();function L(U,B,G,N){var j=["up","center","eye"],V=["x","y","z"];return B[j[G]]&&U[j[G]][V[N]]===B[j[G]][V[N]]}var O=!1;if(C===void 0)O=!0;else{for(var I=0;I<3;I++)for(var R=0;R<3;R++)if(!L(A,C,I,R)){O=!0;break}(!C.projection||A.projection&&A.projection.type!==C.projection.type)&&(O=!0)}return O},g.isAspectChanged=function(M){var A=this.glplot.getAspectratio(),C=i.nestedProperty(M,this.id+".aspectratio").get();return C===void 0||C.x!==A.x||C.y!==A.y||C.z!==A.z},g.saveLayout=function(M){var A,C,L,O,I,R,U=this,B=U.fullLayout,G=U.isCameraChanged(M),N=U.isAspectChanged(M),j=G||N;if(j){var V={};G&&(A=U.getCamera(),L=(C=i.nestedProperty(M,U.id+".camera")).get(),V[U.id+".camera"]=L),N&&(O=U.glplot.getAspectratio(),R=(I=i.nestedProperty(M,U.id+".aspectratio")).get(),V[U.id+".aspectratio"]=R),t.call("_storeDirectGUIEdit",M,B._preGUI,V),G&&(C.set(A),i.nestedProperty(B,U.id+".camera").set(A)),N&&(I.set(O),i.nestedProperty(B,U.id+".aspectratio").set(O),U.glplot.redraw())}return j},g.updateFx=function(M,A){var C=this,L=C.camera;if(L)if(M==="orbit")L.mode="orbit",L.keyBindingMode="rotate";else if(M==="turntable"){L.up=[0,0,1],L.mode="turntable",L.keyBindingMode="rotate";var O=C.graphDiv,I=O._fullLayout,R=C.fullSceneLayout.camera,U=R.up.x,B=R.up.y,G=R.up.z;if(G/Math.sqrt(U*U+B*B+G*G)<.999){var N=C.id+".camera.up",j={x:0,y:0,z:1},V={};V[N]=j;var H=O.layout;t.call("_storeDirectGUIEdit",H,I._preGUI,V),R.up=j,i.nestedProperty(H,N).set(j)}}else L.keyBindingMode=M;C.fullSceneLayout.hovermode=A},g.toImage=function(M){var A=this;M||(M="png"),A.staticMode&&A.container.appendChild(_),A.glplot.redraw();var C=A.glplot.gl,L=C.drawingBufferWidth,O=C.drawingBufferHeight;C.bindFramebuffer(C.FRAMEBUFFER,null);var I=new Uint8Array(L*O*4);C.readPixels(0,0,L,O,C.RGBA,C.UNSIGNED_BYTE,I),function(N,j,V){for(var H=0,ee=V-1;H0)for(var Y=255/X,K=0;K<3;++K)N[Q+K]=Math.min(Y*N[Q+K],255)}}(I,L,O);var R=document.createElement("canvas");R.width=L,R.height=O;var U,B=R.getContext("2d",{willReadFrequently:!0}),G=B.createImageData(L,O);switch(G.data.set(I),B.putImageData(G,0,0),M){case"jpeg":U=R.toDataURL("image/jpeg");break;case"webp":U=R.toDataURL("image/webp");break;default:U=R.toDataURL("image/png")}return A.staticMode&&A.container.removeChild(_),U},g.setConvert=function(){for(var M=0;M<3;M++){var A=this.fullSceneLayout[k[M]];n.setConvert(A,this.fullLayout),A.setScale=i.noop}},g.make4thDimension=function(){var M=this,A=M.graphDiv._fullLayout;M._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},n.setConvert(M._mockAxis,A)},D.exports=x},90060:function(D){D.exports=function(E,e,_,w){w=w||E.length;for(var s=new Array(w),T=0;TOpenStreetMap contributors',s=['© Carto',w].join(" "),T=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),y={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:w,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}]},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}]},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:s,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}]},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:s,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}]},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:T,tiles:["https://stamen-tiles.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}]},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:T,tiles:["https://stamen-tiles.a.ssl.fastly.net/toner/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}]},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),tiles:["https://stamen-tiles.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}]}},f=_(y);D.exports={requiredVersion:"1.10.1",styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:y,styleValuesNonMapbox:f,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install mapbox-gl@1.10.1."].join(` +`+j.year}return L(U,R,G,N)};var I=3*i;E.incrementMonth=function(R,U,B){B=v(B)&&B;var G=f(R,i);if(R=Math.round(R-G),B)try{var N=Math.round(R/i)+a,j=u.getComponentMethod("calendars","getCal")(B),V=j.fromJD(N);return U%12?j.add(V,U,"m"):j.add(V,U/12,"y"),(V.toJD()-a)*i+G}catch{m.error("invalid ms "+R+" in calendar "+B)}var H=new Date(R+I);return H.setUTCMonth(H.getUTCMonth()+U)+G-I},E.findExactDates=function(R,U){for(var B,G,N=0,j=0,V=0,H=0,ee=v(U)&&u.getComponentMethod("calendars","getCal")(U),Q=0;Q0&&h[M+1][0]<0)return M;return null}switch(p=g==="RUS"||g==="FJI"?function(h){var M;if(k(h)===null)M=h;else for(M=new Array(h.length),d=0;dM?A[C++]=[h[d][0]+360,h[d][1]]:d===M?(A[C++]=h[d],A[C++]=[h[d][0],-90]):A[C++]=h[d];var L=r.tester(A);L.pts.pop(),y.push(L)}:function(h){y.push(r.tester(h))},v.type){case"MultiPolygon":for(c=0;cB&&(B=j,I=N)}else I=R;return T.default(I).geometry.coordinates}(L),A.fIn=h,A.fOut=L,v.push(L)}else l.log(["Location",A.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete d[M]}switch(c.type){case"FeatureCollection":var y=c.features;for(b=0;b100?(clearInterval(M),k("Unexpected error while fetching from "+g)):void h++},50)})}for(var v=0;v0&&(T.push(m),m=[])}return m.length>0&&T.push(m),T},E.makeLine=function(w){return w.length===1?{type:"LineString",coordinates:w[0]}:{type:"MultiLineString",coordinates:w}},E.makePolygon=function(w){if(w.length===1)return{type:"Polygon",coordinates:w};for(var s=new Array(w.length),T=0;T1||y<0||y>1?null:{x:l+p*y,y:t+d*y}}function f(l,t,i,r,n){var o=r*l+n*t;if(o<0)return r*r+n*n;if(o>i){var a=r-l,u=n-t;return a*a+u*u}var p=r*t-n*l;return p*p/i}E.segmentsIntersect=m,E.segmentDistance=function(l,t,i,r,n,o,a,u){if(m(l,t,i,r,n,o,a,u))return 0;var p=i-l,c=r-t,b=a-n,d=u-o,v=p*p+c*c,x=b*b+d*d,g=Math.min(f(p,c,v,n-l,o-t),f(p,c,v,a-l,u-t),f(b,d,x,l-n,t-o),f(b,d,x,i-n,r-o));return Math.sqrt(g)},E.getTextLocation=function(l,t,i,r){if(l===w&&r===s||(_={},w=l,s=r),_[i])return _[i];var n=l.getPointAtLength(T(i-r/2,t)),o=l.getPointAtLength(T(i+r/2,t)),a=Math.atan((o.y-n.y)/(o.x-n.x)),u=l.getPointAtLength(T(i,t)),p={x:(4*u.x+n.x+o.x)/6,y:(4*u.y+n.y+o.y)/6,theta:a};return _[i]=p,p},E.clearLocationCache=function(){w=null},E.getVisibleSegment=function(l,t,i){var r,n,o=t.left,a=t.right,u=t.top,p=t.bottom,c=0,b=l.getTotalLength(),d=b;function v(g){var y=l.getPointAtLength(g);g===0?r=y:g===b&&(n=y);var k=y.xa?y.x-a:0,h=y.yp?y.y-p:0;return Math.sqrt(k*k+h*h)}for(var x=v(c);x;){if((c+=x+i)>d)return;x=v(c)}for(x=v(d);x;){if(c>(d-=x+i))return;x=v(d)}return{min:c,max:d,len:d-c,total:b,isClosed:c===0&&d===b&&Math.abs(r.x-n.x)<.1&&Math.abs(r.y-n.y)<.1}},E.findPointOnPath=function(l,t,i,r){for(var n,o,a,u=(r=r||{}).pathLength||l.getTotalLength(),p=r.tolerance||.001,c=r.iterationLimit||30,b=l.getPointAtLength(0)[i]>l.getPointAtLength(u)[i]?-1:1,d=0,v=0,x=u;d0?x=n:v=n,d++}return o}},81697:function(D,E,e){var _=e(92770),w=e(84267),s=e(25075),T=e(21081),m=e(22399).defaultLine,f=e(73627).isArrayOrTypedArray,l=s(m);function t(n,o){var a=n;return a[3]*=o,a}function i(n){if(_(n))return l;var o=s(n);return o.length?o:l}function r(n){return _(n)?n:1}D.exports={formatColor:function(n,o,a){var u,p,c,b,d,v=n.color,x=f(v),g=f(o),y=T.extractOpts(n),k=[];if(u=y.colorscale!==void 0?T.makeColorScaleFuncFromTrace(n):i,p=x?function(M,A){return M[A]===void 0?l:s(u(M[A]))}:i,c=g?function(M,A){return M[A]===void 0?1:r(M[A])}:r,x||g)for(var h=0;h1?(_*E+_*e)/_:E+e,s=String(w).length;if(s>16){var T=String(e).length;if(s>=String(E).length+T){var m=parseFloat(w).toPrecision(12);m.indexOf("e+")===-1&&(w=+m)}}return w}},71828:function(D,E,e){var _=e(39898),w=e(84096).g0,s=e(60721).WU,T=e(92770),m=e(50606),f=m.FP_SAFE,l=-f,t=m.BADNUM,i=D.exports={};i.adjustFormat=function(K){return!K||/^\d[.]\df/.test(K)||/[.]\d%/.test(K)?K:K==="0.f"?"~f":/^\d%/.test(K)?"~%":/^\ds/.test(K)?"~s":!/^[~,.0$]/.test(K)&&/[&fps]/.test(K)?"~"+K:K};var r={};i.warnBadFormat=function(K){var te=String(K);r[te]||(r[te]=1,i.warn('encountered bad format: "'+te+'"'))},i.noFormat=function(K){return String(K)},i.numberFormat=function(K){var te;try{te=s(i.adjustFormat(K))}catch{return i.warnBadFormat(K),i.noFormat}return te},i.nestedProperty=e(65487),i.keyedContainer=e(66636),i.relativeAttr=e(6962),i.isPlainObject=e(41965),i.toLogRange=e(58163),i.relinkPrivateKeys=e(51332);var n=e(73627);i.isTypedArray=n.isTypedArray,i.isArrayOrTypedArray=n.isArrayOrTypedArray,i.isArray1D=n.isArray1D,i.ensureArray=n.ensureArray,i.concat=n.concat,i.maxRowLength=n.maxRowLength,i.minRowLength=n.minRowLength;var o=e(64872);i.mod=o.mod,i.modHalf=o.modHalf;var a=e(96554);i.valObjectMeta=a.valObjectMeta,i.coerce=a.coerce,i.coerce2=a.coerce2,i.coerceFont=a.coerceFont,i.coercePattern=a.coercePattern,i.coerceHoverinfo=a.coerceHoverinfo,i.coerceSelectionMarkerOpacity=a.coerceSelectionMarkerOpacity,i.validate=a.validate;var u=e(41631);i.dateTime2ms=u.dateTime2ms,i.isDateTime=u.isDateTime,i.ms2DateTime=u.ms2DateTime,i.ms2DateTimeLocal=u.ms2DateTimeLocal,i.cleanDate=u.cleanDate,i.isJSDate=u.isJSDate,i.formatDate=u.formatDate,i.incrementMonth=u.incrementMonth,i.dateTick0=u.dateTick0,i.dfltRange=u.dfltRange,i.findExactDates=u.findExactDates,i.MIN_MS=u.MIN_MS,i.MAX_MS=u.MAX_MS;var p=e(65888);i.findBin=p.findBin,i.sorterAsc=p.sorterAsc,i.sorterDes=p.sorterDes,i.distinctVals=p.distinctVals,i.roundUp=p.roundUp,i.sort=p.sort,i.findIndexOfMin=p.findIndexOfMin,i.sortObjectKeys=e(78607);var c=e(80038);i.aggNums=c.aggNums,i.len=c.len,i.mean=c.mean,i.median=c.median,i.midRange=c.midRange,i.variance=c.variance,i.stdev=c.stdev,i.interp=c.interp;var b=e(35657);i.init2dArray=b.init2dArray,i.transposeRagged=b.transposeRagged,i.dot=b.dot,i.translationMatrix=b.translationMatrix,i.rotationMatrix=b.rotationMatrix,i.rotationXYMatrix=b.rotationXYMatrix,i.apply3DTransform=b.apply3DTransform,i.apply2DTransform=b.apply2DTransform,i.apply2DTransform2=b.apply2DTransform2,i.convertCssMatrix=b.convertCssMatrix,i.inverseTransformMatrix=b.inverseTransformMatrix;var d=e(26348);i.deg2rad=d.deg2rad,i.rad2deg=d.rad2deg,i.angleDelta=d.angleDelta,i.angleDist=d.angleDist,i.isFullCircle=d.isFullCircle,i.isAngleInsideSector=d.isAngleInsideSector,i.isPtInsideSector=d.isPtInsideSector,i.pathArc=d.pathArc,i.pathSector=d.pathSector,i.pathAnnulus=d.pathAnnulus;var v=e(99863);i.isLeftAnchor=v.isLeftAnchor,i.isCenterAnchor=v.isCenterAnchor,i.isRightAnchor=v.isRightAnchor,i.isTopAnchor=v.isTopAnchor,i.isMiddleAnchor=v.isMiddleAnchor,i.isBottomAnchor=v.isBottomAnchor;var x=e(87642);i.segmentsIntersect=x.segmentsIntersect,i.segmentDistance=x.segmentDistance,i.getTextLocation=x.getTextLocation,i.clearLocationCache=x.clearLocationCache,i.getVisibleSegment=x.getVisibleSegment,i.findPointOnPath=x.findPointOnPath;var g=e(1426);i.extendFlat=g.extendFlat,i.extendDeep=g.extendDeep,i.extendDeepAll=g.extendDeepAll,i.extendDeepNoArrays=g.extendDeepNoArrays;var y=e(47769);i.log=y.log,i.warn=y.warn,i.error=y.error;var k=e(30587);i.counterRegex=k.counter;var h=e(79990);i.throttle=h.throttle,i.throttleDone=h.done,i.clearThrottle=h.clear;var M=e(24401);function A(K){var te={};for(var ae in K)for(var oe=K[ae],se=0;sef||K=te)&&T(K)&&K>=0&&K%1==0},i.noop=e(64213),i.identity=e(23389),i.repeat=function(K,te){for(var ae=new Array(te),oe=0;oeae?Math.max(ae,Math.min(te,K)):Math.max(te,Math.min(ae,K))},i.bBoxIntersect=function(K,te,ae){return ae=ae||0,K.left<=te.right+ae&&te.left<=K.right+ae&&K.top<=te.bottom+ae&&te.top<=K.bottom+ae},i.simpleMap=function(K,te,ae,oe,se){for(var fe=K.length,xe=new Array(fe),he=0;he=Math.pow(2,ae)?se>10?(i.warn("randstr failed uniqueness"),de):K(te,ae,oe,(se||0)+1):de},i.OptionControl=function(K,te){K||(K={}),te||(te="opt");var ae={optionList:[],_newoption:function(oe){oe[te]=K,ae[oe.name]=oe,ae.optionList.push(oe)}};return ae["_"+te]=K,ae},i.smooth=function(K,te){if((te=Math.round(te)||0)<2)return K;var ae,oe,se,fe,xe=K.length,he=2*xe,de=2*te-1,pe=new Array(de),ye=new Array(xe);for(ae=0;ae=he&&(se-=he*Math.floor(se/he)),se<0?se=-1-se:se>=xe&&(se=he-1-se),fe+=K[se]*pe[oe];ye[ae]=fe}return ye},i.syncOrAsync=function(K,te,ae){var oe;function se(){return i.syncOrAsync(K,te,ae)}for(;K.length;)if((oe=(0,K.splice(0,1)[0])(te))&&oe.then)return oe.then(se);return ae&&ae(te)},i.stripTrailingSlash=function(K){return K.substr(-1)==="/"?K.substr(0,K.length-1):K},i.noneOrAll=function(K,te,ae){if(K){var oe,se=!1,fe=!0;for(oe=0;oe0?se:0})},i.fillArray=function(K,te,ae,oe){if(oe=oe||i.identity,i.isArrayOrTypedArray(K))for(var se=0;se1?se+xe[1]:"";if(fe&&(xe.length>1||he.length>4||ae))for(;oe.test(he);)he=he.replace(oe,"$1"+fe+"$2");return he+de},i.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var U=/^\w*$/;i.templateString=function(K,te){var ae={};return K.replace(i.TEMPLATE_STRING_REGEX,function(oe,se){var fe;return U.test(se)?fe=te[se]:(ae[se]=ae[se]||i.nestedProperty(te,se).get,fe=ae[se]()),i.isValidTextValue(fe)?fe:""})};var B={max:10,count:0,name:"hovertemplate"};i.hovertemplateString=function(){return ee.apply(B,arguments)};var G={max:10,count:0,name:"texttemplate"};i.texttemplateString=function(){return ee.apply(G,arguments)};var N=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function j(K){var te=K.match(N);return te?{key:te[1],op:te[2],number:Number(te[3])}:{key:K,op:null,number:null}}var V={max:10,count:0,name:"texttemplate",parseMultDiv:!0};i.texttemplateStringForShapes=function(){return ee.apply(V,arguments)};var H=/^[:|\|]/;function ee(K,te,ae){var oe=this,se=arguments;te||(te={});var fe={};return K.replace(i.TEMPLATE_STRING_REGEX,function(xe,he,de){var pe=he==="_xother"||he==="_yother",ye=he==="_xother_"||he==="_yother_",Re=he==="xother_"||he==="yother_",we=he==="xother"||he==="yother"||pe||Re||ye,Ae=he;(pe||ye)&&(Ae=Ae.substring(1)),(Re||ye)&&(Ae=Ae.substring(0,Ae.length-1));var Me,Ce,ne,ue=null,me=null;if(oe.parseMultDiv){var Te=j(Ae);Ae=Te.key,ue=Te.op,me=Te.number}if(we){if((Me=te[Ae])===void 0)return""}else for(ne=3;ne=48&&xe<=57,pe=he>=48&&he<=57;if(de&&(oe=10*oe+xe-48),pe&&(se=10*se+he-48),!de||!pe){if(oe!==se)return oe-se;if(xe!==he)return xe-he}}return se-oe};var Q=2e9;i.seedPseudoRandom=function(){Q=2e9},i.pseudoRandom=function(){var K=Q;return Q=(69069*Q+1)%4294967296,Math.abs(Q-K)<429496729?i.pseudoRandom():Q/4294967296},i.fillText=function(K,te,ae){var oe=Array.isArray(ae)?function(xe){ae.push(xe)}:function(xe){ae.text=xe},se=i.extractOption(K,te,"htx","hovertext");if(i.isValidTextValue(se))return oe(se);var fe=i.extractOption(K,te,"tx","text");return i.isValidTextValue(fe)?oe(fe):void 0},i.isValidTextValue=function(K){return K||K===0},i.formatPercent=function(K,te){te=te||0;for(var ae=(Math.round(100*K*Math.pow(10,te))*Math.pow(.1,te)).toFixed(te)+"%",oe=0;oe1&&(pe=1):pe=0,i.strTranslate(se-pe*(ae+xe),fe-pe*(oe+he))+i.strScale(pe)+(de?"rotate("+de+(te?"":" "+ae+" "+oe)+")":"")},i.setTransormAndDisplay=function(K,te){K.attr("transform",i.getTextTransform(te)),K.style("display",te.scale?null:"none")},i.ensureUniformFontSize=function(K,te){var ae=i.extendFlat({},te);return ae.size=Math.max(te.size,K._fullLayout.uniformtext.minsize||0),ae},i.join2=function(K,te,ae){var oe=K.length;return oe>1?K.slice(0,-1).join(te)+ae+K[oe-1]:K.join(te)},i.bigFont=function(K){return Math.round(1.2*K)};var Y=i.getFirefoxVersion(),X=Y!==null&&Y<86;i.getPositionFromD3Event=function(){return X?[_.event.layerX,_.event.layerY]:[_.event.offsetX,_.event.offsetY]}},41965:function(D){D.exports=function(E){return window&&window.process&&window.process.versions?Object.prototype.toString.call(E)==="[object Object]":Object.prototype.toString.call(E)==="[object Object]"&&Object.getPrototypeOf(E).hasOwnProperty("hasOwnProperty")}},66636:function(D,E,e){var _=e(65487),w=/^\w*$/;D.exports=function(s,T,m,f){var l,t,i;m=m||"name",f=f||"value";var r={};T&&T.length?(i=_(s,T),t=i.get()):t=s,T=T||"";var n={};if(t)for(l=0;l2)return r[p]=2|r[p],a.set(u,null);if(o){for(l=p;l1){var m=["LOG:"];for(T=0;T1){var f=[];for(T=0;T"),"long")}},s.warn=function(){var T;if(_.logging>0){var m=["WARN:"];for(T=0;T0){var f=[];for(T=0;T"),"stick")}},s.error=function(){var T;if(_.logging>0){var m=["ERROR:"];for(T=0;T0){var f=[];for(T=0;T"),"stick")}}},77310:function(D,E,e){var _=e(39898);D.exports=function(w,s,T){var m=w.selectAll("g."+T.replace(/\s/g,".")).data(s,function(l){return l[0].trace.uid});m.exit().remove(),m.enter().append("g").attr("class",T),m.order();var f=w.classed("rangeplot")?"nodeRangePlot3":"node3";return m.each(function(l){l[0][f]=_.select(this)}),m}},35657:function(D,E,e){var _=e(79576);E.init2dArray=function(w,s){for(var T=new Array(w),m=0;me/2?E-Math.round(E/e)*e:E}}},65487:function(D,E,e){var _=e(92770),w=e(73627).isArrayOrTypedArray;function s(r,n){return function(){var o,a,u,p,c,b=r;for(p=0;p/g),a=0;at||d===w||dr||c&&n(p))}:function(p,c){var b=p[0],d=p[1];if(b===w||bt||d===w||dr)return!1;var v,x,g,y,k,h=f.length,M=f[0][0],A=f[0][1],C=0;for(v=1;vMath.max(x,M)||d>Math.max(g,A)))if(da||Math.abs(_(i,p))>l)return!0;return!1},s.filter=function(T,m){var f=[T[0]],l=0,t=0;function i(r){T.push(r);var n=f.length,o=l;f.splice(t+1);for(var a=o+1;a1&&i(T.pop()),{addPt:i,raw:T,filtered:f}}},79749:function(D,E,e){var _=e(58617),w=e(98580);D.exports=function(s,T,m){var f=s._fullLayout,l=!0;return f._glcanvas.each(function(t){if(t.regl)t.regl.preloadCachedCode(m);else if(!t.pick||f._has("parcoords")){try{t.regl=w({canvas:this,attributes:{antialias:!t.pick,preserveDrawingBuffer:!0},pixelRatio:s._context.plotGlPixelRatio||e.g.devicePixelRatio,extensions:T||[],cachedCode:m||{}})}catch{l=!1}t.regl||(l=!1),l&&this.addEventListener("webglcontextlost",function(i){s&&s.emit&&s.emit("plotly_webglcontextlost",{event:i,layer:t.key})},!1)}}),l||_({container:f._glcontainer.node()}),l}},45142:function(D,E,e){var _=e(92770),w=e(35791);D.exports=function(s){var T;if(typeof(T=s&&s.hasOwnProperty("userAgent")?s.userAgent:function(){var n;return typeof navigator<"u"&&(n=navigator.userAgent),n&&n.headers&&typeof n.headers["user-agent"]=="string"&&(n=n.headers["user-agent"]),n}())!="string")return!0;var m=w({ua:{headers:{"user-agent":T}},tablet:!0,featureDetect:!1});if(!m){for(var f=T.split(" "),l=1;l-1;t--){var i=f[t];if(i.substr(0,8)==="Version/"){var r=i.substr(8).split(".")[0];if(_(r)&&(r=+r),r>=13)return!0}}}return m}},75138:function(D){D.exports=function(E,e){if(e instanceof RegExp){for(var _=e.toString(),w=0;ww.queueLength&&(T.undoQueue.queue.shift(),T.undoQueue.index--))},startSequence:function(T){T.undoQueue=T.undoQueue||{index:0,queue:[],sequence:!1},T.undoQueue.sequence=!0,T.undoQueue.beginSequence=!0},stopSequence:function(T){T.undoQueue=T.undoQueue||{index:0,queue:[],sequence:!1},T.undoQueue.sequence=!1,T.undoQueue.beginSequence=!1},undo:function(T){var m,f;if(!(T.undoQueue===void 0||isNaN(T.undoQueue.index)||T.undoQueue.index<=0)){for(T.undoQueue.index--,m=T.undoQueue.queue[T.undoQueue.index],T.undoQueue.inSequence=!0,f=0;f=T.undoQueue.queue.length)){for(m=T.undoQueue.queue[T.undoQueue.index],T.undoQueue.inSequence=!0,f=0;fn}function i(r,n){return r>=n}E.findBin=function(r,n,o){if(_(n.start))return o?Math.ceil((r-n.start)/n.size-m)-1:Math.floor((r-n.start)/n.size+m);var a,u,p=0,c=n.length,b=0,d=c>1?(n[c-1]-n[0])/(c-1):1;for(u=d>=0?o?f:l:o?i:t,r+=d*m*(o?-1:1)*(d>=0?1:-1);p90&&w.log("Long binary search..."),p-1},E.sorterAsc=function(r,n){return r-n},E.sorterDes=function(r,n){return n-r},E.distinctVals=function(r){var n,o=r.slice();for(o.sort(E.sorterAsc),n=o.length-1;n>-1&&o[n]===T;n--);for(var a,u=o[n]-o[0]||1,p=u/(n||1)/1e4,c=[],b=0;b<=n;b++){var d=o[b],v=d-a;a===void 0?(c.push(d),a=d):v>p&&(u=Math.min(u,v),c.push(d),a=d)}return{vals:c,minDiff:u}},E.roundUp=function(r,n,o){for(var a,u=0,p=n.length-1,c=0,b=o?0:1,d=o?1:0,v=o?Math.ceil:Math.floor;u0&&(a=1),o&&a)return r.sort(n)}return a?r:r.reverse()},E.findIndexOfMin=function(r,n){n=n||s;for(var o,a=1/0,u=0;um.length)&&(f=m.length),_(T)||(T=!1),w(m[0])){for(t=new Array(f),l=0;ls.length-1)return s[s.length-1];var m=T%1;return m*s[Math.ceil(T)]+(1-m)*s[Math.floor(T)]}},78614:function(D,E,e){var _=e(25075);D.exports=function(w){return w?_(w):[0,0,0,1]}},63893:function(D,E,e){var _=e(39898),w=e(71828),s=w.strTranslate,T=e(77922),m=e(18783).LINE_SPACING,f=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;E.convertToTspans=function(R,U,B){var G=R.text(),N=!R.attr("data-notex")&&U&&U._context.typesetMath&&typeof MathJax<"u"&&G.match(f),j=_.select(R.node().parentNode);if(!j.empty()){var V=R.attr("class")?R.attr("class").split(" ")[0]:"text";return V+="-math",j.selectAll("svg."+V).remove(),j.selectAll("g."+V+"-group").remove(),R.style("display",null).attr({"data-unformatted":G,"data-math":"N"}),N?(U&&U._promises||[]).push(new Promise(function(ee){R.style("display","none");var Q=parseInt(R.node().style.fontSize,10),Y={fontSize:Q};(function(X,K,te){var ae,oe,se,fe,xe=parseInt((MathJax.version||"").split(".")[0]);if(xe===2||xe===3){var he=function(){var pe="math-output-"+w.randstr({},64),ye=(fe=_.select("body").append("div").attr({id:pe}).style({visibility:"hidden",position:"absolute","font-size":K.fontSize+"px"}).text(X.replace(l,"\\lt ").replace(t,"\\gt "))).node();return xe===2?MathJax.Hub.Typeset(ye):MathJax.typeset([ye])},de=function(){var pe=fe.select(xe===2?".MathJax_SVG":".MathJax"),ye=!pe.empty()&&fe.select("svg").node();if(ye){var Re,we=ye.getBoundingClientRect();Re=xe===2?_.select("body").select("#MathJax_SVG_glyphs"):pe.select("defs"),te(pe,Re,we)}else w.log("There was an error in the tex syntax.",X),te();fe.remove()};xe===2?MathJax.Hub.Queue(function(){return oe=w.extendDeepAll({},MathJax.Hub.config),se=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:i},displayAlign:"left"})},function(){if((ae=MathJax.Hub.config.menuSettings.renderer)!=="SVG")return MathJax.Hub.setRenderer("SVG")},he,de,function(){if(ae!=="SVG")return MathJax.Hub.setRenderer(ae)},function(){return se!==void 0&&(MathJax.Hub.processSectionDelay=se),MathJax.Hub.Config(oe)}):xe===3&&(oe=w.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=i,(ae=MathJax.config.startup.output)!=="svg"&&(MathJax.config.startup.output="svg"),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){he(),de(),ae!=="svg"&&(MathJax.config.startup.output=ae),MathJax.config=oe}))}else w.warn("No MathJax version:",MathJax.version)})(N[2],Y,function(X,K,te){j.selectAll("svg."+V).remove(),j.selectAll("g."+V+"-group").remove();var ae=X&&X.select("svg");if(!ae||!ae.node())return H(),void ee();var oe=j.append("g").classed(V+"-group",!0).attr({"pointer-events":"none","data-unformatted":G,"data-math":"Y"});oe.node().appendChild(ae.node()),K&&K.node()&&ae.node().insertBefore(K.node().cloneNode(!0),ae.node().firstChild);var se=te.width,fe=te.height;ae.attr({class:V,height:fe,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var xe=R.node().style.fill||"black",he=ae.select("g");he.attr({fill:xe,stroke:xe});var de=he.node().getBoundingClientRect(),pe=de.width,ye=de.height;(pe>se||ye>fe)&&(ae.style("overflow","hidden"),pe=(de=ae.node().getBoundingClientRect()).width,ye=de.height);var Re=+R.attr("x"),we=+R.attr("y"),Ae=-(Q||R.node().getBoundingClientRect().height)/4;if(V[0]==="y")oe.attr({transform:"rotate("+[-90,Re,we]+")"+s(-pe/2,Ae-ye/2)});else if(V[0]==="l")we=Ae-ye/2;else if(V[0]==="a"&&V.indexOf("atitle")!==0)Re=0,we=Ae;else{var Me=R.attr("text-anchor");Re-=pe*(Me==="middle"?.5:Me==="end"?1:0),we=we+Ae-ye/2}ae.attr({x:Re,y:we}),B&&B.call(R,oe),ee(oe)})})):H(),R}function H(){j.empty()||(V=R.attr("class")+"-math",j.select("svg."+V).remove()),R.text("").style("white-space","pre");var ee=function(Q,Y){Y=Y.replace(p," ");var X,K=!1,te=[],ae=-1;function oe(){ae++;var me=document.createElementNS(T.svg,"tspan");_.select(me).attr({class:"line",dy:ae*m+"em"}),Q.appendChild(me),X=me;var Te=te;if(te=[{node:me}],Te.length>1)for(var Ee=1;Ee doesnt match end tag <"+me+">. Pretending it did match.",Y),X=te[te.length-1].node}else w.log("Ignoring unexpected end tag .",Y)}d.test(Y)?oe():(X=Q,te=[{node:Q}]);for(var he=Y.split(c),de=0;de|>|>)/g,i=[["$","$"],["\\(","\\)"]],r={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},n={sub:"0.3em",sup:"-0.6em"},o={sub:"-0.21em",sup:"0.42em"},a="​",u=["http:","https:","mailto:","",void 0,":"],p=E.NEWLINES=/(\r\n?|\n)/g,c=/(<[^<>]*>)/,b=/<(\/?)([^ >]*)(\s+(.*))?>/i,d=//i;E.BR_TAG_ALL=//gi;var v=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,x=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,g=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,y=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function k(R,U){if(!R)return null;var B=R.match(U),G=B&&(B[3]||B[4]);return G&&C(G)}var h=/(^|;)\s*color:/;E.plainText=function(R,U){for(var B=(U=U||{}).len!==void 0&&U.len!==-1?U.len:1/0,G=U.allowedTags!==void 0?U.allowedTags:["br"],N=3,j=R.split(c),V=[],H="",ee=0,Q=0;QN?V.push(Y.substr(0,ae-N)+"..."):V.push(Y.substr(0,ae));break}H=""}}return V.join("")};var M={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},A=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function C(R){return R.replace(A,function(U,B){return(B.charAt(0)==="#"?function(G){if(!(G>1114111)){var N=String.fromCodePoint;if(N)return N(G);var j=String.fromCharCode;return G<=65535?j(G):j(55232+(G>>10),G%1024+56320)}}(B.charAt(1)==="x"?parseInt(B.substr(2),16):parseInt(B.substr(1),10)):M[B])||U})}function L(R){var U=encodeURI(decodeURI(R)),B=document.createElement("a"),G=document.createElement("a");B.href=R,G.href=U;var N=B.protocol,j=G.protocol;return u.indexOf(N)!==-1&&u.indexOf(j)!==-1?U:""}function O(R,U,B){var G,N,j,V=B.horizontalAlign,H=B.verticalAlign||"top",ee=R.node().getBoundingClientRect(),Q=U.node().getBoundingClientRect();return N=H==="bottom"?function(){return ee.bottom-G.height}:H==="middle"?function(){return ee.top+(ee.height-G.height)/2}:function(){return ee.top},j=V==="right"?function(){return ee.right-G.width}:V==="center"?function(){return ee.left+(ee.width-G.width)/2}:function(){return ee.left},function(){G=this.node().getBoundingClientRect();var Y=j()-Q.left,X=N()-Q.top,K=B.gd||{};if(B.gd){K._fullLayout._calcInverseTransform(K);var te=w.apply3DTransform(K._fullLayout._invTransform)(Y,X);Y=te[0],X=te[1]}return this.style({top:X+"px",left:Y+"px","z-index":1e3}),this}}E.convertEntities=C,E.sanitizeHTML=function(R){R=R.replace(p," ");for(var U=document.createElement("p"),B=U,G=[],N=R.split(c),j=0;jm.ts+s?t():m.timer=setTimeout(function(){t(),m.timer=null},s)},E.done=function(w){var s=e[w];return s&&s.timer?new Promise(function(T){var m=s.onDone;s.onDone=function(){m&&m(),T(),s.onDone=null}}):Promise.resolve()},E.clear=function(w){if(w)_(e[w]),delete e[w];else for(var s in e)E.clear(s)}},58163:function(D,E,e){var _=e(92770);D.exports=function(w,s){if(w>0)return Math.log(w)/Math.LN10;var T=Math.log(Math.min(s[0],s[1]))/Math.LN10;return _(T)||(T=Math.log(Math.max(s[0],s[1]))/Math.LN10-6),T}},90973:function(D,E,e){var _=D.exports={},w=e(78776).locationmodeToLayer,s=e(96892).zL;_.getTopojsonName=function(T){return[T.scope.replace(/ /g,"-"),"_",T.resolution.toString(),"m"].join("")},_.getTopojsonPath=function(T,m){return T+m+".json"},_.getTopojsonFeatures=function(T,m){var f=w[T.locationmode],l=m.objects[f];return s(m,l).features}},37815:function(D){D.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},92177:function(D){D.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"}}},14458:function(D,E,e){var _=e(73972);D.exports=function(w){for(var s,T,m=_.layoutArrayContainers,f=_.layoutArrayRegexes,l=w.split("[")[0],t=0;t0&&T.log("Clearing previous rejected promises from queue."),x._promises=[]},E.cleanLayout=function(x){var g,y;x||(x={}),x.xaxis1&&(x.xaxis||(x.xaxis=x.xaxis1),delete x.xaxis1),x.yaxis1&&(x.yaxis||(x.yaxis=x.yaxis1),delete x.yaxis1),x.scene1&&(x.scene||(x.scene=x.scene1),delete x.scene1);var k=(m.subplotsRegistry.cartesian||{}).attrRegex,h=(m.subplotsRegistry.polar||{}).attrRegex,M=(m.subplotsRegistry.ternary||{}).attrRegex,A=(m.subplotsRegistry.gl3d||{}).attrRegex,C=Object.keys(x);for(g=0;g3?(te.x=1.02,te.xanchor="left"):te.x<-2&&(te.x=-.02,te.xanchor="right"),te.y>3?(te.y=1.02,te.yanchor="bottom"):te.y<-2&&(te.y=-.02,te.yanchor="top")),o(x),x.dragmode==="rotate"&&(x.dragmode="orbit"),l.clean(x),x.template&&x.template.layout&&E.cleanLayout(x.template.layout),x},E.cleanData=function(x){for(var g=0;g0)return x.substr(0,g)}E.hasParent=function(x,g){for(var y=d(g);y;){if(y in x)return!0;y=d(y)}return!1};var v=["x","y","z"];E.clearAxisTypes=function(x,g,y){for(var k=0;k1&&s.warn("Full array edits are incompatible with other edits",a);var x=r[""][""];if(l(x))i.set(null);else{if(!Array.isArray(x))return s.warn("Unrecognized full array edit value",a,x),!0;i.set(x)}return!b&&(u(d,v),p(t),!0)}var g,y,k,h,M,A,C,L,O=Object.keys(r).map(Number).sort(T),I=i.get(),R=I||[],U=o(v,a).get(),B=[],G=-1,N=R.length;for(g=0;gR.length-(C?0:1))s.warn("index out of range",a,k);else if(A!==void 0)M.length>1&&s.warn("Insertion & removal are incompatible with edits to the same index.",a,k),l(A)?B.push(k):C?(A==="add"&&(A={}),R.splice(k,0,A),U&&U.splice(k,0,{})):s.warn("Unrecognized full object edit value",a,k,A),G===-1&&(G=k);else for(y=0;y=0;g--)R.splice(B[g],1),U&&U.splice(B[g],1);if(R.length?I||i.set(R):i.set(null),b)return!1;if(u(d,v),c!==w){var j;if(G===-1)j=O;else{for(N=Math.max(R.length,N),j=[],g=0;g=G);g++)j.push(k);for(g=G;g=ne.data.length||Ee<-ne.data.length)throw new Error(me+" must be valid indices for gd.data.");if(ue.indexOf(Ee,Te+1)>-1||Ee>=0&&ue.indexOf(-ne.data.length+Ee)>-1||Ee<0&&ue.indexOf(ne.data.length+Ee)>-1)throw new Error("each index in "+me+" must be unique.")}}function I(ne,ue,me){if(!Array.isArray(ne.data))throw new Error("gd.data must be an array.");if(ue===void 0)throw new Error("currentIndices is a required argument.");if(Array.isArray(ue)||(ue=[ue]),O(ne,ue,"currentIndices"),me===void 0||Array.isArray(me)||(me=[me]),me!==void 0&&O(ne,me,"newIndices"),me!==void 0&&ue.length!==me.length)throw new Error("current and new indices must be of equal length.")}function R(ne,ue,me,Te,Ee){(function(Ye,Ze,st,ot){var ft=T.isPlainObject(ot);if(!Array.isArray(Ye.data))throw new Error("gd.data must be an array");if(!T.isPlainObject(Ze))throw new Error("update must be a key:value object");if(st===void 0)throw new Error("indices must be an integer or array of integers");for(var yt in O(Ye,st,"indices"),Ze){if(!Array.isArray(Ze[yt])||Ze[yt].length!==st.length)throw new Error("attribute "+yt+" must be an array of length equal to indices array length");if(ft&&(!(yt in ot)||!Array.isArray(ot[yt])||ot[yt].length!==Ze[yt].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}})(ne,ue,me,Te);for(var Ue=function(Ye,Ze,st,ot){var ft,yt,Et,Tt,xt,Dt=T.isPlainObject(ot),It=[];for(var Ft in Array.isArray(st)||(st=[st]),st=L(st,Ye.data.length-1),Ze)for(var qt=0;qt-1&&me.indexOf("grouptitlefont")===-1?je(me,me.replace("titlefont","title.font")):me.indexOf("titleposition")>-1?je(me,me.replace("titleposition","title.position")):me.indexOf("titleside")>-1?je(me,me.replace("titleside","title.side")):me.indexOf("titleoffset")>-1&&je(me,me.replace("titleoffset","title.offset")):je(me,me.replace("title","title.text"));function je(ge,be){ne[be]=ne[ge],delete ne[ge]}}function ee(ne,ue,me){ne=T.getGraphDiv(ne),v.clearPromiseQueue(ne);var Te={};if(typeof ue=="string")Te[ue]=me;else{if(!T.isPlainObject(ue))return T.warn("Relayout fail.",ue,me),Promise.reject();Te=T.extendFlat({},ue)}Object.keys(Te).length&&(ne.changed=!0);var Ee=ae(ne,Te),Ue=Ee.flags;Ue.calc&&(ne.calcdata=void 0);var De=[r.previousPromises];Ue.layoutReplot?De.push(x.layoutReplot):Object.keys(Te).length&&(Q(ne,Ue,Ee)||r.supplyDefaults(ne),Ue.legend&&De.push(x.doLegend),Ue.layoutstyle&&De.push(x.layoutStyles),Ue.axrange&&Y(De,Ee.rangesAltered),Ue.ticks&&De.push(x.doTicksRelayout),Ue.modebar&&De.push(x.doModeBar),Ue.camera&&De.push(x.doCamera),Ue.colorbars&&De.push(x.doColorBars),De.push(h)),De.push(r.rehover,r.redrag,r.reselect),l.add(ne,ee,[ne,Ee.undoit],ee,[ne,Ee.redoit]);var je=T.syncOrAsync(De,ne);return je&&je.then||(je=Promise.resolve(ne)),je.then(function(){return ne.emit("plotly_relayout",Ee.eventData),ne})}function Q(ne,ue,me){var Te=ne._fullLayout;if(!ue.axrange)return!1;for(var Ee in ue)if(Ee!=="axrange"&&ue[Ee])return!1;for(var Ue in me.rangesAltered){var De=n.id2name(Ue),je=ne.layout[De],ge=Te[De];if(ge.autorange=je.autorange,je.range&&(ge.range=je.range.slice()),ge.cleanRange(),ge._matchGroup){for(var be in ge._matchGroup)if(be!==Ue){var Se=Te[n.id2name(be)];Se.autorange=ge.autorange,Se.range=ge.range.slice(),Se._input.range=ge.range.slice()}}}return!0}function Y(ne,ue){var me=ue?function(Te){var Ee=[];for(var Ue in ue){var De=n.getFromId(Te,Ue);if(Ee.push(Ue),(De.ticklabelposition||"").indexOf("inside")!==-1&&De._anchorAxis&&Ee.push(De._anchorAxis._id),De._matchGroup)for(var je in De._matchGroup)ue[je]||Ee.push(je)}return n.draw(Te,Ee,{skipTitle:!0})}:function(Te){return n.draw(Te,"redraw")};ne.push(c,x.doAutoRangeAndConstraints,me,x.drawData,x.finalDraw)}var X=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,K=/^[xyz]axis[0-9]*\.autorange$/,te=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function ae(ne,ue){var me,Te,Ee,Ue=ne.layout,De=ne._fullLayout,je=De._guiEditing,ge=N(De._preGUI,je),be=Object.keys(ue),Se=n.list(ne),Ne=T.extendDeepAll({},ue),Ye={};for(H(ue),be=Object.keys(ue),Te=0;Te0&&typeof qt.parts[Je]!="string";)Je--;var Ke=qt.parts[Je],Ge=qt.parts[Je-1]+"."+Ke,nt=qt.parts.slice(0,Je).join("."),ht=m(ne.layout,nt).get(),Oe=m(De,nt).get(),Be=qt.get();if(Nt!==void 0){yt[Ft]=Nt,Et[Ft]=Ke==="reverse"?Nt:G(Be);var Qe=i.getLayoutValObject(De,qt.parts);if(Qe&&Qe.impliedEdits&&Nt!==null)for(var ut in Qe.impliedEdits)Tt(T.relativeAttr(Ft,ut),Qe.impliedEdits[ut]);if(["width","height"].indexOf(Ft)!==-1)if(Nt){Tt("autosize",null);var pt=Ft==="height"?"width":"height";Tt(pt,De[pt])}else De[Ft]=ne._initialAutoSize[Ft];else if(Ft==="autosize")Tt("width",Nt?null:De.width),Tt("height",Nt?null:De.height);else if(Ge.match(X))It(Ge),m(De,nt+"._inputRange").set(null);else if(Ge.match(K)){It(Ge),m(De,nt+"._inputRange").set(null);var bt=m(De,nt).get();bt._inputDomain&&(bt._input.domain=bt._inputDomain.slice())}else Ge.match(te)&&m(De,nt+"._inputDomain").set(null);if(Ke==="type"){xt=ht;var Lt=Oe.type==="linear"&&Nt==="log",Ct=Oe.type==="log"&&Nt==="linear";if(Lt||Ct){if(xt&&xt.range)if(Oe.autorange)Lt&&(xt.range=xt.range[1]>xt.range[0]?[1,2]:[2,1]);else{var mt=xt.range[0],Ot=xt.range[1];Lt?(mt<=0&&Ot<=0&&Tt(nt+".autorange",!0),mt<=0?mt=Ot/1e6:Ot<=0&&(Ot=mt/1e6),Tt(nt+".range[0]",Math.log(mt)/Math.LN10),Tt(nt+".range[1]",Math.log(Ot)/Math.LN10)):(Tt(nt+".range[0]",Math.pow(10,mt)),Tt(nt+".range[1]",Math.pow(10,Ot)))}else Tt(nt+".autorange",!0);Array.isArray(De._subplots.polar)&&De._subplots.polar.length&&De[qt.parts[0]]&&qt.parts[1]==="radialaxis"&&delete De[qt.parts[0]]._subplot.viewInitial["radialaxis.range"],t.getComponentMethod("annotations","convertCoords")(ne,Oe,Nt,Tt),t.getComponentMethod("images","convertCoords")(ne,Oe,Nt,Tt)}else Tt(nt+".autorange",!0),Tt(nt+".range",null);m(De,nt+"._inputRange").set(null)}else if(Ke.match(y)){var _t=m(De,Ft).get(),Pt=(Nt||{}).type;Pt&&Pt!=="-"||(Pt="linear"),t.getComponentMethod("annotations","convertCoords")(ne,_t,Pt,Tt),t.getComponentMethod("images","convertCoords")(ne,_t,Pt,Tt)}var Bt=d.containerArrayMatch(Ft);if(Bt){me=Bt.array,Te=Bt.index;var Wt=Bt.property,Gt=Qe||{editType:"calc"};Te!==""&&Wt===""&&(d.isAddVal(Nt)?Et[Ft]=null:d.isRemoveVal(Nt)?Et[Ft]=(m(Ue,me).get()||[])[Te]:T.warn("unrecognized full object value",ue)),g.update(ft,Gt),Ye[me]||(Ye[me]={});var Xt=Ye[me][Te];Xt||(Xt=Ye[me][Te]={}),Xt[Wt]=Nt,delete ue[Ft]}else Ke==="reverse"?(ht.range?ht.range.reverse():(Tt(nt+".autorange",!0),ht.range=[1,0]),Oe.autorange?ft.calc=!0:ft.plot=!0):(Ft==="dragmode"&&(Nt===!1&&Be!==!1||Nt!==!1&&Be===!1)||De._has("scatter-like")&&De._has("regl")&&Ft==="dragmode"&&(Nt==="lasso"||Nt==="select")&&Be!=="lasso"&&Be!=="select"||De._has("gl2d")?ft.plot=!0:Qe?g.update(ft,Qe):ft.calc=!0,qt.set(Nt))}}for(me in Ye)d.applyContainerArrayChanges(ne,ge(Ue,me),Ye[me],ft,ge)||(ft.plot=!0);for(var Kt in Dt){var nn=(xt=n.getFromId(ne,Kt))&&xt._constraintGroup;if(nn)for(var yn in ft.calc=!0,nn)Dt[yn]||(n.getFromId(ne,yn)._constraintShrinkable=!0)}return(oe(ne)||ue.height||ue.width)&&(ft.plot=!0),(ft.plot||ft.calc)&&(ft.layoutReplot=!0),{flags:ft,rangesAltered:Dt,undoit:Et,redoit:yt,eventData:Ne}}function oe(ne){var ue=ne._fullLayout,me=ue.width,Te=ue.height;return ne.layout.autosize&&r.plotAutoSize(ne,ne.layout,ue),ue.width!==me||ue.height!==Te}function se(ne,ue,me,Te){ne=T.getGraphDiv(ne),v.clearPromiseQueue(ne),T.isPlainObject(ue)||(ue={}),T.isPlainObject(me)||(me={}),Object.keys(ue).length&&(ne.changed=!0),Object.keys(me).length&&(ne.changed=!0);var Ee=v.coerceTraceIndices(ne,Te),Ue=V(ne,T.extendFlat({},ue),Ee),De=Ue.flags,je=ae(ne,T.extendFlat({},me)),ge=je.flags;(De.calc||ge.calc)&&(ne.calcdata=void 0),De.clearAxisTypes&&v.clearAxisTypes(ne,Ee,me);var be=[];ge.layoutReplot?be.push(x.layoutReplot):De.fullReplot?be.push(E._doPlot):(be.push(r.previousPromises),Q(ne,ge,je)||r.supplyDefaults(ne),De.style&&be.push(x.doTraceStyle),(De.colorbars||ge.colorbars)&&be.push(x.doColorBars),ge.legend&&be.push(x.doLegend),ge.layoutstyle&&be.push(x.layoutStyles),ge.axrange&&Y(be,je.rangesAltered),ge.ticks&&be.push(x.doTicksRelayout),ge.modebar&&be.push(x.doModeBar),ge.camera&&be.push(x.doCamera),be.push(h)),be.push(r.rehover,r.redrag,r.reselect),l.add(ne,se,[ne,Ue.undoit,je.undoit,Ue.traces],se,[ne,Ue.redoit,je.redoit,Ue.traces]);var Se=T.syncOrAsync(be,ne);return Se&&Se.then||(Se=Promise.resolve(ne)),Se.then(function(){return ne.emit("plotly_update",{data:Ue.eventData,layout:je.eventData}),ne})}function fe(ne){return function(ue){ue._fullLayout._guiEditing=!0;var me=ne.apply(null,arguments);return ue._fullLayout._guiEditing=!1,me}}var xe=[{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:/^legend\.(x|y)$/,attr:"editrevision"},{pattern:/^(shapes|annotations)/,attr:"editrevision"},{pattern:/^title\.text$/,attr:"editrevision"}],he=[{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 de(ne,ue){for(var me=0;me1;)if(Te.pop(),(me=m(ue,Te.join(".")+".uirevision").get())!==void 0)return me;return ue.uirevision}function ye(ne,ue){for(var me=0;me=Ee.length?Ee[0]:Ee[be]:Ee}function je(be){return Array.isArray(Ue)?be>=Ue.length?Ue[0]:Ue[be]:Ue}function ge(be,Se){var Ne=0;return function(){if(be&&++Ne===Se)return be()}}return Te._frameWaitingCnt===void 0&&(Te._frameWaitingCnt=0),new Promise(function(be,Se){function Ne(){ne.emit("plotly_animating"),Te._lastFrameAt=-1/0,Te._timeToNext=0,Te._runningTransitions=0,Te._currentFrame=null;var Ft=function(){Te._animationRaf=window.requestAnimationFrame(Ft),Date.now()-Te._lastFrameAt>Te._timeToNext&&function(){Te._currentFrame&&Te._currentFrame.onComplete&&Te._currentFrame.onComplete();var qt=Te._currentFrame=Te._frameQueue.shift();if(qt){var Nt=qt.name?qt.name.toString():null;ne._fullLayout._currentFrame=Nt,Te._lastFrameAt=Date.now(),Te._timeToNext=qt.frameOpts.duration,r.transition(ne,qt.frame.data,qt.frame.layout,v.coerceTraceIndices(ne,qt.frame.traces),qt.frameOpts,qt.transitionOpts).then(function(){qt.onComplete&&qt.onComplete()}),ne.emit("plotly_animatingframe",{name:Nt,frame:qt.frame,animation:{frame:qt.frameOpts,transition:qt.transitionOpts}})}else ne.emit("plotly_animated"),window.cancelAnimationFrame(Te._animationRaf),Te._animationRaf=null}()};Ft()}var Ye,Ze,st=0;function ot(Ft){return Array.isArray(Ee)?st>=Ee.length?Ft.transitionOpts=Ee[st]:Ft.transitionOpts=Ee[0]:Ft.transitionOpts=Ee,st++,Ft}var ft=[],yt=ue==null,Et=Array.isArray(ue);if(yt||Et||!T.isPlainObject(ue)){if(yt||["string","number"].indexOf(typeof ue)!==-1)for(Ye=0;Ye0&&DtDt)&&It.push(Ze);ft=It}}ft.length>0?function(Ft){if(Ft.length!==0){for(var qt=0;qt=0;Te--)if(T.isPlainObject(ue[Te])){var Ye=ue[Te].name,Ze=(ge[Ye]||Ne[Ye]||{}).name,st=ue[Te].name,ot=ge[Ze]||Ne[Ze];Ze&&st&&typeof st=="number"&&ot&&k<5&&(k++,T.warn('addFrames: overwriting frame "'+(ge[Ze]||Ne[Ze]).name+'" with a frame whose name of type "number" also equates to "'+Ze+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),k===5&&T.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),Ne[Ye]={name:Ye},Se.push({frame:r.supplyFrameDefaults(ue[Te]),index:me&&me[Te]!==void 0&&me[Te]!==null?me[Te]:be+Te})}Se.sort(function(Ft,qt){return Ft.index>qt.index?-1:Ft.index=0;Te--){if(typeof(Ee=Se[Te].frame).name=="number"&&T.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!Ee.name)for(;ge[Ee.name="frame "+ne._transitionData._counter++];);if(ge[Ee.name]){for(Ue=0;Ue=0;me--)Te=ue[me],Ue.push({type:"delete",index:Te}),De.unshift({type:"insert",index:Te,value:Ee[Te]});var je=r.modifyFrames,ge=r.modifyFrames,be=[ne,De],Se=[ne,Ue];return l&&l.add(ne,je,be,ge,Se),r.modifyFrames(ne,Ue)},E.addTraces=function ne(ue,me,Te){ue=T.getGraphDiv(ue);var Ee,Ue,De=[],je=E.deleteTraces,ge=ne,be=[ue,De],Se=[ue,me];for(function(Ne,Ye,Ze){var st,ot;if(!Array.isArray(Ne.data))throw new Error("gd.data must be an array.");if(Ye===void 0)throw new Error("traces must be defined.");for(Array.isArray(Ye)||(Ye=[Ye]),st=0;st=0&&Ne=0&&Ne=O.length)return!1;if(h.dimensions===2){if(A++,M.length===A)return h;var I=M[A];if(!v(I))return!1;h=O[L][I]}else h=O[L]}else h=O}}return h}function v(h){return h===Math.round(h)&&h>=0}function x(){var h,M,A={};for(h in i(A,T),_.subplotsRegistry)if((M=_.subplotsRegistry[h]).layoutAttributes)if(Array.isArray(M.attr))for(var C=0;C=I.length)return!1;C=(A=(_.transformsRegistry[I[R].type]||{}).attributes)&&A[M[2]],O=3}else{var U=h._module;if(U||(U=(_.modules[h.type||s.type.dflt]||{})._module),!U)return!1;if(!(C=(A=U.attributes)&&A[L])){var B=U.basePlotModule;B&&B.attributes&&(C=B.attributes[L])}C||(C=s[L])}return d(C,M,O)},E.getLayoutValObject=function(h,M){var A=function(C,L){var O,I,R,U,B=C._basePlotModules;if(B){var G;for(O=0;O=i&&(t._input||{})._templateitemname;n&&(r=i);var o,a=l+"["+r+"]";function u(){o={},n&&(o[a]={},o[a].templateitemname=n)}function p(b,d){n?_.nestedProperty(o[a],b).set(d):o[a+"."+b]=d}function c(){var b=o;return u(),b}return u(),{modifyBase:function(b,d){o[b]=d},modifyItem:p,getUpdateObj:c,applyUpdate:function(b,d){b&&p(b,d);var v=c();for(var x in v)_.nestedProperty(f,x).set(v[x])}}}},61549:function(D,E,e){var _=e(39898),w=e(73972),s=e(74875),T=e(71828),m=e(63893),f=e(33306),l=e(7901),t=e(91424),i=e(92998),r=e(64168),n=e(89298),o=e(18783),a=e(99082),u=a.enforce,p=a.clean,c=e(71739).doAutoRange,b="start";function d(k,h,M){for(var A=0;A=k[1]||C[1]<=k[0])&&L[0]h[0])return!0}return!1}function v(k){var h,M,A,C,L,O,I=k._fullLayout,R=I._size,U=R.p,B=n.list(k,"",!0);if(I._paperdiv.style({width:k._context.responsive&&I.autosize&&!k._context._hasZeroWidth&&!k.layout.width?"100%":I.width+"px",height:k._context.responsive&&I.autosize&&!k._context._hasZeroHeight&&!k.layout.height?"100%":I.height+"px"}).selectAll(".main-svg").call(t.setSize,I.width,I.height),k._context.setBackground(k,I.paper_bgcolor),E.drawMainTitle(k),r.manage(k),!I._has("cartesian"))return s.previousPromises(k);function G(Ne,Ye,Ze){var st=Ne._lw/2;return Ne._id.charAt(0)==="x"?Ye?Ze==="top"?Ye._offset-U-st:Ye._offset+Ye._length+U+st:R.t+R.h*(1-(Ne.position||0))+st%1:Ye?Ze==="right"?Ye._offset+Ye._length+U+st:Ye._offset-U-st:R.l+R.w*(Ne.position||0)+st%1}for(h=0;h.5?"t":"b",Q=G._fullLayout.margin[ee],Y=0;return N.yref==="paper"?Y=j+N.pad.t+N.pad.b:N.yref==="container"&&(Y=function(X,K,te,ae,oe){var se=0;return te==="middle"&&(se+=oe/2),X==="t"?(te==="top"&&(se+=oe),se+=ae-K*ae):(te==="bottom"&&(se+=oe),se+=K*ae),se}(ee,V,H,G._fullLayout.height,j)+N.pad.t+N.pad.b),Y>Q?Y:0}(k,M,U);B>0&&(function(G,N,j,V){var H="title.automargin",ee=G._fullLayout.title,Q=ee.y>.5?"t":"b",Y={x:ee.x,y:ee.y,t:0,b:0},X={};ee.yref==="paper"&&function(K,te,ae,oe,se){var fe=te.yref==="paper"?K._fullLayout._size.h:K._fullLayout.height,xe=T.isTopAnchor(te)?oe:oe-se,he=ae==="b"?fe-xe:xe;return!(T.isTopAnchor(te)&&ae==="t"||T.isBottomAnchor(te)&&ae==="b")&&heR?y.push({code:"unused",traceType:A,templateCount:I,dataCount:R}):R>I&&y.push({code:"reused",traceType:A,templateCount:I,dataCount:R})}}else y.push({code:"data"});if(function U(B,G){for(var N in B)if(N.charAt(0)!=="_"){var j=B[N],V=a(B,N,G);w(j)?(Array.isArray(B)&&j._template===!1&&j.templateitemname&&y.push({code:"missing",path:V,templateitemname:j.templateitemname}),U(j,V)):Array.isArray(j)&&u(j)&&U(j,V)}}({data:h,layout:k},""),y.length)return y.map(p)}},403:function(D,E,e){var _=e(92770),w=e(72391),s=e(74875),T=e(71828),m=e(25095),f=e(5900),l=e(70942),t=e(11506).version,i={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}};D.exports=function(r,n){var o,a,u,p;function c(R){return!(R in n)||T.validate(n[R],i[R])}if(n=n||{},T.isPlainObject(r)?(o=r.data||[],a=r.layout||{},u=r.config||{},p={}):(r=T.getGraphDiv(r),o=T.extendDeep([],r.data),a=T.extendDeep({},r.layout),u=r._context,p=r._fullLayout||{}),!c("width")&&n.width!==null||!c("height")&&n.height!==null)throw new Error("Height and width should be pixel values.");if(!c("format"))throw new Error("Export format is not "+T.join2(i.format.values,", "," or ")+".");var b={};function d(R,U){return T.coerce(n,b,i,R,U)}var v=d("format"),x=d("width"),g=d("height"),y=d("scale"),k=d("setBackground"),h=d("imageDataOnly"),M=document.createElement("div");M.style.position="absolute",M.style.left="-5000px",document.body.appendChild(M);var A=T.extendFlat({},a);x?A.width=x:n.width===null&&_(p.width)&&(A.width=p.width),g?A.height=g:n.height===null&&_(p.height)&&(A.height=p.height);var C=T.extendFlat({},u,{_exportedPlot:!0,staticPlot:!0,setBackground:k}),L=m.getRedrawFunc(M);function O(){return new Promise(function(R){setTimeout(R,m.getDelay(M._fullLayout))})}function I(){return new Promise(function(R,U){var B=f(M,v,y),G=M._fullLayout.width,N=M._fullLayout.height;function j(){w.purge(M),document.body.removeChild(M)}if(v==="full-json"){var V=s.graphJson(M,!1,"keepdata","object",!0,!0);return V.version=t,V=JSON.stringify(V),j(),R(h?V:m.encodeJSON(V))}if(j(),v==="svg")return R(h?B:m.encodeSVG(B));var H=document.createElement("canvas");H.id=T.randstr(),l({format:v,width:G,height:N,scale:y,canvas:H,svg:B,promise:!0}).then(R).catch(U)})}return new Promise(function(R,U){w.newPlot(M,o,A,C).then(L).then(O).then(I).then(function(B){R(function(G){return h?G.replace(m.IMAGE_URL_PREFIX,""):G}(B))}).catch(function(B){U(B)})})}},84936:function(D,E,e){var _=e(71828),w=e(74875),s=e(86281),T=e(72075).dfltConfig,m=_.isPlainObject,f=Array.isArray,l=_.isArrayOrTypedArray;function t(b,d,v,x,g,y){y=y||[];for(var k=Object.keys(b),h=0;hL.length&&x.push(o("unused",g,A.concat(L.length)));var G,N,j,V,H,ee=L.length,Q=Array.isArray(B);if(Q&&(ee=Math.min(ee,B.length)),O.dimensions===2)for(N=0;NL[N].length&&x.push(o("unused",g,A.concat(N,L[N].length)));var Y=L[N].length;for(G=0;G<(Q?Math.min(Y,B[N].length):Y);G++)j=Q?B[N][G]:B,V=C[N][G],H=L[N][G],_.validate(V,j)?H!==V&&H!==+V&&x.push(o("dynamic",g,A.concat(N,G),V,H)):x.push(o("value",g,A.concat(N,G),V))}else x.push(o("array",g,A.concat(N),C[N]));else for(N=0;N1&&y.push(o("object","layout"))),w.supplyDefaults(k);for(var h=k._fullData,M=v.length,A=0;A0&&Math.round(a)===a))return{vals:i};n=a}for(var u=l.calendar,p=r==="start",c=r==="end",b=f[t+"period0"],d=s(b,u)||0,v=[],x=[],g=[],y=i.length,k=0;kC;)A=T(A,-n,u);for(;A<=C;)A=T(A,n,u);M=T(A,-n,u)}else{for(A=d+(h=Math.round((C-d)/o))*o;A>C;)A-=o;for(;A<=C;)A+=o;M=A-o}v[k]=p?M:c?A:(M+A)/2,x[k]=M,g[k]=A}return{vals:v,starts:x,ends:g}}},89502:function(D){D.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},71739:function(D,E,e){var _=e(39898),w=e(92770),s=e(71828),T=e(50606).FP_SAFE,m=e(73972),f=e(91424),l=e(41675),t=l.getFromId,i=l.isLinked;function r(x,g){var y,k,h=[],M=x._fullLayout,A=o(M,g,0),C=o(M,g,1),L=a(x,g),O=L.min,I=L.max;if(O.length===0||I.length===0)return s.simpleMap(g.range,g.r2l);var R=O[0].val,U=I[0].val;for(y=1;y0&&((ee=te-A(N)-C(j))>ae?Q/ee>oe&&(V=N,H=j,oe=Q/ee):Q/te>oe&&(V={val:N.val,nopad:1},H={val:j.val,nopad:1},oe=Q/te));if(R===U){var se=R-1,fe=R+1;if(X)if(R===0)h=[0,1];else{var xe=(R>0?I:O).reduce(function(de,pe){return Math.max(de,C(pe))},0),he=R/(1-Math.min(.5,xe/te));h=R>0?[0,he]:[he,0]}else h=K?[Math.max(0,se),Math.max(1,fe)]:[se,fe]}else X?(V.val>=0&&(V={val:0,nopad:1}),H.val<=0&&(H={val:0,nopad:1})):K&&(V.val-oe*A(V)<0&&(V={val:0,nopad:1}),H.val<=0&&(H={val:1,nopad:1})),oe=(H.val-V.val-n(g,N.val,j.val))/(te-A(V)-C(H)),h=[V.val-oe*A(V),H.val+oe*C(H)];return B&&h.reverse(),s.simpleMap(h,g.l2r||Number)}function n(x,g,y){var k=0;if(x.rangebreaks)for(var h=x.locateBreaks(g,y),M=0;M=y&&(O.extrapad||!A)){C=!1;break}h(g,O.val)&&O.pad<=y&&(A||!O.extrapad)&&(x.splice(L,1),L--)}if(C){var I=M&&g===0;x.push({val:g,pad:I?0:y,extrapad:!I&&A})}}function b(x){return w(x)&&Math.abs(x)=g}D.exports={getAutoRange:r,makePadFn:o,doAutoRange:function(x,g,y){if(g.setScale(),g.autorange){g.range=y?y.slice():r(x,g),g._r=g.range.slice(),g._rl=s.simpleMap(g._r,g.r2l);var k=g._input,h={};h[g._attr+".range"]=g.range,h[g._attr+".autorange"]=g.autorange,m.call("_storeDirectGUIEdit",x.layout,x._fullLayout._preGUI,h),k.range=g.range.slice(),k.autorange=g.autorange}var M=g._anchorAxis;if(M&&M.rangeslider){var A=M.rangeslider[g._name];A&&A.rangemode==="auto"&&(A.range=r(x,g)),M._input.rangeslider[g._name]=s.extendFlat({},A)}},findExtremes:function(x,g,y){y||(y={}),x._m||x.setScale();var k,h,M,A,C,L,O,I,R,U=[],B=[],G=g.length,N=y.padded||!1,j=y.tozero&&(x.type==="linear"||x.type==="-"),V=x.type==="log",H=!1,ee=y.vpadLinearized||!1;function Q(fe){if(Array.isArray(fe))return H=!0,function(he){return Math.max(Number(fe[he]||0),0)};var xe=Math.max(Number(fe||0),0);return function(){return xe}}var Y=Q((x._m>0?y.ppadplus:y.ppadminus)||y.ppad||0),X=Q((x._m>0?y.ppadminus:y.ppadplus)||y.ppad||0),K=Q(y.vpadplus||y.vpad),te=Q(y.vpadminus||y.vpad);if(!H){if(I=1/0,R=-1/0,V)for(k=0;k0&&(I=h),h>R&&h-T&&(I=h),h>R&&h=se;k--)oe(k);return{min:U,max:B,opts:y}},concatExtremes:a}},89298:function(D,E,e){var _=e(39898),w=e(92770),s=e(74875),T=e(73972),m=e(71828),f=m.strTranslate,l=e(63893),t=e(92998),i=e(7901),r=e(91424),n=e(13838),o=e(66287),a=e(50606),u=a.ONEMAXYEAR,p=a.ONEAVGYEAR,c=a.ONEMINYEAR,b=a.ONEMAXQUARTER,d=a.ONEAVGQUARTER,v=a.ONEMINQUARTER,x=a.ONEMAXMONTH,g=a.ONEAVGMONTH,y=a.ONEMINMONTH,k=a.ONEWEEK,h=a.ONEDAY,M=h/2,A=a.ONEHOUR,C=a.ONEMIN,L=a.ONESEC,O=a.MINUS_SIGN,I=a.BADNUM,R={K:"zeroline"},U={K:"gridline",L:"path"},B={K:"minor-gridline",L:"path"},G={K:"tick",L:"path"},N={K:"tick",L:"text"},j={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},V=e(18783),H=V.MID_SHIFT,ee=V.CAP_SHIFT,Q=V.LINE_SPACING,Y=V.OPPOSITE_SIDE,X=D.exports={};X.setConvert=e(21994);var K=e(4322),te=e(41675),ae=te.idSort,oe=te.isLinked;X.id2name=te.id2name,X.name2id=te.name2id,X.cleanId=te.cleanId,X.list=te.list,X.listIds=te.listIds,X.getFromId=te.getFromId,X.getFromTrace=te.getFromTrace;var se=e(71739);function fe(Oe){var Be=1e-4*(Oe[1]-Oe[0]);return[Oe[0]-Be,Oe[1]+Be]}X.getAutoRange=se.getAutoRange,X.findExtremes=se.findExtremes,X.coerceRef=function(Oe,Be,Qe,ut,pt,bt){var Lt=ut.charAt(ut.length-1),Ct=Qe._fullLayout._subplots[Lt+"axis"],mt=ut+"ref",Ot={};return pt||(pt=Ct[0]||(typeof bt=="string"?bt:bt[0])),bt||(bt=pt),Ct=Ct.concat(Ct.map(function(_t){return _t+" domain"})),Ot[mt]={valType:"enumerated",values:Ct.concat(bt?typeof bt=="string"?[bt]:bt:[]),dflt:pt},m.coerce(Oe,Be,Ot,mt)},X.getRefType=function(Oe){return Oe===void 0?Oe:Oe==="paper"?"paper":Oe==="pixel"?"pixel":/( domain)$/.test(Oe)?"domain":"range"},X.coercePosition=function(Oe,Be,Qe,ut,pt,bt){var Lt,Ct;if(X.getRefType(ut)!=="range")Lt=m.ensureNumber,Ct=Qe(pt,bt);else{var mt=X.getFromId(Be,ut);Ct=Qe(pt,bt=mt.fraction2r(bt)),Lt=mt.cleanPos}Oe[pt]=Lt(Ct)},X.cleanPosition=function(Oe,Be,Qe){return(Qe==="paper"||Qe==="pixel"?m.ensureNumber:X.getFromId(Be,Qe).cleanPos)(Oe)},X.redrawComponents=function(Oe,Be){Be=Be||X.listIds(Oe);var Qe=Oe._fullLayout;function ut(pt,bt,Lt,Ct){for(var mt=T.getComponentMethod(pt,bt),Ot={},_t=0;_tQe&&_t2e-6||((Qe-Oe._forceTick0)/Oe._minDtick%1+1.000001)%1>2e-6)&&(Oe._minDtick=0)):Oe._minDtick=0},X.saveRangeInitial=function(Oe,Be){for(var Qe=X.list(Oe,"",!0),ut=!1,pt=0;pt.3*In||fn(ln)||fn(kn))){var Cn=yn.dtick/2;Kt+=Kt+Cn.8){var wn=Number(yn.substr(1));Wn.exactYears>.8&&wn%12==0?Kt=X.tickIncrement(Kt,"M6","reverse")+1.5*h:Wn.exactMonths>.8?Kt=X.tickIncrement(Kt,"M1","reverse")+15.5*h:Kt-=M;var on=X.tickIncrement(Kt,yn);if(on<=ln)return on}return Kt}(Xt,Oe,Gt,Ct,pt)),Wt=Xt;Wt<=mt;)Wt=X.tickIncrement(Wt,Gt,!1,pt);return{start:Be.c2r(Xt,0,pt),end:Be.c2r(Wt,0,pt),size:Gt,_dataSpan:mt-Ct}},X.prepMinorTicks=function(Oe,Be,Qe){if(!Be.minor.dtick){delete Oe.dtick;var ut,pt=Be.dtick&&w(Be._tmin);if(pt){var bt=X.tickIncrement(Be._tmin,Be.dtick,!0);ut=[Be._tmin,.99*bt+.01*Be._tmin]}else{var Lt=m.simpleMap(Be.range,Be.r2l);ut=[Lt[0],.8*Lt[0]+.2*Lt[1]]}if(Oe.range=m.simpleMap(ut,Be.l2r),Oe._isMinor=!0,X.prepTicks(Oe,Qe),pt){var Ct=w(Be.dtick),mt=w(Oe.dtick),Ot=Ct?Be.dtick:+Be.dtick.substring(1),_t=mt?Oe.dtick:+Oe.dtick.substring(1);Ct&&mt?pe(Ot,_t)?Ot===2*k&&_t===2*h&&(Oe.dtick=k):Ot===2*k&&_t===3*h?Oe.dtick=k:Ot!==k||(Be._input.minor||{}).nticks?ye(Ot/_t,2.5)?Oe.dtick=Ot/2:Oe.dtick=Ot:Oe.dtick=h:String(Be.dtick).charAt(0)==="M"?mt?Oe.dtick="M1":pe(Ot,_t)?Ot>=12&&_t===2&&(Oe.dtick="M3"):Oe.dtick=Be.dtick:String(Oe.dtick).charAt(0)==="L"?String(Be.dtick).charAt(0)==="L"?pe(Ot,_t)||(Oe.dtick=ye(Ot/_t,2.5)?Be.dtick/2:Be.dtick):Oe.dtick="D1":Oe.dtick==="D2"&&+Be.dtick>1&&(Oe.dtick=1)}Oe.range=Be.range}Be.minor._tick0Init===void 0&&(Oe.tick0=Be.tick0)},X.prepTicks=function(Oe,Be){var Qe=m.simpleMap(Oe.range,Oe.r2l,void 0,void 0,Be);if(Oe.tickmode==="auto"||!Oe.dtick){var ut,pt=Oe.nticks;pt||(Oe.type==="category"||Oe.type==="multicategory"?(ut=Oe.tickfont?m.bigFont(Oe.tickfont.size||12):15,pt=Oe._length/ut):(ut=Oe._id.charAt(0)==="y"?40:80,pt=m.constrain(Oe._length/ut,4,9)+1),Oe._name==="radialaxis"&&(pt*=2)),Oe.minor&&Oe.minor.tickmode!=="array"||Oe.tickmode==="array"&&(pt*=100),Oe._roughDTick=Math.abs(Qe[1]-Qe[0])/pt,X.autoTicks(Oe,Oe._roughDTick),Oe._minDtick>0&&Oe.dtick<2*Oe._minDtick&&(Oe.dtick=Oe._minDtick,Oe.tick0=Oe.l2r(Oe._forceTick0))}Oe.ticklabelmode==="period"&&function(bt){var Lt;function Ct(){return!(w(bt.dtick)||bt.dtick.charAt(0)!=="M")}var mt=Ct(),Ot=X.getTickFormat(bt);if(Ot){var _t=bt._dtickInit!==bt.dtick;/%[fLQsSMX]/.test(Ot)||(/%[HI]/.test(Ot)?(Lt=A,_t&&!mt&&bt.dtick=(nn?0:1);yn--){var ln=!yn;yn?(Oe._dtickInit=Oe.dtick,Oe._tick0Init=Oe.tick0):(Oe.minor._dtickInit=Oe.minor.dtick,Oe.minor._tick0Init=Oe.minor.tick0);var kn=yn?Oe:m.extendFlat({},Oe,Oe.minor);if(ln?X.prepMinorTicks(kn,Oe,Be):X.prepTicks(kn,Be),kn.tickmode!=="array")if(kn.tickmode!=="sync"){var Wn=fe(mt),wn=Wn[0],on=Wn[1],_n=w(kn.dtick),fn=pt==="log"&&!(_n||kn.dtick.charAt(0)==="L"),hn=X.tickFirst(kn,Be);if(yn){if(Oe._tmin=hn,hn=on:Hn<=on;Hn=X.tickIncrement(Hn,qn,Ot,bt)){if(yn&&In++,kn.rangebreaks&&!Ot){if(Hn=Pt)break}if(Xt.length>Bt||Hn===Nn)break;Nn=Hn;var or={value:Hn};yn?(fn&&Hn!==(0|Hn)&&(or.simpleLabel=!0),Lt>1&&In%Lt&&(or.skipLabel=!0),Xt.push(or)):(or.minor=!0,Kt.push(or))}}else Xt=[],Wt=Ae(Oe);else yn?(Xt=[],Wt=Me(Oe)):(Kt=[],Gt=Me(Oe))}if(nn&&!(Oe.minor.ticks==="inside"&&Oe.ticks==="outside"||Oe.minor.ticks==="outside"&&Oe.ticks==="inside")){for(var tr=Xt.map(function(Pn){return Pn.value}),kr=[],gr=0;gr0?(On=un-1,Sn=un):(On=un,Sn=un);var pn,bn=Pn[On].value,dn=Pn[Sn].value,vn=Math.abs(dn-bn),An=Jt||vn,Bn=0;An>=c?Bn=vn>=c&&vn<=u?vn:p:Jt===d&&An>=v?Bn=vn>=v&&vn<=b?vn:d:An>=y?Bn=vn>=y&&vn<=x?vn:g:Jt===k&&An>=k?Bn=k:An>=h?Bn=h:Jt===M&&An>=M?Bn=M:Jt===A&&An>=A&&(Bn=A),Bn>=vn&&(Bn=vn,pn=!0);var Xn=Rn+Bn;if(jt.rangebreaks&&Bn>0){for(var er=0,Jn=0;Jn<84;Jn++){var lr=(Jn+.5)/84;jt.maskBreaks(Rn*(1-lr)+lr*Xn)!==I&&er++}(Bn*=er/84)||(Pn[un].drop=!0),pn&&vn>k&&(Bn=vn)}(Bn>0||un===0)&&(Pn[un].periodX=Rn+Bn/2)}}(Xt,Oe,Oe._definedDelta),Oe.rangebreaks){var mn=Oe._id.charAt(0)==="y",Ln=1;Oe.tickmode==="auto"&&(Ln=Oe.tickfont?Oe.tickfont.size:12);var En=NaN;for(Qe=Xt.length-1;Qe>-1;Qe--)if(Xt[Qe].drop)Xt.splice(Qe,1);else{Xt[Qe].value=Ke(Xt[Qe].value,Oe);var jn=Oe.c2p(Xt[Qe].value);(mn?En>jn-Ln:EnPt||Zn<_t)&&(Zn>Pt&&($n.periodX=Pt),Zn<_t&&($n.periodX=_t),Qn($n))),Xt[Qe].skipLabel&&Qn($n),Wt.push($n))}return Wt=Wt.concat(Gt),Oe._inCalcTicks=!1,Ct&&Wt.length&&(Wt[0].noTick=!0),Wt};var Ce=[2,5,10],ne=[1,2,3,6,12],ue=[1,2,5,10,15,30],me=[1,2,3,7,14],Te=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],Ee=[-.301,0,.301,.699,1],Ue=[15,30,45,90,180];function De(Oe,Be,Qe){return Be*m.roundUp(Oe/Be,Qe)}function je(Oe){var Be=Oe.dtick;if(Oe._tickexponent=0,w(Be)||typeof Be=="string"||(Be=1),Oe.type!=="category"&&Oe.type!=="multicategory"||(Oe._tickround=null),Oe.type==="date"){var Qe=Oe.r2l(Oe.tick0),ut=Oe.l2r(Qe).replace(/(^-|i)/g,""),pt=ut.length;if(String(Be).charAt(0)==="M")pt>10||ut.substr(5)!=="01-01"?Oe._tickround="d":Oe._tickround=+Be.substr(1)%12==0?"y":"m";else if(Be>=h&&pt<=10||Be>=15*h)Oe._tickround="d";else if(Be>=C&&pt<=16||Be>=A)Oe._tickround="M";else if(Be>=L&&pt<=19||Be>=C)Oe._tickround="S";else{var bt=Oe.l2r(Qe+Be).replace(/^-/,"").length;Oe._tickround=Math.max(pt,bt)-20,Oe._tickround<0&&(Oe._tickround=4)}}else if(w(Be)||Be.charAt(0)==="L"){var Lt=Oe.range.map(Oe.r2d||Number);w(Be)||(Be=Number(Be.substr(1))),Oe._tickround=2-Math.floor(Math.log(Be)/Math.LN10+.01);var Ct=Math.max(Math.abs(Lt[0]),Math.abs(Lt[1])),mt=Math.floor(Math.log(Ct)/Math.LN10+.01),Ot=Oe.minexponent===void 0?3:Oe.minexponent;Math.abs(mt)>Ot&&(Se(Oe.exponentformat)&&!Ne(mt)?Oe._tickexponent=3*Math.round((mt-1)/3):Oe._tickexponent=mt)}else Oe._tickround=null}function ge(Oe,Be,Qe){var ut=Oe.tickfont||{};return{x:Be,dx:0,dy:0,text:Qe||"",fontSize:ut.size,font:ut.family,fontColor:ut.color}}X.autoTicks=function(Oe,Be,Qe){var ut;function pt(Pt){return Math.pow(Pt,Math.floor(Math.log(Be)/Math.LN10))}if(Oe.type==="date"){Oe.tick0=m.dateTick0(Oe.calendar,0);var bt=2*Be;if(bt>p)Be/=p,ut=pt(10),Oe.dtick="M"+12*De(Be,ut,Ce);else if(bt>g)Be/=g,Oe.dtick="M"+De(Be,1,ne);else if(bt>h){if(Oe.dtick=De(Be,h,Oe._hasDayOfWeekBreaks?[1,2,7,14]:me),!Qe){var Lt=X.getTickFormat(Oe),Ct=Oe.ticklabelmode==="period";Ct&&(Oe._rawTick0=Oe.tick0),/%[uVW]/.test(Lt)?Oe.tick0=m.dateTick0(Oe.calendar,2):Oe.tick0=m.dateTick0(Oe.calendar,1),Ct&&(Oe._dowTick0=Oe.tick0)}}else bt>A?Oe.dtick=De(Be,A,ne):bt>C?Oe.dtick=De(Be,C,ue):bt>L?Oe.dtick=De(Be,L,ue):(ut=pt(10),Oe.dtick=De(Be,ut,Ce))}else if(Oe.type==="log"){Oe.tick0=0;var mt=m.simpleMap(Oe.range,Oe.r2l);if(Oe._isMinor&&(Be*=1.5),Be>.7)Oe.dtick=Math.ceil(Be);else if(Math.abs(mt[1]-mt[0])<1){var Ot=1.5*Math.abs((mt[1]-mt[0])/Be);Be=Math.abs(Math.pow(10,mt[1])-Math.pow(10,mt[0]))/Ot,ut=pt(10),Oe.dtick="L"+De(Be,ut,Ce)}else Oe.dtick=Be>.3?"D2":"D1"}else Oe.type==="category"||Oe.type==="multicategory"?(Oe.tick0=0,Oe.dtick=Math.ceil(Math.max(Be,1))):Je(Oe)?(Oe.tick0=0,ut=1,Oe.dtick=De(Be,ut,Ue)):(Oe.tick0=0,ut=pt(10),Oe.dtick=De(Be,ut,Ce));if(Oe.dtick===0&&(Oe.dtick=1),!w(Oe.dtick)&&typeof Oe.dtick!="string"){var _t=Oe.dtick;throw Oe.dtick=1,"ax.dtick error: "+String(_t)}},X.tickIncrement=function(Oe,Be,Qe,ut){var pt=Qe?-1:1;if(w(Be))return m.increment(Oe,pt*Be);var bt=Be.charAt(0),Lt=pt*Number(Be.substr(1));if(bt==="M")return m.incrementMonth(Oe,Lt,ut);if(bt==="L")return Math.log(Math.pow(10,Oe)+Lt)/Math.LN10;if(bt==="D"){var Ct=Be==="D2"?Ee:Te,mt=Oe+.01*pt,Ot=m.roundUp(m.mod(mt,1),Ct,Qe);return Math.floor(mt)+Math.log(_.round(Math.pow(10,Ot),1))/Math.LN10}throw"unrecognized dtick "+String(Be)},X.tickFirst=function(Oe,Be){var Qe=Oe.r2l||Number,ut=m.simpleMap(Oe.range,Qe,void 0,void 0,Be),pt=ut[1] ")}else Kt._prevDateHead=wn,on+="
"+wn;nn.text=on}(Oe,bt,Qe,Ct):mt==="log"?function(Kt,nn,yn,ln,kn){var Wn=Kt.dtick,wn=nn.x,on=Kt.tickformat,_n=typeof Wn=="string"&&Wn.charAt(0);if(kn==="never"&&(kn=""),ln&&_n!=="L"&&(Wn="L3",_n="L"),on||_n==="L")nn.text=Ye(Math.pow(10,wn),Kt,kn,ln);else if(w(Wn)||_n==="D"&&m.mod(wn+.01,1)<.1){var fn=Math.round(wn),hn=Math.abs(fn),In=Kt.exponentformat;In==="power"||Se(In)&&Ne(fn)?(nn.text=fn===0?1:fn===1?"10":"10"+(fn>1?"":O)+hn+"",nn.fontSize*=1.25):(In==="e"||In==="E")&&hn>2?nn.text="1"+In+(fn>0?"+":O)+hn:(nn.text=Ye(Math.pow(10,wn),Kt,"","fakehover"),Wn==="D1"&&Kt._id.charAt(0)==="y"&&(nn.dy-=nn.fontSize/6))}else{if(_n!=="D")throw"unrecognized dtick "+String(Wn);nn.text=String(Math.round(Math.pow(10,m.mod(wn,1)))),nn.fontSize*=.75}if(Kt.dtick==="D1"){var Cn=String(nn.text).charAt(0);Cn!=="0"&&Cn!=="1"||(Kt._id.charAt(0)==="y"?nn.dx-=nn.fontSize/4:(nn.dy+=nn.fontSize/2,nn.dx+=(Kt.range[1]>Kt.range[0]?1:-1)*nn.fontSize*(wn<0?.5:.25)))}}(Oe,bt,0,Ct,Wt):mt==="category"?function(Kt,nn){var yn=Kt._categories[Math.round(nn.x)];yn===void 0&&(yn=""),nn.text=String(yn)}(Oe,bt):mt==="multicategory"?function(Kt,nn,yn){var ln=Math.round(nn.x),kn=Kt._categories[ln]||[],Wn=kn[1]===void 0?"":String(kn[1]),wn=kn[0]===void 0?"":String(kn[0]);yn?nn.text=wn+" - "+Wn:(nn.text=Wn,nn.text2=wn)}(Oe,bt,Qe):Je(Oe)?function(Kt,nn,yn,ln,kn){if(Kt.thetaunit!=="radians"||yn)nn.text=Ye(nn.x,Kt,kn,ln);else{var Wn=nn.x/180;if(Wn===0)nn.text="0";else{var wn=function(_n){function fn(Nn,Hn){return Math.abs(Nn-Hn)<=1e-6}var hn=function(Nn){for(var Hn=1;!fn(Math.round(Nn*Hn)/Hn,Nn);)Hn*=10;return Hn}(_n),In=_n*hn,Cn=Math.abs(function Nn(Hn,qn){return fn(qn,0)?Hn:Nn(qn,Hn%qn)}(In,hn));return[Math.round(In/Cn),Math.round(hn/Cn)]}(Wn);if(wn[1]>=100)nn.text=Ye(m.deg2rad(nn.x),Kt,kn,ln);else{var on=nn.x<0;wn[1]===1?wn[0]===1?nn.text="π":nn.text=wn[0]+"π":nn.text=["",wn[0],"","⁄","",wn[1],"","π"].join(""),on&&(nn.text=O+nn.text)}}}}(Oe,bt,Qe,Ct,Wt):function(Kt,nn,yn,ln,kn){kn==="never"?kn="":Kt.showexponent==="all"&&Math.abs(nn.x/Kt.dtick)<1e-6&&(kn="hide"),nn.text=Ye(nn.x,Kt,kn,ln)}(Oe,bt,0,Ct,Wt),ut||(Oe.tickprefix&&!Bt(Oe.showtickprefix)&&(bt.text=Oe.tickprefix+bt.text),Oe.ticksuffix&&!Bt(Oe.showticksuffix)&&(bt.text+=Oe.ticksuffix)),Oe.labelalias&&Oe.labelalias.hasOwnProperty(bt.text)){var Gt=Oe.labelalias[bt.text];typeof Gt=="string"&&(bt.text=Gt)}if(Oe.tickson==="boundaries"||Oe.showdividers){var Xt=function(Kt){var nn=Oe.l2p(Kt);return nn>=0&&nn<=Oe._length?Kt:null};bt.xbnd=[Xt(bt.x-.5),Xt(bt.x+Oe.dtick-.5)]}return bt},X.hoverLabelText=function(Oe,Be,Qe){Qe&&(Oe=m.extendFlat({},Oe,{hoverformat:Qe}));var ut=Array.isArray(Be)?Be[0]:Be,pt=Array.isArray(Be)?Be[1]:void 0;if(pt!==void 0&&pt!==ut)return X.hoverLabelText(Oe,ut,Qe)+" - "+X.hoverLabelText(Oe,pt,Qe);var bt=Oe.type==="log"&&ut<=0,Lt=X.tickText(Oe,Oe.c2l(bt?-ut:ut),"hover").text;return bt?ut===0?"0":O+Lt:Lt};var be=["f","p","n","μ","m","","k","M","G","T"];function Se(Oe){return Oe==="SI"||Oe==="B"}function Ne(Oe){return Oe>14||Oe<-15}function Ye(Oe,Be,Qe,ut){var pt=Oe<0,bt=Be._tickround,Lt=Qe||Be.exponentformat||"B",Ct=Be._tickexponent,mt=X.getTickFormat(Be),Ot=Be.separatethousands;if(ut){var _t={exponentformat:Lt,minexponent:Be.minexponent,dtick:Be.showexponent==="none"?Be.dtick:w(Oe)&&Math.abs(Oe)||1,range:Be.showexponent==="none"?Be.range.map(Be.r2d):[0,Oe||1]};je(_t),bt=(Number(_t._tickround)||0)+4,Ct=_t._tickexponent,Be.hoverformat&&(mt=Be.hoverformat)}if(mt)return Be._numFormat(mt)(Oe).replace(/-/g,O);var Pt,Bt=Math.pow(10,-bt)/2;if(Lt==="none"&&(Ct=0),(Oe=Math.abs(Oe))"+Pt+"":Lt==="B"&&Ct===9?Oe+="B":Se(Lt)&&(Oe+=be[Ct/3+5])),pt?O+Oe:Oe}function Ze(Oe,Be){if(Oe){var Qe=Object.keys(j).reduce(function(ut,pt){return Be.indexOf(pt)!==-1&&j[pt].forEach(function(bt){ut[bt]=1}),ut},{});Object.keys(Oe).forEach(function(ut){Qe[ut]||(ut.length===1?Oe[ut]=0:delete Oe[ut])})}}function st(Oe,Be){for(var Qe=[],ut={},pt=0;pt1&&Qe=pt.min&&Oe=0,nn=_t(Bt,Wt[1])<=0;return(Gt||Kt)&&(Xt||nn)}if(Oe.tickformatstops&&Oe.tickformatstops.length>0)switch(Oe.type){case"date":case"linear":for(Be=0;Be=Lt(pt)))){Qe=ut;break}break;case"log":for(Be=0;Be=0&&pt.unshift(pt.splice(Ot,1).shift())}});var Lt={false:{left:0,right:0}};return m.syncOrAsync(pt.map(function(Ct){return function(){if(Ct){var mt=X.getFromId(Oe,Ct);Qe||(Qe={}),Qe.axShifts=Lt,Qe.overlayingShiftedAx=bt;var Ot=X.drawOne(Oe,mt,Qe);return mt._shiftPusher&&ht(mt,mt._fullDepth||0,Lt,!0),mt._r=mt.range.slice(),mt._rl=m.simpleMap(mt._r,mt.r2l),Ot}}}))},X.drawOne=function(Oe,Be,Qe){var ut,pt,bt,Lt=(Qe=Qe||{}).axShifts||{},Ct=Qe.overlayingShiftedAx||[];Be.setScale();var mt=Oe._fullLayout,Ot=Be._id,_t=Ot.charAt(0),Pt=X.counterLetter(Ot),Bt=mt._plots[Be._mainSubplot];if(Bt){if(Be._shiftPusher=Be.autoshift||Ct.indexOf(Be._id)!==-1||Ct.indexOf(Be.overlaying)!==-1,Be._shiftPusher&Be.anchor==="free"){var Wt=Be.linewidth/2||0;Be.ticks==="inside"&&(Wt+=Be.ticklen),ht(Be,Wt,Lt,!0),ht(Be,Be.shift||0,Lt,!1)}Qe.skipTitle===!0&&Be._shift!==void 0||(Be._shift=function(Sn,pn){return Sn.autoshift?pn[Sn.overlaying][Sn.side]:Sn.shift||0}(Be,Lt));var Gt=Bt[_t+"axislayer"],Xt=Be._mainLinePosition,Kt=Xt+=Be._shift,nn=Be._mainMirrorPosition,yn=Be._vals=X.calcTicks(Be),ln=[Be.mirror,Kt,nn].join("_");for(ut=0;ut0?Sn.bottom-Bn:0,Xn))));var er=0,Jn=0;if(Be._shiftPusher&&(er=Math.max(Xn,Sn.height>0?vn==="l"?Bn-Sn.left:Sn.right-Bn:0),Be.title.text!==mt._dfltTitle[_t]&&(Jn=(Be._titleStandoff||0)+(Be._titleScoot||0),vn==="l"&&(Jn+=yt(Be))),Be._fullDepth=Math.max(er,Jn)),Be.automargin){pn={x:0,y:0,r:0,l:0,t:0,b:0};var lr=[0,1],sr=typeof Be._shift=="number"?Be._shift:0;if(_t==="x"){if(vn==="b"?pn[vn]=Be._depth:(pn[vn]=Be._depth=Math.max(Sn.width>0?Bn-Sn.top:0,Xn),lr.reverse()),Sn.width>0){var fr=Sn.right-(Be._offset+Be._length);fr>0&&(pn.xr=1,pn.r=fr);var cr=Be._offset-Sn.left;cr>0&&(pn.xl=0,pn.l=cr)}}else if(vn==="l"?(Be._depth=Math.max(Sn.height>0?Bn-Sn.left:0,Xn),pn[vn]=Be._depth-sr):(Be._depth=Math.max(Sn.height>0?Sn.right-Bn:0,Xn),pn[vn]=Be._depth+sr,lr.reverse()),Sn.height>0){var vr=Sn.bottom-(Be._offset+Be._length);vr>0&&(pn.yb=0,pn.b=vr);var Sr=Be._offset-Sn.top;Sr>0&&(pn.yt=1,pn.t=Sr)}pn[Pt]=Be.anchor==="free"?Be.position:Be._anchorAxis.domain[lr[0]],Be.title.text!==mt._dfltTitle[_t]&&(pn[vn]+=yt(Be)+(Be.title.standoff||0)),Be.mirror&&Be.anchor!=="free"&&((bn={x:0,y:0,r:0,l:0,t:0,b:0})[An]=Be.linewidth,Be.mirror&&Be.mirror!==!0&&(bn[An]+=Xn),Be.mirror===!0||Be.mirror==="ticks"?bn[Pt]=Be._anchorAxis.domain[lr[1]]:Be.mirror!=="all"&&Be.mirror!=="allticks"||(bn[Pt]=[Be._counterDomainMin,Be._counterDomainMax][lr[1]]))}Rn&&(dn=T.getComponentMethod("rangeslider","autoMarginOpts")(Oe,Be)),typeof Be.automargin=="string"&&(Ze(pn,Be.automargin),Ze(bn,Be.automargin)),s.autoMargin(Oe,xt(Be),pn),s.autoMargin(Oe,Dt(Be),bn),s.autoMargin(Oe,It(Be),dn)}),m.syncOrAsync(Jt)}}function On(Sn){var pn=Ot+(Sn||"tick");return kn[pn]||(kn[pn]=function(bn,dn){var vn,An,Bn,Xn;return bn._selections[dn].size()?(vn=1/0,An=-1/0,Bn=1/0,Xn=-1/0,bn._selections[dn].each(function(){var er=Tt(this),Jn=r.bBox(er.node().parentNode);vn=Math.min(vn,Jn.top),An=Math.max(An,Jn.bottom),Bn=Math.min(Bn,Jn.left),Xn=Math.max(Xn,Jn.right)})):(vn=0,An=0,Bn=0,Xn=0),{top:vn,bottom:An,left:Bn,right:Xn,height:An-vn,width:Xn-Bn}}(Be,pn)),kn[pn]}},X.getTickSigns=function(Oe,Be){var Qe=Oe._id.charAt(0),ut={x:"top",y:"right"}[Qe],pt=Oe.side===ut?1:-1,bt=[-1,1,pt,-pt];return(Be?(Oe.minor||{}).ticks:Oe.ticks)!=="inside"==(Qe==="x")&&(bt=bt.map(function(Lt){return-Lt})),Oe.side&&bt.push({l:-1,t:-1,r:1,b:1}[Oe.side.charAt(0)]),bt},X.makeTransTickFn=function(Oe){return Oe._id.charAt(0)==="x"?function(Be){return f(Oe._offset+Oe.l2p(Be.x),0)}:function(Be){return f(0,Oe._offset+Oe.l2p(Be.x))}},X.makeTransTickLabelFn=function(Oe){var Be=function(pt){var bt=pt.ticklabelposition||"",Lt=function(nn){return bt.indexOf(nn)!==-1},Ct=Lt("top"),mt=Lt("left"),Ot=Lt("right"),_t=Lt("bottom"),Pt=Lt("inside"),Bt=_t||mt||Ct||Ot;if(!Bt&&!Pt)return[0,0];var Wt=pt.side,Gt=Bt?(pt.tickwidth||0)/2:0,Xt=3,Kt=pt.tickfont?pt.tickfont.size:12;return(_t||Ct)&&(Gt+=Kt*ee,Xt+=(pt.linewidth||0)/2),(mt||Ot)&&(Gt+=(pt.linewidth||0)/2,Xt+=3),Pt&&Wt==="top"&&(Xt-=Kt*(1-ee)),(mt||Ct)&&(Gt=-Gt),Wt!=="bottom"&&Wt!=="right"||(Xt=-Xt),[Bt?Gt:0,Pt?Xt:0]}(Oe),Qe=Be[0],ut=Be[1];return Oe._id.charAt(0)==="x"?function(pt){return f(Qe+Oe._offset+Oe.l2p(ot(pt)),ut)}:function(pt){return f(ut,Qe+Oe._offset+Oe.l2p(ot(pt)))}},X.makeTickPath=function(Oe,Be,Qe,ut){ut||(ut={});var pt=ut.minor;if(pt&&!Oe.minor)return"";var bt=ut.len!==void 0?ut.len:pt?Oe.minor.ticklen:Oe.ticklen,Lt=Oe._id.charAt(0),Ct=(Oe.linewidth||1)/2;return Lt==="x"?"M0,"+(Be+Ct*Qe)+"v"+bt*Qe:"M"+(Be+Ct*Qe)+",0h"+bt*Qe},X.makeLabelFns=function(Oe,Be,Qe){var ut=Oe.ticklabelposition||"",pt=function(In){return ut.indexOf(In)!==-1},bt=pt("top"),Lt=pt("left"),Ct=pt("right"),mt=pt("bottom")||Lt||bt||Ct,Ot=pt("inside"),_t=ut==="inside"&&Oe.ticks==="inside"||!Ot&&Oe.ticks==="outside"&&Oe.tickson!=="boundaries",Pt=0,Bt=0,Wt=_t?Oe.ticklen:0;if(Ot?Wt*=-1:mt&&(Wt=0),_t&&(Pt+=Wt,Qe)){var Gt=m.deg2rad(Qe);Pt=Wt*Math.cos(Gt)+1,Bt=Wt*Math.sin(Gt)}Oe.showticklabels&&(_t||Oe.showline)&&(Pt+=.2*Oe.tickfont.size);var Xt,Kt,nn,yn,ln,kn={labelStandoff:Pt+=(Oe.linewidth||1)/2*(Ot?-1:1),labelShift:Bt},Wn=0,wn=Oe.side,on=Oe._id.charAt(0),_n=Oe.tickangle;if(on==="x")yn=(ln=!Ot&&wn==="bottom"||Ot&&wn==="top")?1:-1,Ot&&(yn*=-1),Xt=Bt*yn,Kt=Be+Pt*yn,nn=ln?1:-.2,Math.abs(_n)===90&&(Ot?nn+=H:nn=_n===-90&&wn==="bottom"?ee:_n===90&&wn==="top"?H:.5,Wn=H/2*(_n/90)),kn.xFn=function(In){return In.dx+Xt+Wn*In.fontSize},kn.yFn=function(In){return In.dy+Kt+In.fontSize*nn},kn.anchorFn=function(In,Cn){if(mt){if(Lt)return"end";if(Ct)return"start"}return w(Cn)&&Cn!==0&&Cn!==180?Cn*yn<0!==Ot?"end":"start":"middle"},kn.heightFn=function(In,Cn,Nn){return Cn<-60||Cn>60?-.5*Nn:Oe.side==="top"!==Ot?-Nn:0};else if(on==="y"){if(yn=(ln=!Ot&&wn==="left"||Ot&&wn==="right")?1:-1,Ot&&(yn*=-1),Xt=Pt,Kt=Bt*yn,nn=0,Ot||Math.abs(_n)!==90||(nn=_n===-90&&wn==="left"||_n===90&&wn==="right"?ee:.5),Ot){var fn=w(_n)?+_n:0;if(fn!==0){var hn=m.deg2rad(fn);Wn=Math.abs(Math.sin(hn))*ee*yn,nn=0}}kn.xFn=function(In){return In.dx+Be-(Xt+In.fontSize*nn)*yn+Wn*In.fontSize},kn.yFn=function(In){return In.dy+Kt+In.fontSize*H},kn.anchorFn=function(In,Cn){return w(Cn)&&Math.abs(Cn)===90?"middle":ln?"end":"start"},kn.heightFn=function(In,Cn,Nn){return Oe.side==="right"&&(Cn*=-1),Cn<-30?-Nn:Cn<30?-.5*Nn:0}}return kn},X.drawTicks=function(Oe,Be,Qe){Qe=Qe||{};var ut=Be._id+"tick",pt=[].concat(Be.minor&&Be.minor.ticks?Qe.vals.filter(function(Lt){return Lt.minor&&!Lt.noTick}):[]).concat(Be.ticks?Qe.vals.filter(function(Lt){return!Lt.minor&&!Lt.noTick}):[]),bt=Qe.layer.selectAll("path."+ut).data(pt,ft);bt.exit().remove(),bt.enter().append("path").classed(ut,1).classed("ticks",1).classed("crisp",Qe.crisp!==!1).each(function(Lt){return i.stroke(_.select(this),Lt.minor?Be.minor.tickcolor:Be.tickcolor)}).style("stroke-width",function(Lt){return r.crispRound(Oe,Lt.minor?Be.minor.tickwidth:Be.tickwidth,1)+"px"}).attr("d",Qe.path).style("display",null),nt(Be,[G]),bt.attr("transform",Qe.transFn)},X.drawGrid=function(Oe,Be,Qe){if(Qe=Qe||{},Be.tickmode!=="sync"){var ut=Be._id+"grid",pt=Be.minor&&Be.minor.showgrid,bt=pt?Qe.vals.filter(function(nn){return nn.minor}):[],Lt=Be.showgrid?Qe.vals.filter(function(nn){return!nn.minor}):[],Ct=Qe.counterAxis;if(Ct&&X.shouldShowZeroLine(Oe,Be,Ct))for(var mt=Be.tickmode==="array",Ot=0;Ot=0;Gt--){var Xt=Gt?Bt:Wt;if(Xt){var Kt=Xt.selectAll("path."+ut).data(Gt?Lt:bt,ft);Kt.exit().remove(),Kt.enter().append("path").classed(ut,1).classed("crisp",Qe.crisp!==!1),Kt.attr("transform",Qe.transFn).attr("d",Qe.path).each(function(nn){return i.stroke(_.select(this),nn.minor?Be.minor.gridcolor:Be.gridcolor||"#ddd")}).style("stroke-dasharray",function(nn){return r.dashStyle(nn.minor?Be.minor.griddash:Be.griddash,nn.minor?Be.minor.gridwidth:Be.gridwidth)}).style("stroke-width",function(nn){return(nn.minor?Pt:Be._gw)+"px"}).style("display",null),typeof Qe.path=="function"&&Kt.attr("d",Qe.path)}}nt(Be,[U,B])}},X.drawZeroLine=function(Oe,Be,Qe){Qe=Qe||Qe;var ut=Be._id+"zl",pt=X.shouldShowZeroLine(Oe,Be,Qe.counterAxis),bt=Qe.layer.selectAll("path."+ut).data(pt?[{x:0,id:Be._id}]:[]);bt.exit().remove(),bt.enter().append("path").classed(ut,1).classed("zl",1).classed("crisp",Qe.crisp!==!1).each(function(){Qe.layer.selectAll("path").sort(function(Lt,Ct){return ae(Lt.id,Ct.id)})}),bt.attr("transform",Qe.transFn).attr("d",Qe.path).call(i.stroke,Be.zerolinecolor||i.defaultLine).style("stroke-width",r.crispRound(Oe,Be.zerolinewidth,Be._gw||1)+"px").style("display",null),nt(Be,[R])},X.drawLabels=function(Oe,Be,Qe){Qe=Qe||{};var ut=Oe._fullLayout,pt=Be._id,bt=pt.charAt(0),Lt=Qe.cls||pt+"tick",Ct=Qe.vals.filter(function(yn){return yn.text}),mt=Qe.labelFns,Ot=Qe.secondary?0:Be.tickangle,_t=(Be._prevTickAngles||{})[Lt],Pt=Qe.layer.selectAll("g."+Lt).data(Be.showticklabels?Ct:[],ft),Bt=[];function Wt(yn,ln){yn.each(function(kn){var Wn=_.select(this),wn=Wn.select(".text-math-group"),on=mt.anchorFn(kn,ln),_n=Qe.transFn.call(Wn.node(),kn)+(w(ln)&&+ln!=0?" rotate("+ln+","+mt.xFn(kn)+","+(mt.yFn(kn)-kn.fontSize/2)+")":""),fn=l.lineCount(Wn),hn=Q*kn.fontSize,In=mt.heightFn(kn,w(ln)?+ln:0,(fn-1)*hn);if(In&&(_n+=f(0,In)),wn.empty()){var Cn=Wn.select("text");Cn.attr({transform:_n,"text-anchor":on}),Cn.style("opacity",1),Be._adjustTickLabelsOverflow&&Be._adjustTickLabelsOverflow()}else{var Nn=r.bBox(wn.node()).width*{end:-.5,start:.5}[on];wn.attr("transform",_n+f(Nn,0))}})}Pt.enter().append("g").classed(Lt,1).append("text").attr("text-anchor","middle").each(function(yn){var ln=_.select(this),kn=Oe._promises.length;ln.call(l.positionText,mt.xFn(yn),mt.yFn(yn)).call(r.font,yn.font,yn.fontSize,yn.fontColor).text(yn.text).call(l.convertToTspans,Oe),Oe._promises[kn]?Bt.push(Oe._promises.pop().then(function(){Wt(ln,Ot)})):Wt(ln,Ot)}),nt(Be,[N]),Pt.exit().remove(),Qe.repositionOnUpdate&&Pt.each(function(yn){_.select(this).select("text").call(l.positionText,mt.xFn(yn),mt.yFn(yn))}),Be._adjustTickLabelsOverflow=function(){var yn=Be.ticklabeloverflow;if(yn&&yn!=="allow"){var ln=yn.indexOf("hide")!==-1,kn=Be._id.charAt(0)==="x",Wn=0,wn=kn?Oe._fullLayout.width:Oe._fullLayout.height;if(yn.indexOf("domain")!==-1){var on=m.simpleMap(Be.range,Be.r2l);Wn=Be.l2p(on[0])+Be._offset,wn=Be.l2p(on[1])+Be._offset}var _n=Math.min(Wn,wn),fn=Math.max(Wn,wn),hn=Be.side,In=1/0,Cn=-1/0;for(var Nn in Pt.each(function(or){var tr=_.select(this);if(tr.select(".text-math-group").empty()){var kr=r.bBox(tr.node()),gr=0;kn?(kr.right>fn||kr.left<_n)&&(gr=1):(kr.bottom>fn||kr.top+(Be.tickangle?0:or.fontSize/4)<_n)&&(gr=1);var ir=tr.select("text");gr?ln&&ir.style("opacity",0):(ir.style("opacity",1),In=hn==="bottom"||hn==="right"?Math.min(In,kn?kr.top:kr.left):-1/0,Cn=hn==="top"||hn==="left"?Math.max(Cn,kn?kr.bottom:kr.right):1/0)}}),ut._plots){var Hn=ut._plots[Nn];if(Be._id===Hn.xaxis._id||Be._id===Hn.yaxis._id){var qn=kn?Hn.yaxis:Hn.xaxis;qn&&(qn["_visibleLabelMin_"+Be._id]=In,qn["_visibleLabelMax_"+Be._id]=Cn)}}}},Be._hideCounterAxisInsideTickLabels=function(yn){var ln=Be._id.charAt(0)==="x",kn=[];for(var Wn in ut._plots){var wn=ut._plots[Wn];Be._id!==wn.xaxis._id&&Be._id!==wn.yaxis._id||kn.push(ln?wn.yaxis:wn.xaxis)}kn.forEach(function(on,_n){on&&Ge(on)&&(yn||[R,B,U,G,N]).forEach(function(fn){var hn=fn.K==="tick"&&fn.L==="text"&&Be.ticklabelmode==="period",In=ut._plots[Be._mainSubplot];(fn.K===R.K?In.zerolinelayer.selectAll("."+Be._id+"zl"):fn.K===B.K?In.minorGridlayer.selectAll("."+Be._id):fn.K===U.K?In.gridlayer.selectAll("."+Be._id):In[Be._id.charAt(0)+"axislayer"]).each(function(){var Cn=_.select(this);fn.L&&(Cn=Cn.selectAll(fn.L)),Cn.each(function(Nn){var Hn=Be.l2p(hn?ot(Nn):Nn.x)+Be._offset,qn=_.select(this);HnBe["_visibleLabelMin_"+on._id]?qn.style("display","none"):fn.K!=="tick"||_n||qn.style("display",null)})})})})},Wt(Pt,_t+1?_t:Ot);var Gt=null;Be._selections&&(Be._selections[Lt]=Pt);var Xt=[function(){return Bt.length&&Promise.all(Bt)}];Be.automargin&&ut._redrawFromAutoMarginCount&&_t===90?(Gt=90,Xt.push(function(){Wt(Pt,_t)})):Xt.push(function(){if(Wt(Pt,Ot),Ct.length&&bt==="x"&&!w(Ot)&&(Be.type!=="log"||String(Be.dtick).charAt(0)!=="D")){Gt=0;var yn,ln=0,kn=[];if(Pt.each(function(tr){ln=Math.max(ln,tr.fontSize);var kr=Be.l2p(tr.x),gr=Tt(this),ir=r.bBox(gr.node());kn.push({top:0,bottom:10,height:10,left:kr-ir.width/2,right:kr+ir.width/2+2,width:ir.width+2})}),Be.tickson!=="boundaries"&&!Be.showdividers||Qe.secondary){var Wn=Ct.length,wn=Math.abs((Ct[Wn-1].x-Ct[0].x)*Be._m)/(Wn-1),on=Be.ticklabelposition||"",_n=function(tr){return on.indexOf(tr)!==-1},fn=_n("top"),hn=_n("left"),In=_n("right"),Cn=_n("bottom")||hn||fn||In?(Be.tickwidth||0)+6:0,Nn=wn<2.5*ln||Be.type==="multicategory"||Be._name==="realaxis";for(yn=0;yn1)for(Ct=1;Ct2*h}(a,n))return"date";var d=o.autotypenumbers!=="strict";return function(v,x){for(var g=v.length,y=i(g),k=0,h=0,M={},A=0;A2*k}(a,d)?"category":function(v,x){for(var g=v.length,y=0;y=2){var h,M,A="";if(k.length===2){for(h=0;h<2;h++)if(M=d(k[h])){A=u;break}}var C=y("pattern",A);if(C===u)for(h=0;h<2;h++)(M=d(k[h]))&&(x.bounds[h]=k[h]=M-1);if(C)for(h=0;h<2;h++)switch(M=k[h],C){case u:if(!_(M)||(M=+M)!==Math.floor(M)||M<0||M>=7)return void(x.enabled=!1);x.bounds[h]=k[h]=M;break;case p:if(!_(M)||(M=+M)<0||M>24)return void(x.enabled=!1);x.bounds[h]=k[h]=M}if(g.autorange===!1){var L=g.range;if(L[0]L[1])return void(x.enabled=!1)}else if(k[0]>L[0]&&k[1]l?1:-1:+(T.substr(1)||1)-+(m.substr(1)||1)},E.ref2id=function(T){return!!/^[xyz]/.test(T)&&T.split(" ")[0]},E.isLinked=function(T,m){return s(m,T._axisMatchGroups)||s(m,T._axisConstraintGroups)}},15258:function(D){D.exports=function(E,e,_,w){if(e.type==="category"){var s,T=E.categoryarray,m=Array.isArray(T)&&T.length>0;m&&(s="array");var f,l=_("categoryorder",s);l==="array"&&(f=_("categoryarray")),m||l!=="array"||(l=e.categoryorder="trace"),l==="trace"?e._initialCategories=[]:l==="array"?e._initialCategories=f.slice():(f=function(t,i){var r,n,o,a=i.dataAttr||t._id.charAt(0),u={};if(i.axData)r=i.axData;else for(r=[],n=0;nv?x.substr(v):g.substr(d))+y:x+g+c*b:y}function u(c,b){for(var d=b._size,v=d.h/d.w,x={},g=Object.keys(c),y=0;yl*O)||B){for(d=0;dK&&seY&&(Y=se);h/=(Y-Q)/(2*X),Q=g.l2r(Q),Y=g.l2r(Y),g.range=g._input.range=V=0?Math.min(se,.9):1/(1/Math.max(se,-.3)+3.222))}function V(se,fe,xe,he,de){return se.append("path").attr("class","zoombox").style({fill:fe>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",l(xe,he)).attr("d",de+"Z")}function H(se,fe,xe){return se.append("path").attr("class","zoombox-corners").style({fill:i.background,stroke:i.defaultLine,"stroke-width":1,opacity:0}).attr("transform",l(fe,xe)).attr("d","M0,0Z")}function ee(se,fe,xe,he,de,pe){se.attr("d",he+"M"+xe.l+","+xe.t+"v"+xe.h+"h"+xe.w+"v-"+xe.h+"h-"+xe.w+"Z"),Q(se,fe,de,pe)}function Q(se,fe,xe,he){xe||(se.transition().style("fill",he>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),fe.transition().style("opacity",1).duration(200))}function Y(se){_.select(se).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function X(se){I&&se.data&&se._context.showTips&&(w.notifier(w._(se,"Double-click to zoom back out"),"long"),I=!1)}function K(se){var fe=Math.floor(Math.min(se.b-se.t,se.r-se.l,O)/2);return"M"+(se.l-3.5)+","+(se.t-.5+fe)+"h3v"+-fe+"h"+fe+"v-3h-"+(fe+3)+"ZM"+(se.r+3.5)+","+(se.t-.5+fe)+"h-3v"+-fe+"h"+-fe+"v-3h"+(fe+3)+"ZM"+(se.r+3.5)+","+(se.b+.5-fe)+"h-3v"+fe+"h"+-fe+"v3h"+(fe+3)+"ZM"+(se.l-3.5)+","+(se.b+.5-fe)+"h3v"+fe+"h"+fe+"v3h-"+(fe+3)+"Z"}function te(se,fe,xe,he,de){for(var pe,ye,Re,we,Ae=!1,Me={},Ce={},ne=(de||{}).xaHash,ue=(de||{}).yaHash,me=0;me=0)fn._fullLayout._deactivateShape(fn);else{var hn=fn._fullLayout.clickmode;if(Y(fn),on!==2||Dt||nn(),xt)hn.indexOf("select")>-1&&M(_n,fn,ne,ue,fe.id,pt),hn.indexOf("event")>-1&&n.click(fn,_n,fe.id);else if(on===1&&Dt){var In=ye?Ae:we,Cn=ye==="s"||Re==="w"?0:1,Nn=In._name+".range["+Cn+"]",Hn=function(tr,kr){var gr,ir=tr.range[kr],dr=Math.abs(ir-tr.range[1-kr]);return tr.type==="date"?ir:tr.type==="log"?(gr=Math.ceil(Math.max(0,-Math.log(dr)/Math.LN10))+3,s("."+gr+"g")(Math.pow(10,ir))):(gr=Math.floor(Math.log(Math.abs(ir))/Math.LN10)-Math.floor(Math.log(dr)/Math.LN10)+4,s("."+String(gr)+"g")(ir))}(In,Cn),qn="left",or="middle";if(In.fixedrange)return;ye?(or=ye==="n"?"top":"bottom",In.side==="right"&&(qn="right")):Re==="e"&&(qn="right"),fn._context.showAxisRangeEntryBoxes&&_.select(qt).call(t.makeEditable,{gd:fn,immediate:!0,background:fn._fullLayout.paper_bgcolor,text:String(Hn),fill:In.tickfont?In.tickfont.color:"#444",horizontalAlign:qn,verticalAlign:or}).on("edit",function(tr){var kr=In.d2r(tr);kr!==void 0&&f.call("_guiRelayout",fn,Nn,kr)})}}}function Ct(on,_n){if(se._transitioningWithDuration)return!1;var fn=Math.max(0,Math.min(Ee,yt*on+Nt)),hn=Math.max(0,Math.min(Ue,Et*_n+Je)),In=Math.abs(fn-Nt),Cn=Math.abs(hn-Je);function Nn(){Oe="",Ke.r=Ke.l,Ke.t=Ke.b,Qe.attr("d","M0,0Z")}if(Ke.l=Math.min(Nt,fn),Ke.r=Math.max(Nt,fn),Ke.t=Math.min(Je,hn),Ke.b=Math.max(Je,hn),De.isSubplotConstrained)In>O||Cn>O?(Oe="xy",In/Ee>Cn/Ue?(Cn=In*Ue/Ee,Je>hn?Ke.t=Je-Cn:Ke.b=Je+Cn):(In=Cn*Ee/Ue,Nt>fn?Ke.l=Nt-In:Ke.r=Nt+In),Qe.attr("d",K(Ke))):Nn();else if(je.isSubplotConstrained)if(In>O||Cn>O){Oe="xy";var Hn=Math.min(Ke.l/Ee,(Ue-Ke.b)/Ue),qn=Math.max(Ke.r/Ee,(Ue-Ke.t)/Ue);Ke.l=Hn*Ee,Ke.r=qn*Ee,Ke.b=(1-Hn)*Ue,Ke.t=(1-qn)*Ue,Qe.attr("d",K(Ke))}else Nn();else!be||Cn0){var or;if(je.isSubplotConstrained||!ge&&be.length===1){for(or=0;org[1]-.000244140625&&(T.domain=t),w.noneOrAll(s.domain,T.domain,t),T.tickmode==="sync"&&(T.tickmode="auto")}return m("layer"),T}},89426:function(D,E,e){var _=e(59652);D.exports=function(w,s,T,m,f){f||(f={});var l=f.tickSuffixDflt,t=_(w);T("tickprefix")&&T("showtickprefix",t),T("ticksuffix",l)&&T("showticksuffix",t)}},42449:function(D,E,e){var _=e(18783).FROM_BL;D.exports=function(w,s,T){T===void 0&&(T=_[w.constraintoward||"center"]);var m=[w.r2l(w.range[0]),w.r2l(w.range[1])],f=m[0]+(m[1]-m[0])*T;w.range=w._input.range=[w.l2r(f+(m[0]-f)*s),w.l2r(f+(m[1]-f)*s)],w.setScale()}},21994:function(D,E,e){var _=e(39898),w=e(84096).g0,s=e(71828),T=s.numberFormat,m=e(92770),f=s.cleanNumber,l=s.ms2DateTime,t=s.dateTime2ms,i=s.ensureNumber,r=s.isArrayOrTypedArray,n=e(50606),o=n.FP_SAFE,a=n.BADNUM,u=n.LOG_CLIP,p=n.ONEWEEK,c=n.ONEDAY,b=n.ONEHOUR,d=n.ONEMIN,v=n.ONESEC,x=e(41675),g=e(85555),y=g.HOUR_PATTERN,k=g.WEEKDAY_PATTERN;function h(A){return Math.pow(10,A)}function M(A){return A!=null}D.exports=function(A,C){C=C||{};var L=A._id||"x",O=L.charAt(0);function I(te,ae){if(te>0)return Math.log(te)/Math.LN10;if(te<=0&&ae&&A.range&&A.range.length===2){var oe=A.range[0],se=A.range[1];return .5*(oe+se-2*u*Math.abs(oe-se))}return a}function R(te,ae,oe,se){if((se||{}).msUTC&&m(te))return+te;var fe=t(te,oe||A.calendar);if(fe===a){if(!m(te))return a;te=+te;var xe=Math.floor(10*s.mod(te+.05,1)),he=Math.round(te-xe/10);fe=t(new Date(he))+xe/10}return fe}function U(te,ae,oe){return l(te,ae,oe||A.calendar)}function B(te){return A._categories[Math.round(te)]}function G(te){if(M(te)){if(A._categoriesMap===void 0&&(A._categoriesMap={}),A._categoriesMap[te]!==void 0)return A._categoriesMap[te];A._categories.push(typeof te=="number"?String(te):te);var ae=A._categories.length-1;return A._categoriesMap[te]=ae,ae}return a}function N(te){if(A._categoriesMap)return A._categoriesMap[te]}function j(te){var ae=N(te);return ae!==void 0?ae:m(te)?+te:void 0}function V(te){return m(te)?+te:N(te)}function H(te,ae,oe){return _.round(oe+ae*te,2)}function ee(te,ae,oe){return(te-oe)/ae}var Q=function(te){return m(te)?H(te,A._m,A._b):a},Y=function(te){return ee(te,A._m,A._b)};if(A.rangebreaks){var X=O==="y";Q=function(te){if(!m(te))return a;var ae=A._rangebreaks.length;if(!ae)return H(te,A._m,A._b);var oe=X;A.range[0]>A.range[1]&&(oe=!oe);for(var se=oe?-1:1,fe=se*te,xe=0,he=0;hepe)){xe=fe<(de+pe)/2?he:he+1;break}xe=he+1}var ye=A._B[xe]||0;return isFinite(ye)?H(te,A._m2,ye):0},Y=function(te){var ae=A._rangebreaks.length;if(!ae)return ee(te,A._m,A._b);for(var oe=0,se=0;seA._rangebreaks[se].pmax&&(oe=se+1);return ee(te,A._m2,A._B[oe])}}A.c2l=A.type==="log"?I:i,A.l2c=A.type==="log"?h:i,A.l2p=Q,A.p2l=Y,A.c2p=A.type==="log"?function(te,ae){return Q(I(te,ae))}:Q,A.p2c=A.type==="log"?function(te){return h(Y(te))}:Y,["linear","-"].indexOf(A.type)!==-1?(A.d2r=A.r2d=A.d2c=A.r2c=A.d2l=A.r2l=f,A.c2d=A.c2r=A.l2d=A.l2r=i,A.d2p=A.r2p=function(te){return A.l2p(f(te))},A.p2d=A.p2r=Y,A.cleanPos=i):A.type==="log"?(A.d2r=A.d2l=function(te,ae){return I(f(te),ae)},A.r2d=A.r2c=function(te){return h(f(te))},A.d2c=A.r2l=f,A.c2d=A.l2r=i,A.c2r=I,A.l2d=h,A.d2p=function(te,ae){return A.l2p(A.d2r(te,ae))},A.p2d=function(te){return h(Y(te))},A.r2p=function(te){return A.l2p(f(te))},A.p2r=Y,A.cleanPos=i):A.type==="date"?(A.d2r=A.r2d=s.identity,A.d2c=A.r2c=A.d2l=A.r2l=R,A.c2d=A.c2r=A.l2d=A.l2r=U,A.d2p=A.r2p=function(te,ae,oe){return A.l2p(R(te,0,oe))},A.p2d=A.p2r=function(te,ae,oe){return U(Y(te),ae,oe)},A.cleanPos=function(te){return s.cleanDate(te,a,A.calendar)}):A.type==="category"?(A.d2c=A.d2l=G,A.r2d=A.c2d=A.l2d=B,A.d2r=A.d2l_noadd=j,A.r2c=function(te){var ae=V(te);return ae!==void 0?ae:A.fraction2r(.5)},A.l2r=A.c2r=i,A.r2l=V,A.d2p=function(te){return A.l2p(A.r2c(te))},A.p2d=function(te){return B(Y(te))},A.r2p=A.d2p,A.p2r=Y,A.cleanPos=function(te){return typeof te=="string"&&te!==""?te:i(te)}):A.type==="multicategory"&&(A.r2d=A.c2d=A.l2d=B,A.d2r=A.d2l_noadd=j,A.r2c=function(te){var ae=j(te);return ae!==void 0?ae:A.fraction2r(.5)},A.r2c_just_indices=N,A.l2r=A.c2r=i,A.r2l=j,A.d2p=function(te){return A.l2p(A.r2c(te))},A.p2d=function(te){return B(Y(te))},A.r2p=A.d2p,A.p2r=Y,A.cleanPos=function(te){return Array.isArray(te)||typeof te=="string"&&te!==""?te:i(te)},A.setupMultiCategory=function(te){var ae,oe,se=A._traceIndices,fe=A._matchGroup;if(fe&&A._categories.length===0){for(var xe in fe)if(xe!==L){var he=C[x.id2name(xe)];se=se.concat(he._traceIndices)}}var de=[[0,{}],[0,{}]],pe=[];for(ae=0;aeo&&(fe[oe]=o),fe[0]===fe[1]){var he=Math.max(1,Math.abs(1e-6*fe[0]));fe[0]-=he,fe[1]+=he}}else s.nestedProperty(A,te).set(se)},A.setScale=function(te){var ae=C._size;if(A.overlaying){var oe=x.getFromId({_fullLayout:C},A.overlaying);A.domain=oe.domain}var se=te&&A._r?"_r":"range",fe=A.calendar;A.cleanRange(se);var xe,he,de=A.r2l(A[se][0],fe),pe=A.r2l(A[se][1],fe),ye=O==="y";if(ye?(A._offset=ae.t+(1-A.domain[1])*ae.h,A._length=ae.h*(A.domain[1]-A.domain[0]),A._m=A._length/(de-pe),A._b=-A._m*pe):(A._offset=ae.l+A.domain[0]*ae.w,A._length=ae.w*(A.domain[1]-A.domain[0]),A._m=A._length/(pe-de),A._b=-A._m*de),A._rangebreaks=[],A._lBreaks=0,A._m2=0,A._B=[],A.rangebreaks&&(A._rangebreaks=A.locateBreaks(Math.min(de,pe),Math.max(de,pe)),A._rangebreaks.length)){for(xe=0;xepe&&(Re=!Re),Re&&A._rangebreaks.reverse();var we=Re?-1:1;for(A._m2=we*A._length/(Math.abs(pe-de)-A._lBreaks),A._B.push(-A._m2*(ye?pe:de)),xe=0;xese&&(se+=7,fese&&(se+=24,fe=oe&&fe=oe&&te=je.min&&(Teje.max&&(je.max=Ee),Ue=!1)}Ue&&he.push({min:Te,max:Ee})}};for(oe=0;oet.duration?(function(){for(var y={},k=0;k rect").call(T.setTranslate,0,0).call(T.setScale,1,1),d.plot.call(T.setTranslate,v._offset,x._offset).call(T.setScale,1,1);var g=d.plot.selectAll(".scatterlayer .trace");g.selectAll(".point").call(T.setPointGroupScale,1,1),g.selectAll(".textpoint").call(T.setTextPointsScale,1,1),g.call(T.hideOutsideRangePoints,d)}function b(d,v){var x=d.plotinfo,g=x.xaxis,y=x.yaxis,k=g._length,h=y._length,M=!!d.xr1,A=!!d.yr1,C=[];if(M){var L=s.simpleMap(d.xr0,g.r2l),O=s.simpleMap(d.xr1,g.r2l),I=L[1]-L[0],R=O[1]-O[0];C[0]=(L[0]*(1-v)+v*O[0]-L[0])/(L[1]-L[0])*k,C[2]=k*(1-v+v*R/I),g.range[0]=g.l2r(L[0]*(1-v)+v*O[0]),g.range[1]=g.l2r(L[1]*(1-v)+v*O[1])}else C[0]=0,C[2]=k;if(A){var U=s.simpleMap(d.yr0,y.r2l),B=s.simpleMap(d.yr1,y.r2l),G=U[1]-U[0],N=B[1]-B[0];C[1]=(U[1]*(1-v)+v*B[1]-U[1])/(U[0]-U[1])*h,C[3]=h*(1-v+v*N/G),y.range[0]=g.l2r(U[0]*(1-v)+v*B[0]),y.range[1]=y.l2r(U[1]*(1-v)+v*B[1])}else C[1]=0,C[3]=h;m.drawOne(f,g,{skipTitle:!0}),m.drawOne(f,y,{skipTitle:!0}),m.redrawComponents(f,[g._id,y._id]);var j=M?k/C[2]:1,V=A?h/C[3]:1,H=M?C[0]:0,ee=A?C[1]:0,Q=M?C[0]/C[2]*k:0,Y=A?C[1]/C[3]*h:0,X=g._offset-Q,K=y._offset-Y;x.clipRect.call(T.setTranslate,H,ee).call(T.setScale,1/j,1/V),x.plot.call(T.setTranslate,X,K).call(T.setScale,j,V),T.setPointGroupScale(x.zoomScalePts,1/j,1/V),T.setTextPointsScale(x.zoomScaleTxt,1/j,1/V)}m.redrawComponents(f)}},951:function(D,E,e){var _=e(73972).traceIs,w=e(4322);function s(m){return{v:"x",h:"y"}[m.orientation||"v"]}function T(m,f){var l=s(m),t=_(m,"box-violin"),i=_(m._fullInput||{},"candlestick");return t&&!i&&f===l&&m[l]===void 0&&m[l+"0"]===void 0}D.exports=function(m,f,l,t){l("autotypenumbers",t.autotypenumbersDflt),l("type",(t.splomStash||{}).type)==="-"&&(function(i,r){if(i.type==="-"){var n,o=i._id,a=o.charAt(0);o.indexOf("scene")!==-1&&(o=a);var u=function(y,k,h){for(var M=0;M0&&(A["_"+h+"axes"]||{})[k]||(A[h+"axis"]||h)===k&&(T(A,h)||(A[h]||[]).length||A[h+"0"]))return A}}(r,o,a);if(u)if(u.type!=="histogram"||a!=={v:"y",h:"x"}[u.orientation||"v"]){var p=a+"calendar",c=u[p],b={noMultiCategory:!_(u,"cartesian")||_(u,"noMultiCategory")};if(u.type==="box"&&u._hasPreCompStats&&a==={h:"x",v:"y"}[u.orientation||"v"]&&(b.noMultiCategory=!0),b.autotypenumbers=i.autotypenumbers,T(u,a)){var d=s(u),v=[];for(n=0;n0?".":"")+n;w.isPlainObject(o)?f(o,t,a,r+1):t(a,n,o)}})}E.manageCommandObserver=function(l,t,i,r){var n={},o=!0;t&&t._commandObserver&&(n=t._commandObserver),n.cache||(n.cache={}),n.lookupTable={};var a=E.hasSimpleAPICommandBindings(l,i,n.lookupTable);if(t&&t._commandObserver){if(a)return n;if(t._commandObserver.remove)return t._commandObserver.remove(),t._commandObserver=null,n}if(a){s(l,a,n.cache),n.check=function(){if(o){var c=s(l,a,n.cache);return c.changed&&r&&n.lookupTable[c.value]!==void 0&&(n.disable(),Promise.resolve(r({value:c.value,type:a.type,prop:a.prop,traces:a.traces,index:n.lookupTable[c.value]})).then(n.enable,n.enable)),c.changed}};for(var u=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],p=0;p0&&R<0&&(R+=360);var G=(R-I)/4;return{type:"Polygon",coordinates:[[[I,U],[I,B],[I+G,B],[I+2*G,B],[I+3*G,B],[R,B],[R,U],[R-G,U],[R-2*G,U],[R-3*G,U],[I,U]]]}}D.exports=function(C){return new h(C)},M.plot=function(C,L,O,I){var R=this;if(I)return R.update(C,L,!0);R._geoCalcData=C,R._fullLayout=L;var U=L[this.id],B=[],G=!1;for(var N in x.layerNameToAdjective)if(N!=="frame"&&U["show"+N]){G=!0;break}for(var j=!1,V=0;V0&&B._module.calcGeoJSON(U,L)}if(!O){if(this.updateProjection(C,L))return;this.viewInitial&&this.scope===I.scope||this.saveViewInitial(I)}this.scope=I.scope,this.updateBaseLayers(L,I),this.updateDims(L,I),this.updateFx(L,I),o.generalUpdatePerTraceModule(this.graphDiv,this,C,I);var G=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=G.selectAll(".point"),this.dataPoints.text=G.selectAll("text"),this.dataPaths.line=G.selectAll(".js-line");var N=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=N.selectAll("path"),this._render()},M.updateProjection=function(C,L){var O=this.graphDiv,I=L[this.id],R=L._size,U=I.domain,B=I.projection,G=I.lonaxis,N=I.lataxis,j=G._ax,V=N._ax,H=this.projection=function(Ce){var ne=Ce.projection,ue=ne.type,me=x.projNames[ue];me="geo"+l.titleCase(me);for(var Te=(w[me]||m[me])(),Ee=Ce._isSatellite?180*Math.acos(1/ne.distance)/Math.PI:Ce._isClipped?x.lonaxisSpan[ue]/2:null,Ue=["center","rotate","parallels","clipExtent"],De=function(be){return be?Te:[]},je=0;jeEe*Math.PI/180}return!1},Te.getPath=function(){return s().projection(Te)},Te.getBounds=function(be){return Te.getPath().bounds(be)},Te.precision(x.precision),Ce._isSatellite&&Te.tilt(ne.tilt).distance(ne.distance),Ee&&Te.clipAngle(Ee-x.clipPad),Te}(I),ee=[[R.l+R.w*U.x[0],R.t+R.h*(1-U.y[1])],[R.l+R.w*U.x[1],R.t+R.h*(1-U.y[0])]],Q=I.center||{},Y=B.rotation||{},X=G.range||[],K=N.range||[];if(I.fitbounds){j._length=ee[1][0]-ee[0][0],V._length=ee[1][1]-ee[0][1],j.range=u(O,j),V.range=u(O,V);var te=(j.range[0]+j.range[1])/2,ae=(V.range[0]+V.range[1])/2;if(I._isScoped)Q={lon:te,lat:ae};else if(I._isClipped){Q={lon:te,lat:ae},Y={lon:te,lat:ae,roll:Y.roll};var oe=B.type,se=x.lonaxisSpan[oe]/2||180,fe=x.lataxisSpan[oe]/2||90;X=[te-se,te+se],K=[ae-fe,ae+fe]}else Q={lon:te,lat:ae},Y={lon:te,lat:Y.lat,roll:Y.roll}}H.center([Q.lon-Y.lon,Q.lat-Y.lat]).rotate([-Y.lon,-Y.lat,Y.roll]).parallels(B.parallels);var xe=A(X,K);H.fitExtent(ee,xe);var he=this.bounds=H.getBounds(xe),de=this.fitScale=H.scale(),pe=H.translate();if(I.fitbounds){var ye=H.getBounds(A(j.range,V.range)),Re=Math.min((he[1][0]-he[0][0])/(ye[1][0]-ye[0][0]),(he[1][1]-he[0][1])/(ye[1][1]-ye[0][1]));isFinite(Re)?H.scale(Re*de):l.warn("Something went wrong during"+this.id+"fitbounds computations.")}else H.scale(B.scale*de);var we=this.midPt=[(he[0][0]+he[1][0])/2,(he[0][1]+he[1][1])/2];if(H.translate([pe[0]+(we[0]-pe[0]),pe[1]+(we[1]-pe[1])]).clipExtent(he),I._isAlbersUsa){var Ae=H([Q.lon,Q.lat]),Me=H.translate();H.translate([Me[0]-(Ae[0]-Me[0]),Me[1]-(Ae[1]-Me[1])])}},M.updateBaseLayers=function(C,L){var O=this,I=O.topojson,R=O.layers,U=O.basePaths;function B(H){return H==="lonaxis"||H==="lataxis"}function G(H){return!!x.lineLayers[H]}function N(H){return!!x.fillLayers[H]}var j=(this.hasChoropleth?x.layersForChoropleth:x.layers).filter(function(H){return G(H)||N(H)?L["show"+H]:!B(H)||L[H].showgrid}),V=O.framework.selectAll(".layer").data(j,String);V.exit().each(function(H){delete R[H],delete U[H],_.select(this).remove()}),V.enter().append("g").attr("class",function(H){return"layer "+H}).each(function(H){var ee=R[H]=_.select(this);H==="bg"?O.bgRect=ee.append("rect").style("pointer-events","all"):B(H)?U[H]=ee.append("path").style("fill","none"):H==="backplot"?ee.append("g").classed("choroplethlayer",!0):H==="frontplot"?ee.append("g").classed("scatterlayer",!0):G(H)?U[H]=ee.append("path").style("fill","none").style("stroke-miterlimit",2):N(H)&&(U[H]=ee.append("path").style("stroke","none"))}),V.order(),V.each(function(H){var ee=U[H],Q=x.layerNameToAdjective[H];H==="frame"?ee.datum(x.sphereSVG):G(H)||N(H)?ee.datum(k(I,I.objects[H])):B(H)&&ee.datum(function(Y,X,K){var te,ae,oe,se=X[Y],fe=x.scopeDefaults[X.scope];Y==="lonaxis"?(te=fe.lonaxisRange,ae=fe.lataxisRange,oe=function(Me,Ce){return[Me,Ce]}):Y==="lataxis"&&(te=fe.lataxisRange,ae=fe.lonaxisRange,oe=function(Me,Ce){return[Ce,Me]});var xe={type:"linear",range:[te[0],te[1]-1e-6],tick0:se.tick0,dtick:se.dtick};a.setConvert(xe,K);var he=a.calcTicks(xe);X.isScoped||Y!=="lonaxis"||he.pop();for(var de=he.length,pe=new Array(de),ye=0;ye-1&&d(_.event,I,[O.xaxis],[O.yaxis],O.id,G),B.indexOf("event")>-1&&n.click(I,_.event))})}function N(j){return O.projection.invert([j[0]+O.xaxis._offset,j[1]+O.yaxis._offset])}},M.makeFramework=function(){var C=this,L=C.graphDiv,O=L._fullLayout,I="clip"+O._uid+C.id;C.clipDef=O._clips.append("clipPath").attr("id",I),C.clipRect=C.clipDef.append("rect"),C.framework=_.select(C.container).append("g").attr("class","geo "+C.id).call(r.setClipUrl,I,L),C.project=function(R){var U=C.projection(R);return U?[U[0]-C.xaxis._offset,U[1]-C.yaxis._offset]:[null,null]},C.xaxis={_id:"x",c2p:function(R){return C.project(R)[0]}},C.yaxis={_id:"y",c2p:function(R){return C.project(R)[1]}},C.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},a.setConvert(C.mockAxis,O)},M.saveViewInitial=function(C){var L,O=C.center||{},I=C.projection,R=I.rotation||{};this.viewInitial={fitbounds:C.fitbounds,"projection.scale":I.scale},L=C._isScoped?{"center.lon":O.lon,"center.lat":O.lat}:C._isClipped?{"projection.rotation.lon":R.lon,"projection.rotation.lat":R.lat}:{"center.lon":O.lon,"center.lat":O.lat,"projection.rotation.lon":R.lon},l.extendFlat(this.viewInitial,L)},M.render=function(C){this._hasMarkerAngles&&C?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},M._render=function(){var C,L=this.projection,O=L.getPath();function I(U){var B=L(U.lonlat);return B?t(B[0],B[1]):null}function R(U){return L.isLonLatOverEdges(U.lonlat)?"none":null}for(C in this.basePaths)this.basePaths[C].attr("d",O);for(C in this.dataPaths)this.dataPaths[C].attr("d",function(U){return O(U.geojson)});for(C in this.dataPoints)this.dataPoints[C].attr("display",R).attr("transform",I)}},44622:function(D,E,e){var _=e(27659).AU,w=e(71828).counterRegex,s=e(69082),T="geo",m=w(T),f={};f.geo={valType:"subplotid",dflt:T,editType:"calc"},D.exports={attr:T,name:T,idRoot:T,idRegex:m,attrRegex:m,attributes:f,layoutAttributes:e(77519),supplyLayoutDefaults:e(82161),plot:function(l){for(var t=l._fullLayout,i=l.calcdata,r=t._subplots.geo,n=0;n0&&N<0&&(N+=360);var j,V,H,ee=(G+N)/2;if(!b){var Q=d?p.projRotate:[ee,0,0];j=r("projection.rotation.lon",Q[0]),r("projection.rotation.lat",Q[1]),r("projection.rotation.roll",Q[2]),r("showcoastlines",!d&&k)&&(r("coastlinecolor"),r("coastlinewidth")),r("showocean",!!k&&void 0)&&r("oceancolor")}b?(V=-96.6,H=38.7):(V=d?ee:j,H=(B[0]+B[1])/2),r("center.lon",V),r("center.lat",H),v&&(r("projection.tilt"),r("projection.distance")),x&&r("projection.parallels",p.projParallels||[0,60]),r("projection.scale"),r("showland",!!k&&void 0)&&r("landcolor"),r("showlakes",!!k&&void 0)&&r("lakecolor"),r("showrivers",!!k&&void 0)&&(r("rivercolor"),r("riverwidth")),r("showcountries",d&&u!=="usa"&&k)&&(r("countrycolor"),r("countrywidth")),(u==="usa"||u==="north america"&&a===50)&&(r("showsubunits",k),r("subunitcolor"),r("subunitwidth")),d||r("showframe",k)&&(r("framecolor"),r("framewidth")),r("bgcolor"),r("fitbounds")&&(delete i.projection.scale,d?(delete i.center.lon,delete i.center.lat):g?(delete i.center.lon,delete i.center.lat,delete i.projection.rotation.lon,delete i.projection.rotation.lat,delete i.lonaxis.range,delete i.lataxis.range):(delete i.center.lon,delete i.center.lat,delete i.projection.rotation.lon))}D.exports=function(t,i,r){w(t,i,r,{type:"geo",attributes:m,handleDefaults:l,fullData:r,partition:"y"})}},74455:function(D,E,e){var _=e(39898),w=e(71828),s=e(73972),T=Math.PI/180,m=180/Math.PI,f={cursor:"pointer"},l={cursor:"auto"};function t(k,h){return _.behavior.zoom().translate(h.translate()).scale(h.scale())}function i(k,h,M){var A=k.id,C=k.graphDiv,L=C.layout,O=L[A],I=C._fullLayout,R=I[A],U={},B={};function G(N,j){U[A+"."+N]=w.nestedProperty(O,N).get(),s.call("_storeDirectGUIEdit",L,I._preGUI,U);var V=w.nestedProperty(R,N);V.get()!==j&&(V.set(j),w.nestedProperty(O,N).set(j),B[A+"."+N]=j)}M(G),G("projection.scale",h.scale()/k.fitScale),G("fitbounds",!1),C.emit("plotly_relayout",B)}function r(k,h){var M=t(0,h);function A(C){var L=h.invert(k.midPt);C("center.lon",L[0]),C("center.lat",L[1])}return M.on("zoomstart",function(){_.select(this).style(f)}).on("zoom",function(){h.scale(_.event.scale).translate(_.event.translate),k.render(!0);var C=h.invert(k.midPt);k.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":h.scale()/k.fitScale,"geo.center.lon":C[0],"geo.center.lat":C[1]})}).on("zoomend",function(){_.select(this).style(l),i(k,h,A)}),M}function n(k,h){var M,A,C,L,O,I,R,U,B,G=t(0,h);function N(V){return h.invert(V)}function j(V){var H=h.rotate(),ee=h.invert(k.midPt);V("projection.rotation.lon",-H[0]),V("center.lon",ee[0]),V("center.lat",ee[1])}return G.on("zoomstart",function(){_.select(this).style(f),M=_.mouse(this),A=h.rotate(),C=h.translate(),L=A,O=N(M)}).on("zoom",function(){if(I=_.mouse(this),function(ee){var Q=N(ee);if(!Q)return!0;var Y=h(Q);return Math.abs(Y[0]-ee[0])>2||Math.abs(Y[1]-ee[1])>2}(M))return G.scale(h.scale()),void G.translate(h.translate());h.scale(_.event.scale),h.translate([C[0],_.event.translate[1]]),O?N(I)&&(U=N(I),R=[L[0]+(U[0]-O[0]),A[1],A[2]],h.rotate(R),L=R):O=N(M=I),B=!0,k.render(!0);var V=h.rotate(),H=h.invert(k.midPt);k.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":h.scale()/k.fitScale,"geo.center.lon":H[0],"geo.center.lat":H[1],"geo.projection.rotation.lon":-V[0]})}).on("zoomend",function(){_.select(this).style(l),B&&i(k,h,j)}),G}function o(k,h){var M;h.rotate(),h.scale();var A=t(0,h),C=function(G){for(var N=0,j=arguments.length,V=[];++Nj?(L=(B>0?90:-90)-N,C=0):(L=Math.asin(B/j)*m-N,C=Math.sqrt(j*j-B*B));var V=180-L-2*N,H=(Math.atan2(G,U)-Math.atan2(R,C))*m,ee=(Math.atan2(G,U)-Math.atan2(R,-C))*m;return d(M[0],M[1],L,H)<=d(M[0],M[1],V,ee)?[L,H,M[2]]:[V,ee,M[2]]}function d(k,h,M,A){var C=v(M-k),L=v(A-h);return Math.sqrt(C*C+L*L)}function v(k){return(k%360+540)%360-180}function x(k,h,M){var A=M*T,C=k.slice(),L=h===0?1:0,O=h===2?1:2,I=Math.cos(A),R=Math.sin(A);return C[L]=k[L]*I-k[O]*R,C[O]=k[O]*I+k[L]*R,C}function g(k){return[Math.atan2(2*(k[0]*k[1]+k[2]*k[3]),1-2*(k[1]*k[1]+k[2]*k[2]))*m,Math.asin(Math.max(-1,Math.min(1,2*(k[0]*k[2]-k[3]*k[1]))))*m,Math.atan2(2*(k[0]*k[3]+k[1]*k[2]),1-2*(k[2]*k[2]+k[3]*k[3]))*m]}function y(k,h){for(var M=0,A=0,C=k.length;AMath.abs(b)?(r.boxEnd[1]=r.boxStart[1]+Math.abs(c)*O*(b>=0?1:-1),r.boxEnd[1]d[3]&&(r.boxEnd[1]=d[3],r.boxEnd[0]=r.boxStart[0]+(d[3]-r.boxStart[1])/Math.abs(O))):(r.boxEnd[0]=r.boxStart[0]+Math.abs(b)/O*(c>=0?1:-1),r.boxEnd[0]d[2]&&(r.boxEnd[0]=d[2],r.boxEnd[1]=r.boxStart[1]+(d[2]-r.boxStart[0])*Math.abs(O)))}}else r.boxEnabled?(c=r.boxStart[0]!==r.boxEnd[0],b=r.boxStart[1]!==r.boxEnd[1],c||b?(c&&(h(0,r.boxStart[0],r.boxEnd[0]),l.xaxis.autorange=!1),b&&(h(1,r.boxStart[1],r.boxEnd[1]),l.yaxis.autorange=!1),l.relayoutCallback()):l.glplot.setDirty(),r.boxEnabled=!1,r.boxInited=!1):r.boxInited&&(r.boxInited=!1);break;case"pan":r.boxEnabled=!1,r.boxInited=!1,a?(r.panning||(r.dragStart[0]=u,r.dragStart[1]=p),Math.abs(r.dragStart[0]-u).999&&(g="turntable"):g="turntable")}else g="turntable";o("dragmode",g),o("hovermode",a.getDfltFromLayout("hovermode"))}D.exports=function(r,n,o){var a=n._basePlotModules.length>1;T(r,n,o,{type:t,attributes:f,handleDefaults:i,fullLayout:n,font:n.font,fullData:o,getDfltFromLayout:function(u){if(!a)return _.validate(r[u],f[u])?r[u]:void 0},autotypenumbersDflt:n.autotypenumbers,paper_bgcolor:n.paper_bgcolor,calendar:n.calendar})}},65500:function(D,E,e){var _=e(77894),w=e(27670).Y,s=e(1426).extendFlat,T=e(71828).counterRegex;function m(f,l,t){return{x:{valType:"number",dflt:f,editType:"camera"},y:{valType:"number",dflt:l,editType:"camera"},z:{valType:"number",dflt:t,editType:"camera"},editType:"camera"}}D.exports={_arrayAttrRegexps:[T("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:s(m(0,0,1),{}),center:s(m(0,0,0),{}),eye:s(m(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:w({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:_,yaxis:_,zaxis:_,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",_deprecated:{cameraposition:{valType:"info_array",editType:"camera"}}}},13133:function(D,E,e){var _=e(78614),w=["xaxis","yaxis","zaxis"];function s(){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]}s.prototype.merge=function(T){for(var m=0;m<3;++m){var f=T[w[m]];f.visible?(this.enabled[m]=f.showspikes,this.colors[m]=_(f.spikecolor),this.drawSides[m]=f.spikesides,this.lineWidth[m]=f.spikethickness):(this.enabled[m]=!1,this.drawSides[m]=!1)}},D.exports=function(T){var m=new s;return m.merge(T),m}},96085:function(D,E,e){D.exports=function(m){for(var f=m.axesOptions,l=m.glplot.axesPixels,t=m.fullSceneLayout,i=[[],[],[]],r=0;r<3;++r){var n=t[s[r]];if(n._length=(l[r].hi-l[r].lo)*l[r].pixelsPerDataUnit/m.dataScale[r],Math.abs(n._length)===1/0||isNaN(n._length))i[r]=[];else{n._input_range=n.range.slice(),n.range[0]=l[r].lo/m.dataScale[r],n.range[1]=l[r].hi/m.dataScale[r],n._m=1/(m.dataScale[r]*l[r].pixelsPerDataUnit),n.range[0]===n.range[1]&&(n.range[0]-=1,n.range[1]+=1);var o=n.tickmode;if(n.tickmode==="auto"){n.tickmode="linear";var a=n.nticks||w.constrain(n._length/40,4,9);_.autoTicks(n,Math.abs(n.range[1]-n.range[0])/a)}for(var u=_.calcTicks(n,{msUTC:!0}),p=0;p/g," "));i[r]=u,n.tickmode=o}}for(f.ticks=i,r=0;r<3;++r)for(T[r]=.5*(m.glplot.bounds[0][r]+m.glplot.bounds[1][r]),p=0;p<2;++p)f.bounds[p][r]=m.glplot.bounds[p][r];m.contourLevels=function(c){for(var b=new Array(3),d=0;d<3;++d){for(var v=c[d],x=new Array(v.length),g=0;gI.deltaY?1.1:.9090909090909091,U=M.glplot.getAspectratio();M.glplot.setAspectratio({x:R*U.x,y:R*U.y,z:R*U.z})}O(M)}},!!l&&{passive:!1}),M.glplot.canvas.addEventListener("mousemove",function(){if(M.fullSceneLayout.dragmode!==!1&&M.camera.mouseListener.buttons!==0){var I=L();M.graphDiv.emit("plotly_relayouting",I)}}),M.staticMode||M.glplot.canvas.addEventListener("webglcontextlost",function(I){A&&A.emit&&A.emit("plotly_webglcontextlost",{event:I,layer:M.id})},!1)),M.glplot.oncontextloss=function(){M.recoverContext()},M.glplot.onrender=function(){M.render()},!0},g.render=function(){var M,A=this,C=A.graphDiv,L=A.svgContainer,O=A.container.getBoundingClientRect();C._fullLayout._calcInverseTransform(C);var I=C._fullLayout._invScaleX,R=C._fullLayout._invScaleY,U=O.width*I,B=O.height*R;L.setAttributeNS(null,"viewBox","0 0 "+U+" "+B),L.setAttributeNS(null,"width",U),L.setAttributeNS(null,"height",B),d(A),A.glplot.axes.update(A.axesOptions);for(var G=Object.keys(A.traces),N=null,j=A.glplot.selection,V=0;V")):M.type==="isosurface"||M.type==="volume"?(K.valueLabel=n.hoverLabelText(A._mockAxis,A._mockAxis.d2l(j.traceCoordinate[3]),M.valuehoverformat),se.push("value: "+K.valueLabel),j.textLabel&&se.push(j.textLabel),Q=se.join("
")):Q=j.textLabel;var fe={x:j.traceCoordinate[0],y:j.traceCoordinate[1],z:j.traceCoordinate[2],data:Y._input,fullData:Y,curveNumber:Y.index,pointNumber:X};o.appendArrayPointValue(fe,Y,X),M._module.eventData&&(fe=Y._module.eventData(fe,j,Y,{},X));var xe={points:[fe]};if(A.fullSceneLayout.hovermode){var he=[];o.loneHover({trace:Y,x:(.5+.5*ee[0]/ee[3])*U,y:(.5-.5*ee[1]/ee[3])*B,xLabel:K.xLabel,yLabel:K.yLabel,zLabel:K.zLabel,text:Q,name:N.name,color:o.castHoverOption(Y,X,"bgcolor")||N.color,borderColor:o.castHoverOption(Y,X,"bordercolor"),fontFamily:o.castHoverOption(Y,X,"font.family"),fontSize:o.castHoverOption(Y,X,"font.size"),fontColor:o.castHoverOption(Y,X,"font.color"),nameLength:o.castHoverOption(Y,X,"namelength"),textAlign:o.castHoverOption(Y,X,"align"),hovertemplate:i.castOption(Y,X,"hovertemplate"),hovertemplateLabels:i.extendFlat({},fe,K),eventData:[fe]},{container:L,gd:C,inOut_bbox:he}),fe.bbox=he[0]}j.distance<5&&(j.buttons||v)?C.emit("plotly_click",xe):C.emit("plotly_hover",xe),this.oldEventData=xe}else o.loneUnhover(L),this.oldEventData&&C.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;A.drawAnnotations(A)},g.recoverContext=function(){var M=this;M.glplot.dispose();var A=function(){M.glplot.gl.isContextLost()?requestAnimationFrame(A):M.initializeGLPlot()?M.plot.apply(M,M.plotArgs):i.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(A)};var k=["xaxis","yaxis","zaxis"];function h(M,A,C){for(var L=M.fullSceneLayout,O=0;O<3;O++){var I=k[O],R=I.charAt(0),U=L[I],B=A[R],G=A[R+"calendar"],N=A["_"+R+"length"];if(i.isArrayOrTypedArray(B))for(var j,V=0;V<(N||B.length);V++)if(i.isArrayOrTypedArray(B[V]))for(var H=0;HY[1][R])Y[0][R]=-1,Y[1][R]=1;else{var pe=Y[1][R]-Y[0][R];Y[0][R]-=pe/32,Y[1][R]+=pe/32}if(B.autorange==="reversed"){var ye=Y[0][R];Y[0][R]=Y[1][R],Y[1][R]=ye}}else{var Re=B.range;Y[0][R]=B.r2l(Re[0]),Y[1][R]=B.r2l(Re[1])}Y[0][R]===Y[1][R]&&(Y[0][R]-=1,Y[1][R]+=1),X[R]=Y[1][R]-Y[0][R],L.glplot.setBounds(R,{min:Y[0][R]*H[R],max:Y[1][R]*H[R]})}var we=N.aspectmode;if(we==="cube")Q=[1,1,1];else if(we==="manual"){var Ae=N.aspectratio;Q=[Ae.x,Ae.y,Ae.z]}else{if(we!=="auto"&&we!=="data")throw new Error("scene.js aspectRatio was not one of the enumerated types");var Me=[1,1,1];for(R=0;R<3;++R){var Ce=K[G=(B=N[k[R]]).type];Me[R]=Math.pow(Ce.acc,1/Ce.count)/H[R]}Q=we==="data"||Math.max.apply(null,Me)/Math.min.apply(null,Me)<=4?Me:[1,1,1]}N.aspectratio.x=j.aspectratio.x=Q[0],N.aspectratio.y=j.aspectratio.y=Q[1],N.aspectratio.z=j.aspectratio.z=Q[2],L.glplot.setAspectratio(N.aspectratio),L.viewInitial.aspectratio||(L.viewInitial.aspectratio={x:N.aspectratio.x,y:N.aspectratio.y,z:N.aspectratio.z}),L.viewInitial.aspectmode||(L.viewInitial.aspectmode=N.aspectmode);var ne=N.domain||null,ue=A._size||null;if(ne&&ue){var me=L.container.style;me.position="absolute",me.left=ue.l+ne.x[0]*ue.w+"px",me.top=ue.t+(1-ne.y[1])*ue.h+"px",me.width=ue.w*(ne.x[1]-ne.x[0])+"px",me.height=ue.h*(ne.y[1]-ne.y[0])+"px"}L.glplot.redraw()}},g.destroy=function(){var M=this;M.glplot&&(M.camera.mouseListener.enabled=!1,M.container.removeEventListener("wheel",M.camera.wheelListener),M.camera=null,M.glplot.dispose(),M.container.parentNode.removeChild(M.container),M.glplot=null)},g.getCamera=function(){var M,A=this;return A.camera.view.recalcMatrix(A.camera.view.lastT()),{up:{x:(M=A.camera).up[0],y:M.up[1],z:M.up[2]},center:{x:M.center[0],y:M.center[1],z:M.center[2]},eye:{x:M.eye[0],y:M.eye[1],z:M.eye[2]},projection:{type:M._ortho===!0?"orthographic":"perspective"}}},g.setViewport=function(M){var A,C=this,L=M.camera;C.camera.lookAt.apply(this,[[(A=L).eye.x,A.eye.y,A.eye.z],[A.center.x,A.center.y,A.center.z],[A.up.x,A.up.y,A.up.z]]),C.glplot.setAspectratio(M.aspectratio),L.projection.type==="orthographic"!==C.camera._ortho&&(C.glplot.redraw(),C.glplot.clearRGBA(),C.glplot.dispose(),C.initializeGLPlot())},g.isCameraChanged=function(M){var A=this.getCamera(),C=i.nestedProperty(M,this.id+".camera").get();function L(U,B,G,N){var j=["up","center","eye"],V=["x","y","z"];return B[j[G]]&&U[j[G]][V[N]]===B[j[G]][V[N]]}var O=!1;if(C===void 0)O=!0;else{for(var I=0;I<3;I++)for(var R=0;R<3;R++)if(!L(A,C,I,R)){O=!0;break}(!C.projection||A.projection&&A.projection.type!==C.projection.type)&&(O=!0)}return O},g.isAspectChanged=function(M){var A=this.glplot.getAspectratio(),C=i.nestedProperty(M,this.id+".aspectratio").get();return C===void 0||C.x!==A.x||C.y!==A.y||C.z!==A.z},g.saveLayout=function(M){var A,C,L,O,I,R,U=this,B=U.fullLayout,G=U.isCameraChanged(M),N=U.isAspectChanged(M),j=G||N;if(j){var V={};G&&(A=U.getCamera(),L=(C=i.nestedProperty(M,U.id+".camera")).get(),V[U.id+".camera"]=L),N&&(O=U.glplot.getAspectratio(),R=(I=i.nestedProperty(M,U.id+".aspectratio")).get(),V[U.id+".aspectratio"]=R),t.call("_storeDirectGUIEdit",M,B._preGUI,V),G&&(C.set(A),i.nestedProperty(B,U.id+".camera").set(A)),N&&(I.set(O),i.nestedProperty(B,U.id+".aspectratio").set(O),U.glplot.redraw())}return j},g.updateFx=function(M,A){var C=this,L=C.camera;if(L)if(M==="orbit")L.mode="orbit",L.keyBindingMode="rotate";else if(M==="turntable"){L.up=[0,0,1],L.mode="turntable",L.keyBindingMode="rotate";var O=C.graphDiv,I=O._fullLayout,R=C.fullSceneLayout.camera,U=R.up.x,B=R.up.y,G=R.up.z;if(G/Math.sqrt(U*U+B*B+G*G)<.999){var N=C.id+".camera.up",j={x:0,y:0,z:1},V={};V[N]=j;var H=O.layout;t.call("_storeDirectGUIEdit",H,I._preGUI,V),R.up=j,i.nestedProperty(H,N).set(j)}}else L.keyBindingMode=M;C.fullSceneLayout.hovermode=A},g.toImage=function(M){var A=this;M||(M="png"),A.staticMode&&A.container.appendChild(_),A.glplot.redraw();var C=A.glplot.gl,L=C.drawingBufferWidth,O=C.drawingBufferHeight;C.bindFramebuffer(C.FRAMEBUFFER,null);var I=new Uint8Array(L*O*4);C.readPixels(0,0,L,O,C.RGBA,C.UNSIGNED_BYTE,I),function(N,j,V){for(var H=0,ee=V-1;H0)for(var X=255/Y,K=0;K<3;++K)N[Q+K]=Math.min(X*N[Q+K],255)}}(I,L,O);var R=document.createElement("canvas");R.width=L,R.height=O;var U,B=R.getContext("2d",{willReadFrequently:!0}),G=B.createImageData(L,O);switch(G.data.set(I),B.putImageData(G,0,0),M){case"jpeg":U=R.toDataURL("image/jpeg");break;case"webp":U=R.toDataURL("image/webp");break;default:U=R.toDataURL("image/png")}return A.staticMode&&A.container.removeChild(_),U},g.setConvert=function(){for(var M=0;M<3;M++){var A=this.fullSceneLayout[k[M]];n.setConvert(A,this.fullLayout),A.setScale=i.noop}},g.make4thDimension=function(){var M=this,A=M.graphDiv._fullLayout;M._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},n.setConvert(M._mockAxis,A)},D.exports=x},90060:function(D){D.exports=function(E,e,_,w){w=w||E.length;for(var s=new Array(w),T=0;TOpenStreetMap contributors',s=['© Carto',w].join(" "),T=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),m={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:w,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}]},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}]},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:s,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}]},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:s,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}]},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:T,tiles:["https://stamen-tiles.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}]},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:T,tiles:["https://stamen-tiles.a.ssl.fastly.net/toner/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}]},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),tiles:["https://stamen-tiles.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}]}},f=_(m);D.exports={requiredVersion:"1.10.1",styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:m,styleValuesNonMapbox:f,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install mapbox-gl@1.10.1."].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:",f.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')`}}},13056:function(D,E,e){var _=e(71828);D.exports=function(w,s){var T=w.split(" "),y=T[0],f=T[1],l=_.isArrayOrTypedArray(s)?_.mean(s):s,t=.5+l/100,i=1.5+l/100,r=["",""],n=[0,0];switch(y){case"top":r[0]="top",n[1]=-i;break;case"bottom":r[0]="bottom",n[1]=i}switch(f){case"left":r[1]="right",n[0]=-t;break;case"right":r[1]="left",n[0]=t}return{anchor:r[0]&&r[1]?r.join("-"):r[0]?r[0]:r[1]?r[1]:"center",offset:n}}},50101:function(D,E,e){var _=e(44517),w=e(71828),s=w.strTranslate,T=w.strScale,y=e(27659).AU,f=e(77922),l=e(39898),t=e(91424),i=e(63893),r=e(10481),n="mapbox",o=E.constants=e(77734);function a(u){return typeof u=="string"&&(o.styleValuesMapbox.indexOf(u)!==-1||u.indexOf("mapbox://")===0)}E.name=n,E.attr="subplot",E.idRoot=n,E.idRegex=E.attrRegex=w.counterRegex(n),E.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},E.layoutAttributes=e(23585),E.supplyLayoutDefaults=e(77882),E.plot=function(u){var p=u._fullLayout,c=u.calcdata,b=p._subplots.mapbox;if(_.version!==o.requiredVersion)throw new Error(o.wrongVersionErrorMsg);var d=function(h,M){var A=h._fullLayout;if(h._context.mapboxAccessToken==="")return"";for(var C=[],L=[],O=!1,I=!1,R=0;R1&&w.warn(o.multipleTokensErrorMsg),C[0]):(L.length&&w.log(["Listed mapbox access token(s)",L.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}(u,b);_.accessToken=d;for(var v=0;vL/2){var O=h.split("|").join("
");A.text(O).attr("data-unformatted",O).call(i.convertToTspans,u),C=t.bBox(A.node())}A.attr("transform",s(-3,8-C.height)),M.insert("rect",".static-attribution").attr({x:-C.width-6,y:-C.height-3,width:C.width+6,height:C.height+3,fill:"rgba(255, 255, 255, 0.75)"});var I=1;C.width+6>L&&(I=L/(C.width+6));var R=[b.l+b.w*x.x[1],b.t+b.h*(1-x.y[0])];M.attr("transform",s(R[0],R[1])+T(I))}},E.updateFx=function(u){for(var p=u._fullLayout,c=p._subplots.mapbox,b=0;b0){for(var n=0;n0}function t(i){var r={},n={};switch(i.type){case"circle":_.extendFlat(n,{"circle-radius":i.circle.radius,"circle-color":i.color,"circle-opacity":i.opacity});break;case"line":_.extendFlat(n,{"line-width":i.line.width,"line-color":i.color,"line-opacity":i.opacity,"line-dasharray":i.line.dash});break;case"fill":_.extendFlat(n,{"fill-color":i.color,"fill-outline-color":i.fill.outlinecolor,"fill-opacity":i.opacity});break;case"symbol":var o=i.symbol,a=s(o.textposition,o.iconsize);_.extendFlat(r,{"icon-image":o.icon+"-15","icon-size":o.iconsize/10,"text-field":o.text,"text-size":o.textfont.size,"text-anchor":a.anchor,"text-offset":a.offset,"symbol-placement":o.placement}),_.extendFlat(n,{"icon-color":i.color,"text-color":o.textfont.color,"text-opacity":i.opacity});break;case"raster":_.extendFlat(n,{"raster-fade-duration":0,"raster-opacity":i.opacity})}return{layout:r,paint:n}}f.update=function(i){this.visible?this.needsNewImage(i)?this.updateImage(i):this.needsNewSource(i)?(this.removeLayer(),this.updateSource(i),this.updateLayer(i)):this.needsNewLayer(i)?this.updateLayer(i):this.updateStyle(i):(this.updateSource(i),this.updateLayer(i)),this.visible=l(i)},f.needsNewImage=function(i){return this.subplot.map.getSource(this.idSource)&&this.sourceType==="image"&&i.sourcetype==="image"&&(this.source!==i.source||JSON.stringify(this.coordinates)!==JSON.stringify(i.coordinates))},f.needsNewSource=function(i){return this.sourceType!==i.sourcetype||JSON.stringify(this.source)!==JSON.stringify(i.source)||this.layerType!==i.type},f.needsNewLayer=function(i){return this.layerType!==i.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},f.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},f.updateImage=function(i){this.subplot.map.getSource(this.idSource).updateImage({url:i.source,coordinates:i.coordinates});var r=this.findFollowingMapboxLayerId(this.lookupBelow());r!==null&&this.subplot.map.moveLayer(this.idLayer,r)},f.updateSource=function(i){var r=this.subplot.map;if(r.getSource(this.idSource)&&r.removeSource(this.idSource),this.sourceType=i.sourcetype,this.source=i.source,l(i)){var n=function(o){var a,u=o.sourcetype,p=o.source,c={type:u};return u==="geojson"?a="data":u==="vector"?a=typeof p=="string"?"url":"tiles":u==="raster"?(a="tiles",c.tileSize=256):u==="image"&&(a="url",c.coordinates=o.coordinates),c[a]=p,o.sourceattribution&&(c.attribution=w(o.sourceattribution)),c}(i);r.addSource(this.idSource,n)}},f.findFollowingMapboxLayerId=function(i){if(i==="traces")for(var r=this.subplot.getMapLayers(),n=0;n1)for(M=0;M-1&&u(R.originalEvent,A,[M.xaxis],[M.yaxis],M.id,I),U.indexOf("event")>-1&&l.click(A,R.originalEvent)}}},d.updateFx=function(k){var h=this,M=h.map,A=h.gd;if(!h.isStatic){var C,L=k.dragmode;C=function(R,U){U.isRect?(R.range={})[h.id]=[I([U.xmin,U.ymin]),I([U.xmax,U.ymax])]:(R.lassoPoints={})[h.id]=U.map(I)};var O=h.dragOptions;h.dragOptions=w.extendDeep(O||{},{dragmode:k.dragmode,element:h.div,gd:A,plotinfo:{id:h.id,domain:k[h.id].domain,xaxis:h.xaxis,yaxis:h.yaxis,fillRangeItems:C},xaxes:[h.xaxis],yaxes:[h.yaxis],subplot:h.id}),M.off("click",h.onClickInPanHandler),r(L)||i(L)?(M.dragPan.disable(),M.on("zoomstart",h.clearOutline),h.dragOptions.prepFn=function(R,U,B){n(R,U,B,h.dragOptions,L)},f.init(h.dragOptions)):(M.dragPan.enable(),M.off("zoomstart",h.clearOutline),h.div.onmousedown=null,h.div.ontouchstart=null,h.div.removeEventListener("touchstart",h.div._ontouchstart),h.onClickInPanHandler=h.onClickInPanFn(h.dragOptions),M.on("click",h.onClickInPanHandler))}function I(R){var U=h.map.unproject(R);return[U.lng,U.lat]}},d.updateFramework=function(k){var h=k[this.id].domain,M=k._size,A=this.div.style;A.width=M.w*(h.x[1]-h.x[0])+"px",A.height=M.h*(h.y[1]-h.y[0])+"px",A.left=M.l+h.x[0]*M.w+"px",A.top=M.t+(1-h.y[1])*M.h+"px",this.xaxis._offset=M.l+h.x[0]*M.w,this.xaxis._length=M.w*(h.x[1]-h.x[0]),this.yaxis._offset=M.t+(1-h.y[1])*M.h,this.yaxis._length=M.h*(h.y[1]-h.y[0])},d.updateLayers=function(k){var h,M=k[this.id].layers,A=this.layerList;if(M.length!==A.length){for(h=0;h=j.width-20?(ee["text-anchor"]="start",ee.x=5):(ee["text-anchor"]="end",ee.x=j._paper.attr("width")-7),V.attr(ee);var Q=V.select(".js-link-to-tool"),X=V.select(".js-link-spacer"),Y=V.select(".js-sourcelinks");N._context.showSources&&N._context.showSources(N),N._context.showLink&&function(K,te){te.text("");var ae=te.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(K._context.linkText+" "+String.fromCharCode(187));if(K._context.sendData)ae.on("click",function(){v.sendDataToCloud(K)});else{var oe=window.location.pathname.split("/"),se=window.location.search;ae.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+oe[2].split(".")[0]+"/"+oe[1]+se})}}(N,Q),X.text(Q.text()&&Y.text()?" - ":"")}},v.sendDataToCloud=function(N){var j=(window.PLOTLYENV||{}).BASE_URL||N._context.plotlyServerURL;if(j){N.emit("plotly_beforeexport");var V=_.select(N).append("div").attr("id","hiddenform").style("display","none"),H=V.append("form").attr({action:j+"/external",method:"post",target:"_blank"});return H.append("input").attr({type:"text",name:"data"}).node().value=v.graphJson(N,!1,"keepdata"),H.node().submit(),V.remove(),N.emit("plotly_afterexport"),!1}};var m=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],k=["year","month","dayMonth","dayMonthYear"];function h(N,j){var V=N._context.locale;V||(V="en-US");var H=!1,ee={};function Q(oe){for(var se=!0,fe=0;fe1&&Me.length>1){for(y.getComponentMethod("grid","sizeDefaults")(X,Q),ee=0;ee15&&Me.length>15&&Q.shapes.length===0&&Q.images.length===0,v.linkSubplots(K,Q,Y,H),v.cleanPlot(K,Q,Y,H);var Te=!(!H._has||!H._has("gl2d")),Ee=!(!Q._has||!Q._has("gl2d")),Ue=!(!H._has||!H._has("cartesian"))||Te,De=!(!Q._has||!Q._has("cartesian"))||Ee;Ue&&!De?H._bgLayer.remove():De&&!Ue&&(Q._shouldCreateBgLayer=!0),H._zoomlayer&&!N._dragging&&o({_fullLayout:H}),function(Se,Ne){var Ye,Ze=[];Ne.meta&&(Ye=Ne._meta={meta:Ne.meta,layout:{meta:Ne.meta}});for(var st=0;st0){var te=1-2*X;H=Math.round(te*H),ee=Math.round(te*ee)}}var ae=v.layoutAttributes.width.min,oe=v.layoutAttributes.height.min;H1,fe=!j.height&&Math.abs(V.height-ee)>1;(fe||se)&&(se&&(V.width=H),fe&&(V.height=ee)),N._initialAutoSize||(N._initialAutoSize={width:H,height:ee}),v.sanitizeMargins(V)},v.supplyLayoutModuleDefaults=function(N,j,V,H){var ee,Q,X,Y=y.componentsRegistry,K=j._basePlotModules,te=y.subplotsRegistry.cartesian;for(ee in Y)(X=Y[ee]).includeBasePlot&&X.includeBasePlot(N,j);for(var ae in K.length||K.push(te),j._has("cartesian")&&(y.getComponentMethod("grid","contentDefaults")(N,j),te.finalizeSubplots(N,j)),j._subplots)j._subplots[ae].sort(t.subplotSort);for(Q=0;Q1&&(V.l/=de,V.r/=de)}if(se){var he=(V.t+V.b)/se;he>1&&(V.t/=he,V.b/=he)}var xe=V.xl!==void 0?V.xl:V.x,Re=V.xr!==void 0?V.xr:V.x,we=V.yt!==void 0?V.yt:V.y,Ae=V.yb!==void 0?V.yb:V.y;fe[j]={l:{val:xe,size:V.l+pe},r:{val:Re,size:V.r+pe},b:{val:Ae,size:V.b+pe},t:{val:we,size:V.t+pe}},ye[j]=1}else delete fe[j],delete ye[j];if(!H._replotting)return v.doAutoMargin(N)}},v.doAutoMargin=function(N){var j=N._fullLayout,V=j.width,H=j.height;j._size||(j._size={}),O(j);var ee=j._size,Q=j.margin,X={t:0,b:0,l:0,r:0},Y=t.extendFlat({},ee),K=N._fullLayout._reservedMargin;for(var te in K)for(var ae in K[te]){var oe=K[te][ae];X[ae]=Math.max(X[ae],oe)}var se=Q.l,fe=Q.r,ye=Q.t,pe=Q.b,de=j._pushmargin,he=j._pushmarginIds,xe=j.minreducedwidth,Re=j.minreducedheight;if(j.margin.autoexpand!==!1){for(var we in de)he[we]||delete de[we];for(var Ae in de.base={l:{val:0,size:se},r:{val:1,size:fe},t:{val:1,size:ye},b:{val:0,size:pe}},de){var Me=de[Ae].l||{},Ce=de[Ae].b||{},ne=Me.val,ue=Me.size,me=Ce.val,Te=Ce.size,Ee=V-X.r-X.l,Ue=H-X.t-X.b;for(var De in de){if(T(ue)&&de[De].r){var je=de[De].r.val,ge=de[De].r.size;if(je>ne){var be=(ue*je+(ge-Ee)*ne)/(je-ne),Se=(ge*(1-ne)+(ue-Ee)*(1-je))/(je-ne);be+Se>se+fe&&(se=be,fe=Se)}}if(T(Te)&&de[De].t){var Ne=de[De].t.val,Ye=de[De].t.size;if(Ne>me){var Ze=(Te*Ne+(Ye-Ue)*me)/(Ne-me),st=(Ye*(1-me)+(Te-Ue)*(1-Ne))/(Ne-me);Ze+st>pe+ye&&(pe=Ze,ye=st)}}}}}var ot=t.constrain(V-Q.l-Q.r,2,xe),ft=t.constrain(H-Q.t-Q.b,2,Re),yt=Math.max(0,V-ot),Et=Math.max(0,H-ft);if(yt){var Tt=(se+fe)/yt;Tt>1&&(se/=Tt,fe/=Tt)}if(Et){var xt=(pe+ye)/Et;xt>1&&(pe/=xt,ye/=xt)}if(ee.l=Math.round(se)+X.l,ee.r=Math.round(fe)+X.r,ee.t=Math.round(ye)+X.t,ee.b=Math.round(pe)+X.b,ee.p=Math.round(Q.pad),ee.w=Math.round(V)-ee.l-ee.r,ee.h=Math.round(H)-ee.t-ee.b,!j._replotting&&(v.didMarginChange(Y,ee)||function(It){if("_redrawFromAutoMarginCount"in It._fullLayout)return!1;var Ft=n.list(It,"",!0);for(var qt in Ft)if(Ft[qt].autoshift||Ft[qt].shift)return!0;return!1}(N))){"_redrawFromAutoMarginCount"in j?j._redrawFromAutoMarginCount++:j._redrawFromAutoMarginCount=1;var Dt=3*(1+Object.keys(he).length);if(j._redrawFromAutoMarginCount0&&(N._transitioningWithDuration=!0),N._transitionData._interruptCallbacks.push(function(){H=!0}),V.redraw&&N._transitionData._interruptCallbacks.push(function(){return y.call("redraw",N)}),N._transitionData._interruptCallbacks.push(function(){N.emit("plotly_transitioninterrupted",[])});var Y=0,K=0;function te(){return Y++,function(){var ae;K++,H||K!==Y||(ae=X,N._transitionData&&(function(oe){if(oe)for(;oe.length;)oe.shift()}(N._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(V.redraw)return y.call("redraw",N)}).then(function(){N._transitioning=!1,N._transitioningWithDuration=!1,N.emit("plotly_transitioned",[])}).then(ae)))}}V.runFn(te),setTimeout(te())})}],Q=t.syncOrAsync(ee,N);return Q&&Q.then||(Q=Promise.resolve()),Q.then(function(){return N})}v.didMarginChange=function(N,j){for(var V=0;V1)return!0}return!1},v.graphJson=function(N,j,V,H,ee,Q){(ee&&j&&!N._fullData||ee&&!j&&!N._fullLayout)&&v.supplyDefaults(N);var X=ee?N._fullData:N.data,Y=ee?N._fullLayout:N.layout,K=(N._transitionData||{})._frames;function te(se,fe){if(typeof se=="function")return fe?"_function_":null;if(t.isPlainObject(se)){var ye,pe={};return Object.keys(se).sort().forEach(function(de){if(["_","["].indexOf(de.charAt(0))===-1)if(typeof se[de]!="function"){if(V==="keepdata"){if(de.substr(de.length-3)==="src")return}else if(V==="keepstream"){if(typeof(ye=se[de+"src"])=="string"&&ye.indexOf(":")>0&&!t.isPlainObject(se.stream))return}else if(V!=="keepall"&&typeof(ye=se[de+"src"])=="string"&&ye.indexOf(":")>0)return;pe[de]=te(se[de],fe)}else fe&&(pe[de]="_function")}),pe}return Array.isArray(se)?se.map(function(de){return te(de,fe)}):t.isTypedArray(se)?t.simpleMap(se,t.identity):t.isJSDate(se)?t.ms2DateTimeLocal(+se):se}var ae={data:(X||[]).map(function(se){var fe=te(se);return j&&delete fe.fit,fe})};if(!j&&(ae.layout=te(Y),ee)){var oe=Y._size;ae.layout.computed={margin:{b:oe.b,l:oe.l,r:oe.r,t:oe.t}}}return K&&(ae.frames=te(K)),Q&&(ae.config=te(N._context,!0)),H==="object"?ae:JSON.stringify(ae)},v.modifyFrames=function(N,j){var V,H,ee,Q=N._transitionData._frames,X=N._transitionData._frameHash;for(V=0;V=0;Q--)if(Ae[Q].enabled){V._indexToPoints=Ae[Q]._indexToPoints;break}H&&H.calc&&(we=H.calc(N,V))}Array.isArray(we)&&we[0]||(we=[{x:r,y:r}]),we[0].t||(we[0].t={}),we[0].trace=V,te[xe]=we}}for(B(X,Y,K),ee=0;ee1e-10?n:0}function r(n,o,a){o=o||0,a=a||0;for(var u=n.length,p=new Array(u),c=0;c0?c:1/0}),u=_.mod(a+1,o.length);return[o[a],o[u]]},findIntersectionXY:l,findXYatLength:function(n,o,a,u){var p=-o*a,c=o*o+1,b=2*(o*p-a),d=p*p+a*a-n*n,v=Math.sqrt(b*b-4*c*d),x=(-b+v)/(2*c),g=(-b-v)/(2*c);return[[x,o*x+p+u],[g,o*g+p+u]]},clampTiny:i,pathPolygon:function(n,o,a,u,p,c){return"M"+r(t(n,o,a,u),p,c).join("L")},pathPolygonAnnulus:function(n,o,a,u,p,c,b){var d,v;n=90||Tt>90&&xt>=450?1:It<=0&&qt<=0?0:Math.max(It,qt),[Tt<=180&&xt>=180||Tt>180&&xt>=540?-1:Dt>=0&&Ft>=0?0:Math.min(Dt,Ft),Tt<=270&&xt>=270||Tt>270&&xt>=630?-1:It>=0&&qt>=0?0:Math.min(It,qt),xt>=360?1:Dt<=0&&Ft<=0?0:Math.max(Dt,Ft),ft]}(he),ne=Ce[2]-Ce[0],ue=Ce[3]-Ce[1],me=de/pe,Te=Math.abs(ue/ne);me>Te?(xe=pe,Me=(de-(Re=pe*Te))/ae.h/2,we=[fe[0],fe[1]],Ae=[ye[0]+Me,ye[1]-Me]):(Re=de,Me=(pe-(xe=de/Te))/ae.w/2,we=[fe[0]+Me,fe[1]-Me],Ae=[ye[0],ye[1]]),K.xLength2=xe,K.yLength2=Re,K.xDomain2=we,K.yDomain2=Ae;var Ee,Ue=K.xOffset2=ae.l+ae.w*we[0],De=K.yOffset2=ae.t+ae.h*(1-Ae[1]),je=K.radius=xe/ne,ge=K.innerRadius=K.getHole(Y)*je,be=K.cx=Ue-je*Ce[0],Se=K.cy=De+je*Ce[3],Ne=K.cxx=be-Ue,Ye=K.cyy=Se-De,Ze=oe.side;Ze==="counterclockwise"?(Ee=Ze,Ze="top"):Ze==="clockwise"&&(Ee=Ze,Ze="bottom"),K.radialAxis=K.mockAxis(X,Y,oe,{_id:"x",side:Ze,_trueSide:Ee,domain:[ge/ae.w,je/ae.w]}),K.angularAxis=K.mockAxis(X,Y,se,{side:"right",domain:[0,Math.PI],autorange:!1}),K.doAutoRange(X,Y),K.updateAngularAxis(X,Y),K.updateRadialAxis(X,Y),K.updateRadialAxisTitle(X,Y),K.xaxis=K.mockCartesianAxis(X,Y,{_id:"x",domain:we}),K.yaxis=K.mockCartesianAxis(X,Y,{_id:"y",domain:Ae});var st=K.pathSubplot();K.clipPaths.forTraces.select("path").attr("d",st).attr("transform",f(Ne,Ye)),te.frontplot.attr("transform",f(Ue,De)).call(t.setClipUrl,K._hasClipOnAxisFalse?null:K.clipIds.forTraces,K.gd),te.bg.attr("d",st).attr("transform",f(be,Se)).call(l.fill,Y.bgcolor)},V.mockAxis=function(X,Y,K,te){var ae=T.extendFlat({},K,te);return o(ae,Y,X),ae},V.mockCartesianAxis=function(X,Y,K){var te=this,ae=te.isSmith,oe=K._id,se=T.extendFlat({type:"linear"},K);n(se,X);var fe={x:[0,2],y:[1,3]};return se.setRange=function(){var ye=te.sectorBBox,pe=fe[oe],de=te.radialAxis._rl,he=(de[1]-de[0])/(1-te.getHole(Y));se.range=[ye[pe[0]]*he,ye[pe[1]]*he]},se.isPtWithinRange=oe!=="x"||ae?function(){return!0}:function(ye){return te.isPtInside(ye)},se.setRange(),se.setScale(),se},V.doAutoRange=function(X,Y){var K=this,te=K.gd,ae=K.radialAxis,oe=K.getRadial(Y);a(te,ae);var se=ae.range;oe.range=se.slice(),oe._input.range=se.slice(),ae._rl=[ae.r2l(se[0],null,"gregorian"),ae.r2l(se[1],null,"gregorian")]},V.updateRadialAxis=function(X,Y){var K=this,te=K.gd,ae=K.layers,oe=K.radius,se=K.innerRadius,fe=K.cx,ye=K.cy,pe=K.getRadial(Y),de=B(K.getSector(Y)[0],360),he=K.radialAxis,xe=se90&&de<=270&&(he.tickangle=180);var we=Re?function(De){var je=R(K,L([De.x,0]));return f(je[0]-fe,je[1]-ye)}:function(De){return f(he.l2p(De.x)+se,0)},Ae=Re?function(De){return I(K,De.x,-1/0,1/0)}:function(De){return K.pathArc(he.r2p(De.x)+se)},Me=H(pe);if(K.radialTickLayout!==Me&&(ae["radial-axis"].selectAll(".xtick").remove(),K.radialTickLayout=Me),xe){he.setScale();var Ce=0,ne=Re?(he.tickvals||[]).filter(function(De){return De>=0}).map(function(De){return r.tickText(he,De,!0,!1)}):r.calcTicks(he),ue=Re?ne:r.clipEnds(he,ne),me=r.getTickSigns(he)[2];Re&&((he.ticks==="top"&&he.side==="bottom"||he.ticks==="bottom"&&he.side==="top")&&(me=-me),he.ticks==="top"&&he.side==="top"&&(Ce=-he.ticklen),he.ticks==="bottom"&&he.side==="bottom"&&(Ce=he.ticklen)),r.drawTicks(te,he,{vals:ne,layer:ae["radial-axis"],path:r.makeTickPath(he,0,me),transFn:we,crisp:!1}),r.drawGrid(te,he,{vals:ue,layer:ae["radial-grid"],path:Ae,transFn:T.noop,crisp:!1}),r.drawLabels(te,he,{vals:ne,layer:ae["radial-axis"],transFn:we,labelFns:r.makeLabelFns(he,Ce)})}var Te=K.radialAxisAngle=K.vangles?N(ee(G(pe.angle),K.vangles)):pe.angle,Ee=f(fe,ye),Ue=Ee+y(-Te);Q(ae["radial-axis"],xe&&(pe.showticklabels||pe.ticks),{transform:Ue}),Q(ae["radial-grid"],xe&&pe.showgrid,{transform:Re?"":Ee}),Q(ae["radial-line"].select("line"),xe&&pe.showline,{x1:Re?-oe:se,y1:0,x2:oe,y2:0,transform:Ue}).attr("stroke-width",pe.linewidth).call(l.stroke,pe.linecolor)},V.updateRadialAxisTitle=function(X,Y,K){if(!this.isSmith){var te=this,ae=te.gd,oe=te.radius,se=te.cx,fe=te.cy,ye=te.getRadial(Y),pe=te.id+"title",de=0;if(ye.title){var he=t.bBox(te.layers["radial-axis"].node()).height,xe=ye.title.font.size,Re=ye.side;de=Re==="top"?xe:Re==="counterclockwise"?-(he+.4*xe):he+.8*xe}var we=K!==void 0?K:te.radialAxisAngle,Ae=G(we),Me=Math.cos(Ae),Ce=Math.sin(Ae),ne=se+oe/2*Me+de*Ce,ue=fe-oe/2*Ce+de*Me;te.layers["radial-axis-title"]=b.draw(ae,pe,{propContainer:ye,propName:te.id+".radialaxis.title",placeholder:U(ae,"Click to enter radial axis title"),attributes:{x:ne,y:ue,"text-anchor":"middle"},transform:{rotate:-we}})}},V.updateAngularAxis=function(X,Y){var K=this,te=K.gd,ae=K.layers,oe=K.radius,se=K.innerRadius,fe=K.cx,ye=K.cy,pe=K.getAngular(Y),de=K.angularAxis,he=K.isSmith;he||(K.fillViewInitialKey("angularaxis.rotation",pe.rotation),de.setGeometry(),de.setScale());var xe=he?function(De){var je=R(K,L([0,De.x]));return Math.atan2(je[0]-fe,je[1]-ye)-Math.PI/2}:function(De){return de.t2g(De.x)};de.type==="linear"&&de.thetaunit==="radians"&&(de.tick0=N(de.tick0),de.dtick=N(de.dtick));var Re=function(De){return f(fe+oe*Math.cos(De),ye-oe*Math.sin(De))},we=he?function(De){var je=R(K,L([0,De.x]));return f(je[0],je[1])}:function(De){return Re(xe(De))},Ae=he?function(De){var je=R(K,L([0,De.x])),ge=Math.atan2(je[0]-fe,je[1]-ye)-Math.PI/2;return f(je[0],je[1])+y(-N(ge))}:function(De){var je=xe(De);return Re(je)+y(-N(je))},Me=he?function(De){return O(K,De.x,0,1/0)}:function(De){var je=xe(De),ge=Math.cos(je),be=Math.sin(je);return"M"+[fe+se*ge,ye-se*be]+"L"+[fe+oe*ge,ye-oe*be]},Ce=r.makeLabelFns(de,0).labelStandoff,ne={xFn:function(De){var je=xe(De);return Math.cos(je)*Ce},yFn:function(De){var je=xe(De),ge=Math.sin(je)>0?.2:1;return-Math.sin(je)*(Ce+De.fontSize*ge)+Math.abs(Math.cos(je))*(De.fontSize*h)},anchorFn:function(De){var je=xe(De),ge=Math.cos(je);return Math.abs(ge)<.1?"middle":ge>0?"start":"end"},heightFn:function(De,je,ge){var be=xe(De);return-.5*(1+Math.sin(be))*ge}},ue=H(pe);K.angularTickLayout!==ue&&(ae["angular-axis"].selectAll("."+de._id+"tick").remove(),K.angularTickLayout=ue);var me,Te=he?[1/0].concat(de.tickvals||[]).map(function(De){return r.tickText(de,De,!0,!1)}):r.calcTicks(de);if(he&&(Te[0].text="∞",Te[0].fontSize*=1.75),Y.gridshape==="linear"?(me=Te.map(xe),T.angleDelta(me[0],me[1])<0&&(me=me.slice().reverse())):me=null,K.vangles=me,de.type==="category"&&(Te=Te.filter(function(De){return T.isAngleInsideSector(xe(De),K.sectorInRad)})),de.visible){var Ee=de.ticks==="inside"?-1:1,Ue=(de.linewidth||1)/2;r.drawTicks(te,de,{vals:Te,layer:ae["angular-axis"],path:"M"+Ee*Ue+",0h"+Ee*de.ticklen,transFn:Ae,crisp:!1}),r.drawGrid(te,de,{vals:Te,layer:ae["angular-grid"],path:Me,transFn:T.noop,crisp:!1}),r.drawLabels(te,de,{vals:Te,layer:ae["angular-axis"],repositionOnUpdate:!0,transFn:we,labelFns:ne})}Q(ae["angular-line"].select("path"),pe.showline,{d:K.pathSubplot(),transform:f(fe,ye)}).attr("stroke-width",pe.linewidth).call(l.stroke,pe.linecolor)},V.updateFx=function(X,Y){this.gd._context.staticPlot||(!this.isSmith&&(this.updateAngularDrag(X),this.updateRadialDrag(X,Y,0),this.updateRadialDrag(X,Y,1)),this.updateHoverAndMainDrag(X))},V.updateHoverAndMainDrag=function(X){var Y,K,te=this,ae=te.isSmith,oe=te.gd,se=te.layers,fe=X._zoomlayer,ye=M.MINZOOM,pe=M.OFFEDGE,de=te.radius,he=te.innerRadius,xe=te.cx,Re=te.cy,we=te.cxx,Ae=te.cyy,Me=te.sectorInRad,Ce=te.vangles,ne=te.radialAxis,ue=A.clampTiny,me=A.findXYatLength,Te=A.findEnclosingVertexAngles,Ee=M.cornerHalfWidth,Ue=M.cornerLen/2,De=u.makeDragger(se,"path","maindrag",X.dragmode===!1?"none":"crosshair");_.select(De).attr("d",te.pathSubplot()).attr("transform",f(xe,Re)),De.onmousemove=function(Oe){c.hover(oe,Oe,te.id),oe._fullLayout._lasthover=De,oe._fullLayout._hoversubplot=te.id},De.onmouseout=function(Oe){oe._dragging||p.unhover(oe,Oe)};var je,ge,be,Se,Ne,Ye,Ze,st,ot,ft={element:De,gd:oe,subplot:te.id,plotinfo:{id:te.id,xaxis:te.xaxis,yaxis:te.yaxis},xaxes:[te.xaxis],yaxes:[te.yaxis]};function yt(Oe,Be){return Math.sqrt(Oe*Oe+Be*Be)}function Et(Oe,Be){return yt(Oe-we,Be-Ae)}function Tt(Oe,Be){return Math.atan2(Ae-Be,Oe-we)}function xt(Oe,Be){return[Oe*Math.cos(Be),Oe*Math.sin(-Be)]}function Dt(Oe,Be){if(Oe===0)return te.pathSector(2*Ee);var Qe=Ue/Oe,ut=Be-Qe,pt=Be+Qe,bt=Math.max(0,Math.min(Oe,de)),Lt=bt-Ee,Ct=bt+Ee;return"M"+xt(Lt,ut)+"A"+[Lt,Lt]+" 0,0,0 "+xt(Lt,pt)+"L"+xt(Ct,pt)+"A"+[Ct,Ct]+" 0,0,1 "+xt(Ct,ut)+"Z"}function It(Oe,Be,Qe){if(Oe===0)return te.pathSector(2*Ee);var ut,pt,bt=xt(Oe,Be),Lt=xt(Oe,Qe),Ct=ue((bt[0]+Lt[0])/2),mt=ue((bt[1]+Lt[1])/2);if(Ct&&mt){var Ot=mt/Ct,_t=-1/Ot,Pt=me(Ee,Ot,Ct,mt);ut=me(Ue,_t,Pt[0][0],Pt[0][1]),pt=me(Ue,_t,Pt[1][0],Pt[1][1])}else{var Bt,Wt;mt?(Bt=Ue,Wt=Ee):(Bt=Ee,Wt=Ue),ut=[[Ct-Bt,mt-Wt],[Ct+Bt,mt-Wt]],pt=[[Ct-Bt,mt+Wt],[Ct+Bt,mt+Wt]]}return"M"+ut.join("L")+"L"+pt.reverse().join("L")+"Z"}function Ft(Oe,Be){return Be=Math.max(Math.min(Be,de),he),Oeye?(Oe-1&&Oe===1&&v(Be,oe,[te.xaxis],[te.yaxis],te.id,ft),Qe.indexOf("event")>-1&&c.click(oe,Be,te.id)}ft.prepFn=function(Oe,Be,Qe){var ut=oe._fullLayout.dragmode,pt=De.getBoundingClientRect();oe._fullLayout._calcInverseTransform(oe);var bt=oe._fullLayout._invTransform;Y=oe._fullLayout._invScaleX,K=oe._fullLayout._invScaleY;var Lt=T.apply3DTransform(bt)(Be-pt.left,Qe-pt.top);if(je=Lt[0],ge=Lt[1],Ce){var Ct=A.findPolygonOffset(de,Me[0],Me[1],Ce);je+=we+Ct[0],ge+=Ae+Ct[1]}switch(ut){case"zoom":ft.clickFn=ht,ae||(ft.moveFn=Ce?Ke:Nt,ft.doneFn=Ge,function(){be=null,Se=null,Ne=te.pathSubplot(),Ye=!1;var mt=oe._fullLayout[te.id];Ze=w(mt.bgcolor).getLuminance(),(st=u.makeZoombox(fe,Ze,xe,Re,Ne)).attr("fill-rule","evenodd"),ot=u.makeCorners(fe,xe,Re),x(oe)}());break;case"select":case"lasso":d(Oe,Be,Qe,ft,ut)}},p.init(ft)},V.updateRadialDrag=function(X,Y,K){var te=this,ae=te.gd,oe=te.layers,se=te.radius,fe=te.innerRadius,ye=te.cx,pe=te.cy,de=te.radialAxis,he=M.radialDragBoxSize,xe=he/2;if(de.visible){var Re,we,Ae,Me=G(te.radialAxisAngle),Ce=de._rl,ne=Ce[0],ue=Ce[1],me=Ce[K],Te=.75*(Ce[1]-Ce[0])/(1-te.getHole(Y))/se;K?(Re=ye+(se+xe)*Math.cos(Me),we=pe-(se+xe)*Math.sin(Me),Ae="radialdrag"):(Re=ye+(fe-xe)*Math.cos(Me),we=pe-(fe-xe)*Math.sin(Me),Ae="radialdrag-inner");var Ee,Ue,De,je=u.makeRectDragger(oe,Ae,"crosshair",-xe,-xe,he,he),ge={element:je,gd:ae};X.dragmode===!1&&(ge.dragmode=!1),Q(_.select(je),de.visible&&fe0==(K?De>ne:Deo?function(b){return b<=0}:function(b){return b>=0};t.c2g=function(b){var d=t.c2l(b)-n;return(c(d)?d:0)+p},t.g2c=function(b){return t.l2c(b+n-p)},t.g2p=function(b){return b*u},t.c2p=function(b){return t.g2p(t.c2g(b))}}})(y,f);break;case"angularaxis":(function(t,i){var r=t.type;if(r==="linear"){var n=t.d2c,o=t.c2d;t.d2c=function(a,u){return function(p,c){return c==="degrees"?s(p):p}(n(a),u)},t.c2d=function(a,u){return o(function(p,c){return c==="degrees"?T(p):p}(a,u))}}t.makeCalcdata=function(a,u){var p,c,b=a[u],d=a._length,v=function(h){return t.d2c(h,a.thetaunit)};if(b){if(_.isTypedArray(b)&&r==="linear"){if(d===b.length)return b;if(b.subarray)return b.subarray(0,d)}for(p=new Array(d),c=0;c0?1:0}function e(s){var T=s[0],y=s[1];if(!isFinite(T)||!isFinite(y))return[1,0];var f=(T+1)*(T+1)+y*y;return[(T*T+y*y-1)/f,2*y/f]}function _(s,T){var y=T[0],f=T[1];return[y*s.radius+s.cx,-f*s.radius+s.cy]}function w(s,T){return T*s.radius}D.exports={smith:e,reactanceArc:function(s,T,y,f){var l=_(s,e([y,T])),t=l[0],i=l[1],r=_(s,e([f,T])),n=r[0],o=r[1];if(T===0)return["M"+t+","+i,"L"+n+","+o].join(" ");var a=w(s,1/Math.abs(T));return["M"+t+","+i,"A"+a+","+a+" 0 0,"+(T<0?1:0)+" "+n+","+o].join(" ")},resistanceArc:function(s,T,y,f){var l=w(s,1/(T+1)),t=_(s,e([T,y])),i=t[0],r=t[1],n=_(s,e([T,f])),o=n[0],a=n[1];if(E(y)!==E(f)){var u=_(s,e([T,0]));return["M"+i+","+r,"A"+l+","+l+" 0 0,"+(00){for(var f=[],l=0;l=m&&(h.min=0,M.min=0,A.min=0,u.aaxis&&delete u.aaxis.min,u.baxis&&delete u.baxis.min,u.caxis&&delete u.caxis.min)}function a(u,p,c,b){var d=r[p._name];function v(M,A){return s.coerce(u,p,d,M,A)}v("uirevision",b.uirevision),p.type="linear";var x=v("color"),g=x!==d.color.dflt?x:c.font.color,m=p._name.charAt(0).toUpperCase(),k="Component "+m,h=v("title.text",k);p._hovertitle=h===k?h:m,s.coerceFont(v,"title.font",{family:c.font.family,size:s.bigFont(c.font.size),color:g}),v("min"),t(u,p,v,"linear"),f(u,p,v,"linear"),y(u,p,v,"linear"),l(u,p,v,{outerTicks:!0}),v("showticklabels")&&(s.coerceFont(v,"tickfont",{family:c.font.family,size:c.font.size,color:g}),v("tickangle"),v("tickformat")),i(u,p,v,{dfltColor:x,bgColor:c.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:d}),v("hoverformat"),v("layer")}D.exports=function(u,p,c){T(u,p,c,{type:"ternary",attributes:r,handleDefaults:o,font:p.font,paper_bgcolor:p.paper_bgcolor})}},64380:function(D,E,e){var _=e(39898),w=e(84267),s=e(73972),T=e(71828),y=T.strTranslate,f=T._,l=e(7901),t=e(91424),i=e(21994),r=e(1426).extendFlat,n=e(74875),o=e(89298),a=e(28569),u=e(30211),p=e(64505),c=p.freeMode,b=p.rectMode,d=e(92998),v=e(47322).prepSelect,x=e(47322).selectOnClick,g=e(47322).clearOutline,m=e(47322).clearSelectionsCache,k=e(85555);function h(B,G){this.id=B.id,this.graphDiv=B.graphDiv,this.init(G),this.makeFramework(G),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}D.exports=h;var M=h.prototype;M.init=function(B){this.container=B._ternarylayer,this.defs=B._defs,this.layoutId=B._uid,this.traceHash={},this.layers={}},M.plot=function(B,G){var N=this,j=G[N.id],V=G._size;N._hasClipOnAxisFalse=!1;for(var H=0;HA*fe?V=(H=fe)*A:H=(V=se)/A,ee=ae*V/se,Q=oe*H/fe,N=G.l+G.w*K-V/2,j=G.t+G.h*(1-te)-H/2,X.x0=N,X.y0=j,X.w=V,X.h=H,X.sum=ye,X.xaxis={type:"linear",range:[pe+2*he-ye,ye-pe-2*de],domain:[K-ee/2,K+ee/2],_id:"x"},i(X.xaxis,X.graphDiv._fullLayout),X.xaxis.setScale(),X.xaxis.isPtWithinRange=function(Ee){return Ee.a>=X.aaxis.range[0]&&Ee.a<=X.aaxis.range[1]&&Ee.b>=X.baxis.range[1]&&Ee.b<=X.baxis.range[0]&&Ee.c>=X.caxis.range[1]&&Ee.c<=X.caxis.range[0]},X.yaxis={type:"linear",range:[pe,ye-de-he],domain:[te-Q/2,te+Q/2],_id:"y"},i(X.yaxis,X.graphDiv._fullLayout),X.yaxis.setScale(),X.yaxis.isPtWithinRange=function(){return!0};var xe=X.yaxis.domain[0],Re=X.aaxis=r({},B.aaxis,{range:[pe,ye-de-he],side:"left",tickangle:(+B.aaxis.tickangle||0)-30,domain:[xe,xe+Q*A],anchor:"free",position:0,_id:"y",_length:V});i(Re,X.graphDiv._fullLayout),Re.setScale();var we=X.baxis=r({},B.baxis,{range:[ye-pe-he,de],side:"bottom",domain:X.xaxis.domain,anchor:"free",position:0,_id:"x",_length:V});i(we,X.graphDiv._fullLayout),we.setScale();var Ae=X.caxis=r({},B.caxis,{range:[ye-pe-de,he],side:"right",tickangle:(+B.caxis.tickangle||0)+30,domain:[xe,xe+Q*A],anchor:"free",position:0,_id:"y",_length:V});i(Ae,X.graphDiv._fullLayout),Ae.setScale();var Me="M"+N+","+(j+H)+"h"+V+"l-"+V/2+",-"+H+"Z";X.clipDef.select("path").attr("d",Me),X.layers.plotbg.select("path").attr("d",Me);var Ce="M0,"+H+"h"+V+"l-"+V/2+",-"+H+"Z";X.clipDefRelative.select("path").attr("d",Ce);var ne=y(N,j);X.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",ne),X.clipDefRelative.select("path").attr("transform",null);var ue=y(N-we._offset,j+H);X.layers.baxis.attr("transform",ue),X.layers.bgrid.attr("transform",ue);var me=y(N+V/2,j)+"rotate(30)"+y(0,-Re._offset);X.layers.aaxis.attr("transform",me),X.layers.agrid.attr("transform",me);var Te=y(N+V/2,j)+"rotate(-30)"+y(0,-Ae._offset);X.layers.caxis.attr("transform",Te),X.layers.cgrid.attr("transform",Te),X.drawAxes(!0),X.layers.aline.select("path").attr("d",Re.showline?"M"+N+","+(j+H)+"l"+V/2+",-"+H:"M0,0").call(l.stroke,Re.linecolor||"#000").style("stroke-width",(Re.linewidth||0)+"px"),X.layers.bline.select("path").attr("d",we.showline?"M"+N+","+(j+H)+"h"+V:"M0,0").call(l.stroke,we.linecolor||"#000").style("stroke-width",(we.linewidth||0)+"px"),X.layers.cline.select("path").attr("d",Ae.showline?"M"+(N+V/2)+","+j+"l"+V/2+","+H:"M0,0").call(l.stroke,Ae.linecolor||"#000").style("stroke-width",(Ae.linewidth||0)+"px"),X.graphDiv._context.staticPlot||X.initInteractions(),t.setClipUrl(X.layers.frontplot,X._hasClipOnAxisFalse?null:X.clipId,X.graphDiv)},M.drawAxes=function(B){var G=this,N=G.graphDiv,j=G.id.substr(7)+"title",V=G.layers,H=G.aaxis,ee=G.baxis,Q=G.caxis;if(G.drawAx(H),G.drawAx(ee),G.drawAx(Q),B){var X=Math.max(H.showticklabels?H.tickfont.size/2:0,(Q.showticklabels?.75*Q.tickfont.size:0)+(Q.ticks==="outside"?.87*Q.ticklen:0)),Y=(ee.showticklabels?ee.tickfont.size:0)+(ee.ticks==="outside"?ee.ticklen:0)+3;V["a-title"]=d.draw(N,"a"+j,{propContainer:H,propName:G.id+".aaxis.title",placeholder:f(N,"Click to enter Component A title"),attributes:{x:G.x0+G.w/2,y:G.y0-H.title.font.size/3-X,"text-anchor":"middle"}}),V["b-title"]=d.draw(N,"b"+j,{propContainer:ee,propName:G.id+".baxis.title",placeholder:f(N,"Click to enter Component B title"),attributes:{x:G.x0-Y,y:G.y0+G.h+.83*ee.title.font.size+Y,"text-anchor":"middle"}}),V["c-title"]=d.draw(N,"c"+j,{propContainer:Q,propName:G.id+".caxis.title",placeholder:f(N,"Click to enter Component C title"),attributes:{x:G.x0+G.w+Y,y:G.y0+G.h+.83*Q.title.font.size+Y,"text-anchor":"middle"}})}},M.drawAx=function(B){var G,N=this,j=N.graphDiv,V=B._name,H=V.charAt(0),ee=B._id,Q=N.layers[V],X=H+"tickLayout",Y=(G=B).ticks+String(G.ticklen)+String(G.showticklabels);N[X]!==Y&&(Q.selectAll("."+ee+"tick").remove(),N[X]=Y),B.setScale();var K=o.calcTicks(B),te=o.clipEnds(B,K),ae=o.makeTransTickFn(B),oe=o.getTickSigns(B)[2],se=T.deg2rad(30),fe=oe*(B.linewidth||1)/2,ye=oe*B.ticklen,pe=N.w,de=N.h,he=H==="b"?"M0,"+fe+"l"+Math.sin(se)*ye+","+Math.cos(se)*ye:"M"+fe+",0l"+Math.cos(se)*ye+","+-Math.sin(se)*ye,xe={a:"M0,0l"+de+",-"+pe/2,b:"M0,0l-"+pe/2+",-"+de,c:"M0,0l-"+de+","+pe/2}[H];o.drawTicks(j,B,{vals:B.ticks==="inside"?te:K,layer:Q,path:he,transFn:ae,crisp:!1}),o.drawGrid(j,B,{vals:te,layer:N.layers[H+"grid"],path:xe,transFn:ae,crisp:!1}),o.drawLabels(j,B,{vals:K,layer:Q,transFn:ae,labelFns:o.makeLabelFns(B,0,30)})};var C=k.MINZOOM/2+.87,L="m-0.87,.5h"+C+"v3h-"+(C+5.2)+"l"+(C/2+2.6)+",-"+(.87*C+4.5)+"l2.6,1.5l-"+C/2+","+.87*C+"Z",O="m0.87,.5h-"+C+"v3h"+(C+5.2)+"l-"+(C/2+2.6)+",-"+(.87*C+4.5)+"l-2.6,1.5l"+C/2+","+.87*C+"Z",I="m0,1l"+C/2+","+.87*C+"l2.6,-1.5l-"+(C/2+2.6)+",-"+(.87*C+4.5)+"l-"+(C/2+2.6)+","+(.87*C+4.5)+"l2.6,1.5l"+C/2+",-"+.87*C+"Z",R=!0;function U(B){_.select(B).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}M.clearOutline=function(){m(this.dragOptions),g(this.dragOptions.gd)},M.initInteractions=function(){var B,G,N,j,V,H,ee,Q,X,Y,K,te,ae=this,oe=ae.layers.plotbg.select("path").node(),se=ae.graphDiv,fe=se._fullLayout._zoomlayer;function ye(Ce){var ne={};return ne[ae.id+".aaxis.min"]=Ce.a,ne[ae.id+".baxis.min"]=Ce.b,ne[ae.id+".caxis.min"]=Ce.c,ne}function pe(Ce,ne){var ue=se._fullLayout.clickmode;U(se),Ce===2&&(se.emit("plotly_doubleclick",null),s.call("_guiRelayout",se,ye({a:0,b:0,c:0}))),ue.indexOf("select")>-1&&Ce===1&&x(ne,se,[ae.xaxis],[ae.yaxis],ae.id,ae.dragOptions),ue.indexOf("event")>-1&&u.click(se,ne,ae.id)}function de(Ce,ne){return 1-ne/ae.h}function he(Ce,ne){return 1-(Ce+(ae.h-ne)/Math.sqrt(3))/ae.w}function xe(Ce,ne){return(Ce-(ae.h-ne)/Math.sqrt(3))/ae.w}function Re(Ce,ne){var ue=N+Ce*B,me=j+ne*G,Te=Math.max(0,Math.min(1,de(0,j),de(0,me))),Ee=Math.max(0,Math.min(1,he(N,j),he(ue,me))),Ue=Math.max(0,Math.min(1,xe(N,j),xe(ue,me))),De=(Te/2+Ue)*ae.w,je=(1-Te/2-Ee)*ae.w,ge=(De+je)/2,be=je-De,Se=(1-Te)*ae.h,Ne=Se-be/A;be.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),te.transition().style("opacity",1).duration(200),Y=!0),se.emit("plotly_relayouting",ye(ee))}function we(){U(se),ee!==V&&(s.call("_guiRelayout",se,ye(ee)),R&&se.data&&se._context.showTips&&(T.notifier(f(se,"Double-click to zoom back out"),"long"),R=!1))}function Ae(Ce,ne){var ue=Ce/ae.xaxis._m,me=ne/ae.yaxis._m,Te=[(ee={a:V.a-me,b:V.b+(ue+me)/2,c:V.c-(ue-me)/2}).a,ee.b,ee.c].sort(T.sorterAsc),Ee=Te.indexOf(ee.a),Ue=Te.indexOf(ee.b),De=Te.indexOf(ee.c);Te[0]<0&&(Te[1]+Te[0]/2<0?(Te[2]+=Te[0]+Te[1],Te[0]=Te[1]=0):(Te[2]+=Te[0]/2,Te[1]+=Te[0]/2,Te[0]=0),ee={a:Te[Ee],b:Te[Ue],c:Te[De]},ne=(V.a-ee.a)*ae.yaxis._m,Ce=(V.c-ee.c-V.b+ee.b)*ae.xaxis._m);var je=y(ae.x0+Ce,ae.y0+ne);ae.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",je);var ge=y(-Ce,-ne);ae.clipDefRelative.select("path").attr("transform",ge),ae.aaxis.range=[ee.a,ae.sum-ee.b-ee.c],ae.baxis.range=[ae.sum-ee.a-ee.c,ee.b],ae.caxis.range=[ae.sum-ee.a-ee.b,ee.c],ae.drawAxes(!1),ae._hasClipOnAxisFalse&&ae.plotContainer.select(".scatterlayer").selectAll(".trace").call(t.hideOutsideRangePoints,ae),se.emit("plotly_relayouting",ye(ee))}function Me(){s.call("_guiRelayout",se,ye(ee))}this.dragOptions={element:oe,gd:se,plotinfo:{id:ae.id,domain:se._fullLayout[ae.id].domain,xaxis:ae.xaxis,yaxis:ae.yaxis},subplot:ae.id,prepFn:function(Ce,ne,ue){ae.dragOptions.xaxes=[ae.xaxis],ae.dragOptions.yaxes=[ae.yaxis],B=se._fullLayout._invScaleX,G=se._fullLayout._invScaleY;var me=ae.dragOptions.dragmode=se._fullLayout.dragmode;c(me)?ae.dragOptions.minDrag=1:ae.dragOptions.minDrag=void 0,me==="zoom"?(ae.dragOptions.moveFn=Re,ae.dragOptions.clickFn=pe,ae.dragOptions.doneFn=we,function(Te,Ee,Ue){var De=oe.getBoundingClientRect();N=Ee-De.left,j=Ue-De.top,se._fullLayout._calcInverseTransform(se);var je=se._fullLayout._invTransform,ge=T.apply3DTransform(je)(N,j);N=ge[0],j=ge[1],V={a:ae.aaxis.range[0],b:ae.baxis.range[1],c:ae.caxis.range[1]},ee=V,H=ae.aaxis.range[1]-V.a,Q=w(ae.graphDiv._fullLayout[ae.id].bgcolor).getLuminance(),X="M0,"+ae.h+"L"+ae.w/2+", 0L"+ae.w+","+ae.h+"Z",Y=!1,K=fe.append("path").attr("class","zoombox").attr("transform",y(ae.x0,ae.y0)).style({fill:Q>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",X),te=fe.append("path").attr("class","zoombox-corners").attr("transform",y(ae.x0,ae.y0)).style({fill:l.background,stroke:l.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),ae.clearOutline(se)}(0,ne,ue)):me==="pan"?(ae.dragOptions.moveFn=Ae,ae.dragOptions.clickFn=pe,ae.dragOptions.doneFn=Me,V={a:ae.aaxis.range[0],b:ae.baxis.range[1],c:ae.caxis.range[1]},ee=V,ae.clearOutline(se)):(b(me)||c(me))&&v(Ce,ne,ue,ae.dragOptions,me)}},oe.onmousemove=function(Ce){u.hover(se,Ce,ae.id),se._fullLayout._lasthover=oe,se._fullLayout._hoversubplot=ae.id},oe.onmouseout=function(Ce){se._dragging||a.unhover(se,Ce)},a.init(this.dragOptions)}},73972:function(D,E,e){var _=e(47769),w=e(64213),s=e(75138),T=e(41965),y=e(24401).addStyleRule,f=e(1426),l=e(9012),t=e(10820),i=f.extendFlat,r=f.extendDeepAll;function n(x){var g=x.name,m=x.categories,k=x.meta;if(E.modules[g])_.log("Type "+g+" already registered");else{E.subplotsRegistry[x.basePlotModule.name]||function(R){var U=R.name;if(E.subplotsRegistry[U])_.log("Plot type "+U+" already registered.");else for(var B in p(R),E.subplotsRegistry[U]=R,E.componentsRegistry)d(B,R.name)}(x.basePlotModule);for(var h={},M=0;M-1&&(a[p[t]].title={text:""});for(t=0;t")!==-1?"":M.html(C).text()});return M.remove(),A}(k)).replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(t,"'"),w.isIE()&&(k=(k=(k=k.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),k}},75341:function(D,E,e){var _=e(71828);D.exports=function(w,s){for(var T=0;TA+h||!_(M))}for(var L=0;Lt))return y}return f!==void 0?f:T.dflt},E.coerceColor=function(T,y,f){return w(y).isValid()?y:f!==void 0?f:T.dflt},E.coerceEnumerated=function(T,y,f){return T.coerceNumber&&(y=+y),T.values.indexOf(y)!==-1?y:f!==void 0?f:T.dflt},E.getValue=function(T,y){var f;return Array.isArray(T)?y0?ye+=pe:c<0&&(ye-=pe)}return ye}function Q(fe){var ye=c,pe=fe.b,de=ee(fe);return _.inbox(pe-ye,de-ye,C+(de-ye)/(de-pe)-1)}var X=r[b+"a"],Y=r[d+"a"];g=Math.abs(X.r2c(X.range[1])-X.r2c(X.range[0]));var K=_.getDistanceFunction(a,v,x,function(fe){return(v(fe)+x(fe))/2});if(_.getClosest(m,K,r),r.index!==!1&&m[r.index].p!==l){I||(N=function(fe){return Math.min(R(fe),fe.p-h.bargroupwidth/2)},j=function(fe){return Math.max(U(fe),fe.p+h.bargroupwidth/2)});var te=m[r.index],ae=k.base?te.b+te.s:te.s;r[d+"0"]=r[d+"1"]=Y.c2p(te[d],!0),r[d+"LabelVal"]=ae;var oe=h.extents[h.extents.round(te.p)];r[b+"0"]=X.c2p(M?N(te):oe[0],!0),r[b+"1"]=X.c2p(M?j(te):oe[1],!0);var se=te.orig_p!==void 0;return r[b+"LabelVal"]=se?te.orig_p:te.p,r.labelLabel=f(X,r[b+"LabelVal"],k[b+"hoverformat"]),r.valueLabel=f(Y,r[d+"LabelVal"],k[d+"hoverformat"]),r.baseLabel=f(Y,te.b,k[d+"hoverformat"]),r.spikeDistance=(function(fe){var ye=c,pe=fe.b,de=ee(fe);return _.inbox(pe-ye,de-ye,L+(de-ye)/(de-pe)-1)}(te)+function(fe){return V(R(fe),U(fe),L)}(te))/2,r[b+"Spike"]=X.c2p(te.p,!0),T(te,k,r),r.hovertemplate=k.hovertemplate,r}}function i(r,n){var o=n.mcc||r.marker.color,a=n.mlcc||r.marker.line.color,u=y(r,n);return s.opacity(o)?o:s.opacity(a)&&u?a:void 0}D.exports={hoverPoints:function(r,n,o,a,u){var p=t(r,n,o,a,u);if(p){var c=p.cd,b=c[0].trace,d=c[p.index];return p.color=i(b,d),w.getComponentMethod("errorbars","hoverInfo")(d,b,p),[p]}},hoverOnBars:t,getTraceColor:i}},60822:function(D,E,e){D.exports={attributes:e(1486),layoutAttributes:e(43641),supplyDefaults:e(90769).supplyDefaults,crossTraceDefaults:e(90769).crossTraceDefaults,supplyLayoutDefaults:e(13957),calc:e(92290),crossTraceCalc:e(11661).crossTraceCalc,colorbar:e(4898),arraysToCalcdata:e(75341),plot:e(17295).plot,style:e(16688).style,styleOnSelect:e(16688).styleOnSelect,hoverPoints:e(95423).hoverPoints,eventData:e(58065),selectPoints:e(81974),moduleType:"trace",name:"bar",basePlotModule:e(93612),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},43641:function(D){D.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"}}},13957:function(D,E,e){var _=e(73972),w=e(89298),s=e(71828),T=e(43641);D.exports=function(y,f,l){function t(b,d){return s.coerce(y,f,T,b,d)}for(var i=!1,r=!1,n=!1,o={},a=t("barmode"),u=0;u0}function M(L){return L==="auto"?0:L}function A(L,O){var I=Math.PI/180*O,R=Math.abs(Math.sin(I)),U=Math.abs(Math.cos(I));return{x:L.width*U+L.height*R,y:L.width*R+L.height*U}}function C(L,O,I,R,U,B){var G=!!B.isHorizontal,N=!!B.constrained,j=B.angle||0,V=B.anchor||"end",H=V==="end",ee=V==="start",Q=((B.leftToRight||0)+1)/2,X=1-Q,Y=U.width,K=U.height,te=Math.abs(O-L),ae=Math.abs(R-I),oe=te>2*v&&ae>2*v?v:0;te-=2*oe,ae-=2*oe;var se=M(j);j!=="auto"||Y<=te&&K<=ae||!(Y>te||K>ae)||(Y>ae||K>te)&&Y.01?Ue:function(be,Se,Ne){return Ne&&be===Se?be:Math.abs(be-Se)>=2?Ue(be):be>Se?Math.ceil(be):Math.floor(be)};Ce=De(Ce,ne,oe),ne=De(ne,Ce,oe),ue=De(ue,me,!oe),me=De(me,ue,!oe)}var je=k(s.ensureSingle(Ae,"path"),j,U,B);if(je.style("vector-effect",V?"none":"non-scaling-stroke").attr("d",isNaN((ne-Ce)*(me-ue))||Te&&L._context.staticPlot?"M0,0Z":"M"+Ce+","+ue+"V"+me+"H"+ne+"V"+ue+"Z").call(f.setClipUrl,O.layerClipId,L),!j.uniformtext.mode&&se){var ge=f.makePointStyleFns(X);f.singlePointStyle(he,je,X,ge,L)}(function(be,Se,Ne,Ye,Ze,st,ot,ft,yt,Et,Tt){var xt,Dt=Se.xaxis,It=Se.yaxis,Ft=be._fullLayout;function qt(Kt,nn,yn){return s.ensureSingle(Kt,"text").text(nn).attr({class:"bartext bartext-"+xt,"text-anchor":"middle","data-notex":1}).call(f.font,yn).call(T.convertToTspans,be)}var Nt=Ye[0].trace,Je=Nt.orientation==="h",Ke=function(Kt,nn,yn,ln,kn){var Wn,wn=nn[0].trace;return Wn=wn.texttemplate?function(on,_n,fn,hn,In){var Cn=_n[0].trace,Nn=s.castOption(Cn,fn,"texttemplate");if(!Nn)return"";var Hn,qn,or,tr,kr=Cn.type==="histogram",gr=Cn.type==="waterfall",ir=Cn.type==="funnel",dr=Cn.orientation==="h";function yr(Zn){return t(tr,tr.c2l(Zn),!0).text}dr?(Hn="y",qn=In,or="x",tr=hn):(Hn="x",qn=hn,or="y",tr=In);var $t,mn=_n[fn],Ln={};Ln.label=mn.p,Ln.labelLabel=Ln[Hn+"Label"]=($t=mn.p,t(qn,qn.c2l($t),!0).text);var En=s.castOption(Cn,mn.i,"text");(En===0||En)&&(Ln.text=En),Ln.value=mn.s,Ln.valueLabel=Ln[or+"Label"]=yr(mn.s);var jn={};d(jn,Cn,mn.i),(kr||jn.x===void 0)&&(jn.x=dr?Ln.value:Ln.label),(kr||jn.y===void 0)&&(jn.y=dr?Ln.label:Ln.value),(kr||jn.xLabel===void 0)&&(jn.xLabel=dr?Ln.valueLabel:Ln.labelLabel),(kr||jn.yLabel===void 0)&&(jn.yLabel=dr?Ln.labelLabel:Ln.valueLabel),gr&&(Ln.delta=+mn.rawS||mn.s,Ln.deltaLabel=yr(Ln.delta),Ln.final=mn.v,Ln.finalLabel=yr(Ln.final),Ln.initial=Ln.final-Ln.delta,Ln.initialLabel=yr(Ln.initial)),ir&&(Ln.value=mn.s,Ln.valueLabel=yr(Ln.value),Ln.percentInitial=mn.begR,Ln.percentInitialLabel=s.formatPercent(mn.begR),Ln.percentPrevious=mn.difR,Ln.percentPreviousLabel=s.formatPercent(mn.difR),Ln.percentTotal=mn.sumR,Ln.percenTotalLabel=s.formatPercent(mn.sumR));var $n=s.castOption(Cn,mn.i,"customdata");return $n&&(Ln.customdata=$n),s.texttemplateString(Nn,Ln,on._d3locale,jn,Ln,Cn._meta||{})}(Kt,nn,yn,ln,kn):wn.textinfo?function(on,_n,fn,hn){var In=on[0].trace,Cn=In.orientation==="h",Nn=In.type==="waterfall",Hn=In.type==="funnel";function qn($n){return t(Cn?fn:hn,+$n,!0).text}var or,tr,kr=In.textinfo,gr=on[_n],ir=kr.split("+"),dr=[],yr=function($n){return ir.indexOf($n)!==-1};if(yr("label")&&dr.push((tr=on[_n].p,t(Cn?hn:fn,tr,!0).text)),yr("text")&&((or=s.castOption(In,gr.i,"text"))===0||or)&&dr.push(or),Nn){var $t=+gr.rawS||gr.s,mn=gr.v,Ln=mn-$t;yr("initial")&&dr.push(qn(Ln)),yr("delta")&&dr.push(qn($t)),yr("final")&&dr.push(qn(mn))}if(Hn){yr("value")&&dr.push(qn(gr.s));var En=0;yr("percent initial")&&En++,yr("percent previous")&&En++,yr("percent total")&&En++;var jn=En>1;yr("percent initial")&&(or=s.formatPercent(gr.begR),jn&&(or+=" of initial"),dr.push(or)),yr("percent previous")&&(or=s.formatPercent(gr.difR),jn&&(or+=" of previous"),dr.push(or)),yr("percent total")&&(or=s.formatPercent(gr.sumR),jn&&(or+=" of total"),dr.push(or))}return dr.join("
")}(nn,yn,ln,kn):a.getValue(wn.text,yn),a.coerceString(c,Wn)}(Ft,Ye,Ze,Dt,It);xt=function(Kt,nn){var yn=a.getValue(Kt.textposition,nn);return a.coerceEnumerated(b,yn)}(Nt,Ze);var Ge=Et.mode==="stack"||Et.mode==="relative",nt=Ye[Ze],ht=!Ge||nt._outmost;if(Ke&&xt!=="none"&&(!nt.isBlank&&st!==ot&&ft!==yt||xt!=="auto"&&xt!=="inside")){var Oe=Ft.font,Be=o.getBarColor(Ye[Ze],Nt),Qe=o.getInsideTextFont(Nt,Ze,Oe,Be),ut=o.getOutsideTextFont(Nt,Ze,Oe),pt=Ne.datum();Je?Dt.type==="log"&&pt.s0<=0&&(st=Dt.range[0]0&&mt>0&&(Ct<=_t&&mt<=Pt||Ct<=Pt&&mt<=_t||(Je?_t>=Ct*(Pt/mt):Pt>=mt*(_t/Ct)))?xt="inside":(xt="outside",bt.remove(),bt=null)):xt="inside"),!bt){var Bt=(bt=qt(Ne,Ke,Ot=s.ensureUniformFontSize(be,xt==="outside"?ut:Qe))).attr("transform");if(bt.attr("transform",""),Ct=(Lt=f.bBox(bt.node())).width,mt=Lt.height,bt.attr("transform",Bt),Ct<=0||mt<=0)return void bt.remove()}var Wt,Gt=Nt.textangle;Wt=xt==="outside"?function(Kt,nn,yn,ln,kn,Wn){var wn,on=!!Wn.isHorizontal,_n=!!Wn.constrained,fn=Wn.angle||0,hn=kn.width,In=kn.height,Cn=Math.abs(nn-Kt),Nn=Math.abs(ln-yn);wn=on?Nn>2*v?v:0:Cn>2*v?v:0;var Hn=1;_n&&(Hn=on?Math.min(1,Nn/In):Math.min(1,Cn/hn));var qn=M(fn),or=A(kn,qn),tr=(on?or.x:or.y)/2,kr=(kn.left+kn.right)/2,gr=(kn.top+kn.bottom)/2,ir=(Kt+nn)/2,dr=(yn+ln)/2,yr=0,$t=0,mn=on?m(nn,Kt):m(yn,ln);return on?(ir=nn-mn*wn,yr=mn*tr):(dr=ln+mn*wn,$t=-mn*tr),{textX:kr,textY:gr,targetX:ir,targetY:dr,anchorX:yr,anchorY:$t,scale:Hn,rotate:qn}}(st,ot,ft,yt,Lt,{isHorizontal:Je,constrained:Nt.constraintext==="both"||Nt.constraintext==="outside",angle:Gt}):C(st,ot,ft,yt,Lt,{isHorizontal:Je,constrained:Nt.constraintext==="both"||Nt.constraintext==="inside",angle:Gt,anchor:Nt.insidetextanchor}),Wt.fontSize=Ot.size,r(Nt.type==="histogram"?"bar":Nt.type,Wt,Ft),nt.transform=Wt;var Xt=k(bt,Ft,Et,Tt);s.setTransormAndDisplay(Xt,Wt)}else Ne.select("text").remove()})(L,O,Ae,ee,xe,Ce,ne,ue,me,U,B),O.layerClipId&&f.hideOutsideRangePoint(he,Ae.select("text"),G,N,X.xcalendar,X.ycalendar)});var de=X.cliponaxis===!1;f.setClipUrl(Q,de?null:O.layerClipId,L)});l.getComponentMethod("errorbars","plot")(L,H,O,U)},toMoveInsideBar:C}},81974:function(D){function E(e,_,w,s,T){var y=_.c2p(s?e.s0:e.p0,!0),f=_.c2p(s?e.s1:e.p1,!0),l=w.c2p(s?e.p0:e.s0,!0),t=w.c2p(s?e.p1:e.s1,!0);return T?[(y+f)/2,(l+t)/2]:s?[f,(l+t)/2]:[(y+f)/2,t]}D.exports=function(e,_){var w,s=e.cd,T=e.xaxis,y=e.yaxis,f=s[0].trace,l=f.type==="funnel",t=f.orientation==="h",i=[];if(_===!1)for(w=0;w1||k.bargap===0&&k.bargroupgap===0&&!h[0].trace.marker.line.width)&&_.select(this).attr("shape-rendering","crispEdges")}),g.selectAll("g.points").each(function(h){o(_.select(this),h[0].trace,x)}),y.getComponentMethod("errorbars","style")(g)},styleTextPoints:a,styleOnSelect:function(x,g,m){var k=g[0].trace;k.selectedpoints?function(h,M,A){s.selectedPointStyle(h.selectAll("path"),M),function(C,L,O){C.each(function(I){var R,U=_.select(this);if(I.selected){R=T.ensureUniformFontSize(O,u(U,I,L,O));var B=L.selected.textfont&&L.selected.textfont.color;B&&(R.color=B),s.font(U,R)}else s.selectedTextStyle(U,L)})}(h.selectAll("text"),M,A)}(m,k,x):(o(m,k,x),y.getComponentMethod("errorbars","style")(m))},getInsideTextFont:c,getOutsideTextFont:b,getBarColor:v,resizeText:f}},98340:function(D,E,e){var _=e(7901),w=e(52075).hasColorscale,s=e(1586),T=e(71828).coercePattern;D.exports=function(y,f,l,t,i){var r=l("marker.color",t),n=w(y,"marker");n&&s(y,f,i,l,{prefix:"marker.",cLetter:"c"}),l("marker.line.color",_.defaultLine),w(y,"marker.line")&&s(y,f,i,l,{prefix:"marker.line.",cLetter:"c"}),l("marker.line.width"),l("marker.opacity"),T(l,"marker.pattern",r,n),l("selected.marker.color"),l("unselected.marker.color")}},72597:function(D,E,e){var _=e(39898),w=e(71828);function s(T){return"_"+T+"Text_minsize"}D.exports={recordMinTextSize:function(T,y,f){if(f.uniformtext.mode){var l=s(T),t=f.uniformtext.minsize,i=y.scale*y.fontSize;y.hide=ia.range[1]&&(x+=Math.PI),_.getClosest(r,function(k){return c(v,x,[k.rp0,k.rp1],[k.thetag0,k.thetag1],p)?b+Math.min(1,Math.abs(k.thetag1-k.thetag0)/d)-1+(k.rp1-v)/(k.rp1-k.rp0)-1:1/0},l),l.index!==!1){var g=r[l.index];l.x0=l.x1=g.ct[0],l.y0=l.y1=g.ct[1];var m=w.extendFlat({},g,{r:g.s,theta:g.p});return T(g,n,l),y(m,n,o,l),l.hovertemplate=n.hovertemplate,l.color=s(n,g),l.xLabelVal=l.yLabelVal=void 0,g.s<0&&(l.idealAlign="left"),[l]}}},23381:function(D,E,e){D.exports={moduleType:"trace",name:"barpolar",basePlotModule:e(23580),categories:["polar","bar","showLegend"],attributes:e(55023),layoutAttributes:e(40151),supplyDefaults:e(6135),supplyLayoutDefaults:e(19860),calc:e(74692).calc,crossTraceCalc:e(74692).crossTraceCalc,plot:e(60173),colorbar:e(4898),formatLabels:e(98608),style:e(16688).style,styleOnSelect:e(16688).styleOnSelect,hoverPoints:e(27379),selectPoints:e(81974),meta:{}}},40151:function(D){D.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}},19860:function(D,E,e){var _=e(71828),w=e(40151);D.exports=function(s,T,y){var f,l={};function t(n,o){return _.coerce(s[f]||{},T[f],w,n,o)}for(var i=0;i0?(k=g,h=m):(k=m,h=g);var M=[y.findEnclosingVertexAngles(k,c.vangles)[0],(k+h)/2,y.findEnclosingVertexAngles(h,c.vangles)[1]];return y.pathPolygonAnnulus(v,x,k,h,M,b,d)}:function(v,x,g,m){return s.pathAnnulus(v,x,g,m,b,d)}}(l),p=l.layers.frontplot.select("g.barlayer");s.makeTraceGroups(p,t,"trace bars").each(function(){var c=_.select(this),b=s.ensureSingle(c,"g","points").selectAll("g.point").data(s.identity);b.enter().append("g").style("vector-effect",i?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),b.exit().remove(),b.each(function(d){var v,x=_.select(this),g=d.rp0=o.c2p(d.s0),m=d.rp1=o.c2p(d.s1),k=d.thetag0=a.c2g(d.p0),h=d.thetag1=a.c2g(d.p1);if(w(g)&&w(m)&&w(k)&&w(h)&&g!==m&&k!==h){var M=o.c2g(d.s1),A=(k+h)/2;d.ct=[r.c2p(M*Math.cos(A)),n.c2p(M*Math.sin(A))],v=u(g,m,k,h)}else v="M0,0Z";s.ensureSingle(x,"path").attr("d",v)}),T.setClipUrl(c,l._hasClipOnAxisFalse?l.clipIds.forTraces:null,f)})}},53522:function(D,E,e){var _=e(82196),w=e(1486),s=e(22399),T=e(12663).axisHoverFormat,y=e(5386).fF,f=e(1426).extendFlat,l=_.marker,t=l.line;D.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:_.xperiod,yperiod:_.yperiod,xperiod0:_.xperiod0,yperiod0:_.yperiod0,xperiodalignment:_.xperiodalignment,yperiodalignment:_.yperiodalignment,xhoverformat:T("x"),yhoverformat:T("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"},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:f({},l.symbol,{arrayOk:!1,editType:"plot"}),opacity:f({},l.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:f({},l.angle,{arrayOk:!1,editType:"calc"}),size:f({},l.size,{arrayOk:!1,editType:"calc"}),color:f({},l.color,{arrayOk:!1,editType:"style"}),line:{color:f({},t.color,{arrayOk:!1,dflt:s.defaultLine,editType:"style"}),width:f({},t.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:_.fillcolor,whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},offsetgroup:w.offsetgroup,alignmentgroup:w.alignmentgroup,selected:{marker:_.selected.marker,editType:"style"},unselected:{marker:_.unselected.marker,editType:"style"},text:f({},_.text,{}),hovertext:f({},_.hovertext,{}),hovertemplate:y({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"}}},48518:function(D,E,e){var _=e(92770),w=e(89298),s=e(42973),T=e(71828),y=e(50606).BADNUM,f=T._;D.exports=function(c,b){var d,v,x,g,m,k,h,M=c._fullLayout,A=w.getFromId(c,b.xaxis||"x"),C=w.getFromId(c,b.yaxis||"y"),L=[],O=b.type==="violin"?"_numViolins":"_numBoxes";b.orientation==="h"?(x=A,g="x",m=C,k="y",h=!!b.yperiodalignment):(x=C,g="y",m=A,k="x",h=!!b.xperiodalignment);var I,R,U,B,G,N,j=function(Se,Ne,Ye,Ze){var st,ot=Ne+"0"in Se;if(Ne in Se||ot&&"d"+Ne in Se){var ft=Ye.makeCalcdata(Se,Ne);return[s(Se,Ye,Ne,ft).vals,ft]}st=ot?Se[Ne+"0"]:"name"in Se&&(Ye.type==="category"||_(Se.name)&&["linear","log"].indexOf(Ye.type)!==-1||T.isDateTime(Se.name)&&Ye.type==="date")?Se.name:Ze;for(var yt=Ye.type==="multicategory"?Ye.r2c_just_indices(st):Ye.d2c(st,0,Se[Ne+"calendar"]),Et=Se._length,Tt=new Array(Et),xt=0;xtI.uf};if(b._hasPreCompStats){var K=b[g],te=function(Se){return x.d2c((b[Se]||[])[d])},ae=1/0,oe=-1/0;for(d=0;d=I.q1&&I.q3>=I.med){var fe=te("lowerfence");I.lf=fe!==y&&fe<=I.q1?fe:n(I,U,B);var ye=te("upperfence");I.uf=ye!==y&&ye>=I.q3?ye:o(I,U,B);var pe=te("mean");I.mean=pe!==y?pe:B?T.mean(U,B):(I.q1+I.q3)/2;var de=te("sd");I.sd=pe!==y&&de>=0?de:B?T.stdev(U,B,I.mean):I.q3-I.q1,I.lo=a(I),I.uo=u(I);var he=te("notchspan");he=he!==y&&he>0?he:p(I,B),I.ln=I.med-he,I.un=I.med+he;var xe=I.lf,Re=I.uf;b.boxpoints&&U.length&&(xe=Math.min(xe,U[0]),Re=Math.max(Re,U[B-1])),b.notched&&(xe=Math.min(xe,I.ln),Re=Math.max(Re,I.un)),I.min=xe,I.max=Re}else{var we;T.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+I.q1,"median = "+I.med,"q3 = "+I.q3].join(` -`)),we=I.med!==y?I.med:I.q1!==y?I.q3!==y?(I.q1+I.q3)/2:I.q1:I.q3!==y?I.q3:0,I.med=we,I.q1=I.q3=we,I.lf=I.uf=we,I.mean=I.sd=we,I.ln=I.un=we,I.min=I.max=we}ae=Math.min(ae,I.min),oe=Math.max(oe,I.max),I.pts2=R.filter(Y),L.push(I)}}b._extremes[x._id]=w.findExtremes(x,[ae,oe],{padded:!0})}else{var Ae=x.makeCalcdata(b,g),Me=function(Se,Ne){for(var Ye=Se.length,Ze=new Array(Ye+1),st=0;st=0&&ue0){var je,ge;(I={}).pos=I[k]=Q[d],R=I.pts=ne[d].sort(i),B=(U=I[g]=R.map(r)).length,I.min=U[0],I.max=U[B-1],I.mean=T.mean(U,B),I.sd=T.stdev(U,B,I.mean),I.med=T.interp(U,.5),B%2&&(Ue||De)?(Ue?(je=U.slice(0,B/2),ge=U.slice(B/2+1)):De&&(je=U.slice(0,B/2+1),ge=U.slice(B/2)),I.q1=T.interp(je,.5),I.q3=T.interp(ge,.5)):(I.q1=T.interp(U,.25),I.q3=T.interp(U,.75)),I.lf=n(I,U,B),I.uf=o(I,U,B),I.lo=a(I),I.uo=u(I);var be=p(I,B);I.ln=I.med-be,I.un=I.med+be,me=Math.min(me,I.ln),Te=Math.max(Te,I.un),I.pts2=R.filter(Y),L.push(I)}b._extremes[x._id]=w.findExtremes(x,b.notched?Ae.concat([me,Te]):Ae,{padded:!0})}return function(Se,Ne){if(T.isArrayOrTypedArray(Ne.selectedpoints))for(var Ye=0;Ye0?(L[0].t={num:M[O],dPos:X,posLetter:k,valLetter:g,labels:{med:f(c,"median:"),min:f(c,"min:"),q1:f(c,"q1:"),q3:f(c,"q3:"),max:f(c,"max:"),mean:b.boxmean==="sd"?f(c,"mean ± σ:"):f(c,"mean:"),lf:f(c,"lower fence:"),uf:f(c,"upper fence:")}},M[O]++,L):[{t:{empty:!0}}]};var l={text:"tx",hovertext:"htx"};function t(c,b,d){for(var v in l)T.isArrayOrTypedArray(b[v])&&(Array.isArray(d)?T.isArrayOrTypedArray(b[v][d[0]])&&(c[l[v]]=b[v][d[0]][d[1]]):c[l[v]]=b[v][d])}function i(c,b){return c.v-b.v}function r(c){return c.v}function n(c,b,d){return d===0?c.q1:Math.min(c.q1,b[Math.min(T.findBin(2.5*c.q1-1.5*c.q3,b,!0)+1,d-1)])}function o(c,b,d){return d===0?c.q3:Math.max(c.q3,b[Math.max(T.findBin(2.5*c.q3-1.5*c.q1,b),0)])}function a(c){return 4*c.q1-3*c.q3}function u(c){return 4*c.q3-3*c.q1}function p(c,b){return b===0?0:1.57*(c.q3-c.q1)/Math.sqrt(b)}},37188:function(D,E,e){var _=e(89298),w=e(71828),s=e(99082).getAxisGroup,T=["v","h"];function y(f,l,t,i){var r,n,o,a=l.calcdata,u=l._fullLayout,p=i._id,c=p.charAt(0),b=[],d=0;for(r=0;r1,k=1-u[f+"gap"],h=1-u[f+"groupgap"];for(r=0;r0){var se=R.pointpos,fe=R.jitter,ye=R.marker.size/2,pe=0;se+fe>=0&&((pe=ae*(se+fe))>O?(oe=!0,K=ye,X=pe):pe>ee&&(K=ye,X=O)),pe<=O&&(X=O);var de=0;se-fe<=0&&((de=-ae*(se-fe))>I?(oe=!0,te=ye,Y=de):de>Q&&(te=ye,Y=I)),de<=I&&(Y=I)}else X=O,Y=I;var he=new Array(o.length);for(n=0;n0?(m="v",k=M>0?Math.min(C,A):Math.min(A)):M>0?(m="h",k=Math.min(C)):k=0;if(k){n._length=k;var B=o("orientation",m);n._hasPreCompStats?B==="v"&&M===0?(o("x0",0),o("dx",1)):B==="h"&&h===0&&(o("y0",0),o("dy",1)):B==="v"&&M===0?o("x0"):B==="h"&&h===0&&o("y0"),w.getComponentMethod("calendars","handleTraceDefaults")(r,n,["x","y"],a)}else n.visible=!1}function i(r,n,o,a){var u=a.prefix,p=_.coerce2(r,n,l,"marker.outliercolor"),c=o("marker.line.outliercolor"),b="outliers";n._hasPreCompStats?b="all":(p||c)&&(b="suspectedoutliers");var d=o(u+"points",b);d?(o("jitter",d==="all"?.3:0),o("pointpos",d==="all"?-1.5:0),o("marker.symbol"),o("marker.opacity"),o("marker.size"),o("marker.angle"),o("marker.color",n.line.color),o("marker.line.color"),o("marker.line.width"),d==="suspectedoutliers"&&(o("marker.line.outliercolor",n.marker.color),o("marker.line.outlierwidth")),o("selected.marker.color"),o("unselected.marker.color"),o("selected.marker.size"),o("unselected.marker.size"),o("text"),o("hovertext")):delete n.marker;var v=o("hoveron");v!=="all"&&v.indexOf("points")===-1||o("hovertemplate"),_.coerceSelectionMarkerOpacity(n,o)}D.exports={supplyDefaults:function(r,n,o,a){function u(g,m){return _.coerce(r,n,l,g,m)}if(t(r,n,u,a),n.visible!==!1){T(r,n,a,u),u("xhoverformat"),u("yhoverformat");var p=n._hasPreCompStats;p&&(u("lowerfence"),u("upperfence")),u("line.color",(r.marker||{}).color||o),u("line.width"),u("fillcolor",s.addOpacity(n.line.color,.5));var c=!1;if(p){var b=u("mean"),d=u("sd");b&&b.length&&(c=!0,d&&d.length&&(c="sd"))}u("boxmean",c),u("whiskerwidth"),u("width"),u("quartilemethod");var v=!1;if(p){var x=u("notchspan");x&&x.length&&(v=!0)}else _.validate(r.notchwidth,l.notchwidth)&&(v=!0);u("notched",v)&&u("notchwidth"),i(r,n,u,{prefix:"box"})}},crossTraceDefaults:function(r,n){var o,a;function u(b){return _.coerce(a._input,a,l,b)}for(var p=0;pd.lo&&(U.so=!0)}return g});b.enter().append("path").classed("point",!0),b.exit().remove(),b.call(s.translatePoints,n,o)}function f(l,t,i,r){var n,o,a=t.val,u=t.pos,p=!!u.rangebreaks,c=r.bPos,b=r.bPosPxOffset||0,d=i.boxmean||(i.meanline||{}).visible;Array.isArray(r.bdPos)?(n=r.bdPos[0],o=r.bdPos[1]):(n=r.bdPos,o=r.bdPos);var v=l.selectAll("path.mean").data(i.type==="box"&&i.boxmean||i.type==="violin"&&i.box.visible&&i.meanline.visible?w.identity:[]);v.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),v.exit().remove(),v.each(function(x){var g=u.c2l(x.pos+c,!0),m=u.l2p(g-n)+b,k=u.l2p(g+o)+b,h=p?(m+k)/2:u.l2p(g)+b,M=a.c2p(x.mean,!0),A=a.c2p(x.mean-x.sd,!0),C=a.c2p(x.mean+x.sd,!0);i.orientation==="h"?_.select(this).attr("d","M"+M+","+m+"V"+k+(d==="sd"?"m0,0L"+A+","+h+"L"+M+","+m+"L"+C+","+h+"Z":"")):_.select(this).attr("d","M"+m+","+M+"H"+k+(d==="sd"?"m0,0L"+h+","+A+"L"+m+","+M+"L"+h+","+C+"Z":""))})}D.exports={plot:function(l,t,i,r){var n=l._context.staticPlot,o=t.xaxis,a=t.yaxis;w.makeTraceGroups(r,i,"trace boxes").each(function(u){var p,c,b=_.select(this),d=u[0],v=d.t,x=d.trace;v.wdPos=v.bdPos*x.whiskerwidth,x.visible!==!0||v.empty?b.remove():(x.orientation==="h"?(p=a,c=o):(p=o,c=a),T(b,{pos:p,val:c},x,v,n),y(b,{x:o,y:a},x,v),f(b,{pos:p,val:c},x,v))})},plotBoxAndWhiskers:T,plotPoints:y,plotBoxMean:f}},24626:function(D){D.exports=function(E,e){var _,w,s=E.cd,T=E.xaxis,y=E.yaxis,f=[];if(e===!1)for(_=0;_=10)return null;for(var y=1/0,f=-1/0,l=s.length,t=0;t0?Math.floor:Math.ceil,B=I>0?Math.ceil:Math.floor,G=I>0?Math.min:Math.max,N=I>0?Math.max:Math.min,j=U(L+R),V=B(O-R),H=[[o=C(L)]];for(f=j;f*I=0;s--)T[i-s]=E[r][s],y[i-s]=e[r][s];for(f.push({x:T,y,bicubic:l}),s=r,T=[],y=[];s>=0;s--)T[r-s]=E[s][0],y[r-s]=e[s][0];return f.push({x:T,y,bicubic:t}),f}},20347:function(D,E,e){var _=e(89298),w=e(1426).extendFlat;D.exports=function(s,T,y){var f,l,t,i,r,n,o,a,u,p,c,b,d,v,x=s["_"+T],g=s[T+"axis"],m=g._gridlines=[],k=g._minorgridlines=[],h=g._boundarylines=[],M=s["_"+y],A=s[y+"axis"];g.tickmode==="array"&&(g.tickvals=x.slice());var C=s._xctrl,L=s._yctrl,O=C[0].length,I=C.length,R=s._a.length,U=s._b.length;_.prepTicks(g),g.tickmode==="array"&&delete g.tickvals;var B=g.smoothing?3:1;function G(j){var V,H,ee,Q,X,Y,K,te,ae,oe,se,fe,ye=[],pe=[],de={};if(T==="b")for(H=s.b2j(j),ee=Math.floor(Math.max(0,Math.min(U-2,H))),Q=H-ee,de.length=U,de.crossLength=R,de.xy=function(he){return s.evalxy([],he,H)},de.dxy=function(he,xe){return s.dxydi([],he,ee,xe,Q)},V=0;V0&&(ae=s.dxydi([],V-1,ee,0,Q),ye.push(X[0]+ae[0]/3),pe.push(X[1]+ae[1]/3),oe=s.dxydi([],V-1,ee,1,Q),ye.push(te[0]-oe[0]/3),pe.push(te[1]-oe[1]/3)),ye.push(te[0]),pe.push(te[1]),X=te;else for(V=s.a2i(j),Y=Math.floor(Math.max(0,Math.min(R-2,V))),K=V-Y,de.length=R,de.crossLength=U,de.xy=function(he){return s.evalxy([],V,he)},de.dxy=function(he,xe){return s.dxydj([],Y,he,K,xe)},H=0;H0&&(se=s.dxydj([],Y,H-1,K,0),ye.push(X[0]+se[0]/3),pe.push(X[1]+se[1]/3),fe=s.dxydj([],Y,H-1,K,1),ye.push(te[0]-fe[0]/3),pe.push(te[1]-fe[1]/3)),ye.push(te[0]),pe.push(te[1]),X=te;return de.axisLetter=T,de.axis=g,de.crossAxis=A,de.value=j,de.constvar=y,de.index=a,de.x=ye,de.y=pe,de.smoothing=A.smoothing,de}function N(j){var V,H,ee,Q,X,Y=[],K=[],te={};if(te.length=x.length,te.crossLength=M.length,T==="b")for(ee=Math.max(0,Math.min(U-2,j)),X=Math.min(1,Math.max(0,j-ee)),te.xy=function(ae){return s.evalxy([],ae,j)},te.dxy=function(ae,oe){return s.dxydi([],ae,ee,oe,X)},V=0;Vx.length-1||m.push(w(N(l),{color:g.gridcolor,width:g.gridwidth,dash:g.griddash}));for(a=n;ax.length-1||c<0||c>x.length-1))for(b=x[t],d=x[c],f=0;fx[x.length-1]||k.push(w(G(p),{color:g.minorgridcolor,width:g.minorgridwidth,dash:g.minorgriddash}));g.startline&&h.push(w(N(0),{color:g.startlinecolor,width:g.startlinewidth})),g.endline&&h.push(w(N(x.length-1),{color:g.endlinecolor,width:g.endlinewidth}))}else{for(i=5e-15,n=(r=[Math.floor((x[x.length-1]-g.tick0)/g.dtick*(1+i)),Math.ceil((x[0]-g.tick0)/g.dtick/(1+i))].sort(function(j,V){return j-V}))[0],o=r[1],a=n;a<=o;a++)u=g.tick0+g.dtick*a,m.push(w(G(u),{color:g.gridcolor,width:g.gridwidth,dash:g.griddash}));for(a=n-1;ax[x.length-1]||k.push(w(G(p),{color:g.minorgridcolor,width:g.minorgridwidth,dash:g.minorgriddash}));g.startline&&h.push(w(G(x[0]),{color:g.startlinecolor,width:g.startlinewidth})),g.endline&&h.push(w(G(x[x.length-1]),{color:g.endlinecolor,width:g.endlinewidth}))}}},83311:function(D,E,e){var _=e(89298),w=e(1426).extendFlat;D.exports=function(s,T){var y,f,l,t=T._labels=[],i=T._gridlines;for(y=0;ys.length&&(w=w.slice(0,s.length)):w=[],y=0;y90&&(o-=180,l=-l),{angle:o,flip:l,p:E.c2p(w,e,_),offsetMultplier:t}}},89740:function(D,E,e){var _=e(39898),w=e(91424),s=e(27669),T=e(67961),y=e(11651),f=e(63893),l=e(71828),t=l.strRotate,i=l.strTranslate,r=e(18783);function n(c,b,d,v,x,g,m){var k="const-"+x+"-lines",h=d.selectAll("."+k).data(g);h.enter().append("path").classed(k,!0).style("vector-effect",m?"none":"non-scaling-stroke"),h.each(function(M){var A=M,C=A.x,L=A.y,O=s([],C,c.c2p),I=s([],L,b.c2p),R="M"+T(O,I,A.smoothing);_.select(this).attr("d",R).style("stroke-width",A.width).style("stroke",A.color).style("stroke-dasharray",w.dashStyle(A.dash,A.width)).style("fill","none")}),h.exit().remove()}function o(c,b,d,v,x,g,m,k){var h=g.selectAll("text."+k).data(m);h.enter().append("text").classed(k,!0);var M=0,A={};return h.each(function(C,L){var O;if(C.axis.tickangle==="auto")O=y(v,b,d,C.xy,C.dxy);else{var I=(C.axis.tickangle+180)*Math.PI/180;O=y(v,b,d,C.xy,[Math.cos(I),Math.sin(I)])}L||(A={angle:O.angle,flip:O.flip});var R=(C.endAnchor?-1:1)*O.flip,U=_.select(this).attr({"text-anchor":R>0?"start":"end","data-notex":1}).call(w.font,C.font).text(C.text).call(f.convertToTspans,c),B=w.bBox(this);U.attr("transform",i(O.p[0],O.p[1])+t(O.angle)+i(C.axis.labelpadding*R,.3*B.height)),M=Math.max(M,B.width+C.axis.labelpadding)}),h.exit().remove(),A.maxExtent=M,A}D.exports=function(c,b,d,v){var x=c._context.staticPlot,g=b.xaxis,m=b.yaxis,k=c._fullLayout._clips;l.makeTraceGroups(v,d,"trace").each(function(h){var M=_.select(this),A=h[0],C=A.trace,L=C.aaxis,O=C.baxis,I=l.ensureSingle(M,"g","minorlayer"),R=l.ensureSingle(M,"g","majorlayer"),U=l.ensureSingle(M,"g","boundarylayer"),B=l.ensureSingle(M,"g","labellayer");M.style("opacity",C.opacity),n(g,m,R,0,"a",L._gridlines,!0),n(g,m,R,0,"b",O._gridlines,!0),n(g,m,I,0,"a",L._minorgridlines,!0),n(g,m,I,0,"b",O._minorgridlines,!0),n(g,m,U,0,"a-boundary",L._boundarylines,x),n(g,m,U,0,"b-boundary",O._boundarylines,x);var G=o(c,g,m,C,0,B,L._labels,"a-label"),N=o(c,g,m,C,0,B,O._labels,"b-label");(function(j,V,H,ee,Q,X,Y,K){var te,ae,oe,se,fe=l.aggNums(Math.min,null,H.a),ye=l.aggNums(Math.max,null,H.a),pe=l.aggNums(Math.min,null,H.b),de=l.aggNums(Math.max,null,H.b);te=.5*(fe+ye),ae=pe,oe=H.ab2xy(te,ae,!0),se=H.dxyda_rough(te,ae),Y.angle===void 0&&l.extendFlat(Y,y(H,Q,X,oe,H.dxydb_rough(te,ae))),p(j,V,H,0,oe,se,H.aaxis,Q,X,Y,"a-title"),te=fe,ae=.5*(pe+de),oe=H.ab2xy(te,ae,!0),se=H.dxydb_rough(te,ae),K.angle===void 0&&l.extendFlat(K,y(H,Q,X,oe,H.dxyda_rough(te,ae))),p(j,V,H,0,oe,se,H.baxis,Q,X,K,"b-title")})(c,B,C,0,g,m,G,N),function(j,V,H,ee,Q){var X,Y,K,te,ae=H.select("#"+j._clipPathId);ae.size()||(ae=H.append("clipPath").classed("carpetclip",!0));var oe=l.ensureSingle(ae,"path","carpetboundary"),se=V.clipsegments,fe=[];for(te=0;te90&&U<270,G=_.select(this);G.text(m.title.text).call(f.convertToTspans,c),B&&(O=(-f.lineCount(G)+u)*a*R-O),G.attr("transform",i(I.p[0],I.p[1])+t(I.angle)+i(0,O)).attr("text-anchor","middle").call(w.font,m.title.font)}),L.exit().remove()}},11435:function(D,E,e){var _=e(35509),w=e(65888).findBin,s=e(45664),T=e(20349),y=e(54495),f=e(73057);D.exports=function(l){var t=l._a,i=l._b,r=t.length,n=i.length,o=l.aaxis,a=l.baxis,u=t[0],p=t[r-1],c=i[0],b=i[n-1],d=t[t.length-1]-t[0],v=i[i.length-1]-i[0],x=d*_.RELATIVE_CULL_TOLERANCE,g=v*_.RELATIVE_CULL_TOLERANCE;u-=x,p+=x,c-=g,b+=g,l.isVisible=function(m,k){return m>u&&mc&&kp||kb},l.setScale=function(){var m=l._x,k=l._y,h=s(l._xctrl,l._yctrl,m,k,o.smoothing,a.smoothing);l._xctrl=h[0],l._yctrl=h[1],l.evalxy=T([l._xctrl,l._yctrl],r,n,o.smoothing,a.smoothing),l.dxydi=y([l._xctrl,l._yctrl],o.smoothing,a.smoothing),l.dxydj=f([l._xctrl,l._yctrl],o.smoothing,a.smoothing)},l.i2a=function(m){var k=Math.max(0,Math.floor(m[0]),r-2),h=m[0]-k;return(1-h)*t[k]+h*t[k+1]},l.j2b=function(m){var k=Math.max(0,Math.floor(m[1]),r-2),h=m[1]-k;return(1-h)*i[k]+h*i[k+1]},l.ij2ab=function(m){return[l.i2a(m[0]),l.j2b(m[1])]},l.a2i=function(m){var k=Math.max(0,Math.min(w(m,t),r-2)),h=t[k],M=t[k+1];return Math.max(0,Math.min(r-1,k+(m-h)/(M-h)))},l.b2j=function(m){var k=Math.max(0,Math.min(w(m,i),n-2)),h=i[k],M=i[k+1];return Math.max(0,Math.min(n-1,k+(m-h)/(M-h)))},l.ab2ij=function(m){return[l.a2i(m[0]),l.b2j(m[1])]},l.i2c=function(m,k){return l.evalxy([],m,k)},l.ab2xy=function(m,k,h){if(!h&&(mt[r-1]|ki[n-1]))return[!1,!1];var M=l.a2i(m),A=l.b2j(k),C=l.evalxy([],M,A);if(h){var L,O,I,R,U=0,B=0,G=[];mt[r-1]?(L=r-2,O=1,U=(m-t[r-1])/(t[r-1]-t[r-2])):O=M-(L=Math.max(0,Math.min(r-2,Math.floor(M)))),ki[n-1]?(I=n-2,R=1,B=(k-i[n-1])/(i[n-1]-i[n-2])):R=A-(I=Math.max(0,Math.min(n-2,Math.floor(A)))),U&&(l.dxydi(G,L,I,O,R),C[0]+=G[0]*U,C[1]+=G[1]*U),B&&(l.dxydj(G,L,I,O,R),C[0]+=G[0]*B,C[1]+=G[1]*B)}return C},l.c2p=function(m,k,h){return[k.c2p(m[0]),h.c2p(m[1])]},l.p2x=function(m,k,h){return[k.p2c(m[0]),h.p2c(m[1])]},l.dadi=function(m){var k=Math.max(0,Math.min(t.length-2,m));return t[k+1]-t[k]},l.dbdj=function(m){var k=Math.max(0,Math.min(i.length-2,m));return i[k+1]-i[k]},l.dxyda=function(m,k,h,M){var A=l.dxydi(null,m,k,h,M),C=l.dadi(m,h);return[A[0]/C,A[1]/C]},l.dxydb=function(m,k,h,M){var A=l.dxydj(null,m,k,h,M),C=l.dbdj(k,M);return[A[0]/C,A[1]/C]},l.dxyda_rough=function(m,k,h){var M=d*(h||.1),A=l.ab2xy(m+M,k,!0),C=l.ab2xy(m-M,k,!0);return[.5*(A[0]-C[0])/M,.5*(A[1]-C[1])/M]},l.dxydb_rough=function(m,k,h){var M=v*(h||.1),A=l.ab2xy(m,k+M,!0),C=l.ab2xy(m,k-M,!0);return[.5*(A[0]-C[0])/M,.5*(A[1]-C[1])/M]},l.dpdx=function(m){return m._m},l.dpdy=function(m){return m._m}}},72505:function(D,E,e){var _=e(71828);D.exports=function(w,s,T){var y,f,l,t=[],i=[],r=w[0].length,n=w.length;function o(j,V){var H,ee=0,Q=0;return j>0&&(H=w[V][j-1])!==void 0&&(Q++,ee+=H),j0&&(H=w[V-1][j])!==void 0&&(Q++,ee+=H),V0&&f0&&y1e-5);return _.log("Smoother converged to",M,"after",A,"iterations"),w}},19237:function(D,E,e){var _=e(71828).isArray1D;D.exports=function(w,s,T){var y=T("x"),f=y&&y.length,l=T("y"),t=l&&l.length;if(!f&&!t)return!1;if(s._cheater=!y,f&&!_(y)||t&&!_(l))s._length=null;else{var i=f?y.length:1/0;t&&(i=Math.min(i,l.length)),s.a&&s.a.length&&(i=Math.min(i,s.a.length)),s.b&&s.b.length&&(i=Math.min(i,s.b.length)),s._length=i}return!0}},69568:function(D,E,e){var _=e(5386).fF,w=e(19316),s=e(50693),T=e(9012),y=e(22399).defaultLine,f=e(1426).extendFlat,l=w.marker.line;D.exports=f({locations:{valType:"data_array",editType:"calc"},locationmode:w.locationmode,z:{valType:"data_array",editType:"calc"},geojson:f({},w.geojson,{}),featureidkey:w.featureidkey,text:f({},w.text,{}),hovertext:f({},w.hovertext,{}),marker:{line:{color:f({},l.color,{dflt:y}),width:f({},l.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:w.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:w.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:f({},T.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:_(),showlegend:f({},T.showlegend,{dflt:!1})},s("",{cLetter:"z",editTypeOverride:"calc"}))},38675:function(D,E,e){var _=e(92770),w=e(50606).BADNUM,s=e(78803),T=e(75225),y=e(66279);function f(l){return l&&typeof l=="string"}D.exports=function(l,t){var i,r=t._length,n=new Array(r);i=t.geojson?function(c){return f(c)||_(c)}:f;for(var o=0;o")}}(T,o,l),[T]}},51319:function(D,E,e){D.exports={attributes:e(69568),supplyDefaults:e(61869),colorbar:e(61243),calc:e(38675),calcGeoJSON:e(99841).calcGeoJSON,plot:e(99841).plot,style:e(99636).style,styleOnSelect:e(99636).styleOnSelect,hoverPoints:e(42300),eventData:e(92069),selectPoints:e(81253),moduleType:"trace",name:"choropleth",basePlotModule:e(44622),categories:["geo","noOpacity","showLegend"],meta:{}}},99841:function(D,E,e){var _=e(39898),w=e(71828),s=e(41327),T=e(90973).getTopojsonFeatures,y=e(71739).findExtremes,f=e(99636).style;D.exports={calcGeoJSON:function(l,t){for(var i=l[0].trace,r=t[i.geo],n=r._subplot,o=i.locationmode,a=i._length,u=o==="geojson-id"?s.extractTraceFeature(l):T(i,n.topojson),p=[],c=[],b=0;b=0;T--){var y=s[T].id;if(typeof y=="string"&&y.indexOf("water")===0){for(var f=T+1;f=0;t--)f.removeLayer(l[t][1])},y.dispose=function(){var f=this.subplot.map;this._removeLayers(),f.removeSource(this.sourceId)},D.exports=function(f,l){var t=l[0].trace,i=new T(f,t.uid),r=i.sourceId,n=_(l),o=i.below=f.belowLookup["trace-"+t.uid];return f.map.addSource(r,{type:"geojson",data:n.geojson}),i._addLayers(n,o),l[0].trace._glTrace=i,i}},12674:function(D,E,e){var _=e(50693),w=e(12663).axisHoverFormat,s=e(5386).fF,T=e(2418),y=e(9012),f=e(1426).extendFlat,l={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"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:s({editType:"calc"},{keys:["norm"]}),uhoverformat:w("u",1),vhoverformat:w("v",1),whoverformat:w("w",1),xhoverformat:w("x"),yhoverformat:w("y"),zhoverformat:w("z"),showlegend:f({},y.showlegend,{dflt:!1})};f(l,_("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"})),["opacity","lightposition","lighting"].forEach(function(t){l[t]=T[t]}),l.hoverinfo=f({},y.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),l.transforms=void 0,D.exports=l},31371:function(D,E,e){var _=e(78803);D.exports=function(w,s){for(var T=s.u,y=s.v,f=s.w,l=Math.min(s.x.length,s.y.length,s.z.length,T.length,y.length,f.length),t=-1/0,i=1/0,r=0;ry.level||y.starts.length&&T===y.level)}break;case"constraint":if(w.prefixBoundary=!1,w.edgepaths.length)return;var f=w.x.length,l=w.y.length,t=-1/0,i=1/0;for(_=0;_":o>t&&(w.prefixBoundary=!0);break;case"<":(ot||w.starts.length&&n===i)&&(w.prefixBoundary=!0);break;case"][":r=Math.min(o[0],o[1]),n=Math.max(o[0],o[1]),rt&&(w.prefixBoundary=!0)}}}},90654:function(D,E,e){var _=e(21081),w=e(86068),s=e(53572);D.exports={min:"zmin",max:"zmax",calc:function(T,y,f){var l=y.contours,t=y.line,i=l.size||1,r=l.coloring,n=w(y,{isColorbar:!0});if(r==="heatmap"){var o=_.extractOpts(y);f._fillgradient=o.reversescale?_.flipScale(o.colorscale):o.colorscale,f._zrange=[o.min,o.max]}else r==="fill"&&(f._fillcolor=n);f._line={color:r==="lines"?n:t.color,width:l.showlines!==!1?t.width:0,dash:t.dash},f._levels={start:l.start,end:s(l),size:i}}}},36914:function(D){D.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}}},83179:function(D,E,e){var _=e(92770),w=e(14523),s=e(7901),T=s.addOpacity,y=s.opacity,f=e(74808),l=f.CONSTRAINT_REDUCTION,t=f.COMPARISON_OPS2;D.exports=function(i,r,n,o,a,u){var p,c,b,d=r.contours,v=n("contours.operation");d._operation=l[v],function(x,g){var m;t.indexOf(g.operation)===-1?(x("contours.value",[0,1]),Array.isArray(g.value)?g.value.length>2?g.value=g.value.slice(2):g.length===0?g.value=[0,1]:g.length<2?(m=parseFloat(g.value[0]),g.value=[m,m+1]):g.value=[parseFloat(g.value[0]),parseFloat(g.value[1])]:_(g.value)&&(m=parseFloat(g.value),g.value=[m,m+1])):(x("contours.value",0),_(g.value)||(Array.isArray(g.value)?g.value=parseFloat(g.value[0]):g.value=0))}(n,d),v==="="?p=d.showlines=!0:(p=n("contours.showlines"),b=n("fillcolor",T((i.line||{}).color||a,.5))),p&&(c=n("line.color",b&&y(b)?T(r.fillcolor,1):a),n("line.width",2),n("line.dash")),n("line.smoothing"),w(n,o,c,u)}},64237:function(D,E,e){var _=e(74808),w=e(92770);function s(f,l){var t,i=Array.isArray(l);function r(n){return w(n)?+n:null}return _.COMPARISON_OPS2.indexOf(f)!==-1?t=r(i?l[0]:l):_.INTERVAL_OPS.indexOf(f)!==-1?t=i?[r(l[0]),r(l[1])]:[r(l),r(l)]:_.SET_OPS.indexOf(f)!==-1&&(t=i?l.map(r):[r(l)]),t}function T(f){return function(l){l=s(f,l);var t=Math.min(l[0],l[1]),i=Math.max(l[0],l[1]);return{start:t,end:i,size:i-t}}}function y(f){return function(l){return{start:l=s(f,l),end:1/0,size:1/0}}}D.exports={"[]":T("[]"),"][":T("]["),">":y(">"),"<":y("<"),"=":y("=")}},67217:function(D){D.exports=function(E,e,_,w){var s=w("contours.start"),T=w("contours.end"),y=s===!1||T===!1,f=_("contours.size");!(y?e.autocontour=!0:_("autocontour",!1))&&f||_("ncontours")}},84857:function(D,E,e){var _=e(71828);function w(s){return _.extendFlat({},s,{edgepaths:_.extendDeep([],s.edgepaths),paths:_.extendDeep([],s.paths),starts:_.extendDeep([],s.starts)})}D.exports=function(s,T){var y,f,l,t=function(n){return n.reverse()},i=function(n){return n};switch(T){case"=":case"<":return s;case">":for(s.length!==1&&_.warn("Contour data invalid for the specified inequality operation."),f=s[0],y=0;y1e3){_.warn("Too many contours, clipping at 1000",T);break}return i}},53572:function(D){D.exports=function(E){return E.end+E.size/1e6}},81696:function(D,E,e){var _=e(71828),w=e(36914);function s(f,l,t,i){return Math.abs(f[0]-l[0])20&&oe?ae===208||ae===1114?fe=se[0]===0?1:-1:ye=se[1]===0?1:-1:w.BOTTOMSTART.indexOf(ae)!==-1?ye=1:w.LEFTSTART.indexOf(ae)!==-1?fe=1:w.TOPSTART.indexOf(ae)!==-1?ye=-1:fe=-1,[fe,ye]}(a,t,l),p=[y(f,l,[-u[0],-u[1]])],c=f.z.length,b=f.z[0].length,d=l.slice(),v=u.slice();for(n=0;n<1e4;n++){if(a>20?(a=w.CHOOSESADDLE[a][(u[0]||u[1])<0?0:1],f.crossings[o]=w.SADDLEREMAINDER[a]):delete f.crossings[o],!(u=w.NEWDELTA[a])){_.log("Found bad marching index:",a,l,f.level);break}p.push(y(f,l,u)),l[0]+=u[0],l[1]+=u[1],o=l.join(","),s(p[p.length-1],p[p.length-2],i,r)&&p.pop();var x=u[0]&&(l[0]<0||l[0]>b-2)||u[1]&&(l[1]<0||l[1]>c-2);if(l[0]===d[0]&&l[1]===d[1]&&u[0]===v[0]&&u[1]===v[1]||t&&x)break;a=f.crossings[o]}n===1e4&&_.log("Infinite loop in contour?");var g,m,k,h,M,A,C,L,O,I,R,U,B,G,N,j=s(p[0],p[p.length-1],i,r),V=0,H=.2*f.smoothing,ee=[],Q=0;for(n=1;n=Q;n--)if((g=ee[n])=Q&&g+ee[m]L&&O--,f.edgepaths[O]=R.concat(p,I));break}te||(f.edgepaths[L]=p.concat(I))}for(L=0;Ls?0:1)+(T[0][1]>s?0:2)+(T[1][1]>s?0:4)+(T[1][0]>s?0:8);return y===5||y===10?s>(T[0][0]+T[0][1]+T[1][0]+T[1][1])/4?y===5?713:1114:y===5?104:208:y===15?0:y}D.exports=function(s){var T,y,f,l,t,i,r,n,o,a=s[0].z,u=a.length,p=a[0].length,c=u===2||p===2;for(y=0;y=0&&(m=N,h=M):Math.abs(g[1]-m[1])<.01?Math.abs(g[1]-N[1])<.01&&(N[0]-g[0])*(m[0]-N[0])>=0&&(m=N,h=M):w.log("endpt to newendpt is not vert. or horz.",g,m,N)}if(g=m,h>=0)break;L+="L"+m}if(h===v.edgepaths.length){w.log("unclosed perimeter path");break}O=h,(R=I.indexOf(O)===-1)&&(O=I[0],L+="Z")}for(O=0;Om.center?m.right-M:M-m.left)/(L+Math.abs(Math.sin(C)*h)),R=(A>m.middle?m.bottom-A:A-m.top)/(Math.abs(O)+Math.cos(C)*h);if(I<1||R<1)return 1/0;var U=p.EDGECOST*(1/(I-1)+1/(R-1));U+=p.ANGLECOST*C*C;for(var B=M-L,G=A-O,N=M+L,j=A+O,V=0;V2*p.MAXCOST)break;R&&(M/=2),A=(h=C-M/2)+1.5*M}if(I<=p.MAXCOST)return L},E.addLabelData=function(v,x,g,m){var k=x.fontSize,h=x.width+k/3,M=Math.max(0,x.height-k/3),A=v.x,C=v.y,L=v.theta,O=Math.sin(L),I=Math.cos(L),R=function(B,G){return[A+B*I-G*O,C+B*O+G*I]},U=[R(-h/2,-M/2),R(-h/2,M/2),R(h/2,M/2),R(h/2,-M/2)];g.push({text:x.text,x:A,y:C,dy:x.dy,theta:L,level:x.level,width:h,height:M}),m.push(U)},E.drawLabels=function(v,x,g,m,k){var h=v.selectAll("text").data(x,function(C){return C.text+","+C.x+","+C.y+","+C.theta});if(h.exit().remove(),h.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each(function(C){var L=C.x+Math.sin(C.theta)*C.dy,O=C.y-Math.cos(C.theta)*C.dy;_.select(this).text(C.text).attr({x:L,y:O,transform:"rotate("+180*C.theta/Math.PI+" "+L+" "+O+")"}).call(y.convertToTspans,g)}),k){for(var M="",A=0;Af.end&&(f.start=f.end=(f.start+f.end)/2),T._input.contours||(T._input.contours={}),w.extendFlat(T._input.contours,{start:f.start,end:f.end,size:f.size}),T._input.autocontour=!0}else if(f.type!=="constraint"){var r,n=f.start,o=f.end,a=T._input.contours;n>o&&(f.start=a.start=o,o=f.end=a.end=n,n=f.start),f.size>0||(r=n===o?1:s(n,o,T.ncontours).dtick,a.size=f.size=r)}}},84426:function(D,E,e){var _=e(39898),w=e(91424),s=e(70035),T=e(86068);D.exports=function(y){var f=_.select(y).selectAll("g.contour");f.style("opacity",function(l){return l[0].trace.opacity}),f.each(function(l){var t=_.select(this),i=l[0].trace,r=i.contours,n=i.line,o=r.size||1,a=r.start,u=r.type==="constraint",p=!u&&r.coloring==="lines",c=!u&&r.coloring==="fill",b=p||c?T(i):null;t.selectAll("g.contourlevel").each(function(x){_.select(this).selectAll("path").call(w.lineGroupStyle,n.width,p?b(x.level):n.color,n.dash)});var d=r.labelfont;if(t.selectAll("g.contourlabels text").each(function(x){w.font(_.select(this),{family:d.family,size:d.size,color:d.color||(p?b(x.level):n.color)})}),u)t.selectAll("g.contourfill path").style("fill",i.fillcolor);else if(c){var v;t.selectAll("g.contourfill path").style("fill",function(x){return v===void 0&&(v=x.level),b(x.level+.5*o)}),v===void 0&&(v=a),t.selectAll("g.contourbg path").style("fill",b(v-.5*o))}}),s(y)}},8724:function(D,E,e){var _=e(1586),w=e(14523);D.exports=function(s,T,y,f,l){var t,i=y("contours.coloring"),r="";i==="fill"&&(t=y("contours.showlines")),t!==!1&&(i!=="lines"&&(r=y("line.color","#000")),y("line.width",.5),y("line.dash")),i!=="none"&&(s.showlegend!==!0&&(T.showlegend=!1),T._dfltShowLegend=!1,_(s,T,f,y,{prefix:"",cLetter:"z"})),y("line.smoothing"),w(y,f,r,l)}},88085:function(D,E,e){var _=e(21606),w=e(70600),s=e(50693),T=e(1426).extendFlat,y=w.contours;D.exports=T({carpet:{valType:"string",editType:"calc"},z:_.z,a:_.x,a0:_.x0,da:_.dx,b:_.y,b0:_.y0,db:_.dy,text:_.text,hovertext:_.hovertext,transpose:_.transpose,atype:_.xtype,btype:_.ytype,fillcolor:w.fillcolor,autocontour:w.autocontour,ncontours:w.ncontours,contours:{type:y.type,start:y.start,end:y.end,size:y.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:y.showlines,showlabels:y.showlabels,labelfont:y.labelfont,labelformat:y.labelformat,operation:y.operation,value:y.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:w.line.color,width:w.line.width,dash:w.line.dash,smoothing:w.line.smoothing,editType:"plot"},transforms:void 0},s("",{cLetter:"z",autoColorDflt:!1}))},59885:function(D,E,e){var _=e(78803),w=e(71828),s=e(68296),T=e(4742),y=e(824),f=e(43907),l=e(70769),t=e(75005),i=e(22882),r=e(18670);D.exports=function(n,o){var a=o._carpetTrace=i(n,o);if(a&&a.visible&&a.visible!=="legendonly"){if(!o.a||!o.b){var u=n.data[a.index],p=n.data[o.index];p.a||(p.a=u.a),p.b||(p.b=u.b),t(p,o,o._defaultColor,n._fullLayout)}var c=function(b,d){var v,x,g,m,k,h,M,A=d._carpetTrace,C=A.aaxis,L=A.baxis;C._minDtick=0,L._minDtick=0,w.isArray1D(d.z)&&s(d,C,L,"a","b",["z"]),v=d._a=d._a||d.a,m=d._b=d._b||d.b,v=v?C.makeCalcdata(d,"_a"):[],m=m?L.makeCalcdata(d,"_b"):[],x=d.a0||0,g=d.da||1,k=d.b0||0,h=d.db||1,M=d._z=T(d._z||d.z,d.transpose),d._emptypoints=f(M),y(M,d._emptypoints);var O=w.maxRowLength(M),I=d.xtype==="scaled"?"":v,R=l(d,I,x,g,O,C),U=d.ytype==="scaled"?"":m,B={a:R,b:l(d,U,k,h,M.length,L),z:M};return d.contours.type==="levels"&&d.contours.coloring!=="none"&&_(b,d,{vals:M,containerStr:"",cLetter:"z"}),[B]}(n,o);return r(o,o._z),c}}},75005:function(D,E,e){var _=e(71828),w=e(67684),s=e(88085),T=e(83179),y=e(67217),f=e(8724);D.exports=function(l,t,i,r){function n(o,a){return _.coerce(l,t,s,o,a)}if(n("carpet"),l.a&&l.b){if(!w(l,t,n,r,"a","b"))return void(t.visible=!1);n("text"),n("contours.type")==="constraint"?T(l,t,n,r,i,{hasHover:!1}):(y(l,t,n,function(o){return _.coerce2(l,t,s,o)}),f(l,t,n,r,{hasHover:!1}))}else t._defaultColor=i,t._length=null}},93740:function(D,E,e){D.exports={attributes:e(88085),supplyDefaults:e(75005),colorbar:e(90654),calc:e(59885),plot:e(51048),style:e(84426),moduleType:"trace",name:"contourcarpet",basePlotModule:e(93612),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}},51048:function(D,E,e){var _=e(39898),w=e(27669),s=e(67961),T=e(91424),y=e(71828),f=e(87678),l=e(81696),t=e(29854),i=e(36914),r=e(84857),n=e(87558),o=e(20083),a=e(22882),u=e(4536);function p(d,v,x){var g=d.getPointAtLength(v),m=d.getPointAtLength(x),k=m.x-g.x,h=m.y-g.y,M=Math.sqrt(k*k+h*h);return[k/M,h/M]}function c(d){var v=Math.sqrt(d[0]*d[0]+d[1]*d[1]);return[d[0]/v,d[1]/v]}function b(d,v){var x=Math.abs(d[0]*v[0]+d[1]*v[1]);return Math.sqrt(1-x*x)/x}D.exports=function(d,v,x,g){var m=v.xaxis,k=v.yaxis;y.makeTraceGroups(g,x,"contour").each(function(h){var M=_.select(this),A=h[0],C=A.trace,L=C._carpetTrace=a(d,C),O=d.calcdata[L.index][0];if(L.visible&&L.visible!=="legendonly"){var I=A.a,R=A.b,U=C.contours,B=n(U,v,A),G=U.type==="constraint",N=U._operation,j=G?N==="="?"lines":"fill":U.coloring,V=[[I[0],R[R.length-1]],[I[I.length-1],R[R.length-1]],[I[I.length-1],R[0]],[I[0],R[0]]];f(B);var H=1e-8*(I[I.length-1]-I[0]),ee=1e-8*(R[R.length-1]-R[0]);l(B,H,ee);var Q,X,Y,K,te=B;U.type==="constraint"&&(te=r(B,N)),function(fe,ye){var pe,de,he,xe,Re,we,Ae,Me,Ce;for(pe=0;pe=0;K--)Q=O.clipsegments[K],X=w([],Q.x,m.c2p),Y=w([],Q.y,k.c2p),X.reverse(),Y.reverse(),ae.push(s(X,Y,Q.bicubic));var oe="M"+ae.join("L")+"Z";(function(fe,ye,pe,de,he,xe){var Re,we,Ae,Me,Ce=y.ensureSingle(fe,"g","contourbg").selectAll("path").data(xe!=="fill"||he?[]:[0]);Ce.enter().append("path"),Ce.exit().remove();var ne=[];for(Me=0;Me=0&&(st=ht,ft=yt):Math.abs(Ze[1]-st[1])=0&&(st=ht,ft=yt):y.log("endpt to newendpt is not vert. or horz.",Ze,st,ht)}if(ft>=0)break;Tt+=Ge(Ze,st),Ze=st}if(ft===Ue.edgepaths.length){y.log("unclosed perimeter path");break}Ye=ft,(Dt=xt.indexOf(Ye)===-1)&&(Ye=xt[0],Tt+=Ge(Ze,st)+"Z",Ze=null)}for(Ye=0;YeCt&&(Je.max=Ct),Je.len=Je.max-Je.min}function mt(Ot,_t){var Pt,Bt=0,Wt=.1;return(Math.abs(Ot[0]-Oe)0?+u[n]:0),o.push({type:"Feature",geometry:{type:"Point",coordinates:d},properties:v})}}var g=T.extractOpts(t),m=g.reversescale?T.flipScale(g.colorscale):g.colorscale,k=m[0][1],h=["interpolate",["linear"],["heatmap-density"],0,s.opacity(k)<1?k:s.addOpacity(k,0)];for(n=1;n=0;l--)y.removeLayer(f[l][1])},T.dispose=function(){var y=this.subplot.map;this._removeLayers(),y.removeSource(this.sourceId)},D.exports=function(y,f){var l=f[0].trace,t=new s(y,l.uid),i=t.sourceId,r=_(f),n=t.below=y.belowLookup["trace-"+l.uid];return y.map.addSource(i,{type:"geojson",data:r.geojson}),t._addLayers(r,n),t}},49789:function(D,E,e){var _=e(71828);D.exports=function(w,s){for(var T=0;T"),i.color=function(v,x){var g=v.marker,m=x.mc||g.color,k=x.mlc||g.line.color,h=x.mlw||g.line.width;return _(m)?m:_(k)&&h?k:void 0}(n,a),[i]}}},51759:function(D,E,e){D.exports={attributes:e(1285),layoutAttributes:e(10440),supplyDefaults:e(26199).supplyDefaults,crossTraceDefaults:e(26199).crossTraceDefaults,supplyLayoutDefaults:e(93138),calc:e(9532),crossTraceCalc:e(8984),plot:e(80461),style:e(68266).style,hoverPoints:e(63341),eventData:e(34598),selectPoints:e(81974),moduleType:"trace",name:"funnel",basePlotModule:e(93612),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},10440:function(D){D.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"}}},93138:function(D,E,e){var _=e(71828),w=e(10440);D.exports=function(s,T,y){var f=!1;function l(r,n){return _.coerce(s,T,w,r,n)}for(var t=0;t path").each(function(p){if(!p.isBlank){var c=u.marker;_.select(this).call(s.fill,p.mc||c.color).call(s.stroke,p.mlc||c.line.color).call(w.dashLine,c.line.dash,p.mlw||c.line.width).style("opacity",u.selectedpoints&&!p.selected?T:1)}}),l(a,u,t),a.selectAll(".regions").each(function(){_.select(this).selectAll("path").style("stroke-width",0).call(s.fill,u.connector.fillcolor)}),a.selectAll(".lines").each(function(){var p=u.connector.line;w.lineGroupStyle(_.select(this).selectAll("path"),p.width,p.color,p.dash)})})}}},86807:function(D,E,e){var _=e(34e3),w=e(9012),s=e(27670).Y,T=e(5386).fF,y=e(5386).si,f=e(1426).extendFlat;D.exports={labels:_.labels,label0:_.label0,dlabel:_.dlabel,values:_.values,marker:{colors:_.marker.colors,line:{color:f({},_.marker.line.color,{dflt:null}),width:f({},_.marker.line.width,{dflt:1}),editType:"calc"},editType:"calc"},text:_.text,hovertext:_.hovertext,scalegroup:f({},_.scalegroup,{}),textinfo:f({},_.textinfo,{flags:["label","text","value","percent"]}),texttemplate:y({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:f({},w.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:T({},{keys:["label","color","value","text","percent"]}),textposition:f({},_.textposition,{values:["inside","none"],dflt:"inside"}),textfont:_.textfont,insidetextfont:_.insidetextfont,title:{text:_.title.text,font:_.title.font,position:f({},_.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:s({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"}}},6452:function(D,E,e){var _=e(74875);E.name="funnelarea",E.plot=function(w,s,T,y){_.plotBasePlot(E.name,w,s,T,y)},E.clean=function(w,s,T,y){_.cleanBasePlot(E.name,w,s,T,y)}},89574:function(D,E,e){var _=e(32354);D.exports={calc:function(w,s){return _.calc(w,s)},crossTraceCalc:function(w){_.crossTraceCalc(w,{type:"funnelarea"})}}},86282:function(D,E,e){var _=e(71828),w=e(86807),s=e(27670).c,T=e(90769).handleText,y=e(37434).handleLabelsAndValues;D.exports=function(f,l,t,i){function r(v,x){return _.coerce(f,l,w,v,x)}var n=r("labels"),o=r("values"),a=y(n,o),u=a.len;if(l._hasLabels=a.hasLabels,l._hasValues=a.hasValues,!l._hasLabels&&l._hasValues&&(r("label0"),r("dlabel")),u){l._length=u,r("marker.line.width")&&r("marker.line.color",i.paper_bgcolor),r("marker.colors"),r("scalegroup");var p,c=r("text"),b=r("texttemplate");if(b||(p=r("textinfo",Array.isArray(c)?"text+percent":"percent")),r("hovertext"),r("hovertemplate"),b||p&&p!=="none"){var d=r("textposition");T(f,l,i,r,d,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}s(l,i,r),r("title.text")&&(r("title.position"),_.coerceFont(r,"title.font",i.font)),r("aspectratio"),r("baseratio")}else l.visible=!1}},10421:function(D,E,e){D.exports={moduleType:"trace",name:"funnelarea",basePlotModule:e(6452),categories:["pie-like","funnelarea","showLegend"],attributes:e(86807),layoutAttributes:e(80097),supplyDefaults:e(86282),supplyLayoutDefaults:e(57402),calc:e(89574).calc,crossTraceCalc:e(89574).crossTraceCalc,plot:e(79187),style:e(71858),styleOne:e(63463),meta:{}}},80097:function(D,E,e){var _=e(92774).hiddenlabels;D.exports={hiddenlabels:_,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}},57402:function(D,E,e){var _=e(71828),w=e(80097);D.exports=function(s,T){function y(f,l){return _.coerce(s,T,w,f,l)}y("hiddenlabels"),y("funnelareacolorway",T.colorway),y("extendfunnelareacolors")}},79187:function(D,E,e){var _=e(39898),w=e(91424),s=e(71828),T=s.strScale,y=s.strTranslate,f=e(63893),l=e(17295).toMoveInsideBar,t=e(72597),i=t.recordMinTextSize,r=t.clearMinTextSize,n=e(53581),o=e(14575),a=o.attachFxHandlers,u=o.determineInsideTextFont,p=o.layoutAreas,c=o.prerenderTitles,b=o.positionTitleOutside,d=o.formatSliceLabel;function v(x,g){return"l"+(g[0]-x[0])+","+(g[1]-x[1])}D.exports=function(x,g){var m=x._context.staticPlot,k=x._fullLayout;r("funnelarea",k),c(g,x),p(g,k._size),s.makeTraceGroups(k._funnelarealayer,g,"trace").each(function(h){var M=_.select(this),A=h[0],C=A.trace;(function(L){if(L.length){var O=L[0],I=O.trace,R=I.aspectratio,U=I.baseratio;U>.999&&(U=.999);var B,G,N,j=Math.pow(U,2),V=O.vTotal,H=V,ee=V*j/(1-j)/V,Q=[];for(Q.push(Ae()),G=L.length-1;G>-1;G--)if(!(N=L[G]).hidden){var X=N.v/H;ee+=X,Q.push(Ae())}var Y=1/0,K=-1/0;for(G=0;G-1;G--)if(!(N=L[G]).hidden){var Re=Q[xe+=1][0],we=Q[xe][1];N.TL=[-Re,we],N.TR=[Re,we],N.BL=de,N.BR=he,N.pxmid=(ye=N.TR,pe=N.BR,[.5*(ye[0]+pe[0]),.5*(ye[1]+pe[1])]),de=N.TL,he=N.TR}}function Ae(){var Me,Ce={x:Me=Math.sqrt(ee),y:-Me};return[Ce.x,Ce.y]}})(h),M.each(function(){var L=_.select(this).selectAll("g.slice").data(h);L.enter().append("g").classed("slice",!0),L.exit().remove(),L.each(function(I,R){if(I.hidden)_.select(this).selectAll("path,g").remove();else{I.pointNumber=I.i,I.curveNumber=C.index;var U=A.cx,B=A.cy,G=_.select(this),N=G.selectAll("path.surface").data([I]);N.enter().append("path").classed("surface",!0).style({"pointer-events":m?"none":"all"}),G.call(a,x,h);var j="M"+(U+I.TR[0])+","+(B+I.TR[1])+v(I.TR,I.BR)+v(I.BR,I.BL)+v(I.BL,I.TL)+"Z";N.attr("d",j),d(x,I,A);var V=n.castOption(C.textposition,I.pts),H=G.selectAll("g.slicetext").data(I.text&&V!=="none"?[0]:[]);H.enter().append("g").classed("slicetext",!0),H.exit().remove(),H.each(function(){var ee=s.ensureSingle(_.select(this),"text","",function(se){se.attr("data-notex",1)}),Q=s.ensureUniformFontSize(x,u(C,I,k.font));ee.text(I.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(w.font,Q).call(f.convertToTspans,x);var X,Y,K,te=w.bBox(ee.node()),ae=Math.min(I.BL[1],I.BR[1])+B,oe=Math.max(I.TL[1],I.TR[1])+B;Y=Math.max(I.TL[0],I.BL[0])+U,K=Math.min(I.TR[0],I.BR[0])+U,(X=l(Y,K,ae,oe,te,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"})).fontSize=Q.size,i(C.type,X,k),h[R].transform=X,s.setTransormAndDisplay(ee,X)})}});var O=_.select(this).selectAll("g.titletext").data(C.title.text?[0]:[]);O.enter().append("g").classed("titletext",!0),O.exit().remove(),O.each(function(){var I=s.ensureSingle(_.select(this),"text","",function(B){B.attr("data-notex",1)}),R=C.title.text;C._meta&&(R=s.templateString(R,C._meta)),I.text(R).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(w.font,C.title.font).call(f.convertToTspans,x);var U=b(A,k._size);I.attr("transform",y(U.x,U.y)+T(Math.min(1,U.scale))+y(U.tx,U.ty))})})})}},71858:function(D,E,e){var _=e(39898),w=e(63463),s=e(72597).resizeText;D.exports=function(T){var y=T._fullLayout._funnelarealayer.selectAll(".trace");s(T,y,"funnelarea"),y.each(function(f){var l=f[0].trace,t=_.select(this);t.style({opacity:l.opacity}),t.selectAll("path.surface").each(function(i){_.select(this).call(w,i,l)})})}},21606:function(D,E,e){var _=e(82196),w=e(9012),s=e(41940),T=e(12663).axisHoverFormat,y=e(5386).fF,f=e(5386).si,l=e(50693),t=e(1426).extendFlat;D.exports=t({z:{valType:"data_array",editType:"calc"},x:t({},_.x,{impliedEdits:{xtype:"array"}}),x0:t({},_.x0,{impliedEdits:{xtype:"scaled"}}),dx:t({},_.dx,{impliedEdits:{xtype:"scaled"}}),y:t({},_.y,{impliedEdits:{ytype:"array"}}),y0:t({},_.y0,{impliedEdits:{ytype:"scaled"}}),dy:t({},_.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:t({},_.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:t({},_.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:t({},_.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:t({},_.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:t({},_.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:t({},_.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:T("x"),yhoverformat:T("y"),zhoverformat:T("z",1),hovertemplate:y(),texttemplate:f({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:s({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:t({},w.showlegend,{dflt:!1})},{transforms:void 0},l("",{cLetter:"z",autoColorDflt:!1}))},90757:function(D,E,e){var _=e(73972),w=e(71828),s=e(89298),T=e(42973),y=e(17562),f=e(78803),l=e(68296),t=e(4742),i=e(824),r=e(43907),n=e(70769),o=e(50606).BADNUM;function a(u){for(var p=[],c=u.length,b=0;bj){G("x scale is not linear");break}}if(x.length&&U==="fast"){var V=(x[x.length-1]-x[0])/(x.length-1),H=Math.abs(V/100);for(M=0;MH){G("y scale is not linear");break}}}}var ee=w.maxRowLength(h),Q=p.xtype==="scaled"?"":c,X=n(p,Q,b,d,ee,C),Y=p.ytype==="scaled"?"":x,K=n(p,Y,g,m,h.length,L);R||(p._extremes[C._id]=s.findExtremes(C,X),p._extremes[L._id]=s.findExtremes(L,K));var te={x:X,y:K,z:h,text:p._text||p.text,hovertext:p._hovertext||p.hovertext};if(p.xperiodalignment&&v&&(te.orig_x=v),p.yperiodalignment&&k&&(te.orig_y=k),Q&&Q.length===X.length-1&&(te.xCenter=Q),Y&&Y.length===K.length-1&&(te.yCenter=Y),I&&(te.xRanges=A.xRanges,te.yRanges=A.yRanges,te.pts=A.pts),O||f(u,p,{vals:h,cLetter:"z"}),O&&p.contours&&p.contours.coloring==="heatmap"){var ae={type:p.type==="contour"?"heatmap":"histogram2d",xcalendar:p.xcalendar,ycalendar:p.ycalendar};te.xfill=n(ae,Q,b,d,ee,C),te.yfill=n(ae,Y,g,m,h.length,L)}return[te]}},4742:function(D,E,e){var _=e(92770),w=e(71828),s=e(50606).BADNUM;D.exports=function(T,y,f,l){var t,i,r,n,o,a;function u(x){if(_(x))return+x}if(y&&y.transpose){for(t=0,o=0;o=0;l--)(t=((o[[(T=(f=a[l])[0])-1,y=f[1]]]||c)[2]+(o[[T+1,y]]||c)[2]+(o[[T,y-1]]||c)[2]+(o[[T,y+1]]||c)[2])/20)&&(i[f]=[T,y,t],a.splice(l,1),r=!0);if(!r)throw"findEmpties iterated with no new neighbors";for(f in i)o[f]=i[f],n.push(i[f])}return n.sort(function(d,v){return v[2]-d[2]})}},46248:function(D,E,e){var _=e(30211),w=e(71828),s=e(89298),T=e(21081).extractOpts;D.exports=function(y,f,l,t,i){i||(i={});var r,n,o,a,u=i.isContour,p=y.cd[0],c=p.trace,b=y.xa,d=y.ya,v=p.x,x=p.y,g=p.z,m=p.xCenter,k=p.yCenter,h=p.zmask,M=c.zhoverformat,A=v,C=x;if(y.index!==!1){try{o=Math.round(y.index[1]),a=Math.round(y.index[0])}catch{return void w.error("Error hovering on heatmap, pointNumber must be [row,col], found:",y.index)}if(o<0||o>=g[0].length||a<0||a>g.length)return}else{if(_.inbox(f-v[0],f-v[v.length-1],0)>0||_.inbox(l-x[0],l-x[x.length-1],0)>0)return;if(u){var L;for(A=[2*v[0]-v[1]],L=1;Lv&&(g=Math.max(g,Math.abs(y[i][r]-d)/(x-v))))}return g}D.exports=function(y,f){var l,t=1;for(T(y,f),l=0;l.01;l++)t=T(y,f,s(t));return t>.01&&_.log("interp2d didn't converge quickly",t),y}},58623:function(D,E,e){var _=e(71828);D.exports=function(w,s){w("texttemplate");var T=_.extendFlat({},s.font,{color:"auto",size:"auto"});_.coerceFont(w,"textfont",T)}},70769:function(D,E,e){var _=e(73972),w=e(71828).isArrayOrTypedArray;D.exports=function(s,T,y,f,l,t){var i,r,n,o=[],a=_.traceIs(s,"contour"),u=_.traceIs(s,"histogram"),p=_.traceIs(s,"gl2d");if(w(T)&&T.length>1&&!u&&t.type!=="category"){var c=T.length;if(!(c<=l))return a?T.slice(0,l):T.slice(0,l+1);if(a||p)o=T.slice(0,l);else if(l===1)o=[T[0]-.5,T[0]+.5];else{for(o=[1.5*T[0]-.5*T[1]],n=1;n0;)L=h.c2p(X[U]),U--;for(L0;)R=M.c2p(Y[U]),U--;if(RGt||Gt>M._length))for(B=_t;BKt||Kt>h._length)){var nn=t({x:Xt,y:Wt},V,x._fullLayout);nn.x=Xt,nn.y=Wt;var yn=j.z[U][B];yn===void 0?(nn.z="",nn.zLabel=""):(nn.z=yn,nn.zLabel=y.tickText(Lt,yn,"hover").text);var ln=j.text&&j.text[U]&&j.text[U][B];ln!==void 0&&ln!==!1||(ln=""),nn.text=ln;var kn=f.texttemplateString(pt,nn,x._fullLayout._d3locale,nn,V._meta||{});if(kn){var Wn=kn.split("
"),wn=Wn.length,on=0;for(G=0;G0&&(v=!0);for(var m=0;mf){var l=f-T[w];return T[w]=f,l}}return 0},max:function(w,s,T,y){var f=y[s];if(_(f)){if(f=Number(f),!_(T[w]))return T[w]=f,f;if(T[w]l?a>T?a>1.1*w?w:a>1.1*s?s:T:a>y?y:a>f?f:l:Math.pow(10,Math.floor(Math.log(a)/Math.LN10))}function n(a,u,p,c,b,d){if(c&&a>T){var v=o(u,b,d),x=o(p,b,d),g=a===w?0:1;return v[g]!==x[g]}return Math.floor(p/a)-Math.floor(u/a)>.1}function o(a,u,p){var c=u.c2d(a,w,p).split("-");return c[0]===""&&(c.unshift(),c[0]="-"+c[0]),c}D.exports=function(a,u,p,c,b){var d,v,x=-1.1*u,g=-.1*u,m=a-g,k=p[0],h=p[1],M=Math.min(i(k+g,k+m,c,b),i(h+g,h+m,c,b)),A=Math.min(i(k+x,k+g,c,b),i(h+x,h+g,c,b));if(M>A&&AT){var C=d===w?1:6,L=d===w?"M12":"M1";return function(O,I){var R=c.c2d(O,w,b),U=R.indexOf("-",C);U>0&&(R=R.substr(0,U));var B=c.d2c(R,0,b);if(Ba.r2l(te)&&(oe=T.tickIncrement(oe,A.size,!0,v)),Q.start=a.l2r(oe),K||w.nestedProperty(o,k+".start").set(Q.start)}var se=A.end,fe=a.r2l(ee.end),ye=fe!==void 0;if((A.endFound||ye)&&fe!==a.r2l(se)){var pe=ye?fe:w.aggNums(Math.max,null,x);Q.end=a.l2r(pe),ye||w.nestedProperty(o,k+".start").set(Q.end)}var de="autobin"+u;return o._input[de]===!1&&(o._input[k]=w.extendFlat({},o[k]||{}),delete o._input[de],delete o[de]),[Q,x]}D.exports={calc:function(n,o){var a,u,p,c,b=[],d=[],v=o.orientation==="h",x=T.getFromId(n,v?o.yaxis:o.xaxis),g=v?"y":"x",m={x:"y",y:"x"}[g],k=o[g+"calendar"],h=o.cumulative,M=r(n,o,x,g),A=M[0],C=M[1],L=typeof A.size=="string",O=[],I=L?O:A,R=[],U=[],B=[],G=0,N=o.histnorm,j=o.histfunc,V=N.indexOf("density")!==-1;h.enabled&&V&&(N=N.replace(/ ?density$/,""),V=!1);var H,ee=j==="max"||j==="min"?null:0,Q=f.count,X=l[N],Y=!1,K=function(Ce){return x.r2c(Ce,0,k)};for(w.isArrayOrTypedArray(o[m])&&j!=="count"&&(H=o[m],Y=j==="avg",Q=f[j]),a=K(A.start),p=K(A.end)+(a-T.tickIncrement(a,A.size,!1,k))/1e6;a=0&&c=0;me--)De(me);else if(ne==="increasing"){for(me=1;me=0;me--)Ce[me]+=Ce[me+1];ue==="exclude"&&(Ce.push(0),Ce.shift())}}(d,h.direction,h.currentbin);var xe=Math.min(b.length,d.length),Re=[],we=0,Ae=xe-1;for(a=0;a=we;a--)if(d[a]){Ae=a;break}for(a=we;a<=Ae;a++)if(_(b[a])&&_(d[a])){var Me={p:b[a],s:d[a],b:0};h.enabled||(Me.pts=B[a],fe?Me.ph0=Me.ph1=B[a].length?C[B[a][0]]:b[a]:(o._computePh=!0,Me.ph0=oe(O[a]),Me.ph1=oe(O[a+1],!0))),Re.push(Me)}return Re.length===1&&(Re[0].width1=T.tickIncrement(Re[0].p,A.size,!1,k)-Re[0].p),y(Re,o),w.isArrayOrTypedArray(o.selectedpoints)&&w.tagSelected(Re,o,de),Re},calcAllAutoBins:r}},72406:function(D){D.exports={eventDataKeys:["binNumber"]}},82222:function(D,E,e){var _=e(71828),w=e(41675),s=e(73972).traceIs,T=e(26125),y=_.nestedProperty,f=e(99082).getAxisGroup,l=[{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"];D.exports=function(i,r){var n,o,a,u,p,c,b,d=r._histogramBinOpts={},v=[],x={},g=[];function m(V,H){return _.coerce(n._input,n,n._module.attributes,V,H)}function k(V){return V.orientation==="v"?"x":"y"}function h(V,H,ee){var Q=V.uid+"__"+ee;H||(H=Q);var X=function(ae,oe){return w.getFromTrace({_fullLayout:r},ae,oe).type}(V,ee),Y=V[ee+"calendar"]||"",K=d[H],te=!0;K&&(X===K.axType&&Y===K.calendar?(te=!1,K.traces.push(V),K.dirs.push(ee)):(H=Q,X!==K.axType&&_.warn(["Attempted to group the bins of trace",V.index,"set on a","type:"+X,"axis","with bins on","type:"+K.axType,"axis."].join(" ")),Y!==K.calendar&&_.warn(["Attempted to group the bins of trace",V.index,"set with a",Y,"calendar","with bins",K.calendar?"on a "+K.calendar+" calendar":"w/o a set calendar"].join(" ")))),te&&(d[H]={traces:[V],dirs:[ee],axType:X,calendar:V[ee+"calendar"]||""}),V["_"+ee+"bingroup"]=H}for(p=0;pO&&M.splice(O,M.length-O),L.length>O&&L.splice(O,L.length-O);var I=[],R=[],U=[],B=typeof h.size=="string",G=typeof C.size=="string",N=[],j=[],V=B?N:h,H=G?j:C,ee=0,Q=[],X=[],Y=o.histnorm,K=o.histfunc,te=Y.indexOf("density")!==-1,ae=K==="max"||K==="min"?null:0,oe=s.count,se=T[Y],fe=!1,ye=[],pe=[],de="z"in o?o.z:"marker"in o&&Array.isArray(o.marker.color)?o.marker.color:"";de&&K!=="count"&&(fe=K==="avg",oe=s[K]);var he=h.size,xe=g(h.start),Re=g(h.end)+(xe-w.tickIncrement(xe,he,!1,v))/1e6;for(a=xe;a=0&&p=0&&c-1,flipY:R.tiling.flip.indexOf("y")>-1,orientation:R.tiling.orientation,pad:{inner:R.tiling.pad},maxDepth:R._maxDepth}).descendants(),j=1/0,V=-1/0;N.forEach(function(Y){var K=Y.depth;K>=R._maxDepth?(Y.x0=Y.x1=(Y.x0+Y.x1)/2,Y.y0=Y.y1=(Y.y0+Y.y1)/2):(j=Math.min(j,K),V=Math.max(V,K))}),p=p.data(N,t.getPtId),R._maxVisibleLayers=isFinite(V)?V-j+1:0,p.enter().append("g").classed("slice",!0),M(p,n,{},[b,d],g),p.order();var H=null;if(h&&L){var ee=t.getPtId(L);p.each(function(Y){H===null&&t.getPtId(Y)===ee&&(H={x0:Y.x0,x1:Y.x1,y0:Y.y0,y1:Y.y1})})}var Q=function(){return H||{x0:0,x1:b,y0:0,y1:d}},X=p;return h&&(X=X.transition().each("end",function(){var Y=_.select(this);t.setSliceCursor(Y,o,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),X.each(function(Y){Y._x0=v(Y.x0),Y._x1=v(Y.x1),Y._y0=x(Y.y0),Y._y1=x(Y.y1),Y._hoverX=v(Y.x1-R.tiling.pad),Y._hoverY=x(G?Y.y1-R.tiling.pad/2:Y.y0+R.tiling.pad/2);var K=_.select(this),te=w.ensureSingle(K,"path","surface",function(fe){fe.style("pointer-events",O?"none":"all")});h?te.transition().attrTween("d",function(fe){var ye=A(fe,n,Q(),[b,d],{orientation:R.tiling.orientation,flipX:R.tiling.flip.indexOf("x")>-1,flipY:R.tiling.flip.indexOf("y")>-1});return function(pe){return g(ye(pe))}}):te.attr("d",g),K.call(i,u,o,a,{styleOne:f,eventDataKeys:l.eventDataKeys,transitionTime:l.CLICK_TRANSITION_TIME,transitionEasing:l.CLICK_TRANSITION_EASING}).call(t.setSliceCursor,o,{isTransitioning:o._transitioning}),te.call(f,Y,R,{hovered:!1}),Y.x0===Y.x1||Y.y0===Y.y1?Y._text="":Y._text=r(Y,u,R,a,I)||"";var ae=w.ensureSingle(K,"g","slicetext"),oe=w.ensureSingle(ae,"text","",function(fe){fe.attr("data-notex",1)}),se=w.ensureUniformFontSize(o,t.determineTextFont(R,Y,I.font));oe.text(Y._text||" ").classed("slicetext",!0).attr("text-anchor",B?"end":U?"start":"middle").call(s.font,se).call(T.convertToTspans,o),Y.textBB=s.bBox(oe.node()),Y.transform=m(Y,{fontSize:se.size}),Y.transform.fontSize=se.size,h?oe.transition().attrTween("transform",function(fe){var ye=C(fe,n,Q(),[b,d]);return function(pe){return k(ye(pe))}}):oe.attr("transform",k(Y))}),H}},69816:function(D,E,e){D.exports={moduleType:"trace",name:"icicle",basePlotModule:e(96346),categories:[],animatable:!0,attributes:e(46291),layoutAttributes:e(92894),supplyDefaults:e(56524),supplyLayoutDefaults:e(21070),calc:e(46584).y,crossTraceCalc:e(46584).T,plot:e(85596),style:e(82454).style,colorbar:e(4898),meta:{}}},92894:function(D){D.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},21070:function(D,E,e){var _=e(71828),w=e(92894);D.exports=function(s,T){function y(f,l){return _.coerce(s,T,w,f,l)}y("iciclecolorway",T.colorway),y("extendiciclecolors")}},21538:function(D,E,e){var _=e(674),w=e(14102);D.exports=function(s,T,y){var f=y.flipX,l=y.flipY,t=y.orientation==="h",i=y.maxDepth,r=T[0],n=T[1];i&&(r=(s.height+1)*T[0]/Math.min(s.height+1,i),n=(s.height+1)*T[1]/Math.min(s.height+1,i));var o=_.partition().padding(y.pad.inner).size(t?[T[1],r]:[T[0],n])(s);return(t||f||l)&&w(o,T,{swapXY:t,flipX:f,flipY:l}),o}},85596:function(D,E,e){var _=e(80694),w=e(90666);D.exports=function(s,T,y,f){return _(s,T,y,f,{type:"icicle",drawDescendants:w})}},82454:function(D,E,e){var _=e(39898),w=e(7901),s=e(71828),T=e(72597).resizeText;function y(f,l,t){var i=l.data.data,r=!l.children,n=i.i,o=s.castOption(t,n,"marker.line.color")||w.defaultLine,a=s.castOption(t,n,"marker.line.width")||0;f.style("stroke-width",a).call(w.fill,i.color).call(w.stroke,o).style("opacity",r?t.leaf.opacity:null)}D.exports={style:function(f){var l=f._fullLayout._iciclelayer.selectAll(".trace");T(f,l,"icicle"),l.each(function(t){var i=_.select(this),r=t[0].trace;i.style("opacity",r.opacity),i.selectAll("path.surface").each(function(n){_.select(this).call(y,n,r)})})},styleOne:y}},17230:function(D,E,e){for(var _=e(9012),w=e(5386).fF,s=e(1426).extendFlat,T=e(51877).colormodel,y=["rgb","rgba","rgba256","hsl","hsla"],f=[],l=[],t=0;t0||_.inbox(f-l.y0,f-(l.y0+l.h*t.dy),0)>0)){var n,o=Math.floor((y-l.x0)/t.dx),a=Math.floor(Math.abs(f-l.y0)/t.dy);if(t._hasZ?n=l.z[a][o]:t._hasSource&&(n=t._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(o,a,1,1).data),n){var u,p=l.hi||t.hoverinfo;if(p){var c=p.split("+");c.indexOf("all")!==-1&&(c=["color"]),c.indexOf("color")!==-1&&(u=!0)}var b,d=s.colormodel[t.colormodel],v=d.colormodel||t.colormodel,x=v.length,g=t._scaler(n),m=d.suffix,k=[];(t.hovertemplate||u)&&(k.push("["+[g[0]+m[0],g[1]+m[1],g[2]+m[2]].join(", ")),x===4&&k.push(", "+g[3]+m[3]),k.push("]"),k=k.join(""),T.extraText=v.toUpperCase()+": "+k),Array.isArray(t.hovertext)&&Array.isArray(t.hovertext[a])?b=t.hovertext[a][o]:Array.isArray(t.text)&&Array.isArray(t.text[a])&&(b=t.text[a][o]);var h=r.c2p(l.y0+(a+.5)*t.dy),M=l.x0+(o+.5)*t.dx,A=l.y0+(a+.5)*t.dy,C="["+n.slice(0,t.colormodel.length).join(", ")+"]";return[w.extendFlat(T,{index:[a,o],x0:i.c2p(l.x0+o*t.dx),x1:i.c2p(l.x0+(o+1)*t.dx),y0:h,y1:h,color:g,xVal:M,xLabelVal:M,yVal:A,yLabelVal:A,zLabelVal:C,text:b,hovertemplateLabels:{zLabel:C,colorLabel:k,"color[0]Label":g[0]+m[0],"color[1]Label":g[1]+m[1],"color[2]Label":g[2]+m[2],"color[3]Label":g[3]+m[3]}})]}}}},94507:function(D,E,e){D.exports={attributes:e(17230),supplyDefaults:e(13245),calc:e(71113),plot:e(60775),style:e(12826),hoverPoints:e(28749),eventData:e(30835),moduleType:"trace",name:"image",basePlotModule:e(93612),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}},60775:function(D,E,e){var _=e(39898),w=e(71828),s=w.strTranslate,T=e(77922),y=e(51877),f=w.isIOS()||w.isSafari()||w.isIE();D.exports=function(l,t,i,r){var n=t.xaxis,o=t.yaxis,a=!(f||l._context._exportedPlot);w.makeTraceGroups(r,i,"im").each(function(u){var p=_.select(this),c=u[0],b=c.trace,d=(b.zsmooth==="fast"||b.zsmooth===!1&&a)&&!b._hasZ&&b._hasSource&&n.type==="linear"&&o.type==="linear";b._realImage=d;var v,x,g,m,k,h,M=c.z,A=c.x0,C=c.y0,L=c.w,O=c.h,I=b.dx,R=b.dy;for(h=0;v===void 0&&h0;)x=n.c2p(A+h*I),h--;for(h=0;m===void 0&&h0;)k=o.c2p(C+h*R),h--;xV[0];if(H||ee){var Q=v+U/2,X=m+B/2;N+="transform:"+s(Q+"px",X+"px")+"scale("+(H?-1:1)+","+(ee?-1:1)+")"+s(-Q+"px",-X+"px")+";"}}G.attr("style",N);var Y=new Promise(function(te){if(b._hasZ)te();else if(b._hasSource)if(b._canvas&&b._canvas.el.width===L&&b._canvas.el.height===O&&b._canvas.source===b.source)te();else{var ae=document.createElement("canvas");ae.width=L,ae.height=O;var oe=ae.getContext("2d",{willReadFrequently:!0});b._image=b._image||new Image;var se=b._image;se.onload=function(){oe.drawImage(se,0,0),b._canvas={el:ae,source:b.source},te()},se.setAttribute("src",b.source)}}).then(function(){var te,ae;if(b._hasZ)ae=K(function(se,fe){return M[fe][se]}),te=ae.toDataURL("image/png");else if(b._hasSource)if(d)te=b.source;else{var oe=b._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,L,O).data;ae=K(function(se,fe){var ye=4*(fe*L+se);return[oe[ye],oe[ye+1],oe[ye+2],oe[ye+3]]}),te=ae.toDataURL("image/png")}G.attr({"xlink:href":te,height:B,width:U,x:v,y:m})});l._promises.push(Y)}function K(te){var ae=document.createElement("canvas");ae.width=U,ae.height=B;var oe,se=ae.getContext("2d",{willReadFrequently:!0}),fe=function(Ce){return w.constrain(Math.round(n.c2p(A+Ce*I)-v),0,U)},ye=function(Ce){return w.constrain(Math.round(o.c2p(C+Ce*R)-m),0,B)},pe=y.colormodel[b.colormodel],de=pe.colormodel||b.colormodel,he=pe.fmt;for(h=0;h0}function g(A){A.each(function(C){c.stroke(_.select(this),C.line.color)}).each(function(C){c.fill(_.select(this),C.color)}).style("stroke-width",function(C){return C.line.width})}function m(A,C,L){var O=A._fullLayout,I=T.extendFlat({type:"linear",ticks:"outside",range:L,showline:!0},C),R={type:"linear",_id:"x"+C._id},U={letter:"x",font:O.font,noHover:!0,noTickson:!0};function B(G,N){return T.coerce(I,R,p,G,N)}return a(I,R,B,U,O),u(I,R,B,U),R}function k(A,C,L){return[Math.min(C/A.width,L/A.height),A,C+"x"+L]}function h(A,C,L,O){var I=document.createElementNS("http://www.w3.org/2000/svg","text"),R=_.select(I);return R.text(A).attr("x",0).attr("y",0).attr("text-anchor",L).attr("data-unformatted",A).call(n.convertToTspans,O).call(i.font,C),i.bBox(R.node())}function M(A,C,L,O,I,R){var U="_cache"+C;A[U]&&A[U].key===I||(A[U]={key:I,value:L});var B=T.aggNums(R,null,[A[U].value,O],2);return A[U].value=B,B}D.exports=function(A,C,L,O){var I,R=A._fullLayout;x(L)&&O&&(I=O()),T.makeTraceGroups(R._indicatorlayer,C,"trace").each(function(U){var B,G,N,j,V,H=U[0].trace,ee=_.select(this),Q=H._hasGauge,X=H._isAngular,Y=H._isBullet,K=H.domain,te={w:R._size.w*(K.x[1]-K.x[0]),h:R._size.h*(K.y[1]-K.y[0]),l:R._size.l+R._size.w*K.x[0],r:R._size.r+R._size.w*(1-K.x[1]),t:R._size.t+R._size.h*(1-K.y[1]),b:R._size.b+R._size.h*K.y[0]},ae=te.l+te.w/2,oe=te.t+te.h/2,se=Math.min(te.w/2,te.h),fe=r.innerRadius*se,ye=H.align||"center";if(G=oe,Q){if(X&&(B=ae,G=oe+se/2,N=function(Me){return function(Ce,ne){return[ne/Math.sqrt(Ce.width/2*(Ce.width/2)+Ce.height*Ce.height),Ce,ne]}(Me,.9*fe)}),Y){var pe=r.bulletPadding,de=1-r.bulletNumberDomainSize+pe;B=te.l+(de+(1-de)*d[ye])*te.w,N=function(Me){return k(Me,(r.bulletNumberDomainSize-pe)*te.w,te.h)}}}else B=te.l+d[ye]*te.w,N=function(Me){return k(Me,te.w,te.h)};(function(Me,Ce,ne,ue){var me,Te,Ee,Ue=ne[0].trace,De=ue.numbersX,je=ue.numbersY,ge=Ue.align||"center",be=b[ge],Se=ue.transitionOpts,Ne=ue.onComplete,Ye=T.ensureSingle(Ce,"g","numbers"),Ze=[];Ue._hasNumber&&Ze.push("number"),Ue._hasDelta&&(Ze.push("delta"),Ue.delta.position==="left"&&Ze.reverse());var st=Ye.selectAll("text").data(Ze);function ot(Ft,qt,Nt,Je){if(!Ft.match("s")||Nt>=0==Je>=0||qt(Nt).slice(-1).match(v)||qt(Je).slice(-1).match(v))return qt;var Ke=Ft.slice().replace("s","f").replace(/\d+/,function(nt){return parseInt(nt)-1}),Ge=m(Me,{tickformat:Ke});return function(nt){return Math.abs(nt)<1?o.tickText(Ge,nt).text:qt(nt)}}st.enter().append("text"),st.attr("text-anchor",function(){return be}).attr("class",function(Ft){return Ft}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),st.exit().remove();var ft,yt=Ue.mode+Ue.align;if(Ue._hasDelta&&(ft=function(){var Ft=m(Me,{tickformat:Ue.delta.valueformat},Ue._range);Ft.setScale(),o.prepTicks(Ft);var qt=function(Be){return o.tickText(Ft,Be).text},Nt=Ue.delta.suffix,Je=Ue.delta.prefix,Ke=function(Be){return Ue.delta.relative?Be.relativeDelta:Be.delta},Ge=function(Be,Qe){return Be===0||typeof Be!="number"||isNaN(Be)?"-":(Be>0?Ue.delta.increasing.symbol:Ue.delta.decreasing.symbol)+Je+Qe(Be)+Nt},nt=function(Be){return Be.delta>=0?Ue.delta.increasing.color:Ue.delta.decreasing.color};Ue._deltaLastValue===void 0&&(Ue._deltaLastValue=Ke(ne[0]));var ht=Ye.select("text.delta");function Oe(){ht.text(Ge(Ke(ne[0]),qt)).call(c.fill,nt(ne[0])).call(n.convertToTspans,Me)}return ht.call(i.font,Ue.delta.font).call(c.fill,nt({delta:Ue._deltaLastValue})),x(Se)?ht.transition().duration(Se.duration).ease(Se.easing).tween("text",function(){var Be=_.select(this),Qe=Ke(ne[0]),ut=Ue._deltaLastValue,pt=ot(Ue.delta.valueformat,qt,ut,Qe),bt=s(ut,Qe);return Ue._deltaLastValue=Qe,function(Lt){Be.text(Ge(bt(Lt),pt)),Be.call(c.fill,nt({delta:bt(Lt)}))}}).each("end",function(){Oe(),Ne&&Ne()}).each("interrupt",function(){Oe(),Ne&&Ne()}):Oe(),Te=h(Ge(Ke(ne[0]),qt),Ue.delta.font,be,Me),ht}(),yt+=Ue.delta.position+Ue.delta.font.size+Ue.delta.font.family+Ue.delta.valueformat,yt+=Ue.delta.increasing.symbol+Ue.delta.decreasing.symbol,Ee=Te),Ue._hasNumber&&(function(){var Ft=m(Me,{tickformat:Ue.number.valueformat},Ue._range);Ft.setScale(),o.prepTicks(Ft);var qt=function(nt){return o.tickText(Ft,nt).text},Nt=Ue.number.suffix,Je=Ue.number.prefix,Ke=Ye.select("text.number");function Ge(){var nt=typeof ne[0].y=="number"?Je+qt(ne[0].y)+Nt:"-";Ke.text(nt).call(i.font,Ue.number.font).call(n.convertToTspans,Me)}x(Se)?Ke.transition().duration(Se.duration).ease(Se.easing).each("end",function(){Ge(),Ne&&Ne()}).each("interrupt",function(){Ge(),Ne&&Ne()}).attrTween("text",function(){var nt=_.select(this),ht=s(ne[0].lastY,ne[0].y);Ue._lastValue=ne[0].y;var Oe=ot(Ue.number.valueformat,qt,ne[0].lastY,ne[0].y);return function(Be){nt.text(Je+Oe(ht(Be))+Nt)}}):Ge(),me=h(Je+qt(ne[0].y)+Nt,Ue.number.font,be,Me)}(),yt+=Ue.number.font.size+Ue.number.font.family+Ue.number.valueformat+Ue.number.suffix+Ue.number.prefix,Ee=me),Ue._hasDelta&&Ue._hasNumber){var Et,Tt,xt=[(me.left+me.right)/2,(me.top+me.bottom)/2],Dt=[(Te.left+Te.right)/2,(Te.top+Te.bottom)/2],It=.75*Ue.delta.font.size;Ue.delta.position==="left"&&(Et=M(Ue,"deltaPos",0,-1*(me.width*d[Ue.align]+Te.width*(1-d[Ue.align])+It),yt,Math.min),Tt=xt[1]-Dt[1],Ee={width:me.width+Te.width+It,height:Math.max(me.height,Te.height),left:Te.left+Et,right:me.right,top:Math.min(me.top,Te.top+Tt),bottom:Math.max(me.bottom,Te.bottom+Tt)}),Ue.delta.position==="right"&&(Et=M(Ue,"deltaPos",0,me.width*(1-d[Ue.align])+Te.width*d[Ue.align]+It,yt,Math.max),Tt=xt[1]-Dt[1],Ee={width:me.width+Te.width+It,height:Math.max(me.height,Te.height),left:me.left,right:Te.right+Et,top:Math.min(me.top,Te.top+Tt),bottom:Math.max(me.bottom,Te.bottom+Tt)}),Ue.delta.position==="bottom"&&(Et=null,Tt=Te.height,Ee={width:Math.max(me.width,Te.width),height:me.height+Te.height,left:Math.min(me.left,Te.left),right:Math.max(me.right,Te.right),top:me.bottom-me.height,bottom:me.bottom+Te.height}),Ue.delta.position==="top"&&(Et=null,Tt=me.top,Ee={width:Math.max(me.width,Te.width),height:me.height+Te.height,left:Math.min(me.left,Te.left),right:Math.max(me.right,Te.right),top:me.bottom-me.height-Te.height,bottom:me.bottom}),ft.attr({dx:Et,dy:Tt})}(Ue._hasNumber||Ue._hasDelta)&&Ye.attr("transform",function(){var Ft=ue.numbersScaler(Ee);yt+=Ft[2];var qt,Nt=M(Ue,"numbersScale",1,Ft[0],yt,Math.min);Ue._scaleNumbers||(Nt=1),qt=Ue._isAngular?je-Nt*Ee.bottom:je-Nt*(Ee.top+Ee.bottom)/2,Ue._numbersTop=Nt*Ee.top+qt;var Je=Ee[ge];ge==="center"&&(Je=(Ee.left+Ee.right)/2);var Ke=De-Nt*Je;return Ke=M(Ue,"numbersTranslate",0,Ke,yt,Math.max),f(Ke,qt)+y(Nt)})})(A,ee,U,{numbersX:B,numbersY:G,numbersScaler:N,transitionOpts:L,onComplete:I}),Q&&(j={range:H.gauge.axis.range,color:H.gauge.bgcolor,line:{color:H.gauge.bordercolor,width:0},thickness:1},V={range:H.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:H.gauge.bordercolor,width:H.gauge.borderwidth},thickness:1});var he=ee.selectAll("g.angular").data(X?U:[]);he.exit().remove();var xe=ee.selectAll("g.angularaxis").data(X?U:[]);xe.exit().remove(),X&&function(Me,Ce,ne,ue){var me,Te,Ee,Ue,De=ne[0].trace,je=ue.size,ge=ue.radius,be=ue.innerRadius,Se=ue.gaugeBg,Ne=ue.gaugeOutline,Ye=[je.l+je.w/2,je.t+je.h/2+ge/2],Ze=ue.gauge,st=ue.layer,ot=ue.transitionOpts,ft=ue.onComplete,yt=Math.PI/2;function Et(Lt){var Ct=De.gauge.axis.range[0],mt=(Lt-Ct)/(De.gauge.axis.range[1]-Ct)*Math.PI-yt;return mt<-yt?-yt:mt>yt?yt:mt}function Tt(Lt){return _.svg.arc().innerRadius((be+ge)/2-Lt/2*(ge-be)).outerRadius((be+ge)/2+Lt/2*(ge-be)).startAngle(-yt)}function xt(Lt){Lt.attr("d",function(Ct){return Tt(Ct.thickness).startAngle(Et(Ct.range[0])).endAngle(Et(Ct.range[1]))()})}Ze.enter().append("g").classed("angular",!0),Ze.attr("transform",f(Ye[0],Ye[1])),st.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),st.selectAll("g.xangularaxistick,path,text").remove(),(me=m(Me,De.gauge.axis)).type="linear",me.range=De.gauge.axis.range,me._id="xangularaxis",me.ticklabeloverflow="allow",me.setScale();var Dt=function(Lt){return(me.range[0]-Lt.x)/(me.range[1]-me.range[0])*Math.PI+Math.PI},It={},Ft=o.makeLabelFns(me,0).labelStandoff;It.xFn=function(Lt){var Ct=Dt(Lt);return Math.cos(Ct)*Ft},It.yFn=function(Lt){var Ct=Dt(Lt),mt=Math.sin(Ct)>0?.2:1;return-Math.sin(Ct)*(Ft+Lt.fontSize*mt)+Math.abs(Math.cos(Ct))*(Lt.fontSize*t)},It.anchorFn=function(Lt){var Ct=Dt(Lt),mt=Math.cos(Ct);return Math.abs(mt)<.1?"middle":mt>0?"start":"end"},It.heightFn=function(Lt,Ct,mt){var Ot=Dt(Lt);return-.5*(1+Math.sin(Ot))*mt};var qt=function(Lt){return f(Ye[0]+ge*Math.cos(Lt),Ye[1]-ge*Math.sin(Lt))};if(Ee=function(Lt){return qt(Dt(Lt))},Te=o.calcTicks(me),Ue=o.getTickSigns(me)[2],me.visible){Ue=me.ticks==="inside"?-1:1;var Nt=(me.linewidth||1)/2;o.drawTicks(Me,me,{vals:Te,layer:st,path:"M"+Ue*Nt+",0h"+Ue*me.ticklen,transFn:function(Lt){var Ct=Dt(Lt);return qt(Ct)+"rotate("+-l(Ct)+")"}}),o.drawLabels(Me,me,{vals:Te,layer:st,transFn:Ee,labelFns:It})}var Je=[Se].concat(De.gauge.steps),Ke=Ze.selectAll("g.bg-arc").data(Je);Ke.enter().append("g").classed("bg-arc",!0).append("path"),Ke.select("path").call(xt).call(g),Ke.exit().remove();var Ge=Tt(De.gauge.bar.thickness),nt=Ze.selectAll("g.value-arc").data([De.gauge.bar]);nt.enter().append("g").classed("value-arc",!0).append("path");var ht,Oe,Be,Qe=nt.select("path");x(ot)?(Qe.transition().duration(ot.duration).ease(ot.easing).each("end",function(){ft&&ft()}).each("interrupt",function(){ft&&ft()}).attrTween("d",(ht=Ge,Oe=Et(ne[0].lastY),Be=Et(ne[0].y),function(){var Lt=w(Oe,Be);return function(Ct){return ht.endAngle(Lt(Ct))()}})),De._lastValue=ne[0].y):Qe.attr("d",typeof ne[0].y=="number"?Ge.endAngle(Et(ne[0].y)):"M0,0Z"),Qe.call(g),nt.exit().remove(),Je=[];var ut=De.gauge.threshold.value;(ut||ut===0)&&Je.push({range:[ut,ut],color:De.gauge.threshold.color,line:{color:De.gauge.threshold.line.color,width:De.gauge.threshold.line.width},thickness:De.gauge.threshold.thickness});var pt=Ze.selectAll("g.threshold-arc").data(Je);pt.enter().append("g").classed("threshold-arc",!0).append("path"),pt.select("path").call(xt).call(g),pt.exit().remove();var bt=Ze.selectAll("g.gauge-outline").data([Ne]);bt.enter().append("g").classed("gauge-outline",!0).append("path"),bt.select("path").call(xt).call(g),bt.exit().remove()}(A,0,U,{radius:se,innerRadius:fe,gauge:he,layer:xe,size:te,gaugeBg:j,gaugeOutline:V,transitionOpts:L,onComplete:I});var Re=ee.selectAll("g.bullet").data(Y?U:[]);Re.exit().remove();var we=ee.selectAll("g.bulletaxis").data(Y?U:[]);we.exit().remove(),Y&&function(Me,Ce,ne,ue){var me,Te,Ee,Ue,De,je=ne[0].trace,ge=ue.gauge,be=ue.layer,Se=ue.gaugeBg,Ne=ue.gaugeOutline,Ye=ue.size,Ze=je.domain,st=ue.transitionOpts,ot=ue.onComplete;ge.enter().append("g").classed("bullet",!0),ge.attr("transform",f(Ye.l,Ye.t)),be.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),be.selectAll("g.xbulletaxistick,path,text").remove();var ft=Ye.h,yt=je.gauge.bar.thickness*ft,Et=Ze.x[0],Tt=Ze.x[0]+(Ze.x[1]-Ze.x[0])*(je._hasNumber||je._hasDelta?1-r.bulletNumberDomainSize:1);function xt(Ke){Ke.attr("width",function(Ge){return Math.max(0,me.c2p(Ge.range[1])-me.c2p(Ge.range[0]))}).attr("x",function(Ge){return me.c2p(Ge.range[0])}).attr("y",function(Ge){return .5*(1-Ge.thickness)*ft}).attr("height",function(Ge){return Ge.thickness*ft})}(me=m(Me,je.gauge.axis))._id="xbulletaxis",me.domain=[Et,Tt],me.setScale(),Te=o.calcTicks(me),Ee=o.makeTransTickFn(me),Ue=o.getTickSigns(me)[2],De=Ye.t+Ye.h,me.visible&&(o.drawTicks(Me,me,{vals:me.ticks==="inside"?o.clipEnds(me,Te):Te,layer:be,path:o.makeTickPath(me,De,Ue),transFn:Ee}),o.drawLabels(Me,me,{vals:Te,layer:be,transFn:Ee,labelFns:o.makeLabelFns(me,De)}));var Dt=[Se].concat(je.gauge.steps),It=ge.selectAll("g.bg-bullet").data(Dt);It.enter().append("g").classed("bg-bullet",!0).append("rect"),It.select("rect").call(xt).call(g),It.exit().remove();var Ft=ge.selectAll("g.value-bullet").data([je.gauge.bar]);Ft.enter().append("g").classed("value-bullet",!0).append("rect"),Ft.select("rect").attr("height",yt).attr("y",(ft-yt)/2).call(g),x(st)?Ft.select("rect").transition().duration(st.duration).ease(st.easing).each("end",function(){ot&&ot()}).each("interrupt",function(){ot&&ot()}).attr("width",Math.max(0,me.c2p(Math.min(je.gauge.axis.range[1],ne[0].y)))):Ft.select("rect").attr("width",typeof ne[0].y=="number"?Math.max(0,me.c2p(Math.min(je.gauge.axis.range[1],ne[0].y))):0),Ft.exit().remove();var qt=ne.filter(function(){return je.gauge.threshold.value||je.gauge.threshold.value===0}),Nt=ge.selectAll("g.threshold-bullet").data(qt);Nt.enter().append("g").classed("threshold-bullet",!0).append("line"),Nt.select("line").attr("x1",me.c2p(je.gauge.threshold.value)).attr("x2",me.c2p(je.gauge.threshold.value)).attr("y1",(1-je.gauge.threshold.thickness)/2*ft).attr("y2",(1-(1-je.gauge.threshold.thickness)/2)*ft).call(c.stroke,je.gauge.threshold.line.color).style("stroke-width",je.gauge.threshold.line.width),Nt.exit().remove();var Je=ge.selectAll("g.gauge-outline").data([Ne]);Je.enter().append("g").classed("gauge-outline",!0).append("rect"),Je.select("rect").call(xt).call(g),Je.exit().remove()}(A,0,U,{gauge:Re,layer:we,size:te,gaugeBg:j,gaugeOutline:V,transitionOpts:L,onComplete:I});var Ae=ee.selectAll("text.title").data(U);Ae.exit().remove(),Ae.enter().append("text").classed("title",!0),Ae.attr("text-anchor",function(){return Y?b.right:b[H.title.align]}).text(H.title.text).call(i.font,H.title.font).call(n.convertToTspans,A),Ae.attr("transform",function(){var Me,Ce=te.l+te.w*d[H.title.align],ne=r.titlePadding,ue=i.bBox(Ae.node());return Q?(X&&(Me=H.gauge.axis.visible?i.bBox(xe.node()).top-ne-ue.bottom:te.t+te.h/2-se/2-ue.bottom-ne),Y&&(Me=G-(ue.top+ue.bottom)/2,Ce=te.l-r.bulletPadding*te.w)):Me=H._numbersTop-ne-ue.bottom,f(Ce,Me)})})}},16249:function(D,E,e){var _=e(50693),w=e(12663).axisHoverFormat,s=e(5386).fF,T=e(2418),y=e(9012),f=e(1426).extendFlat,l=e(30962).overrideAll,t=D.exports=l(f({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:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}},y:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}},z:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}},caps:{x:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}},y:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}},z:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:s(),xhoverformat:w("x"),yhoverformat:w("y"),zhoverformat:w("z"),valuehoverformat:w("value",1),showlegend:f({},y.showlegend,{dflt:!1})},_("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:T.opacity,lightposition:T.lightposition,lighting:T.lighting,flatshading:T.flatshading,contour:T.contour,hoverinfo:f({},y.hoverinfo)}),"calc","nested");t.flatshading.dflt=!0,t.lighting.facenormalsepsilon.dflt=0,t.x.editType=t.y.editType=t.z.editType=t.value.editType="calc+clearAxisTypes",t.transforms=void 0},56959:function(D,E,e){var _=e(78803),w=e(88489).processGrid,s=e(88489).filter;D.exports=function(T,y){y._len=Math.min(y.x.length,y.y.length,y.z.length,y.value.length),y._x=s(y.x,y._len),y._y=s(y.y,y._len),y._z=s(y.z,y._len),y._value=s(y.value,y._len);var f=w(y);y._gridFill=f.fill,y._Xs=f.Xs,y._Ys=f.Ys,y._Zs=f.Zs,y._len=f.len;for(var l=1/0,t=-1/0,i=0;i0;a--){var u=Math.min(o[a],o[a-1]),p=Math.max(o[a],o[a-1]);if(p>u&&u-1}function ae(je,ge){return je===null?ge:je}function oe(je,ge,be){ee();var Se,Ne,Ye,Ze=[ge],st=[be];if(d>=1)Ze=[ge],st=[be];else if(d>0){var ot=function(qt,Nt){var Je=qt[0],Ke=qt[1],Ge=qt[2],nt=function(Lt,Ct,mt){for(var Ot=[],_t=0;_t-1?be[Et]:H(Tt,xt,Dt);yt[Et]=Ft>-1?Ft:X(Tt,xt,Dt,ae(je,It))}Se=yt[0],Ne=yt[1],Ye=yt[2],n._meshI.push(Se),n._meshJ.push(Ne),n._meshK.push(Ye),++M}}function se(je,ge,be,Se){var Ne=je[3];NeSe&&(Ne=Se);for(var Ye=(je[3]-Ne)/(je[3]-ge[3]+1e-9),Ze=[],st=0;st<4;st++)Ze[st]=(1-Ye)*je[st]+Ye*ge[st];return Ze}function fe(je,ge,be){return je>=ge&&je<=be}function ye(je){var ge=.001*(V-j);return je>=j-ge&&je<=V+ge}function pe(je){for(var ge=[],be=0;be<4;be++){var Se=je[be];ge.push([n._x[Se],n._y[Se],n._z[Se],n._value[Se]])}return ge}function de(je,ge,be,Se,Ne,Ye){Ye||(Ye=1),be=[-1,-1,-1];var Ze=!1,st=[fe(ge[0][3],Se,Ne),fe(ge[1][3],Se,Ne),fe(ge[2][3],Se,Ne)];if(!st[0]&&!st[1]&&!st[2])return!1;var ot=function(yt,Et,Tt){return ye(Et[0][3])&&ye(Et[1][3])&&ye(Et[2][3])?(oe(yt,Et,Tt),!0):Ye<3&&de(yt,Et,Tt,j,V,++Ye)};if(st[0]&&st[1]&&st[2])return ot(je,ge,be)||Ze;var ft=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach(function(yt){if(st[yt[0]]&&st[yt[1]]&&!st[yt[2]]){var Et=ge[yt[0]],Tt=ge[yt[1]],xt=ge[yt[2]],Dt=se(xt,Et,Se,Ne),It=se(xt,Tt,Se,Ne);Ze=ot(je,[It,Dt,Et],[-1,-1,be[yt[0]]])||Ze,Ze=ot(je,[Et,Tt,It],[be[yt[0]],be[yt[1]],-1])||Ze,ft=!0}}),ft||[[0,1,2],[1,2,0],[2,0,1]].forEach(function(yt){if(st[yt[0]]&&!st[yt[1]]&&!st[yt[2]]){var Et=ge[yt[0]],Tt=ge[yt[1]],xt=ge[yt[2]],Dt=se(Tt,Et,Se,Ne),It=se(xt,Et,Se,Ne);Ze=ot(je,[It,Dt,Et],[-1,-1,be[yt[0]]])||Ze,ft=!0}}),Ze}function he(je,ge,be,Se){var Ne=!1,Ye=pe(ge),Ze=[fe(Ye[0][3],be,Se),fe(Ye[1][3],be,Se),fe(Ye[2][3],be,Se),fe(Ye[3][3],be,Se)];if(!(Ze[0]||Ze[1]||Ze[2]||Ze[3]))return Ne;if(Ze[0]&&Ze[1]&&Ze[2]&&Ze[3])return h&&(Ne=function(ot,ft,yt){var Et=function(Tt,xt,Dt){oe(ot,[ft[Tt],ft[xt],ft[Dt]],[yt[Tt],yt[xt],yt[Dt]])};Et(0,1,2),Et(3,0,1),Et(2,3,0),Et(1,2,3)}(je,Ye,ge)||Ne),Ne;var st=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach(function(ot){if(Ze[ot[0]]&&Ze[ot[1]]&&Ze[ot[2]]&&!Ze[ot[3]]){var ft=Ye[ot[0]],yt=Ye[ot[1]],Et=Ye[ot[2]],Tt=Ye[ot[3]];if(h)Ne=oe(je,[ft,yt,Et],[ge[ot[0]],ge[ot[1]],ge[ot[2]]])||Ne;else{var xt=se(Tt,ft,be,Se),Dt=se(Tt,yt,be,Se),It=se(Tt,Et,be,Se);Ne=oe(null,[xt,Dt,It],[-1,-1,-1])||Ne}st=!0}}),st||([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach(function(ot){if(Ze[ot[0]]&&Ze[ot[1]]&&!Ze[ot[2]]&&!Ze[ot[3]]){var ft=Ye[ot[0]],yt=Ye[ot[1]],Et=Ye[ot[2]],Tt=Ye[ot[3]],xt=se(Et,ft,be,Se),Dt=se(Et,yt,be,Se),It=se(Tt,yt,be,Se),Ft=se(Tt,ft,be,Se);h?(Ne=oe(je,[ft,Ft,xt],[ge[ot[0]],-1,-1])||Ne,Ne=oe(je,[yt,Dt,It],[ge[ot[1]],-1,-1])||Ne):Ne=function(qt,Nt,Je){var Ke=function(Ge,nt,ht){oe(null,[Nt[Ge],Nt[nt],Nt[ht]],[Je[Ge],Je[nt],Je[ht]])};Ke(0,1,2),Ke(2,3,0)}(0,[xt,Dt,It,Ft],[-1,-1,-1,-1])||Ne,st=!0}}),st||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach(function(ot){if(Ze[ot[0]]&&!Ze[ot[1]]&&!Ze[ot[2]]&&!Ze[ot[3]]){var ft=Ye[ot[0]],yt=Ye[ot[1]],Et=Ye[ot[2]],Tt=Ye[ot[3]],xt=se(yt,ft,be,Se),Dt=se(Et,ft,be,Se),It=se(Tt,ft,be,Se);h?(Ne=oe(je,[ft,xt,Dt],[ge[ot[0]],-1,-1])||Ne,Ne=oe(je,[ft,Dt,It],[ge[ot[0]],-1,-1])||Ne,Ne=oe(je,[ft,It,xt],[ge[ot[0]],-1,-1])||Ne):Ne=oe(null,[xt,Dt,It],[-1,-1,-1])||Ne,st=!0}})),Ne}function xe(je,ge,be,Se,Ne,Ye,Ze,st,ot,ft,yt){var Et=!1;return k&&(te(je,"A")&&(Et=he(null,[ge,be,Se,Ye],ft,yt)||Et),te(je,"B")&&(Et=he(null,[be,Se,Ne,ot],ft,yt)||Et),te(je,"C")&&(Et=he(null,[be,Ye,Ze,ot],ft,yt)||Et),te(je,"D")&&(Et=he(null,[Se,Ye,st,ot],ft,yt)||Et),te(je,"E")&&(Et=he(null,[be,Se,Ye,ot],ft,yt)||Et)),h&&(Et=he(je,[be,Se,Ye,ot],ft,yt)||Et),Et}function Re(je,ge,be,Se,Ne,Ye,Ze,st){return[st[0]===!0||de(je,pe([ge,be,Se]),[ge,be,Se],Ye,Ze),st[1]===!0||de(je,pe([Se,Ne,ge]),[Se,Ne,ge],Ye,Ze)]}function we(je,ge,be,Se,Ne,Ye,Ze,st,ot){return st?Re(je,ge,be,Ne,Se,Ye,Ze,ot):Re(je,be,Ne,Se,ge,Ye,Ze,ot)}function Ae(je,ge,be,Se,Ne,Ye,Ze){var st,ot,ft,yt,Et=!1,Tt=function(){Et=de(je,[st,ot,ft],[-1,-1,-1],Ne,Ye)||Et,Et=de(je,[ft,yt,st],[-1,-1,-1],Ne,Ye)||Et},xt=Ze[0],Dt=Ze[1],It=Ze[2];return xt&&(st=Y(pe([B(ge,be-0,Se-0)])[0],pe([B(ge-1,be-0,Se-0)])[0],xt),ot=Y(pe([B(ge,be-0,Se-1)])[0],pe([B(ge-1,be-0,Se-1)])[0],xt),ft=Y(pe([B(ge,be-1,Se-1)])[0],pe([B(ge-1,be-1,Se-1)])[0],xt),yt=Y(pe([B(ge,be-1,Se-0)])[0],pe([B(ge-1,be-1,Se-0)])[0],xt),Tt()),Dt&&(st=Y(pe([B(ge-0,be,Se-0)])[0],pe([B(ge-0,be-1,Se-0)])[0],Dt),ot=Y(pe([B(ge-0,be,Se-1)])[0],pe([B(ge-0,be-1,Se-1)])[0],Dt),ft=Y(pe([B(ge-1,be,Se-1)])[0],pe([B(ge-1,be-1,Se-1)])[0],Dt),yt=Y(pe([B(ge-1,be,Se-0)])[0],pe([B(ge-1,be-1,Se-0)])[0],Dt),Tt()),It&&(st=Y(pe([B(ge-0,be-0,Se)])[0],pe([B(ge-0,be-0,Se-1)])[0],It),ot=Y(pe([B(ge-0,be-1,Se)])[0],pe([B(ge-0,be-1,Se-1)])[0],It),ft=Y(pe([B(ge-1,be-1,Se)])[0],pe([B(ge-1,be-1,Se-1)])[0],It),yt=Y(pe([B(ge-1,be-0,Se)])[0],pe([B(ge-1,be-0,Se-1)])[0],It),Tt()),Et}function Me(je,ge,be,Se,Ne,Ye,Ze,st,ot,ft,yt,Et){var Tt=je;return Et?(k&&je==="even"&&(Tt=null),xe(Tt,ge,be,Se,Ne,Ye,Ze,st,ot,ft,yt)):(k&&je==="odd"&&(Tt=null),xe(Tt,ot,st,Ze,Ye,Ne,Se,be,ge,ft,yt))}function Ce(je,ge,be,Se,Ne){for(var Ye=[],Ze=0,st=0;stMath.abs(Ye-N)?[G,Ye]:[Ye,N];k=!0,me(ge,Ze[0],Ze[1]),k=!1}}var st=[[Math.min(j,N),Math.max(j,N)],[Math.min(G,V),Math.max(G,V)]];["x","y","z"].forEach(function(ot){for(var ft=[],yt=0;yt0&&(Ft.push(Je.id),ot==="x"?qt.push([Je.distRatio,0,0]):ot==="y"?qt.push([0,Je.distRatio,0]):qt.push([0,0,Je.distRatio]))}else It=De(1,ot==="x"?O-1:ot==="y"?I-1:R-1);Ft.length>0&&(ft[Et]=ot==="x"?Te(je,Ft,Tt,xt,qt,ft[Et]):ot==="y"?Ee(je,Ft,Tt,xt,qt,ft[Et]):Ue(je,Ft,Tt,xt,qt,ft[Et]),Et++),It.length>0&&(ft[Et]=ot==="x"?Ce(je,It,Tt,xt,ft[Et]):ot==="y"?ne(je,It,Tt,xt,ft[Et]):ue(je,It,Tt,xt,ft[Et]),Et++)}var Ke=n.caps[ot];Ke.show&&Ke.fill&&(K(Ke.fill),ft[Et]=ot==="x"?Ce(je,[0,O-1],Tt,xt,ft[Et]):ot==="y"?ne(je,[0,I-1],Tt,xt,ft[Et]):ue(je,[0,R-1],Tt,xt,ft[Et]),Et++)}}),M===0&&Q(),n._meshX=u,n._meshY=p,n._meshZ=c,n._meshIntensity=b,n._Xs=A,n._Ys=C,n._Zs=L}(),n}D.exports={findNearestOnAxis:f,generateIsoMeshes:r,createIsosurfaceTrace:function(n,o){var a=n.glplot.gl,u=_({gl:a}),p=new l(n,u,o.uid);return u._trace=p,p.update(o),n.glplot.add(u),p}}},82738:function(D,E,e){var _=e(71828),w=e(73972),s=e(16249),T=e(1586);function y(f,l,t,i,r){var n=r("isomin"),o=r("isomax");o!=null&&n!=null&&n>o&&(l.isomin=null,l.isomax=null);var a=r("x"),u=r("y"),p=r("z"),c=r("value");a&&a.length&&u&&u.length&&p&&p.length&&c&&c.length?(w.getComponentMethod("calendars","handleTraceDefaults")(f,l,["x","y","z"],i),r("valuehoverformat"),["x","y","z"].forEach(function(b){r(b+"hoverformat");var d="caps."+b;r(d+".show")&&r(d+".fill");var v="slices."+b;r(v+".show")&&(r(v+".fill"),r(v+".locations"))}),r("spaceframe.show")&&r("spaceframe.fill"),r("surface.show")&&(r("surface.count"),r("surface.fill"),r("surface.pattern")),r("contour.show")&&(r("contour.color"),r("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(b){r(b)}),T(f,l,i,r,{prefix:"",cLetter:"c"}),l._length=null):l.visible=!1}D.exports={supplyDefaults:function(f,l,t,i){y(f,l,0,i,function(r,n){return _.coerce(f,l,s,r,n)})},supplyIsoDefaults:y}},64943:function(D,E,e){D.exports={attributes:e(16249),supplyDefaults:e(82738).supplyDefaults,calc:e(56959),colorbar:{min:"cmin",max:"cmax"},plot:e(22674).createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:e(58547),categories:["gl3d","showLegend"],meta:{}}},2418:function(D,E,e){var _=e(50693),w=e(12663).axisHoverFormat,s=e(5386).fF,T=e(54532),y=e(9012),f=e(1426).extendFlat;D.exports=f({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:s({editType:"calc"}),xhoverformat:w("x"),yhoverformat:w("y"),zhoverformat:w("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"},transforms:void 0},_("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:T.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:f({},T.contours.x.show,{}),color:T.contours.x.color,width:T.contours.x.width,editType:"calc"},lightposition:{x:f({},T.lightposition.x,{dflt:1e5}),y:f({},T.lightposition.y,{dflt:1e5}),z:f({},T.lightposition.z,{dflt:0}),editType:"calc"},lighting:f({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"},T.lighting),hoverinfo:f({},y.hoverinfo,{editType:"calc"}),showlegend:f({},y.showlegend,{dflt:!1})})},82932:function(D,E,e){var _=e(78803);D.exports=function(w,s){s.intensity&&_(w,s,{vals:s.intensity,containerStr:"",cLetter:"c"})}},91134:function(D,E,e){var _=e(9330).gl_mesh3d,w=e(9330).delaunay_triangulate,s=e(9330).alpha_shape,T=e(9330).convex_hull,y=e(81697).parseColorScale,f=e(78614),l=e(21081).extractOpts,t=e(90060);function i(p,c,b){this.scene=p,this.uid=b,this.mesh=c,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var r=i.prototype;function n(p){for(var c=[],b=p.length,d=0;d=c-.5)return!1;return!0}r.handlePick=function(p){if(p.object===this.mesh){var c=p.index=p.data.index;p.data._cellCenter?p.traceCoordinate=p.data.dataCoordinate:p.traceCoordinate=[this.data.x[c],this.data.y[c],this.data.z[c]];var b=this.data.hovertext||this.data.text;return Array.isArray(b)&&b[c]!==void 0?p.textLabel=b[c]:b&&(p.textLabel=b),!0}},r.update=function(p){var c=this.scene,b=c.fullSceneLayout;this.data=p;var d,v=p.x.length,x=t(o(b.xaxis,p.x,c.dataScale[0],p.xcalendar),o(b.yaxis,p.y,c.dataScale[1],p.ycalendar),o(b.zaxis,p.z,c.dataScale[2],p.zcalendar));if(p.i&&p.j&&p.k){if(p.i.length!==p.j.length||p.j.length!==p.k.length||!u(p.i,v)||!u(p.j,v)||!u(p.k,v))return;d=t(a(p.i),a(p.j),a(p.k))}else d=p.alphahull===0?T(x):p.alphahull>0?s(p.alphahull,x):function(h,M){for(var A=["x","y","z"].indexOf(h),C=[],L=M.length,O=0;Og):x=O>A,g=O;var I=a(A,C,L,O);I.pos=M,I.yc=(A+O)/2,I.i=h,I.dir=x?"increasing":"decreasing",I.x=I.pos,I.y=[L,C],m&&(I.orig_p=r[h]),d&&(I.tx=i.text[h]),v&&(I.htx=i.hovertext[h]),k.push(I)}else k.push({pos:M,empty:!0})}return i._extremes[o._id]=s.findExtremes(o,_.concat(c,p),{padded:!0}),k.length&&(k[0].t={labels:{open:w(t,"open:")+" ",high:w(t,"high:")+" ",low:w(t,"low:")+" ",close:w(t,"close:")+" "}}),k}D.exports={calc:function(t,i){var r=s.getFromId(t,i.xaxis),n=s.getFromId(t,i.yaxis),o=function(b,d,v){var x=v._minDiff;if(!x){var g,m=b._fullData,k=[];for(x=1/0,g=0;g"+d.labels[C]+_.hoverLabelText(c,L,b.yhoverformat):((A=w.extendFlat({},x)).y0=A.y1=O,A.yLabelVal=L,A.yLabel=d.labels[C]+_.hoverLabelText(c,L,b.yhoverformat),A.name="",v.push(A),h[L]=A)}return v}function r(n,o,a,u){var p=n.cd,c=n.ya,b=p[0].trace,d=p[0].t,v=t(n,o,a,u);if(!v)return[];var x=p[v.index],g=v.index=x.i,m=x.dir;function k(I){return d.labels[I]+_.hoverLabelText(c,b[I][g],b.yhoverformat)}var h=x.hi||b.hoverinfo,M=h.split("+"),A=h==="all",C=A||M.indexOf("y")!==-1,L=A||M.indexOf("text")!==-1,O=C?[k("open"),k("high"),k("low"),k("close")+" "+l[m]]:[];return L&&y(x,b,O),v.extraText=O.join("
"),v.y0=v.y1=c.c2p(x.yc,!0),[v]}D.exports={hoverPoints:function(n,o,a,u){return n.cd[0].trace.hoverlabel.split?i(n,o,a,u):r(n,o,a,u)},hoverSplit:i,hoverOnPoints:r}},54186:function(D,E,e){D.exports={moduleType:"trace",name:"ohlc",basePlotModule:e(93612),categories:["cartesian","svg","showLegend"],meta:{},attributes:e(2522),supplyDefaults:e(16169),calc:e(3485).calc,plot:e(72314),style:e(53101),hoverPoints:e(66449).hoverPoints,selectPoints:e(67324)}},14555:function(D,E,e){var _=e(73972),w=e(71828);D.exports=function(s,T,y,f){var l=y("x"),t=y("open"),i=y("high"),r=y("low"),n=y("close");if(y("hoverlabel.split"),_.getComponentMethod("calendars","handleTraceDefaults")(s,T,["x"],f),t&&i&&r&&n){var o=Math.min(t.length,i.length,r.length,n.length);return l&&(o=Math.min(o,w.minRowLength(l))),T._length=o,o}}},72314:function(D,E,e){var _=e(39898),w=e(71828);D.exports=function(s,T,y,f){var l=T.yaxis,t=T.xaxis,i=!!t.rangebreaks;w.makeTraceGroups(f,y,"trace ohlc").each(function(r){var n=_.select(this),o=r[0],a=o.t;if(o.trace.visible!==!0||a.empty)n.remove();else{var u=a.tickLen,p=n.selectAll("path").data(w.identity);p.enter().append("path"),p.exit().remove(),p.attr("d",function(c){if(c.empty)return"M0,0Z";var b=t.c2p(c.pos-u,!0),d=t.c2p(c.pos+u,!0),v=i?(b+d)/2:t.c2p(c.pos,!0);return"M"+b+","+l.c2p(c.o,!0)+"H"+v+"M"+v+","+l.c2p(c.h,!0)+"V"+l.c2p(c.l,!0)+"M"+d+","+l.c2p(c.c,!0)+"H"+v})}})}},67324:function(D){D.exports=function(E,e){var _,w=E.cd,s=E.xaxis,T=E.yaxis,y=[],f=w[0].t.bPos||0;if(e===!1)for(_=0;_=X.length||Y[X[K]]!==void 0)return!1;Y[X[K]]=!0}return!0}(Q))for(ee=0;ee0;c&&(u="array");var b=n("categoryorder",u);b==="array"?(n("categoryarray"),n("ticktext")):(delete i.categoryarray,delete i.ticktext),c||b!=="array"||(r.categoryorder="trace")}}D.exports=function(i,r,n,o){function a(d,v){return _.coerce(i,r,f,d,v)}var u=y(i,r,{name:"dimensions",handleItemDefaults:t}),p=function(d,v,x,g,m){m("line.shape"),m("line.hovertemplate");var k=m("line.color",g.colorway[0]);if(w(d,"line")&&_.isArrayOrTypedArray(k)){if(k.length)return m("line.colorscale"),s(d,v,g,m,{prefix:"line.",cLetter:"c"}),k.length;v.line.color=x}return 1/0}(i,r,n,o,a);T(r,o,a),Array.isArray(u)&&u.length||(r.visible=!1),l(r,u,"values",p),a("hoveron"),a("hovertemplate"),a("arrangement"),a("bundlecolors"),a("sortpaths"),a("counts");var c={family:o.font.family,size:Math.round(o.font.size),color:o.font.color};_.coerceFont(a,"labelfont",c);var b={family:o.font.family,size:Math.round(o.font.size/1.2),color:o.font.color};_.coerceFont(a,"tickfont",b)}},94873:function(D,E,e){D.exports={attributes:e(99506),supplyDefaults:e(14647),calc:e(28699),plot:e(45784),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:e(27677),categories:["noOpacity"],meta:{}}},45460:function(D,E,e){var _=e(39898),w=e(81684).k4,s=e(72391),T=e(30211),y=e(71828),f=y.strTranslate,l=e(91424),t=e(84267),i=e(63893);function r(Q,X,Y,K){var te=X._context.staticPlot,ae=Q.map(N.bind(0,X,Y)),oe=K.selectAll("g.parcatslayer").data([null]);oe.enter().append("g").attr("class","parcatslayer").style("pointer-events",te?"none":"all");var se=oe.selectAll("g.trace.parcats").data(ae,n),fe=se.enter().append("g").attr("class","trace parcats");se.attr("transform",function(Me){return f(Me.x,Me.y)}),fe.append("g").attr("class","paths");var ye=se.select("g.paths").selectAll("path.path").data(function(Me){return Me.paths},n);ye.attr("fill",function(Me){return Me.model.color});var pe=ye.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(Me){return Me.model.color}).attr("fill-opacity",0);v(pe),ye.attr("d",function(Me){return Me.svgD}),pe.empty()||ye.sort(a),ye.exit().remove(),ye.on("mouseover",u).on("mouseout",p).on("click",d),fe.append("g").attr("class","dimensions");var de=se.select("g.dimensions").selectAll("g.dimension").data(function(Me){return Me.dimensions},n);de.enter().append("g").attr("class","dimension"),de.attr("transform",function(Me){return f(Me.x,0)}),de.exit().remove();var he=de.selectAll("g.category").data(function(Me){return Me.categories},n),xe=he.enter().append("g").attr("class","category");he.attr("transform",function(Me){return f(0,Me.y)}),xe.append("rect").attr("class","catrect").attr("pointer-events","none"),he.select("rect.catrect").attr("fill","none").attr("width",function(Me){return Me.width}).attr("height",function(Me){return Me.height}),g(xe);var Re=he.selectAll("rect.bandrect").data(function(Me){return Me.bands},n);Re.each(function(){y.raiseToTop(this)}),Re.attr("fill",function(Me){return Me.color});var we=Re.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(Me){return Me.color}).attr("fill-opacity",0);Re.attr("fill",function(Me){return Me.color}).attr("width",function(Me){return Me.width}).attr("height",function(Me){return Me.height}).attr("y",function(Me){return Me.y}).attr("cursor",function(Me){return Me.parcatsViewModel.arrangement==="fixed"?"default":Me.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),m(we),Re.exit().remove(),xe.append("text").attr("class","catlabel").attr("pointer-events","none");var Ae=X._fullLayout.paper_bgcolor;he.select("text.catlabel").attr("text-anchor",function(Me){return o(Me)?"start":"end"}).attr("alignment-baseline","middle").style("text-shadow",i.makeTextShadow(Ae)).style("fill","rgb(0, 0, 0)").attr("x",function(Me){return o(Me)?Me.width+5:-5}).attr("y",function(Me){return Me.height/2}).text(function(Me){return Me.model.categoryLabel}).each(function(Me){l.font(_.select(this),Me.parcatsViewModel.categorylabelfont),i.convertToTspans(_.select(this),X)}),xe.append("text").attr("class","dimlabel"),he.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(Me){return Me.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(Me){return Me.width/2}).attr("y",-5).text(function(Me,Ce){return Ce===0?Me.parcatsViewModel.model.dimensions[Me.model.dimensionInd].dimensionLabel:null}).each(function(Me){l.font(_.select(this),Me.parcatsViewModel.labelfont)}),he.selectAll("rect.bandrect").on("mouseover",C).on("mouseout",L),he.exit().remove(),de.call(_.behavior.drag().origin(function(Me){return{x:Me.x,y:0}}).on("dragstart",O).on("drag",I).on("dragend",R)),se.each(function(Me){Me.traceSelection=_.select(this),Me.pathSelection=_.select(this).selectAll("g.paths").selectAll("path.path"),Me.dimensionSelection=_.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),se.exit().remove()}function n(Q){return Q.key}function o(Q){var X=Q.parcatsViewModel.dimensions.length,Y=Q.parcatsViewModel.dimensions[X-1].model.dimensionInd;return Q.model.dimensionInd===Y}function a(Q,X){return Q.model.rawColor>X.model.rawColor?1:Q.model.rawColor"),Te=_.mouse(se)[0];T.loneHover({trace:fe,x:Re-pe.left+de.left,y:we-pe.top+de.top,text:me,color:Q.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:Ae,idealAlign:Te1&&de.displayInd===pe.dimensions.length-1?(K=fe.left,te="left"):(K=fe.left+fe.width,te="right");var Re=ye.model.count,we=ye.model.categoryLabel,Ae=Re/ye.parcatsViewModel.model.count,Me={countLabel:Re,categoryLabel:we,probabilityLabel:Ae.toFixed(3)},Ce=[];ye.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Ce.push(["Count:",Me.countLabel].join(" ")),ye.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&Ce.push(["P("+Me.categoryLabel+"):",Me.probabilityLabel].join(" "));var ne=Ce.join("
");return{trace:he,x:ae*(K-X.left),y:oe*(xe-X.top),text:ne,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:te,hovertemplate:he.hovertemplate,hovertemplateLabels:Me,eventData:[{data:he._input,fullData:he,count:Re,category:we,probability:Ae}]}}function C(Q){if(!Q.parcatsViewModel.dragDimension&&Q.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){if(_.mouse(this)[1]<-1)return;var X,Y=Q.parcatsViewModel.graphDiv,K=Y._fullLayout,te=K._paperdiv.node().getBoundingClientRect(),ae=Q.parcatsViewModel.hoveron,oe=this;ae==="color"?(function(se){var fe=_.select(se).datum(),ye=k(fe);x(ye),ye.each(function(){y.raiseToTop(this)}),_.select(se.parentNode).selectAll("rect.bandrect").filter(function(pe){return pe.color===fe.color}).each(function(){y.raiseToTop(this),_.select(this).attr("stroke","black").attr("stroke-width",1.5)})}(oe),M(oe,"plotly_hover",_.event)):(function(se){_.select(se.parentNode).selectAll("rect.bandrect").each(function(fe){var ye=k(fe);x(ye),ye.each(function(){y.raiseToTop(this)})}),_.select(se.parentNode).select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}(oe),h(oe,"plotly_hover",_.event)),Q.parcatsViewModel.hoverinfoItems.indexOf("none")===-1&&(ae==="category"?X=A(Y,te,oe):ae==="color"?X=function(se,fe,ye){se._fullLayout._calcInverseTransform(se);var pe,de,he=se._fullLayout._invScaleX,xe=se._fullLayout._invScaleY,Re=ye.getBoundingClientRect(),we=_.select(ye).datum(),Ae=we.categoryViewModel,Me=Ae.parcatsViewModel,Ce=Me.model.dimensions[Ae.model.dimensionInd],ne=Me.trace,ue=Re.y+Re.height/2;Me.dimensions.length>1&&Ce.displayInd===Me.dimensions.length-1?(pe=Re.left,de="left"):(pe=Re.left+Re.width,de="right");var me=Ae.model.categoryLabel,Te=we.parcatsViewModel.model.count,Ee=0;we.categoryViewModel.bands.forEach(function(st){st.color===we.color&&(Ee+=st.count)});var Ue=Ae.model.count,De=0;Me.pathSelection.each(function(st){st.model.color===we.color&&(De+=st.model.count)});var je=Ee/Te,ge=Ee/De,be=Ee/Ue,Se={countLabel:Te,categoryLabel:me,probabilityLabel:je.toFixed(3)},Ne=[];Ae.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Ne.push(["Count:",Se.countLabel].join(" ")),Ae.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(Ne.push("P(color ∩ "+me+"): "+Se.probabilityLabel),Ne.push("P("+me+" | color): "+ge.toFixed(3)),Ne.push("P(color | "+me+"): "+be.toFixed(3)));var Ye=Ne.join("
"),Ze=t.mostReadable(we.color,["black","white"]);return{trace:ne,x:he*(pe-fe.left),y:xe*(ue-fe.top),text:Ye,color:we.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:Ze,fontSize:10,idealAlign:de,hovertemplate:ne.hovertemplate,hovertemplateLabels:Se,eventData:[{data:ne._input,fullData:ne,category:me,count:Te,probability:je,categorycount:Ue,colorcount:De,bandcolorcount:Ee}]}}(Y,te,oe):ae==="dimension"&&(X=function(se,fe,ye){var pe=[];return _.select(ye.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){pe.push(A(se,fe,this))}),pe}(Y,te,oe)),X&&T.loneHover(X,{container:K._hoverlayer.node(),outerContainer:K._paper.node(),gd:Y}))}}function L(Q){var X=Q.parcatsViewModel;X.dragDimension||(v(X.pathSelection),g(X.dimensionSelection.selectAll("g.category")),m(X.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),T.loneUnhover(X.graphDiv._fullLayout._hoverlayer.node()),X.pathSelection.sort(a),X.hoverinfoItems.indexOf("skip")!==-1)||(Q.parcatsViewModel.hoveron==="color"?M(this,"plotly_unhover",_.event):h(this,"plotly_unhover",_.event))}function O(Q){Q.parcatsViewModel.arrangement!=="fixed"&&(Q.dragDimensionDisplayInd=Q.model.displayInd,Q.initialDragDimensionDisplayInds=Q.parcatsViewModel.model.dimensions.map(function(X){return X.displayInd}),Q.dragHasMoved=!1,Q.dragCategoryDisplayInd=null,_.select(this).selectAll("g.category").select("rect.catrect").each(function(X){var Y=_.mouse(this)[0],K=_.mouse(this)[1];-2<=Y&&Y<=X.width+2&&-2<=K&&K<=X.height+2&&(Q.dragCategoryDisplayInd=X.model.displayInd,Q.initialDragCategoryDisplayInds=Q.model.categories.map(function(te){return te.displayInd}),X.model.dragY=X.y,y.raiseToTop(this.parentNode),_.select(this.parentNode).selectAll("rect.bandrect").each(function(te){te.ype.y+pe.height/2&&(ae.model.displayInd=pe.model.displayInd,pe.model.displayInd=se),Q.dragCategoryDisplayInd=ae.model.displayInd}if(Q.dragCategoryDisplayInd===null||Q.parcatsViewModel.arrangement==="freeform"){te.model.dragX=_.event.x;var de=Q.parcatsViewModel.dimensions[Y],he=Q.parcatsViewModel.dimensions[K];de!==void 0&&te.model.dragXhe.x&&(te.model.displayInd=he.model.displayInd,he.model.displayInd=Q.dragDimensionDisplayInd),Q.dragDimensionDisplayInd=te.model.displayInd}H(Q.parcatsViewModel),V(Q.parcatsViewModel),G(Q.parcatsViewModel),B(Q.parcatsViewModel)}}function R(Q){if(Q.parcatsViewModel.arrangement!=="fixed"&&Q.dragDimensionDisplayInd!==null){_.select(this).selectAll("text").attr("font-weight","normal");var X={},Y=U(Q.parcatsViewModel),K=Q.parcatsViewModel.model.dimensions.map(function(pe){return pe.displayInd}),te=Q.initialDragDimensionDisplayInds.some(function(pe,de){return pe!==K[de]});te&&K.forEach(function(pe,de){var he=Q.parcatsViewModel.model.dimensions[de].containerInd;X["dimensions["+he+"].displayindex"]=pe});var ae=!1;if(Q.dragCategoryDisplayInd!==null){var oe=Q.model.categories.map(function(pe){return pe.displayInd});if(ae=Q.initialDragCategoryDisplayInds.some(function(pe,de){return pe!==oe[de]})){var se=Q.model.categories.slice().sort(function(pe,de){return pe.displayInd-de.displayInd}),fe=se.map(function(pe){return pe.categoryValue}),ye=se.map(function(pe){return pe.categoryLabel});X["dimensions["+Q.model.containerInd+"].categoryarray"]=[fe],X["dimensions["+Q.model.containerInd+"].ticktext"]=[ye],X["dimensions["+Q.model.containerInd+"].categoryorder"]="array"}}Q.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!Q.dragHasMoved&&Q.potentialClickBand&&(Q.parcatsViewModel.hoveron==="color"?M(Q.potentialClickBand,"plotly_click",_.event.sourceEvent):h(Q.potentialClickBand,"plotly_click",_.event.sourceEvent)),Q.model.dragX=null,Q.dragCategoryDisplayInd!==null&&(Q.parcatsViewModel.dimensions[Q.dragDimensionDisplayInd].categories[Q.dragCategoryDisplayInd].model.dragY=null,Q.dragCategoryDisplayInd=null),Q.dragDimensionDisplayInd=null,Q.parcatsViewModel.dragDimension=null,Q.dragHasMoved=null,Q.potentialClickBand=null,H(Q.parcatsViewModel),V(Q.parcatsViewModel),_.transition().duration(300).ease("cubic-in-out").each(function(){G(Q.parcatsViewModel,!0),B(Q.parcatsViewModel,!0)}).each("end",function(){(te||ae)&&s.restyle(Q.parcatsViewModel.graphDiv,X,[Y])})}}function U(Q){for(var X,Y=Q.graphDiv._fullData,K=0;K=0;oe--)ye+="C"+fe[oe]+","+(X[oe+1]+K)+" "+se[oe]+","+(X[oe]+K)+" "+(Q[oe]+Y[oe])+","+(X[oe]+K),ye+="l-"+Y[oe]+",0 ";return ye+"Z"}function V(Q){var X=Q.dimensions,Y=Q.model,K=X.map(function(Se){return Se.categories.map(function(Ne){return Ne.y})}),te=Q.model.dimensions.map(function(Se){return Se.categories.map(function(Ne){return Ne.displayInd})}),ae=Q.model.dimensions.map(function(Se){return Se.displayInd}),oe=Q.dimensions.map(function(Se){return Se.model.dimensionInd}),se=X.map(function(Se){return Se.x}),fe=X.map(function(Se){return Se.width}),ye=[];for(var pe in Y.paths)Y.paths.hasOwnProperty(pe)&&ye.push(Y.paths[pe]);function de(Se){var Ne=Se.categoryInds.map(function(Ye,Ze){return te[Ze][Ye]});return oe.map(function(Ye){return Ne[Ye]})}ye.sort(function(Se,Ne){var Ye=de(Se),Ze=de(Ne);return Q.sortpaths==="backward"&&(Ye.reverse(),Ze.reverse()),Ye.push(Se.valueInds[0]),Ze.push(Ne.valueInds[0]),Q.bundlecolors&&(Ye.unshift(Se.rawColor),Ze.unshift(Ne.rawColor)),YeZe?1:0});for(var he=new Array(ye.length),xe=X[0].model.count,Re=X[0].categories.map(function(Se){return Se.height}).reduce(function(Se,Ne){return Se+Ne}),we=0;we0?Re*(Me.count/xe):0;for(var Ce,ne=new Array(K.length),ue=0;ue1?(Q.width-80-16)/(K-1):0)*te;var ae,oe,se,fe,ye,pe=[],de=Q.model.maxCats,he=X.categories.length,xe=X.count,Re=Q.height-8*(de-1),we=8*(de-he)/2,Ae=X.categories.map(function(Me){return{displayInd:Me.displayInd,categoryInd:Me.categoryInd}});for(Ae.sort(function(Me,Ce){return Me.displayInd-Ce.displayInd}),ye=0;ye0?oe.count/xe*Re:0,se={key:oe.valueInds[0],model:oe,width:16,height:ae,y:oe.dragY!==null?oe.dragY:we,bands:[],parcatsViewModel:Q},we=we+ae+8,pe.push(se);return{key:X.dimensionInd,x:X.dragX!==null?X.dragX:Y,y:0,width:16,model:X,categories:pe,parcatsViewModel:Q,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}D.exports=function(Q,X,Y,K){r(Y,Q,K,X)}},45784:function(D,E,e){var _=e(45460);D.exports=function(w,s,T,y){var f=w._fullLayout,l=f._paper,t=f._size;_(w,l,s,{width:t.w,height:t.h,margin:{t:t.t,r:t.r,b:t.b,l:t.l}},T,y)}},73362:function(D,E,e){var _=e(50693),w=e(13838),s=e(41940),T=e(27670).Y,y=e(1426).extendFlat,f=e(44467).templatedArray;D.exports={domain:T({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:s({editType:"plot"}),tickfont:s({editType:"plot"}),rangefont:s({editType:"plot"}),dimensions:f("dimension",{label:{valType:"string",editType:"plot"},tickvals:y({},w.tickvals,{editType:"plot"}),ticktext:y({},w.ticktext,{editType:"plot"}),tickformat:y({},w.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:y({editType:"calc"},_("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"}}},57920:function(D,E,e){var _=e(25706),w=e(39898),s=e(28984).keyFun,T=e(28984).repeat,y=e(71828).sorterAsc,f=e(71828).strTranslate,l=_.bar.snapRatio;function t(A,C){return A*(1-l)+C*l}var i=_.bar.snapClose;function r(A,C){return A*(1-i)+C*i}function n(A,C,L,O){if(function(ee,Q){for(var X=0;X=Q[X][0]&&ee<=Q[X][1])return!0;return!1}(L,O))return L;var I=A?-1:1,R=0,U=C.length-1;if(I<0){var B=R;R=U,U=B}for(var G=C[R],N=G,j=R;I*jC){V=L;break}}if(I=N,isNaN(I)&&(I=isNaN(j)||isNaN(V)?isNaN(j)?V:j:C-G[j][1]te[1]+oe||ae=.9*te[1]+.1*te[0]?"n":ae<=.9*te[0]+.1*te[1]?"s":"ns"}(ee,C);Q&&(R.interval=B[I],R.intervalPix=ee,R.region=Q)}}if(A.ordinal&&!R.region){var X=A.unitTickvals,Y=A.unitToPaddedPx.invert(C);for(L=0;L=K[0]&&Y<=K[1]){R.clickableOrdinalRange=K;break}}}return R}function x(A,C){w.event.sourceEvent.stopPropagation();var L=C.height-w.mouse(A)[1]-2*_.verticalPadding,O=C.brush.svgBrush;O.wasDragged=!0,O._dragging=!0,O.grabbingBar?O.newExtent=[L-O.grabPoint,L+O.barLength-O.grabPoint].map(C.unitToPaddedPx.invert):O.newExtent=[O.startExtent,C.unitToPaddedPx.invert(L)].sort(y),C.brush.filterSpecified=!0,O.extent=O.stayingIntervals.concat([O.newExtent]),O.brushCallback(C),d(A.parentNode)}function g(A,C){var L=v(C,C.height-w.mouse(A)[1]-2*_.verticalPadding),O="crosshair";L.clickableOrdinalRange?O="pointer":L.region&&(O=L.region+"-resize"),w.select(document.body).style("cursor",O)}function m(A){A.on("mousemove",function(C){w.event.preventDefault(),C.parent.inBrushDrag||g(this,C)}).on("mouseleave",function(C){C.parent.inBrushDrag||c()}).call(w.behavior.drag().on("dragstart",function(C){(function(L,O){w.event.sourceEvent.stopPropagation();var I=O.height-w.mouse(L)[1]-2*_.verticalPadding,R=O.unitToPaddedPx.invert(I),U=O.brush,B=v(O,I),G=B.interval,N=U.svgBrush;if(N.wasDragged=!1,N.grabbingBar=B.region==="ns",N.grabbingBar){var j=G.map(O.unitToPaddedPx);N.grabPoint=I-j[0]-_.verticalPadding,N.barLength=j[1]-j[0]}N.clickableOrdinalRange=B.clickableOrdinalRange,N.stayingIntervals=O.multiselect&&U.filterSpecified?U.filter.getConsolidated():[],G&&(N.stayingIntervals=N.stayingIntervals.filter(function(V){return V[0]!==G[0]&&V[1]!==G[1]})),N.startExtent=B.region?G[B.region==="s"?1:0]:R,O.parent.inBrushDrag=!0,N.brushStartCallback()})(this,C)}).on("drag",function(C){x(this,C)}).on("dragend",function(C){(function(L,O){var I=O.brush,R=I.filter,U=I.svgBrush;U._dragging||(g(L,O),x(L,O),O.brush.svgBrush.wasDragged=!1),U._dragging=!1,w.event.sourceEvent.stopPropagation();var B=U.grabbingBar;if(U.grabbingBar=!1,U.grabLocation=void 0,O.parent.inBrushDrag=!1,c(),!U.wasDragged)return U.wasDragged=void 0,U.clickableOrdinalRange?I.filterSpecified&&O.multiselect?U.extent.push(U.clickableOrdinalRange):(U.extent=[U.clickableOrdinalRange],I.filterSpecified=!0):B?(U.extent=U.stayingIntervals,U.extent.length===0&&h(I)):h(I),U.brushCallback(O),d(L.parentNode),void U.brushEndCallback(I.filterSpecified?R.getConsolidated():[]);var G=function(){R.set(R.getConsolidated())};if(O.ordinal){var N=O.unitTickvals;N[N.length-1]U.newExtent[0];U.extent=U.stayingIntervals.concat(j?[U.newExtent]:[]),U.extent.length||h(I),U.brushCallback(O),j?d(L.parentNode,G):(G(),d(L.parentNode))}else G();U.brushEndCallback(I.filterSpecified?R.getConsolidated():[])})(this,C)}))}function k(A,C){return A[0]-C[0]}function h(A){A.filterSpecified=!1,A.svgBrush.extent=[[-1/0,1/0]]}function M(A){for(var C,L=A.slice(),O=[],I=L.shift();I;){for(C=I.slice();(I=L.shift())&&I[0]<=C[1];)C[1]=Math.max(C[1],I[1]);O.push(C)}return O.length===1&&O[0][0]>O[0][1]&&(O=[]),O}D.exports={makeBrush:function(A,C,L,O,I,R){var U,B=function(){var G,N,j=[];return{set:function(V){(j=V.map(function(H){return H.slice().sort(y)}).sort(k)).length===1&&j[0][0]===-1/0&&j[0][1]===1/0&&(j=[[0,-1]]),G=M(j),N=j.reduce(function(H,ee){return[Math.min(H[0],ee[0]),Math.max(H[1],ee[1])]},[1/0,-1/0])},get:function(){return j.slice()},getConsolidated:function(){return G},getBounds:function(){return N}}}();return B.set(L),{filter:B,filterSpecified:C,svgBrush:{extent:[],brushStartCallback:O,brushCallback:(U=I,function(G){var N=G.brush,j=function(H){return H.svgBrush.extent.map(function(ee){return ee.slice()})}(N),V=j.slice();N.filter.set(V),U()}),brushEndCallback:R}}},ensureAxisBrush:function(A,C,L){var O=A.selectAll("."+_.cn.axisBrush).data(T,s);O.enter().append("g").classed(_.cn.axisBrush,!0),function(I,R,U){var B=U._context.staticPlot,G=I.selectAll(".background").data(T);G.enter().append("rect").classed("background",!0).call(o).call(a).style("pointer-events",B?"none":"auto").attr("transform",f(0,_.verticalPadding)),G.call(m).attr("height",function(V){return V.height-_.verticalPadding});var N=I.selectAll(".highlight-shadow").data(T);N.enter().append("line").classed("highlight-shadow",!0).attr("x",-_.bar.width/2).attr("stroke-width",_.bar.width+_.bar.strokeWidth).attr("stroke",R).attr("opacity",_.bar.strokeOpacity).attr("stroke-linecap","butt"),N.attr("y1",function(V){return V.height}).call(b);var j=I.selectAll(".highlight").data(T);j.enter().append("line").classed("highlight",!0).attr("x",-_.bar.width/2).attr("stroke-width",_.bar.width-_.bar.strokeWidth).attr("stroke",_.bar.fillColor).attr("opacity",_.bar.fillOpacity).attr("stroke-linecap","butt"),j.attr("y1",function(V){return V.height}).call(b)}(O,C,L)},cleanRanges:function(A,C){if(Array.isArray(A[0])?(A=A.map(function(O){return O.sort(y)}),A=C.multiselect?M(A.sort(k)):[A[0]]):A=[A.sort(y)],C.tickvals){var L=C.tickvals.slice().sort(y);if(!(A=A.map(function(O){var I=[n(0,L,O[0],[]),n(1,L,O[1],[])];if(I[1]>I[0])return I}).filter(function(O){return O})).length)return}return A.length>1?A:A[0]}}},71791:function(D,E,e){D.exports={attributes:e(73362),supplyDefaults:e(3633),calc:e(24639),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:e(49351),categories:["gl","regl","noOpacity","noHover"],meta:{}}},49351:function(D,E,e){var _=e(39898),w=e(27659).a0,s=e(21341),T=e(77922);E.name="parcoords",E.plot=function(y){var f=w(y.calcdata,"parcoords")[0];f.length&&s(y,f)},E.clean=function(y,f,l,t){var i=t._has&&t._has("parcoords"),r=f._has&&f._has("parcoords");i&&!r&&(t._paperdiv.selectAll(".parcoords").remove(),t._glimages.selectAll("*").remove())},E.toSVG=function(y){var f=y._fullLayout._glimages,l=_.select(y).selectAll(".svg-container");l.filter(function(t,i){return i===l.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus").each(function(){var t=this,i=t.toDataURL("image/png");f.append("svg:image").attr({xmlns:T.svg,"xlink:href":i,preserveAspectRatio:"none",x:0,y:0,width:t.style.width,height:t.style.height})}),window.setTimeout(function(){_.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}},24639:function(D,E,e){var _=e(71828).isArrayOrTypedArray,w=e(21081),s=e(28984).wrap;D.exports=function(T,y){var f,l;return w.hasColorscale(y,"line")&&_(y.line.color)?(f=y.line.color,l=w.extractOpts(y.line).colorscale,w.calc(T,y,{vals:f,containerStr:"line",cLetter:"c"})):(f=function(t){for(var i=new Array(t),r=0;ri&&(_.log("parcoords traces support up to "+i+" dimensions at the moment"),b.splice(i));var d=y(o,a,{name:"dimensions",layout:p,handleItemDefaults:n}),v=function(g,m,k,h,M){var A=M("line.color",k);if(w(g,"line")&&_.isArrayOrTypedArray(A)){if(A.length)return M("line.colorscale"),s(g,m,h,M,{prefix:"line.",cLetter:"c"}),A.length;m.line.color=k}return 1/0}(o,a,u,p,c);T(a,p,c),Array.isArray(d)&&d.length||(a.visible=!1),r(a,d,"values",v);var x={family:p.font.family,size:Math.round(p.font.size/1.2),color:p.font.color};_.coerceFont(c,"labelfont",x),_.coerceFont(c,"tickfont",x),_.coerceFont(c,"rangefont",x),c("labelangle"),c("labelside"),c("unselected.line.color"),c("unselected.line.opacity")}},1602:function(D,E,e){var _=e(71828).isTypedArray;E.convertTypedArray=function(w){return _(w)?Array.prototype.slice.call(w):w},E.isOrdinal=function(w){return!!w.tickvals},E.isVisible=function(w){return w.visible||!("visible"in w)}},67618:function(D,E,e){var _=e(71791);_.plot=e(21341),D.exports=_},83398:function(D,E,e){var _=e(56068),w=_([`precision highp float; +`),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')`}}},13056:function(D,E,e){var _=e(71828);D.exports=function(w,s){var T=w.split(" "),m=T[0],f=T[1],l=_.isArrayOrTypedArray(s)?_.mean(s):s,t=.5+l/100,i=1.5+l/100,r=["",""],n=[0,0];switch(m){case"top":r[0]="top",n[1]=-i;break;case"bottom":r[0]="bottom",n[1]=i}switch(f){case"left":r[1]="right",n[0]=-t;break;case"right":r[1]="left",n[0]=t}return{anchor:r[0]&&r[1]?r.join("-"):r[0]?r[0]:r[1]?r[1]:"center",offset:n}}},50101:function(D,E,e){var _=e(44517),w=e(71828),s=w.strTranslate,T=w.strScale,m=e(27659).AU,f=e(77922),l=e(39898),t=e(91424),i=e(63893),r=e(10481),n="mapbox",o=E.constants=e(77734);function a(u){return typeof u=="string"&&(o.styleValuesMapbox.indexOf(u)!==-1||u.indexOf("mapbox://")===0)}E.name=n,E.attr="subplot",E.idRoot=n,E.idRegex=E.attrRegex=w.counterRegex(n),E.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},E.layoutAttributes=e(23585),E.supplyLayoutDefaults=e(77882),E.plot=function(u){var p=u._fullLayout,c=u.calcdata,b=p._subplots.mapbox;if(_.version!==o.requiredVersion)throw new Error(o.wrongVersionErrorMsg);var d=function(h,M){var A=h._fullLayout;if(h._context.mapboxAccessToken==="")return"";for(var C=[],L=[],O=!1,I=!1,R=0;R1&&w.warn(o.multipleTokensErrorMsg),C[0]):(L.length&&w.log(["Listed mapbox access token(s)",L.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}(u,b);_.accessToken=d;for(var v=0;vL/2){var O=h.split("|").join("
");A.text(O).attr("data-unformatted",O).call(i.convertToTspans,u),C=t.bBox(A.node())}A.attr("transform",s(-3,8-C.height)),M.insert("rect",".static-attribution").attr({x:-C.width-6,y:-C.height-3,width:C.width+6,height:C.height+3,fill:"rgba(255, 255, 255, 0.75)"});var I=1;C.width+6>L&&(I=L/(C.width+6));var R=[b.l+b.w*x.x[1],b.t+b.h*(1-x.y[0])];M.attr("transform",s(R[0],R[1])+T(I))}},E.updateFx=function(u){for(var p=u._fullLayout,c=p._subplots.mapbox,b=0;b0){for(var n=0;n0}function t(i){var r={},n={};switch(i.type){case"circle":_.extendFlat(n,{"circle-radius":i.circle.radius,"circle-color":i.color,"circle-opacity":i.opacity});break;case"line":_.extendFlat(n,{"line-width":i.line.width,"line-color":i.color,"line-opacity":i.opacity,"line-dasharray":i.line.dash});break;case"fill":_.extendFlat(n,{"fill-color":i.color,"fill-outline-color":i.fill.outlinecolor,"fill-opacity":i.opacity});break;case"symbol":var o=i.symbol,a=s(o.textposition,o.iconsize);_.extendFlat(r,{"icon-image":o.icon+"-15","icon-size":o.iconsize/10,"text-field":o.text,"text-size":o.textfont.size,"text-anchor":a.anchor,"text-offset":a.offset,"symbol-placement":o.placement}),_.extendFlat(n,{"icon-color":i.color,"text-color":o.textfont.color,"text-opacity":i.opacity});break;case"raster":_.extendFlat(n,{"raster-fade-duration":0,"raster-opacity":i.opacity})}return{layout:r,paint:n}}f.update=function(i){this.visible?this.needsNewImage(i)?this.updateImage(i):this.needsNewSource(i)?(this.removeLayer(),this.updateSource(i),this.updateLayer(i)):this.needsNewLayer(i)?this.updateLayer(i):this.updateStyle(i):(this.updateSource(i),this.updateLayer(i)),this.visible=l(i)},f.needsNewImage=function(i){return this.subplot.map.getSource(this.idSource)&&this.sourceType==="image"&&i.sourcetype==="image"&&(this.source!==i.source||JSON.stringify(this.coordinates)!==JSON.stringify(i.coordinates))},f.needsNewSource=function(i){return this.sourceType!==i.sourcetype||JSON.stringify(this.source)!==JSON.stringify(i.source)||this.layerType!==i.type},f.needsNewLayer=function(i){return this.layerType!==i.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},f.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},f.updateImage=function(i){this.subplot.map.getSource(this.idSource).updateImage({url:i.source,coordinates:i.coordinates});var r=this.findFollowingMapboxLayerId(this.lookupBelow());r!==null&&this.subplot.map.moveLayer(this.idLayer,r)},f.updateSource=function(i){var r=this.subplot.map;if(r.getSource(this.idSource)&&r.removeSource(this.idSource),this.sourceType=i.sourcetype,this.source=i.source,l(i)){var n=function(o){var a,u=o.sourcetype,p=o.source,c={type:u};return u==="geojson"?a="data":u==="vector"?a=typeof p=="string"?"url":"tiles":u==="raster"?(a="tiles",c.tileSize=256):u==="image"&&(a="url",c.coordinates=o.coordinates),c[a]=p,o.sourceattribution&&(c.attribution=w(o.sourceattribution)),c}(i);r.addSource(this.idSource,n)}},f.findFollowingMapboxLayerId=function(i){if(i==="traces")for(var r=this.subplot.getMapLayers(),n=0;n1)for(M=0;M-1&&u(R.originalEvent,A,[M.xaxis],[M.yaxis],M.id,I),U.indexOf("event")>-1&&l.click(A,R.originalEvent)}}},d.updateFx=function(k){var h=this,M=h.map,A=h.gd;if(!h.isStatic){var C,L=k.dragmode;C=function(R,U){U.isRect?(R.range={})[h.id]=[I([U.xmin,U.ymin]),I([U.xmax,U.ymax])]:(R.lassoPoints={})[h.id]=U.map(I)};var O=h.dragOptions;h.dragOptions=w.extendDeep(O||{},{dragmode:k.dragmode,element:h.div,gd:A,plotinfo:{id:h.id,domain:k[h.id].domain,xaxis:h.xaxis,yaxis:h.yaxis,fillRangeItems:C},xaxes:[h.xaxis],yaxes:[h.yaxis],subplot:h.id}),M.off("click",h.onClickInPanHandler),r(L)||i(L)?(M.dragPan.disable(),M.on("zoomstart",h.clearOutline),h.dragOptions.prepFn=function(R,U,B){n(R,U,B,h.dragOptions,L)},f.init(h.dragOptions)):(M.dragPan.enable(),M.off("zoomstart",h.clearOutline),h.div.onmousedown=null,h.div.ontouchstart=null,h.div.removeEventListener("touchstart",h.div._ontouchstart),h.onClickInPanHandler=h.onClickInPanFn(h.dragOptions),M.on("click",h.onClickInPanHandler))}function I(R){var U=h.map.unproject(R);return[U.lng,U.lat]}},d.updateFramework=function(k){var h=k[this.id].domain,M=k._size,A=this.div.style;A.width=M.w*(h.x[1]-h.x[0])+"px",A.height=M.h*(h.y[1]-h.y[0])+"px",A.left=M.l+h.x[0]*M.w+"px",A.top=M.t+(1-h.y[1])*M.h+"px",this.xaxis._offset=M.l+h.x[0]*M.w,this.xaxis._length=M.w*(h.x[1]-h.x[0]),this.yaxis._offset=M.t+(1-h.y[1])*M.h,this.yaxis._length=M.h*(h.y[1]-h.y[0])},d.updateLayers=function(k){var h,M=k[this.id].layers,A=this.layerList;if(M.length!==A.length){for(h=0;h=j.width-20?(ee["text-anchor"]="start",ee.x=5):(ee["text-anchor"]="end",ee.x=j._paper.attr("width")-7),V.attr(ee);var Q=V.select(".js-link-to-tool"),Y=V.select(".js-link-spacer"),X=V.select(".js-sourcelinks");N._context.showSources&&N._context.showSources(N),N._context.showLink&&function(K,te){te.text("");var ae=te.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(K._context.linkText+" "+String.fromCharCode(187));if(K._context.sendData)ae.on("click",function(){v.sendDataToCloud(K)});else{var oe=window.location.pathname.split("/"),se=window.location.search;ae.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+oe[2].split(".")[0]+"/"+oe[1]+se})}}(N,Q),Y.text(Q.text()&&X.text()?" - ":"")}},v.sendDataToCloud=function(N){var j=(window.PLOTLYENV||{}).BASE_URL||N._context.plotlyServerURL;if(j){N.emit("plotly_beforeexport");var V=_.select(N).append("div").attr("id","hiddenform").style("display","none"),H=V.append("form").attr({action:j+"/external",method:"post",target:"_blank"});return H.append("input").attr({type:"text",name:"data"}).node().value=v.graphJson(N,!1,"keepdata"),H.node().submit(),V.remove(),N.emit("plotly_afterexport"),!1}};var y=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],k=["year","month","dayMonth","dayMonthYear"];function h(N,j){var V=N._context.locale;V||(V="en-US");var H=!1,ee={};function Q(oe){for(var se=!0,fe=0;fe1&&Me.length>1){for(m.getComponentMethod("grid","sizeDefaults")(Y,Q),ee=0;ee15&&Me.length>15&&Q.shapes.length===0&&Q.images.length===0,v.linkSubplots(K,Q,X,H),v.cleanPlot(K,Q,X,H);var Te=!(!H._has||!H._has("gl2d")),Ee=!(!Q._has||!Q._has("gl2d")),Ue=!(!H._has||!H._has("cartesian"))||Te,De=!(!Q._has||!Q._has("cartesian"))||Ee;Ue&&!De?H._bgLayer.remove():De&&!Ue&&(Q._shouldCreateBgLayer=!0),H._zoomlayer&&!N._dragging&&o({_fullLayout:H}),function(Se,Ne){var Ye,Ze=[];Ne.meta&&(Ye=Ne._meta={meta:Ne.meta,layout:{meta:Ne.meta}});for(var st=0;st0){var te=1-2*Y;H=Math.round(te*H),ee=Math.round(te*ee)}}var ae=v.layoutAttributes.width.min,oe=v.layoutAttributes.height.min;H1,fe=!j.height&&Math.abs(V.height-ee)>1;(fe||se)&&(se&&(V.width=H),fe&&(V.height=ee)),N._initialAutoSize||(N._initialAutoSize={width:H,height:ee}),v.sanitizeMargins(V)},v.supplyLayoutModuleDefaults=function(N,j,V,H){var ee,Q,Y,X=m.componentsRegistry,K=j._basePlotModules,te=m.subplotsRegistry.cartesian;for(ee in X)(Y=X[ee]).includeBasePlot&&Y.includeBasePlot(N,j);for(var ae in K.length||K.push(te),j._has("cartesian")&&(m.getComponentMethod("grid","contentDefaults")(N,j),te.finalizeSubplots(N,j)),j._subplots)j._subplots[ae].sort(t.subplotSort);for(Q=0;Q1&&(V.l/=de,V.r/=de)}if(se){var pe=(V.t+V.b)/se;pe>1&&(V.t/=pe,V.b/=pe)}var ye=V.xl!==void 0?V.xl:V.x,Re=V.xr!==void 0?V.xr:V.x,we=V.yt!==void 0?V.yt:V.y,Ae=V.yb!==void 0?V.yb:V.y;fe[j]={l:{val:ye,size:V.l+he},r:{val:Re,size:V.r+he},b:{val:Ae,size:V.b+he},t:{val:we,size:V.t+he}},xe[j]=1}else delete fe[j],delete xe[j];if(!H._replotting)return v.doAutoMargin(N)}},v.doAutoMargin=function(N){var j=N._fullLayout,V=j.width,H=j.height;j._size||(j._size={}),O(j);var ee=j._size,Q=j.margin,Y={t:0,b:0,l:0,r:0},X=t.extendFlat({},ee),K=N._fullLayout._reservedMargin;for(var te in K)for(var ae in K[te]){var oe=K[te][ae];Y[ae]=Math.max(Y[ae],oe)}var se=Q.l,fe=Q.r,xe=Q.t,he=Q.b,de=j._pushmargin,pe=j._pushmarginIds,ye=j.minreducedwidth,Re=j.minreducedheight;if(j.margin.autoexpand!==!1){for(var we in de)pe[we]||delete de[we];for(var Ae in de.base={l:{val:0,size:se},r:{val:1,size:fe},t:{val:1,size:xe},b:{val:0,size:he}},de){var Me=de[Ae].l||{},Ce=de[Ae].b||{},ne=Me.val,ue=Me.size,me=Ce.val,Te=Ce.size,Ee=V-Y.r-Y.l,Ue=H-Y.t-Y.b;for(var De in de){if(T(ue)&&de[De].r){var je=de[De].r.val,ge=de[De].r.size;if(je>ne){var be=(ue*je+(ge-Ee)*ne)/(je-ne),Se=(ge*(1-ne)+(ue-Ee)*(1-je))/(je-ne);be+Se>se+fe&&(se=be,fe=Se)}}if(T(Te)&&de[De].t){var Ne=de[De].t.val,Ye=de[De].t.size;if(Ne>me){var Ze=(Te*Ne+(Ye-Ue)*me)/(Ne-me),st=(Ye*(1-me)+(Te-Ue)*(1-Ne))/(Ne-me);Ze+st>he+xe&&(he=Ze,xe=st)}}}}}var ot=t.constrain(V-Q.l-Q.r,2,ye),ft=t.constrain(H-Q.t-Q.b,2,Re),yt=Math.max(0,V-ot),Et=Math.max(0,H-ft);if(yt){var Tt=(se+fe)/yt;Tt>1&&(se/=Tt,fe/=Tt)}if(Et){var xt=(he+xe)/Et;xt>1&&(he/=xt,xe/=xt)}if(ee.l=Math.round(se)+Y.l,ee.r=Math.round(fe)+Y.r,ee.t=Math.round(xe)+Y.t,ee.b=Math.round(he)+Y.b,ee.p=Math.round(Q.pad),ee.w=Math.round(V)-ee.l-ee.r,ee.h=Math.round(H)-ee.t-ee.b,!j._replotting&&(v.didMarginChange(X,ee)||function(It){if("_redrawFromAutoMarginCount"in It._fullLayout)return!1;var Ft=n.list(It,"",!0);for(var qt in Ft)if(Ft[qt].autoshift||Ft[qt].shift)return!0;return!1}(N))){"_redrawFromAutoMarginCount"in j?j._redrawFromAutoMarginCount++:j._redrawFromAutoMarginCount=1;var Dt=3*(1+Object.keys(pe).length);if(j._redrawFromAutoMarginCount0&&(N._transitioningWithDuration=!0),N._transitionData._interruptCallbacks.push(function(){H=!0}),V.redraw&&N._transitionData._interruptCallbacks.push(function(){return m.call("redraw",N)}),N._transitionData._interruptCallbacks.push(function(){N.emit("plotly_transitioninterrupted",[])});var X=0,K=0;function te(){return X++,function(){var ae;K++,H||K!==X||(ae=Y,N._transitionData&&(function(oe){if(oe)for(;oe.length;)oe.shift()}(N._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(V.redraw)return m.call("redraw",N)}).then(function(){N._transitioning=!1,N._transitioningWithDuration=!1,N.emit("plotly_transitioned",[])}).then(ae)))}}V.runFn(te),setTimeout(te())})}],Q=t.syncOrAsync(ee,N);return Q&&Q.then||(Q=Promise.resolve()),Q.then(function(){return N})}v.didMarginChange=function(N,j){for(var V=0;V1)return!0}return!1},v.graphJson=function(N,j,V,H,ee,Q){(ee&&j&&!N._fullData||ee&&!j&&!N._fullLayout)&&v.supplyDefaults(N);var Y=ee?N._fullData:N.data,X=ee?N._fullLayout:N.layout,K=(N._transitionData||{})._frames;function te(se,fe){if(typeof se=="function")return fe?"_function_":null;if(t.isPlainObject(se)){var xe,he={};return Object.keys(se).sort().forEach(function(de){if(["_","["].indexOf(de.charAt(0))===-1)if(typeof se[de]!="function"){if(V==="keepdata"){if(de.substr(de.length-3)==="src")return}else if(V==="keepstream"){if(typeof(xe=se[de+"src"])=="string"&&xe.indexOf(":")>0&&!t.isPlainObject(se.stream))return}else if(V!=="keepall"&&typeof(xe=se[de+"src"])=="string"&&xe.indexOf(":")>0)return;he[de]=te(se[de],fe)}else fe&&(he[de]="_function")}),he}return Array.isArray(se)?se.map(function(de){return te(de,fe)}):t.isTypedArray(se)?t.simpleMap(se,t.identity):t.isJSDate(se)?t.ms2DateTimeLocal(+se):se}var ae={data:(Y||[]).map(function(se){var fe=te(se);return j&&delete fe.fit,fe})};if(!j&&(ae.layout=te(X),ee)){var oe=X._size;ae.layout.computed={margin:{b:oe.b,l:oe.l,r:oe.r,t:oe.t}}}return K&&(ae.frames=te(K)),Q&&(ae.config=te(N._context,!0)),H==="object"?ae:JSON.stringify(ae)},v.modifyFrames=function(N,j){var V,H,ee,Q=N._transitionData._frames,Y=N._transitionData._frameHash;for(V=0;V=0;Q--)if(Ae[Q].enabled){V._indexToPoints=Ae[Q]._indexToPoints;break}H&&H.calc&&(we=H.calc(N,V))}Array.isArray(we)&&we[0]||(we=[{x:r,y:r}]),we[0].t||(we[0].t={}),we[0].trace=V,te[ye]=we}}for(B(Y,X,K),ee=0;ee1e-10?n:0}function r(n,o,a){o=o||0,a=a||0;for(var u=n.length,p=new Array(u),c=0;c0?c:1/0}),u=_.mod(a+1,o.length);return[o[a],o[u]]},findIntersectionXY:l,findXYatLength:function(n,o,a,u){var p=-o*a,c=o*o+1,b=2*(o*p-a),d=p*p+a*a-n*n,v=Math.sqrt(b*b-4*c*d),x=(-b+v)/(2*c),g=(-b-v)/(2*c);return[[x,o*x+p+u],[g,o*g+p+u]]},clampTiny:i,pathPolygon:function(n,o,a,u,p,c){return"M"+r(t(n,o,a,u),p,c).join("L")},pathPolygonAnnulus:function(n,o,a,u,p,c,b){var d,v;n=90||Tt>90&&xt>=450?1:It<=0&&qt<=0?0:Math.max(It,qt),[Tt<=180&&xt>=180||Tt>180&&xt>=540?-1:Dt>=0&&Ft>=0?0:Math.min(Dt,Ft),Tt<=270&&xt>=270||Tt>270&&xt>=630?-1:It>=0&&qt>=0?0:Math.min(It,qt),xt>=360?1:Dt<=0&&Ft<=0?0:Math.max(Dt,Ft),ft]}(pe),ne=Ce[2]-Ce[0],ue=Ce[3]-Ce[1],me=de/he,Te=Math.abs(ue/ne);me>Te?(ye=he,Me=(de-(Re=he*Te))/ae.h/2,we=[fe[0],fe[1]],Ae=[xe[0]+Me,xe[1]-Me]):(Re=de,Me=(he-(ye=de/Te))/ae.w/2,we=[fe[0]+Me,fe[1]-Me],Ae=[xe[0],xe[1]]),K.xLength2=ye,K.yLength2=Re,K.xDomain2=we,K.yDomain2=Ae;var Ee,Ue=K.xOffset2=ae.l+ae.w*we[0],De=K.yOffset2=ae.t+ae.h*(1-Ae[1]),je=K.radius=ye/ne,ge=K.innerRadius=K.getHole(X)*je,be=K.cx=Ue-je*Ce[0],Se=K.cy=De+je*Ce[3],Ne=K.cxx=be-Ue,Ye=K.cyy=Se-De,Ze=oe.side;Ze==="counterclockwise"?(Ee=Ze,Ze="top"):Ze==="clockwise"&&(Ee=Ze,Ze="bottom"),K.radialAxis=K.mockAxis(Y,X,oe,{_id:"x",side:Ze,_trueSide:Ee,domain:[ge/ae.w,je/ae.w]}),K.angularAxis=K.mockAxis(Y,X,se,{side:"right",domain:[0,Math.PI],autorange:!1}),K.doAutoRange(Y,X),K.updateAngularAxis(Y,X),K.updateRadialAxis(Y,X),K.updateRadialAxisTitle(Y,X),K.xaxis=K.mockCartesianAxis(Y,X,{_id:"x",domain:we}),K.yaxis=K.mockCartesianAxis(Y,X,{_id:"y",domain:Ae});var st=K.pathSubplot();K.clipPaths.forTraces.select("path").attr("d",st).attr("transform",f(Ne,Ye)),te.frontplot.attr("transform",f(Ue,De)).call(t.setClipUrl,K._hasClipOnAxisFalse?null:K.clipIds.forTraces,K.gd),te.bg.attr("d",st).attr("transform",f(be,Se)).call(l.fill,X.bgcolor)},V.mockAxis=function(Y,X,K,te){var ae=T.extendFlat({},K,te);return o(ae,X,Y),ae},V.mockCartesianAxis=function(Y,X,K){var te=this,ae=te.isSmith,oe=K._id,se=T.extendFlat({type:"linear"},K);n(se,Y);var fe={x:[0,2],y:[1,3]};return se.setRange=function(){var xe=te.sectorBBox,he=fe[oe],de=te.radialAxis._rl,pe=(de[1]-de[0])/(1-te.getHole(X));se.range=[xe[he[0]]*pe,xe[he[1]]*pe]},se.isPtWithinRange=oe!=="x"||ae?function(){return!0}:function(xe){return te.isPtInside(xe)},se.setRange(),se.setScale(),se},V.doAutoRange=function(Y,X){var K=this,te=K.gd,ae=K.radialAxis,oe=K.getRadial(X);a(te,ae);var se=ae.range;oe.range=se.slice(),oe._input.range=se.slice(),ae._rl=[ae.r2l(se[0],null,"gregorian"),ae.r2l(se[1],null,"gregorian")]},V.updateRadialAxis=function(Y,X){var K=this,te=K.gd,ae=K.layers,oe=K.radius,se=K.innerRadius,fe=K.cx,xe=K.cy,he=K.getRadial(X),de=B(K.getSector(X)[0],360),pe=K.radialAxis,ye=se90&&de<=270&&(pe.tickangle=180);var we=Re?function(De){var je=R(K,L([De.x,0]));return f(je[0]-fe,je[1]-xe)}:function(De){return f(pe.l2p(De.x)+se,0)},Ae=Re?function(De){return I(K,De.x,-1/0,1/0)}:function(De){return K.pathArc(pe.r2p(De.x)+se)},Me=H(he);if(K.radialTickLayout!==Me&&(ae["radial-axis"].selectAll(".xtick").remove(),K.radialTickLayout=Me),ye){pe.setScale();var Ce=0,ne=Re?(pe.tickvals||[]).filter(function(De){return De>=0}).map(function(De){return r.tickText(pe,De,!0,!1)}):r.calcTicks(pe),ue=Re?ne:r.clipEnds(pe,ne),me=r.getTickSigns(pe)[2];Re&&((pe.ticks==="top"&&pe.side==="bottom"||pe.ticks==="bottom"&&pe.side==="top")&&(me=-me),pe.ticks==="top"&&pe.side==="top"&&(Ce=-pe.ticklen),pe.ticks==="bottom"&&pe.side==="bottom"&&(Ce=pe.ticklen)),r.drawTicks(te,pe,{vals:ne,layer:ae["radial-axis"],path:r.makeTickPath(pe,0,me),transFn:we,crisp:!1}),r.drawGrid(te,pe,{vals:ue,layer:ae["radial-grid"],path:Ae,transFn:T.noop,crisp:!1}),r.drawLabels(te,pe,{vals:ne,layer:ae["radial-axis"],transFn:we,labelFns:r.makeLabelFns(pe,Ce)})}var Te=K.radialAxisAngle=K.vangles?N(ee(G(he.angle),K.vangles)):he.angle,Ee=f(fe,xe),Ue=Ee+m(-Te);Q(ae["radial-axis"],ye&&(he.showticklabels||he.ticks),{transform:Ue}),Q(ae["radial-grid"],ye&&he.showgrid,{transform:Re?"":Ee}),Q(ae["radial-line"].select("line"),ye&&he.showline,{x1:Re?-oe:se,y1:0,x2:oe,y2:0,transform:Ue}).attr("stroke-width",he.linewidth).call(l.stroke,he.linecolor)},V.updateRadialAxisTitle=function(Y,X,K){if(!this.isSmith){var te=this,ae=te.gd,oe=te.radius,se=te.cx,fe=te.cy,xe=te.getRadial(X),he=te.id+"title",de=0;if(xe.title){var pe=t.bBox(te.layers["radial-axis"].node()).height,ye=xe.title.font.size,Re=xe.side;de=Re==="top"?ye:Re==="counterclockwise"?-(pe+.4*ye):pe+.8*ye}var we=K!==void 0?K:te.radialAxisAngle,Ae=G(we),Me=Math.cos(Ae),Ce=Math.sin(Ae),ne=se+oe/2*Me+de*Ce,ue=fe-oe/2*Ce+de*Me;te.layers["radial-axis-title"]=b.draw(ae,he,{propContainer:xe,propName:te.id+".radialaxis.title",placeholder:U(ae,"Click to enter radial axis title"),attributes:{x:ne,y:ue,"text-anchor":"middle"},transform:{rotate:-we}})}},V.updateAngularAxis=function(Y,X){var K=this,te=K.gd,ae=K.layers,oe=K.radius,se=K.innerRadius,fe=K.cx,xe=K.cy,he=K.getAngular(X),de=K.angularAxis,pe=K.isSmith;pe||(K.fillViewInitialKey("angularaxis.rotation",he.rotation),de.setGeometry(),de.setScale());var ye=pe?function(De){var je=R(K,L([0,De.x]));return Math.atan2(je[0]-fe,je[1]-xe)-Math.PI/2}:function(De){return de.t2g(De.x)};de.type==="linear"&&de.thetaunit==="radians"&&(de.tick0=N(de.tick0),de.dtick=N(de.dtick));var Re=function(De){return f(fe+oe*Math.cos(De),xe-oe*Math.sin(De))},we=pe?function(De){var je=R(K,L([0,De.x]));return f(je[0],je[1])}:function(De){return Re(ye(De))},Ae=pe?function(De){var je=R(K,L([0,De.x])),ge=Math.atan2(je[0]-fe,je[1]-xe)-Math.PI/2;return f(je[0],je[1])+m(-N(ge))}:function(De){var je=ye(De);return Re(je)+m(-N(je))},Me=pe?function(De){return O(K,De.x,0,1/0)}:function(De){var je=ye(De),ge=Math.cos(je),be=Math.sin(je);return"M"+[fe+se*ge,xe-se*be]+"L"+[fe+oe*ge,xe-oe*be]},Ce=r.makeLabelFns(de,0).labelStandoff,ne={xFn:function(De){var je=ye(De);return Math.cos(je)*Ce},yFn:function(De){var je=ye(De),ge=Math.sin(je)>0?.2:1;return-Math.sin(je)*(Ce+De.fontSize*ge)+Math.abs(Math.cos(je))*(De.fontSize*h)},anchorFn:function(De){var je=ye(De),ge=Math.cos(je);return Math.abs(ge)<.1?"middle":ge>0?"start":"end"},heightFn:function(De,je,ge){var be=ye(De);return-.5*(1+Math.sin(be))*ge}},ue=H(he);K.angularTickLayout!==ue&&(ae["angular-axis"].selectAll("."+de._id+"tick").remove(),K.angularTickLayout=ue);var me,Te=pe?[1/0].concat(de.tickvals||[]).map(function(De){return r.tickText(de,De,!0,!1)}):r.calcTicks(de);if(pe&&(Te[0].text="∞",Te[0].fontSize*=1.75),X.gridshape==="linear"?(me=Te.map(ye),T.angleDelta(me[0],me[1])<0&&(me=me.slice().reverse())):me=null,K.vangles=me,de.type==="category"&&(Te=Te.filter(function(De){return T.isAngleInsideSector(ye(De),K.sectorInRad)})),de.visible){var Ee=de.ticks==="inside"?-1:1,Ue=(de.linewidth||1)/2;r.drawTicks(te,de,{vals:Te,layer:ae["angular-axis"],path:"M"+Ee*Ue+",0h"+Ee*de.ticklen,transFn:Ae,crisp:!1}),r.drawGrid(te,de,{vals:Te,layer:ae["angular-grid"],path:Me,transFn:T.noop,crisp:!1}),r.drawLabels(te,de,{vals:Te,layer:ae["angular-axis"],repositionOnUpdate:!0,transFn:we,labelFns:ne})}Q(ae["angular-line"].select("path"),he.showline,{d:K.pathSubplot(),transform:f(fe,xe)}).attr("stroke-width",he.linewidth).call(l.stroke,he.linecolor)},V.updateFx=function(Y,X){this.gd._context.staticPlot||(!this.isSmith&&(this.updateAngularDrag(Y),this.updateRadialDrag(Y,X,0),this.updateRadialDrag(Y,X,1)),this.updateHoverAndMainDrag(Y))},V.updateHoverAndMainDrag=function(Y){var X,K,te=this,ae=te.isSmith,oe=te.gd,se=te.layers,fe=Y._zoomlayer,xe=M.MINZOOM,he=M.OFFEDGE,de=te.radius,pe=te.innerRadius,ye=te.cx,Re=te.cy,we=te.cxx,Ae=te.cyy,Me=te.sectorInRad,Ce=te.vangles,ne=te.radialAxis,ue=A.clampTiny,me=A.findXYatLength,Te=A.findEnclosingVertexAngles,Ee=M.cornerHalfWidth,Ue=M.cornerLen/2,De=u.makeDragger(se,"path","maindrag",Y.dragmode===!1?"none":"crosshair");_.select(De).attr("d",te.pathSubplot()).attr("transform",f(ye,Re)),De.onmousemove=function(Oe){c.hover(oe,Oe,te.id),oe._fullLayout._lasthover=De,oe._fullLayout._hoversubplot=te.id},De.onmouseout=function(Oe){oe._dragging||p.unhover(oe,Oe)};var je,ge,be,Se,Ne,Ye,Ze,st,ot,ft={element:De,gd:oe,subplot:te.id,plotinfo:{id:te.id,xaxis:te.xaxis,yaxis:te.yaxis},xaxes:[te.xaxis],yaxes:[te.yaxis]};function yt(Oe,Be){return Math.sqrt(Oe*Oe+Be*Be)}function Et(Oe,Be){return yt(Oe-we,Be-Ae)}function Tt(Oe,Be){return Math.atan2(Ae-Be,Oe-we)}function xt(Oe,Be){return[Oe*Math.cos(Be),Oe*Math.sin(-Be)]}function Dt(Oe,Be){if(Oe===0)return te.pathSector(2*Ee);var Qe=Ue/Oe,ut=Be-Qe,pt=Be+Qe,bt=Math.max(0,Math.min(Oe,de)),Lt=bt-Ee,Ct=bt+Ee;return"M"+xt(Lt,ut)+"A"+[Lt,Lt]+" 0,0,0 "+xt(Lt,pt)+"L"+xt(Ct,pt)+"A"+[Ct,Ct]+" 0,0,1 "+xt(Ct,ut)+"Z"}function It(Oe,Be,Qe){if(Oe===0)return te.pathSector(2*Ee);var ut,pt,bt=xt(Oe,Be),Lt=xt(Oe,Qe),Ct=ue((bt[0]+Lt[0])/2),mt=ue((bt[1]+Lt[1])/2);if(Ct&&mt){var Ot=mt/Ct,_t=-1/Ot,Pt=me(Ee,Ot,Ct,mt);ut=me(Ue,_t,Pt[0][0],Pt[0][1]),pt=me(Ue,_t,Pt[1][0],Pt[1][1])}else{var Bt,Wt;mt?(Bt=Ue,Wt=Ee):(Bt=Ee,Wt=Ue),ut=[[Ct-Bt,mt-Wt],[Ct+Bt,mt-Wt]],pt=[[Ct-Bt,mt+Wt],[Ct+Bt,mt+Wt]]}return"M"+ut.join("L")+"L"+pt.reverse().join("L")+"Z"}function Ft(Oe,Be){return Be=Math.max(Math.min(Be,de),pe),Oexe?(Oe-1&&Oe===1&&v(Be,oe,[te.xaxis],[te.yaxis],te.id,ft),Qe.indexOf("event")>-1&&c.click(oe,Be,te.id)}ft.prepFn=function(Oe,Be,Qe){var ut=oe._fullLayout.dragmode,pt=De.getBoundingClientRect();oe._fullLayout._calcInverseTransform(oe);var bt=oe._fullLayout._invTransform;X=oe._fullLayout._invScaleX,K=oe._fullLayout._invScaleY;var Lt=T.apply3DTransform(bt)(Be-pt.left,Qe-pt.top);if(je=Lt[0],ge=Lt[1],Ce){var Ct=A.findPolygonOffset(de,Me[0],Me[1],Ce);je+=we+Ct[0],ge+=Ae+Ct[1]}switch(ut){case"zoom":ft.clickFn=ht,ae||(ft.moveFn=Ce?Ke:Nt,ft.doneFn=Ge,function(){be=null,Se=null,Ne=te.pathSubplot(),Ye=!1;var mt=oe._fullLayout[te.id];Ze=w(mt.bgcolor).getLuminance(),(st=u.makeZoombox(fe,Ze,ye,Re,Ne)).attr("fill-rule","evenodd"),ot=u.makeCorners(fe,ye,Re),x(oe)}());break;case"select":case"lasso":d(Oe,Be,Qe,ft,ut)}},p.init(ft)},V.updateRadialDrag=function(Y,X,K){var te=this,ae=te.gd,oe=te.layers,se=te.radius,fe=te.innerRadius,xe=te.cx,he=te.cy,de=te.radialAxis,pe=M.radialDragBoxSize,ye=pe/2;if(de.visible){var Re,we,Ae,Me=G(te.radialAxisAngle),Ce=de._rl,ne=Ce[0],ue=Ce[1],me=Ce[K],Te=.75*(Ce[1]-Ce[0])/(1-te.getHole(X))/se;K?(Re=xe+(se+ye)*Math.cos(Me),we=he-(se+ye)*Math.sin(Me),Ae="radialdrag"):(Re=xe+(fe-ye)*Math.cos(Me),we=he-(fe-ye)*Math.sin(Me),Ae="radialdrag-inner");var Ee,Ue,De,je=u.makeRectDragger(oe,Ae,"crosshair",-ye,-ye,pe,pe),ge={element:je,gd:ae};Y.dragmode===!1&&(ge.dragmode=!1),Q(_.select(je),de.visible&&fe0==(K?De>ne:Deo?function(b){return b<=0}:function(b){return b>=0};t.c2g=function(b){var d=t.c2l(b)-n;return(c(d)?d:0)+p},t.g2c=function(b){return t.l2c(b+n-p)},t.g2p=function(b){return b*u},t.c2p=function(b){return t.g2p(t.c2g(b))}}})(m,f);break;case"angularaxis":(function(t,i){var r=t.type;if(r==="linear"){var n=t.d2c,o=t.c2d;t.d2c=function(a,u){return function(p,c){return c==="degrees"?s(p):p}(n(a),u)},t.c2d=function(a,u){return o(function(p,c){return c==="degrees"?T(p):p}(a,u))}}t.makeCalcdata=function(a,u){var p,c,b=a[u],d=a._length,v=function(h){return t.d2c(h,a.thetaunit)};if(b){if(_.isTypedArray(b)&&r==="linear"){if(d===b.length)return b;if(b.subarray)return b.subarray(0,d)}for(p=new Array(d),c=0;c0?1:0}function e(s){var T=s[0],m=s[1];if(!isFinite(T)||!isFinite(m))return[1,0];var f=(T+1)*(T+1)+m*m;return[(T*T+m*m-1)/f,2*m/f]}function _(s,T){var m=T[0],f=T[1];return[m*s.radius+s.cx,-f*s.radius+s.cy]}function w(s,T){return T*s.radius}D.exports={smith:e,reactanceArc:function(s,T,m,f){var l=_(s,e([m,T])),t=l[0],i=l[1],r=_(s,e([f,T])),n=r[0],o=r[1];if(T===0)return["M"+t+","+i,"L"+n+","+o].join(" ");var a=w(s,1/Math.abs(T));return["M"+t+","+i,"A"+a+","+a+" 0 0,"+(T<0?1:0)+" "+n+","+o].join(" ")},resistanceArc:function(s,T,m,f){var l=w(s,1/(T+1)),t=_(s,e([T,m])),i=t[0],r=t[1],n=_(s,e([T,f])),o=n[0],a=n[1];if(E(m)!==E(f)){var u=_(s,e([T,0]));return["M"+i+","+r,"A"+l+","+l+" 0 0,"+(00){for(var f=[],l=0;l=y&&(h.min=0,M.min=0,A.min=0,u.aaxis&&delete u.aaxis.min,u.baxis&&delete u.baxis.min,u.caxis&&delete u.caxis.min)}function a(u,p,c,b){var d=r[p._name];function v(M,A){return s.coerce(u,p,d,M,A)}v("uirevision",b.uirevision),p.type="linear";var x=v("color"),g=x!==d.color.dflt?x:c.font.color,y=p._name.charAt(0).toUpperCase(),k="Component "+y,h=v("title.text",k);p._hovertitle=h===k?h:y,s.coerceFont(v,"title.font",{family:c.font.family,size:s.bigFont(c.font.size),color:g}),v("min"),t(u,p,v,"linear"),f(u,p,v,"linear"),m(u,p,v,"linear"),l(u,p,v,{outerTicks:!0}),v("showticklabels")&&(s.coerceFont(v,"tickfont",{family:c.font.family,size:c.font.size,color:g}),v("tickangle"),v("tickformat")),i(u,p,v,{dfltColor:x,bgColor:c.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:d}),v("hoverformat"),v("layer")}D.exports=function(u,p,c){T(u,p,c,{type:"ternary",attributes:r,handleDefaults:o,font:p.font,paper_bgcolor:p.paper_bgcolor})}},64380:function(D,E,e){var _=e(39898),w=e(84267),s=e(73972),T=e(71828),m=T.strTranslate,f=T._,l=e(7901),t=e(91424),i=e(21994),r=e(1426).extendFlat,n=e(74875),o=e(89298),a=e(28569),u=e(30211),p=e(64505),c=p.freeMode,b=p.rectMode,d=e(92998),v=e(47322).prepSelect,x=e(47322).selectOnClick,g=e(47322).clearOutline,y=e(47322).clearSelectionsCache,k=e(85555);function h(B,G){this.id=B.id,this.graphDiv=B.graphDiv,this.init(G),this.makeFramework(G),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}D.exports=h;var M=h.prototype;M.init=function(B){this.container=B._ternarylayer,this.defs=B._defs,this.layoutId=B._uid,this.traceHash={},this.layers={}},M.plot=function(B,G){var N=this,j=G[N.id],V=G._size;N._hasClipOnAxisFalse=!1;for(var H=0;HA*fe?V=(H=fe)*A:H=(V=se)/A,ee=ae*V/se,Q=oe*H/fe,N=G.l+G.w*K-V/2,j=G.t+G.h*(1-te)-H/2,Y.x0=N,Y.y0=j,Y.w=V,Y.h=H,Y.sum=xe,Y.xaxis={type:"linear",range:[he+2*pe-xe,xe-he-2*de],domain:[K-ee/2,K+ee/2],_id:"x"},i(Y.xaxis,Y.graphDiv._fullLayout),Y.xaxis.setScale(),Y.xaxis.isPtWithinRange=function(Ee){return Ee.a>=Y.aaxis.range[0]&&Ee.a<=Y.aaxis.range[1]&&Ee.b>=Y.baxis.range[1]&&Ee.b<=Y.baxis.range[0]&&Ee.c>=Y.caxis.range[1]&&Ee.c<=Y.caxis.range[0]},Y.yaxis={type:"linear",range:[he,xe-de-pe],domain:[te-Q/2,te+Q/2],_id:"y"},i(Y.yaxis,Y.graphDiv._fullLayout),Y.yaxis.setScale(),Y.yaxis.isPtWithinRange=function(){return!0};var ye=Y.yaxis.domain[0],Re=Y.aaxis=r({},B.aaxis,{range:[he,xe-de-pe],side:"left",tickangle:(+B.aaxis.tickangle||0)-30,domain:[ye,ye+Q*A],anchor:"free",position:0,_id:"y",_length:V});i(Re,Y.graphDiv._fullLayout),Re.setScale();var we=Y.baxis=r({},B.baxis,{range:[xe-he-pe,de],side:"bottom",domain:Y.xaxis.domain,anchor:"free",position:0,_id:"x",_length:V});i(we,Y.graphDiv._fullLayout),we.setScale();var Ae=Y.caxis=r({},B.caxis,{range:[xe-he-de,pe],side:"right",tickangle:(+B.caxis.tickangle||0)+30,domain:[ye,ye+Q*A],anchor:"free",position:0,_id:"y",_length:V});i(Ae,Y.graphDiv._fullLayout),Ae.setScale();var Me="M"+N+","+(j+H)+"h"+V+"l-"+V/2+",-"+H+"Z";Y.clipDef.select("path").attr("d",Me),Y.layers.plotbg.select("path").attr("d",Me);var Ce="M0,"+H+"h"+V+"l-"+V/2+",-"+H+"Z";Y.clipDefRelative.select("path").attr("d",Ce);var ne=m(N,j);Y.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",ne),Y.clipDefRelative.select("path").attr("transform",null);var ue=m(N-we._offset,j+H);Y.layers.baxis.attr("transform",ue),Y.layers.bgrid.attr("transform",ue);var me=m(N+V/2,j)+"rotate(30)"+m(0,-Re._offset);Y.layers.aaxis.attr("transform",me),Y.layers.agrid.attr("transform",me);var Te=m(N+V/2,j)+"rotate(-30)"+m(0,-Ae._offset);Y.layers.caxis.attr("transform",Te),Y.layers.cgrid.attr("transform",Te),Y.drawAxes(!0),Y.layers.aline.select("path").attr("d",Re.showline?"M"+N+","+(j+H)+"l"+V/2+",-"+H:"M0,0").call(l.stroke,Re.linecolor||"#000").style("stroke-width",(Re.linewidth||0)+"px"),Y.layers.bline.select("path").attr("d",we.showline?"M"+N+","+(j+H)+"h"+V:"M0,0").call(l.stroke,we.linecolor||"#000").style("stroke-width",(we.linewidth||0)+"px"),Y.layers.cline.select("path").attr("d",Ae.showline?"M"+(N+V/2)+","+j+"l"+V/2+","+H:"M0,0").call(l.stroke,Ae.linecolor||"#000").style("stroke-width",(Ae.linewidth||0)+"px"),Y.graphDiv._context.staticPlot||Y.initInteractions(),t.setClipUrl(Y.layers.frontplot,Y._hasClipOnAxisFalse?null:Y.clipId,Y.graphDiv)},M.drawAxes=function(B){var G=this,N=G.graphDiv,j=G.id.substr(7)+"title",V=G.layers,H=G.aaxis,ee=G.baxis,Q=G.caxis;if(G.drawAx(H),G.drawAx(ee),G.drawAx(Q),B){var Y=Math.max(H.showticklabels?H.tickfont.size/2:0,(Q.showticklabels?.75*Q.tickfont.size:0)+(Q.ticks==="outside"?.87*Q.ticklen:0)),X=(ee.showticklabels?ee.tickfont.size:0)+(ee.ticks==="outside"?ee.ticklen:0)+3;V["a-title"]=d.draw(N,"a"+j,{propContainer:H,propName:G.id+".aaxis.title",placeholder:f(N,"Click to enter Component A title"),attributes:{x:G.x0+G.w/2,y:G.y0-H.title.font.size/3-Y,"text-anchor":"middle"}}),V["b-title"]=d.draw(N,"b"+j,{propContainer:ee,propName:G.id+".baxis.title",placeholder:f(N,"Click to enter Component B title"),attributes:{x:G.x0-X,y:G.y0+G.h+.83*ee.title.font.size+X,"text-anchor":"middle"}}),V["c-title"]=d.draw(N,"c"+j,{propContainer:Q,propName:G.id+".caxis.title",placeholder:f(N,"Click to enter Component C title"),attributes:{x:G.x0+G.w+X,y:G.y0+G.h+.83*Q.title.font.size+X,"text-anchor":"middle"}})}},M.drawAx=function(B){var G,N=this,j=N.graphDiv,V=B._name,H=V.charAt(0),ee=B._id,Q=N.layers[V],Y=H+"tickLayout",X=(G=B).ticks+String(G.ticklen)+String(G.showticklabels);N[Y]!==X&&(Q.selectAll("."+ee+"tick").remove(),N[Y]=X),B.setScale();var K=o.calcTicks(B),te=o.clipEnds(B,K),ae=o.makeTransTickFn(B),oe=o.getTickSigns(B)[2],se=T.deg2rad(30),fe=oe*(B.linewidth||1)/2,xe=oe*B.ticklen,he=N.w,de=N.h,pe=H==="b"?"M0,"+fe+"l"+Math.sin(se)*xe+","+Math.cos(se)*xe:"M"+fe+",0l"+Math.cos(se)*xe+","+-Math.sin(se)*xe,ye={a:"M0,0l"+de+",-"+he/2,b:"M0,0l-"+he/2+",-"+de,c:"M0,0l-"+de+","+he/2}[H];o.drawTicks(j,B,{vals:B.ticks==="inside"?te:K,layer:Q,path:pe,transFn:ae,crisp:!1}),o.drawGrid(j,B,{vals:te,layer:N.layers[H+"grid"],path:ye,transFn:ae,crisp:!1}),o.drawLabels(j,B,{vals:K,layer:Q,transFn:ae,labelFns:o.makeLabelFns(B,0,30)})};var C=k.MINZOOM/2+.87,L="m-0.87,.5h"+C+"v3h-"+(C+5.2)+"l"+(C/2+2.6)+",-"+(.87*C+4.5)+"l2.6,1.5l-"+C/2+","+.87*C+"Z",O="m0.87,.5h-"+C+"v3h"+(C+5.2)+"l-"+(C/2+2.6)+",-"+(.87*C+4.5)+"l-2.6,1.5l"+C/2+","+.87*C+"Z",I="m0,1l"+C/2+","+.87*C+"l2.6,-1.5l-"+(C/2+2.6)+",-"+(.87*C+4.5)+"l-"+(C/2+2.6)+","+(.87*C+4.5)+"l2.6,1.5l"+C/2+",-"+.87*C+"Z",R=!0;function U(B){_.select(B).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}M.clearOutline=function(){y(this.dragOptions),g(this.dragOptions.gd)},M.initInteractions=function(){var B,G,N,j,V,H,ee,Q,Y,X,K,te,ae=this,oe=ae.layers.plotbg.select("path").node(),se=ae.graphDiv,fe=se._fullLayout._zoomlayer;function xe(Ce){var ne={};return ne[ae.id+".aaxis.min"]=Ce.a,ne[ae.id+".baxis.min"]=Ce.b,ne[ae.id+".caxis.min"]=Ce.c,ne}function he(Ce,ne){var ue=se._fullLayout.clickmode;U(se),Ce===2&&(se.emit("plotly_doubleclick",null),s.call("_guiRelayout",se,xe({a:0,b:0,c:0}))),ue.indexOf("select")>-1&&Ce===1&&x(ne,se,[ae.xaxis],[ae.yaxis],ae.id,ae.dragOptions),ue.indexOf("event")>-1&&u.click(se,ne,ae.id)}function de(Ce,ne){return 1-ne/ae.h}function pe(Ce,ne){return 1-(Ce+(ae.h-ne)/Math.sqrt(3))/ae.w}function ye(Ce,ne){return(Ce-(ae.h-ne)/Math.sqrt(3))/ae.w}function Re(Ce,ne){var ue=N+Ce*B,me=j+ne*G,Te=Math.max(0,Math.min(1,de(0,j),de(0,me))),Ee=Math.max(0,Math.min(1,pe(N,j),pe(ue,me))),Ue=Math.max(0,Math.min(1,ye(N,j),ye(ue,me))),De=(Te/2+Ue)*ae.w,je=(1-Te/2-Ee)*ae.w,ge=(De+je)/2,be=je-De,Se=(1-Te)*ae.h,Ne=Se-be/A;be.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),te.transition().style("opacity",1).duration(200),X=!0),se.emit("plotly_relayouting",xe(ee))}function we(){U(se),ee!==V&&(s.call("_guiRelayout",se,xe(ee)),R&&se.data&&se._context.showTips&&(T.notifier(f(se,"Double-click to zoom back out"),"long"),R=!1))}function Ae(Ce,ne){var ue=Ce/ae.xaxis._m,me=ne/ae.yaxis._m,Te=[(ee={a:V.a-me,b:V.b+(ue+me)/2,c:V.c-(ue-me)/2}).a,ee.b,ee.c].sort(T.sorterAsc),Ee=Te.indexOf(ee.a),Ue=Te.indexOf(ee.b),De=Te.indexOf(ee.c);Te[0]<0&&(Te[1]+Te[0]/2<0?(Te[2]+=Te[0]+Te[1],Te[0]=Te[1]=0):(Te[2]+=Te[0]/2,Te[1]+=Te[0]/2,Te[0]=0),ee={a:Te[Ee],b:Te[Ue],c:Te[De]},ne=(V.a-ee.a)*ae.yaxis._m,Ce=(V.c-ee.c-V.b+ee.b)*ae.xaxis._m);var je=m(ae.x0+Ce,ae.y0+ne);ae.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",je);var ge=m(-Ce,-ne);ae.clipDefRelative.select("path").attr("transform",ge),ae.aaxis.range=[ee.a,ae.sum-ee.b-ee.c],ae.baxis.range=[ae.sum-ee.a-ee.c,ee.b],ae.caxis.range=[ae.sum-ee.a-ee.b,ee.c],ae.drawAxes(!1),ae._hasClipOnAxisFalse&&ae.plotContainer.select(".scatterlayer").selectAll(".trace").call(t.hideOutsideRangePoints,ae),se.emit("plotly_relayouting",xe(ee))}function Me(){s.call("_guiRelayout",se,xe(ee))}this.dragOptions={element:oe,gd:se,plotinfo:{id:ae.id,domain:se._fullLayout[ae.id].domain,xaxis:ae.xaxis,yaxis:ae.yaxis},subplot:ae.id,prepFn:function(Ce,ne,ue){ae.dragOptions.xaxes=[ae.xaxis],ae.dragOptions.yaxes=[ae.yaxis],B=se._fullLayout._invScaleX,G=se._fullLayout._invScaleY;var me=ae.dragOptions.dragmode=se._fullLayout.dragmode;c(me)?ae.dragOptions.minDrag=1:ae.dragOptions.minDrag=void 0,me==="zoom"?(ae.dragOptions.moveFn=Re,ae.dragOptions.clickFn=he,ae.dragOptions.doneFn=we,function(Te,Ee,Ue){var De=oe.getBoundingClientRect();N=Ee-De.left,j=Ue-De.top,se._fullLayout._calcInverseTransform(se);var je=se._fullLayout._invTransform,ge=T.apply3DTransform(je)(N,j);N=ge[0],j=ge[1],V={a:ae.aaxis.range[0],b:ae.baxis.range[1],c:ae.caxis.range[1]},ee=V,H=ae.aaxis.range[1]-V.a,Q=w(ae.graphDiv._fullLayout[ae.id].bgcolor).getLuminance(),Y="M0,"+ae.h+"L"+ae.w/2+", 0L"+ae.w+","+ae.h+"Z",X=!1,K=fe.append("path").attr("class","zoombox").attr("transform",m(ae.x0,ae.y0)).style({fill:Q>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",Y),te=fe.append("path").attr("class","zoombox-corners").attr("transform",m(ae.x0,ae.y0)).style({fill:l.background,stroke:l.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),ae.clearOutline(se)}(0,ne,ue)):me==="pan"?(ae.dragOptions.moveFn=Ae,ae.dragOptions.clickFn=he,ae.dragOptions.doneFn=Me,V={a:ae.aaxis.range[0],b:ae.baxis.range[1],c:ae.caxis.range[1]},ee=V,ae.clearOutline(se)):(b(me)||c(me))&&v(Ce,ne,ue,ae.dragOptions,me)}},oe.onmousemove=function(Ce){u.hover(se,Ce,ae.id),se._fullLayout._lasthover=oe,se._fullLayout._hoversubplot=ae.id},oe.onmouseout=function(Ce){se._dragging||a.unhover(se,Ce)},a.init(this.dragOptions)}},73972:function(D,E,e){var _=e(47769),w=e(64213),s=e(75138),T=e(41965),m=e(24401).addStyleRule,f=e(1426),l=e(9012),t=e(10820),i=f.extendFlat,r=f.extendDeepAll;function n(x){var g=x.name,y=x.categories,k=x.meta;if(E.modules[g])_.log("Type "+g+" already registered");else{E.subplotsRegistry[x.basePlotModule.name]||function(R){var U=R.name;if(E.subplotsRegistry[U])_.log("Plot type "+U+" already registered.");else for(var B in p(R),E.subplotsRegistry[U]=R,E.componentsRegistry)d(B,R.name)}(x.basePlotModule);for(var h={},M=0;M-1&&(a[p[t]].title={text:""});for(t=0;t")!==-1?"":M.html(C).text()});return M.remove(),A}(k)).replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(t,"'"),w.isIE()&&(k=(k=(k=k.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),k}},75341:function(D,E,e){var _=e(71828);D.exports=function(w,s){for(var T=0;TA+h||!_(M))}for(var L=0;Lt))return m}return f!==void 0?f:T.dflt},E.coerceColor=function(T,m,f){return w(m).isValid()?m:f!==void 0?f:T.dflt},E.coerceEnumerated=function(T,m,f){return T.coerceNumber&&(m=+m),T.values.indexOf(m)!==-1?m:f!==void 0?f:T.dflt},E.getValue=function(T,m){var f;return Array.isArray(T)?m0?xe+=he:c<0&&(xe-=he)}return xe}function Q(fe){var xe=c,he=fe.b,de=ee(fe);return _.inbox(he-xe,de-xe,C+(de-xe)/(de-he)-1)}var Y=r[b+"a"],X=r[d+"a"];g=Math.abs(Y.r2c(Y.range[1])-Y.r2c(Y.range[0]));var K=_.getDistanceFunction(a,v,x,function(fe){return(v(fe)+x(fe))/2});if(_.getClosest(y,K,r),r.index!==!1&&y[r.index].p!==l){I||(N=function(fe){return Math.min(R(fe),fe.p-h.bargroupwidth/2)},j=function(fe){return Math.max(U(fe),fe.p+h.bargroupwidth/2)});var te=y[r.index],ae=k.base?te.b+te.s:te.s;r[d+"0"]=r[d+"1"]=X.c2p(te[d],!0),r[d+"LabelVal"]=ae;var oe=h.extents[h.extents.round(te.p)];r[b+"0"]=Y.c2p(M?N(te):oe[0],!0),r[b+"1"]=Y.c2p(M?j(te):oe[1],!0);var se=te.orig_p!==void 0;return r[b+"LabelVal"]=se?te.orig_p:te.p,r.labelLabel=f(Y,r[b+"LabelVal"],k[b+"hoverformat"]),r.valueLabel=f(X,r[d+"LabelVal"],k[d+"hoverformat"]),r.baseLabel=f(X,te.b,k[d+"hoverformat"]),r.spikeDistance=(function(fe){var xe=c,he=fe.b,de=ee(fe);return _.inbox(he-xe,de-xe,L+(de-xe)/(de-he)-1)}(te)+function(fe){return V(R(fe),U(fe),L)}(te))/2,r[b+"Spike"]=Y.c2p(te.p,!0),T(te,k,r),r.hovertemplate=k.hovertemplate,r}}function i(r,n){var o=n.mcc||r.marker.color,a=n.mlcc||r.marker.line.color,u=m(r,n);return s.opacity(o)?o:s.opacity(a)&&u?a:void 0}D.exports={hoverPoints:function(r,n,o,a,u){var p=t(r,n,o,a,u);if(p){var c=p.cd,b=c[0].trace,d=c[p.index];return p.color=i(b,d),w.getComponentMethod("errorbars","hoverInfo")(d,b,p),[p]}},hoverOnBars:t,getTraceColor:i}},60822:function(D,E,e){D.exports={attributes:e(1486),layoutAttributes:e(43641),supplyDefaults:e(90769).supplyDefaults,crossTraceDefaults:e(90769).crossTraceDefaults,supplyLayoutDefaults:e(13957),calc:e(92290),crossTraceCalc:e(11661).crossTraceCalc,colorbar:e(4898),arraysToCalcdata:e(75341),plot:e(17295).plot,style:e(16688).style,styleOnSelect:e(16688).styleOnSelect,hoverPoints:e(95423).hoverPoints,eventData:e(58065),selectPoints:e(81974),moduleType:"trace",name:"bar",basePlotModule:e(93612),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},43641:function(D){D.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"}}},13957:function(D,E,e){var _=e(73972),w=e(89298),s=e(71828),T=e(43641);D.exports=function(m,f,l){function t(b,d){return s.coerce(m,f,T,b,d)}for(var i=!1,r=!1,n=!1,o={},a=t("barmode"),u=0;u0}function M(L){return L==="auto"?0:L}function A(L,O){var I=Math.PI/180*O,R=Math.abs(Math.sin(I)),U=Math.abs(Math.cos(I));return{x:L.width*U+L.height*R,y:L.width*R+L.height*U}}function C(L,O,I,R,U,B){var G=!!B.isHorizontal,N=!!B.constrained,j=B.angle||0,V=B.anchor||"end",H=V==="end",ee=V==="start",Q=((B.leftToRight||0)+1)/2,Y=1-Q,X=U.width,K=U.height,te=Math.abs(O-L),ae=Math.abs(R-I),oe=te>2*v&&ae>2*v?v:0;te-=2*oe,ae-=2*oe;var se=M(j);j!=="auto"||X<=te&&K<=ae||!(X>te||K>ae)||(X>ae||K>te)&&X.01?Ue:function(be,Se,Ne){return Ne&&be===Se?be:Math.abs(be-Se)>=2?Ue(be):be>Se?Math.ceil(be):Math.floor(be)};Ce=De(Ce,ne,oe),ne=De(ne,Ce,oe),ue=De(ue,me,!oe),me=De(me,ue,!oe)}var je=k(s.ensureSingle(Ae,"path"),j,U,B);if(je.style("vector-effect",V?"none":"non-scaling-stroke").attr("d",isNaN((ne-Ce)*(me-ue))||Te&&L._context.staticPlot?"M0,0Z":"M"+Ce+","+ue+"V"+me+"H"+ne+"V"+ue+"Z").call(f.setClipUrl,O.layerClipId,L),!j.uniformtext.mode&&se){var ge=f.makePointStyleFns(Y);f.singlePointStyle(pe,je,Y,ge,L)}(function(be,Se,Ne,Ye,Ze,st,ot,ft,yt,Et,Tt){var xt,Dt=Se.xaxis,It=Se.yaxis,Ft=be._fullLayout;function qt(Kt,nn,yn){return s.ensureSingle(Kt,"text").text(nn).attr({class:"bartext bartext-"+xt,"text-anchor":"middle","data-notex":1}).call(f.font,yn).call(T.convertToTspans,be)}var Nt=Ye[0].trace,Je=Nt.orientation==="h",Ke=function(Kt,nn,yn,ln,kn){var Wn,wn=nn[0].trace;return Wn=wn.texttemplate?function(on,_n,fn,hn,In){var Cn=_n[0].trace,Nn=s.castOption(Cn,fn,"texttemplate");if(!Nn)return"";var Hn,qn,or,tr,kr=Cn.type==="histogram",gr=Cn.type==="waterfall",ir=Cn.type==="funnel",dr=Cn.orientation==="h";function yr(Zn){return t(tr,tr.c2l(Zn),!0).text}dr?(Hn="y",qn=In,or="x",tr=hn):(Hn="x",qn=hn,or="y",tr=In);var $t,mn=_n[fn],Ln={};Ln.label=mn.p,Ln.labelLabel=Ln[Hn+"Label"]=($t=mn.p,t(qn,qn.c2l($t),!0).text);var En=s.castOption(Cn,mn.i,"text");(En===0||En)&&(Ln.text=En),Ln.value=mn.s,Ln.valueLabel=Ln[or+"Label"]=yr(mn.s);var jn={};d(jn,Cn,mn.i),(kr||jn.x===void 0)&&(jn.x=dr?Ln.value:Ln.label),(kr||jn.y===void 0)&&(jn.y=dr?Ln.label:Ln.value),(kr||jn.xLabel===void 0)&&(jn.xLabel=dr?Ln.valueLabel:Ln.labelLabel),(kr||jn.yLabel===void 0)&&(jn.yLabel=dr?Ln.labelLabel:Ln.valueLabel),gr&&(Ln.delta=+mn.rawS||mn.s,Ln.deltaLabel=yr(Ln.delta),Ln.final=mn.v,Ln.finalLabel=yr(Ln.final),Ln.initial=Ln.final-Ln.delta,Ln.initialLabel=yr(Ln.initial)),ir&&(Ln.value=mn.s,Ln.valueLabel=yr(Ln.value),Ln.percentInitial=mn.begR,Ln.percentInitialLabel=s.formatPercent(mn.begR),Ln.percentPrevious=mn.difR,Ln.percentPreviousLabel=s.formatPercent(mn.difR),Ln.percentTotal=mn.sumR,Ln.percenTotalLabel=s.formatPercent(mn.sumR));var $n=s.castOption(Cn,mn.i,"customdata");return $n&&(Ln.customdata=$n),s.texttemplateString(Nn,Ln,on._d3locale,jn,Ln,Cn._meta||{})}(Kt,nn,yn,ln,kn):wn.textinfo?function(on,_n,fn,hn){var In=on[0].trace,Cn=In.orientation==="h",Nn=In.type==="waterfall",Hn=In.type==="funnel";function qn($n){return t(Cn?fn:hn,+$n,!0).text}var or,tr,kr=In.textinfo,gr=on[_n],ir=kr.split("+"),dr=[],yr=function($n){return ir.indexOf($n)!==-1};if(yr("label")&&dr.push((tr=on[_n].p,t(Cn?hn:fn,tr,!0).text)),yr("text")&&((or=s.castOption(In,gr.i,"text"))===0||or)&&dr.push(or),Nn){var $t=+gr.rawS||gr.s,mn=gr.v,Ln=mn-$t;yr("initial")&&dr.push(qn(Ln)),yr("delta")&&dr.push(qn($t)),yr("final")&&dr.push(qn(mn))}if(Hn){yr("value")&&dr.push(qn(gr.s));var En=0;yr("percent initial")&&En++,yr("percent previous")&&En++,yr("percent total")&&En++;var jn=En>1;yr("percent initial")&&(or=s.formatPercent(gr.begR),jn&&(or+=" of initial"),dr.push(or)),yr("percent previous")&&(or=s.formatPercent(gr.difR),jn&&(or+=" of previous"),dr.push(or)),yr("percent total")&&(or=s.formatPercent(gr.sumR),jn&&(or+=" of total"),dr.push(or))}return dr.join("
")}(nn,yn,ln,kn):a.getValue(wn.text,yn),a.coerceString(c,Wn)}(Ft,Ye,Ze,Dt,It);xt=function(Kt,nn){var yn=a.getValue(Kt.textposition,nn);return a.coerceEnumerated(b,yn)}(Nt,Ze);var Ge=Et.mode==="stack"||Et.mode==="relative",nt=Ye[Ze],ht=!Ge||nt._outmost;if(Ke&&xt!=="none"&&(!nt.isBlank&&st!==ot&&ft!==yt||xt!=="auto"&&xt!=="inside")){var Oe=Ft.font,Be=o.getBarColor(Ye[Ze],Nt),Qe=o.getInsideTextFont(Nt,Ze,Oe,Be),ut=o.getOutsideTextFont(Nt,Ze,Oe),pt=Ne.datum();Je?Dt.type==="log"&&pt.s0<=0&&(st=Dt.range[0]0&&mt>0&&(Ct<=_t&&mt<=Pt||Ct<=Pt&&mt<=_t||(Je?_t>=Ct*(Pt/mt):Pt>=mt*(_t/Ct)))?xt="inside":(xt="outside",bt.remove(),bt=null)):xt="inside"),!bt){var Bt=(bt=qt(Ne,Ke,Ot=s.ensureUniformFontSize(be,xt==="outside"?ut:Qe))).attr("transform");if(bt.attr("transform",""),Ct=(Lt=f.bBox(bt.node())).width,mt=Lt.height,bt.attr("transform",Bt),Ct<=0||mt<=0)return void bt.remove()}var Wt,Gt=Nt.textangle;Wt=xt==="outside"?function(Kt,nn,yn,ln,kn,Wn){var wn,on=!!Wn.isHorizontal,_n=!!Wn.constrained,fn=Wn.angle||0,hn=kn.width,In=kn.height,Cn=Math.abs(nn-Kt),Nn=Math.abs(ln-yn);wn=on?Nn>2*v?v:0:Cn>2*v?v:0;var Hn=1;_n&&(Hn=on?Math.min(1,Nn/In):Math.min(1,Cn/hn));var qn=M(fn),or=A(kn,qn),tr=(on?or.x:or.y)/2,kr=(kn.left+kn.right)/2,gr=(kn.top+kn.bottom)/2,ir=(Kt+nn)/2,dr=(yn+ln)/2,yr=0,$t=0,mn=on?y(nn,Kt):y(yn,ln);return on?(ir=nn-mn*wn,yr=mn*tr):(dr=ln+mn*wn,$t=-mn*tr),{textX:kr,textY:gr,targetX:ir,targetY:dr,anchorX:yr,anchorY:$t,scale:Hn,rotate:qn}}(st,ot,ft,yt,Lt,{isHorizontal:Je,constrained:Nt.constraintext==="both"||Nt.constraintext==="outside",angle:Gt}):C(st,ot,ft,yt,Lt,{isHorizontal:Je,constrained:Nt.constraintext==="both"||Nt.constraintext==="inside",angle:Gt,anchor:Nt.insidetextanchor}),Wt.fontSize=Ot.size,r(Nt.type==="histogram"?"bar":Nt.type,Wt,Ft),nt.transform=Wt;var Xt=k(bt,Ft,Et,Tt);s.setTransormAndDisplay(Xt,Wt)}else Ne.select("text").remove()})(L,O,Ae,ee,ye,Ce,ne,ue,me,U,B),O.layerClipId&&f.hideOutsideRangePoint(pe,Ae.select("text"),G,N,Y.xcalendar,Y.ycalendar)});var de=Y.cliponaxis===!1;f.setClipUrl(Q,de?null:O.layerClipId,L)});l.getComponentMethod("errorbars","plot")(L,H,O,U)},toMoveInsideBar:C}},81974:function(D){function E(e,_,w,s,T){var m=_.c2p(s?e.s0:e.p0,!0),f=_.c2p(s?e.s1:e.p1,!0),l=w.c2p(s?e.p0:e.s0,!0),t=w.c2p(s?e.p1:e.s1,!0);return T?[(m+f)/2,(l+t)/2]:s?[f,(l+t)/2]:[(m+f)/2,t]}D.exports=function(e,_){var w,s=e.cd,T=e.xaxis,m=e.yaxis,f=s[0].trace,l=f.type==="funnel",t=f.orientation==="h",i=[];if(_===!1)for(w=0;w1||k.bargap===0&&k.bargroupgap===0&&!h[0].trace.marker.line.width)&&_.select(this).attr("shape-rendering","crispEdges")}),g.selectAll("g.points").each(function(h){o(_.select(this),h[0].trace,x)}),m.getComponentMethod("errorbars","style")(g)},styleTextPoints:a,styleOnSelect:function(x,g,y){var k=g[0].trace;k.selectedpoints?function(h,M,A){s.selectedPointStyle(h.selectAll("path"),M),function(C,L,O){C.each(function(I){var R,U=_.select(this);if(I.selected){R=T.ensureUniformFontSize(O,u(U,I,L,O));var B=L.selected.textfont&&L.selected.textfont.color;B&&(R.color=B),s.font(U,R)}else s.selectedTextStyle(U,L)})}(h.selectAll("text"),M,A)}(y,k,x):(o(y,k,x),m.getComponentMethod("errorbars","style")(y))},getInsideTextFont:c,getOutsideTextFont:b,getBarColor:v,resizeText:f}},98340:function(D,E,e){var _=e(7901),w=e(52075).hasColorscale,s=e(1586),T=e(71828).coercePattern;D.exports=function(m,f,l,t,i){var r=l("marker.color",t),n=w(m,"marker");n&&s(m,f,i,l,{prefix:"marker.",cLetter:"c"}),l("marker.line.color",_.defaultLine),w(m,"marker.line")&&s(m,f,i,l,{prefix:"marker.line.",cLetter:"c"}),l("marker.line.width"),l("marker.opacity"),T(l,"marker.pattern",r,n),l("selected.marker.color"),l("unselected.marker.color")}},72597:function(D,E,e){var _=e(39898),w=e(71828);function s(T){return"_"+T+"Text_minsize"}D.exports={recordMinTextSize:function(T,m,f){if(f.uniformtext.mode){var l=s(T),t=f.uniformtext.minsize,i=m.scale*m.fontSize;m.hide=ia.range[1]&&(x+=Math.PI),_.getClosest(r,function(k){return c(v,x,[k.rp0,k.rp1],[k.thetag0,k.thetag1],p)?b+Math.min(1,Math.abs(k.thetag1-k.thetag0)/d)-1+(k.rp1-v)/(k.rp1-k.rp0)-1:1/0},l),l.index!==!1){var g=r[l.index];l.x0=l.x1=g.ct[0],l.y0=l.y1=g.ct[1];var y=w.extendFlat({},g,{r:g.s,theta:g.p});return T(g,n,l),m(y,n,o,l),l.hovertemplate=n.hovertemplate,l.color=s(n,g),l.xLabelVal=l.yLabelVal=void 0,g.s<0&&(l.idealAlign="left"),[l]}}},23381:function(D,E,e){D.exports={moduleType:"trace",name:"barpolar",basePlotModule:e(23580),categories:["polar","bar","showLegend"],attributes:e(55023),layoutAttributes:e(40151),supplyDefaults:e(6135),supplyLayoutDefaults:e(19860),calc:e(74692).calc,crossTraceCalc:e(74692).crossTraceCalc,plot:e(60173),colorbar:e(4898),formatLabels:e(98608),style:e(16688).style,styleOnSelect:e(16688).styleOnSelect,hoverPoints:e(27379),selectPoints:e(81974),meta:{}}},40151:function(D){D.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}},19860:function(D,E,e){var _=e(71828),w=e(40151);D.exports=function(s,T,m){var f,l={};function t(n,o){return _.coerce(s[f]||{},T[f],w,n,o)}for(var i=0;i0?(k=g,h=y):(k=y,h=g);var M=[m.findEnclosingVertexAngles(k,c.vangles)[0],(k+h)/2,m.findEnclosingVertexAngles(h,c.vangles)[1]];return m.pathPolygonAnnulus(v,x,k,h,M,b,d)}:function(v,x,g,y){return s.pathAnnulus(v,x,g,y,b,d)}}(l),p=l.layers.frontplot.select("g.barlayer");s.makeTraceGroups(p,t,"trace bars").each(function(){var c=_.select(this),b=s.ensureSingle(c,"g","points").selectAll("g.point").data(s.identity);b.enter().append("g").style("vector-effect",i?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),b.exit().remove(),b.each(function(d){var v,x=_.select(this),g=d.rp0=o.c2p(d.s0),y=d.rp1=o.c2p(d.s1),k=d.thetag0=a.c2g(d.p0),h=d.thetag1=a.c2g(d.p1);if(w(g)&&w(y)&&w(k)&&w(h)&&g!==y&&k!==h){var M=o.c2g(d.s1),A=(k+h)/2;d.ct=[r.c2p(M*Math.cos(A)),n.c2p(M*Math.sin(A))],v=u(g,y,k,h)}else v="M0,0Z";s.ensureSingle(x,"path").attr("d",v)}),T.setClipUrl(c,l._hasClipOnAxisFalse?l.clipIds.forTraces:null,f)})}},53522:function(D,E,e){var _=e(82196),w=e(1486),s=e(22399),T=e(12663).axisHoverFormat,m=e(5386).fF,f=e(1426).extendFlat,l=_.marker,t=l.line;D.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:_.xperiod,yperiod:_.yperiod,xperiod0:_.xperiod0,yperiod0:_.yperiod0,xperiodalignment:_.xperiodalignment,yperiodalignment:_.yperiodalignment,xhoverformat:T("x"),yhoverformat:T("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"},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:f({},l.symbol,{arrayOk:!1,editType:"plot"}),opacity:f({},l.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:f({},l.angle,{arrayOk:!1,editType:"calc"}),size:f({},l.size,{arrayOk:!1,editType:"calc"}),color:f({},l.color,{arrayOk:!1,editType:"style"}),line:{color:f({},t.color,{arrayOk:!1,dflt:s.defaultLine,editType:"style"}),width:f({},t.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:_.fillcolor,whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},offsetgroup:w.offsetgroup,alignmentgroup:w.alignmentgroup,selected:{marker:_.selected.marker,editType:"style"},unselected:{marker:_.unselected.marker,editType:"style"},text:f({},_.text,{}),hovertext:f({},_.hovertext,{}),hovertemplate:m({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"}}},48518:function(D,E,e){var _=e(92770),w=e(89298),s=e(42973),T=e(71828),m=e(50606).BADNUM,f=T._;D.exports=function(c,b){var d,v,x,g,y,k,h,M=c._fullLayout,A=w.getFromId(c,b.xaxis||"x"),C=w.getFromId(c,b.yaxis||"y"),L=[],O=b.type==="violin"?"_numViolins":"_numBoxes";b.orientation==="h"?(x=A,g="x",y=C,k="y",h=!!b.yperiodalignment):(x=C,g="y",y=A,k="x",h=!!b.xperiodalignment);var I,R,U,B,G,N,j=function(Se,Ne,Ye,Ze){var st,ot=Ne+"0"in Se;if(Ne in Se||ot&&"d"+Ne in Se){var ft=Ye.makeCalcdata(Se,Ne);return[s(Se,Ye,Ne,ft).vals,ft]}st=ot?Se[Ne+"0"]:"name"in Se&&(Ye.type==="category"||_(Se.name)&&["linear","log"].indexOf(Ye.type)!==-1||T.isDateTime(Se.name)&&Ye.type==="date")?Se.name:Ze;for(var yt=Ye.type==="multicategory"?Ye.r2c_just_indices(st):Ye.d2c(st,0,Se[Ne+"calendar"]),Et=Se._length,Tt=new Array(Et),xt=0;xtI.uf};if(b._hasPreCompStats){var K=b[g],te=function(Se){return x.d2c((b[Se]||[])[d])},ae=1/0,oe=-1/0;for(d=0;d=I.q1&&I.q3>=I.med){var fe=te("lowerfence");I.lf=fe!==m&&fe<=I.q1?fe:n(I,U,B);var xe=te("upperfence");I.uf=xe!==m&&xe>=I.q3?xe:o(I,U,B);var he=te("mean");I.mean=he!==m?he:B?T.mean(U,B):(I.q1+I.q3)/2;var de=te("sd");I.sd=he!==m&&de>=0?de:B?T.stdev(U,B,I.mean):I.q3-I.q1,I.lo=a(I),I.uo=u(I);var pe=te("notchspan");pe=pe!==m&&pe>0?pe:p(I,B),I.ln=I.med-pe,I.un=I.med+pe;var ye=I.lf,Re=I.uf;b.boxpoints&&U.length&&(ye=Math.min(ye,U[0]),Re=Math.max(Re,U[B-1])),b.notched&&(ye=Math.min(ye,I.ln),Re=Math.max(Re,I.un)),I.min=ye,I.max=Re}else{var we;T.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+I.q1,"median = "+I.med,"q3 = "+I.q3].join(` +`)),we=I.med!==m?I.med:I.q1!==m?I.q3!==m?(I.q1+I.q3)/2:I.q1:I.q3!==m?I.q3:0,I.med=we,I.q1=I.q3=we,I.lf=I.uf=we,I.mean=I.sd=we,I.ln=I.un=we,I.min=I.max=we}ae=Math.min(ae,I.min),oe=Math.max(oe,I.max),I.pts2=R.filter(X),L.push(I)}}b._extremes[x._id]=w.findExtremes(x,[ae,oe],{padded:!0})}else{var Ae=x.makeCalcdata(b,g),Me=function(Se,Ne){for(var Ye=Se.length,Ze=new Array(Ye+1),st=0;st=0&&ue0){var je,ge;(I={}).pos=I[k]=Q[d],R=I.pts=ne[d].sort(i),B=(U=I[g]=R.map(r)).length,I.min=U[0],I.max=U[B-1],I.mean=T.mean(U,B),I.sd=T.stdev(U,B,I.mean),I.med=T.interp(U,.5),B%2&&(Ue||De)?(Ue?(je=U.slice(0,B/2),ge=U.slice(B/2+1)):De&&(je=U.slice(0,B/2+1),ge=U.slice(B/2)),I.q1=T.interp(je,.5),I.q3=T.interp(ge,.5)):(I.q1=T.interp(U,.25),I.q3=T.interp(U,.75)),I.lf=n(I,U,B),I.uf=o(I,U,B),I.lo=a(I),I.uo=u(I);var be=p(I,B);I.ln=I.med-be,I.un=I.med+be,me=Math.min(me,I.ln),Te=Math.max(Te,I.un),I.pts2=R.filter(X),L.push(I)}b._extremes[x._id]=w.findExtremes(x,b.notched?Ae.concat([me,Te]):Ae,{padded:!0})}return function(Se,Ne){if(T.isArrayOrTypedArray(Ne.selectedpoints))for(var Ye=0;Ye0?(L[0].t={num:M[O],dPos:Y,posLetter:k,valLetter:g,labels:{med:f(c,"median:"),min:f(c,"min:"),q1:f(c,"q1:"),q3:f(c,"q3:"),max:f(c,"max:"),mean:b.boxmean==="sd"?f(c,"mean ± σ:"):f(c,"mean:"),lf:f(c,"lower fence:"),uf:f(c,"upper fence:")}},M[O]++,L):[{t:{empty:!0}}]};var l={text:"tx",hovertext:"htx"};function t(c,b,d){for(var v in l)T.isArrayOrTypedArray(b[v])&&(Array.isArray(d)?T.isArrayOrTypedArray(b[v][d[0]])&&(c[l[v]]=b[v][d[0]][d[1]]):c[l[v]]=b[v][d])}function i(c,b){return c.v-b.v}function r(c){return c.v}function n(c,b,d){return d===0?c.q1:Math.min(c.q1,b[Math.min(T.findBin(2.5*c.q1-1.5*c.q3,b,!0)+1,d-1)])}function o(c,b,d){return d===0?c.q3:Math.max(c.q3,b[Math.max(T.findBin(2.5*c.q3-1.5*c.q1,b),0)])}function a(c){return 4*c.q1-3*c.q3}function u(c){return 4*c.q3-3*c.q1}function p(c,b){return b===0?0:1.57*(c.q3-c.q1)/Math.sqrt(b)}},37188:function(D,E,e){var _=e(89298),w=e(71828),s=e(99082).getAxisGroup,T=["v","h"];function m(f,l,t,i){var r,n,o,a=l.calcdata,u=l._fullLayout,p=i._id,c=p.charAt(0),b=[],d=0;for(r=0;r1,k=1-u[f+"gap"],h=1-u[f+"groupgap"];for(r=0;r0){var se=R.pointpos,fe=R.jitter,xe=R.marker.size/2,he=0;se+fe>=0&&((he=ae*(se+fe))>O?(oe=!0,K=xe,Y=he):he>ee&&(K=xe,Y=O)),he<=O&&(Y=O);var de=0;se-fe<=0&&((de=-ae*(se-fe))>I?(oe=!0,te=xe,X=de):de>Q&&(te=xe,X=I)),de<=I&&(X=I)}else Y=O,X=I;var pe=new Array(o.length);for(n=0;n0?(y="v",k=M>0?Math.min(C,A):Math.min(A)):M>0?(y="h",k=Math.min(C)):k=0;if(k){n._length=k;var B=o("orientation",y);n._hasPreCompStats?B==="v"&&M===0?(o("x0",0),o("dx",1)):B==="h"&&h===0&&(o("y0",0),o("dy",1)):B==="v"&&M===0?o("x0"):B==="h"&&h===0&&o("y0"),w.getComponentMethod("calendars","handleTraceDefaults")(r,n,["x","y"],a)}else n.visible=!1}function i(r,n,o,a){var u=a.prefix,p=_.coerce2(r,n,l,"marker.outliercolor"),c=o("marker.line.outliercolor"),b="outliers";n._hasPreCompStats?b="all":(p||c)&&(b="suspectedoutliers");var d=o(u+"points",b);d?(o("jitter",d==="all"?.3:0),o("pointpos",d==="all"?-1.5:0),o("marker.symbol"),o("marker.opacity"),o("marker.size"),o("marker.angle"),o("marker.color",n.line.color),o("marker.line.color"),o("marker.line.width"),d==="suspectedoutliers"&&(o("marker.line.outliercolor",n.marker.color),o("marker.line.outlierwidth")),o("selected.marker.color"),o("unselected.marker.color"),o("selected.marker.size"),o("unselected.marker.size"),o("text"),o("hovertext")):delete n.marker;var v=o("hoveron");v!=="all"&&v.indexOf("points")===-1||o("hovertemplate"),_.coerceSelectionMarkerOpacity(n,o)}D.exports={supplyDefaults:function(r,n,o,a){function u(g,y){return _.coerce(r,n,l,g,y)}if(t(r,n,u,a),n.visible!==!1){T(r,n,a,u),u("xhoverformat"),u("yhoverformat");var p=n._hasPreCompStats;p&&(u("lowerfence"),u("upperfence")),u("line.color",(r.marker||{}).color||o),u("line.width"),u("fillcolor",s.addOpacity(n.line.color,.5));var c=!1;if(p){var b=u("mean"),d=u("sd");b&&b.length&&(c=!0,d&&d.length&&(c="sd"))}u("boxmean",c),u("whiskerwidth"),u("width"),u("quartilemethod");var v=!1;if(p){var x=u("notchspan");x&&x.length&&(v=!0)}else _.validate(r.notchwidth,l.notchwidth)&&(v=!0);u("notched",v)&&u("notchwidth"),i(r,n,u,{prefix:"box"})}},crossTraceDefaults:function(r,n){var o,a;function u(b){return _.coerce(a._input,a,l,b)}for(var p=0;pd.lo&&(U.so=!0)}return g});b.enter().append("path").classed("point",!0),b.exit().remove(),b.call(s.translatePoints,n,o)}function f(l,t,i,r){var n,o,a=t.val,u=t.pos,p=!!u.rangebreaks,c=r.bPos,b=r.bPosPxOffset||0,d=i.boxmean||(i.meanline||{}).visible;Array.isArray(r.bdPos)?(n=r.bdPos[0],o=r.bdPos[1]):(n=r.bdPos,o=r.bdPos);var v=l.selectAll("path.mean").data(i.type==="box"&&i.boxmean||i.type==="violin"&&i.box.visible&&i.meanline.visible?w.identity:[]);v.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),v.exit().remove(),v.each(function(x){var g=u.c2l(x.pos+c,!0),y=u.l2p(g-n)+b,k=u.l2p(g+o)+b,h=p?(y+k)/2:u.l2p(g)+b,M=a.c2p(x.mean,!0),A=a.c2p(x.mean-x.sd,!0),C=a.c2p(x.mean+x.sd,!0);i.orientation==="h"?_.select(this).attr("d","M"+M+","+y+"V"+k+(d==="sd"?"m0,0L"+A+","+h+"L"+M+","+y+"L"+C+","+h+"Z":"")):_.select(this).attr("d","M"+y+","+M+"H"+k+(d==="sd"?"m0,0L"+h+","+A+"L"+y+","+M+"L"+h+","+C+"Z":""))})}D.exports={plot:function(l,t,i,r){var n=l._context.staticPlot,o=t.xaxis,a=t.yaxis;w.makeTraceGroups(r,i,"trace boxes").each(function(u){var p,c,b=_.select(this),d=u[0],v=d.t,x=d.trace;v.wdPos=v.bdPos*x.whiskerwidth,x.visible!==!0||v.empty?b.remove():(x.orientation==="h"?(p=a,c=o):(p=o,c=a),T(b,{pos:p,val:c},x,v,n),m(b,{x:o,y:a},x,v),f(b,{pos:p,val:c},x,v))})},plotBoxAndWhiskers:T,plotPoints:m,plotBoxMean:f}},24626:function(D){D.exports=function(E,e){var _,w,s=E.cd,T=E.xaxis,m=E.yaxis,f=[];if(e===!1)for(_=0;_=10)return null;for(var m=1/0,f=-1/0,l=s.length,t=0;t0?Math.floor:Math.ceil,B=I>0?Math.ceil:Math.floor,G=I>0?Math.min:Math.max,N=I>0?Math.max:Math.min,j=U(L+R),V=B(O-R),H=[[o=C(L)]];for(f=j;f*I=0;s--)T[i-s]=E[r][s],m[i-s]=e[r][s];for(f.push({x:T,y:m,bicubic:l}),s=r,T=[],m=[];s>=0;s--)T[r-s]=E[s][0],m[r-s]=e[s][0];return f.push({x:T,y:m,bicubic:t}),f}},20347:function(D,E,e){var _=e(89298),w=e(1426).extendFlat;D.exports=function(s,T,m){var f,l,t,i,r,n,o,a,u,p,c,b,d,v,x=s["_"+T],g=s[T+"axis"],y=g._gridlines=[],k=g._minorgridlines=[],h=g._boundarylines=[],M=s["_"+m],A=s[m+"axis"];g.tickmode==="array"&&(g.tickvals=x.slice());var C=s._xctrl,L=s._yctrl,O=C[0].length,I=C.length,R=s._a.length,U=s._b.length;_.prepTicks(g),g.tickmode==="array"&&delete g.tickvals;var B=g.smoothing?3:1;function G(j){var V,H,ee,Q,Y,X,K,te,ae,oe,se,fe,xe=[],he=[],de={};if(T==="b")for(H=s.b2j(j),ee=Math.floor(Math.max(0,Math.min(U-2,H))),Q=H-ee,de.length=U,de.crossLength=R,de.xy=function(pe){return s.evalxy([],pe,H)},de.dxy=function(pe,ye){return s.dxydi([],pe,ee,ye,Q)},V=0;V0&&(ae=s.dxydi([],V-1,ee,0,Q),xe.push(Y[0]+ae[0]/3),he.push(Y[1]+ae[1]/3),oe=s.dxydi([],V-1,ee,1,Q),xe.push(te[0]-oe[0]/3),he.push(te[1]-oe[1]/3)),xe.push(te[0]),he.push(te[1]),Y=te;else for(V=s.a2i(j),X=Math.floor(Math.max(0,Math.min(R-2,V))),K=V-X,de.length=R,de.crossLength=U,de.xy=function(pe){return s.evalxy([],V,pe)},de.dxy=function(pe,ye){return s.dxydj([],X,pe,K,ye)},H=0;H0&&(se=s.dxydj([],X,H-1,K,0),xe.push(Y[0]+se[0]/3),he.push(Y[1]+se[1]/3),fe=s.dxydj([],X,H-1,K,1),xe.push(te[0]-fe[0]/3),he.push(te[1]-fe[1]/3)),xe.push(te[0]),he.push(te[1]),Y=te;return de.axisLetter=T,de.axis=g,de.crossAxis=A,de.value=j,de.constvar=m,de.index=a,de.x=xe,de.y=he,de.smoothing=A.smoothing,de}function N(j){var V,H,ee,Q,Y,X=[],K=[],te={};if(te.length=x.length,te.crossLength=M.length,T==="b")for(ee=Math.max(0,Math.min(U-2,j)),Y=Math.min(1,Math.max(0,j-ee)),te.xy=function(ae){return s.evalxy([],ae,j)},te.dxy=function(ae,oe){return s.dxydi([],ae,ee,oe,Y)},V=0;Vx.length-1||y.push(w(N(l),{color:g.gridcolor,width:g.gridwidth,dash:g.griddash}));for(a=n;ax.length-1||c<0||c>x.length-1))for(b=x[t],d=x[c],f=0;fx[x.length-1]||k.push(w(G(p),{color:g.minorgridcolor,width:g.minorgridwidth,dash:g.minorgriddash}));g.startline&&h.push(w(N(0),{color:g.startlinecolor,width:g.startlinewidth})),g.endline&&h.push(w(N(x.length-1),{color:g.endlinecolor,width:g.endlinewidth}))}else{for(i=5e-15,n=(r=[Math.floor((x[x.length-1]-g.tick0)/g.dtick*(1+i)),Math.ceil((x[0]-g.tick0)/g.dtick/(1+i))].sort(function(j,V){return j-V}))[0],o=r[1],a=n;a<=o;a++)u=g.tick0+g.dtick*a,y.push(w(G(u),{color:g.gridcolor,width:g.gridwidth,dash:g.griddash}));for(a=n-1;ax[x.length-1]||k.push(w(G(p),{color:g.minorgridcolor,width:g.minorgridwidth,dash:g.minorgriddash}));g.startline&&h.push(w(G(x[0]),{color:g.startlinecolor,width:g.startlinewidth})),g.endline&&h.push(w(G(x[x.length-1]),{color:g.endlinecolor,width:g.endlinewidth}))}}},83311:function(D,E,e){var _=e(89298),w=e(1426).extendFlat;D.exports=function(s,T){var m,f,l,t=T._labels=[],i=T._gridlines;for(m=0;ms.length&&(w=w.slice(0,s.length)):w=[],m=0;m90&&(o-=180,l=-l),{angle:o,flip:l,p:E.c2p(w,e,_),offsetMultplier:t}}},89740:function(D,E,e){var _=e(39898),w=e(91424),s=e(27669),T=e(67961),m=e(11651),f=e(63893),l=e(71828),t=l.strRotate,i=l.strTranslate,r=e(18783);function n(c,b,d,v,x,g,y){var k="const-"+x+"-lines",h=d.selectAll("."+k).data(g);h.enter().append("path").classed(k,!0).style("vector-effect",y?"none":"non-scaling-stroke"),h.each(function(M){var A=M,C=A.x,L=A.y,O=s([],C,c.c2p),I=s([],L,b.c2p),R="M"+T(O,I,A.smoothing);_.select(this).attr("d",R).style("stroke-width",A.width).style("stroke",A.color).style("stroke-dasharray",w.dashStyle(A.dash,A.width)).style("fill","none")}),h.exit().remove()}function o(c,b,d,v,x,g,y,k){var h=g.selectAll("text."+k).data(y);h.enter().append("text").classed(k,!0);var M=0,A={};return h.each(function(C,L){var O;if(C.axis.tickangle==="auto")O=m(v,b,d,C.xy,C.dxy);else{var I=(C.axis.tickangle+180)*Math.PI/180;O=m(v,b,d,C.xy,[Math.cos(I),Math.sin(I)])}L||(A={angle:O.angle,flip:O.flip});var R=(C.endAnchor?-1:1)*O.flip,U=_.select(this).attr({"text-anchor":R>0?"start":"end","data-notex":1}).call(w.font,C.font).text(C.text).call(f.convertToTspans,c),B=w.bBox(this);U.attr("transform",i(O.p[0],O.p[1])+t(O.angle)+i(C.axis.labelpadding*R,.3*B.height)),M=Math.max(M,B.width+C.axis.labelpadding)}),h.exit().remove(),A.maxExtent=M,A}D.exports=function(c,b,d,v){var x=c._context.staticPlot,g=b.xaxis,y=b.yaxis,k=c._fullLayout._clips;l.makeTraceGroups(v,d,"trace").each(function(h){var M=_.select(this),A=h[0],C=A.trace,L=C.aaxis,O=C.baxis,I=l.ensureSingle(M,"g","minorlayer"),R=l.ensureSingle(M,"g","majorlayer"),U=l.ensureSingle(M,"g","boundarylayer"),B=l.ensureSingle(M,"g","labellayer");M.style("opacity",C.opacity),n(g,y,R,0,"a",L._gridlines,!0),n(g,y,R,0,"b",O._gridlines,!0),n(g,y,I,0,"a",L._minorgridlines,!0),n(g,y,I,0,"b",O._minorgridlines,!0),n(g,y,U,0,"a-boundary",L._boundarylines,x),n(g,y,U,0,"b-boundary",O._boundarylines,x);var G=o(c,g,y,C,0,B,L._labels,"a-label"),N=o(c,g,y,C,0,B,O._labels,"b-label");(function(j,V,H,ee,Q,Y,X,K){var te,ae,oe,se,fe=l.aggNums(Math.min,null,H.a),xe=l.aggNums(Math.max,null,H.a),he=l.aggNums(Math.min,null,H.b),de=l.aggNums(Math.max,null,H.b);te=.5*(fe+xe),ae=he,oe=H.ab2xy(te,ae,!0),se=H.dxyda_rough(te,ae),X.angle===void 0&&l.extendFlat(X,m(H,Q,Y,oe,H.dxydb_rough(te,ae))),p(j,V,H,0,oe,se,H.aaxis,Q,Y,X,"a-title"),te=fe,ae=.5*(he+de),oe=H.ab2xy(te,ae,!0),se=H.dxydb_rough(te,ae),K.angle===void 0&&l.extendFlat(K,m(H,Q,Y,oe,H.dxyda_rough(te,ae))),p(j,V,H,0,oe,se,H.baxis,Q,Y,K,"b-title")})(c,B,C,0,g,y,G,N),function(j,V,H,ee,Q){var Y,X,K,te,ae=H.select("#"+j._clipPathId);ae.size()||(ae=H.append("clipPath").classed("carpetclip",!0));var oe=l.ensureSingle(ae,"path","carpetboundary"),se=V.clipsegments,fe=[];for(te=0;te90&&U<270,G=_.select(this);G.text(y.title.text).call(f.convertToTspans,c),B&&(O=(-f.lineCount(G)+u)*a*R-O),G.attr("transform",i(I.p[0],I.p[1])+t(I.angle)+i(0,O)).attr("text-anchor","middle").call(w.font,y.title.font)}),L.exit().remove()}},11435:function(D,E,e){var _=e(35509),w=e(65888).findBin,s=e(45664),T=e(20349),m=e(54495),f=e(73057);D.exports=function(l){var t=l._a,i=l._b,r=t.length,n=i.length,o=l.aaxis,a=l.baxis,u=t[0],p=t[r-1],c=i[0],b=i[n-1],d=t[t.length-1]-t[0],v=i[i.length-1]-i[0],x=d*_.RELATIVE_CULL_TOLERANCE,g=v*_.RELATIVE_CULL_TOLERANCE;u-=x,p+=x,c-=g,b+=g,l.isVisible=function(y,k){return y>u&&yc&&kp||kb},l.setScale=function(){var y=l._x,k=l._y,h=s(l._xctrl,l._yctrl,y,k,o.smoothing,a.smoothing);l._xctrl=h[0],l._yctrl=h[1],l.evalxy=T([l._xctrl,l._yctrl],r,n,o.smoothing,a.smoothing),l.dxydi=m([l._xctrl,l._yctrl],o.smoothing,a.smoothing),l.dxydj=f([l._xctrl,l._yctrl],o.smoothing,a.smoothing)},l.i2a=function(y){var k=Math.max(0,Math.floor(y[0]),r-2),h=y[0]-k;return(1-h)*t[k]+h*t[k+1]},l.j2b=function(y){var k=Math.max(0,Math.floor(y[1]),r-2),h=y[1]-k;return(1-h)*i[k]+h*i[k+1]},l.ij2ab=function(y){return[l.i2a(y[0]),l.j2b(y[1])]},l.a2i=function(y){var k=Math.max(0,Math.min(w(y,t),r-2)),h=t[k],M=t[k+1];return Math.max(0,Math.min(r-1,k+(y-h)/(M-h)))},l.b2j=function(y){var k=Math.max(0,Math.min(w(y,i),n-2)),h=i[k],M=i[k+1];return Math.max(0,Math.min(n-1,k+(y-h)/(M-h)))},l.ab2ij=function(y){return[l.a2i(y[0]),l.b2j(y[1])]},l.i2c=function(y,k){return l.evalxy([],y,k)},l.ab2xy=function(y,k,h){if(!h&&(yt[r-1]|ki[n-1]))return[!1,!1];var M=l.a2i(y),A=l.b2j(k),C=l.evalxy([],M,A);if(h){var L,O,I,R,U=0,B=0,G=[];yt[r-1]?(L=r-2,O=1,U=(y-t[r-1])/(t[r-1]-t[r-2])):O=M-(L=Math.max(0,Math.min(r-2,Math.floor(M)))),ki[n-1]?(I=n-2,R=1,B=(k-i[n-1])/(i[n-1]-i[n-2])):R=A-(I=Math.max(0,Math.min(n-2,Math.floor(A)))),U&&(l.dxydi(G,L,I,O,R),C[0]+=G[0]*U,C[1]+=G[1]*U),B&&(l.dxydj(G,L,I,O,R),C[0]+=G[0]*B,C[1]+=G[1]*B)}return C},l.c2p=function(y,k,h){return[k.c2p(y[0]),h.c2p(y[1])]},l.p2x=function(y,k,h){return[k.p2c(y[0]),h.p2c(y[1])]},l.dadi=function(y){var k=Math.max(0,Math.min(t.length-2,y));return t[k+1]-t[k]},l.dbdj=function(y){var k=Math.max(0,Math.min(i.length-2,y));return i[k+1]-i[k]},l.dxyda=function(y,k,h,M){var A=l.dxydi(null,y,k,h,M),C=l.dadi(y,h);return[A[0]/C,A[1]/C]},l.dxydb=function(y,k,h,M){var A=l.dxydj(null,y,k,h,M),C=l.dbdj(k,M);return[A[0]/C,A[1]/C]},l.dxyda_rough=function(y,k,h){var M=d*(h||.1),A=l.ab2xy(y+M,k,!0),C=l.ab2xy(y-M,k,!0);return[.5*(A[0]-C[0])/M,.5*(A[1]-C[1])/M]},l.dxydb_rough=function(y,k,h){var M=v*(h||.1),A=l.ab2xy(y,k+M,!0),C=l.ab2xy(y,k-M,!0);return[.5*(A[0]-C[0])/M,.5*(A[1]-C[1])/M]},l.dpdx=function(y){return y._m},l.dpdy=function(y){return y._m}}},72505:function(D,E,e){var _=e(71828);D.exports=function(w,s,T){var m,f,l,t=[],i=[],r=w[0].length,n=w.length;function o(j,V){var H,ee=0,Q=0;return j>0&&(H=w[V][j-1])!==void 0&&(Q++,ee+=H),j0&&(H=w[V-1][j])!==void 0&&(Q++,ee+=H),V0&&f0&&m1e-5);return _.log("Smoother converged to",M,"after",A,"iterations"),w}},19237:function(D,E,e){var _=e(71828).isArray1D;D.exports=function(w,s,T){var m=T("x"),f=m&&m.length,l=T("y"),t=l&&l.length;if(!f&&!t)return!1;if(s._cheater=!m,f&&!_(m)||t&&!_(l))s._length=null;else{var i=f?m.length:1/0;t&&(i=Math.min(i,l.length)),s.a&&s.a.length&&(i=Math.min(i,s.a.length)),s.b&&s.b.length&&(i=Math.min(i,s.b.length)),s._length=i}return!0}},69568:function(D,E,e){var _=e(5386).fF,w=e(19316),s=e(50693),T=e(9012),m=e(22399).defaultLine,f=e(1426).extendFlat,l=w.marker.line;D.exports=f({locations:{valType:"data_array",editType:"calc"},locationmode:w.locationmode,z:{valType:"data_array",editType:"calc"},geojson:f({},w.geojson,{}),featureidkey:w.featureidkey,text:f({},w.text,{}),hovertext:f({},w.hovertext,{}),marker:{line:{color:f({},l.color,{dflt:m}),width:f({},l.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:w.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:w.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:f({},T.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:_(),showlegend:f({},T.showlegend,{dflt:!1})},s("",{cLetter:"z",editTypeOverride:"calc"}))},38675:function(D,E,e){var _=e(92770),w=e(50606).BADNUM,s=e(78803),T=e(75225),m=e(66279);function f(l){return l&&typeof l=="string"}D.exports=function(l,t){var i,r=t._length,n=new Array(r);i=t.geojson?function(c){return f(c)||_(c)}:f;for(var o=0;o")}}(T,o,l),[T]}},51319:function(D,E,e){D.exports={attributes:e(69568),supplyDefaults:e(61869),colorbar:e(61243),calc:e(38675),calcGeoJSON:e(99841).calcGeoJSON,plot:e(99841).plot,style:e(99636).style,styleOnSelect:e(99636).styleOnSelect,hoverPoints:e(42300),eventData:e(92069),selectPoints:e(81253),moduleType:"trace",name:"choropleth",basePlotModule:e(44622),categories:["geo","noOpacity","showLegend"],meta:{}}},99841:function(D,E,e){var _=e(39898),w=e(71828),s=e(41327),T=e(90973).getTopojsonFeatures,m=e(71739).findExtremes,f=e(99636).style;D.exports={calcGeoJSON:function(l,t){for(var i=l[0].trace,r=t[i.geo],n=r._subplot,o=i.locationmode,a=i._length,u=o==="geojson-id"?s.extractTraceFeature(l):T(i,n.topojson),p=[],c=[],b=0;b=0;T--){var m=s[T].id;if(typeof m=="string"&&m.indexOf("water")===0){for(var f=T+1;f=0;t--)f.removeLayer(l[t][1])},m.dispose=function(){var f=this.subplot.map;this._removeLayers(),f.removeSource(this.sourceId)},D.exports=function(f,l){var t=l[0].trace,i=new T(f,t.uid),r=i.sourceId,n=_(l),o=i.below=f.belowLookup["trace-"+t.uid];return f.map.addSource(r,{type:"geojson",data:n.geojson}),i._addLayers(n,o),l[0].trace._glTrace=i,i}},12674:function(D,E,e){var _=e(50693),w=e(12663).axisHoverFormat,s=e(5386).fF,T=e(2418),m=e(9012),f=e(1426).extendFlat,l={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"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:s({editType:"calc"},{keys:["norm"]}),uhoverformat:w("u",1),vhoverformat:w("v",1),whoverformat:w("w",1),xhoverformat:w("x"),yhoverformat:w("y"),zhoverformat:w("z"),showlegend:f({},m.showlegend,{dflt:!1})};f(l,_("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"})),["opacity","lightposition","lighting"].forEach(function(t){l[t]=T[t]}),l.hoverinfo=f({},m.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),l.transforms=void 0,D.exports=l},31371:function(D,E,e){var _=e(78803);D.exports=function(w,s){for(var T=s.u,m=s.v,f=s.w,l=Math.min(s.x.length,s.y.length,s.z.length,T.length,m.length,f.length),t=-1/0,i=1/0,r=0;rm.level||m.starts.length&&T===m.level)}break;case"constraint":if(w.prefixBoundary=!1,w.edgepaths.length)return;var f=w.x.length,l=w.y.length,t=-1/0,i=1/0;for(_=0;_":o>t&&(w.prefixBoundary=!0);break;case"<":(ot||w.starts.length&&n===i)&&(w.prefixBoundary=!0);break;case"][":r=Math.min(o[0],o[1]),n=Math.max(o[0],o[1]),rt&&(w.prefixBoundary=!0)}}}},90654:function(D,E,e){var _=e(21081),w=e(86068),s=e(53572);D.exports={min:"zmin",max:"zmax",calc:function(T,m,f){var l=m.contours,t=m.line,i=l.size||1,r=l.coloring,n=w(m,{isColorbar:!0});if(r==="heatmap"){var o=_.extractOpts(m);f._fillgradient=o.reversescale?_.flipScale(o.colorscale):o.colorscale,f._zrange=[o.min,o.max]}else r==="fill"&&(f._fillcolor=n);f._line={color:r==="lines"?n:t.color,width:l.showlines!==!1?t.width:0,dash:t.dash},f._levels={start:l.start,end:s(l),size:i}}}},36914:function(D){D.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}}},83179:function(D,E,e){var _=e(92770),w=e(14523),s=e(7901),T=s.addOpacity,m=s.opacity,f=e(74808),l=f.CONSTRAINT_REDUCTION,t=f.COMPARISON_OPS2;D.exports=function(i,r,n,o,a,u){var p,c,b,d=r.contours,v=n("contours.operation");d._operation=l[v],function(x,g){var y;t.indexOf(g.operation)===-1?(x("contours.value",[0,1]),Array.isArray(g.value)?g.value.length>2?g.value=g.value.slice(2):g.length===0?g.value=[0,1]:g.length<2?(y=parseFloat(g.value[0]),g.value=[y,y+1]):g.value=[parseFloat(g.value[0]),parseFloat(g.value[1])]:_(g.value)&&(y=parseFloat(g.value),g.value=[y,y+1])):(x("contours.value",0),_(g.value)||(Array.isArray(g.value)?g.value=parseFloat(g.value[0]):g.value=0))}(n,d),v==="="?p=d.showlines=!0:(p=n("contours.showlines"),b=n("fillcolor",T((i.line||{}).color||a,.5))),p&&(c=n("line.color",b&&m(b)?T(r.fillcolor,1):a),n("line.width",2),n("line.dash")),n("line.smoothing"),w(n,o,c,u)}},64237:function(D,E,e){var _=e(74808),w=e(92770);function s(f,l){var t,i=Array.isArray(l);function r(n){return w(n)?+n:null}return _.COMPARISON_OPS2.indexOf(f)!==-1?t=r(i?l[0]:l):_.INTERVAL_OPS.indexOf(f)!==-1?t=i?[r(l[0]),r(l[1])]:[r(l),r(l)]:_.SET_OPS.indexOf(f)!==-1&&(t=i?l.map(r):[r(l)]),t}function T(f){return function(l){l=s(f,l);var t=Math.min(l[0],l[1]),i=Math.max(l[0],l[1]);return{start:t,end:i,size:i-t}}}function m(f){return function(l){return{start:l=s(f,l),end:1/0,size:1/0}}}D.exports={"[]":T("[]"),"][":T("]["),">":m(">"),"<":m("<"),"=":m("=")}},67217:function(D){D.exports=function(E,e,_,w){var s=w("contours.start"),T=w("contours.end"),m=s===!1||T===!1,f=_("contours.size");!(m?e.autocontour=!0:_("autocontour",!1))&&f||_("ncontours")}},84857:function(D,E,e){var _=e(71828);function w(s){return _.extendFlat({},s,{edgepaths:_.extendDeep([],s.edgepaths),paths:_.extendDeep([],s.paths),starts:_.extendDeep([],s.starts)})}D.exports=function(s,T){var m,f,l,t=function(n){return n.reverse()},i=function(n){return n};switch(T){case"=":case"<":return s;case">":for(s.length!==1&&_.warn("Contour data invalid for the specified inequality operation."),f=s[0],m=0;m1e3){_.warn("Too many contours, clipping at 1000",T);break}return i}},53572:function(D){D.exports=function(E){return E.end+E.size/1e6}},81696:function(D,E,e){var _=e(71828),w=e(36914);function s(f,l,t,i){return Math.abs(f[0]-l[0])20&&oe?ae===208||ae===1114?fe=se[0]===0?1:-1:xe=se[1]===0?1:-1:w.BOTTOMSTART.indexOf(ae)!==-1?xe=1:w.LEFTSTART.indexOf(ae)!==-1?fe=1:w.TOPSTART.indexOf(ae)!==-1?xe=-1:fe=-1,[fe,xe]}(a,t,l),p=[m(f,l,[-u[0],-u[1]])],c=f.z.length,b=f.z[0].length,d=l.slice(),v=u.slice();for(n=0;n<1e4;n++){if(a>20?(a=w.CHOOSESADDLE[a][(u[0]||u[1])<0?0:1],f.crossings[o]=w.SADDLEREMAINDER[a]):delete f.crossings[o],!(u=w.NEWDELTA[a])){_.log("Found bad marching index:",a,l,f.level);break}p.push(m(f,l,u)),l[0]+=u[0],l[1]+=u[1],o=l.join(","),s(p[p.length-1],p[p.length-2],i,r)&&p.pop();var x=u[0]&&(l[0]<0||l[0]>b-2)||u[1]&&(l[1]<0||l[1]>c-2);if(l[0]===d[0]&&l[1]===d[1]&&u[0]===v[0]&&u[1]===v[1]||t&&x)break;a=f.crossings[o]}n===1e4&&_.log("Infinite loop in contour?");var g,y,k,h,M,A,C,L,O,I,R,U,B,G,N,j=s(p[0],p[p.length-1],i,r),V=0,H=.2*f.smoothing,ee=[],Q=0;for(n=1;n=Q;n--)if((g=ee[n])=Q&&g+ee[y]L&&O--,f.edgepaths[O]=R.concat(p,I));break}te||(f.edgepaths[L]=p.concat(I))}for(L=0;Ls?0:1)+(T[0][1]>s?0:2)+(T[1][1]>s?0:4)+(T[1][0]>s?0:8);return m===5||m===10?s>(T[0][0]+T[0][1]+T[1][0]+T[1][1])/4?m===5?713:1114:m===5?104:208:m===15?0:m}D.exports=function(s){var T,m,f,l,t,i,r,n,o,a=s[0].z,u=a.length,p=a[0].length,c=u===2||p===2;for(m=0;m=0&&(y=N,h=M):Math.abs(g[1]-y[1])<.01?Math.abs(g[1]-N[1])<.01&&(N[0]-g[0])*(y[0]-N[0])>=0&&(y=N,h=M):w.log("endpt to newendpt is not vert. or horz.",g,y,N)}if(g=y,h>=0)break;L+="L"+y}if(h===v.edgepaths.length){w.log("unclosed perimeter path");break}O=h,(R=I.indexOf(O)===-1)&&(O=I[0],L+="Z")}for(O=0;Oy.center?y.right-M:M-y.left)/(L+Math.abs(Math.sin(C)*h)),R=(A>y.middle?y.bottom-A:A-y.top)/(Math.abs(O)+Math.cos(C)*h);if(I<1||R<1)return 1/0;var U=p.EDGECOST*(1/(I-1)+1/(R-1));U+=p.ANGLECOST*C*C;for(var B=M-L,G=A-O,N=M+L,j=A+O,V=0;V2*p.MAXCOST)break;R&&(M/=2),A=(h=C-M/2)+1.5*M}if(I<=p.MAXCOST)return L},E.addLabelData=function(v,x,g,y){var k=x.fontSize,h=x.width+k/3,M=Math.max(0,x.height-k/3),A=v.x,C=v.y,L=v.theta,O=Math.sin(L),I=Math.cos(L),R=function(B,G){return[A+B*I-G*O,C+B*O+G*I]},U=[R(-h/2,-M/2),R(-h/2,M/2),R(h/2,M/2),R(h/2,-M/2)];g.push({text:x.text,x:A,y:C,dy:x.dy,theta:L,level:x.level,width:h,height:M}),y.push(U)},E.drawLabels=function(v,x,g,y,k){var h=v.selectAll("text").data(x,function(C){return C.text+","+C.x+","+C.y+","+C.theta});if(h.exit().remove(),h.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each(function(C){var L=C.x+Math.sin(C.theta)*C.dy,O=C.y-Math.cos(C.theta)*C.dy;_.select(this).text(C.text).attr({x:L,y:O,transform:"rotate("+180*C.theta/Math.PI+" "+L+" "+O+")"}).call(m.convertToTspans,g)}),k){for(var M="",A=0;Af.end&&(f.start=f.end=(f.start+f.end)/2),T._input.contours||(T._input.contours={}),w.extendFlat(T._input.contours,{start:f.start,end:f.end,size:f.size}),T._input.autocontour=!0}else if(f.type!=="constraint"){var r,n=f.start,o=f.end,a=T._input.contours;n>o&&(f.start=a.start=o,o=f.end=a.end=n,n=f.start),f.size>0||(r=n===o?1:s(n,o,T.ncontours).dtick,a.size=f.size=r)}}},84426:function(D,E,e){var _=e(39898),w=e(91424),s=e(70035),T=e(86068);D.exports=function(m){var f=_.select(m).selectAll("g.contour");f.style("opacity",function(l){return l[0].trace.opacity}),f.each(function(l){var t=_.select(this),i=l[0].trace,r=i.contours,n=i.line,o=r.size||1,a=r.start,u=r.type==="constraint",p=!u&&r.coloring==="lines",c=!u&&r.coloring==="fill",b=p||c?T(i):null;t.selectAll("g.contourlevel").each(function(x){_.select(this).selectAll("path").call(w.lineGroupStyle,n.width,p?b(x.level):n.color,n.dash)});var d=r.labelfont;if(t.selectAll("g.contourlabels text").each(function(x){w.font(_.select(this),{family:d.family,size:d.size,color:d.color||(p?b(x.level):n.color)})}),u)t.selectAll("g.contourfill path").style("fill",i.fillcolor);else if(c){var v;t.selectAll("g.contourfill path").style("fill",function(x){return v===void 0&&(v=x.level),b(x.level+.5*o)}),v===void 0&&(v=a),t.selectAll("g.contourbg path").style("fill",b(v-.5*o))}}),s(m)}},8724:function(D,E,e){var _=e(1586),w=e(14523);D.exports=function(s,T,m,f,l){var t,i=m("contours.coloring"),r="";i==="fill"&&(t=m("contours.showlines")),t!==!1&&(i!=="lines"&&(r=m("line.color","#000")),m("line.width",.5),m("line.dash")),i!=="none"&&(s.showlegend!==!0&&(T.showlegend=!1),T._dfltShowLegend=!1,_(s,T,f,m,{prefix:"",cLetter:"z"})),m("line.smoothing"),w(m,f,r,l)}},88085:function(D,E,e){var _=e(21606),w=e(70600),s=e(50693),T=e(1426).extendFlat,m=w.contours;D.exports=T({carpet:{valType:"string",editType:"calc"},z:_.z,a:_.x,a0:_.x0,da:_.dx,b:_.y,b0:_.y0,db:_.dy,text:_.text,hovertext:_.hovertext,transpose:_.transpose,atype:_.xtype,btype:_.ytype,fillcolor:w.fillcolor,autocontour:w.autocontour,ncontours:w.ncontours,contours:{type:m.type,start:m.start,end:m.end,size:m.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:m.showlines,showlabels:m.showlabels,labelfont:m.labelfont,labelformat:m.labelformat,operation:m.operation,value:m.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:w.line.color,width:w.line.width,dash:w.line.dash,smoothing:w.line.smoothing,editType:"plot"},transforms:void 0},s("",{cLetter:"z",autoColorDflt:!1}))},59885:function(D,E,e){var _=e(78803),w=e(71828),s=e(68296),T=e(4742),m=e(824),f=e(43907),l=e(70769),t=e(75005),i=e(22882),r=e(18670);D.exports=function(n,o){var a=o._carpetTrace=i(n,o);if(a&&a.visible&&a.visible!=="legendonly"){if(!o.a||!o.b){var u=n.data[a.index],p=n.data[o.index];p.a||(p.a=u.a),p.b||(p.b=u.b),t(p,o,o._defaultColor,n._fullLayout)}var c=function(b,d){var v,x,g,y,k,h,M,A=d._carpetTrace,C=A.aaxis,L=A.baxis;C._minDtick=0,L._minDtick=0,w.isArray1D(d.z)&&s(d,C,L,"a","b",["z"]),v=d._a=d._a||d.a,y=d._b=d._b||d.b,v=v?C.makeCalcdata(d,"_a"):[],y=y?L.makeCalcdata(d,"_b"):[],x=d.a0||0,g=d.da||1,k=d.b0||0,h=d.db||1,M=d._z=T(d._z||d.z,d.transpose),d._emptypoints=f(M),m(M,d._emptypoints);var O=w.maxRowLength(M),I=d.xtype==="scaled"?"":v,R=l(d,I,x,g,O,C),U=d.ytype==="scaled"?"":y,B={a:R,b:l(d,U,k,h,M.length,L),z:M};return d.contours.type==="levels"&&d.contours.coloring!=="none"&&_(b,d,{vals:M,containerStr:"",cLetter:"z"}),[B]}(n,o);return r(o,o._z),c}}},75005:function(D,E,e){var _=e(71828),w=e(67684),s=e(88085),T=e(83179),m=e(67217),f=e(8724);D.exports=function(l,t,i,r){function n(o,a){return _.coerce(l,t,s,o,a)}if(n("carpet"),l.a&&l.b){if(!w(l,t,n,r,"a","b"))return void(t.visible=!1);n("text"),n("contours.type")==="constraint"?T(l,t,n,r,i,{hasHover:!1}):(m(l,t,n,function(o){return _.coerce2(l,t,s,o)}),f(l,t,n,r,{hasHover:!1}))}else t._defaultColor=i,t._length=null}},93740:function(D,E,e){D.exports={attributes:e(88085),supplyDefaults:e(75005),colorbar:e(90654),calc:e(59885),plot:e(51048),style:e(84426),moduleType:"trace",name:"contourcarpet",basePlotModule:e(93612),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}},51048:function(D,E,e){var _=e(39898),w=e(27669),s=e(67961),T=e(91424),m=e(71828),f=e(87678),l=e(81696),t=e(29854),i=e(36914),r=e(84857),n=e(87558),o=e(20083),a=e(22882),u=e(4536);function p(d,v,x){var g=d.getPointAtLength(v),y=d.getPointAtLength(x),k=y.x-g.x,h=y.y-g.y,M=Math.sqrt(k*k+h*h);return[k/M,h/M]}function c(d){var v=Math.sqrt(d[0]*d[0]+d[1]*d[1]);return[d[0]/v,d[1]/v]}function b(d,v){var x=Math.abs(d[0]*v[0]+d[1]*v[1]);return Math.sqrt(1-x*x)/x}D.exports=function(d,v,x,g){var y=v.xaxis,k=v.yaxis;m.makeTraceGroups(g,x,"contour").each(function(h){var M=_.select(this),A=h[0],C=A.trace,L=C._carpetTrace=a(d,C),O=d.calcdata[L.index][0];if(L.visible&&L.visible!=="legendonly"){var I=A.a,R=A.b,U=C.contours,B=n(U,v,A),G=U.type==="constraint",N=U._operation,j=G?N==="="?"lines":"fill":U.coloring,V=[[I[0],R[R.length-1]],[I[I.length-1],R[R.length-1]],[I[I.length-1],R[0]],[I[0],R[0]]];f(B);var H=1e-8*(I[I.length-1]-I[0]),ee=1e-8*(R[R.length-1]-R[0]);l(B,H,ee);var Q,Y,X,K,te=B;U.type==="constraint"&&(te=r(B,N)),function(fe,xe){var he,de,pe,ye,Re,we,Ae,Me,Ce;for(he=0;he=0;K--)Q=O.clipsegments[K],Y=w([],Q.x,y.c2p),X=w([],Q.y,k.c2p),Y.reverse(),X.reverse(),ae.push(s(Y,X,Q.bicubic));var oe="M"+ae.join("L")+"Z";(function(fe,xe,he,de,pe,ye){var Re,we,Ae,Me,Ce=m.ensureSingle(fe,"g","contourbg").selectAll("path").data(ye!=="fill"||pe?[]:[0]);Ce.enter().append("path"),Ce.exit().remove();var ne=[];for(Me=0;Me=0&&(st=ht,ft=yt):Math.abs(Ze[1]-st[1])=0&&(st=ht,ft=yt):m.log("endpt to newendpt is not vert. or horz.",Ze,st,ht)}if(ft>=0)break;Tt+=Ge(Ze,st),Ze=st}if(ft===Ue.edgepaths.length){m.log("unclosed perimeter path");break}Ye=ft,(Dt=xt.indexOf(Ye)===-1)&&(Ye=xt[0],Tt+=Ge(Ze,st)+"Z",Ze=null)}for(Ye=0;YeCt&&(Je.max=Ct),Je.len=Je.max-Je.min}function mt(Ot,_t){var Pt,Bt=0,Wt=.1;return(Math.abs(Ot[0]-Oe)0?+u[n]:0),o.push({type:"Feature",geometry:{type:"Point",coordinates:d},properties:v})}}var g=T.extractOpts(t),y=g.reversescale?T.flipScale(g.colorscale):g.colorscale,k=y[0][1],h=["interpolate",["linear"],["heatmap-density"],0,s.opacity(k)<1?k:s.addOpacity(k,0)];for(n=1;n=0;l--)m.removeLayer(f[l][1])},T.dispose=function(){var m=this.subplot.map;this._removeLayers(),m.removeSource(this.sourceId)},D.exports=function(m,f){var l=f[0].trace,t=new s(m,l.uid),i=t.sourceId,r=_(f),n=t.below=m.belowLookup["trace-"+l.uid];return m.map.addSource(i,{type:"geojson",data:r.geojson}),t._addLayers(r,n),t}},49789:function(D,E,e){var _=e(71828);D.exports=function(w,s){for(var T=0;T"),i.color=function(v,x){var g=v.marker,y=x.mc||g.color,k=x.mlc||g.line.color,h=x.mlw||g.line.width;return _(y)?y:_(k)&&h?k:void 0}(n,a),[i]}}},51759:function(D,E,e){D.exports={attributes:e(1285),layoutAttributes:e(10440),supplyDefaults:e(26199).supplyDefaults,crossTraceDefaults:e(26199).crossTraceDefaults,supplyLayoutDefaults:e(93138),calc:e(9532),crossTraceCalc:e(8984),plot:e(80461),style:e(68266).style,hoverPoints:e(63341),eventData:e(34598),selectPoints:e(81974),moduleType:"trace",name:"funnel",basePlotModule:e(93612),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},10440:function(D){D.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"}}},93138:function(D,E,e){var _=e(71828),w=e(10440);D.exports=function(s,T,m){var f=!1;function l(r,n){return _.coerce(s,T,w,r,n)}for(var t=0;t path").each(function(p){if(!p.isBlank){var c=u.marker;_.select(this).call(s.fill,p.mc||c.color).call(s.stroke,p.mlc||c.line.color).call(w.dashLine,c.line.dash,p.mlw||c.line.width).style("opacity",u.selectedpoints&&!p.selected?T:1)}}),l(a,u,t),a.selectAll(".regions").each(function(){_.select(this).selectAll("path").style("stroke-width",0).call(s.fill,u.connector.fillcolor)}),a.selectAll(".lines").each(function(){var p=u.connector.line;w.lineGroupStyle(_.select(this).selectAll("path"),p.width,p.color,p.dash)})})}}},86807:function(D,E,e){var _=e(34e3),w=e(9012),s=e(27670).Y,T=e(5386).fF,m=e(5386).si,f=e(1426).extendFlat;D.exports={labels:_.labels,label0:_.label0,dlabel:_.dlabel,values:_.values,marker:{colors:_.marker.colors,line:{color:f({},_.marker.line.color,{dflt:null}),width:f({},_.marker.line.width,{dflt:1}),editType:"calc"},editType:"calc"},text:_.text,hovertext:_.hovertext,scalegroup:f({},_.scalegroup,{}),textinfo:f({},_.textinfo,{flags:["label","text","value","percent"]}),texttemplate:m({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:f({},w.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:T({},{keys:["label","color","value","text","percent"]}),textposition:f({},_.textposition,{values:["inside","none"],dflt:"inside"}),textfont:_.textfont,insidetextfont:_.insidetextfont,title:{text:_.title.text,font:_.title.font,position:f({},_.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:s({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"}}},6452:function(D,E,e){var _=e(74875);E.name="funnelarea",E.plot=function(w,s,T,m){_.plotBasePlot(E.name,w,s,T,m)},E.clean=function(w,s,T,m){_.cleanBasePlot(E.name,w,s,T,m)}},89574:function(D,E,e){var _=e(32354);D.exports={calc:function(w,s){return _.calc(w,s)},crossTraceCalc:function(w){_.crossTraceCalc(w,{type:"funnelarea"})}}},86282:function(D,E,e){var _=e(71828),w=e(86807),s=e(27670).c,T=e(90769).handleText,m=e(37434).handleLabelsAndValues;D.exports=function(f,l,t,i){function r(v,x){return _.coerce(f,l,w,v,x)}var n=r("labels"),o=r("values"),a=m(n,o),u=a.len;if(l._hasLabels=a.hasLabels,l._hasValues=a.hasValues,!l._hasLabels&&l._hasValues&&(r("label0"),r("dlabel")),u){l._length=u,r("marker.line.width")&&r("marker.line.color",i.paper_bgcolor),r("marker.colors"),r("scalegroup");var p,c=r("text"),b=r("texttemplate");if(b||(p=r("textinfo",Array.isArray(c)?"text+percent":"percent")),r("hovertext"),r("hovertemplate"),b||p&&p!=="none"){var d=r("textposition");T(f,l,i,r,d,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}s(l,i,r),r("title.text")&&(r("title.position"),_.coerceFont(r,"title.font",i.font)),r("aspectratio"),r("baseratio")}else l.visible=!1}},10421:function(D,E,e){D.exports={moduleType:"trace",name:"funnelarea",basePlotModule:e(6452),categories:["pie-like","funnelarea","showLegend"],attributes:e(86807),layoutAttributes:e(80097),supplyDefaults:e(86282),supplyLayoutDefaults:e(57402),calc:e(89574).calc,crossTraceCalc:e(89574).crossTraceCalc,plot:e(79187),style:e(71858),styleOne:e(63463),meta:{}}},80097:function(D,E,e){var _=e(92774).hiddenlabels;D.exports={hiddenlabels:_,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}},57402:function(D,E,e){var _=e(71828),w=e(80097);D.exports=function(s,T){function m(f,l){return _.coerce(s,T,w,f,l)}m("hiddenlabels"),m("funnelareacolorway",T.colorway),m("extendfunnelareacolors")}},79187:function(D,E,e){var _=e(39898),w=e(91424),s=e(71828),T=s.strScale,m=s.strTranslate,f=e(63893),l=e(17295).toMoveInsideBar,t=e(72597),i=t.recordMinTextSize,r=t.clearMinTextSize,n=e(53581),o=e(14575),a=o.attachFxHandlers,u=o.determineInsideTextFont,p=o.layoutAreas,c=o.prerenderTitles,b=o.positionTitleOutside,d=o.formatSliceLabel;function v(x,g){return"l"+(g[0]-x[0])+","+(g[1]-x[1])}D.exports=function(x,g){var y=x._context.staticPlot,k=x._fullLayout;r("funnelarea",k),c(g,x),p(g,k._size),s.makeTraceGroups(k._funnelarealayer,g,"trace").each(function(h){var M=_.select(this),A=h[0],C=A.trace;(function(L){if(L.length){var O=L[0],I=O.trace,R=I.aspectratio,U=I.baseratio;U>.999&&(U=.999);var B,G,N,j=Math.pow(U,2),V=O.vTotal,H=V,ee=V*j/(1-j)/V,Q=[];for(Q.push(Ae()),G=L.length-1;G>-1;G--)if(!(N=L[G]).hidden){var Y=N.v/H;ee+=Y,Q.push(Ae())}var X=1/0,K=-1/0;for(G=0;G-1;G--)if(!(N=L[G]).hidden){var Re=Q[ye+=1][0],we=Q[ye][1];N.TL=[-Re,we],N.TR=[Re,we],N.BL=de,N.BR=pe,N.pxmid=(xe=N.TR,he=N.BR,[.5*(xe[0]+he[0]),.5*(xe[1]+he[1])]),de=N.TL,pe=N.TR}}function Ae(){var Me,Ce={x:Me=Math.sqrt(ee),y:-Me};return[Ce.x,Ce.y]}})(h),M.each(function(){var L=_.select(this).selectAll("g.slice").data(h);L.enter().append("g").classed("slice",!0),L.exit().remove(),L.each(function(I,R){if(I.hidden)_.select(this).selectAll("path,g").remove();else{I.pointNumber=I.i,I.curveNumber=C.index;var U=A.cx,B=A.cy,G=_.select(this),N=G.selectAll("path.surface").data([I]);N.enter().append("path").classed("surface",!0).style({"pointer-events":y?"none":"all"}),G.call(a,x,h);var j="M"+(U+I.TR[0])+","+(B+I.TR[1])+v(I.TR,I.BR)+v(I.BR,I.BL)+v(I.BL,I.TL)+"Z";N.attr("d",j),d(x,I,A);var V=n.castOption(C.textposition,I.pts),H=G.selectAll("g.slicetext").data(I.text&&V!=="none"?[0]:[]);H.enter().append("g").classed("slicetext",!0),H.exit().remove(),H.each(function(){var ee=s.ensureSingle(_.select(this),"text","",function(se){se.attr("data-notex",1)}),Q=s.ensureUniformFontSize(x,u(C,I,k.font));ee.text(I.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(w.font,Q).call(f.convertToTspans,x);var Y,X,K,te=w.bBox(ee.node()),ae=Math.min(I.BL[1],I.BR[1])+B,oe=Math.max(I.TL[1],I.TR[1])+B;X=Math.max(I.TL[0],I.BL[0])+U,K=Math.min(I.TR[0],I.BR[0])+U,(Y=l(X,K,ae,oe,te,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"})).fontSize=Q.size,i(C.type,Y,k),h[R].transform=Y,s.setTransormAndDisplay(ee,Y)})}});var O=_.select(this).selectAll("g.titletext").data(C.title.text?[0]:[]);O.enter().append("g").classed("titletext",!0),O.exit().remove(),O.each(function(){var I=s.ensureSingle(_.select(this),"text","",function(B){B.attr("data-notex",1)}),R=C.title.text;C._meta&&(R=s.templateString(R,C._meta)),I.text(R).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(w.font,C.title.font).call(f.convertToTspans,x);var U=b(A,k._size);I.attr("transform",m(U.x,U.y)+T(Math.min(1,U.scale))+m(U.tx,U.ty))})})})}},71858:function(D,E,e){var _=e(39898),w=e(63463),s=e(72597).resizeText;D.exports=function(T){var m=T._fullLayout._funnelarealayer.selectAll(".trace");s(T,m,"funnelarea"),m.each(function(f){var l=f[0].trace,t=_.select(this);t.style({opacity:l.opacity}),t.selectAll("path.surface").each(function(i){_.select(this).call(w,i,l)})})}},21606:function(D,E,e){var _=e(82196),w=e(9012),s=e(41940),T=e(12663).axisHoverFormat,m=e(5386).fF,f=e(5386).si,l=e(50693),t=e(1426).extendFlat;D.exports=t({z:{valType:"data_array",editType:"calc"},x:t({},_.x,{impliedEdits:{xtype:"array"}}),x0:t({},_.x0,{impliedEdits:{xtype:"scaled"}}),dx:t({},_.dx,{impliedEdits:{xtype:"scaled"}}),y:t({},_.y,{impliedEdits:{ytype:"array"}}),y0:t({},_.y0,{impliedEdits:{ytype:"scaled"}}),dy:t({},_.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:t({},_.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:t({},_.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:t({},_.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:t({},_.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:t({},_.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:t({},_.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:T("x"),yhoverformat:T("y"),zhoverformat:T("z",1),hovertemplate:m(),texttemplate:f({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:s({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:t({},w.showlegend,{dflt:!1})},{transforms:void 0},l("",{cLetter:"z",autoColorDflt:!1}))},90757:function(D,E,e){var _=e(73972),w=e(71828),s=e(89298),T=e(42973),m=e(17562),f=e(78803),l=e(68296),t=e(4742),i=e(824),r=e(43907),n=e(70769),o=e(50606).BADNUM;function a(u){for(var p=[],c=u.length,b=0;bj){G("x scale is not linear");break}}if(x.length&&U==="fast"){var V=(x[x.length-1]-x[0])/(x.length-1),H=Math.abs(V/100);for(M=0;MH){G("y scale is not linear");break}}}}var ee=w.maxRowLength(h),Q=p.xtype==="scaled"?"":c,Y=n(p,Q,b,d,ee,C),X=p.ytype==="scaled"?"":x,K=n(p,X,g,y,h.length,L);R||(p._extremes[C._id]=s.findExtremes(C,Y),p._extremes[L._id]=s.findExtremes(L,K));var te={x:Y,y:K,z:h,text:p._text||p.text,hovertext:p._hovertext||p.hovertext};if(p.xperiodalignment&&v&&(te.orig_x=v),p.yperiodalignment&&k&&(te.orig_y=k),Q&&Q.length===Y.length-1&&(te.xCenter=Q),X&&X.length===K.length-1&&(te.yCenter=X),I&&(te.xRanges=A.xRanges,te.yRanges=A.yRanges,te.pts=A.pts),O||f(u,p,{vals:h,cLetter:"z"}),O&&p.contours&&p.contours.coloring==="heatmap"){var ae={type:p.type==="contour"?"heatmap":"histogram2d",xcalendar:p.xcalendar,ycalendar:p.ycalendar};te.xfill=n(ae,Q,b,d,ee,C),te.yfill=n(ae,X,g,y,h.length,L)}return[te]}},4742:function(D,E,e){var _=e(92770),w=e(71828),s=e(50606).BADNUM;D.exports=function(T,m,f,l){var t,i,r,n,o,a;function u(x){if(_(x))return+x}if(m&&m.transpose){for(t=0,o=0;o=0;l--)(t=((o[[(T=(f=a[l])[0])-1,m=f[1]]]||c)[2]+(o[[T+1,m]]||c)[2]+(o[[T,m-1]]||c)[2]+(o[[T,m+1]]||c)[2])/20)&&(i[f]=[T,m,t],a.splice(l,1),r=!0);if(!r)throw"findEmpties iterated with no new neighbors";for(f in i)o[f]=i[f],n.push(i[f])}return n.sort(function(d,v){return v[2]-d[2]})}},46248:function(D,E,e){var _=e(30211),w=e(71828),s=e(89298),T=e(21081).extractOpts;D.exports=function(m,f,l,t,i){i||(i={});var r,n,o,a,u=i.isContour,p=m.cd[0],c=p.trace,b=m.xa,d=m.ya,v=p.x,x=p.y,g=p.z,y=p.xCenter,k=p.yCenter,h=p.zmask,M=c.zhoverformat,A=v,C=x;if(m.index!==!1){try{o=Math.round(m.index[1]),a=Math.round(m.index[0])}catch{return void w.error("Error hovering on heatmap, pointNumber must be [row,col], found:",m.index)}if(o<0||o>=g[0].length||a<0||a>g.length)return}else{if(_.inbox(f-v[0],f-v[v.length-1],0)>0||_.inbox(l-x[0],l-x[x.length-1],0)>0)return;if(u){var L;for(A=[2*v[0]-v[1]],L=1;Lv&&(g=Math.max(g,Math.abs(m[i][r]-d)/(x-v))))}return g}D.exports=function(m,f){var l,t=1;for(T(m,f),l=0;l.01;l++)t=T(m,f,s(t));return t>.01&&_.log("interp2d didn't converge quickly",t),m}},58623:function(D,E,e){var _=e(71828);D.exports=function(w,s){w("texttemplate");var T=_.extendFlat({},s.font,{color:"auto",size:"auto"});_.coerceFont(w,"textfont",T)}},70769:function(D,E,e){var _=e(73972),w=e(71828).isArrayOrTypedArray;D.exports=function(s,T,m,f,l,t){var i,r,n,o=[],a=_.traceIs(s,"contour"),u=_.traceIs(s,"histogram"),p=_.traceIs(s,"gl2d");if(w(T)&&T.length>1&&!u&&t.type!=="category"){var c=T.length;if(!(c<=l))return a?T.slice(0,l):T.slice(0,l+1);if(a||p)o=T.slice(0,l);else if(l===1)o=[T[0]-.5,T[0]+.5];else{for(o=[1.5*T[0]-.5*T[1]],n=1;n0;)L=h.c2p(Y[U]),U--;for(L0;)R=M.c2p(X[U]),U--;if(RGt||Gt>M._length))for(B=_t;BKt||Kt>h._length)){var nn=t({x:Xt,y:Wt},V,x._fullLayout);nn.x=Xt,nn.y=Wt;var yn=j.z[U][B];yn===void 0?(nn.z="",nn.zLabel=""):(nn.z=yn,nn.zLabel=m.tickText(Lt,yn,"hover").text);var ln=j.text&&j.text[U]&&j.text[U][B];ln!==void 0&&ln!==!1||(ln=""),nn.text=ln;var kn=f.texttemplateString(pt,nn,x._fullLayout._d3locale,nn,V._meta||{});if(kn){var Wn=kn.split("
"),wn=Wn.length,on=0;for(G=0;G0&&(v=!0);for(var y=0;yf){var l=f-T[w];return T[w]=f,l}}return 0},max:function(w,s,T,m){var f=m[s];if(_(f)){if(f=Number(f),!_(T[w]))return T[w]=f,f;if(T[w]l?a>T?a>1.1*w?w:a>1.1*s?s:T:a>m?m:a>f?f:l:Math.pow(10,Math.floor(Math.log(a)/Math.LN10))}function n(a,u,p,c,b,d){if(c&&a>T){var v=o(u,b,d),x=o(p,b,d),g=a===w?0:1;return v[g]!==x[g]}return Math.floor(p/a)-Math.floor(u/a)>.1}function o(a,u,p){var c=u.c2d(a,w,p).split("-");return c[0]===""&&(c.unshift(),c[0]="-"+c[0]),c}D.exports=function(a,u,p,c,b){var d,v,x=-1.1*u,g=-.1*u,y=a-g,k=p[0],h=p[1],M=Math.min(i(k+g,k+y,c,b),i(h+g,h+y,c,b)),A=Math.min(i(k+x,k+g,c,b),i(h+x,h+g,c,b));if(M>A&&AT){var C=d===w?1:6,L=d===w?"M12":"M1";return function(O,I){var R=c.c2d(O,w,b),U=R.indexOf("-",C);U>0&&(R=R.substr(0,U));var B=c.d2c(R,0,b);if(Ba.r2l(te)&&(oe=T.tickIncrement(oe,A.size,!0,v)),Q.start=a.l2r(oe),K||w.nestedProperty(o,k+".start").set(Q.start)}var se=A.end,fe=a.r2l(ee.end),xe=fe!==void 0;if((A.endFound||xe)&&fe!==a.r2l(se)){var he=xe?fe:w.aggNums(Math.max,null,x);Q.end=a.l2r(he),xe||w.nestedProperty(o,k+".start").set(Q.end)}var de="autobin"+u;return o._input[de]===!1&&(o._input[k]=w.extendFlat({},o[k]||{}),delete o._input[de],delete o[de]),[Q,x]}D.exports={calc:function(n,o){var a,u,p,c,b=[],d=[],v=o.orientation==="h",x=T.getFromId(n,v?o.yaxis:o.xaxis),g=v?"y":"x",y={x:"y",y:"x"}[g],k=o[g+"calendar"],h=o.cumulative,M=r(n,o,x,g),A=M[0],C=M[1],L=typeof A.size=="string",O=[],I=L?O:A,R=[],U=[],B=[],G=0,N=o.histnorm,j=o.histfunc,V=N.indexOf("density")!==-1;h.enabled&&V&&(N=N.replace(/ ?density$/,""),V=!1);var H,ee=j==="max"||j==="min"?null:0,Q=f.count,Y=l[N],X=!1,K=function(Ce){return x.r2c(Ce,0,k)};for(w.isArrayOrTypedArray(o[y])&&j!=="count"&&(H=o[y],X=j==="avg",Q=f[j]),a=K(A.start),p=K(A.end)+(a-T.tickIncrement(a,A.size,!1,k))/1e6;a=0&&c=0;me--)De(me);else if(ne==="increasing"){for(me=1;me=0;me--)Ce[me]+=Ce[me+1];ue==="exclude"&&(Ce.push(0),Ce.shift())}}(d,h.direction,h.currentbin);var ye=Math.min(b.length,d.length),Re=[],we=0,Ae=ye-1;for(a=0;a=we;a--)if(d[a]){Ae=a;break}for(a=we;a<=Ae;a++)if(_(b[a])&&_(d[a])){var Me={p:b[a],s:d[a],b:0};h.enabled||(Me.pts=B[a],fe?Me.ph0=Me.ph1=B[a].length?C[B[a][0]]:b[a]:(o._computePh=!0,Me.ph0=oe(O[a]),Me.ph1=oe(O[a+1],!0))),Re.push(Me)}return Re.length===1&&(Re[0].width1=T.tickIncrement(Re[0].p,A.size,!1,k)-Re[0].p),m(Re,o),w.isArrayOrTypedArray(o.selectedpoints)&&w.tagSelected(Re,o,de),Re},calcAllAutoBins:r}},72406:function(D){D.exports={eventDataKeys:["binNumber"]}},82222:function(D,E,e){var _=e(71828),w=e(41675),s=e(73972).traceIs,T=e(26125),m=_.nestedProperty,f=e(99082).getAxisGroup,l=[{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"];D.exports=function(i,r){var n,o,a,u,p,c,b,d=r._histogramBinOpts={},v=[],x={},g=[];function y(V,H){return _.coerce(n._input,n,n._module.attributes,V,H)}function k(V){return V.orientation==="v"?"x":"y"}function h(V,H,ee){var Q=V.uid+"__"+ee;H||(H=Q);var Y=function(ae,oe){return w.getFromTrace({_fullLayout:r},ae,oe).type}(V,ee),X=V[ee+"calendar"]||"",K=d[H],te=!0;K&&(Y===K.axType&&X===K.calendar?(te=!1,K.traces.push(V),K.dirs.push(ee)):(H=Q,Y!==K.axType&&_.warn(["Attempted to group the bins of trace",V.index,"set on a","type:"+Y,"axis","with bins on","type:"+K.axType,"axis."].join(" ")),X!==K.calendar&&_.warn(["Attempted to group the bins of trace",V.index,"set with a",X,"calendar","with bins",K.calendar?"on a "+K.calendar+" calendar":"w/o a set calendar"].join(" ")))),te&&(d[H]={traces:[V],dirs:[ee],axType:Y,calendar:V[ee+"calendar"]||""}),V["_"+ee+"bingroup"]=H}for(p=0;pO&&M.splice(O,M.length-O),L.length>O&&L.splice(O,L.length-O);var I=[],R=[],U=[],B=typeof h.size=="string",G=typeof C.size=="string",N=[],j=[],V=B?N:h,H=G?j:C,ee=0,Q=[],Y=[],X=o.histnorm,K=o.histfunc,te=X.indexOf("density")!==-1,ae=K==="max"||K==="min"?null:0,oe=s.count,se=T[X],fe=!1,xe=[],he=[],de="z"in o?o.z:"marker"in o&&Array.isArray(o.marker.color)?o.marker.color:"";de&&K!=="count"&&(fe=K==="avg",oe=s[K]);var pe=h.size,ye=g(h.start),Re=g(h.end)+(ye-w.tickIncrement(ye,pe,!1,v))/1e6;for(a=ye;a=0&&p=0&&c-1,flipY:R.tiling.flip.indexOf("y")>-1,orientation:R.tiling.orientation,pad:{inner:R.tiling.pad},maxDepth:R._maxDepth}).descendants(),j=1/0,V=-1/0;N.forEach(function(X){var K=X.depth;K>=R._maxDepth?(X.x0=X.x1=(X.x0+X.x1)/2,X.y0=X.y1=(X.y0+X.y1)/2):(j=Math.min(j,K),V=Math.max(V,K))}),p=p.data(N,t.getPtId),R._maxVisibleLayers=isFinite(V)?V-j+1:0,p.enter().append("g").classed("slice",!0),M(p,n,{},[b,d],g),p.order();var H=null;if(h&&L){var ee=t.getPtId(L);p.each(function(X){H===null&&t.getPtId(X)===ee&&(H={x0:X.x0,x1:X.x1,y0:X.y0,y1:X.y1})})}var Q=function(){return H||{x0:0,x1:b,y0:0,y1:d}},Y=p;return h&&(Y=Y.transition().each("end",function(){var X=_.select(this);t.setSliceCursor(X,o,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),Y.each(function(X){X._x0=v(X.x0),X._x1=v(X.x1),X._y0=x(X.y0),X._y1=x(X.y1),X._hoverX=v(X.x1-R.tiling.pad),X._hoverY=x(G?X.y1-R.tiling.pad/2:X.y0+R.tiling.pad/2);var K=_.select(this),te=w.ensureSingle(K,"path","surface",function(fe){fe.style("pointer-events",O?"none":"all")});h?te.transition().attrTween("d",function(fe){var xe=A(fe,n,Q(),[b,d],{orientation:R.tiling.orientation,flipX:R.tiling.flip.indexOf("x")>-1,flipY:R.tiling.flip.indexOf("y")>-1});return function(he){return g(xe(he))}}):te.attr("d",g),K.call(i,u,o,a,{styleOne:f,eventDataKeys:l.eventDataKeys,transitionTime:l.CLICK_TRANSITION_TIME,transitionEasing:l.CLICK_TRANSITION_EASING}).call(t.setSliceCursor,o,{isTransitioning:o._transitioning}),te.call(f,X,R,{hovered:!1}),X.x0===X.x1||X.y0===X.y1?X._text="":X._text=r(X,u,R,a,I)||"";var ae=w.ensureSingle(K,"g","slicetext"),oe=w.ensureSingle(ae,"text","",function(fe){fe.attr("data-notex",1)}),se=w.ensureUniformFontSize(o,t.determineTextFont(R,X,I.font));oe.text(X._text||" ").classed("slicetext",!0).attr("text-anchor",B?"end":U?"start":"middle").call(s.font,se).call(T.convertToTspans,o),X.textBB=s.bBox(oe.node()),X.transform=y(X,{fontSize:se.size}),X.transform.fontSize=se.size,h?oe.transition().attrTween("transform",function(fe){var xe=C(fe,n,Q(),[b,d]);return function(he){return k(xe(he))}}):oe.attr("transform",k(X))}),H}},69816:function(D,E,e){D.exports={moduleType:"trace",name:"icicle",basePlotModule:e(96346),categories:[],animatable:!0,attributes:e(46291),layoutAttributes:e(92894),supplyDefaults:e(56524),supplyLayoutDefaults:e(21070),calc:e(46584).y,crossTraceCalc:e(46584).T,plot:e(85596),style:e(82454).style,colorbar:e(4898),meta:{}}},92894:function(D){D.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},21070:function(D,E,e){var _=e(71828),w=e(92894);D.exports=function(s,T){function m(f,l){return _.coerce(s,T,w,f,l)}m("iciclecolorway",T.colorway),m("extendiciclecolors")}},21538:function(D,E,e){var _=e(674),w=e(14102);D.exports=function(s,T,m){var f=m.flipX,l=m.flipY,t=m.orientation==="h",i=m.maxDepth,r=T[0],n=T[1];i&&(r=(s.height+1)*T[0]/Math.min(s.height+1,i),n=(s.height+1)*T[1]/Math.min(s.height+1,i));var o=_.partition().padding(m.pad.inner).size(t?[T[1],r]:[T[0],n])(s);return(t||f||l)&&w(o,T,{swapXY:t,flipX:f,flipY:l}),o}},85596:function(D,E,e){var _=e(80694),w=e(90666);D.exports=function(s,T,m,f){return _(s,T,m,f,{type:"icicle",drawDescendants:w})}},82454:function(D,E,e){var _=e(39898),w=e(7901),s=e(71828),T=e(72597).resizeText;function m(f,l,t){var i=l.data.data,r=!l.children,n=i.i,o=s.castOption(t,n,"marker.line.color")||w.defaultLine,a=s.castOption(t,n,"marker.line.width")||0;f.style("stroke-width",a).call(w.fill,i.color).call(w.stroke,o).style("opacity",r?t.leaf.opacity:null)}D.exports={style:function(f){var l=f._fullLayout._iciclelayer.selectAll(".trace");T(f,l,"icicle"),l.each(function(t){var i=_.select(this),r=t[0].trace;i.style("opacity",r.opacity),i.selectAll("path.surface").each(function(n){_.select(this).call(m,n,r)})})},styleOne:m}},17230:function(D,E,e){for(var _=e(9012),w=e(5386).fF,s=e(1426).extendFlat,T=e(51877).colormodel,m=["rgb","rgba","rgba256","hsl","hsla"],f=[],l=[],t=0;t0||_.inbox(f-l.y0,f-(l.y0+l.h*t.dy),0)>0)){var n,o=Math.floor((m-l.x0)/t.dx),a=Math.floor(Math.abs(f-l.y0)/t.dy);if(t._hasZ?n=l.z[a][o]:t._hasSource&&(n=t._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(o,a,1,1).data),n){var u,p=l.hi||t.hoverinfo;if(p){var c=p.split("+");c.indexOf("all")!==-1&&(c=["color"]),c.indexOf("color")!==-1&&(u=!0)}var b,d=s.colormodel[t.colormodel],v=d.colormodel||t.colormodel,x=v.length,g=t._scaler(n),y=d.suffix,k=[];(t.hovertemplate||u)&&(k.push("["+[g[0]+y[0],g[1]+y[1],g[2]+y[2]].join(", ")),x===4&&k.push(", "+g[3]+y[3]),k.push("]"),k=k.join(""),T.extraText=v.toUpperCase()+": "+k),Array.isArray(t.hovertext)&&Array.isArray(t.hovertext[a])?b=t.hovertext[a][o]:Array.isArray(t.text)&&Array.isArray(t.text[a])&&(b=t.text[a][o]);var h=r.c2p(l.y0+(a+.5)*t.dy),M=l.x0+(o+.5)*t.dx,A=l.y0+(a+.5)*t.dy,C="["+n.slice(0,t.colormodel.length).join(", ")+"]";return[w.extendFlat(T,{index:[a,o],x0:i.c2p(l.x0+o*t.dx),x1:i.c2p(l.x0+(o+1)*t.dx),y0:h,y1:h,color:g,xVal:M,xLabelVal:M,yVal:A,yLabelVal:A,zLabelVal:C,text:b,hovertemplateLabels:{zLabel:C,colorLabel:k,"color[0]Label":g[0]+y[0],"color[1]Label":g[1]+y[1],"color[2]Label":g[2]+y[2],"color[3]Label":g[3]+y[3]}})]}}}},94507:function(D,E,e){D.exports={attributes:e(17230),supplyDefaults:e(13245),calc:e(71113),plot:e(60775),style:e(12826),hoverPoints:e(28749),eventData:e(30835),moduleType:"trace",name:"image",basePlotModule:e(93612),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}},60775:function(D,E,e){var _=e(39898),w=e(71828),s=w.strTranslate,T=e(77922),m=e(51877),f=w.isIOS()||w.isSafari()||w.isIE();D.exports=function(l,t,i,r){var n=t.xaxis,o=t.yaxis,a=!(f||l._context._exportedPlot);w.makeTraceGroups(r,i,"im").each(function(u){var p=_.select(this),c=u[0],b=c.trace,d=(b.zsmooth==="fast"||b.zsmooth===!1&&a)&&!b._hasZ&&b._hasSource&&n.type==="linear"&&o.type==="linear";b._realImage=d;var v,x,g,y,k,h,M=c.z,A=c.x0,C=c.y0,L=c.w,O=c.h,I=b.dx,R=b.dy;for(h=0;v===void 0&&h0;)x=n.c2p(A+h*I),h--;for(h=0;y===void 0&&h0;)k=o.c2p(C+h*R),h--;xV[0];if(H||ee){var Q=v+U/2,Y=y+B/2;N+="transform:"+s(Q+"px",Y+"px")+"scale("+(H?-1:1)+","+(ee?-1:1)+")"+s(-Q+"px",-Y+"px")+";"}}G.attr("style",N);var X=new Promise(function(te){if(b._hasZ)te();else if(b._hasSource)if(b._canvas&&b._canvas.el.width===L&&b._canvas.el.height===O&&b._canvas.source===b.source)te();else{var ae=document.createElement("canvas");ae.width=L,ae.height=O;var oe=ae.getContext("2d",{willReadFrequently:!0});b._image=b._image||new Image;var se=b._image;se.onload=function(){oe.drawImage(se,0,0),b._canvas={el:ae,source:b.source},te()},se.setAttribute("src",b.source)}}).then(function(){var te,ae;if(b._hasZ)ae=K(function(se,fe){return M[fe][se]}),te=ae.toDataURL("image/png");else if(b._hasSource)if(d)te=b.source;else{var oe=b._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,L,O).data;ae=K(function(se,fe){var xe=4*(fe*L+se);return[oe[xe],oe[xe+1],oe[xe+2],oe[xe+3]]}),te=ae.toDataURL("image/png")}G.attr({"xlink:href":te,height:B,width:U,x:v,y})});l._promises.push(X)}function K(te){var ae=document.createElement("canvas");ae.width=U,ae.height=B;var oe,se=ae.getContext("2d",{willReadFrequently:!0}),fe=function(Ce){return w.constrain(Math.round(n.c2p(A+Ce*I)-v),0,U)},xe=function(Ce){return w.constrain(Math.round(o.c2p(C+Ce*R)-y),0,B)},he=m.colormodel[b.colormodel],de=he.colormodel||b.colormodel,pe=he.fmt;for(h=0;h0}function g(A){A.each(function(C){c.stroke(_.select(this),C.line.color)}).each(function(C){c.fill(_.select(this),C.color)}).style("stroke-width",function(C){return C.line.width})}function y(A,C,L){var O=A._fullLayout,I=T.extendFlat({type:"linear",ticks:"outside",range:L,showline:!0},C),R={type:"linear",_id:"x"+C._id},U={letter:"x",font:O.font,noHover:!0,noTickson:!0};function B(G,N){return T.coerce(I,R,p,G,N)}return a(I,R,B,U,O),u(I,R,B,U),R}function k(A,C,L){return[Math.min(C/A.width,L/A.height),A,C+"x"+L]}function h(A,C,L,O){var I=document.createElementNS("http://www.w3.org/2000/svg","text"),R=_.select(I);return R.text(A).attr("x",0).attr("y",0).attr("text-anchor",L).attr("data-unformatted",A).call(n.convertToTspans,O).call(i.font,C),i.bBox(R.node())}function M(A,C,L,O,I,R){var U="_cache"+C;A[U]&&A[U].key===I||(A[U]={key:I,value:L});var B=T.aggNums(R,null,[A[U].value,O],2);return A[U].value=B,B}D.exports=function(A,C,L,O){var I,R=A._fullLayout;x(L)&&O&&(I=O()),T.makeTraceGroups(R._indicatorlayer,C,"trace").each(function(U){var B,G,N,j,V,H=U[0].trace,ee=_.select(this),Q=H._hasGauge,Y=H._isAngular,X=H._isBullet,K=H.domain,te={w:R._size.w*(K.x[1]-K.x[0]),h:R._size.h*(K.y[1]-K.y[0]),l:R._size.l+R._size.w*K.x[0],r:R._size.r+R._size.w*(1-K.x[1]),t:R._size.t+R._size.h*(1-K.y[1]),b:R._size.b+R._size.h*K.y[0]},ae=te.l+te.w/2,oe=te.t+te.h/2,se=Math.min(te.w/2,te.h),fe=r.innerRadius*se,xe=H.align||"center";if(G=oe,Q){if(Y&&(B=ae,G=oe+se/2,N=function(Me){return function(Ce,ne){return[ne/Math.sqrt(Ce.width/2*(Ce.width/2)+Ce.height*Ce.height),Ce,ne]}(Me,.9*fe)}),X){var he=r.bulletPadding,de=1-r.bulletNumberDomainSize+he;B=te.l+(de+(1-de)*d[xe])*te.w,N=function(Me){return k(Me,(r.bulletNumberDomainSize-he)*te.w,te.h)}}}else B=te.l+d[xe]*te.w,N=function(Me){return k(Me,te.w,te.h)};(function(Me,Ce,ne,ue){var me,Te,Ee,Ue=ne[0].trace,De=ue.numbersX,je=ue.numbersY,ge=Ue.align||"center",be=b[ge],Se=ue.transitionOpts,Ne=ue.onComplete,Ye=T.ensureSingle(Ce,"g","numbers"),Ze=[];Ue._hasNumber&&Ze.push("number"),Ue._hasDelta&&(Ze.push("delta"),Ue.delta.position==="left"&&Ze.reverse());var st=Ye.selectAll("text").data(Ze);function ot(Ft,qt,Nt,Je){if(!Ft.match("s")||Nt>=0==Je>=0||qt(Nt).slice(-1).match(v)||qt(Je).slice(-1).match(v))return qt;var Ke=Ft.slice().replace("s","f").replace(/\d+/,function(nt){return parseInt(nt)-1}),Ge=y(Me,{tickformat:Ke});return function(nt){return Math.abs(nt)<1?o.tickText(Ge,nt).text:qt(nt)}}st.enter().append("text"),st.attr("text-anchor",function(){return be}).attr("class",function(Ft){return Ft}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),st.exit().remove();var ft,yt=Ue.mode+Ue.align;if(Ue._hasDelta&&(ft=function(){var Ft=y(Me,{tickformat:Ue.delta.valueformat},Ue._range);Ft.setScale(),o.prepTicks(Ft);var qt=function(Be){return o.tickText(Ft,Be).text},Nt=Ue.delta.suffix,Je=Ue.delta.prefix,Ke=function(Be){return Ue.delta.relative?Be.relativeDelta:Be.delta},Ge=function(Be,Qe){return Be===0||typeof Be!="number"||isNaN(Be)?"-":(Be>0?Ue.delta.increasing.symbol:Ue.delta.decreasing.symbol)+Je+Qe(Be)+Nt},nt=function(Be){return Be.delta>=0?Ue.delta.increasing.color:Ue.delta.decreasing.color};Ue._deltaLastValue===void 0&&(Ue._deltaLastValue=Ke(ne[0]));var ht=Ye.select("text.delta");function Oe(){ht.text(Ge(Ke(ne[0]),qt)).call(c.fill,nt(ne[0])).call(n.convertToTspans,Me)}return ht.call(i.font,Ue.delta.font).call(c.fill,nt({delta:Ue._deltaLastValue})),x(Se)?ht.transition().duration(Se.duration).ease(Se.easing).tween("text",function(){var Be=_.select(this),Qe=Ke(ne[0]),ut=Ue._deltaLastValue,pt=ot(Ue.delta.valueformat,qt,ut,Qe),bt=s(ut,Qe);return Ue._deltaLastValue=Qe,function(Lt){Be.text(Ge(bt(Lt),pt)),Be.call(c.fill,nt({delta:bt(Lt)}))}}).each("end",function(){Oe(),Ne&&Ne()}).each("interrupt",function(){Oe(),Ne&&Ne()}):Oe(),Te=h(Ge(Ke(ne[0]),qt),Ue.delta.font,be,Me),ht}(),yt+=Ue.delta.position+Ue.delta.font.size+Ue.delta.font.family+Ue.delta.valueformat,yt+=Ue.delta.increasing.symbol+Ue.delta.decreasing.symbol,Ee=Te),Ue._hasNumber&&(function(){var Ft=y(Me,{tickformat:Ue.number.valueformat},Ue._range);Ft.setScale(),o.prepTicks(Ft);var qt=function(nt){return o.tickText(Ft,nt).text},Nt=Ue.number.suffix,Je=Ue.number.prefix,Ke=Ye.select("text.number");function Ge(){var nt=typeof ne[0].y=="number"?Je+qt(ne[0].y)+Nt:"-";Ke.text(nt).call(i.font,Ue.number.font).call(n.convertToTspans,Me)}x(Se)?Ke.transition().duration(Se.duration).ease(Se.easing).each("end",function(){Ge(),Ne&&Ne()}).each("interrupt",function(){Ge(),Ne&&Ne()}).attrTween("text",function(){var nt=_.select(this),ht=s(ne[0].lastY,ne[0].y);Ue._lastValue=ne[0].y;var Oe=ot(Ue.number.valueformat,qt,ne[0].lastY,ne[0].y);return function(Be){nt.text(Je+Oe(ht(Be))+Nt)}}):Ge(),me=h(Je+qt(ne[0].y)+Nt,Ue.number.font,be,Me)}(),yt+=Ue.number.font.size+Ue.number.font.family+Ue.number.valueformat+Ue.number.suffix+Ue.number.prefix,Ee=me),Ue._hasDelta&&Ue._hasNumber){var Et,Tt,xt=[(me.left+me.right)/2,(me.top+me.bottom)/2],Dt=[(Te.left+Te.right)/2,(Te.top+Te.bottom)/2],It=.75*Ue.delta.font.size;Ue.delta.position==="left"&&(Et=M(Ue,"deltaPos",0,-1*(me.width*d[Ue.align]+Te.width*(1-d[Ue.align])+It),yt,Math.min),Tt=xt[1]-Dt[1],Ee={width:me.width+Te.width+It,height:Math.max(me.height,Te.height),left:Te.left+Et,right:me.right,top:Math.min(me.top,Te.top+Tt),bottom:Math.max(me.bottom,Te.bottom+Tt)}),Ue.delta.position==="right"&&(Et=M(Ue,"deltaPos",0,me.width*(1-d[Ue.align])+Te.width*d[Ue.align]+It,yt,Math.max),Tt=xt[1]-Dt[1],Ee={width:me.width+Te.width+It,height:Math.max(me.height,Te.height),left:me.left,right:Te.right+Et,top:Math.min(me.top,Te.top+Tt),bottom:Math.max(me.bottom,Te.bottom+Tt)}),Ue.delta.position==="bottom"&&(Et=null,Tt=Te.height,Ee={width:Math.max(me.width,Te.width),height:me.height+Te.height,left:Math.min(me.left,Te.left),right:Math.max(me.right,Te.right),top:me.bottom-me.height,bottom:me.bottom+Te.height}),Ue.delta.position==="top"&&(Et=null,Tt=me.top,Ee={width:Math.max(me.width,Te.width),height:me.height+Te.height,left:Math.min(me.left,Te.left),right:Math.max(me.right,Te.right),top:me.bottom-me.height-Te.height,bottom:me.bottom}),ft.attr({dx:Et,dy:Tt})}(Ue._hasNumber||Ue._hasDelta)&&Ye.attr("transform",function(){var Ft=ue.numbersScaler(Ee);yt+=Ft[2];var qt,Nt=M(Ue,"numbersScale",1,Ft[0],yt,Math.min);Ue._scaleNumbers||(Nt=1),qt=Ue._isAngular?je-Nt*Ee.bottom:je-Nt*(Ee.top+Ee.bottom)/2,Ue._numbersTop=Nt*Ee.top+qt;var Je=Ee[ge];ge==="center"&&(Je=(Ee.left+Ee.right)/2);var Ke=De-Nt*Je;return Ke=M(Ue,"numbersTranslate",0,Ke,yt,Math.max),f(Ke,qt)+m(Nt)})})(A,ee,U,{numbersX:B,numbersY:G,numbersScaler:N,transitionOpts:L,onComplete:I}),Q&&(j={range:H.gauge.axis.range,color:H.gauge.bgcolor,line:{color:H.gauge.bordercolor,width:0},thickness:1},V={range:H.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:H.gauge.bordercolor,width:H.gauge.borderwidth},thickness:1});var pe=ee.selectAll("g.angular").data(Y?U:[]);pe.exit().remove();var ye=ee.selectAll("g.angularaxis").data(Y?U:[]);ye.exit().remove(),Y&&function(Me,Ce,ne,ue){var me,Te,Ee,Ue,De=ne[0].trace,je=ue.size,ge=ue.radius,be=ue.innerRadius,Se=ue.gaugeBg,Ne=ue.gaugeOutline,Ye=[je.l+je.w/2,je.t+je.h/2+ge/2],Ze=ue.gauge,st=ue.layer,ot=ue.transitionOpts,ft=ue.onComplete,yt=Math.PI/2;function Et(Lt){var Ct=De.gauge.axis.range[0],mt=(Lt-Ct)/(De.gauge.axis.range[1]-Ct)*Math.PI-yt;return mt<-yt?-yt:mt>yt?yt:mt}function Tt(Lt){return _.svg.arc().innerRadius((be+ge)/2-Lt/2*(ge-be)).outerRadius((be+ge)/2+Lt/2*(ge-be)).startAngle(-yt)}function xt(Lt){Lt.attr("d",function(Ct){return Tt(Ct.thickness).startAngle(Et(Ct.range[0])).endAngle(Et(Ct.range[1]))()})}Ze.enter().append("g").classed("angular",!0),Ze.attr("transform",f(Ye[0],Ye[1])),st.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),st.selectAll("g.xangularaxistick,path,text").remove(),(me=y(Me,De.gauge.axis)).type="linear",me.range=De.gauge.axis.range,me._id="xangularaxis",me.ticklabeloverflow="allow",me.setScale();var Dt=function(Lt){return(me.range[0]-Lt.x)/(me.range[1]-me.range[0])*Math.PI+Math.PI},It={},Ft=o.makeLabelFns(me,0).labelStandoff;It.xFn=function(Lt){var Ct=Dt(Lt);return Math.cos(Ct)*Ft},It.yFn=function(Lt){var Ct=Dt(Lt),mt=Math.sin(Ct)>0?.2:1;return-Math.sin(Ct)*(Ft+Lt.fontSize*mt)+Math.abs(Math.cos(Ct))*(Lt.fontSize*t)},It.anchorFn=function(Lt){var Ct=Dt(Lt),mt=Math.cos(Ct);return Math.abs(mt)<.1?"middle":mt>0?"start":"end"},It.heightFn=function(Lt,Ct,mt){var Ot=Dt(Lt);return-.5*(1+Math.sin(Ot))*mt};var qt=function(Lt){return f(Ye[0]+ge*Math.cos(Lt),Ye[1]-ge*Math.sin(Lt))};if(Ee=function(Lt){return qt(Dt(Lt))},Te=o.calcTicks(me),Ue=o.getTickSigns(me)[2],me.visible){Ue=me.ticks==="inside"?-1:1;var Nt=(me.linewidth||1)/2;o.drawTicks(Me,me,{vals:Te,layer:st,path:"M"+Ue*Nt+",0h"+Ue*me.ticklen,transFn:function(Lt){var Ct=Dt(Lt);return qt(Ct)+"rotate("+-l(Ct)+")"}}),o.drawLabels(Me,me,{vals:Te,layer:st,transFn:Ee,labelFns:It})}var Je=[Se].concat(De.gauge.steps),Ke=Ze.selectAll("g.bg-arc").data(Je);Ke.enter().append("g").classed("bg-arc",!0).append("path"),Ke.select("path").call(xt).call(g),Ke.exit().remove();var Ge=Tt(De.gauge.bar.thickness),nt=Ze.selectAll("g.value-arc").data([De.gauge.bar]);nt.enter().append("g").classed("value-arc",!0).append("path");var ht,Oe,Be,Qe=nt.select("path");x(ot)?(Qe.transition().duration(ot.duration).ease(ot.easing).each("end",function(){ft&&ft()}).each("interrupt",function(){ft&&ft()}).attrTween("d",(ht=Ge,Oe=Et(ne[0].lastY),Be=Et(ne[0].y),function(){var Lt=w(Oe,Be);return function(Ct){return ht.endAngle(Lt(Ct))()}})),De._lastValue=ne[0].y):Qe.attr("d",typeof ne[0].y=="number"?Ge.endAngle(Et(ne[0].y)):"M0,0Z"),Qe.call(g),nt.exit().remove(),Je=[];var ut=De.gauge.threshold.value;(ut||ut===0)&&Je.push({range:[ut,ut],color:De.gauge.threshold.color,line:{color:De.gauge.threshold.line.color,width:De.gauge.threshold.line.width},thickness:De.gauge.threshold.thickness});var pt=Ze.selectAll("g.threshold-arc").data(Je);pt.enter().append("g").classed("threshold-arc",!0).append("path"),pt.select("path").call(xt).call(g),pt.exit().remove();var bt=Ze.selectAll("g.gauge-outline").data([Ne]);bt.enter().append("g").classed("gauge-outline",!0).append("path"),bt.select("path").call(xt).call(g),bt.exit().remove()}(A,0,U,{radius:se,innerRadius:fe,gauge:pe,layer:ye,size:te,gaugeBg:j,gaugeOutline:V,transitionOpts:L,onComplete:I});var Re=ee.selectAll("g.bullet").data(X?U:[]);Re.exit().remove();var we=ee.selectAll("g.bulletaxis").data(X?U:[]);we.exit().remove(),X&&function(Me,Ce,ne,ue){var me,Te,Ee,Ue,De,je=ne[0].trace,ge=ue.gauge,be=ue.layer,Se=ue.gaugeBg,Ne=ue.gaugeOutline,Ye=ue.size,Ze=je.domain,st=ue.transitionOpts,ot=ue.onComplete;ge.enter().append("g").classed("bullet",!0),ge.attr("transform",f(Ye.l,Ye.t)),be.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),be.selectAll("g.xbulletaxistick,path,text").remove();var ft=Ye.h,yt=je.gauge.bar.thickness*ft,Et=Ze.x[0],Tt=Ze.x[0]+(Ze.x[1]-Ze.x[0])*(je._hasNumber||je._hasDelta?1-r.bulletNumberDomainSize:1);function xt(Ke){Ke.attr("width",function(Ge){return Math.max(0,me.c2p(Ge.range[1])-me.c2p(Ge.range[0]))}).attr("x",function(Ge){return me.c2p(Ge.range[0])}).attr("y",function(Ge){return .5*(1-Ge.thickness)*ft}).attr("height",function(Ge){return Ge.thickness*ft})}(me=y(Me,je.gauge.axis))._id="xbulletaxis",me.domain=[Et,Tt],me.setScale(),Te=o.calcTicks(me),Ee=o.makeTransTickFn(me),Ue=o.getTickSigns(me)[2],De=Ye.t+Ye.h,me.visible&&(o.drawTicks(Me,me,{vals:me.ticks==="inside"?o.clipEnds(me,Te):Te,layer:be,path:o.makeTickPath(me,De,Ue),transFn:Ee}),o.drawLabels(Me,me,{vals:Te,layer:be,transFn:Ee,labelFns:o.makeLabelFns(me,De)}));var Dt=[Se].concat(je.gauge.steps),It=ge.selectAll("g.bg-bullet").data(Dt);It.enter().append("g").classed("bg-bullet",!0).append("rect"),It.select("rect").call(xt).call(g),It.exit().remove();var Ft=ge.selectAll("g.value-bullet").data([je.gauge.bar]);Ft.enter().append("g").classed("value-bullet",!0).append("rect"),Ft.select("rect").attr("height",yt).attr("y",(ft-yt)/2).call(g),x(st)?Ft.select("rect").transition().duration(st.duration).ease(st.easing).each("end",function(){ot&&ot()}).each("interrupt",function(){ot&&ot()}).attr("width",Math.max(0,me.c2p(Math.min(je.gauge.axis.range[1],ne[0].y)))):Ft.select("rect").attr("width",typeof ne[0].y=="number"?Math.max(0,me.c2p(Math.min(je.gauge.axis.range[1],ne[0].y))):0),Ft.exit().remove();var qt=ne.filter(function(){return je.gauge.threshold.value||je.gauge.threshold.value===0}),Nt=ge.selectAll("g.threshold-bullet").data(qt);Nt.enter().append("g").classed("threshold-bullet",!0).append("line"),Nt.select("line").attr("x1",me.c2p(je.gauge.threshold.value)).attr("x2",me.c2p(je.gauge.threshold.value)).attr("y1",(1-je.gauge.threshold.thickness)/2*ft).attr("y2",(1-(1-je.gauge.threshold.thickness)/2)*ft).call(c.stroke,je.gauge.threshold.line.color).style("stroke-width",je.gauge.threshold.line.width),Nt.exit().remove();var Je=ge.selectAll("g.gauge-outline").data([Ne]);Je.enter().append("g").classed("gauge-outline",!0).append("rect"),Je.select("rect").call(xt).call(g),Je.exit().remove()}(A,0,U,{gauge:Re,layer:we,size:te,gaugeBg:j,gaugeOutline:V,transitionOpts:L,onComplete:I});var Ae=ee.selectAll("text.title").data(U);Ae.exit().remove(),Ae.enter().append("text").classed("title",!0),Ae.attr("text-anchor",function(){return X?b.right:b[H.title.align]}).text(H.title.text).call(i.font,H.title.font).call(n.convertToTspans,A),Ae.attr("transform",function(){var Me,Ce=te.l+te.w*d[H.title.align],ne=r.titlePadding,ue=i.bBox(Ae.node());return Q?(Y&&(Me=H.gauge.axis.visible?i.bBox(ye.node()).top-ne-ue.bottom:te.t+te.h/2-se/2-ue.bottom-ne),X&&(Me=G-(ue.top+ue.bottom)/2,Ce=te.l-r.bulletPadding*te.w)):Me=H._numbersTop-ne-ue.bottom,f(Ce,Me)})})}},16249:function(D,E,e){var _=e(50693),w=e(12663).axisHoverFormat,s=e(5386).fF,T=e(2418),m=e(9012),f=e(1426).extendFlat,l=e(30962).overrideAll,t=D.exports=l(f({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:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}},y:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}},z:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}},caps:{x:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}},y:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}},z:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:s(),xhoverformat:w("x"),yhoverformat:w("y"),zhoverformat:w("z"),valuehoverformat:w("value",1),showlegend:f({},m.showlegend,{dflt:!1})},_("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:T.opacity,lightposition:T.lightposition,lighting:T.lighting,flatshading:T.flatshading,contour:T.contour,hoverinfo:f({},m.hoverinfo)}),"calc","nested");t.flatshading.dflt=!0,t.lighting.facenormalsepsilon.dflt=0,t.x.editType=t.y.editType=t.z.editType=t.value.editType="calc+clearAxisTypes",t.transforms=void 0},56959:function(D,E,e){var _=e(78803),w=e(88489).processGrid,s=e(88489).filter;D.exports=function(T,m){m._len=Math.min(m.x.length,m.y.length,m.z.length,m.value.length),m._x=s(m.x,m._len),m._y=s(m.y,m._len),m._z=s(m.z,m._len),m._value=s(m.value,m._len);var f=w(m);m._gridFill=f.fill,m._Xs=f.Xs,m._Ys=f.Ys,m._Zs=f.Zs,m._len=f.len;for(var l=1/0,t=-1/0,i=0;i0;a--){var u=Math.min(o[a],o[a-1]),p=Math.max(o[a],o[a-1]);if(p>u&&u-1}function ae(je,ge){return je===null?ge:je}function oe(je,ge,be){ee();var Se,Ne,Ye,Ze=[ge],st=[be];if(d>=1)Ze=[ge],st=[be];else if(d>0){var ot=function(qt,Nt){var Je=qt[0],Ke=qt[1],Ge=qt[2],nt=function(Lt,Ct,mt){for(var Ot=[],_t=0;_t-1?be[Et]:H(Tt,xt,Dt);yt[Et]=Ft>-1?Ft:Y(Tt,xt,Dt,ae(je,It))}Se=yt[0],Ne=yt[1],Ye=yt[2],n._meshI.push(Se),n._meshJ.push(Ne),n._meshK.push(Ye),++M}}function se(je,ge,be,Se){var Ne=je[3];NeSe&&(Ne=Se);for(var Ye=(je[3]-Ne)/(je[3]-ge[3]+1e-9),Ze=[],st=0;st<4;st++)Ze[st]=(1-Ye)*je[st]+Ye*ge[st];return Ze}function fe(je,ge,be){return je>=ge&&je<=be}function xe(je){var ge=.001*(V-j);return je>=j-ge&&je<=V+ge}function he(je){for(var ge=[],be=0;be<4;be++){var Se=je[be];ge.push([n._x[Se],n._y[Se],n._z[Se],n._value[Se]])}return ge}function de(je,ge,be,Se,Ne,Ye){Ye||(Ye=1),be=[-1,-1,-1];var Ze=!1,st=[fe(ge[0][3],Se,Ne),fe(ge[1][3],Se,Ne),fe(ge[2][3],Se,Ne)];if(!st[0]&&!st[1]&&!st[2])return!1;var ot=function(yt,Et,Tt){return xe(Et[0][3])&&xe(Et[1][3])&&xe(Et[2][3])?(oe(yt,Et,Tt),!0):Ye<3&&de(yt,Et,Tt,j,V,++Ye)};if(st[0]&&st[1]&&st[2])return ot(je,ge,be)||Ze;var ft=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach(function(yt){if(st[yt[0]]&&st[yt[1]]&&!st[yt[2]]){var Et=ge[yt[0]],Tt=ge[yt[1]],xt=ge[yt[2]],Dt=se(xt,Et,Se,Ne),It=se(xt,Tt,Se,Ne);Ze=ot(je,[It,Dt,Et],[-1,-1,be[yt[0]]])||Ze,Ze=ot(je,[Et,Tt,It],[be[yt[0]],be[yt[1]],-1])||Ze,ft=!0}}),ft||[[0,1,2],[1,2,0],[2,0,1]].forEach(function(yt){if(st[yt[0]]&&!st[yt[1]]&&!st[yt[2]]){var Et=ge[yt[0]],Tt=ge[yt[1]],xt=ge[yt[2]],Dt=se(Tt,Et,Se,Ne),It=se(xt,Et,Se,Ne);Ze=ot(je,[It,Dt,Et],[-1,-1,be[yt[0]]])||Ze,ft=!0}}),Ze}function pe(je,ge,be,Se){var Ne=!1,Ye=he(ge),Ze=[fe(Ye[0][3],be,Se),fe(Ye[1][3],be,Se),fe(Ye[2][3],be,Se),fe(Ye[3][3],be,Se)];if(!(Ze[0]||Ze[1]||Ze[2]||Ze[3]))return Ne;if(Ze[0]&&Ze[1]&&Ze[2]&&Ze[3])return h&&(Ne=function(ot,ft,yt){var Et=function(Tt,xt,Dt){oe(ot,[ft[Tt],ft[xt],ft[Dt]],[yt[Tt],yt[xt],yt[Dt]])};Et(0,1,2),Et(3,0,1),Et(2,3,0),Et(1,2,3)}(je,Ye,ge)||Ne),Ne;var st=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach(function(ot){if(Ze[ot[0]]&&Ze[ot[1]]&&Ze[ot[2]]&&!Ze[ot[3]]){var ft=Ye[ot[0]],yt=Ye[ot[1]],Et=Ye[ot[2]],Tt=Ye[ot[3]];if(h)Ne=oe(je,[ft,yt,Et],[ge[ot[0]],ge[ot[1]],ge[ot[2]]])||Ne;else{var xt=se(Tt,ft,be,Se),Dt=se(Tt,yt,be,Se),It=se(Tt,Et,be,Se);Ne=oe(null,[xt,Dt,It],[-1,-1,-1])||Ne}st=!0}}),st||([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach(function(ot){if(Ze[ot[0]]&&Ze[ot[1]]&&!Ze[ot[2]]&&!Ze[ot[3]]){var ft=Ye[ot[0]],yt=Ye[ot[1]],Et=Ye[ot[2]],Tt=Ye[ot[3]],xt=se(Et,ft,be,Se),Dt=se(Et,yt,be,Se),It=se(Tt,yt,be,Se),Ft=se(Tt,ft,be,Se);h?(Ne=oe(je,[ft,Ft,xt],[ge[ot[0]],-1,-1])||Ne,Ne=oe(je,[yt,Dt,It],[ge[ot[1]],-1,-1])||Ne):Ne=function(qt,Nt,Je){var Ke=function(Ge,nt,ht){oe(null,[Nt[Ge],Nt[nt],Nt[ht]],[Je[Ge],Je[nt],Je[ht]])};Ke(0,1,2),Ke(2,3,0)}(0,[xt,Dt,It,Ft],[-1,-1,-1,-1])||Ne,st=!0}}),st||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach(function(ot){if(Ze[ot[0]]&&!Ze[ot[1]]&&!Ze[ot[2]]&&!Ze[ot[3]]){var ft=Ye[ot[0]],yt=Ye[ot[1]],Et=Ye[ot[2]],Tt=Ye[ot[3]],xt=se(yt,ft,be,Se),Dt=se(Et,ft,be,Se),It=se(Tt,ft,be,Se);h?(Ne=oe(je,[ft,xt,Dt],[ge[ot[0]],-1,-1])||Ne,Ne=oe(je,[ft,Dt,It],[ge[ot[0]],-1,-1])||Ne,Ne=oe(je,[ft,It,xt],[ge[ot[0]],-1,-1])||Ne):Ne=oe(null,[xt,Dt,It],[-1,-1,-1])||Ne,st=!0}})),Ne}function ye(je,ge,be,Se,Ne,Ye,Ze,st,ot,ft,yt){var Et=!1;return k&&(te(je,"A")&&(Et=pe(null,[ge,be,Se,Ye],ft,yt)||Et),te(je,"B")&&(Et=pe(null,[be,Se,Ne,ot],ft,yt)||Et),te(je,"C")&&(Et=pe(null,[be,Ye,Ze,ot],ft,yt)||Et),te(je,"D")&&(Et=pe(null,[Se,Ye,st,ot],ft,yt)||Et),te(je,"E")&&(Et=pe(null,[be,Se,Ye,ot],ft,yt)||Et)),h&&(Et=pe(je,[be,Se,Ye,ot],ft,yt)||Et),Et}function Re(je,ge,be,Se,Ne,Ye,Ze,st){return[st[0]===!0||de(je,he([ge,be,Se]),[ge,be,Se],Ye,Ze),st[1]===!0||de(je,he([Se,Ne,ge]),[Se,Ne,ge],Ye,Ze)]}function we(je,ge,be,Se,Ne,Ye,Ze,st,ot){return st?Re(je,ge,be,Ne,Se,Ye,Ze,ot):Re(je,be,Ne,Se,ge,Ye,Ze,ot)}function Ae(je,ge,be,Se,Ne,Ye,Ze){var st,ot,ft,yt,Et=!1,Tt=function(){Et=de(je,[st,ot,ft],[-1,-1,-1],Ne,Ye)||Et,Et=de(je,[ft,yt,st],[-1,-1,-1],Ne,Ye)||Et},xt=Ze[0],Dt=Ze[1],It=Ze[2];return xt&&(st=X(he([B(ge,be-0,Se-0)])[0],he([B(ge-1,be-0,Se-0)])[0],xt),ot=X(he([B(ge,be-0,Se-1)])[0],he([B(ge-1,be-0,Se-1)])[0],xt),ft=X(he([B(ge,be-1,Se-1)])[0],he([B(ge-1,be-1,Se-1)])[0],xt),yt=X(he([B(ge,be-1,Se-0)])[0],he([B(ge-1,be-1,Se-0)])[0],xt),Tt()),Dt&&(st=X(he([B(ge-0,be,Se-0)])[0],he([B(ge-0,be-1,Se-0)])[0],Dt),ot=X(he([B(ge-0,be,Se-1)])[0],he([B(ge-0,be-1,Se-1)])[0],Dt),ft=X(he([B(ge-1,be,Se-1)])[0],he([B(ge-1,be-1,Se-1)])[0],Dt),yt=X(he([B(ge-1,be,Se-0)])[0],he([B(ge-1,be-1,Se-0)])[0],Dt),Tt()),It&&(st=X(he([B(ge-0,be-0,Se)])[0],he([B(ge-0,be-0,Se-1)])[0],It),ot=X(he([B(ge-0,be-1,Se)])[0],he([B(ge-0,be-1,Se-1)])[0],It),ft=X(he([B(ge-1,be-1,Se)])[0],he([B(ge-1,be-1,Se-1)])[0],It),yt=X(he([B(ge-1,be-0,Se)])[0],he([B(ge-1,be-0,Se-1)])[0],It),Tt()),Et}function Me(je,ge,be,Se,Ne,Ye,Ze,st,ot,ft,yt,Et){var Tt=je;return Et?(k&&je==="even"&&(Tt=null),ye(Tt,ge,be,Se,Ne,Ye,Ze,st,ot,ft,yt)):(k&&je==="odd"&&(Tt=null),ye(Tt,ot,st,Ze,Ye,Ne,Se,be,ge,ft,yt))}function Ce(je,ge,be,Se,Ne){for(var Ye=[],Ze=0,st=0;stMath.abs(Ye-N)?[G,Ye]:[Ye,N];k=!0,me(ge,Ze[0],Ze[1]),k=!1}}var st=[[Math.min(j,N),Math.max(j,N)],[Math.min(G,V),Math.max(G,V)]];["x","y","z"].forEach(function(ot){for(var ft=[],yt=0;yt0&&(Ft.push(Je.id),ot==="x"?qt.push([Je.distRatio,0,0]):ot==="y"?qt.push([0,Je.distRatio,0]):qt.push([0,0,Je.distRatio]))}else It=De(1,ot==="x"?O-1:ot==="y"?I-1:R-1);Ft.length>0&&(ft[Et]=ot==="x"?Te(je,Ft,Tt,xt,qt,ft[Et]):ot==="y"?Ee(je,Ft,Tt,xt,qt,ft[Et]):Ue(je,Ft,Tt,xt,qt,ft[Et]),Et++),It.length>0&&(ft[Et]=ot==="x"?Ce(je,It,Tt,xt,ft[Et]):ot==="y"?ne(je,It,Tt,xt,ft[Et]):ue(je,It,Tt,xt,ft[Et]),Et++)}var Ke=n.caps[ot];Ke.show&&Ke.fill&&(K(Ke.fill),ft[Et]=ot==="x"?Ce(je,[0,O-1],Tt,xt,ft[Et]):ot==="y"?ne(je,[0,I-1],Tt,xt,ft[Et]):ue(je,[0,R-1],Tt,xt,ft[Et]),Et++)}}),M===0&&Q(),n._meshX=u,n._meshY=p,n._meshZ=c,n._meshIntensity=b,n._Xs=A,n._Ys=C,n._Zs=L}(),n}D.exports={findNearestOnAxis:f,generateIsoMeshes:r,createIsosurfaceTrace:function(n,o){var a=n.glplot.gl,u=_({gl:a}),p=new l(n,u,o.uid);return u._trace=p,p.update(o),n.glplot.add(u),p}}},82738:function(D,E,e){var _=e(71828),w=e(73972),s=e(16249),T=e(1586);function m(f,l,t,i,r){var n=r("isomin"),o=r("isomax");o!=null&&n!=null&&n>o&&(l.isomin=null,l.isomax=null);var a=r("x"),u=r("y"),p=r("z"),c=r("value");a&&a.length&&u&&u.length&&p&&p.length&&c&&c.length?(w.getComponentMethod("calendars","handleTraceDefaults")(f,l,["x","y","z"],i),r("valuehoverformat"),["x","y","z"].forEach(function(b){r(b+"hoverformat");var d="caps."+b;r(d+".show")&&r(d+".fill");var v="slices."+b;r(v+".show")&&(r(v+".fill"),r(v+".locations"))}),r("spaceframe.show")&&r("spaceframe.fill"),r("surface.show")&&(r("surface.count"),r("surface.fill"),r("surface.pattern")),r("contour.show")&&(r("contour.color"),r("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(b){r(b)}),T(f,l,i,r,{prefix:"",cLetter:"c"}),l._length=null):l.visible=!1}D.exports={supplyDefaults:function(f,l,t,i){m(f,l,0,i,function(r,n){return _.coerce(f,l,s,r,n)})},supplyIsoDefaults:m}},64943:function(D,E,e){D.exports={attributes:e(16249),supplyDefaults:e(82738).supplyDefaults,calc:e(56959),colorbar:{min:"cmin",max:"cmax"},plot:e(22674).createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:e(58547),categories:["gl3d","showLegend"],meta:{}}},2418:function(D,E,e){var _=e(50693),w=e(12663).axisHoverFormat,s=e(5386).fF,T=e(54532),m=e(9012),f=e(1426).extendFlat;D.exports=f({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:s({editType:"calc"}),xhoverformat:w("x"),yhoverformat:w("y"),zhoverformat:w("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"},transforms:void 0},_("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:T.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:f({},T.contours.x.show,{}),color:T.contours.x.color,width:T.contours.x.width,editType:"calc"},lightposition:{x:f({},T.lightposition.x,{dflt:1e5}),y:f({},T.lightposition.y,{dflt:1e5}),z:f({},T.lightposition.z,{dflt:0}),editType:"calc"},lighting:f({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"},T.lighting),hoverinfo:f({},m.hoverinfo,{editType:"calc"}),showlegend:f({},m.showlegend,{dflt:!1})})},82932:function(D,E,e){var _=e(78803);D.exports=function(w,s){s.intensity&&_(w,s,{vals:s.intensity,containerStr:"",cLetter:"c"})}},91134:function(D,E,e){var _=e(9330).gl_mesh3d,w=e(9330).delaunay_triangulate,s=e(9330).alpha_shape,T=e(9330).convex_hull,m=e(81697).parseColorScale,f=e(78614),l=e(21081).extractOpts,t=e(90060);function i(p,c,b){this.scene=p,this.uid=b,this.mesh=c,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var r=i.prototype;function n(p){for(var c=[],b=p.length,d=0;d=c-.5)return!1;return!0}r.handlePick=function(p){if(p.object===this.mesh){var c=p.index=p.data.index;p.data._cellCenter?p.traceCoordinate=p.data.dataCoordinate:p.traceCoordinate=[this.data.x[c],this.data.y[c],this.data.z[c]];var b=this.data.hovertext||this.data.text;return Array.isArray(b)&&b[c]!==void 0?p.textLabel=b[c]:b&&(p.textLabel=b),!0}},r.update=function(p){var c=this.scene,b=c.fullSceneLayout;this.data=p;var d,v=p.x.length,x=t(o(b.xaxis,p.x,c.dataScale[0],p.xcalendar),o(b.yaxis,p.y,c.dataScale[1],p.ycalendar),o(b.zaxis,p.z,c.dataScale[2],p.zcalendar));if(p.i&&p.j&&p.k){if(p.i.length!==p.j.length||p.j.length!==p.k.length||!u(p.i,v)||!u(p.j,v)||!u(p.k,v))return;d=t(a(p.i),a(p.j),a(p.k))}else d=p.alphahull===0?T(x):p.alphahull>0?s(p.alphahull,x):function(h,M){for(var A=["x","y","z"].indexOf(h),C=[],L=M.length,O=0;Og):x=O>A,g=O;var I=a(A,C,L,O);I.pos=M,I.yc=(A+O)/2,I.i=h,I.dir=x?"increasing":"decreasing",I.x=I.pos,I.y=[L,C],y&&(I.orig_p=r[h]),d&&(I.tx=i.text[h]),v&&(I.htx=i.hovertext[h]),k.push(I)}else k.push({pos:M,empty:!0})}return i._extremes[o._id]=s.findExtremes(o,_.concat(c,p),{padded:!0}),k.length&&(k[0].t={labels:{open:w(t,"open:")+" ",high:w(t,"high:")+" ",low:w(t,"low:")+" ",close:w(t,"close:")+" "}}),k}D.exports={calc:function(t,i){var r=s.getFromId(t,i.xaxis),n=s.getFromId(t,i.yaxis),o=function(b,d,v){var x=v._minDiff;if(!x){var g,y=b._fullData,k=[];for(x=1/0,g=0;g"+d.labels[C]+_.hoverLabelText(c,L,b.yhoverformat):((A=w.extendFlat({},x)).y0=A.y1=O,A.yLabelVal=L,A.yLabel=d.labels[C]+_.hoverLabelText(c,L,b.yhoverformat),A.name="",v.push(A),h[L]=A)}return v}function r(n,o,a,u){var p=n.cd,c=n.ya,b=p[0].trace,d=p[0].t,v=t(n,o,a,u);if(!v)return[];var x=p[v.index],g=v.index=x.i,y=x.dir;function k(I){return d.labels[I]+_.hoverLabelText(c,b[I][g],b.yhoverformat)}var h=x.hi||b.hoverinfo,M=h.split("+"),A=h==="all",C=A||M.indexOf("y")!==-1,L=A||M.indexOf("text")!==-1,O=C?[k("open"),k("high"),k("low"),k("close")+" "+l[y]]:[];return L&&m(x,b,O),v.extraText=O.join("
"),v.y0=v.y1=c.c2p(x.yc,!0),[v]}D.exports={hoverPoints:function(n,o,a,u){return n.cd[0].trace.hoverlabel.split?i(n,o,a,u):r(n,o,a,u)},hoverSplit:i,hoverOnPoints:r}},54186:function(D,E,e){D.exports={moduleType:"trace",name:"ohlc",basePlotModule:e(93612),categories:["cartesian","svg","showLegend"],meta:{},attributes:e(2522),supplyDefaults:e(16169),calc:e(3485).calc,plot:e(72314),style:e(53101),hoverPoints:e(66449).hoverPoints,selectPoints:e(67324)}},14555:function(D,E,e){var _=e(73972),w=e(71828);D.exports=function(s,T,m,f){var l=m("x"),t=m("open"),i=m("high"),r=m("low"),n=m("close");if(m("hoverlabel.split"),_.getComponentMethod("calendars","handleTraceDefaults")(s,T,["x"],f),t&&i&&r&&n){var o=Math.min(t.length,i.length,r.length,n.length);return l&&(o=Math.min(o,w.minRowLength(l))),T._length=o,o}}},72314:function(D,E,e){var _=e(39898),w=e(71828);D.exports=function(s,T,m,f){var l=T.yaxis,t=T.xaxis,i=!!t.rangebreaks;w.makeTraceGroups(f,m,"trace ohlc").each(function(r){var n=_.select(this),o=r[0],a=o.t;if(o.trace.visible!==!0||a.empty)n.remove();else{var u=a.tickLen,p=n.selectAll("path").data(w.identity);p.enter().append("path"),p.exit().remove(),p.attr("d",function(c){if(c.empty)return"M0,0Z";var b=t.c2p(c.pos-u,!0),d=t.c2p(c.pos+u,!0),v=i?(b+d)/2:t.c2p(c.pos,!0);return"M"+b+","+l.c2p(c.o,!0)+"H"+v+"M"+v+","+l.c2p(c.h,!0)+"V"+l.c2p(c.l,!0)+"M"+d+","+l.c2p(c.c,!0)+"H"+v})}})}},67324:function(D){D.exports=function(E,e){var _,w=E.cd,s=E.xaxis,T=E.yaxis,m=[],f=w[0].t.bPos||0;if(e===!1)for(_=0;_=Y.length||X[Y[K]]!==void 0)return!1;X[Y[K]]=!0}return!0}(Q))for(ee=0;ee0;c&&(u="array");var b=n("categoryorder",u);b==="array"?(n("categoryarray"),n("ticktext")):(delete i.categoryarray,delete i.ticktext),c||b!=="array"||(r.categoryorder="trace")}}D.exports=function(i,r,n,o){function a(d,v){return _.coerce(i,r,f,d,v)}var u=m(i,r,{name:"dimensions",handleItemDefaults:t}),p=function(d,v,x,g,y){y("line.shape"),y("line.hovertemplate");var k=y("line.color",g.colorway[0]);if(w(d,"line")&&_.isArrayOrTypedArray(k)){if(k.length)return y("line.colorscale"),s(d,v,g,y,{prefix:"line.",cLetter:"c"}),k.length;v.line.color=x}return 1/0}(i,r,n,o,a);T(r,o,a),Array.isArray(u)&&u.length||(r.visible=!1),l(r,u,"values",p),a("hoveron"),a("hovertemplate"),a("arrangement"),a("bundlecolors"),a("sortpaths"),a("counts");var c={family:o.font.family,size:Math.round(o.font.size),color:o.font.color};_.coerceFont(a,"labelfont",c);var b={family:o.font.family,size:Math.round(o.font.size/1.2),color:o.font.color};_.coerceFont(a,"tickfont",b)}},94873:function(D,E,e){D.exports={attributes:e(99506),supplyDefaults:e(14647),calc:e(28699),plot:e(45784),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:e(27677),categories:["noOpacity"],meta:{}}},45460:function(D,E,e){var _=e(39898),w=e(81684).k4,s=e(72391),T=e(30211),m=e(71828),f=m.strTranslate,l=e(91424),t=e(84267),i=e(63893);function r(Q,Y,X,K){var te=Y._context.staticPlot,ae=Q.map(N.bind(0,Y,X)),oe=K.selectAll("g.parcatslayer").data([null]);oe.enter().append("g").attr("class","parcatslayer").style("pointer-events",te?"none":"all");var se=oe.selectAll("g.trace.parcats").data(ae,n),fe=se.enter().append("g").attr("class","trace parcats");se.attr("transform",function(Me){return f(Me.x,Me.y)}),fe.append("g").attr("class","paths");var xe=se.select("g.paths").selectAll("path.path").data(function(Me){return Me.paths},n);xe.attr("fill",function(Me){return Me.model.color});var he=xe.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(Me){return Me.model.color}).attr("fill-opacity",0);v(he),xe.attr("d",function(Me){return Me.svgD}),he.empty()||xe.sort(a),xe.exit().remove(),xe.on("mouseover",u).on("mouseout",p).on("click",d),fe.append("g").attr("class","dimensions");var de=se.select("g.dimensions").selectAll("g.dimension").data(function(Me){return Me.dimensions},n);de.enter().append("g").attr("class","dimension"),de.attr("transform",function(Me){return f(Me.x,0)}),de.exit().remove();var pe=de.selectAll("g.category").data(function(Me){return Me.categories},n),ye=pe.enter().append("g").attr("class","category");pe.attr("transform",function(Me){return f(0,Me.y)}),ye.append("rect").attr("class","catrect").attr("pointer-events","none"),pe.select("rect.catrect").attr("fill","none").attr("width",function(Me){return Me.width}).attr("height",function(Me){return Me.height}),g(ye);var Re=pe.selectAll("rect.bandrect").data(function(Me){return Me.bands},n);Re.each(function(){m.raiseToTop(this)}),Re.attr("fill",function(Me){return Me.color});var we=Re.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(Me){return Me.color}).attr("fill-opacity",0);Re.attr("fill",function(Me){return Me.color}).attr("width",function(Me){return Me.width}).attr("height",function(Me){return Me.height}).attr("y",function(Me){return Me.y}).attr("cursor",function(Me){return Me.parcatsViewModel.arrangement==="fixed"?"default":Me.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),y(we),Re.exit().remove(),ye.append("text").attr("class","catlabel").attr("pointer-events","none");var Ae=Y._fullLayout.paper_bgcolor;pe.select("text.catlabel").attr("text-anchor",function(Me){return o(Me)?"start":"end"}).attr("alignment-baseline","middle").style("text-shadow",i.makeTextShadow(Ae)).style("fill","rgb(0, 0, 0)").attr("x",function(Me){return o(Me)?Me.width+5:-5}).attr("y",function(Me){return Me.height/2}).text(function(Me){return Me.model.categoryLabel}).each(function(Me){l.font(_.select(this),Me.parcatsViewModel.categorylabelfont),i.convertToTspans(_.select(this),Y)}),ye.append("text").attr("class","dimlabel"),pe.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(Me){return Me.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(Me){return Me.width/2}).attr("y",-5).text(function(Me,Ce){return Ce===0?Me.parcatsViewModel.model.dimensions[Me.model.dimensionInd].dimensionLabel:null}).each(function(Me){l.font(_.select(this),Me.parcatsViewModel.labelfont)}),pe.selectAll("rect.bandrect").on("mouseover",C).on("mouseout",L),pe.exit().remove(),de.call(_.behavior.drag().origin(function(Me){return{x:Me.x,y:0}}).on("dragstart",O).on("drag",I).on("dragend",R)),se.each(function(Me){Me.traceSelection=_.select(this),Me.pathSelection=_.select(this).selectAll("g.paths").selectAll("path.path"),Me.dimensionSelection=_.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),se.exit().remove()}function n(Q){return Q.key}function o(Q){var Y=Q.parcatsViewModel.dimensions.length,X=Q.parcatsViewModel.dimensions[Y-1].model.dimensionInd;return Q.model.dimensionInd===X}function a(Q,Y){return Q.model.rawColor>Y.model.rawColor?1:Q.model.rawColor"),Te=_.mouse(se)[0];T.loneHover({trace:fe,x:Re-he.left+de.left,y:we-he.top+de.top,text:me,color:Q.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:Ae,idealAlign:Te1&&de.displayInd===he.dimensions.length-1?(K=fe.left,te="left"):(K=fe.left+fe.width,te="right");var Re=xe.model.count,we=xe.model.categoryLabel,Ae=Re/xe.parcatsViewModel.model.count,Me={countLabel:Re,categoryLabel:we,probabilityLabel:Ae.toFixed(3)},Ce=[];xe.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Ce.push(["Count:",Me.countLabel].join(" ")),xe.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&Ce.push(["P("+Me.categoryLabel+"):",Me.probabilityLabel].join(" "));var ne=Ce.join("
");return{trace:pe,x:ae*(K-Y.left),y:oe*(ye-Y.top),text:ne,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:te,hovertemplate:pe.hovertemplate,hovertemplateLabels:Me,eventData:[{data:pe._input,fullData:pe,count:Re,category:we,probability:Ae}]}}function C(Q){if(!Q.parcatsViewModel.dragDimension&&Q.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){if(_.mouse(this)[1]<-1)return;var Y,X=Q.parcatsViewModel.graphDiv,K=X._fullLayout,te=K._paperdiv.node().getBoundingClientRect(),ae=Q.parcatsViewModel.hoveron,oe=this;ae==="color"?(function(se){var fe=_.select(se).datum(),xe=k(fe);x(xe),xe.each(function(){m.raiseToTop(this)}),_.select(se.parentNode).selectAll("rect.bandrect").filter(function(he){return he.color===fe.color}).each(function(){m.raiseToTop(this),_.select(this).attr("stroke","black").attr("stroke-width",1.5)})}(oe),M(oe,"plotly_hover",_.event)):(function(se){_.select(se.parentNode).selectAll("rect.bandrect").each(function(fe){var xe=k(fe);x(xe),xe.each(function(){m.raiseToTop(this)})}),_.select(se.parentNode).select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}(oe),h(oe,"plotly_hover",_.event)),Q.parcatsViewModel.hoverinfoItems.indexOf("none")===-1&&(ae==="category"?Y=A(X,te,oe):ae==="color"?Y=function(se,fe,xe){se._fullLayout._calcInverseTransform(se);var he,de,pe=se._fullLayout._invScaleX,ye=se._fullLayout._invScaleY,Re=xe.getBoundingClientRect(),we=_.select(xe).datum(),Ae=we.categoryViewModel,Me=Ae.parcatsViewModel,Ce=Me.model.dimensions[Ae.model.dimensionInd],ne=Me.trace,ue=Re.y+Re.height/2;Me.dimensions.length>1&&Ce.displayInd===Me.dimensions.length-1?(he=Re.left,de="left"):(he=Re.left+Re.width,de="right");var me=Ae.model.categoryLabel,Te=we.parcatsViewModel.model.count,Ee=0;we.categoryViewModel.bands.forEach(function(st){st.color===we.color&&(Ee+=st.count)});var Ue=Ae.model.count,De=0;Me.pathSelection.each(function(st){st.model.color===we.color&&(De+=st.model.count)});var je=Ee/Te,ge=Ee/De,be=Ee/Ue,Se={countLabel:Te,categoryLabel:me,probabilityLabel:je.toFixed(3)},Ne=[];Ae.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Ne.push(["Count:",Se.countLabel].join(" ")),Ae.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(Ne.push("P(color ∩ "+me+"): "+Se.probabilityLabel),Ne.push("P("+me+" | color): "+ge.toFixed(3)),Ne.push("P(color | "+me+"): "+be.toFixed(3)));var Ye=Ne.join("
"),Ze=t.mostReadable(we.color,["black","white"]);return{trace:ne,x:pe*(he-fe.left),y:ye*(ue-fe.top),text:Ye,color:we.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:Ze,fontSize:10,idealAlign:de,hovertemplate:ne.hovertemplate,hovertemplateLabels:Se,eventData:[{data:ne._input,fullData:ne,category:me,count:Te,probability:je,categorycount:Ue,colorcount:De,bandcolorcount:Ee}]}}(X,te,oe):ae==="dimension"&&(Y=function(se,fe,xe){var he=[];return _.select(xe.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){he.push(A(se,fe,this))}),he}(X,te,oe)),Y&&T.loneHover(Y,{container:K._hoverlayer.node(),outerContainer:K._paper.node(),gd:X}))}}function L(Q){var Y=Q.parcatsViewModel;Y.dragDimension||(v(Y.pathSelection),g(Y.dimensionSelection.selectAll("g.category")),y(Y.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),T.loneUnhover(Y.graphDiv._fullLayout._hoverlayer.node()),Y.pathSelection.sort(a),Y.hoverinfoItems.indexOf("skip")!==-1)||(Q.parcatsViewModel.hoveron==="color"?M(this,"plotly_unhover",_.event):h(this,"plotly_unhover",_.event))}function O(Q){Q.parcatsViewModel.arrangement!=="fixed"&&(Q.dragDimensionDisplayInd=Q.model.displayInd,Q.initialDragDimensionDisplayInds=Q.parcatsViewModel.model.dimensions.map(function(Y){return Y.displayInd}),Q.dragHasMoved=!1,Q.dragCategoryDisplayInd=null,_.select(this).selectAll("g.category").select("rect.catrect").each(function(Y){var X=_.mouse(this)[0],K=_.mouse(this)[1];-2<=X&&X<=Y.width+2&&-2<=K&&K<=Y.height+2&&(Q.dragCategoryDisplayInd=Y.model.displayInd,Q.initialDragCategoryDisplayInds=Q.model.categories.map(function(te){return te.displayInd}),Y.model.dragY=Y.y,m.raiseToTop(this.parentNode),_.select(this.parentNode).selectAll("rect.bandrect").each(function(te){te.yhe.y+he.height/2&&(ae.model.displayInd=he.model.displayInd,he.model.displayInd=se),Q.dragCategoryDisplayInd=ae.model.displayInd}if(Q.dragCategoryDisplayInd===null||Q.parcatsViewModel.arrangement==="freeform"){te.model.dragX=_.event.x;var de=Q.parcatsViewModel.dimensions[X],pe=Q.parcatsViewModel.dimensions[K];de!==void 0&&te.model.dragXpe.x&&(te.model.displayInd=pe.model.displayInd,pe.model.displayInd=Q.dragDimensionDisplayInd),Q.dragDimensionDisplayInd=te.model.displayInd}H(Q.parcatsViewModel),V(Q.parcatsViewModel),G(Q.parcatsViewModel),B(Q.parcatsViewModel)}}function R(Q){if(Q.parcatsViewModel.arrangement!=="fixed"&&Q.dragDimensionDisplayInd!==null){_.select(this).selectAll("text").attr("font-weight","normal");var Y={},X=U(Q.parcatsViewModel),K=Q.parcatsViewModel.model.dimensions.map(function(he){return he.displayInd}),te=Q.initialDragDimensionDisplayInds.some(function(he,de){return he!==K[de]});te&&K.forEach(function(he,de){var pe=Q.parcatsViewModel.model.dimensions[de].containerInd;Y["dimensions["+pe+"].displayindex"]=he});var ae=!1;if(Q.dragCategoryDisplayInd!==null){var oe=Q.model.categories.map(function(he){return he.displayInd});if(ae=Q.initialDragCategoryDisplayInds.some(function(he,de){return he!==oe[de]})){var se=Q.model.categories.slice().sort(function(he,de){return he.displayInd-de.displayInd}),fe=se.map(function(he){return he.categoryValue}),xe=se.map(function(he){return he.categoryLabel});Y["dimensions["+Q.model.containerInd+"].categoryarray"]=[fe],Y["dimensions["+Q.model.containerInd+"].ticktext"]=[xe],Y["dimensions["+Q.model.containerInd+"].categoryorder"]="array"}}Q.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!Q.dragHasMoved&&Q.potentialClickBand&&(Q.parcatsViewModel.hoveron==="color"?M(Q.potentialClickBand,"plotly_click",_.event.sourceEvent):h(Q.potentialClickBand,"plotly_click",_.event.sourceEvent)),Q.model.dragX=null,Q.dragCategoryDisplayInd!==null&&(Q.parcatsViewModel.dimensions[Q.dragDimensionDisplayInd].categories[Q.dragCategoryDisplayInd].model.dragY=null,Q.dragCategoryDisplayInd=null),Q.dragDimensionDisplayInd=null,Q.parcatsViewModel.dragDimension=null,Q.dragHasMoved=null,Q.potentialClickBand=null,H(Q.parcatsViewModel),V(Q.parcatsViewModel),_.transition().duration(300).ease("cubic-in-out").each(function(){G(Q.parcatsViewModel,!0),B(Q.parcatsViewModel,!0)}).each("end",function(){(te||ae)&&s.restyle(Q.parcatsViewModel.graphDiv,Y,[X])})}}function U(Q){for(var Y,X=Q.graphDiv._fullData,K=0;K=0;oe--)xe+="C"+fe[oe]+","+(Y[oe+1]+K)+" "+se[oe]+","+(Y[oe]+K)+" "+(Q[oe]+X[oe])+","+(Y[oe]+K),xe+="l-"+X[oe]+",0 ";return xe+"Z"}function V(Q){var Y=Q.dimensions,X=Q.model,K=Y.map(function(Se){return Se.categories.map(function(Ne){return Ne.y})}),te=Q.model.dimensions.map(function(Se){return Se.categories.map(function(Ne){return Ne.displayInd})}),ae=Q.model.dimensions.map(function(Se){return Se.displayInd}),oe=Q.dimensions.map(function(Se){return Se.model.dimensionInd}),se=Y.map(function(Se){return Se.x}),fe=Y.map(function(Se){return Se.width}),xe=[];for(var he in X.paths)X.paths.hasOwnProperty(he)&&xe.push(X.paths[he]);function de(Se){var Ne=Se.categoryInds.map(function(Ye,Ze){return te[Ze][Ye]});return oe.map(function(Ye){return Ne[Ye]})}xe.sort(function(Se,Ne){var Ye=de(Se),Ze=de(Ne);return Q.sortpaths==="backward"&&(Ye.reverse(),Ze.reverse()),Ye.push(Se.valueInds[0]),Ze.push(Ne.valueInds[0]),Q.bundlecolors&&(Ye.unshift(Se.rawColor),Ze.unshift(Ne.rawColor)),YeZe?1:0});for(var pe=new Array(xe.length),ye=Y[0].model.count,Re=Y[0].categories.map(function(Se){return Se.height}).reduce(function(Se,Ne){return Se+Ne}),we=0;we0?Re*(Me.count/ye):0;for(var Ce,ne=new Array(K.length),ue=0;ue1?(Q.width-80-16)/(K-1):0)*te;var ae,oe,se,fe,xe,he=[],de=Q.model.maxCats,pe=Y.categories.length,ye=Y.count,Re=Q.height-8*(de-1),we=8*(de-pe)/2,Ae=Y.categories.map(function(Me){return{displayInd:Me.displayInd,categoryInd:Me.categoryInd}});for(Ae.sort(function(Me,Ce){return Me.displayInd-Ce.displayInd}),xe=0;xe0?oe.count/ye*Re:0,se={key:oe.valueInds[0],model:oe,width:16,height:ae,y:oe.dragY!==null?oe.dragY:we,bands:[],parcatsViewModel:Q},we=we+ae+8,he.push(se);return{key:Y.dimensionInd,x:Y.dragX!==null?Y.dragX:X,y:0,width:16,model:Y,categories:he,parcatsViewModel:Q,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}D.exports=function(Q,Y,X,K){r(X,Q,K,Y)}},45784:function(D,E,e){var _=e(45460);D.exports=function(w,s,T,m){var f=w._fullLayout,l=f._paper,t=f._size;_(w,l,s,{width:t.w,height:t.h,margin:{t:t.t,r:t.r,b:t.b,l:t.l}},T,m)}},73362:function(D,E,e){var _=e(50693),w=e(13838),s=e(41940),T=e(27670).Y,m=e(1426).extendFlat,f=e(44467).templatedArray;D.exports={domain:T({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:s({editType:"plot"}),tickfont:s({editType:"plot"}),rangefont:s({editType:"plot"}),dimensions:f("dimension",{label:{valType:"string",editType:"plot"},tickvals:m({},w.tickvals,{editType:"plot"}),ticktext:m({},w.ticktext,{editType:"plot"}),tickformat:m({},w.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:m({editType:"calc"},_("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"}}},57920:function(D,E,e){var _=e(25706),w=e(39898),s=e(28984).keyFun,T=e(28984).repeat,m=e(71828).sorterAsc,f=e(71828).strTranslate,l=_.bar.snapRatio;function t(A,C){return A*(1-l)+C*l}var i=_.bar.snapClose;function r(A,C){return A*(1-i)+C*i}function n(A,C,L,O){if(function(ee,Q){for(var Y=0;Y=Q[Y][0]&&ee<=Q[Y][1])return!0;return!1}(L,O))return L;var I=A?-1:1,R=0,U=C.length-1;if(I<0){var B=R;R=U,U=B}for(var G=C[R],N=G,j=R;I*jC){V=L;break}}if(I=N,isNaN(I)&&(I=isNaN(j)||isNaN(V)?isNaN(j)?V:j:C-G[j][1]te[1]+oe||ae=.9*te[1]+.1*te[0]?"n":ae<=.9*te[0]+.1*te[1]?"s":"ns"}(ee,C);Q&&(R.interval=B[I],R.intervalPix=ee,R.region=Q)}}if(A.ordinal&&!R.region){var Y=A.unitTickvals,X=A.unitToPaddedPx.invert(C);for(L=0;L=K[0]&&X<=K[1]){R.clickableOrdinalRange=K;break}}}return R}function x(A,C){w.event.sourceEvent.stopPropagation();var L=C.height-w.mouse(A)[1]-2*_.verticalPadding,O=C.brush.svgBrush;O.wasDragged=!0,O._dragging=!0,O.grabbingBar?O.newExtent=[L-O.grabPoint,L+O.barLength-O.grabPoint].map(C.unitToPaddedPx.invert):O.newExtent=[O.startExtent,C.unitToPaddedPx.invert(L)].sort(m),C.brush.filterSpecified=!0,O.extent=O.stayingIntervals.concat([O.newExtent]),O.brushCallback(C),d(A.parentNode)}function g(A,C){var L=v(C,C.height-w.mouse(A)[1]-2*_.verticalPadding),O="crosshair";L.clickableOrdinalRange?O="pointer":L.region&&(O=L.region+"-resize"),w.select(document.body).style("cursor",O)}function y(A){A.on("mousemove",function(C){w.event.preventDefault(),C.parent.inBrushDrag||g(this,C)}).on("mouseleave",function(C){C.parent.inBrushDrag||c()}).call(w.behavior.drag().on("dragstart",function(C){(function(L,O){w.event.sourceEvent.stopPropagation();var I=O.height-w.mouse(L)[1]-2*_.verticalPadding,R=O.unitToPaddedPx.invert(I),U=O.brush,B=v(O,I),G=B.interval,N=U.svgBrush;if(N.wasDragged=!1,N.grabbingBar=B.region==="ns",N.grabbingBar){var j=G.map(O.unitToPaddedPx);N.grabPoint=I-j[0]-_.verticalPadding,N.barLength=j[1]-j[0]}N.clickableOrdinalRange=B.clickableOrdinalRange,N.stayingIntervals=O.multiselect&&U.filterSpecified?U.filter.getConsolidated():[],G&&(N.stayingIntervals=N.stayingIntervals.filter(function(V){return V[0]!==G[0]&&V[1]!==G[1]})),N.startExtent=B.region?G[B.region==="s"?1:0]:R,O.parent.inBrushDrag=!0,N.brushStartCallback()})(this,C)}).on("drag",function(C){x(this,C)}).on("dragend",function(C){(function(L,O){var I=O.brush,R=I.filter,U=I.svgBrush;U._dragging||(g(L,O),x(L,O),O.brush.svgBrush.wasDragged=!1),U._dragging=!1,w.event.sourceEvent.stopPropagation();var B=U.grabbingBar;if(U.grabbingBar=!1,U.grabLocation=void 0,O.parent.inBrushDrag=!1,c(),!U.wasDragged)return U.wasDragged=void 0,U.clickableOrdinalRange?I.filterSpecified&&O.multiselect?U.extent.push(U.clickableOrdinalRange):(U.extent=[U.clickableOrdinalRange],I.filterSpecified=!0):B?(U.extent=U.stayingIntervals,U.extent.length===0&&h(I)):h(I),U.brushCallback(O),d(L.parentNode),void U.brushEndCallback(I.filterSpecified?R.getConsolidated():[]);var G=function(){R.set(R.getConsolidated())};if(O.ordinal){var N=O.unitTickvals;N[N.length-1]U.newExtent[0];U.extent=U.stayingIntervals.concat(j?[U.newExtent]:[]),U.extent.length||h(I),U.brushCallback(O),j?d(L.parentNode,G):(G(),d(L.parentNode))}else G();U.brushEndCallback(I.filterSpecified?R.getConsolidated():[])})(this,C)}))}function k(A,C){return A[0]-C[0]}function h(A){A.filterSpecified=!1,A.svgBrush.extent=[[-1/0,1/0]]}function M(A){for(var C,L=A.slice(),O=[],I=L.shift();I;){for(C=I.slice();(I=L.shift())&&I[0]<=C[1];)C[1]=Math.max(C[1],I[1]);O.push(C)}return O.length===1&&O[0][0]>O[0][1]&&(O=[]),O}D.exports={makeBrush:function(A,C,L,O,I,R){var U,B=function(){var G,N,j=[];return{set:function(V){(j=V.map(function(H){return H.slice().sort(m)}).sort(k)).length===1&&j[0][0]===-1/0&&j[0][1]===1/0&&(j=[[0,-1]]),G=M(j),N=j.reduce(function(H,ee){return[Math.min(H[0],ee[0]),Math.max(H[1],ee[1])]},[1/0,-1/0])},get:function(){return j.slice()},getConsolidated:function(){return G},getBounds:function(){return N}}}();return B.set(L),{filter:B,filterSpecified:C,svgBrush:{extent:[],brushStartCallback:O,brushCallback:(U=I,function(G){var N=G.brush,j=function(H){return H.svgBrush.extent.map(function(ee){return ee.slice()})}(N),V=j.slice();N.filter.set(V),U()}),brushEndCallback:R}}},ensureAxisBrush:function(A,C,L){var O=A.selectAll("."+_.cn.axisBrush).data(T,s);O.enter().append("g").classed(_.cn.axisBrush,!0),function(I,R,U){var B=U._context.staticPlot,G=I.selectAll(".background").data(T);G.enter().append("rect").classed("background",!0).call(o).call(a).style("pointer-events",B?"none":"auto").attr("transform",f(0,_.verticalPadding)),G.call(y).attr("height",function(V){return V.height-_.verticalPadding});var N=I.selectAll(".highlight-shadow").data(T);N.enter().append("line").classed("highlight-shadow",!0).attr("x",-_.bar.width/2).attr("stroke-width",_.bar.width+_.bar.strokeWidth).attr("stroke",R).attr("opacity",_.bar.strokeOpacity).attr("stroke-linecap","butt"),N.attr("y1",function(V){return V.height}).call(b);var j=I.selectAll(".highlight").data(T);j.enter().append("line").classed("highlight",!0).attr("x",-_.bar.width/2).attr("stroke-width",_.bar.width-_.bar.strokeWidth).attr("stroke",_.bar.fillColor).attr("opacity",_.bar.fillOpacity).attr("stroke-linecap","butt"),j.attr("y1",function(V){return V.height}).call(b)}(O,C,L)},cleanRanges:function(A,C){if(Array.isArray(A[0])?(A=A.map(function(O){return O.sort(m)}),A=C.multiselect?M(A.sort(k)):[A[0]]):A=[A.sort(m)],C.tickvals){var L=C.tickvals.slice().sort(m);if(!(A=A.map(function(O){var I=[n(0,L,O[0],[]),n(1,L,O[1],[])];if(I[1]>I[0])return I}).filter(function(O){return O})).length)return}return A.length>1?A:A[0]}}},71791:function(D,E,e){D.exports={attributes:e(73362),supplyDefaults:e(3633),calc:e(24639),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:e(49351),categories:["gl","regl","noOpacity","noHover"],meta:{}}},49351:function(D,E,e){var _=e(39898),w=e(27659).a0,s=e(21341),T=e(77922);E.name="parcoords",E.plot=function(m){var f=w(m.calcdata,"parcoords")[0];f.length&&s(m,f)},E.clean=function(m,f,l,t){var i=t._has&&t._has("parcoords"),r=f._has&&f._has("parcoords");i&&!r&&(t._paperdiv.selectAll(".parcoords").remove(),t._glimages.selectAll("*").remove())},E.toSVG=function(m){var f=m._fullLayout._glimages,l=_.select(m).selectAll(".svg-container");l.filter(function(t,i){return i===l.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus").each(function(){var t=this,i=t.toDataURL("image/png");f.append("svg:image").attr({xmlns:T.svg,"xlink:href":i,preserveAspectRatio:"none",x:0,y:0,width:t.style.width,height:t.style.height})}),window.setTimeout(function(){_.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}},24639:function(D,E,e){var _=e(71828).isArrayOrTypedArray,w=e(21081),s=e(28984).wrap;D.exports=function(T,m){var f,l;return w.hasColorscale(m,"line")&&_(m.line.color)?(f=m.line.color,l=w.extractOpts(m.line).colorscale,w.calc(T,m,{vals:f,containerStr:"line",cLetter:"c"})):(f=function(t){for(var i=new Array(t),r=0;ri&&(_.log("parcoords traces support up to "+i+" dimensions at the moment"),b.splice(i));var d=m(o,a,{name:"dimensions",layout:p,handleItemDefaults:n}),v=function(g,y,k,h,M){var A=M("line.color",k);if(w(g,"line")&&_.isArrayOrTypedArray(A)){if(A.length)return M("line.colorscale"),s(g,y,h,M,{prefix:"line.",cLetter:"c"}),A.length;y.line.color=k}return 1/0}(o,a,u,p,c);T(a,p,c),Array.isArray(d)&&d.length||(a.visible=!1),r(a,d,"values",v);var x={family:p.font.family,size:Math.round(p.font.size/1.2),color:p.font.color};_.coerceFont(c,"labelfont",x),_.coerceFont(c,"tickfont",x),_.coerceFont(c,"rangefont",x),c("labelangle"),c("labelside"),c("unselected.line.color"),c("unselected.line.opacity")}},1602:function(D,E,e){var _=e(71828).isTypedArray;E.convertTypedArray=function(w){return _(w)?Array.prototype.slice.call(w):w},E.isOrdinal=function(w){return!!w.tickvals},E.isVisible=function(w){return w.visible||!("visible"in w)}},67618:function(D,E,e){var _=e(71791);_.plot=e(21341),D.exports=_},83398:function(D,E,e){var _=e(56068),w=_([`precision highp float; #define GLSLIFY 1 varying vec4 fragColor; @@ -218,11 +218,11 @@ void main() { gl_FragColor = fragColor; } -`]),T=e(25706).maxDimensionCount,y=e(71828),f=new Uint8Array(4),l=new Uint8Array(4),t={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function i(d,v,x,g,m){var k=d._gl;k.enable(k.SCISSOR_TEST),k.scissor(v,x,g,m),d.clear({color:[0,0,0,0],depth:1})}function r(d,v,x,g,m,k){var h=k.key;x.drawCompleted||(function(M){M.read({x:0,y:0,width:1,height:1,data:f})}(d),x.drawCompleted=!0),function M(A){var C=Math.min(g,m-A*g);A===0&&(window.cancelAnimationFrame(x.currentRafs[h]),delete x.currentRafs[h],i(d,k.scissorX,k.scissorY,k.scissorWidth,k.viewBoxSize[1])),x.clearOnly||(k.count=2*C,k.offset=2*A*g,v(k),A*g+C>>8*v)%256/255}function a(d,v,x){for(var g=new Array(8*v),m=0,k=0;kae&&(ae=V[Q].dim1.canvasX,Y=Q);K===0&&i(C,0,0,x.canvasWidth,x.canvasHeight);var oe=function(Ae){var Me,Ce,ne,ue=[[],[]];for(ne=0;ne<64;ne++){var me=!Ae&&neoe._length&&(Re=Re.slice(0,oe._length));var we,Ae=oe.tickvals;function Me(Te,Ee){return{val:Te,text:we[Ee]}}function Ce(Te,Ee){return Te.val-Ee.val}if(Array.isArray(Ae)&&Ae.length){we=oe.ticktext,Array.isArray(we)&&we.length?we.length>Ae.length?we=we.slice(0,Ae.length):Ae.length>we.length&&(Ae=Ae.slice(0,we.length)):we=Ae.map(s(oe.tickformat));for(var ne=1;ne=Ue||be>=De)return;var Se=Te.lineLayer.readPixel(ge,De-1-be),Ne=Se[3]!==0,Ye=Ne?Se[2]+256*(Se[1]+256*Se[0]):null,Ze={x:ge,y:be,clientX:Ee.clientX,clientY:Ee.clientY,dataIndex:Te.model.key,curveNumber:Ye};Ye!==ye&&(Ne?V.hover(Ze):V.unhover&&V.unhover(Ze),ye=Ye)}}),fe.style("opacity",function(Te){return Te.pick?0:1}),Q.style("background","rgba(255, 255, 255, 0)");var pe=Q.selectAll("."+c.cn.parcoords).data(se,o);pe.exit().remove(),pe.enter().append("g").classed(c.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),pe.attr("transform",function(Te){return l(Te.model.translateX,Te.model.translateY)});var de=pe.selectAll("."+c.cn.parcoordsControlView).data(a,o);de.enter().append("g").classed(c.cn.parcoordsControlView,!0),de.attr("transform",function(Te){return l(Te.model.pad.l,Te.model.pad.t)});var he=de.selectAll("."+c.cn.yAxis).data(function(Te){return Te.dimensions},o);he.enter().append("g").classed(c.cn.yAxis,!0),de.each(function(Te){R(he,Te,Y)}),fe.each(function(Te){if(Te.viewModel){!Te.lineLayer||V?Te.lineLayer=d(this,Te):Te.lineLayer.update(Te),(Te.key||Te.key===0)&&(Te.viewModel[Te.key]=Te.lineLayer);var Ee=!Te.context||V;Te.lineLayer.render(Te.viewModel.panels,Ee)}}),he.attr("transform",function(Te){return l(Te.xScale(Te.xIndex),0)}),he.call(_.behavior.drag().origin(function(Te){return Te}).on("drag",function(Te){var Ee=Te.parent;oe.linePickActive(!1),Te.x=Math.max(-c.overdrag,Math.min(Te.model.width+c.overdrag,_.event.x)),Te.canvasX=Te.x*Te.model.canvasPixelRatio,he.sort(function(Ue,De){return Ue.x-De.x}).each(function(Ue,De){Ue.xIndex=De,Ue.x=Te===Ue?Ue.x:Ue.xScale(Ue.xIndex),Ue.canvasX=Ue.x*Ue.model.canvasPixelRatio}),R(he,Ee,Y),he.filter(function(Ue){return Math.abs(Te.xIndex-Ue.xIndex)!==0}).attr("transform",function(Ue){return l(Ue.xScale(Ue.xIndex),0)}),_.select(this).attr("transform",l(Te.x,0)),he.each(function(Ue,De,je){je===Te.parent.key&&(Ee.dimensions[De]=Ue)}),Ee.contextLayer&&Ee.contextLayer.render(Ee.panels,!1,!A(Ee)),Ee.focusLayer.render&&Ee.focusLayer.render(Ee.panels)}).on("dragend",function(Te){var Ee=Te.parent;Te.x=Te.xScale(Te.xIndex),Te.canvasX=Te.x*Te.model.canvasPixelRatio,R(he,Ee,Y),_.select(this).attr("transform",function(Ue){return l(Ue.x,0)}),Ee.contextLayer&&Ee.contextLayer.render(Ee.panels,!1,!A(Ee)),Ee.focusLayer&&Ee.focusLayer.render(Ee.panels),Ee.pickLayer&&Ee.pickLayer.render(Ee.panels,!0),oe.linePickActive(!0),V&&V.axesMoved&&V.axesMoved(Ee.key,Ee.dimensions.map(function(Ue){return Ue.crossfilterDimensionIndex}))})),he.exit().remove();var xe=he.selectAll("."+c.cn.axisOverlays).data(a,o);xe.enter().append("g").classed(c.cn.axisOverlays,!0),xe.selectAll("."+c.cn.axis).remove();var Re=xe.selectAll("."+c.cn.axis).data(a,o);Re.enter().append("g").classed(c.cn.axis,!0),Re.each(function(Te){var Ee=Te.model.height/Te.model.tickDistance,Ue=Te.domainScale,De=Ue.domain();_.select(this).call(_.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(Ee,Te.tickFormat).tickValues(Te.ordinal?De:null).tickFormat(function(je){return p.isOrdinal(Te)?je:U(Te.model.dimensions[Te.visibleIndex],je)}).scale(Ue)),i.font(Re.selectAll("text"),Te.model.tickFont)}),Re.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),Re.selectAll("text").style("text-shadow",t.makeTextShadow(K)).style("cursor","default");var we=xe.selectAll("."+c.cn.axisHeading).data(a,o);we.enter().append("g").classed(c.cn.axisHeading,!0);var Ae=we.selectAll("."+c.cn.axisTitle).data(a,o);Ae.enter().append("text").classed(c.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",H?"none":"auto"),Ae.text(function(Te){return Te.label}).each(function(Te){var Ee=_.select(this);i.font(Ee,Te.model.labelFont),t.convertToTspans(Ee,G)}).attr("transform",function(Te){var Ee=I(Te.model.labelAngle,Te.model.labelSide),Ue=c.axisTitleOffset;return(Ee.dir>0?"":l(0,2*Ue+Te.model.height))+f(Ee.degrees)+l(-Ue*Ee.dx,-Ue*Ee.dy)}).attr("text-anchor",function(Te){var Ee=I(Te.model.labelAngle,Te.model.labelSide);return 2*Math.abs(Ee.dx)>Math.abs(Ee.dy)?Ee.dir*Ee.dx<0?"start":"end":"middle"});var Me=xe.selectAll("."+c.cn.axisExtent).data(a,o);Me.enter().append("g").classed(c.cn.axisExtent,!0);var Ce=Me.selectAll("."+c.cn.axisExtentTop).data(a,o);Ce.enter().append("g").classed(c.cn.axisExtentTop,!0),Ce.attr("transform",l(0,-c.axisExtentOffset));var ne=Ce.selectAll("."+c.cn.axisExtentTopText).data(a,o);ne.enter().append("text").classed(c.cn.axisExtentTopText,!0).call(O),ne.text(function(Te){return B(Te,!0)}).each(function(Te){i.font(_.select(this),Te.model.rangeFont)});var ue=Me.selectAll("."+c.cn.axisExtentBottom).data(a,o);ue.enter().append("g").classed(c.cn.axisExtentBottom,!0),ue.attr("transform",function(Te){return l(0,Te.model.height+c.axisExtentOffset)});var me=ue.selectAll("."+c.cn.axisExtentBottomText).data(a,o);me.enter().append("text").classed(c.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(O),me.text(function(Te){return B(Te,!1)}).each(function(Te){i.font(_.select(this),Te.model.rangeFont)}),b.ensureAxisBrush(xe,K,G)}},21341:function(D,E,e){var _=e(17171),w=e(79749),s=e(1602).isVisible,T={};function y(f,l,t){var i=l.indexOf(t),r=f.indexOf(i);return r===-1&&(r+=l.length),r}(D.exports=function(f,l){var t=f._fullLayout;if(w(f,[],T)){var i={},r={},n={},o={},a=t._size;l.forEach(function(u,p){var c=u[0].trace;n[p]=c.index;var b=o[p]=c._fullInput.index;i[p]=f.data[b].dimensions,r[p]=f.data[b].dimensions.slice()}),_(f,l,{width:a.w,height:a.h,margin:{t:a.t,r:a.r,b:a.b,l:a.l}},{filterChanged:function(u,p,c){var b=r[u][p],d=c.map(function(h){return h.slice()}),v="dimensions["+p+"].constraintrange",x=t._tracePreGUI[f._fullData[n[u]]._fullInput.uid];if(x[v]===void 0){var g=b.constraintrange;x[v]=g||null}var m=f._fullData[n[u]].dimensions[p];d.length?(d.length===1&&(d=d[0]),b.constraintrange=d,m.constraintrange=d.slice(),d=[d]):(delete b.constraintrange,delete m.constraintrange,d=null);var k={};k[v]=d,f.emit("plotly_restyle",[k,[o[u]]])},hover:function(u){f.emit("plotly_hover",u)},unhover:function(u){f.emit("plotly_unhover",u)},axesMoved:function(u,p){var c=function(b,d){return function(v,x){return y(b,d,v)-y(b,d,x)}}(p,r[u].filter(s));i[u].sort(c),r[u].filter(function(b){return!s(b)}).sort(function(b){return r[u].indexOf(b)}).forEach(function(b){i[u].splice(i[u].indexOf(b),1),i[u].splice(r[u].indexOf(b),0,b)}),f.emit("plotly_restyle",[{dimensions:[i[u]]},[o[u]]])}})}}).reglPrecompiled=T},34e3:function(D,E,e){var _=e(9012),w=e(27670).Y,s=e(41940),T=e(22399),y=e(5386).fF,f=e(5386).si,l=e(1426).extendFlat,t=s({editType:"plot",arrayOk:!0,colorEditType:"plot"});D.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:T.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},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:l({},_.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:y({},{keys:["label","color","value","percent","text"]}),texttemplate:f({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:l({},t,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:l({},t,{}),outsidetextfont:l({},t,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:l({},t,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:w({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"},_deprecated:{title:{valType:"string",dflt:"",editType:"calc"},titlefont:l({},t,{}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc"}}}},13584:function(D,E,e){var _=e(74875);E.name="pie",E.plot=function(w,s,T,y){_.plotBasePlot(E.name,w,s,T,y)},E.clean=function(w,s,T,y){_.cleanBasePlot(E.name,w,s,T,y)}},32354:function(D,E,e){var _=e(92770),w=e(84267),s=e(7901),T={};function y(l){return function(t,i){return!!t&&!!(t=w(t)).isValid()&&(t=s.addOpacity(t,t.getAlpha()),l[i]||(l[i]=t),t)}}function f(l,t){var i,r=JSON.stringify(l),n=t[r];if(!n){for(n=l.slice(),i=0;i=0}),(t.type==="funnelarea"?m:t.sort)&&n.sort(function(C,L){return L.v-C.v}),n[0]&&(n[0].vTotal=g),n},crossTraceCalc:function(l,t){var i=(t||{}).type;i||(i="pie");var r=l._fullLayout,n=l.calcdata,o=r[i+"colorway"],a=r["_"+i+"colormap"];r["extend"+i+"colors"]&&(o=f(o,T));for(var u=0,p=0;p0){o=!0;break}}o||(n=0)}return{hasLabels:i,hasValues:r,len:n}}D.exports={handleLabelsAndValues:f,supplyDefaults:function(l,t,i,r){function n(x,g){return w.coerce(l,t,s,x,g)}var o=f(n("labels"),n("values")),a=o.len;if(t._hasLabels=o.hasLabels,t._hasValues=o.hasValues,!t._hasLabels&&t._hasValues&&(n("label0"),n("dlabel")),a){t._length=a,n("marker.line.width")&&n("marker.line.color"),n("marker.colors"),n("scalegroup");var u,p=n("text"),c=n("texttemplate");if(c||(u=n("textinfo",Array.isArray(p)?"text+percent":"percent")),n("hovertext"),n("hovertemplate"),c||u&&u!=="none"){var b=n("textposition");y(l,t,r,n,b,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(b)||b==="auto"||b==="outside")&&n("automargin"),(b==="inside"||b==="auto"||Array.isArray(b))&&n("insidetextorientation")}T(t,r,n);var d=n("hole");if(n("title.text")){var v=n("title.position",d?"middle center":"top center");d||v!=="middle center"||(t.title.position="top center"),w.coerceFont(n,"title.font",r.font)}n("sort"),n("direction"),n("rotation"),n("pull")}else t.visible=!1}}},20007:function(D,E,e){var _=e(23469).appendArrayMultiPointValues;D.exports=function(w,s){var T={curveNumber:s.index,pointNumbers:w.pts,data:s._input,fullData:s,label:w.label,color:w.color,value:w.v,percent:w.percent,text:w.text,bbox:w.bbox,v:w.v};return w.pts.length===1&&(T.pointNumber=T.i=w.pts[0]),_(T,s,w.pts),s.type==="funnelarea"&&(delete T.v,delete T.i),T}},53581:function(D,E,e){var _=e(71828);function w(s){return s.indexOf("e")!==-1?s.replace(/[.]?0+e/,"e"):s.indexOf(".")!==-1?s.replace(/[.]?0+$/,""):s}E.formatPiePercent=function(s,T){var y=w((100*s).toPrecision(3));return _.numSeparate(y,T)+"%"},E.formatPieValue=function(s,T){var y=w(s.toPrecision(10));return _.numSeparate(y,T)},E.getFirstFilled=function(s,T){if(Array.isArray(s))for(var y=0;y"),name:ae.hovertemplate||oe.indexOf("name")!==-1?ae.name:void 0,idealAlign:K.pxmid[0]<0?"left":"right",color:u.castOption(xe.bgcolor,K.pts)||K.color,borderColor:u.castOption(xe.bordercolor,K.pts),fontFamily:u.castOption(Re.family,K.pts),fontSize:u.castOption(Re.size,K.pts),fontColor:u.castOption(Re.color,K.pts),nameLength:u.castOption(xe.namelength,K.pts),textAlign:u.castOption(xe.align,K.pts),hovertemplate:u.castOption(ae.hovertemplate,K.pts),hovertemplateLabels:K,eventData:[p(K,ae)]},{container:te._hoverlayer.node(),outerContainer:te._paper.node(),gd:j,inOut_bbox:we}),K.bbox=we[0],X._hasHoverLabel=!0}X._hasHoverEvent=!0,j.emit("plotly_hover",{points:[p(K,ae)],event:_.event})}}),N.on("mouseout",function(K){var te=j._fullLayout,ae=j._fullData[X.index],oe=_.select(this).datum();X._hasHoverEvent&&(K.originalEvent=_.event,j.emit("plotly_unhover",{points:[p(oe,ae)],event:_.event}),X._hasHoverEvent=!1),X._hasHoverLabel&&(s.loneUnhover(te._hoverlayer.node()),X._hasHoverLabel=!1)}),N.on("click",function(K){var te=j._fullLayout,ae=j._fullData[X.index];j._dragging||te.hovermode===!1||(j._hoverdata=[p(K,ae)],s.click(j,_.event))})}function d(N,j,V){var H=u.castOption(N.insidetextfont.color,j.pts);!H&&N._input.textfont&&(H=u.castOption(N._input.textfont.color,j.pts));var ee=u.castOption(N.insidetextfont.family,j.pts)||u.castOption(N.textfont.family,j.pts)||V.family,Q=u.castOption(N.insidetextfont.size,j.pts)||u.castOption(N.textfont.size,j.pts)||V.size;return{color:H||T.contrast(j.color),family:ee,size:Q}}function v(N,j){for(var V,H,ee=0;eeUe&&Ue>je||De=-4;de-=2)he(Math.PI*de,"tan");for(de=4;de>=-4;de-=2)he(Math.PI*(de+1),"tan")}if(oe||fe){for(de=4;de>=-4;de-=2)he(Math.PI*(de+1.5),"rad");for(de=4;de>=-4;de-=2)he(Math.PI*(de+.5),"rad")}}if(Y||ye||oe){var xe=Math.sqrt(N.width*N.width+N.height*N.height);if((Q={scale:ee*H*2/xe,rCenter:1-ee,rotate:0}).textPosAngle=(j.startangle+j.stopangle)/2,Q.scale>=1)return Q;pe.push(Q)}(ye||fe)&&((Q=g(N,H,X,K,te)).textPosAngle=(j.startangle+j.stopangle)/2,pe.push(Q)),(ye||se)&&((Q=m(N,H,X,K,te)).textPosAngle=(j.startangle+j.stopangle)/2,pe.push(Q));for(var Re=0,we=0,Ae=0;Ae=1)break}return pe[Re]}function g(N,j,V,H,ee){j=Math.max(0,j-2*a);var Q=N.width/N.height,X=M(Q,H,j,V);return{scale:2*X/N.height,rCenter:k(Q,X/j),rotate:h(ee)}}function m(N,j,V,H,ee){j=Math.max(0,j-2*a);var Q=N.height/N.width,X=M(Q,H,j,V);return{scale:2*X/N.width,rCenter:k(Q,X/j),rotate:h(ee+Math.PI/2)}}function k(N,j){return Math.cos(j)-N*j}function h(N){return(180/Math.PI*N+720)%180-90}function M(N,j,V,H){var ee=N+1/(2*Math.tan(j));return V*Math.min(1/(Math.sqrt(ee*ee+.5)+ee),H/(Math.sqrt(N*N+H/2)+N))}function A(N,j){return N.v!==j.vTotal||j.trace.hole?Math.min(1/(1+1/Math.sin(N.halfangle)),N.ring/2):1}function C(N,j){var V=j.pxmid[0],H=j.pxmid[1],ee=N.width/2,Q=N.height/2;return V<0&&(ee*=-1),H<0&&(Q*=-1),{scale:1,rCenter:1,rotate:0,x:ee+Math.abs(Q)*(ee>0?1:-1)/2,y:Q/(1+V*V/(H*H)),outside:!0}}function L(N,j){var V,H,ee,Q=N.trace,X={x:N.cx,y:N.cy},Y={tx:0,ty:0};Y.ty+=Q.title.font.size,ee=I(Q),Q.title.position.indexOf("top")!==-1?(X.y-=(1+ee)*N.r,Y.ty-=N.titleBox.height):Q.title.position.indexOf("bottom")!==-1&&(X.y+=(1+ee)*N.r);var K,te=N.r/((K=N.trace.aspectratio)===void 0?1:K),ae=j.w*(Q.domain.x[1]-Q.domain.x[0])/2;return Q.title.position.indexOf("left")!==-1?(ae+=te,X.x-=(1+ee)*te,Y.tx+=N.titleBox.width/2):Q.title.position.indexOf("center")!==-1?ae*=2:Q.title.position.indexOf("right")!==-1&&(ae+=te,X.x+=(1+ee)*te,Y.tx-=N.titleBox.width/2),V=ae/N.titleBox.width,H=O(N,j)/N.titleBox.height,{x:X.x,y:X.y,scale:Math.min(V,H),tx:Y.tx,ty:Y.ty}}function O(N,j){var V=N.trace,H=j.h*(V.domain.y[1]-V.domain.y[0]);return Math.min(N.titleBox.height,H/2)}function I(N){var j,V=N.pull;if(!V)return 0;if(Array.isArray(V))for(V=0,j=0;jV&&(V=N.pull[j]);return V}function R(N,j){for(var V=[],H=0;H1?Ae=(we=fe.r)/pe.aspectratio:we=(Ae=fe.r)*pe.aspectratio,Re=(we*=(1+pe.baseratio)/2)*Ae}he=Math.min(he,Re/fe.vTotal)}for(ye=0;ye")}if(Q){var de=f.castOption(ee,j.i,"texttemplate");if(de){var he=function(Re){return{label:Re.label,value:Re.v,valueLabel:u.formatPieValue(Re.v,H.separators),percent:Re.v/V.vTotal,percentLabel:u.formatPiePercent(Re.v/V.vTotal,H.separators),color:Re.color,text:Re.text,customdata:f.castOption(ee,Re.i,"customdata")}}(j),xe=u.getFirstFilled(ee.text,j.pts);(c(xe)||xe==="")&&(he.text=xe),j.text=f.texttemplateString(de,he,N._fullLayout._d3locale,he,ee._meta||{})}else j.text=""}}function G(N,j){var V=N.rotate*Math.PI/180,H=Math.cos(V),ee=Math.sin(V),Q=(j.left+j.right)/2,X=(j.top+j.bottom)/2;N.textX=Q*H-X*ee,N.textY=Q*ee+X*H,N.noCenter=!0}D.exports={plot:function(N,j){var V=N._context.staticPlot,H=N._fullLayout,ee=H._size;o("pie",H),v(j,N),R(j,ee);var Q=f.makeTraceGroups(H._pielayer,j,"trace").each(function(X){var Y=_.select(this),K=X[0],te=K.trace;(function(ae){var oe,se,fe,ye=ae[0],pe=ye.r,de=ye.trace,he=u.getRotationAngle(de.rotation),xe=2*Math.PI/ye.vTotal,Re="px0",we="px1";if(de.direction==="counterclockwise"){for(oe=0;oeye.vTotal/2?1:0,se.halfangle=Math.PI*Math.min(se.v/ye.vTotal,.5),se.ring=1-de.hole,se.rInscribed=A(se,ye))})(X),Y.attr("stroke-linejoin","round"),Y.each(function(){var ae=_.select(this).selectAll("g.slice").data(X);ae.enter().append("g").classed("slice",!0),ae.exit().remove();var oe=[[[],[]],[[],[]]],se=!1;ae.each(function(we,Ae){if(we.hidden)_.select(this).selectAll("path,g").remove();else{we.pointNumber=we.i,we.curveNumber=te.index,oe[we.pxmid[1]<0?0:1][we.pxmid[0]<0?0:1].push(we);var Me=K.cx,Ce=K.cy,ne=_.select(this),ue=ne.selectAll("path.surface").data([we]);if(ue.enter().append("path").classed("surface",!0).style({"pointer-events":V?"none":"all"}),ne.call(b,N,X),te.pull){var me=+u.castOption(te.pull,we.pts)||0;me>0&&(Me+=me*we.pxmid[0],Ce+=me*we.pxmid[1])}we.cxFinal=Me,we.cyFinal=Ce;var Te=te.hole;if(we.v===K.vTotal){var Ee="M"+(Me+we.px0[0])+","+(Ce+we.px0[1])+be(we.px0,we.pxmid,!0,1)+be(we.pxmid,we.px0,!0,1)+"Z";Te?ue.attr("d","M"+(Me+Te*we.px0[0])+","+(Ce+Te*we.px0[1])+be(we.px0,we.pxmid,!1,Te)+be(we.pxmid,we.px0,!1,Te)+"Z"+Ee):ue.attr("d",Ee)}else{var Ue=be(we.px0,we.px1,!0,1);if(Te){var De=1-Te;ue.attr("d","M"+(Me+Te*we.px1[0])+","+(Ce+Te*we.px1[1])+be(we.px1,we.px0,!1,Te)+"l"+De*we.px0[0]+","+De*we.px0[1]+Ue+"Z")}else ue.attr("d","M"+Me+","+Ce+"l"+we.px0[0]+","+we.px0[1]+Ue+"Z")}B(N,we,K);var je=u.castOption(te.textposition,we.pts),ge=ne.selectAll("g.slicetext").data(we.text&&je!=="none"?[0]:[]);ge.enter().append("g").classed("slicetext",!0),ge.exit().remove(),ge.each(function(){var Se=f.ensureSingle(_.select(this),"text","",function(Et){Et.attr("data-notex",1)}),Ne=f.ensureUniformFontSize(N,je==="outside"?function(Et,Tt,xt){return{color:u.castOption(Et.outsidetextfont.color,Tt.pts)||u.castOption(Et.textfont.color,Tt.pts)||xt.color,family:u.castOption(Et.outsidetextfont.family,Tt.pts)||u.castOption(Et.textfont.family,Tt.pts)||xt.family,size:u.castOption(Et.outsidetextfont.size,Tt.pts)||u.castOption(Et.textfont.size,Tt.pts)||xt.size}}(te,we,H.font):d(te,we,H.font));Se.text(we.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(y.font,Ne).call(i.convertToTspans,N);var Ye,Ze=y.bBox(Se.node());if(je==="outside")Ye=C(Ze,we);else if(Ye=x(Ze,we,K),je==="auto"&&Ye.scale<1){var st=f.ensureUniformFontSize(N,te.outsidetextfont);Se.call(y.font,st),Ye=C(Ze=y.bBox(Se.node()),we)}var ot=Ye.textPosAngle,ft=ot===void 0?we.pxmid:U(K.r,ot);if(Ye.targetX=Me+ft[0]*Ye.rCenter+(Ye.x||0),Ye.targetY=Ce+ft[1]*Ye.rCenter+(Ye.y||0),G(Ye,Ze),Ye.outside){var yt=Ye.targetY;we.yLabelMin=yt-Ze.height/2,we.yLabelMid=yt,we.yLabelMax=yt+Ze.height/2,we.labelExtraX=0,we.labelExtraY=0,se=!0}Ye.fontSize=Ne.size,n(te.type,Ye,H),X[Ae].transform=Ye,f.setTransormAndDisplay(Se,Ye)})}function be(Se,Ne,Ye,Ze){var st=Ze*(Ne[0]-Se[0]),ot=Ze*(Ne[1]-Se[1]);return"a"+Ze*K.r+","+Ze*K.r+" 0 "+we.largeArc+(Ye?" 1 ":" 0 ")+st+","+ot}});var fe=_.select(this).selectAll("g.titletext").data(te.title.text?[0]:[]);if(fe.enter().append("g").classed("titletext",!0),fe.exit().remove(),fe.each(function(){var we,Ae=f.ensureSingle(_.select(this),"text","",function(Ce){Ce.attr("data-notex",1)}),Me=te.title.text;te._meta&&(Me=f.templateString(Me,te._meta)),Ae.text(Me).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(y.font,te.title.font).call(i.convertToTspans,N),we=te.title.position==="middle center"?function(Ce){var ne=Math.sqrt(Ce.titleBox.width*Ce.titleBox.width+Ce.titleBox.height*Ce.titleBox.height);return{x:Ce.cx,y:Ce.cy,scale:Ce.trace.hole*Ce.r*2/ne,tx:0,ty:-Ce.titleBox.height/2+Ce.trace.title.font.size}}(K):L(K,ee),Ae.attr("transform",t(we.x,we.y)+l(Math.min(1,we.scale))+t(we.tx,we.ty))}),se&&function(we,Ae){var Me,Ce,ne,ue,me,Te,Ee,Ue,De,je,ge,be,Se;function Ne(ot,ft){return ot.pxmid[1]-ft.pxmid[1]}function Ye(ot,ft){return ft.pxmid[1]-ot.pxmid[1]}function Ze(ot,ft){ft||(ft={});var yt,Et,Tt,xt,Dt=ft.labelExtraY+(Ce?ft.yLabelMax:ft.yLabelMin),It=Ce?ot.yLabelMin:ot.yLabelMax,Ft=Ce?ot.yLabelMax:ot.yLabelMin,qt=ot.cyFinal+me(ot.px0[1],ot.px1[1]),Nt=Dt-It;if(Nt*Ee>0&&(ot.labelExtraY=Nt),Array.isArray(Ae.pull))for(Et=0;Et=(u.castOption(Ae.pull,Tt.pts)||0)||((ot.pxmid[1]-Tt.pxmid[1])*Ee>0?(Nt=Tt.cyFinal+me(Tt.px0[1],Tt.px1[1])-It-ot.labelExtraY)*Ee>0&&(ot.labelExtraY+=Nt):(Ft+ot.labelExtraY-qt)*Ee>0&&(yt=3*Te*Math.abs(Et-je.indexOf(ot)),(xt=Tt.cxFinal+ue(Tt.px0[0],Tt.px1[0])+yt-(ot.cxFinal+ot.pxmid[0])-ot.labelExtraX)*Te>0&&(ot.labelExtraX+=xt)))}for(Ce=0;Ce<2;Ce++)for(ne=Ce?Ne:Ye,me=Ce?Math.max:Math.min,Ee=Ce?1:-1,Me=0;Me<2;Me++){for(ue=Me?Math.max:Math.min,Te=Me?1:-1,(Ue=we[Ce][Me]).sort(ne),De=we[1-Ce][Me],je=De.concat(Ue),be=[],ge=0;geMath.abs(Ue)?me+="l"+Ue*Me.pxmid[0]/Me.pxmid[1]+","+Ue+"H"+(ue+Me.labelExtraX+Te):me+="l"+Me.labelExtraX+","+Ee+"v"+(Ue-Ee)+"h"+Te}else me+="V"+(Me.yLabelMid+Me.labelExtraY)+"h"+Te;f.ensureSingle(Ce,"path","textline").call(T.stroke,Ae.outsidetextfont.color).attr({"stroke-width":Math.min(2,Ae.outsidetextfont.size/8),d:me,fill:"none"})}else Ce.select("path.textline").remove()})}(ae,te),se&&te.automargin){var ye=y.bBox(Y.node()),pe=te.domain,de=ee.w*(pe.x[1]-pe.x[0]),he=ee.h*(pe.y[1]-pe.y[0]),xe=(.5*de-K.r)/ee.w,Re=(.5*he-K.r)/ee.h;w.autoMargin(N,"pie."+te.uid+".automargin",{xl:pe.x[0]-xe,xr:pe.x[1]+xe,yb:pe.y[0]-Re,yt:pe.y[1]+Re,l:Math.max(K.cx-K.r-ye.left,0),r:Math.max(ye.right-(K.cx+K.r),0),b:Math.max(ye.bottom-(K.cy+K.r),0),t:Math.max(K.cy-K.r-ye.top,0),pad:5})}})});setTimeout(function(){Q.selectAll("tspan").each(function(){var X=_.select(this);X.attr("dy")&&X.attr("dy",X.attr("dy"))})},0)},formatSliceLabel:B,transformInsideText:x,determineInsideTextFont:d,positionTitleOutside:L,prerenderTitles:v,layoutAreas:R,attachFxHandlers:b,computeTransform:G}},68357:function(D,E,e){var _=e(39898),w=e(63463),s=e(72597).resizeText;D.exports=function(T){var y=T._fullLayout._pielayer.selectAll(".trace");s(T,y,"pie"),y.each(function(f){var l=f[0].trace,t=_.select(this);t.style({opacity:l.opacity}),t.selectAll("path.surface").each(function(i){_.select(this).call(w,i,l)})})}},63463:function(D,E,e){var _=e(7901),w=e(53581).castOption;D.exports=function(s,T,y){var f=y.marker.line,l=w(f.color,T.pts)||_.defaultLine,t=w(f.width,T.pts)||0;s.style("stroke-width",t).call(_.fill,T.color).call(_.stroke,l)}},10959:function(D,E,e){var _=e(82196);D.exports={x:_.x,y:_.y,xy:{valType:"data_array",editType:"calc"},indices:{valType:"data_array",editType:"calc"},xbounds:{valType:"data_array",editType:"calc"},ybounds:{valType:"data_array",editType:"calc"},text:_.text,marker:{color:{valType:"color",arrayOk:!1,editType:"calc"},opacity:{valType:"number",min:0,max:1,dflt:1,arrayOk:!1,editType:"calc"},blend:{valType:"boolean",dflt:null,editType:"calc"},sizemin:{valType:"number",min:.1,max:2,dflt:.5,editType:"calc"},sizemax:{valType:"number",min:.1,dflt:20,editType:"calc"},border:{color:{valType:"color",arrayOk:!1,editType:"calc"},arearatio:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},editType:"calc"},editType:"calc"},transforms:void 0}},42743:function(D,E,e){var _=e(9330).gl_pointcloud2d,w=e(78614),s=e(71739).findExtremes,T=e(34603);function y(l,t){this.scene=l,this.uid=t,this.type="pointcloud",this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color="rgb(0, 0, 0)",this.name="",this.hoverinfo="all",this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=_(l.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var f=y.prototype;f.handlePick=function(l){var t=this.idToIndex[l.pointId];return{trace:this,dataCoord:l.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*t],this.pickXYData[2*t+1]]:[this.pickXData[t],this.pickYData[t]],textLabel:Array.isArray(this.textLabels)?this.textLabels[t]:this.textLabels,color:this.color,name:this.name,pointIndex:t,hoverinfo:this.hoverinfo}},f.update=function(l){this.index=l.index,this.textLabels=l.text,this.name=l.name,this.hoverinfo=l.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(l),this.color=T(l,{})},f.updateFast=function(l){var t,i,r,n,o,a,u=this.xData=this.pickXData=l.x,p=this.yData=this.pickYData=l.y,c=this.pickXYData=l.xy,b=l.xbounds&&l.ybounds,d=l.indices,v=this.bounds;if(c){if(r=c,t=c.length>>>1,b)v[0]=l.xbounds[0],v[2]=l.xbounds[1],v[1]=l.ybounds[0],v[3]=l.ybounds[1];else for(a=0;av[2]&&(v[2]=n),ov[3]&&(v[3]=o);if(d)i=d;else for(i=new Int32Array(t),a=0;av[2]&&(v[2]=n),ov[3]&&(v[3]=o);this.idToIndex=i,this.pointcloudOptions.idToIndex=i,this.pointcloudOptions.positions=r;var x=w(l.marker.color),g=w(l.marker.border.color),m=l.opacity*l.marker.opacity;x[3]*=m,this.pointcloudOptions.color=x;var k=l.marker.blend;k===null&&(k=u.length<100||p.length<100),this.pointcloudOptions.blend=k,g[3]*=m,this.pointcloudOptions.borderColor=g;var h=l.marker.sizemin,M=Math.max(l.marker.sizemax,l.marker.sizemin);this.pointcloudOptions.sizeMin=h,this.pointcloudOptions.sizeMax=M,this.pointcloudOptions.areaRatio=l.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var A=this.scene.xaxis,C=this.scene.yaxis,L=M/2||.5;l._extremes[A._id]=s(A,[v[0],v[2]],{ppad:L}),l._extremes[C._id]=s(C,[v[1],v[3]],{ppad:L})},f.dispose=function(){this.pointcloud.dispose()},D.exports=function(l,t){var i=new y(l,t.uid);return i.update(t),i}},33876:function(D,E,e){var _=e(71828),w=e(10959);D.exports=function(s,T,y){function f(l,t){return _.coerce(s,T,w,l,t)}f("x"),f("y"),f("xbounds"),f("ybounds"),s.xy&&s.xy instanceof Float32Array&&(T.xy=s.xy),s.indices&&s.indices instanceof Int32Array&&(T.indices=s.indices),f("text"),f("marker.color",y),f("marker.opacity"),f("marker.blend"),f("marker.sizemin"),f("marker.sizemax"),f("marker.border.color",y),f("marker.border.arearatio"),T._length=null}},20593:function(D,E,e){D.exports={attributes:e(10959),supplyDefaults:e(33876),calc:e(36563),plot:e(42743),moduleType:"trace",name:"pointcloud",basePlotModule:e(4796),categories:["gl","gl2d","showLegend"],meta:{}}},39953:function(D,E,e){var _=e(41940),w=e(9012),s=e(22399),T=e(77914),y=e(27670).Y,f=e(5386).fF,l=e(50693),t=e(44467).templatedArray,i=e(12663).descriptionOnlyNumbers,r=e(1426).extendFlat,n=e(30962).overrideAll;(D.exports=n({hoverinfo:r({},w.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:T.hoverlabel,domain:y({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:i("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:_({}),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:s.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:T.hoverlabel,hovertemplate:f({},{keys:["value","label"]})},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:s.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:T.hoverlabel,hovertemplate:f({},{keys:["value","label"]}),colorscales:t("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:r(l().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")).transforms=void 0},75536:function(D,E,e){var _=e(30962).overrideAll,w=e(27659).a0,s=e(60436),T=e(528),y=e(6964),f=e(28569),l=e(47322).prepSelect,t=e(71828),i=e(73972),r="sankey";function n(o,a){var u=o._fullData[a],p=o._fullLayout,c=p.dragmode,b=p.dragmode==="pan"?"move":"crosshair",d=u._bgRect;if(d&&c!=="pan"&&c!=="zoom"){y(d,b);var v={_id:"x",c2p:t.identity,_offset:u._sankey.translateX,_length:u._sankey.width},x={_id:"y",c2p:t.identity,_offset:u._sankey.translateY,_length:u._sankey.height},g={gd:o,element:d.node(),plotinfo:{id:a,xaxis:v,yaxis:x,fillRangeItems:t.noop},subplot:a,xaxes:[v],yaxes:[x],doneFnCompleted:function(m){var k,h=o._fullData[a],M=h.node.groups.slice(),A=[];function C(R){for(var U=h._sankey.graph.nodes,B=0;Bk&&(k=a.source[n]),a.target[n]>k&&(k=a.target[n]);var h,M=k+1;r.node._count=M;var A=r.node.groups,C={};for(n=0;n0&&y(B,M)&&y(G,M)&&(!C.hasOwnProperty(B)||!C.hasOwnProperty(G)||C[B]!==C[G])){C.hasOwnProperty(G)&&(G=C[G]),C.hasOwnProperty(B)&&(B=C[B]),G=+G,b[B=+B]=b[G]=!0;var N="";a.label&&a.label[n]&&(N=a.label[n]);var j=null;N&&d.hasOwnProperty(N)&&(j=d[N]),u.push({pointNumber:n,label:N,color:p?a.color[n]:a.color,customdata:c?a.customdata[n]:a.customdata,concentrationscale:j,source:B,target:G,value:+U}),R.source.push(B),R.target.push(G)}}var V=M+A.length,H=T(o.color),ee=T(o.customdata),Q=[];for(n=0;nM-1,childrenNodes:[],pointNumber:n,label:X,color:H?o.color[n]:o.color,customdata:ee?o.customdata[n]:o.customdata})}var Y=!1;return function(K,te,ae){for(var oe=w.init2dArray(K,0),se=0;se1})}(V,R.source,R.target)&&(Y=!0),{circular:Y,links:u,nodes:Q,groups:A,groupLookup:C}}(t);return s({circular:i.circular,_nodes:i.nodes,_links:i.links,_groups:i.groups,_groupLookup:i.groupLookup})}},85247:function(D){D.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"}}},26857:function(D,E,e){var _=e(71828),w=e(39953),s=e(7901),T=e(84267),y=e(27670).c,f=e(38048),l=e(44467),t=e(85501);function i(r,n){function o(a,u){return _.coerce(r,n,w.link.colorscales,a,u)}o("label"),o("cmin"),o("cmax"),o("colorscale")}D.exports=function(r,n,o,a){function u(M,A){return _.coerce(r,n,w,M,A)}var p=_.extendDeep(a.hoverlabel,r.hoverlabel),c=r.node,b=l.newContainer(n,"node");function d(M,A){return _.coerce(c,b,w.node,M,A)}d("label"),d("groups"),d("x"),d("y"),d("pad"),d("thickness"),d("line.color"),d("line.width"),d("hoverinfo",r.hoverinfo),f(c,b,d,p),d("hovertemplate");var v=a.colorway;d("color",b.label.map(function(M,A){return s.addOpacity(function(C){return v[C%v.length]}(A),.8)})),d("customdata");var x=r.link||{},g=l.newContainer(n,"link");function m(M,A){return _.coerce(x,g,w.link,M,A)}m("label"),m("arrowlen"),m("source"),m("target"),m("value"),m("line.color"),m("line.width"),m("hoverinfo",r.hoverinfo),f(x,g,m,p),m("hovertemplate");var k,h=T(a.paper_bgcolor).getLuminance()<.333?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)";m("color",_.repeat(h,g.value.length)),m("customdata"),t(x,g,{name:"colorscales",handleItemDefaults:i}),y(n,a,u),u("orientation"),u("valueformat"),u("valuesuffix"),b.x.length&&b.y.length&&(k="freeform"),u("arrangement",k),_.coerceFont(u,"textfont",_.extendFlat({},a.font)),n._length=null}},29396:function(D,E,e){D.exports={attributes:e(39953),supplyDefaults:e(26857),calc:e(92930),plot:e(60436),moduleType:"trace",name:"sankey",basePlotModule:e(75536),selectPoints:e(84564),categories:["noOpacity"],meta:{}}},60436:function(D,E,e){var _=e(39898),w=e(71828),s=w.numberFormat,T=e(3393),y=e(30211),f=e(7901),l=e(85247).cn,t=w._;function i(x){return x!==""}function r(x,g){return x.filter(function(m){return m.key===g.traceId})}function n(x,g){_.select(x).select("path").style("fill-opacity",g),_.select(x).select("rect").style("fill-opacity",g)}function o(x){_.select(x).select("text.name").style("fill","black")}function a(x){return function(g){return x.node.sourceLinks.indexOf(g.link)!==-1||x.node.targetLinks.indexOf(g.link)!==-1}}function u(x){return function(g){return g.node.sourceLinks.indexOf(x.link)!==-1||g.node.targetLinks.indexOf(x.link)!==-1}}function p(x,g,m){g&&m&&r(m,g).selectAll("."+l.sankeyLink).filter(a(g)).call(b.bind(0,g,m,!1))}function c(x,g,m){g&&m&&r(m,g).selectAll("."+l.sankeyLink).filter(a(g)).call(d.bind(0,g,m,!1))}function b(x,g,m,k){var h=k.datum().link.label;k.style("fill-opacity",function(M){if(!M.link.concentrationscale)return .4}),h&&r(g,x).selectAll("."+l.sankeyLink).filter(function(M){return M.link.label===h}).style("fill-opacity",function(M){if(!M.link.concentrationscale)return .4}),m&&r(g,x).selectAll("."+l.sankeyNode).filter(u(x)).call(p)}function d(x,g,m,k){var h=k.datum().link.label;k.style("fill-opacity",function(M){return M.tinyColorAlpha}),h&&r(g,x).selectAll("."+l.sankeyLink).filter(function(M){return M.link.label===h}).style("fill-opacity",function(M){return M.tinyColorAlpha}),m&&r(g,x).selectAll(l.sankeyNode).filter(u(x)).call(c)}function v(x,g){var m=x.hoverlabel||{},k=w.nestedProperty(m,g).get();return!Array.isArray(k)&&k}D.exports=function(x,g){for(var m=x._fullLayout,k=m._paper,h=m._size,M=0;M"),color:v(G,"bgcolor")||f.addOpacity(H.color,1),borderColor:v(G,"bordercolor"),fontFamily:v(G,"font.family"),fontSize:v(G,"font.size"),fontColor:v(G,"font.color"),nameLength:v(G,"namelength"),textAlign:v(G,"align"),idealAlign:_.event.x"),color:v(G,"bgcolor")||B.tinyColorHue,borderColor:v(G,"bordercolor"),fontFamily:v(G,"font.family"),fontSize:v(G,"font.size"),fontColor:v(G,"font.color"),nameLength:v(G,"namelength"),textAlign:v(G,"align"),idealAlign:"left",hovertemplate:G.hovertemplate,hovertemplateLabels:X,eventData:[B.node]},{container:m._hoverlayer.node(),outerContainer:m._paper.node(),gd:x});n(te,.85),o(te)}}},unhover:function(U,B,G){x._fullLayout.hovermode!==!1&&(_.select(U).call(c,B,G),B.node.trace.node.hoverinfo!=="skip"&&(B.node.fullData=B.node.trace,x.emit("plotly_unhover",{event:_.event,points:[B.node]})),y.loneUnhover(m._hoverlayer.node()))},select:function(U,B,G){var N=B.node;N.originalEvent=_.event,x._hoverdata=[N],_.select(U).call(c,B,G),y.click(x,{target:!0})}}})}},3393:function(D,E,e){var _=e(49887),w=e(81684).k4,s=e(39898),T=e(30838),y=e(86781),f=e(85247),l=e(84267),t=e(7901),i=e(91424),r=e(71828),n=r.strTranslate,o=r.strRotate,a=e(28984),u=a.keyFun,p=a.repeat,c=a.unwrap,b=e(63893),d=e(73972),v=e(18783),x=v.CAP_SHIFT,g=v.LINE_SPACING;function m(V,H,ee){var Q,X=c(H),Y=X.trace,K=Y.domain,te=Y.orientation==="h",ae=Y.node.pad,oe=Y.node.thickness,se=V.width*(K.x[1]-K.x[0]),fe=V.height*(K.y[1]-K.y[0]),ye=X._nodes,pe=X._links,de=X.circular;(Q=de?y.sankeyCircular().circularLinkGap(0):T.sankey()).iterations(f.sankeyIterations).size(te?[se,fe]:[fe,se]).nodeWidth(oe).nodePadding(ae).nodeId(function(Te){return Te.pointNumber}).nodes(ye).links(pe);var he,xe,Re,we=Q();for(var Ae in Q.nodePadding()be+oe&&(ge+=1,Ee=Se.x0),be=Se.x0,je[ge]||(je[ge]=[]),je[ge].push(Se),Ue=Ee-Se.x0,Se.x0+=Ue,Se.x1+=Ue}return je}(ye=we.nodes).forEach(function(Te){var Ee,Ue,De,je=0,ge=Te.length;for(Te.sort(function(be,Se){return be.y0-Se.y0}),De=0;De=je||(Ue=je-Ee.y0)>1e-6&&(Ee.y0+=Ue,Ee.y1+=Ue),je=Ee.y1+ae}),Q.update(we)}return{circular:de,key:ee,trace:Y,guid:r.randstr(),horizontal:te,width:se,height:fe,nodePad:Y.node.pad,nodeLineColor:Y.node.line.color,nodeLineWidth:Y.node.line.width,linkLineColor:Y.link.line.color,linkLineWidth:Y.link.line.width,linkArrowLength:Y.link.arrowlen,valueFormat:Y.valueformat,valueSuffix:Y.valuesuffix,textFont:Y.textfont,translateX:K.x[0]*V.width+V.margin.l,translateY:V.height-K.y[1]*V.height+V.margin.t,dragParallel:te?fe:se,dragPerpendicular:te?se:fe,arrangement:Y.arrangement,sankey:Q,graph:we,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function k(V,H,ee){var Q=l(H.color),X=H.source.label+"|"+H.target.label+"__"+ee;return H.trace=V.trace,H.curveNumber=V.trace.index,{circular:V.circular,key:X,traceId:V.key,pointNumber:H.pointNumber,link:H,tinyColorHue:t.tinyRGB(Q),tinyColorAlpha:Q.getAlpha(),linkPath:h,linkLineColor:V.linkLineColor,linkLineWidth:V.linkLineWidth,linkArrowLength:V.linkArrowLength,valueFormat:V.valueFormat,valueSuffix:V.valueSuffix,sankey:V.sankey,parent:V,interactionState:V.interactionState,flow:H.flow}}function h(){return function(V){var H=V.linkArrowLength;if(V.link.circular)return function(xe,Re){var we=xe.width/2,Ae=xe.circularPathData;return xe.circularLinkType==="top"?"M "+(Ae.targetX-Re)+" "+(Ae.targetY+we)+" L"+(Ae.rightInnerExtent-Re)+" "+(Ae.targetY+we)+"A"+(Ae.rightLargeArcRadius+we)+" "+(Ae.rightSmallArcRadius+we)+" 0 0 1 "+(Ae.rightFullExtent-we-Re)+" "+(Ae.targetY-Ae.rightSmallArcRadius)+"L"+(Ae.rightFullExtent-we-Re)+" "+Ae.verticalRightInnerExtent+"A"+(Ae.rightLargeArcRadius+we)+" "+(Ae.rightLargeArcRadius+we)+" 0 0 1 "+(Ae.rightInnerExtent-Re)+" "+(Ae.verticalFullExtent-we)+"L"+Ae.leftInnerExtent+" "+(Ae.verticalFullExtent-we)+"A"+(Ae.leftLargeArcRadius+we)+" "+(Ae.leftLargeArcRadius+we)+" 0 0 1 "+(Ae.leftFullExtent+we)+" "+Ae.verticalLeftInnerExtent+"L"+(Ae.leftFullExtent+we)+" "+(Ae.sourceY-Ae.leftSmallArcRadius)+"A"+(Ae.leftLargeArcRadius+we)+" "+(Ae.leftSmallArcRadius+we)+" 0 0 1 "+Ae.leftInnerExtent+" "+(Ae.sourceY+we)+"L"+Ae.sourceX+" "+(Ae.sourceY+we)+"L"+Ae.sourceX+" "+(Ae.sourceY-we)+"L"+Ae.leftInnerExtent+" "+(Ae.sourceY-we)+"A"+(Ae.leftLargeArcRadius-we)+" "+(Ae.leftSmallArcRadius-we)+" 0 0 0 "+(Ae.leftFullExtent-we)+" "+(Ae.sourceY-Ae.leftSmallArcRadius)+"L"+(Ae.leftFullExtent-we)+" "+Ae.verticalLeftInnerExtent+"A"+(Ae.leftLargeArcRadius-we)+" "+(Ae.leftLargeArcRadius-we)+" 0 0 0 "+Ae.leftInnerExtent+" "+(Ae.verticalFullExtent+we)+"L"+(Ae.rightInnerExtent-Re)+" "+(Ae.verticalFullExtent+we)+"A"+(Ae.rightLargeArcRadius-we)+" "+(Ae.rightLargeArcRadius-we)+" 0 0 0 "+(Ae.rightFullExtent+we-Re)+" "+Ae.verticalRightInnerExtent+"L"+(Ae.rightFullExtent+we-Re)+" "+(Ae.targetY-Ae.rightSmallArcRadius)+"A"+(Ae.rightLargeArcRadius-we)+" "+(Ae.rightSmallArcRadius-we)+" 0 0 0 "+(Ae.rightInnerExtent-Re)+" "+(Ae.targetY-we)+"L"+(Ae.targetX-Re)+" "+(Ae.targetY-we)+(Re>0?"L"+Ae.targetX+" "+Ae.targetY:"")+"Z":"M "+(Ae.targetX-Re)+" "+(Ae.targetY-we)+" L"+(Ae.rightInnerExtent-Re)+" "+(Ae.targetY-we)+"A"+(Ae.rightLargeArcRadius+we)+" "+(Ae.rightSmallArcRadius+we)+" 0 0 0 "+(Ae.rightFullExtent-we-Re)+" "+(Ae.targetY+Ae.rightSmallArcRadius)+"L"+(Ae.rightFullExtent-we-Re)+" "+Ae.verticalRightInnerExtent+"A"+(Ae.rightLargeArcRadius+we)+" "+(Ae.rightLargeArcRadius+we)+" 0 0 0 "+(Ae.rightInnerExtent-Re)+" "+(Ae.verticalFullExtent+we)+"L"+Ae.leftInnerExtent+" "+(Ae.verticalFullExtent+we)+"A"+(Ae.leftLargeArcRadius+we)+" "+(Ae.leftLargeArcRadius+we)+" 0 0 0 "+(Ae.leftFullExtent+we)+" "+Ae.verticalLeftInnerExtent+"L"+(Ae.leftFullExtent+we)+" "+(Ae.sourceY+Ae.leftSmallArcRadius)+"A"+(Ae.leftLargeArcRadius+we)+" "+(Ae.leftSmallArcRadius+we)+" 0 0 0 "+Ae.leftInnerExtent+" "+(Ae.sourceY-we)+"L"+Ae.sourceX+" "+(Ae.sourceY-we)+"L"+Ae.sourceX+" "+(Ae.sourceY+we)+"L"+Ae.leftInnerExtent+" "+(Ae.sourceY+we)+"A"+(Ae.leftLargeArcRadius-we)+" "+(Ae.leftSmallArcRadius-we)+" 0 0 1 "+(Ae.leftFullExtent-we)+" "+(Ae.sourceY+Ae.leftSmallArcRadius)+"L"+(Ae.leftFullExtent-we)+" "+Ae.verticalLeftInnerExtent+"A"+(Ae.leftLargeArcRadius-we)+" "+(Ae.leftLargeArcRadius-we)+" 0 0 1 "+Ae.leftInnerExtent+" "+(Ae.verticalFullExtent-we)+"L"+(Ae.rightInnerExtent-Re)+" "+(Ae.verticalFullExtent-we)+"A"+(Ae.rightLargeArcRadius-we)+" "+(Ae.rightLargeArcRadius-we)+" 0 0 1 "+(Ae.rightFullExtent+we-Re)+" "+Ae.verticalRightInnerExtent+"L"+(Ae.rightFullExtent+we-Re)+" "+(Ae.targetY+Ae.rightSmallArcRadius)+"A"+(Ae.rightLargeArcRadius-we)+" "+(Ae.rightSmallArcRadius-we)+" 0 0 1 "+(Ae.rightInnerExtent-Re)+" "+(Ae.targetY+we)+"L"+(Ae.targetX-Re)+" "+(Ae.targetY+we)+(Re>0?"L"+Ae.targetX+" "+Ae.targetY:"")+"Z"}(V.link,H);var ee=Math.abs((V.link.target.x0-V.link.source.x1)/2);H>ee&&(H=ee);var Q=V.link.source.x1,X=V.link.target.x0-H,Y=w(Q,X),K=Y(.5),te=Y(.5),ae=V.link.y0-V.link.width/2,oe=V.link.y0+V.link.width/2,se=V.link.y1-V.link.width/2,fe=V.link.y1+V.link.width/2,ye="M"+Q+","+ae,pe="C"+K+","+ae+" "+te+","+se+" "+X+","+se,de="C"+te+","+fe+" "+K+","+oe+" "+Q+","+oe,he=H>0?"L"+(X+H)+","+(se+V.link.width/2):"";return ye+pe+(he+="L"+X+","+fe)+de+"Z"}}function M(V,H){var ee=l(H.color),Q=f.nodePadAcross,X=V.nodePad/2;H.dx=H.x1-H.x0,H.dy=H.y1-H.y0;var Y=H.dx,K=Math.max(.5,H.dy),te="node_"+H.pointNumber;return H.group&&(te=r.randstr()),H.trace=V.trace,H.curveNumber=V.trace.index,{index:H.pointNumber,key:te,partOfGroup:H.partOfGroup||!1,group:H.group,traceId:V.key,trace:V.trace,node:H,nodePad:V.nodePad,nodeLineColor:V.nodeLineColor,nodeLineWidth:V.nodeLineWidth,textFont:V.textFont,size:V.horizontal?V.height:V.width,visibleWidth:Math.ceil(Y),visibleHeight:K,zoneX:-Q,zoneY:-X,zoneWidth:Y+2*Q,zoneHeight:K+2*X,labelY:V.horizontal?H.dy/2+1:H.dx/2+1,left:H.originalLayer===1,sizeAcross:V.width,forceLayouts:V.forceLayouts,horizontal:V.horizontal,darkBackground:ee.getBrightness()<=128,tinyColorHue:t.tinyRGB(ee),tinyColorAlpha:ee.getAlpha(),valueFormat:V.valueFormat,valueSuffix:V.valueSuffix,sankey:V.sankey,graph:V.graph,arrangement:V.arrangement,uniqueNodeLabelPathId:[V.guid,V.key,te].join("_"),interactionState:V.interactionState,figure:V}}function A(V){V.attr("transform",function(H){return n(H.node.x0.toFixed(3),H.node.y0.toFixed(3))})}function C(V){V.call(A)}function L(V,H){V.call(C),H.attr("d",h())}function O(V){V.attr("width",function(H){return H.node.x1-H.node.x0}).attr("height",function(H){return H.visibleHeight})}function I(V){return V.link.width>1||V.linkLineWidth>0}function R(V){return n(V.translateX,V.translateY)+(V.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function U(V,H,ee){V.on(".basic",null).on("mouseover.basic",function(Q){Q.interactionState.dragInProgress||Q.partOfGroup||(ee.hover(this,Q,H),Q.interactionState.hovered=[this,Q])}).on("mousemove.basic",function(Q){Q.interactionState.dragInProgress||Q.partOfGroup||(ee.follow(this,Q),Q.interactionState.hovered=[this,Q])}).on("mouseout.basic",function(Q){Q.interactionState.dragInProgress||Q.partOfGroup||(ee.unhover(this,Q,H),Q.interactionState.hovered=!1)}).on("click.basic",function(Q){Q.interactionState.hovered&&(ee.unhover(this,Q,H),Q.interactionState.hovered=!1),Q.interactionState.dragInProgress||Q.partOfGroup||ee.select(this,Q,H)})}function B(V,H,ee,Q){var X=s.behavior.drag().origin(function(Y){return{x:Y.node.x0+Y.visibleWidth/2,y:Y.node.y0+Y.visibleHeight/2}}).on("dragstart",function(Y){if(Y.arrangement!=="fixed"&&(r.ensureSingle(Q._fullLayout._infolayer,"g","dragcover",function(te){Q._fullLayout._dragCover=te}),r.raiseToTop(this),Y.interactionState.dragInProgress=Y.node,N(Y.node),Y.interactionState.hovered&&(ee.nodeEvents.unhover.apply(0,Y.interactionState.hovered),Y.interactionState.hovered=!1),Y.arrangement==="snap")){var K=Y.traceId+"|"+Y.key;Y.forceLayouts[K]?Y.forceLayouts[K].alpha(1):function(te,ae,oe,se){(function(ye){for(var pe=0;pe0&&he.forceLayouts[pe].alpha(0)}}(0,ae,fe,oe)).stop()}(0,K,Y),function(te,ae,oe,se,fe){window.requestAnimationFrame(function ye(){var pe;for(pe=0;pe0)window.requestAnimationFrame(ye);else{var de=oe.node.originalX;oe.node.x0=de-oe.visibleWidth/2,oe.node.x1=de+oe.visibleWidth/2,G(oe,fe)}})}(V,H,Y,K,Q)}}).on("drag",function(Y){if(Y.arrangement!=="fixed"){var K=s.event.x,te=s.event.y;Y.arrangement==="snap"?(Y.node.x0=K-Y.visibleWidth/2,Y.node.x1=K+Y.visibleWidth/2,Y.node.y0=te-Y.visibleHeight/2,Y.node.y1=te+Y.visibleHeight/2):(Y.arrangement==="freeform"&&(Y.node.x0=K-Y.visibleWidth/2,Y.node.x1=K+Y.visibleWidth/2),te=Math.max(0,Math.min(Y.size-Y.visibleHeight/2,te)),Y.node.y0=te-Y.visibleHeight/2,Y.node.y1=te+Y.visibleHeight/2),N(Y.node),Y.arrangement!=="snap"&&(Y.sankey.update(Y.graph),L(V.filter(j(Y)),H))}}).on("dragend",function(Y){if(Y.arrangement!=="fixed"){Y.interactionState.dragInProgress=!1;for(var K=0;Kd&&B[x].gap;)x--;for(m=B[x].s,v=B.length-1;v>x;v--)B[v].s=m;for(;dL[o]&&o=0;o--){var a=T[o];if(a.type==="scatter"&&a.xaxis===r.xaxis&&a.yaxis===r.yaxis){a.opacity=void 0;break}}}}}},17438:function(D,E,e){var _=e(71828),w=e(73972),s=e(82196),T=e(47581),y=e(34098),f=e(67513),l=e(73927),t=e(565),i=e(49508),r=e(11058),n=e(94039),o=e(82410),a=e(28908),u=e(71828).coercePattern;D.exports=function(p,c,b,d){function v(C,L){return _.coerce(p,c,s,C,L)}var x=f(p,c,d,v);if(x||(c.visible=!1),c.visible){l(p,c,d,v),v("xhoverformat"),v("yhoverformat");var g=t(p,c,d,v);d.scattermode==="group"&&c.orientation===void 0&&v("orientation","v");var m=!g&&x=Math.min(de,he)&&p<=Math.max(de,he)?0:1/0}var xe=Math.max(3,pe.mrc||0),Re=1-1/xe,we=Math.abs(a.c2p(pe.x)-p);return we=Math.min(de,he)&&c<=Math.max(de,he)?0:1/0}var xe=Math.max(3,pe.mrc||0),Re=1-1/xe,we=Math.abs(u.c2p(pe.y)-c);return wefe!=(Q=N[B][1])>=fe&&(V=N[B-1][0],H=N[B][0],Q-ee&&(j=V+(H-V)*(fe-ee)/(Q-ee),te=Math.min(te,j),ae=Math.max(ae,j)));te=Math.max(te,0),ae=Math.min(ae,a._length);var ye=y.defaultLine;return y.opacity(o.fillcolor)?ye=o.fillcolor:y.opacity((o.line||{}).color)&&(ye=o.line.color),_.extendFlat(l,{distance:l.maxHoverDistance,x0:te,x1:ae,y0:fe,y1:fe,color:ye,hovertemplate:!1}),delete l.index,o.text&&!Array.isArray(o.text)?l.text=String(o.text):l.text=o.name,[l]}}}},67368:function(D,E,e){var _=e(34098);D.exports={hasLines:_.hasLines,hasMarkers:_.hasMarkers,hasText:_.hasText,isBubble:_.isBubble,attributes:e(82196),layoutAttributes:e(21479),supplyDefaults:e(17438),crossTraceDefaults:e(34936),supplyLayoutDefaults:e(79334),calc:e(47761).calc,crossTraceCalc:e(72626),arraysToCalcdata:e(75225),plot:e(32663),colorbar:e(4898),formatLabels:e(8225),style:e(16296).style,styleOnSelect:e(16296).styleOnSelect,hoverPoints:e(33720),selectPoints:e(98002),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:e(93612),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},21479:function(D){D.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}},79334:function(D,E,e){var _=e(71828),w=e(21479);D.exports=function(s,T){var y,f=T.barmode==="group";T.scattermode==="group"&&(y=f?T.bargap:.2,_.coerce(s,T,w,"scattergap",y))}},11058:function(D,E,e){var _=e(71828).isArrayOrTypedArray,w=e(52075).hasColorscale,s=e(1586);D.exports=function(T,y,f,l,t,i){i||(i={});var r=(T.marker||{}).color;t("line.color",f),w(T,"line")?s(T,y,l,t,{prefix:"line.",cLetter:"c"}):t("line.color",!_(r)&&r||f),t("line.width"),i.noDash||t("line.dash"),i.backoff&&t("line.backoff")}},34621:function(D,E,e){var _=e(91424),w=e(50606),s=w.BADNUM,T=w.LOG_CLIP,y=T+.5,f=T-.5,l=e(71828),t=l.segmentsIntersect,i=l.constrain,r=e(47581);D.exports=function(n,o){var a,u,p,c,b,d,v,x,g,m,k,h,M,A,C,L,O,I,R=o.trace||{},U=o.xaxis,B=o.yaxis,G=U.type==="log",N=B.type==="log",j=U._length,V=B._length,H=o.backoff,ee=R.marker,Q=o.connectGaps,X=o.baseTolerance,Y=o.shape,K=Y==="linear",te=R.fill&&R.fill!=="none",ae=[],oe=r.minTolerance,se=n.length,fe=new Array(se),ye=0;function pe(Nt){var Je=n[Nt];if(!Je)return!1;var Ke=o.linearized?U.l2p(Je.x):U.c2p(Je.x),Ge=o.linearized?B.l2p(Je.y):B.c2p(Je.y);if(Ke===s){if(G&&(Ke=U.c2p(Je.x,!0)),Ke===s)return!1;N&&Ge===s&&(Ke*=Math.abs(U._m*V*(U._m>0?y:f)/(B._m*j*(B._m>0?y:f)))),Ke*=1e3}if(Ge===s){if(N&&(Ge=B.c2p(Je.y,!0)),Ge===s)return!1;Ge*=1e3}return[Ke,Ge]}function de(Nt,Je,Ke,Ge){var nt=Ke-Nt,ht=Ge-Je,Oe=.5-Nt,Be=.5-Je,Qe=nt*nt+ht*ht,ut=nt*Oe+ht*Be;if(ut>0&&utEe||Nt[1]De)return[i(Nt[0],Te,Ee),i(Nt[1],Ue,De)]}function be(Nt,Je){return Nt[0]===Je[0]&&(Nt[0]===Te||Nt[0]===Ee)||Nt[1]===Je[1]&&(Nt[1]===Ue||Nt[1]===De)||void 0}function Se(Nt,Je,Ke){return function(Ge,nt){var ht=ge(Ge),Oe=ge(nt),Be=[];if(ht&&Oe&&be(ht,Oe))return Be;ht&&Be.push(ht),Oe&&Be.push(Oe);var Qe=2*l.constrain((Ge[Nt]+nt[Nt])/2,Je,Ke)-((ht||Ge)[Nt]+(Oe||nt)[Nt]);return Qe&&((ht&&Oe?Qe>0==ht[Nt]>Oe[Nt]?ht:Oe:ht||Oe)[Nt]+=Qe),Be}}function Ne(Nt){var Je=Nt[0],Ke=Nt[1],Ge=Je===fe[ye-1][0],nt=Ke===fe[ye-1][1];if(!Ge||!nt)if(ye>1){var ht=Je===fe[ye-2][0],Oe=Ke===fe[ye-2][1];Ge&&(Je===Te||Je===Ee)&&ht?Oe?ye--:fe[ye-1]=Nt:nt&&(Ke===Ue||Ke===De)&&Oe?ht?ye--:fe[ye-1]=Nt:fe[ye++]=Nt}else fe[ye++]=Nt}function Ye(Nt){fe[ye-1][0]!==Nt[0]&&fe[ye-1][1]!==Nt[1]&&Ne([Ae,Me]),Ne(Nt),Ce=null,Ae=Me=0}Y==="linear"||Y==="spline"?ue=function(Nt,Je){for(var Ke=[],Ge=0,nt=0;nt<4;nt++){var ht=je[nt],Oe=t(Nt[0],Nt[1],Je[0],Je[1],ht[0],ht[1],ht[2],ht[3]);Oe&&(!Ge||Math.abs(Oe.x-Ke[0][0])>1||Math.abs(Oe.y-Ke[0][1])>1)&&(Oe=[Oe.x,Oe.y],Ge&&xe(Oe,Nt)Ee?Ee:0,we=Nt[1]De?De:0,Re||we){if(ye)if(Ce){var Je=ue(Ce,Nt);Je.length>1&&(Ye(Je[0]),fe[ye++]=Je[1])}else ne=ue(fe[ye-1],Nt)[0],fe[ye++]=ne;else fe[ye++]=[Re||Nt[0],we||Nt[1]];var Ke=fe[ye-1];Re&&we&&(Ke[0]!==Re||Ke[1]!==we)?(Ce&&(Ae!==Re&&Me!==we?Ne(Ae&&Me?(Ge=Ce,ht=(nt=Nt)[0]-Ge[0],Oe=(nt[1]-Ge[1])/ht,(Ge[1]*nt[0]-nt[1]*Ge[0])/ht>0?[Oe>0?Te:Ee,De]:[Oe>0?Ee:Te,Ue]):[Ae||Re,Me||we]):Ae&&Me&&Ne([Ae,Me])),Ne([Re,we])):Ae-Re&&Me-we&&Ne([Re||Ae,we||Me]),Ce=Nt,Ae=Re,Me=we}else Ce&&Ye(ue(Ce,Nt)[0]),fe[ye++]=Nt;var Ge,nt,ht,Oe}for(a=0;ahe(d,ot))break;p=d,(M=g[0]*x[0]+g[1]*x[1])>k?(k=M,c=d,v=!1):M=n.length||!d)break;st(d),u=d}}else st(c)}Ce&&Ne([Ae||Ce[0],Me||Ce[1]]),ae.push(fe.slice(0,ye))}var ft=Y.slice(Y.length-1);if(H&&ft!=="h"&&ft!=="v"){for(var yt=!1,Et=-1,Tt=[],xt=0;xt=0?l=o:(l=o=n,n++),l0?Math.max(i,f):0}}},4898:function(D){D.exports={container:"marker",min:"cmin",max:"cmax"}},49508:function(D,E,e){var _=e(7901),w=e(52075).hasColorscale,s=e(1586),T=e(34098);D.exports=function(y,f,l,t,i,r){var n=T.isBubble(y),o=(y.line||{}).color;r=r||{},o&&(l=o),i("marker.symbol"),i("marker.opacity",n?.7:1),i("marker.size"),r.noAngle||(i("marker.angle"),r.noAngleRef||i("marker.angleref"),r.noStandOff||i("marker.standoff")),i("marker.color",l),w(y,"marker")&&s(y,f,t,i,{prefix:"marker.",cLetter:"c"}),r.noSelect||(i("selected.marker.color"),i("unselected.marker.color"),i("selected.marker.size"),i("unselected.marker.size")),r.noLine||(i("marker.line.color",o&&!Array.isArray(o)&&f.marker.color!==o?o:n?_.background:_.defaultLine),w(y,"marker.line")&&s(y,f,t,i,{prefix:"marker.line.",cLetter:"c"}),i("marker.line.width",n?1:0)),n&&(i("marker.sizeref"),i("marker.sizemin"),i("marker.sizemode")),r.gradient&&i("marker.gradient.type")!=="none"&&i("marker.gradient.color")}},73927:function(D,E,e){var _=e(71828).dateTick0,w=e(50606).ONEWEEK;function s(T,y){return _(y,T%w==0?1:0)}D.exports=function(T,y,f,l,t){if(t||(t={x:!0,y:!0}),t.x){var i=l("xperiod");i&&(l("xperiod0",s(i,y.xcalendar)),l("xperiodalignment"))}if(t.y){var r=l("yperiod");r&&(l("yperiod0",s(r,y.ycalendar)),l("yperiodalignment"))}}},32663:function(D,E,e){var _=e(39898),w=e(73972),s=e(71828),T=s.ensureSingle,y=s.identity,f=e(91424),l=e(34098),t=e(34621),i=e(68687),r=e(61082).tester;function n(o,a,u,p,c,b,d){var v,x=o._context.staticPlot;(function(ue,me,Te,Ee,Ue){var De=Te.xaxis,je=Te.yaxis,ge=_.extent(s.simpleMap(De.range,De.r2c)),be=_.extent(s.simpleMap(je.range,je.r2c)),Se=Ee[0].trace;if(l.hasMarkers(Se)){var Ne=Se.marker.maxdisplayed;if(Ne!==0){var Ye=Ee.filter(function(ft){return ft.x>=ge[0]&&ft.x<=ge[1]&&ft.y>=be[0]&&ft.y<=be[1]}),Ze=Math.ceil(Ye.length/Ne),st=0;Ue.forEach(function(ft,yt){var Et=ft[0].trace;l.hasMarkers(Et)&&Et.marker.maxdisplayed>0&&yt0;function m(ue){return g?ue.transition():ue}var k=u.xaxis,h=u.yaxis,M=p[0].trace,A=M.line,C=_.select(b),L=T(C,"g","errorbars"),O=T(C,"g","lines"),I=T(C,"g","points"),R=T(C,"g","text");if(w.getComponentMethod("errorbars","plot")(o,L,u,d),M.visible===!0){var U,B;m(C).style("opacity",M.opacity);var G=M.fill.charAt(M.fill.length-1);G!=="x"&&G!=="y"&&(G=""),p[0][u.isRangePlot?"nodeRangePlot3":"node3"]=C;var N,j,V="",H=[],ee=M._prevtrace;ee&&(V=ee._prevRevpath||"",B=ee._nextFill,H=ee._polygons);var Q,X,Y,K,te,ae,oe,se="",fe="",ye=[],pe=s.noop;if(U=M._ownFill,l.hasLines(M)||M.fill!=="none"){for(B&&B.datum(p),["hv","vh","hvh","vhv"].indexOf(A.shape)!==-1?(Q=f.steps(A.shape),X=f.steps(A.shape.split("").reverse().join(""))):Q=X=A.shape==="spline"?function(ue){var me=ue[ue.length-1];return ue.length>1&&ue[0][0]===me[0]&&ue[0][1]===me[1]?f.smoothclosed(ue.slice(1),A.smoothing):f.smoothopen(ue,A.smoothing)}:function(ue){return"M"+ue.join("L")},Y=function(ue){return X(ue.reverse())},ye=t(p,{xaxis:k,yaxis:h,trace:M,connectGaps:M.connectgaps,baseTolerance:Math.max(A.width||1,3)/4,shape:A.shape,backoff:A.backoff,simplify:A.simplify,fill:M.fill}),oe=M._polygons=new Array(ye.length),v=0;v0,m=i(o,a,u);(d=p.selectAll("g.trace").data(m,function(k){return k[0].trace.uid})).enter().append("g").attr("class",function(k){return"trace scatter trace"+k[0].trace.uid}).style("stroke-miterlimit",2),d.order(),function(k,h,M){h.each(function(A){var C=T(_.select(this),"g","fills");f.setClipUrl(C,M.layerClipId,k);var L=A[0].trace,O=[];L._ownfill&&O.push("_ownFill"),L._nexttrace&&O.push("_nextFill");var I=C.selectAll("g").data(O,y);I.enter().append("g"),I.exit().each(function(R){L[R]=null}).remove(),I.order().each(function(R){L[R]=T(_.select(this),"path","js-fill")})})}(o,d,a),g?(b&&(v=b()),_.transition().duration(c.duration).ease(c.easing).each("end",function(){v&&v()}).each("interrupt",function(){v&&v()}).each(function(){p.selectAll("g.trace").each(function(k,h){n(o,h,a,k,m,this,c)})})):d.each(function(k,h){n(o,h,a,k,m,this,c)}),x&&d.exit().remove(),p.selectAll("path:not([d])").remove()}},98002:function(D,E,e){var _=e(34098);D.exports=function(w,s){var T,y,f,l,t=w.cd,i=w.xaxis,r=w.yaxis,n=[],o=t[0].trace;if(!_.hasMarkers(o)&&!_.hasText(o))return[];if(s===!1)for(T=0;T0){var u=f.c2l(o);f._lowerLogErrorBound||(f._lowerLogErrorBound=u),f._lowerErrorBound=Math.min(f._lowerLogErrorBound,u)}}else t[i]=[-r[0]*y,r[1]*y]}return t}D.exports=function(s,T,y){var f=[w(s.x,s.error_x,T[0],y.xaxis),w(s.y,s.error_y,T[1],y.yaxis),w(s.z,s.error_z,T[2],y.zaxis)],l=function(a){for(var u=0;u-1?-1:h.indexOf("right")>-1?1:0}function d(h){return h==null?0:h.indexOf("top")>-1?-1:h.indexOf("bottom")>-1?1:0}function v(h,M){return M(4*h)}function x(h){return n[h]}function g(h,M,A,C,L){var O=null;if(f.isArrayOrTypedArray(h)){O=[];for(var I=0;I=0){var B=function(G,N,j){var V,H=(j+1)%3,ee=(j+2)%3,Q=[],X=[];for(V=0;V=0&&o("surfacecolor",u||p);for(var c=["x","y","z"],b=0;b<3;++b){var d="projection."+c[b];o(d+".show")&&(o(d+".opacity"),o(d+".scale"))}var v=_.getComponentMethod("errorbars","supplyDefaults");v(t,i,u||p||r,{axis:"z"}),v(t,i,u||p||r,{axis:"y",inherit:"z"}),v(t,i,u||p||r,{axis:"x",inherit:"z"})}else i.visible=!1}},13551:function(D,E,e){D.exports={plot:e(58925),attributes:e(44542),markerSymbols:e(87381),supplyDefaults:e(21428),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:e(36563),moduleType:"trace",name:"scatter3d",basePlotModule:e(58547),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}},97001:function(D,E,e){var _=e(82196),w=e(9012),s=e(5386).fF,T=e(5386).si,y=e(50693),f=e(1426).extendFlat,l=_.marker,t=_.line,i=l.line;D.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:f({},_.mode,{dflt:"markers"}),text:f({},_.text,{}),texttemplate:T({editType:"plot"},{keys:["a","b","text"]}),hovertext:f({},_.hovertext,{}),line:{color:t.color,width:t.width,dash:t.dash,backoff:t.backoff,shape:f({},t.shape,{values:["linear","spline"]}),smoothing:t.smoothing,editType:"calc"},connectgaps:_.connectgaps,fill:f({},_.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:_.fillcolor,marker:f({symbol:l.symbol,opacity:l.opacity,maxdisplayed:l.maxdisplayed,angle:l.angle,angleref:l.angleref,standoff:l.standoff,size:l.size,sizeref:l.sizeref,sizemin:l.sizemin,sizemode:l.sizemode,line:f({width:i.width,editType:"calc"},y("marker.line")),gradient:l.gradient,editType:"calc"},y("marker")),textfont:_.textfont,textposition:_.textposition,selected:_.selected,unselected:_.unselected,hoverinfo:f({},w.hoverinfo,{flags:["a","b","text","name"]}),hoveron:_.hoveron,hovertemplate:s()}},34618:function(D,E,e){var _=e(92770),w=e(36922),s=e(75225),T=e(66279),y=e(47761).calcMarkerSize,f=e(22882);D.exports=function(l,t){var i=t._carpetTrace=f(l,t);if(i&&i.visible&&i.visible!=="legendonly"){var r;t.xaxis=i.xaxis,t.yaxis=i.yaxis;var n,o,a=t._length,u=new Array(a),p=!1;for(r=0;r")}return l}function v(x,g){var m;m=x.labelprefix&&x.labelprefix.length>0?x.labelprefix.replace(/ = $/,""):x._hovertitle,b.push(m+": "+g.toFixed(3)+x.labelsuffix)}}},46858:function(D,E,e){D.exports={attributes:e(97001),supplyDefaults:e(98965),colorbar:e(4898),formatLabels:e(48953),calc:e(34618),plot:e(1913),style:e(16296).style,styleOnSelect:e(16296).styleOnSelect,hoverPoints:e(22931),selectPoints:e(98002),eventData:e(16165),moduleType:"trace",name:"scattercarpet",basePlotModule:e(93612),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}},1913:function(D,E,e){var _=e(32663),w=e(89298),s=e(91424);D.exports=function(T,y,f,l){var t,i,r,n=f[0][0].carpet,o=w.getFromId(T,n.xaxis||"x"),a=w.getFromId(T,n.yaxis||"y"),u={xaxis:o,yaxis:a,plot:y.plot};for(t=0;t")}function B(G){return G+"°"}}(r,c,f,i[0].t.labels),f.hovertemplate=r.hovertemplate,[f]}}},17988:function(D,E,e){D.exports={attributes:e(19316),supplyDefaults:e(10659),colorbar:e(4898),formatLabels:e(82719),calc:e(84622),calcGeoJSON:e(89171).calcGeoJSON,plot:e(89171).plot,style:e(33095),styleOnSelect:e(16296).styleOnSelect,hoverPoints:e(14977),eventData:e(84084),selectPoints:e(20548),moduleType:"trace",name:"scattergeo",basePlotModule:e(44622),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}},89171:function(D,E,e){var _=e(39898),w=e(71828),s=e(90973).getTopojsonFeatures,T=e(18214),y=e(41327),f=e(71739).findExtremes,l=e(50606).BADNUM,t=e(47761).calcMarkerSize,i=e(34098),r=e(33095);D.exports={calcGeoJSON:function(n,o){var a,u,p=n[0].trace,c=o[p.geo],b=c._subplot,d=p._length;if(Array.isArray(p.locations)){var v=p.locationmode,x=v==="geojson-id"?y.extractTraceFeature(n):s(p,b.topojson);for(a=0;a=u,M=2*k,A={},C=x.makeCalcdata(b,"x"),L=g.makeCalcdata(b,"y"),O=y(b,x,"x",C),I=y(b,g,"y",L),R=O.vals,U=I.vals;b._x=R,b._y=U,b.xperiodalignment&&(b._origX=C,b._xStarts=O.starts,b._xEnds=O.ends),b.yperiodalignment&&(b._origY=L,b._yStarts=I.starts,b._yEnds=I.ends);var B=new Array(M),G=new Array(k);for(d=0;d1&&w.extendFlat(te.line,n.linePositions(H,Q,X)),te.errorX||te.errorY){var ae=n.errorBarPositions(H,Q,X,Y,K);te.errorX&&w.extendFlat(te.errorX,ae.x),te.errorY&&w.extendFlat(te.errorY,ae.y)}return te.text&&(w.extendFlat(te.text,{positions:X},n.textPosition(H,Q,te.text,te.marker)),w.extendFlat(te.textSel,{positions:X},n.textPosition(H,Q,te.text,te.markerSel)),w.extendFlat(te.textUnsel,{positions:X},n.textPosition(H,Q,te.text,te.markerUnsel))),te}(c,0,b,B,R,U),V=o(c,m);return i(v,b),h?j.marker&&(N=j.marker.sizeAvg||Math.max(j.marker.size,3)):N=l(b,k),t(c,b,x,g,R,U,N),j.errorX&&p(b,x,j.errorX),j.errorY&&p(b,g,j.errorY),j.fill&&!V.fill2d&&(V.fill2d=!0),j.marker&&!V.scatter2d&&(V.scatter2d=!0),j.line&&!V.line2d&&(V.line2d=!0),!j.errorX&&!j.errorY||V.error2d||(V.error2d=!0),j.text&&!V.glText&&(V.glText=!0),j.marker&&(j.marker.snap=k),V.lineOptions.push(j.line),V.errorXOptions.push(j.errorX),V.errorYOptions.push(j.errorY),V.fillOptions.push(j.fill),V.markerOptions.push(j.marker),V.markerSelectedOptions.push(j.markerSel),V.markerUnselectedOptions.push(j.markerUnsel),V.textOptions.push(j.text),V.textSelectedOptions.push(j.textSel),V.textUnselectedOptions.push(j.textUnsel),V.selectBatch.push([]),V.unselectBatch.push([]),A._scene=V,A.index=V.count,A.x=R,A.y=U,A.positions=B,V.count++,[{x:!1,y:!1,t:A,trace:b}]}},78232:function(D){D.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:20,SYMBOL_STROKE:1,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]}}},19635:function(D,E,e){var _=e(92770),w=e(82019),s=e(25075),T=e(73972),y=e(71828),f=e(91424),l=e(41675),t=e(81697).formatColor,i=e(34098),r=e(39984),n=e(68645),o=e(78232),a=e(37822).DESELECTDIM,u={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},p=e(23469).appendArrayPointValue;function c(C,L){var O,I=C._fullLayout,R=L._length,U=L.textfont,B=L.textposition,G=Array.isArray(B)?B:[B],N=U.color,j=U.size,V=U.family,H={},ee=C._context.plotGlPixelRatio,Q=L.texttemplate;if(Q){H.text=[];var X=I._d3locale,Y=Array.isArray(Q),K=Y?Math.min(Q.length,R):R,te=Y?function(de){return Q[de]}:function(){return Q};for(O=0;Oo.TOO_MANY_POINTS||i.hasMarkers(L)?"rect":"round";if(j&&L.connectgaps){var H=I[0],ee=I[1];for(R=0;R1?N[R]:N[0]:N,Q=Array.isArray(j)?j.length>1?j[R]:j[0]:j,X=u[ee],Y=u[Q],K=V?V/.8+1:0,te=-Y*K-.5*Y;B.offset[R]=[X*K/H,te/H]}}return B}}},47148:function(D,E,e){var _=e(71828),w=e(73972),s=e(68645),T=e(42341),y=e(47581),f=e(34098),l=e(67513),t=e(73927),i=e(49508),r=e(11058),n=e(28908),o=e(82410);D.exports=function(a,u,p,c){function b(M,A){return _.coerce(a,u,T,M,A)}var d=!!a.marker&&s.isOpenSymbol(a.marker.symbol),v=f.isBubble(a),x=l(a,u,c,b);if(x){t(a,u,c,b),b("xhoverformat"),b("yhoverformat");var g=x100},E.isDotSymbol=function(w){return typeof w=="string"?_.DOT_RE.test(w):w>200}},20794:function(D,E,e){var _=e(73972),w=e(71828),s=e(34603);function T(y,f,l,t){var i=y.xa,r=y.ya,n=y.distance,o=y.dxy,a=y.index,u={pointNumber:a,x:f[a],y:l[a]};u.tx=Array.isArray(t.text)?t.text[a]:t.text,u.htx=Array.isArray(t.hovertext)?t.hovertext[a]:t.hovertext,u.data=Array.isArray(t.customdata)?t.customdata[a]:t.customdata,u.tp=Array.isArray(t.textposition)?t.textposition[a]:t.textposition;var p=t.textfont;p&&(u.ts=w.isArrayOrTypedArray(p.size)?p.size[a]:p.size,u.tc=Array.isArray(p.color)?p.color[a]:p.color,u.tf=Array.isArray(p.family)?p.family[a]:p.family);var c=t.marker;c&&(u.ms=w.isArrayOrTypedArray(c.size)?c.size[a]:c.size,u.mo=w.isArrayOrTypedArray(c.opacity)?c.opacity[a]:c.opacity,u.mx=w.isArrayOrTypedArray(c.symbol)?c.symbol[a]:c.symbol,u.ma=w.isArrayOrTypedArray(c.angle)?c.angle[a]:c.angle,u.mc=w.isArrayOrTypedArray(c.color)?c.color[a]:c.color);var b=c&&c.line;b&&(u.mlc=Array.isArray(b.color)?b.color[a]:b.color,u.mlw=w.isArrayOrTypedArray(b.width)?b.width[a]:b.width);var d=c&&c.gradient;d&&d.type!=="none"&&(u.mgt=Array.isArray(d.type)?d.type[a]:d.type,u.mgc=Array.isArray(d.color)?d.color[a]:d.color);var v=i.c2p(u.x,!0),x=r.c2p(u.y,!0),g=u.mrc||1,m=t.hoverlabel;m&&(u.hbg=Array.isArray(m.bgcolor)?m.bgcolor[a]:m.bgcolor,u.hbc=Array.isArray(m.bordercolor)?m.bordercolor[a]:m.bordercolor,u.hts=w.isArrayOrTypedArray(m.font.size)?m.font.size[a]:m.font.size,u.htc=Array.isArray(m.font.color)?m.font.color[a]:m.font.color,u.htf=Array.isArray(m.font.family)?m.font.family[a]:m.font.family,u.hnl=w.isArrayOrTypedArray(m.namelength)?m.namelength[a]:m.namelength);var k=t.hoverinfo;k&&(u.hi=Array.isArray(k)?k[a]:k);var h=t.hovertemplate;h&&(u.ht=Array.isArray(h)?h[a]:h);var M={};M[y.index]=u;var A=t._origX,C=t._origY,L=w.extendFlat({},y,{color:s(t,u),x0:v-g,x1:v+g,xLabelVal:A?A[a]:u.x,y0:x-g,y1:x+g,yLabelVal:C?C[a]:u.y,cd:M,distance:n,spikeDistance:o,hovertemplate:u.ht});return u.htx?L.text=u.htx:u.tx?L.text=u.tx:t.text&&(L.text=t.text),w.fillText(u,t,L),_.getComponentMethod("errorbars","hoverInfo")(u,t,L),L}D.exports={hoverPoints:function(y,f,l,t){var i,r,n,o,a,u,p,c,b,d,v=y.cd,x=v[0].t,g=v[0].trace,m=y.xa,k=y.ya,h=x.x,M=x.y,A=m.c2p(f),C=k.c2p(l),L=y.distance;if(x.tree){var O=m.p2c(A-L),I=m.p2c(A+L),R=k.p2c(C-L),U=k.p2c(C+L);i=t==="x"?x.tree.range(Math.min(O,I),Math.min(k._rl[0],k._rl[1]),Math.max(O,I),Math.max(k._rl[0],k._rl[1])):x.tree.range(Math.min(O,I),Math.min(R,U),Math.max(O,I),Math.max(R,U))}else i=x.ids;var B=L;if(t==="x"){var G=!!g.xperiodalignment,N=!!g.yperiodalignment;for(u=0;u=Math.min(j,V)&&A<=Math.max(j,V)?0:1/0}if(p=Math.min(H,ee)&&C<=Math.max(H,ee)?0:1/0}d=Math.sqrt(p*p+c*c),n=i[u]}}}else for(u=i.length-1;u>-1;u--)o=h[r=i[u]],a=M[r],p=m.c2p(o)-A,c=k.c2p(a)-C,(b=Math.sqrt(p*p+c*c))v.glText.length){var h=m-v.glText.length;for(c=0;cse&&(isNaN(oe[fe])||isNaN(oe[fe+1]));)fe-=2;ae.positions=oe.slice(se,fe+2)}return ae}),v.line2d.update(v.lineOptions)),v.error2d){var A=(v.errorXOptions||[]).concat(v.errorYOptions||[]);v.error2d.update(A)}v.scatter2d&&v.scatter2d.update(v.markerOptions),v.fillOrder=y.repeat(null,m),v.fill2d&&(v.fillOptions=v.fillOptions.map(function(ae,oe){var se=p[oe];if(ae&&se&&se[0]&&se[0].trace){var fe,ye,pe=se[0],de=pe.trace,he=pe.t,xe=v.lineOptions[oe],Re=[];de._ownfill&&Re.push(oe),de._nexttrace&&Re.push(oe+1),Re.length&&(v.fillOrder[oe]=Re);var we,Ae,Me=[],Ce=xe&&xe.positions||he.positions;if(de.fill==="tozeroy"){for(we=0;wewe&&isNaN(Ce[Ae+1]);)Ae-=2;Ce[we+1]!==0&&(Me=[Ce[we],0]),Me=Me.concat(Ce.slice(we,Ae+2)),Ce[Ae+1]!==0&&(Me=Me.concat([Ce[Ae],0]))}else if(de.fill==="tozerox"){for(we=0;wewe&&isNaN(Ce[Ae]);)Ae-=2;Ce[we]!==0&&(Me=[0,Ce[we+1]]),Me=Me.concat(Ce.slice(we,Ae+2)),Ce[Ae]!==0&&(Me=Me.concat([0,Ce[Ae+1]]))}else if(de.fill==="toself"||de.fill==="tonext"){for(Me=[],fe=0,ae.splitNull=!0,ye=0;ye-1;for(c=0;c")}function b(d){return d+"°"}}D.exports={hoverPoints:function(t,i,r){var n=t.cd,o=n[0].trace,a=t.xa,u=t.ya,p=t.subplot,c=[],b=f+o.uid+"-circle",d=o.cluster&&o.cluster.enabled;if(d){var v=p.map.queryRenderedFeatures(null,{layers:[b]});c=v.map(function(I){return I.id})}var x=360*(i>=0?Math.floor((i+180)/360):Math.ceil((i-180)/360)),g=i-x;if(_.getClosest(n,function(I){var R=I.lonlat;if(R[0]===y||d&&c.indexOf(I.i+1)===-1)return 1/0;var U=w.modHalf(R[0],360),B=R[1],G=p.project([U,B]),N=G.x-a.c2p([g,B]),j=G.y-u.c2p([U,r]),V=Math.max(3,I.mrc||0);return Math.max(Math.sqrt(N*N+j*j)-V,1-3/V)},t),t.index!==!1){var m=n[t.index],k=m.lonlat,h=[w.modHalf(k[0],360)+x,k[1]],M=a.c2p(h),A=u.c2p(h),C=m.mrc||1;t.x0=M-C,t.x1=M+C,t.y0=A-C,t.y1=A+C;var L={};L[o.subplot]={_subplot:p};var O=o._module.formatLabels(m,o,L);return t.lonLabel=O.lonLabel,t.latLabel=O.latLabel,t.color=s(o,m),t.extraText=l(o,m,n[0].t.labels),t.hovertemplate=o.hovertemplate,[t]}},getExtraText:l}},20467:function(D,E,e){D.exports={attributes:e(99181),supplyDefaults:e(76645),colorbar:e(4898),formatLabels:e(15636),calc:e(84622),plot:e(86951),hoverPoints:e(28178).hoverPoints,eventData:e(53353),selectPoints:e(86387),styleOnSelect:function(_,w){w&&w[0].trace._glTrace.update(w)},moduleType:"trace",name:"scattermapbox",basePlotModule:e(50101),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}},86951:function(D,E,e){var _=e(71828),w=e(15790),s=e(77734).traceLayerPrefix,T={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function y(l,t,i,r){this.type="scattermapbox",this.subplot=l,this.uid=t,this.clusterEnabled=i,this.isHidden=r,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:s+t+"-fill",line:s+t+"-line",circle:s+t+"-circle",symbol:s+t+"-symbol",cluster:s+t+"-cluster",clusterCount:s+t+"-cluster-count"},this.below=null}var f=y.prototype;f.addSource=function(l,t,i){var r={type:"geojson",data:t.geojson};i&&i.enabled&&_.extendFlat(r,{cluster:!0,clusterMaxZoom:i.maxzoom});var n=this.subplot.map.getSource(this.sourceIds[l]);n?n.setData(t.geojson):this.subplot.map.addSource(this.sourceIds[l],r)},f.setSourceData=function(l,t){this.subplot.map.getSource(this.sourceIds[l]).setData(t.geojson)},f.addLayer=function(l,t,i){var r={type:t.type,id:this.layerIds[l],source:this.sourceIds[l],layout:t.layout,paint:t.paint};t.filter&&(r.filter=t.filter);for(var n,o=this.layerIds[l],a=this.subplot.getMapLayers(),u=0;u=0;h--){var M=k[h];r.removeLayer(p.layerIds[M])}m||r.removeSource(p.sourceIds.circle)}(g):function(m){for(var k=T.nonCluster,h=k.length-1;h>=0;h--){var M=k[h];r.removeLayer(p.layerIds[M]),m||r.removeSource(p.sourceIds[M])}}(g)}function b(g){a?function(m){m||p.addSource("circle",n.circle,t.cluster);for(var k=T.cluster,h=0;h=0;i--){var r=t[i];l.removeLayer(this.layerIds[r]),l.removeSource(this.sourceIds[r])}},D.exports=function(l,t){var i,r,n,o=t[0].trace,a=o.cluster&&o.cluster.enabled,u=o.visible!==!0,p=new y(l,o.uid,a,u),c=w(l.gd,t),b=p.below=l.belowLookup["trace-"+o.uid];if(a)for(p.addSource("circle",c.circle,o.cluster),i=0;i")}}D.exports={hoverPoints:function(s,T,y,f){var l=_(s,T,y,f);if(l&&l[0].index!==!1){var t=l[0];if(t.index===void 0)return l;var i=s.subplot,r=t.cd[t.index],n=t.trace;if(i.isPtInside(r))return t.xLabelVal=void 0,t.yLabelVal=void 0,w(r,n,i,t),t.hovertemplate=n.hovertemplate,l}},makeHoverPointText:w}},91271:function(D,E,e){D.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:e(23580),categories:["polar","symbols","showLegend","scatter-like"],attributes:e(81245),supplyDefaults:e(22184).supplyDefaults,colorbar:e(4898),formatLabels:e(98608),calc:e(26442),plot:e(45162),style:e(16296).style,styleOnSelect:e(16296).styleOnSelect,hoverPoints:e(59150).hoverPoints,selectPoints:e(98002),meta:{}}},45162:function(D,E,e){var _=e(32663),w=e(50606).BADNUM;D.exports=function(s,T,y){for(var f=T.layers.frontplot.select("g.scatterlayer"),l=T.xaxis,t=T.yaxis,i={xaxis:l,yaxis:t,plot:T.framework,layerClipId:T._hasClipOnAxisFalse?T.clipIds.forTraces:null},r=T.radialAxis,n=T.angularAxis,o=0;o=l&&(m.marker.cluster=d.tree),m.marker&&(m.markerSel.positions=m.markerUnsel.positions=m.marker.positions=M),m.line&&M.length>1&&f.extendFlat(m.line,y.linePositions(t,b,M)),m.text&&(f.extendFlat(m.text,{positions:M},y.textPosition(t,b,m.text,m.marker)),f.extendFlat(m.textSel,{positions:M},y.textPosition(t,b,m.text,m.markerSel)),f.extendFlat(m.textUnsel,{positions:M},y.textPosition(t,b,m.text,m.markerUnsel))),m.fill&&!a.fill2d&&(a.fill2d=!0),m.marker&&!a.scatter2d&&(a.scatter2d=!0),m.line&&!a.line2d&&(a.line2d=!0),m.text&&!a.glText&&(a.glText=!0),a.lineOptions.push(m.line),a.fillOptions.push(m.fill),a.markerOptions.push(m.marker),a.markerSelectedOptions.push(m.markerSel),a.markerUnselectedOptions.push(m.markerUnsel),a.textOptions.push(m.text),a.textSelectedOptions.push(m.textSel),a.textUnselectedOptions.push(m.textUnsel),a.selectBatch.push([]),a.unselectBatch.push([]),d.x=A,d.y=C,d.rawx=A,d.rawy=C,d.r=x,d.theta=g,d.positions=M,d._scene=a,d.index=a.count,a.count++}}),s(t,i,r)}},D.exports.reglPrecompiled={}},48300:function(D,E,e){var _=e(5386).fF,w=e(5386).si,s=e(1426).extendFlat,T=e(82196),y=e(9012),f=T.line;D.exports={mode:T.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:T.text,texttemplate:w({editType:"plot"},{keys:["real","imag","text"]}),hovertext:T.hovertext,line:{color:f.color,width:f.width,dash:f.dash,backoff:f.backoff,shape:s({},f.shape,{values:["linear","spline"]}),smoothing:f.smoothing,editType:"calc"},connectgaps:T.connectgaps,marker:T.marker,cliponaxis:s({},T.cliponaxis,{dflt:!1}),textposition:T.textposition,textfont:T.textfont,fill:s({},T.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:T.fillcolor,hoverinfo:s({},y.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:T.hoveron,hovertemplate:_(),selected:T.selected,unselected:T.unselected}},30621:function(D,E,e){var _=e(92770),w=e(50606).BADNUM,s=e(36922),T=e(75225),y=e(66279),f=e(47761).calcMarkerSize;D.exports=function(l,t){for(var i=l._fullLayout,r=t.subplot,n=i[r].realaxis,o=i[r].imaginaryaxis,a=n.makeCalcdata(t,"real"),u=o.makeCalcdata(t,"imag"),p=t._length,c=new Array(p),b=0;b")}}D.exports={hoverPoints:function(s,T,y,f){var l=_(s,T,y,f);if(l&&l[0].index!==!1){var t=l[0];if(t.index===void 0)return l;var i=s.subplot,r=t.cd[t.index],n=t.trace;if(i.isPtInside(r))return t.xLabelVal=void 0,t.yLabelVal=void 0,w(r,n,i,t),t.hovertemplate=n.hovertemplate,l}},makeHoverPointText:w}},85956:function(D,E,e){D.exports={moduleType:"trace",name:"scattersmith",basePlotModule:e(7504),categories:["smith","symbols","showLegend","scatter-like"],attributes:e(48300),supplyDefaults:e(65269),colorbar:e(4898),formatLabels:e(62047),calc:e(30621),plot:e(12480),style:e(16296).style,styleOnSelect:e(16296).styleOnSelect,hoverPoints:e(11350).hoverPoints,selectPoints:e(98002),meta:{}}},12480:function(D,E,e){var _=e(32663),w=e(50606).BADNUM,s=e(23893).smith;D.exports=function(T,y,f){for(var l=y.layers.frontplot.select("g.scatterlayer"),t=y.xaxis,i=y.yaxis,r={xaxis:t,yaxis:i,plot:y.framework,layerClipId:y._hasClipOnAxisFalse?y.clipIds.forTraces:null},n=0;n"),l.hovertemplate=a.hovertemplate,f}function x(g,m){d.push(g._hovertitle+": "+m)}}},52979:function(D,E,e){D.exports={attributes:e(50413),supplyDefaults:e(46008),colorbar:e(4898),formatLabels:e(93645),calc:e(54337),plot:e(7507),style:e(16296).style,styleOnSelect:e(16296).styleOnSelect,hoverPoints:e(47250),selectPoints:e(98002),eventData:e(4524),moduleType:"trace",name:"scatterternary",basePlotModule:e(61639),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}},7507:function(D,E,e){var _=e(32663);D.exports=function(w,s,T){var y=s.plotContainer;y.select(".scatterlayer").selectAll("*").remove();for(var f=s.xaxis,l=s.yaxis,t={xaxis:f,yaxis:l,plot:y,layerClipId:s._hasClipOnAxisFalse?s.clipIdRelative:null},i=s.layers.frontplot.select("g.scatterlayer"),r=0;rr?g.sizeAvg||Math.max(g.size,3):s(o,x),u=0;uM&&L||h-1,B=!0;if(T(g)||p.selectedpoints||U){var G=p._length;if(p.selectedpoints){b.selectBatch=p.selectedpoints;var N=p.selectedpoints,j={};for(r=0;r1&&(u=v[m-1],c=x[m-1],d=g[m-1]),l=0;lu?"-":"+")+"x")).replace("y",(p>c?"-":"+")+"y")).replace("z",(b>d?"-":"+")+"z");var B=function(){m=0,I=[],R=[],U=[]};(!m||m2?a.slice(1,u-1):u===2?[(a[0]+a[1])/2]:a}function n(a){var u=a.length;return u===1?[.5,.5]:[a[1]-a[0],a[u-1]-a[u-2]]}function o(a,u){var p=a.fullSceneLayout,c=a.dataScale,b=u._len,d={};function v(Q,X){var Y=p[X],K=c[l[X]];return s.simpleMap(Q,function(te){return Y.d2l(te)*K})}if(d.vectors=f(v(u._u,"xaxis"),v(u._v,"yaxis"),v(u._w,"zaxis"),b),!b)return{positions:[],cells:[]};var x=v(u._Xs,"xaxis"),g=v(u._Ys,"yaxis"),m=v(u._Zs,"zaxis");if(d.meshgrid=[x,g,m],d.gridFill=u._gridFill,u._slen)d.startingPositions=f(v(u._startsX,"xaxis"),v(u._startsY,"yaxis"),v(u._startsZ,"zaxis"));else{for(var k=g[0],h=r(x),M=r(m),A=new Array(h.length*M.length),C=0,L=0;L=0};k?(p=Math.min(m.length,M.length),c=function(se){return R(m[se])&&U(se)},b=function(se){return String(m[se])}):(p=Math.min(h.length,M.length),c=function(se){return R(h[se])&&U(se)},b=function(se){return String(h[se])}),C&&(p=Math.min(p,A.length));for(var B=0;B1){for(var V=s.randstr(),H=0;H"),name:I||ee("name")?k.name:void 0,color:O("hoverlabel.bgcolor")||h.color,borderColor:O("hoverlabel.bordercolor"),fontFamily:O("hoverlabel.font.family"),fontSize:O("hoverlabel.font.size"),fontColor:O("hoverlabel.font.color"),nameLength:O("hoverlabel.namelength"),textAlign:O("hoverlabel.align"),hovertemplate:I,hovertemplateLabels:j,eventData:m};d&&(Y.x0=B-x.rInscribed*x.rpx1,Y.x1=B+x.rInscribed*x.rpx1,Y.idealAlign=x.pxmid[0]<0?"left":"right"),v&&(Y.x=B,Y.idealAlign=B<0?"left":"right");var K=[];T.loneHover(Y,{container:g._hoverlayer.node(),outerContainer:g._paper.node(),gd:o,inOut_bbox:K}),m[0].bbox=K[0],c._hasHoverLabel=!0}if(v){var te=r.select("path.surface");u.styleOne(te,x,k,{hovered:!0})}c._hasHoverEvent=!0,o.emit("plotly_hover",{points:m||[i(x,k,u.eventDataKeys)],event:_.event})}}),r.on("mouseout",function(x){var g=o._fullLayout,m=o._fullData[c.index],k=_.select(this).datum();if(c._hasHoverEvent&&(x.originalEvent=_.event,o.emit("plotly_unhover",{points:[i(k,m,u.eventDataKeys)],event:_.event}),c._hasHoverEvent=!1),c._hasHoverLabel&&(T.loneUnhover(g._hoverlayer.node()),c._hasHoverLabel=!1),v){var h=r.select("path.surface");u.styleOne(h,k,m,{hovered:!1})}}),r.on("click",function(x){var g=o._fullLayout,m=o._fullData[c.index],k=d&&(l.isHierarchyRoot(x)||l.isLeaf(x)),h=l.getPtId(x),M=l.isEntry(x)?l.findEntryWithChild(b,h):l.findEntryWithLevel(b,h),A=l.getPtId(M),C={points:[i(x,m,u.eventDataKeys)],event:_.event};k||(C.nextLevel=A);var L=f.triggerHandler(o,"plotly_"+c.type+"click",C);if(L!==!1&&g.hovermode&&(o._hoverdata=[i(x,m,u.eventDataKeys)],T.click(o,_.event)),!k&&L!==!1&&!o._dragging&&!o._transitioning){w.call("_storeDirectGUIEdit",m,g._tracePreGUI[m.uid],{level:m.level});var O={data:[{level:A}],traces:[c.index]},I={frame:{redraw:!1,duration:u.transitionTime},transition:{duration:u.transitionTime,easing:u.transitionEasing},mode:"immediate",fromcurrent:!0};T.loneUnhover(g._hoverlayer.node()),w.call("animate",o,O,I)}})}},2791:function(D,E,e){var _=e(71828),w=e(7901),s=e(6964),T=e(53581);function y(f){return f.data.data.pid}E.findEntryWithLevel=function(f,l){var t;return l&&f.eachAfter(function(i){if(E.getPtId(i)===l)return t=i.copy()}),t||f},E.findEntryWithChild=function(f,l){var t;return f.eachAfter(function(i){for(var r=i.children||[],n=0;n0)},E.getMaxDepth=function(f){return f.maxdepth>=0?f.maxdepth:1/0},E.isHeader=function(f,l){return!(E.isLeaf(f)||f.depth===l._maxDepth-1)},E.getParent=function(f,l){return E.findEntryWithLevel(f,y(l))},E.listPath=function(f,l){var t=f.parent;if(!t)return[];var i=l?[t.data[l]]:[t];return E.listPath(t,l).concat(i)},E.getPath=function(f){return E.listPath(f,"label").join("/")+"/"},E.formatValue=T.formatPieValue,E.formatPercent=function(f,l){var t=_.formatPercent(f,0);return t==="0%"&&(t=T.formatPiePercent(f,l)),t}},87619:function(D,E,e){D.exports={moduleType:"trace",name:"sunburst",basePlotModule:e(66888),categories:[],animatable:!0,attributes:e(57564),layoutAttributes:e(2654),supplyDefaults:e(17094),supplyLayoutDefaults:e(57034),calc:e(52147).calc,crossTraceCalc:e(52147).crossTraceCalc,plot:e(24714).plot,style:e(29969).style,colorbar:e(4898),meta:{}}},2654:function(D){D.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},57034:function(D,E,e){var _=e(71828),w=e(2654);D.exports=function(s,T){function y(f,l){return _.coerce(s,T,w,f,l)}y("sunburstcolorway",T.colorway),y("extendsunburstcolors")}},24714:function(D,E,e){var _=e(39898),w=e(674),s=e(81684).sX,T=e(91424),y=e(71828),f=e(63893),l=e(72597),t=l.recordMinTextSize,i=l.clearMinTextSize,r=e(14575),n=e(53581).getRotationAngle,o=r.computeTransform,a=r.transformInsideText,u=e(29969).styleOne,p=e(16688).resizeText,c=e(83523),b=e(7055),d=e(2791);function v(g,m,k,h){var M=g._context.staticPlot,A=g._fullLayout,C=!A.uniformtext.mode&&d.hasTransition(h),L=_.select(k).selectAll("g.slice"),O=m[0],I=O.trace,R=O.hierarchy,U=d.findEntryWithLevel(R,I.level),B=d.getMaxDepth(I),G=A._size,N=I.domain,j=G.w*(N.x[1]-N.x[0]),V=G.h*(N.y[1]-N.y[0]),H=.5*Math.min(j,V),ee=O.cx=G.l+G.w*(N.x[1]+N.x[0])/2,Q=O.cy=G.t+G.h*(1-N.y[0])-V/2;if(!U)return L.remove();var X=null,Y={};C&&L.each(function(Ce){Y[d.getPtId(Ce)]={rpx0:Ce.rpx0,rpx1:Ce.rpx1,x0:Ce.x0,x1:Ce.x1,transform:Ce.transform},!X&&d.isEntry(Ce)&&(X=Ce)});var K=function(Ce){return w.partition().size([2*Math.PI,Ce.height+1])(Ce)}(U).descendants(),te=U.height+1,ae=0,oe=B;O.hasMultipleRoots&&d.isHierarchyRoot(U)&&(K=K.slice(1),te-=1,ae=1,oe+=1),K=K.filter(function(Ce){return Ce.y1<=oe});var se=n(I.rotation);se&&K.forEach(function(Ce){Ce.x0+=se,Ce.x1+=se});var fe=Math.min(te,B),ye=function(Ce){return(Ce-ae)/fe*H},pe=function(Ce,ne){return[Ce*Math.cos(ne),-Ce*Math.sin(ne)]},de=function(Ce){return y.pathAnnulus(Ce.rpx0,Ce.rpx1,Ce.x0,Ce.x1,ee,Q)},he=function(Ce){return ee+x(Ce)[0]*(Ce.transform.rCenter||0)+(Ce.transform.x||0)},xe=function(Ce){return Q+x(Ce)[1]*(Ce.transform.rCenter||0)+(Ce.transform.y||0)};(L=L.data(K,d.getPtId)).enter().append("g").classed("slice",!0),C?L.exit().transition().each(function(){var Ce=_.select(this);Ce.select("path.surface").transition().attrTween("d",function(ne){var ue=function(me){var Te,Ee=d.getPtId(me),Ue=Y[Ee],De=Y[d.getPtId(U)];if(De){var je=(me.x1>De.x1?2*Math.PI:0)+se;Te=me.rpx1Re?2*Math.PI:0)+se;Se={x0:Ze,x1:Ze}}else Se={rpx0:H,rpx1:H},y.extendFlat(Se,Me(be));else Se={rpx0:0,rpx1:0};else Se={x0:se,x1:se};return s(Se,Ye)}(je);return function(be){return de(ge(be))}}):ue.attr("d",de),ne.call(c,U,g,m,{eventDataKeys:b.eventDataKeys,transitionTime:b.CLICK_TRANSITION_TIME,transitionEasing:b.CLICK_TRANSITION_EASING}).call(d.setSliceCursor,g,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:g._transitioning}),ue.call(u,Ce,I);var me=y.ensureSingle(ne,"g","slicetext"),Te=y.ensureSingle(me,"text","",function(je){je.attr("data-notex",1)}),Ee=y.ensureUniformFontSize(g,d.determineTextFont(I,Ce,A.font));Te.text(E.formatSliceLabel(Ce,U,I,m,A)).classed("slicetext",!0).attr("text-anchor","middle").call(T.font,Ee).call(f.convertToTspans,g);var Ue=T.bBox(Te.node());Ce.transform=a(Ue,Ce,O),Ce.transform.targetX=he(Ce),Ce.transform.targetY=xe(Ce);var De=function(je,ge){var be=je.transform;return o(be,ge),be.fontSize=Ee.size,t(I.type,be,A),y.getTextTransform(be)};C?Te.transition().attrTween("transform",function(je){var ge=function(be){var Se,Ne=Y[d.getPtId(be)],Ye=be.transform;if(Ne)Se=Ne;else if(Se={rpx1:be.rpx1,transform:{textPosAngle:Ye.textPosAngle,scale:0,rotate:Ye.rotate,rCenter:Ye.rCenter,x:Ye.x,y:Ye.y}},X)if(be.parent)if(Re){var Ze=be.x1>Re?2*Math.PI:0;Se.x0=Se.x1=Ze}else y.extendFlat(Se,Me(be));else Se.x0=Se.x1=se;else Se.x0=Se.x1=se;var st=s(Se.transform.textPosAngle,be.transform.textPosAngle),ot=s(Se.rpx1,be.rpx1),ft=s(Se.x0,be.x0),yt=s(Se.x1,be.x1),Et=s(Se.transform.scale,Ye.scale),Tt=s(Se.transform.rotate,Ye.rotate),xt=Ye.rCenter===0?3:Se.transform.rCenter===0?1/3:1,Dt=s(Se.transform.rCenter,Ye.rCenter);return function(It){var Ft=ot(It),qt=ft(It),Nt=yt(It),Je=function(Ge){return Dt(Math.pow(Ge,xt))}(It),Ke={pxmid:pe(Ft,(qt+Nt)/2),rpx1:Ft,transform:{textPosAngle:st(It),rCenter:Je,x:Ye.x,y:Ye.y}};return t(I.type,Ye,A),{transform:{targetX:he(Ke),targetY:xe(Ke),scale:Et(It),rotate:Tt(It),rCenter:Je}}}}(je);return function(be){return De(ge(be),Ue)}}):Te.attr("transform",De(Ce,Ue))})}function x(g){return m=g.rpx1,k=g.transform.textPosAngle,[m*Math.sin(k),-m*Math.cos(k)];var m,k}E.plot=function(g,m,k,h){var M,A,C=g._fullLayout,L=C._sunburstlayer,O=!k,I=!C.uniformtext.mode&&d.hasTransition(k);i("sunburst",C),(M=L.selectAll("g.trace.sunburst").data(m,function(R){return R[0].trace.uid})).enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),M.order(),I?(h&&(A=h()),_.transition().duration(k.duration).ease(k.easing).each("end",function(){A&&A()}).each("interrupt",function(){A&&A()}).each(function(){L.selectAll("g.trace").each(function(R){v(g,R,this,k)})})):(M.each(function(R){v(g,R,this,k)}),C.uniformtext.mode&&p(g,C._sunburstlayer.selectAll(".trace"),"sunburst")),O&&M.exit().remove()},E.formatSliceLabel=function(g,m,k,h,M){var A=k.texttemplate,C=k.textinfo;if(!(A||C&&C!=="none"))return"";var L=M.separators,O=h[0],I=g.data.data,R=O.hierarchy,U=d.isHierarchyRoot(g),B=d.getParent(R,g),G=d.getValue(g);if(!A){var N,j=C.split("+"),V=function(oe){return j.indexOf(oe)!==-1},H=[];if(V("label")&&I.label&&H.push(I.label),I.hasOwnProperty("v")&&V("value")&&H.push(d.formatValue(I.v,L)),!U){V("current path")&&H.push(d.getPath(g.data));var ee=0;V("percent parent")&&ee++,V("percent entry")&&ee++,V("percent root")&&ee++;var Q=ee>1;if(ee){var X,Y=function(oe){N=d.formatPercent(X,L),Q&&(N+=" of "+oe),H.push(N)};V("percent parent")&&!U&&(X=G/d.getValue(B),Y("parent")),V("percent entry")&&(X=G/d.getValue(m),Y("entry")),V("percent root")&&(X=G/d.getValue(R),Y("root"))}}return V("text")&&(N=y.castOption(k,I.i,"text"),y.isValidTextValue(N)&&H.push(N)),H.join("
")}var K=y.castOption(k,I.i,"texttemplate");if(!K)return"";var te={};I.label&&(te.label=I.label),I.hasOwnProperty("v")&&(te.value=I.v,te.valueLabel=d.formatValue(I.v,L)),te.currentPath=d.getPath(g.data),U||(te.percentParent=G/d.getValue(B),te.percentParentLabel=d.formatPercent(te.percentParent,L),te.parent=d.getPtLabel(B)),te.percentEntry=G/d.getValue(m),te.percentEntryLabel=d.formatPercent(te.percentEntry,L),te.entry=d.getPtLabel(m),te.percentRoot=G/d.getValue(R),te.percentRootLabel=d.formatPercent(te.percentRoot,L),te.root=d.getPtLabel(R),I.hasOwnProperty("color")&&(te.color=I.color);var ae=y.castOption(k,I.i,"text");return(y.isValidTextValue(ae)||ae==="")&&(te.text=ae),te.customdata=y.castOption(k,I.i,"customdata"),y.texttemplateString(K,te,M._d3locale,te,k._meta||{})}},29969:function(D,E,e){var _=e(39898),w=e(7901),s=e(71828),T=e(72597).resizeText;function y(f,l,t){var i=l.data.data,r=!l.children,n=i.i,o=s.castOption(t,n,"marker.line.color")||w.defaultLine,a=s.castOption(t,n,"marker.line.width")||0;f.style("stroke-width",a).call(w.fill,i.color).call(w.stroke,o).style("opacity",r?t.leaf.opacity:null)}D.exports={style:function(f){var l=f._fullLayout._sunburstlayer.selectAll(".trace");T(f,l,"sunburst"),l.each(function(t){var i=_.select(this),r=t[0].trace;i.style("opacity",r.opacity),i.selectAll("path.surface").each(function(n){_.select(this).call(y,n,r)})})},styleOne:y}},54532:function(D,E,e){var _=e(7901),w=e(50693),s=e(12663).axisHoverFormat,T=e(5386).fF,y=e(9012),f=e(1426).extendFlat,l=e(30962).overrideAll;function t(r){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:{valType:"boolean",dflt:!1},y:{valType:"boolean",dflt:!1},z:{valType:"boolean",dflt:!1}},color:{valType:"color",dflt:_.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:_.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var i=D.exports=l(f({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:T(),xhoverformat:s("x"),yhoverformat:s("y"),zhoverformat:s("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},w("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:t(),y:t(),z:t()},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"},_deprecated:{zauto:f({},w.zauto,{}),zmin:f({},w.zmin,{}),zmax:f({},w.zmax,{})},hoverinfo:f({},y.hoverinfo),showlegend:f({},y.showlegend,{dflt:!1})}),"calc","nested");i.x.editType=i.y.editType=i.z.editType="calc+clearAxisTypes",i.transforms=void 0},18396:function(D,E,e){var _=e(78803);D.exports=function(w,s){s.surfacecolor?_(w,s,{vals:s.surfacecolor,containerStr:"",cLetter:"c"}):_(w,s,{vals:s.z,containerStr:"",cLetter:"c"})}},43768:function(D,E,e){var _=e(9330).gl_surface3d,w=e(9330).ndarray,s=e(9330).ndarray_linear_interpolate.d2,T=e(824),y=e(43907),f=e(71828).isArrayOrTypedArray,l=e(81697).parseColorScale,t=e(78614),i=e(21081).extractOpts;function r(k,h,M){this.scene=k,this.uid=M,this.surface=h,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var n=r.prototype;n.getXat=function(k,h,M,A){var C=f(this.data.x)?f(this.data.x[0])?this.data.x[h][k]:this.data.x[k]:k;return M===void 0?C:A.d2l(C,0,M)},n.getYat=function(k,h,M,A){var C=f(this.data.y)?f(this.data.y[0])?this.data.y[h][k]:this.data.y[h]:h;return M===void 0?C:A.d2l(C,0,M)},n.getZat=function(k,h,M,A){var C=this.data.z[h][k];return C===null&&this.data.connectgaps&&this.data._interpolatedZ&&(C=this.data._interpolatedZ[h][k]),M===void 0?C:A.d2l(C,0,M)},n.handlePick=function(k){if(k.object===this.surface){var h=(k.data.index[0]-1)/this.dataScaleX-1,M=(k.data.index[1]-1)/this.dataScaleY-1,A=Math.max(Math.min(Math.round(h),this.data.z[0].length-1),0),C=Math.max(Math.min(Math.round(M),this.data._ylength-1),0);k.index=[A,C],k.traceCoordinate=[this.getXat(A,C),this.getYat(A,C),this.getZat(A,C)],k.dataCoordinate=[this.getXat(A,C,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(A,C,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(A,C,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var L=0;L<3;L++)k.dataCoordinate[L]!=null&&(k.dataCoordinate[L]*=this.scene.dataScale[L]);var O=this.data.hovertext||this.data.text;return Array.isArray(O)&&O[C]&&O[C][A]!==void 0?k.textLabel=O[C][A]:k.textLabel=O||"",k.data.dataCoordinate=k.dataCoordinate.slice(),this.surface.highlight(k.data),this.scene.glplot.spikes.position=k.dataCoordinate,!0}};var o=[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 a(k,h){if(k0){M=o[A];break}return M}function c(k,h){if(!(k<1||h<1)){for(var M=u(k),A=u(h),C=1,L=0;Lv;)M--,M/=p(M),++M1?A:1},n.refineCoords=function(k){for(var h=this.dataScaleX,M=this.dataScaleY,A=k[0].shape[0],C=k[0].shape[1],L=0|Math.floor(k[0].shape[0]*h+1),O=0|Math.floor(k[0].shape[1]*M+1),I=1+A+1,R=1+C+1,U=w(new Float32Array(I*R),[I,R]),B=[1/h,0,0,0,1/M,0,0,0,1],G=0;G0&&this.contourStart[k]!==null&&this.contourEnd[k]!==null&&this.contourEnd[k]>this.contourStart[k]))for(C[k]=!0,h=this.contourStart[k];hC&&(this.minValues[h]=C),this.maxValues[h]",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"}}},51018:function(D,E,e){var _=e(49850),w=e(1426).extendFlat,s=e(92770);function T(n){if(Array.isArray(n)){for(var o=0,a=0;a=o||x===n.length-1)&&(u[p]=b,b.key=v++,b.firstRowIndex=d,b.lastRowIndex=x,b={firstRowIndex:null,lastRowIndex:null,rows:[]},p+=c,d=x+1,c=0);return u}D.exports=function(n,o){var a=f(o.cells.values),u=function(U){return U.slice(o.header.values.length,U.length)},p=f(o.header.values);p.length&&!p[0].length&&(p[0]=[""],p=f(p));var c=p.concat(u(a).map(function(){return l((p[0]||[""]).length)})),b=o.domain,d=Math.floor(n._fullLayout._size.w*(b.x[1]-b.x[0])),v=Math.floor(n._fullLayout._size.h*(b.y[1]-b.y[0])),x=o.header.values.length?c[0].map(function(){return o.header.height}):[_.emptyHeaderHeight],g=a.length?a[0].map(function(){return o.cells.height}):[],m=x.reduce(y,0),k=r(g,v-m+_.uplift),h=i(r(x,m),[]),M=i(k,h),A={},C=o._fullInput.columnorder.concat(u(a.map(function(U,B){return B}))),L=c.map(function(U,B){var G=Array.isArray(o.columnwidth)?o.columnwidth[Math.min(B,o.columnwidth.length-1)]:o.columnwidth;return s(G)?Number(G):1}),O=L.reduce(y,0);L=L.map(function(U){return U/O*d});var I=Math.max(T(o.header.line.width),T(o.cells.line.width)),R={key:o.uid+n._context.staticPlot,translateX:b.x[0]*n._fullLayout._size.w,translateY:n._fullLayout._size.h*(1-b.y[1]),size:n._fullLayout._size,width:d,maxLineWidth:I,height:v,columnOrder:C,groupHeight:v,rowBlocks:M,headerRowBlocks:h,scrollY:0,cells:w({},o.cells,{values:a}),headerCells:w({},o.header,{values:c}),gdColumns:c.map(function(U){return U[0]}),gdColumnsOriginalOrder:c.map(function(U){return U[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:c.map(function(U,B){var G=A[U];return A[U]=(G||0)+1,{key:U+"__"+A[U],label:U,specIndex:B,xIndex:C[B],xScale:t,x:void 0,calcdata:void 0,columnWidth:L[B]}})};return R.columns.forEach(function(U){U.calcdata=R,U.x=t(U)}),R}},56269:function(D,E,e){var _=e(1426).extendFlat;E.splitToPanels=function(w){var s=[0,0],T=_({},w,{key:"header",type:"header",page:0,prevPages:s,currentRepaint:[null,null],dragHandle:!0,values:w.calcdata.headerCells.values[w.specIndex],rowBlocks:w.calcdata.headerRowBlocks,calcdata:_({},w.calcdata,{cells:w.calcdata.headerCells})});return[_({},w,{key:"cells1",type:"cells",page:0,prevPages:s,currentRepaint:[null,null],dragHandle:!1,values:w.calcdata.cells.values[w.specIndex],rowBlocks:w.calcdata.rowBlocks}),_({},w,{key:"cells2",type:"cells",page:1,prevPages:s,currentRepaint:[null,null],dragHandle:!1,values:w.calcdata.cells.values[w.specIndex],rowBlocks:w.calcdata.rowBlocks}),T]},E.splitToCells=function(w){var s=function(T){var y=T.rowBlocks[T.page],f=y?y.rows[0].rowIndex:0;return[f,y?f+y.rows.length:0]}(w);return(w.values||[]).slice(s[0],s[1]).map(function(T,y){return{keyWithinBlock:y+(typeof T=="string"&&T.match(/[<$&> ]/)?"_keybuster_"+Math.random():""),key:s[0]+y,column:w,calcdata:w.calcdata,page:w.page,rowBlocks:w.rowBlocks,value:T}})}},39754:function(D,E,e){var _=e(71828),w=e(44464),s=e(27670).c;D.exports=function(T,y,f,l){function t(i,r){return _.coerce(T,y,w,i,r)}s(y,l,t),t("columnwidth"),t("header.values"),t("header.format"),t("header.align"),t("header.prefix"),t("header.suffix"),t("header.height"),t("header.line.width"),t("header.line.color"),t("header.fill.color"),_.coerceFont(t,"header.font",_.extendFlat({},l.font)),function(i,r){for(var n=i.columnorder||[],o=i.header.values.length,a=n.slice(0,o),u=a.slice().sort(function(b,d){return b-d}),p=a.map(function(b){return u.indexOf(b)}),c=p.length;c/i),se=!ae||oe;X.mayHaveMarkup=ae&&te.match(/[<&>]/);var fe,ye=typeof(fe=te)=="string"&&fe.match(_.latexCheck);X.latex=ye;var pe,de,he=ye?"":g(X.calcdata.cells.prefix,Y,K)||"",xe=ye?"":g(X.calcdata.cells.suffix,Y,K)||"",Re=ye?null:g(X.calcdata.cells.format,Y,K)||null,we=he+(Re?s(Re)(X.value):X.value)+xe;if(X.wrappingNeeded=!X.wrapped&&!se&&!ye&&(pe=x(we)),X.cellHeightMayIncrease=oe||ye||X.mayHaveMarkup||(pe===void 0?x(we):pe),X.needsConvertToTspans=X.mayHaveMarkup||X.wrappingNeeded||X.latex,X.wrappingNeeded){var Ae=(_.wrapSplitCharacter===" "?we.replace(/de&&pe.push(he),de+=we}return pe}(X,ae,te);oe.length===1&&(oe[0]===X.length-1?oe.unshift(oe[0]-1):oe.push(oe[0]+1)),oe[0]%2&&oe.reverse(),H.each(function(se,fe){se.page=oe[fe],se.scrollY=ae}),H.attr("transform",function(se){var fe=B(se.rowBlocks,se.page)-se.scrollY;return t(0,fe)}),V&&(L(V,ee,H,oe,Q.prevPages,Q,0),L(V,ee,H,oe,Q.prevPages,Q,1),b(ee,V))}}function C(V,H,ee,Q){return function(X){var Y=X.calcdata?X.calcdata:X,K=H.filter(function(se){return Y.key===se.key}),te=ee||Y.scrollbarState.dragMultiplier,ae=Y.scrollY;Y.scrollY=Q===void 0?Y.scrollY+te*w.event.dy:Q;var oe=K.selectAll("."+_.cn.yColumn).selectAll("."+_.cn.columnBlock).filter(k);return A(V,oe,K),Y.scrollY===ae}}function L(V,H,ee,Q,X,Y,K){Q[K]!==X[K]&&(clearTimeout(Y.currentRepaint[K]),Y.currentRepaint[K]=setTimeout(function(){var te=ee.filter(function(ae,oe){return oe===K&&Q[oe]!==X[oe]});d(V,H,te,ee),X[K]=Q[K]}))}function O(V,H,ee,Q){return function(){var X=w.select(H.parentNode);X.each(function(Y){var K=Y.fragments;X.selectAll("tspan.line").each(function(de,he){K[he].width=this.getComputedTextLength()});var te,ae,oe=K[K.length-1].width,se=K.slice(0,-1),fe=[],ye=0,pe=Y.column.columnWidth-2*_.cellPad;for(Y.value="";se.length;)ye+(ae=(te=se.shift()).width+oe)>pe&&(Y.value+=fe.join(_.wrapSpacer)+_.lineBreaker,fe=[],ye=0),fe.push(te.text),ye+=ae;ye&&(Y.value+=fe.join(_.wrapSpacer)),Y.wrapped=!0}),X.selectAll("tspan.line").remove(),v(X.select("."+_.cn.cellText),ee,V,Q),w.select(H.parentNode.parentNode).call(U)}}function I(V,H,ee,Q,X){return function(){if(!X.settledY){var Y=w.select(H.parentNode),K=j(X),te=X.key-K.firstRowIndex,ae=K.rows[te].rowHeight,oe=X.cellHeightMayIncrease?H.parentNode.getBoundingClientRect().height+2*_.cellPad:ae,se=Math.max(oe,ae);se-K.rows[te].rowHeight&&(K.rows[te].rowHeight=se,V.selectAll("."+_.cn.columnCell).call(U),A(null,V.filter(k),0),b(ee,Q,!0)),Y.attr("transform",function(){var fe=this,ye=fe.parentNode.getBoundingClientRect(),pe=w.select(fe.parentNode).select("."+_.cn.cellRect).node().getBoundingClientRect(),de=fe.transform.baseVal.consolidate(),he=pe.top-ye.top+(de?de.matrix.f:_.cellPad);return t(R(X,w.select(fe.parentNode).select("."+_.cn.cellTextHolder).node().getBoundingClientRect().width),he)}),X.settledY=!0}}}function R(V,H){switch(V.align){case"left":default:return _.cellPad;case"right":return V.column.columnWidth-(H||0)-_.cellPad;case"center":return(V.column.columnWidth-(H||0))/2}}function U(V){V.attr("transform",function(H){var ee=H.rowBlocks[0].auxiliaryBlocks.reduce(function(X,Y){return X+G(Y,1/0)},0),Q=G(j(H),H.key);return t(0,Q+ee)}).selectAll("."+_.cn.cellRect).attr("height",function(H){return(ee=j(H),Q=H.key,ee.rows[Q-ee.firstRowIndex]).rowHeight;var ee,Q})}function B(V,H){for(var ee=0,Q=H-1;Q>=0;Q--)ee+=N(V[Q]);return ee}function G(V,H){for(var ee=0,Q=0;Q","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:t({},y.textfont,{}),editType:"calc"},text:y.text,textinfo:f.textinfo,texttemplate:w({editType:"plot"},{keys:l.eventDataKeys.concat(["label","value"])}),hovertext:y.hovertext,hoverinfo:f.hoverinfo,hovertemplate:_({},{keys:l.eventDataKeys}),textfont:y.textfont,insidetextfont:y.insidetextfont,outsidetextfont:t({},y.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:y.sort,root:f.root,domain:T({name:"treemap",trace:!0,editType:"calc"})}},78018:function(D,E,e){var _=e(74875);E.name="treemap",E.plot=function(w,s,T,y){_.plotBasePlot(E.name,w,s,T,y)},E.clean=function(w,s,T,y){_.cleanBasePlot(E.name,w,s,T,y)}},65039:function(D,E,e){var _=e(52147);E.y=function(w,s){return _.calc(w,s)},E.T=function(w){return _._runCrossTraceCalc("treemap",w)}},43473:function(D){D.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}},91174:function(D,E,e){var _=e(71828),w=e(45802),s=e(7901),T=e(27670).c,y=e(90769).handleText,f=e(97313).TEXTPAD,l=e(21081),t=l.hasColorscale,i=l.handleDefaults;D.exports=function(r,n,o,a){function u(k,h){return _.coerce(r,n,w,k,h)}var p=u("labels"),c=u("parents");if(p&&p.length&&c&&c.length){var b=u("values");b&&b.length?u("branchvalues"):u("count"),u("level"),u("maxdepth"),u("tiling.packing")==="squarify"&&u("tiling.squarifyratio"),u("tiling.flip"),u("tiling.pad");var d=u("text");u("texttemplate"),n.texttemplate||u("textinfo",Array.isArray(d)?"text+label":"label"),u("hovertext"),u("hovertemplate");var v=u("pathbar.visible");y(r,n,a,u,"auto",{hasPathbar:v,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),u("textposition");var x=n.textposition.indexOf("bottom")!==-1;u("marker.line.width")&&u("marker.line.color",a.paper_bgcolor);var g=u("marker.colors");(n._hasColorscale=t(r,"marker","colors")||(r.marker||{}).coloraxis)?i(r,n,a,u,{prefix:"marker.",cLetter:"c"}):u("marker.depthfade",!(g||[]).length);var m=2*n.textfont.size;u("marker.pad.t",x?m/4:m),u("marker.pad.l",m/4),u("marker.pad.r",m/4),u("marker.pad.b",x?m:m/4),u("marker.cornerradius"),n._hovered={marker:{line:{width:2,color:s.contrast(a.paper_bgcolor)}}},v&&(u("pathbar.thickness",n.pathbar.textfont.size+2*f),u("pathbar.side"),u("pathbar.edgeshape")),u("sort"),u("root.color"),T(n,a,u),n._length=null}else n.visible=!1}},80694:function(D,E,e){var _=e(39898),w=e(2791),s=e(72597).clearMinTextSize,T=e(16688).resizeText,y=e(46650);D.exports=function(f,l,t,i,r){var n,o,a=r.type,u=r.drawDescendants,p=f._fullLayout,c=p["_"+a+"layer"],b=!t;s(a,p),(n=c.selectAll("g.trace."+a).data(l,function(d){return d[0].trace.uid})).enter().append("g").classed("trace",!0).classed(a,!0),n.order(),!p.uniformtext.mode&&w.hasTransition(t)?(i&&(o=i()),_.transition().duration(t.duration).ease(t.easing).each("end",function(){o&&o()}).each("interrupt",function(){o&&o()}).each(function(){c.selectAll("g.trace").each(function(d){y(f,d,this,t,u)})})):(n.each(function(d){y(f,d,this,t,u)}),p.uniformtext.mode&&T(f,c.selectAll(".trace"),a)),b&&n.exit().remove()}},66209:function(D,E,e){var _=e(39898),w=e(71828),s=e(91424),T=e(63893),y=e(37210),f=e(96362).styleOne,l=e(43473),t=e(2791),i=e(83523),r=!0;D.exports=function(n,o,a,u,p){var c=p.barDifY,b=p.width,d=p.height,v=p.viewX,x=p.viewY,g=p.pathSlice,m=p.toMoveInsideSlice,k=p.strTransform,h=p.hasTransition,M=p.handleSlicesExit,A=p.makeUpdateSliceInterpolator,C=p.makeUpdateTextInterpolator,L={},O=n._context.staticPlot,I=n._fullLayout,R=o[0],U=R.trace,B=R.hierarchy,G=b/U._entryDepth,N=t.listPath(a.data,"id"),j=y(B.copy(),[b,d],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();(j=j.filter(function(H){var ee=N.indexOf(H.data.id);return ee!==-1&&(H.x0=G*ee,H.x1=G*(ee+1),H.y0=c,H.y1=c+d,H.onPathbar=!0,!0)})).reverse(),(u=u.data(j,t.getPtId)).enter().append("g").classed("pathbar",!0),M(u,r,L,[b,d],g),u.order();var V=u;h&&(V=V.transition().each("end",function(){var H=_.select(this);t.setSliceCursor(H,n,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),V.each(function(H){H._x0=v(H.x0),H._x1=v(H.x1),H._y0=x(H.y0),H._y1=x(H.y1),H._hoverX=v(H.x1-Math.min(b,d)/2),H._hoverY=x(H.y1-d/2);var ee=_.select(this),Q=w.ensureSingle(ee,"path","surface",function(te){te.style("pointer-events",O?"none":"all")});h?Q.transition().attrTween("d",function(te){var ae=A(te,r,L,[b,d]);return function(oe){return g(ae(oe))}}):Q.attr("d",g),ee.call(i,a,n,o,{styleOne:f,eventDataKeys:l.eventDataKeys,transitionTime:l.CLICK_TRANSITION_TIME,transitionEasing:l.CLICK_TRANSITION_EASING}).call(t.setSliceCursor,n,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:n._transitioning}),Q.call(f,H,U,{hovered:!1}),H._text=(t.getPtLabel(H)||"").split("
").join(" ")||"";var X=w.ensureSingle(ee,"g","slicetext"),Y=w.ensureSingle(X,"text","",function(te){te.attr("data-notex",1)}),K=w.ensureUniformFontSize(n,t.determineTextFont(U,H,I.font,{onPathbar:!0}));Y.text(H._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(s.font,K).call(T.convertToTspans,n),H.textBB=s.bBox(Y.node()),H.transform=m(H,{fontSize:K.size,onPathbar:!0}),H.transform.fontSize=K.size,h?Y.transition().attrTween("transform",function(te){var ae=C(te,r,L,[b,d]);return function(oe){return k(ae(oe))}}):Y.attr("transform",k(H))})}},52583:function(D,E,e){var _=e(39898),w=e(71828),s=e(91424),T=e(63893),y=e(37210),f=e(96362).styleOne,l=e(43473),t=e(2791),i=e(83523),r=e(24714).formatSliceLabel,n=!1;D.exports=function(o,a,u,p,c){var b=c.width,d=c.height,v=c.viewX,x=c.viewY,g=c.pathSlice,m=c.toMoveInsideSlice,k=c.strTransform,h=c.hasTransition,M=c.handleSlicesExit,A=c.makeUpdateSliceInterpolator,C=c.makeUpdateTextInterpolator,L=c.prevEntry,O=o._context.staticPlot,I=o._fullLayout,R=a[0].trace,U=R.textposition.indexOf("left")!==-1,B=R.textposition.indexOf("right")!==-1,G=R.textposition.indexOf("bottom")!==-1,N=!G&&!R.marker.pad.t||G&&!R.marker.pad.b,j=y(u,[b,d],{packing:R.tiling.packing,squarifyratio:R.tiling.squarifyratio,flipX:R.tiling.flip.indexOf("x")>-1,flipY:R.tiling.flip.indexOf("y")>-1,pad:{inner:R.tiling.pad,top:R.marker.pad.t,left:R.marker.pad.l,right:R.marker.pad.r,bottom:R.marker.pad.b}}).descendants(),V=1/0,H=-1/0;j.forEach(function(K){var te=K.depth;te>=R._maxDepth?(K.x0=K.x1=(K.x0+K.x1)/2,K.y0=K.y1=(K.y0+K.y1)/2):(V=Math.min(V,te),H=Math.max(H,te))}),p=p.data(j,t.getPtId),R._maxVisibleLayers=isFinite(H)?H-V+1:0,p.enter().append("g").classed("slice",!0),M(p,n,{},[b,d],g),p.order();var ee=null;if(h&&L){var Q=t.getPtId(L);p.each(function(K){ee===null&&t.getPtId(K)===Q&&(ee={x0:K.x0,x1:K.x1,y0:K.y0,y1:K.y1})})}var X=function(){return ee||{x0:0,x1:b,y0:0,y1:d}},Y=p;return h&&(Y=Y.transition().each("end",function(){var K=_.select(this);t.setSliceCursor(K,o,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),Y.each(function(K){var te=t.isHeader(K,R);K._x0=v(K.x0),K._x1=v(K.x1),K._y0=x(K.y0),K._y1=x(K.y1),K._hoverX=v(K.x1-R.marker.pad.r),K._hoverY=x(G?K.y1-R.marker.pad.b/2:K.y0+R.marker.pad.t/2);var ae=_.select(this),oe=w.ensureSingle(ae,"path","surface",function(pe){pe.style("pointer-events",O?"none":"all")});h?oe.transition().attrTween("d",function(pe){var de=A(pe,n,X(),[b,d]);return function(he){return g(de(he))}}):oe.attr("d",g),ae.call(i,u,o,a,{styleOne:f,eventDataKeys:l.eventDataKeys,transitionTime:l.CLICK_TRANSITION_TIME,transitionEasing:l.CLICK_TRANSITION_EASING}).call(t.setSliceCursor,o,{isTransitioning:o._transitioning}),oe.call(f,K,R,{hovered:!1}),K.x0===K.x1||K.y0===K.y1?K._text="":K._text=te?N?"":t.getPtLabel(K)||"":r(K,u,R,a,I)||"";var se=w.ensureSingle(ae,"g","slicetext"),fe=w.ensureSingle(se,"text","",function(pe){pe.attr("data-notex",1)}),ye=w.ensureUniformFontSize(o,t.determineTextFont(R,K,I.font));fe.text(K._text||" ").classed("slicetext",!0).attr("text-anchor",B?"end":U||te?"start":"middle").call(s.font,ye).call(T.convertToTspans,o),K.textBB=s.bBox(fe.node()),K.transform=m(K,{fontSize:ye.size,isHeader:te}),K.transform.fontSize=ye.size,h?fe.transition().attrTween("transform",function(pe){var de=C(pe,n,X(),[b,d]);return function(he){return k(de(he))}}):fe.attr("transform",k(K))}),ee}},14102:function(D){D.exports=function E(e,_,w){var s;w.swapXY&&(s=e.x0,e.x0=e.y0,e.y0=s,s=e.x1,e.x1=e.y1,e.y1=s),w.flipX&&(s=e.x0,e.x0=_[0]-e.x1,e.x1=_[0]-s),w.flipY&&(s=e.y0,e.y0=_[1]-e.y1,e.y1=_[1]-s);var T=e.children;if(T)for(var y=0;y-1?R+G:-(B+G):0,j={x0:U,x1:U,y0:N,y1:N+B},V=function(ge,be,Se){var Ne=d.tiling.pad,Ye=function(ft){return ft-Ne<=be.x0},Ze=function(ft){return ft+Ne>=be.x1},st=function(ft){return ft-Ne<=be.y0},ot=function(ft){return ft+Ne>=be.y1};return ge.x0===be.x0&&ge.x1===be.x1&&ge.y0===be.y0&&ge.y1===be.y1?{x0:ge.x0,x1:ge.x1,y0:ge.y0,y1:ge.y1}:{x0:Ye(ge.x0-Ne)?0:Ze(ge.x0-Ne)?Se[0]:ge.x0,x1:Ye(ge.x1+Ne)?0:Ze(ge.x1+Ne)?Se[0]:ge.x1,y0:st(ge.y0-Ne)?0:ot(ge.y0-Ne)?Se[1]:ge.y0,y1:st(ge.y1+Ne)?0:ot(ge.y1+Ne)?Se[1]:ge.y1}},H=null,ee={},Q={},X=null,Y=function(ge,be){return be?ee[r(ge)]:Q[r(ge)]};b.hasMultipleRoots&&M&&C++,d._maxDepth=C,d._backgroundColor=c.paper_bgcolor,d._entryDepth=g.data.depth,d._atRootLevel=M;var K=-I/2+L.l+L.w*(O.x[1]+O.x[0])/2,te=-R/2+L.t+L.h*(1-(O.y[1]+O.y[0])/2),ae=function(ge){return K+ge},oe=function(ge){return te+ge},se=oe(0),fe=ae(0),ye=function(ge){return fe+ge},pe=function(ge){return se+ge};function de(ge,be){return ge+","+be}var he=ye(0),xe=function(ge){ge.x=Math.max(he,ge.x)},Re=d.pathbar.edgeshape,we=d[v?"tiling":"marker"].pad,Ae=function(ge){return d.textposition.indexOf(ge)!==-1},Me=Ae("top"),Ce=Ae("left"),ne=Ae("right"),ue=Ae("bottom"),me=function(ge,be){var Se=ge.x0,Ne=ge.x1,Ye=ge.y0,Ze=ge.y1,st=ge.textBB,ot=Me||be.isHeader&&!ue?"start":ue?"end":"middle",ft=Ae("right"),yt=Ae("left")||be.onPathbar?-1:ft?1:0;if(be.isHeader){if((Se+=(v?we:we.l)-y)>=(Ne-=(v?we:we.r)-y)){var Et=(Se+Ne)/2;Se=Et,Ne=Et}var Tt;ue?Ye<(Tt=Ze-(v?we:we.b))&&Tt"?(ft.x-=Ze,yt.x-=Ze,Et.x-=Ze,Tt.x-=Ze):Re==="/"?(Et.x-=Ze,Tt.x-=Ze,st.x-=Ze/2,ot.x-=Ze/2):Re==="\\"?(ft.x-=Ze,yt.x-=Ze,st.x-=Ze/2,ot.x-=Ze/2):Re==="<"&&(st.x-=Ze,ot.x-=Ze),xe(ft),xe(Tt),xe(st),xe(yt),xe(Et),xe(ot),"M"+de(ft.x,ft.y)+"L"+de(yt.x,yt.y)+"L"+de(ot.x,ot.y)+"L"+de(Et.x,Et.y)+"L"+de(Tt.x,Tt.y)+"L"+de(st.x,st.y)+"Z"},toMoveInsideSlice:me,makeUpdateSliceInterpolator:Ee,makeUpdateTextInterpolator:Ue,handleSlicesExit:De,hasTransition:A,strTransform:je}):k.remove()}},96362:function(D,E,e){var _=e(39898),w=e(7901),s=e(71828),T=e(2791),y=e(72597).resizeText;function f(l,t,i,r){var n,o,a=(r||{}).hovered,u=t.data.data,p=u.i,c=u.color,b=T.isHierarchyRoot(t),d=1;if(a)n=i._hovered.marker.line.color,o=i._hovered.marker.line.width;else if(b&&c===i.root.color)d=100,n="rgba(0,0,0,0)",o=0;else if(n=s.castOption(i,p,"marker.line.color")||w.defaultLine,o=s.castOption(i,p,"marker.line.width")||0,!i._hasColorscale&&!t.onPathbar){var v=i.marker.depthfade;if(v){var x,g=w.combine(w.addOpacity(i._backgroundColor,.75),c);if(v===!0){var m=T.getMaxDepth(i);x=isFinite(m)?T.isLeaf(t)?0:i._maxVisibleLayers-(t.data.depth-i._entryDepth):t.data.height+1}else x=t.data.depth-i._entryDepth,i._atRootLevel||x++;if(x>0)for(var k=0;k0){var g,m,k,h,M,A=f.xa,C=f.ya;p.orientation==="h"?(M=l,g="y",k=C,m="x",h=A):(M=t,g="x",k=A,m="y",h=C);var L=u[f.index];if(M>=L.span[0]&&M<=L.span[1]){var O=w.extendFlat({},f),I=h.c2p(M,!0),R=y.getKdeValue(L,p,M),U=y.getPositionOnKdePath(L,p,I),B=k._offset,G=k._length;O[g+"0"]=U[0],O[g+"1"]=U[1],O[m+"0"]=O[m+"1"]=I,O[m+"Label"]=m+": "+s.hoverLabelText(h,M,p[m+"hoverformat"])+", "+u[0].t.labels.kde+" "+R.toFixed(3);for(var N=0,j=0;j")),o.color=function(C,L){var O=C[L.dir].marker,I=O.color,R=O.line.color,U=O.line.width;return w(I)?I:w(R)&&U?R:void 0}(u,d),[o]}function A(C){return _(b,C,u[c+"hoverformat"])}}},19990:function(D,E,e){D.exports={attributes:e(43037),layoutAttributes:e(13494),supplyDefaults:e(83266).supplyDefaults,crossTraceDefaults:e(83266).crossTraceDefaults,supplyLayoutDefaults:e(5176),calc:e(52752),crossTraceCalc:e(70766),plot:e(30436),style:e(55750).style,hoverPoints:e(61326),eventData:e(58593),selectPoints:e(81974),moduleType:"trace",name:"waterfall",basePlotModule:e(93612),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},13494:function(D){D.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"}}},5176:function(D,E,e){var _=e(71828),w=e(13494);D.exports=function(s,T,y){var f=!1;function l(r,n){return _.coerce(s,T,w,r,n)}for(var t=0;t0&&(R+=m?"M"+O[0]+","+I[1]+"V"+I[0]:"M"+O[1]+","+I[0]+"H"+O[0]),k!=="between"&&(A.isSum||C path").each(function(p){if(!p.isBlank){var c=u[p.dir].marker;_.select(this).call(s.fill,c.color).call(s.stroke,c.line.color).call(w.dashLine,c.line.dash,c.line.width).style("opacity",u.selectedpoints&&!p.selected?T:1)}}),l(a,u,t),a.selectAll(".lines").each(function(){var p=u.connector.line;w.lineGroupStyle(_.select(this).selectAll("path"),p.width,p.color,p.dash)})})}}},82887:function(D,E,e){var _=e(89298),w=e(71828),s=e(86281),T=e(79344).p,y=e(50606).BADNUM;E.moduleType="transform",E.name="aggregate";var f=E.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},aggregations:{_isLinkedToArray:"aggregation",target:{valType:"string",editType:"calc"},func:{valType:"enumerated",values:["count","sum","avg","median","mode","rms","stddev","min","max","first","last","change","range"],dflt:"first",editType:"calc"},funcmode:{valType:"enumerated",values:["sample","population"],dflt:"sample",editType:"calc"},enabled:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},editType:"calc"},l=f.aggregations;function t(o,a,u,p){if(p.enabled){for(var c=p.target,b=w.nestedProperty(a,c),d=b.get(),v=function(m,k){var h=m.func,M=k.d2c,A=k.c2d;switch(h){case"count":return i;case"first":return r;case"last":return n;case"sum":return function(C,L){for(var O=0,I=0;II&&(I=G,R=B)}}return I?A(R):y};case"rms":return function(C,L){for(var O=0,I=0,R=0;R":return function(H){return V(H)>N};case">=":return function(H){return V(H)>=N};case"[]":return function(H){var ee=V(H);return ee>=N[0]&&ee<=N[1]};case"()":return function(H){var ee=V(H);return ee>N[0]&&ee=N[0]&&eeN[0]&&ee<=N[1]};case"][":return function(H){var ee=V(H);return ee<=N[0]||ee>=N[1]};case")(":return function(H){var ee=V(H);return eeN[1]};case"](":return function(H){var ee=V(H);return ee<=N[0]||ee>N[1]};case")[":return function(H){var ee=V(H);return ee=N[1]};case"{}":return function(H){return N.indexOf(V(H))!==-1};case"}{":return function(H){return N.indexOf(V(H))===-1}}}(n,s.getDataToCoordFunc(i,r,a,o),p),m={},k={},h=0;b?(v=function(L){m[L.astr]=_.extendDeep([],L.get()),L.set(new Array(u))},x=function(L,O){var I=m[L.astr][O];L.get()[O]=I}):(v=function(L){m[L.astr]=_.extendDeep([],L.get()),L.set([])},x=function(L,O){var I=m[L.astr][O];L.get().push(I)}),C(v);for(var M=T(r.transforms,n),A=0;A1?"%{group} (%{trace})":"%{group}");var o=f.styles,a=r.styles=[];if(o)for(i=0;iv)throw new RangeError('The value "'+ge+'" is invalid for option "size"');var be=new Uint8Array(ge);return Object.setPrototypeOf(be,g.prototype),be}function g(ge,be,Se){if(typeof ge=="number"){if(typeof be=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return h(ge)}return m(ge,be,Se)}function m(ge,be,Se){if(typeof ge=="string")return function(Ze,st){if(typeof st=="string"&&st!==""||(st="utf8"),!g.isEncoding(st))throw new TypeError("Unknown encoding: "+st);var ot=0|L(Ze,st),ft=x(ot),yt=ft.write(Ze,st);return yt!==ot&&(ft=ft.slice(0,yt)),ft}(ge,be);if(ArrayBuffer.isView(ge))return function(Ze){if(Te(Ze,Uint8Array)){var st=new Uint8Array(Ze);return A(st.buffer,st.byteOffset,st.byteLength)}return M(Ze)}(ge);if(ge==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+p(ge));if(Te(ge,ArrayBuffer)||ge&&Te(ge.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Te(ge,SharedArrayBuffer)||ge&&Te(ge.buffer,SharedArrayBuffer)))return A(ge,be,Se);if(typeof ge=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Ne=ge.valueOf&&ge.valueOf();if(Ne!=null&&Ne!==ge)return g.from(Ne,be,Se);var Ye=function(Ze){if(g.isBuffer(Ze)){var st=0|C(Ze.length),ot=x(st);return ot.length===0||Ze.copy(ot,0,0,st),ot}return Ze.length!==void 0?typeof Ze.length!="number"||Ee(Ze.length)?x(0):M(Ze):Ze.type==="Buffer"&&Array.isArray(Ze.data)?M(Ze.data):void 0}(ge);if(Ye)return Ye;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ge[Symbol.toPrimitive]=="function")return g.from(ge[Symbol.toPrimitive]("string"),be,Se);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+p(ge))}function k(ge){if(typeof ge!="number")throw new TypeError('"size" argument must be of type number');if(ge<0)throw new RangeError('The value "'+ge+'" is invalid for option "size"')}function h(ge){return k(ge),x(ge<0?0:0|C(ge))}function M(ge){for(var be=ge.length<0?0:0|C(ge.length),Se=x(be),Ne=0;Ne=v)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+v.toString(16)+" bytes");return 0|ge}function L(ge,be){if(g.isBuffer(ge))return ge.length;if(ArrayBuffer.isView(ge)||Te(ge,ArrayBuffer))return ge.byteLength;if(typeof ge!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+p(ge));var Se=ge.length,Ne=arguments.length>2&&arguments[2]===!0;if(!Ne&&Se===0)return 0;for(var Ye=!1;;)switch(be){case"ascii":case"latin1":case"binary":return Se;case"utf8":case"utf-8":return ne(ge).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*Se;case"hex":return Se>>>1;case"base64":return ue(ge).length;default:if(Ye)return Ne?-1:ne(ge).length;be=(""+be).toLowerCase(),Ye=!0}}function O(ge,be,Se){var Ne=!1;if((be===void 0||be<0)&&(be=0),be>this.length||((Se===void 0||Se>this.length)&&(Se=this.length),Se<=0)||(Se>>>=0)<=(be>>>=0))return"";for(ge||(ge="utf8");;)switch(ge){case"hex":return K(this,be,Se);case"utf8":case"utf-8":return ee(this,be,Se);case"ascii":return X(this,be,Se);case"latin1":case"binary":return Y(this,be,Se);case"base64":return H(this,be,Se);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return te(this,be,Se);default:if(Ne)throw new TypeError("Unknown encoding: "+ge);ge=(ge+"").toLowerCase(),Ne=!0}}function I(ge,be,Se){var Ne=ge[be];ge[be]=ge[Se],ge[Se]=Ne}function R(ge,be,Se,Ne,Ye){if(ge.length===0)return-1;if(typeof Se=="string"?(Ne=Se,Se=0):Se>2147483647?Se=2147483647:Se<-2147483648&&(Se=-2147483648),Ee(Se=+Se)&&(Se=Ye?0:ge.length-1),Se<0&&(Se=ge.length+Se),Se>=ge.length){if(Ye)return-1;Se=ge.length-1}else if(Se<0){if(!Ye)return-1;Se=0}if(typeof be=="string"&&(be=g.from(be,Ne)),g.isBuffer(be))return be.length===0?-1:U(ge,be,Se,Ne,Ye);if(typeof be=="number")return be&=255,typeof Uint8Array.prototype.indexOf=="function"?Ye?Uint8Array.prototype.indexOf.call(ge,be,Se):Uint8Array.prototype.lastIndexOf.call(ge,be,Se):U(ge,[be],Se,Ne,Ye);throw new TypeError("val must be string, number or Buffer")}function U(ge,be,Se,Ne,Ye){var Ze,st=1,ot=ge.length,ft=be.length;if(Ne!==void 0&&((Ne=String(Ne).toLowerCase())==="ucs2"||Ne==="ucs-2"||Ne==="utf16le"||Ne==="utf-16le")){if(ge.length<2||be.length<2)return-1;st=2,ot/=2,ft/=2,Se/=2}function yt(Dt,It){return st===1?Dt[It]:Dt.readUInt16BE(It*st)}if(Ye){var Et=-1;for(Ze=Se;Zeot&&(Se=ot-ft),Ze=Se;Ze>=0;Ze--){for(var Tt=!0,xt=0;xtYe&&(Ne=Ye):Ne=Ye;var Ze,st=be.length;for(Ne>st/2&&(Ne=st/2),Ze=0;Ze>8,ft=st%256,yt.push(ft),yt.push(ot);return yt}(be,ge.length-Se),ge,Se,Ne)}function H(ge,be,Se){return be===0&&Se===ge.length?c.fromByteArray(ge):c.fromByteArray(ge.slice(be,Se))}function ee(ge,be,Se){Se=Math.min(ge.length,Se);for(var Ne=[],Ye=be;Ye239?4:Ze>223?3:Ze>191?2:1;if(Ye+ot<=Se){var ft=void 0,yt=void 0,Et=void 0,Tt=void 0;switch(ot){case 1:Ze<128&&(st=Ze);break;case 2:(192&(ft=ge[Ye+1]))==128&&(Tt=(31&Ze)<<6|63&ft)>127&&(st=Tt);break;case 3:ft=ge[Ye+1],yt=ge[Ye+2],(192&ft)==128&&(192&yt)==128&&(Tt=(15&Ze)<<12|(63&ft)<<6|63&yt)>2047&&(Tt<55296||Tt>57343)&&(st=Tt);break;case 4:ft=ge[Ye+1],yt=ge[Ye+2],Et=ge[Ye+3],(192&ft)==128&&(192&yt)==128&&(192&Et)==128&&(Tt=(15&Ze)<<18|(63&ft)<<12|(63&yt)<<6|63&Et)>65535&&Tt<1114112&&(st=Tt)}}st===null?(st=65533,ot=1):st>65535&&(st-=65536,Ne.push(st>>>10&1023|55296),st=56320|1023&st),Ne.push(st),Ye+=ot}return function(xt){var Dt=xt.length;if(Dt<=Q)return String.fromCharCode.apply(String,xt);for(var It="",Ft=0;Ft"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(g.prototype,"parent",{enumerable:!0,get:function(){if(g.isBuffer(this))return this.buffer}}),Object.defineProperty(g.prototype,"offset",{enumerable:!0,get:function(){if(g.isBuffer(this))return this.byteOffset}}),g.poolSize=8192,g.from=function(ge,be,Se){return m(ge,be,Se)},Object.setPrototypeOf(g.prototype,Uint8Array.prototype),Object.setPrototypeOf(g,Uint8Array),g.alloc=function(ge,be,Se){return function(Ne,Ye,Ze){return k(Ne),Ne<=0?x(Ne):Ye!==void 0?typeof Ze=="string"?x(Ne).fill(Ye,Ze):x(Ne).fill(Ye):x(Ne)}(ge,be,Se)},g.allocUnsafe=function(ge){return h(ge)},g.allocUnsafeSlow=function(ge){return h(ge)},g.isBuffer=function(ge){return ge!=null&&ge._isBuffer===!0&&ge!==g.prototype},g.compare=function(ge,be){if(Te(ge,Uint8Array)&&(ge=g.from(ge,ge.offset,ge.byteLength)),Te(be,Uint8Array)&&(be=g.from(be,be.offset,be.byteLength)),!g.isBuffer(ge)||!g.isBuffer(be))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ge===be)return 0;for(var Se=ge.length,Ne=be.length,Ye=0,Ze=Math.min(Se,Ne);YeNe.length?(g.isBuffer(Ze)||(Ze=g.from(Ze)),Ze.copy(Ne,Ye)):Uint8Array.prototype.set.call(Ne,Ze,Ye);else{if(!g.isBuffer(Ze))throw new TypeError('"list" argument must be an Array of Buffers');Ze.copy(Ne,Ye)}Ye+=Ze.length}return Ne},g.byteLength=L,g.prototype._isBuffer=!0,g.prototype.swap16=function(){var ge=this.length;if(ge%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var be=0;bebe&&(ge+=" ... "),""},d&&(g.prototype[d]=g.prototype.inspect),g.prototype.compare=function(ge,be,Se,Ne,Ye){if(Te(ge,Uint8Array)&&(ge=g.from(ge,ge.offset,ge.byteLength)),!g.isBuffer(ge))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+p(ge));if(be===void 0&&(be=0),Se===void 0&&(Se=ge?ge.length:0),Ne===void 0&&(Ne=0),Ye===void 0&&(Ye=this.length),be<0||Se>ge.length||Ne<0||Ye>this.length)throw new RangeError("out of range index");if(Ne>=Ye&&be>=Se)return 0;if(Ne>=Ye)return-1;if(be>=Se)return 1;if(this===ge)return 0;for(var Ze=(Ye>>>=0)-(Ne>>>=0),st=(Se>>>=0)-(be>>>=0),ot=Math.min(Ze,st),ft=this.slice(Ne,Ye),yt=ge.slice(be,Se),Et=0;Et>>=0,isFinite(Se)?(Se>>>=0,Ne===void 0&&(Ne="utf8")):(Ne=Se,Se=void 0)}var Ye=this.length-be;if((Se===void 0||Se>Ye)&&(Se=Ye),ge.length>0&&(Se<0||be<0)||be>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ne||(Ne="utf8");for(var Ze=!1;;)switch(Ne){case"hex":return B(this,ge,be,Se);case"utf8":case"utf-8":return G(this,ge,be,Se);case"ascii":case"latin1":case"binary":return N(this,ge,be,Se);case"base64":return j(this,ge,be,Se);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return V(this,ge,be,Se);default:if(Ze)throw new TypeError("Unknown encoding: "+Ne);Ne=(""+Ne).toLowerCase(),Ze=!0}},g.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;function X(ge,be,Se){var Ne="";Se=Math.min(ge.length,Se);for(var Ye=be;YeNe)&&(Se=Ne);for(var Ye="",Ze=be;ZeSe)throw new RangeError("Trying to access beyond buffer length")}function oe(ge,be,Se,Ne,Ye,Ze){if(!g.isBuffer(ge))throw new TypeError('"buffer" argument must be a Buffer instance');if(be>Ye||bege.length)throw new RangeError("Index out of range")}function se(ge,be,Se,Ne,Ye){we(be,Ne,Ye,ge,Se,7);var Ze=Number(be&BigInt(4294967295));ge[Se++]=Ze,Ze>>=8,ge[Se++]=Ze,Ze>>=8,ge[Se++]=Ze,Ze>>=8,ge[Se++]=Ze;var st=Number(be>>BigInt(32)&BigInt(4294967295));return ge[Se++]=st,st>>=8,ge[Se++]=st,st>>=8,ge[Se++]=st,st>>=8,ge[Se++]=st,Se}function fe(ge,be,Se,Ne,Ye){we(be,Ne,Ye,ge,Se,7);var Ze=Number(be&BigInt(4294967295));ge[Se+7]=Ze,Ze>>=8,ge[Se+6]=Ze,Ze>>=8,ge[Se+5]=Ze,Ze>>=8,ge[Se+4]=Ze;var st=Number(be>>BigInt(32)&BigInt(4294967295));return ge[Se+3]=st,st>>=8,ge[Se+2]=st,st>>=8,ge[Se+1]=st,st>>=8,ge[Se]=st,Se+8}function ye(ge,be,Se,Ne,Ye,Ze){if(Se+Ne>ge.length)throw new RangeError("Index out of range");if(Se<0)throw new RangeError("Index out of range")}function pe(ge,be,Se,Ne,Ye){return be=+be,Se>>>=0,Ye||ye(ge,0,Se,4),b.write(ge,be,Se,Ne,23,4),Se+4}function de(ge,be,Se,Ne,Ye){return be=+be,Se>>>=0,Ye||ye(ge,0,Se,8),b.write(ge,be,Se,Ne,52,8),Se+8}g.prototype.slice=function(ge,be){var Se=this.length;(ge=~~ge)<0?(ge+=Se)<0&&(ge=0):ge>Se&&(ge=Se),(be=be===void 0?Se:~~be)<0?(be+=Se)<0&&(be=0):be>Se&&(be=Se),be>>=0,be>>>=0,Se||ae(ge,be,this.length);for(var Ne=this[ge],Ye=1,Ze=0;++Ze>>=0,be>>>=0,Se||ae(ge,be,this.length);for(var Ne=this[ge+--be],Ye=1;be>0&&(Ye*=256);)Ne+=this[ge+--be]*Ye;return Ne},g.prototype.readUint8=g.prototype.readUInt8=function(ge,be){return ge>>>=0,be||ae(ge,1,this.length),this[ge]},g.prototype.readUint16LE=g.prototype.readUInt16LE=function(ge,be){return ge>>>=0,be||ae(ge,2,this.length),this[ge]|this[ge+1]<<8},g.prototype.readUint16BE=g.prototype.readUInt16BE=function(ge,be){return ge>>>=0,be||ae(ge,2,this.length),this[ge]<<8|this[ge+1]},g.prototype.readUint32LE=g.prototype.readUInt32LE=function(ge,be){return ge>>>=0,be||ae(ge,4,this.length),(this[ge]|this[ge+1]<<8|this[ge+2]<<16)+16777216*this[ge+3]},g.prototype.readUint32BE=g.prototype.readUInt32BE=function(ge,be){return ge>>>=0,be||ae(ge,4,this.length),16777216*this[ge]+(this[ge+1]<<16|this[ge+2]<<8|this[ge+3])},g.prototype.readBigUInt64LE=De(function(ge){Ae(ge>>>=0,"offset");var be=this[ge],Se=this[ge+7];be!==void 0&&Se!==void 0||Me(ge,this.length-8);var Ne=be+this[++ge]*Math.pow(2,8)+this[++ge]*Math.pow(2,16)+this[++ge]*Math.pow(2,24),Ye=this[++ge]+this[++ge]*Math.pow(2,8)+this[++ge]*Math.pow(2,16)+Se*Math.pow(2,24);return BigInt(Ne)+(BigInt(Ye)<>>=0,"offset");var be=this[ge],Se=this[ge+7];be!==void 0&&Se!==void 0||Me(ge,this.length-8);var Ne=be*Math.pow(2,24)+this[++ge]*Math.pow(2,16)+this[++ge]*Math.pow(2,8)+this[++ge],Ye=this[++ge]*Math.pow(2,24)+this[++ge]*Math.pow(2,16)+this[++ge]*Math.pow(2,8)+Se;return(BigInt(Ne)<>>=0,be>>>=0,Se||ae(ge,be,this.length);for(var Ne=this[ge],Ye=1,Ze=0;++Ze=(Ye*=128)&&(Ne-=Math.pow(2,8*be)),Ne},g.prototype.readIntBE=function(ge,be,Se){ge>>>=0,be>>>=0,Se||ae(ge,be,this.length);for(var Ne=be,Ye=1,Ze=this[ge+--Ne];Ne>0&&(Ye*=256);)Ze+=this[ge+--Ne]*Ye;return Ze>=(Ye*=128)&&(Ze-=Math.pow(2,8*be)),Ze},g.prototype.readInt8=function(ge,be){return ge>>>=0,be||ae(ge,1,this.length),128&this[ge]?-1*(255-this[ge]+1):this[ge]},g.prototype.readInt16LE=function(ge,be){ge>>>=0,be||ae(ge,2,this.length);var Se=this[ge]|this[ge+1]<<8;return 32768&Se?4294901760|Se:Se},g.prototype.readInt16BE=function(ge,be){ge>>>=0,be||ae(ge,2,this.length);var Se=this[ge+1]|this[ge]<<8;return 32768&Se?4294901760|Se:Se},g.prototype.readInt32LE=function(ge,be){return ge>>>=0,be||ae(ge,4,this.length),this[ge]|this[ge+1]<<8|this[ge+2]<<16|this[ge+3]<<24},g.prototype.readInt32BE=function(ge,be){return ge>>>=0,be||ae(ge,4,this.length),this[ge]<<24|this[ge+1]<<16|this[ge+2]<<8|this[ge+3]},g.prototype.readBigInt64LE=De(function(ge){Ae(ge>>>=0,"offset");var be=this[ge],Se=this[ge+7];be!==void 0&&Se!==void 0||Me(ge,this.length-8);var Ne=this[ge+4]+this[ge+5]*Math.pow(2,8)+this[ge+6]*Math.pow(2,16)+(Se<<24);return(BigInt(Ne)<>>=0,"offset");var be=this[ge],Se=this[ge+7];be!==void 0&&Se!==void 0||Me(ge,this.length-8);var Ne=(be<<24)+this[++ge]*Math.pow(2,16)+this[++ge]*Math.pow(2,8)+this[++ge];return(BigInt(Ne)<>>=0,be||ae(ge,4,this.length),b.read(this,ge,!0,23,4)},g.prototype.readFloatBE=function(ge,be){return ge>>>=0,be||ae(ge,4,this.length),b.read(this,ge,!1,23,4)},g.prototype.readDoubleLE=function(ge,be){return ge>>>=0,be||ae(ge,8,this.length),b.read(this,ge,!0,52,8)},g.prototype.readDoubleBE=function(ge,be){return ge>>>=0,be||ae(ge,8,this.length),b.read(this,ge,!1,52,8)},g.prototype.writeUintLE=g.prototype.writeUIntLE=function(ge,be,Se,Ne){ge=+ge,be>>>=0,Se>>>=0,Ne||oe(this,ge,be,Se,Math.pow(2,8*Se)-1,0);var Ye=1,Ze=0;for(this[be]=255≥++Ze>>=0,Se>>>=0,Ne||oe(this,ge,be,Se,Math.pow(2,8*Se)-1,0);var Ye=Se-1,Ze=1;for(this[be+Ye]=255≥--Ye>=0&&(Ze*=256);)this[be+Ye]=ge/Ze&255;return be+Se},g.prototype.writeUint8=g.prototype.writeUInt8=function(ge,be,Se){return ge=+ge,be>>>=0,Se||oe(this,ge,be,1,255,0),this[be]=255&ge,be+1},g.prototype.writeUint16LE=g.prototype.writeUInt16LE=function(ge,be,Se){return ge=+ge,be>>>=0,Se||oe(this,ge,be,2,65535,0),this[be]=255&ge,this[be+1]=ge>>>8,be+2},g.prototype.writeUint16BE=g.prototype.writeUInt16BE=function(ge,be,Se){return ge=+ge,be>>>=0,Se||oe(this,ge,be,2,65535,0),this[be]=ge>>>8,this[be+1]=255&ge,be+2},g.prototype.writeUint32LE=g.prototype.writeUInt32LE=function(ge,be,Se){return ge=+ge,be>>>=0,Se||oe(this,ge,be,4,4294967295,0),this[be+3]=ge>>>24,this[be+2]=ge>>>16,this[be+1]=ge>>>8,this[be]=255&ge,be+4},g.prototype.writeUint32BE=g.prototype.writeUInt32BE=function(ge,be,Se){return ge=+ge,be>>>=0,Se||oe(this,ge,be,4,4294967295,0),this[be]=ge>>>24,this[be+1]=ge>>>16,this[be+2]=ge>>>8,this[be+3]=255&ge,be+4},g.prototype.writeBigUInt64LE=De(function(ge){var be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return se(this,ge,be,BigInt(0),BigInt("0xffffffffffffffff"))}),g.prototype.writeBigUInt64BE=De(function(ge){var be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return fe(this,ge,be,BigInt(0),BigInt("0xffffffffffffffff"))}),g.prototype.writeIntLE=function(ge,be,Se,Ne){if(ge=+ge,be>>>=0,!Ne){var Ye=Math.pow(2,8*Se-1);oe(this,ge,be,Se,Ye-1,-Ye)}var Ze=0,st=1,ot=0;for(this[be]=255≥++Ze>0)-ot&255;return be+Se},g.prototype.writeIntBE=function(ge,be,Se,Ne){if(ge=+ge,be>>>=0,!Ne){var Ye=Math.pow(2,8*Se-1);oe(this,ge,be,Se,Ye-1,-Ye)}var Ze=Se-1,st=1,ot=0;for(this[be+Ze]=255≥--Ze>=0&&(st*=256);)ge<0&&ot===0&&this[be+Ze+1]!==0&&(ot=1),this[be+Ze]=(ge/st>>0)-ot&255;return be+Se},g.prototype.writeInt8=function(ge,be,Se){return ge=+ge,be>>>=0,Se||oe(this,ge,be,1,127,-128),ge<0&&(ge=255+ge+1),this[be]=255&ge,be+1},g.prototype.writeInt16LE=function(ge,be,Se){return ge=+ge,be>>>=0,Se||oe(this,ge,be,2,32767,-32768),this[be]=255&ge,this[be+1]=ge>>>8,be+2},g.prototype.writeInt16BE=function(ge,be,Se){return ge=+ge,be>>>=0,Se||oe(this,ge,be,2,32767,-32768),this[be]=ge>>>8,this[be+1]=255&ge,be+2},g.prototype.writeInt32LE=function(ge,be,Se){return ge=+ge,be>>>=0,Se||oe(this,ge,be,4,2147483647,-2147483648),this[be]=255&ge,this[be+1]=ge>>>8,this[be+2]=ge>>>16,this[be+3]=ge>>>24,be+4},g.prototype.writeInt32BE=function(ge,be,Se){return ge=+ge,be>>>=0,Se||oe(this,ge,be,4,2147483647,-2147483648),ge<0&&(ge=4294967295+ge+1),this[be]=ge>>>24,this[be+1]=ge>>>16,this[be+2]=ge>>>8,this[be+3]=255&ge,be+4},g.prototype.writeBigInt64LE=De(function(ge){var be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return se(this,ge,be,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),g.prototype.writeBigInt64BE=De(function(ge){var be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return fe(this,ge,be,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),g.prototype.writeFloatLE=function(ge,be,Se){return pe(this,ge,be,!0,Se)},g.prototype.writeFloatBE=function(ge,be,Se){return pe(this,ge,be,!1,Se)},g.prototype.writeDoubleLE=function(ge,be,Se){return de(this,ge,be,!0,Se)},g.prototype.writeDoubleBE=function(ge,be,Se){return de(this,ge,be,!1,Se)},g.prototype.copy=function(ge,be,Se,Ne){if(!g.isBuffer(ge))throw new TypeError("argument should be a Buffer");if(Se||(Se=0),Ne||Ne===0||(Ne=this.length),be>=ge.length&&(be=ge.length),be||(be=0),Ne>0&&Ne=this.length)throw new RangeError("Index out of range");if(Ne<0)throw new RangeError("sourceEnd out of bounds");Ne>this.length&&(Ne=this.length),ge.length-be>>=0,Se=Se===void 0?this.length:Se>>>0,ge||(ge=0),typeof ge=="number")for(Ze=be;Ze"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var Et,Tt=u(st);if(ot){var xt=u(this).constructor;Et=Reflect.construct(Tt,arguments,xt)}else Et=Tt.apply(this,arguments);return o(this,Et)});function yt(){var Et;return i(this,yt),Et=ft.call(this),Object.defineProperty(a(Et),"message",{value:be.apply(a(Et),arguments),writable:!0,configurable:!0}),Et.name="".concat(Et.name," [").concat(ge,"]"),Et.stack,delete Et.name,Et}return Ye=yt,(Ze=[{key:"code",get:function(){return ge},set:function(Et){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Et,writable:!0})}},{key:"toString",value:function(){return"".concat(this.name," [").concat(ge,"]: ").concat(this.message)}}])&&r(Ye.prototype,Ze),Object.defineProperty(Ye,"prototype",{writable:!1}),yt}(Se)}function Re(ge){for(var be="",Se=ge.length,Ne=ge[0]==="-"?1:0;Se>=Ne+4;Se-=3)be="_".concat(ge.slice(Se-3,Se)).concat(be);return"".concat(ge.slice(0,Se)).concat(be)}function we(ge,be,Se,Ne,Ye,Ze){if(ge>Se||ge3?be===0||be===BigInt(0)?">= 0".concat(ot," and < 2").concat(ot," ** ").concat(8*(Ze+1)).concat(ot):">= -(2".concat(ot," ** ").concat(8*(Ze+1)-1).concat(ot,") and < 2 ** ")+"".concat(8*(Ze+1)-1).concat(ot):">= ".concat(be).concat(ot," and <= ").concat(Se).concat(ot),new he.ERR_OUT_OF_RANGE("value",st,ge)}(function(ft,yt,Et){Ae(yt,"offset"),ft[yt]!==void 0&&ft[yt+Et]!==void 0||Me(yt,ft.length-(Et+1))})(Ne,Ye,Ze)}function Ae(ge,be){if(typeof ge!="number")throw new he.ERR_INVALID_ARG_TYPE(be,"number",ge)}function Me(ge,be,Se){throw Math.floor(ge)!==ge?(Ae(ge,Se),new he.ERR_OUT_OF_RANGE(Se||"offset","an integer",ge)):be<0?new he.ERR_BUFFER_OUT_OF_BOUNDS:new he.ERR_OUT_OF_RANGE(Se||"offset",">= ".concat(Se?1:0," and <= ").concat(be),ge)}xe("ERR_BUFFER_OUT_OF_BOUNDS",function(ge){return ge?"".concat(ge," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),xe("ERR_INVALID_ARG_TYPE",function(ge,be){return'The "'.concat(ge,'" argument must be of type number. Received type ').concat(p(be))},TypeError),xe("ERR_OUT_OF_RANGE",function(ge,be,Se){var Ne='The value of "'.concat(ge,'" is out of range.'),Ye=Se;return Number.isInteger(Se)&&Math.abs(Se)>Math.pow(2,32)?Ye=Re(String(Se)):typeof Se=="bigint"&&(Ye=String(Se),(Se>Math.pow(BigInt(2),BigInt(32))||Se<-Math.pow(BigInt(2),BigInt(32)))&&(Ye=Re(Ye)),Ye+="n"),Ne+" It must be ".concat(be,". Received ").concat(Ye)},RangeError);var Ce=/[^+/0-9A-Za-z-_]/g;function ne(ge,be){var Se;be=be||1/0;for(var Ne=ge.length,Ye=null,Ze=[],st=0;st55295&&Se<57344){if(!Ye){if(Se>56319){(be-=3)>-1&&Ze.push(239,191,189);continue}if(st+1===Ne){(be-=3)>-1&&Ze.push(239,191,189);continue}Ye=Se;continue}if(Se<56320){(be-=3)>-1&&Ze.push(239,191,189),Ye=Se;continue}Se=65536+(Ye-55296<<10|Se-56320)}else Ye&&(be-=3)>-1&&Ze.push(239,191,189);if(Ye=null,Se<128){if((be-=1)<0)break;Ze.push(Se)}else if(Se<2048){if((be-=2)<0)break;Ze.push(Se>>6|192,63&Se|128)}else if(Se<65536){if((be-=3)<0)break;Ze.push(Se>>12|224,Se>>6&63|128,63&Se|128)}else{if(!(Se<1114112))throw new Error("Invalid code point");if((be-=4)<0)break;Ze.push(Se>>18|240,Se>>12&63|128,Se>>6&63|128,63&Se|128)}}return Ze}function ue(ge){return c.toByteArray(function(be){if((be=(be=be.split("=")[0]).trim().replace(Ce,"")).length<2)return"";for(;be.length%4!=0;)be+="=";return be}(ge))}function me(ge,be,Se,Ne){var Ye;for(Ye=0;Ye=be.length||Ye>=ge.length);++Ye)be[Ye+Se]=ge[Ye];return Ye}function Te(ge,be){return ge instanceof be||ge!=null&&ge.constructor!=null&&ge.constructor.name!=null&&ge.constructor.name===be.name}function Ee(ge){return ge!=ge}var Ue=function(){for(var ge="0123456789abcdef",be=new Array(256),Se=0;Se<16;++Se)for(var Ne=16*Se,Ye=0;Ye<16;++Ye)be[Ne+Ye]=ge[Se]+ge[Ye];return be}();function De(ge){return typeof BigInt>"u"?je:ge}function je(){throw new Error("BigInt not supported")}},2321:function(f){f.exports=r,f.exports.isMobile=r,f.exports.default=r;var l=/(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,t=/CrOS/,i=/android|ipad|playbook|silk/i;function r(n){n||(n={});var o=n.ua;if(o||typeof navigator>"u"||(o=navigator.userAgent),o&&o.headers&&typeof o.headers["user-agent"]=="string"&&(o=o.headers["user-agent"]),typeof o!="string")return!1;var a=l.test(o)&&!t.test(o)||!!n.tablet&&i.test(o);return!a&&n.tablet&&n.featureDetect&&navigator&&navigator.maxTouchPoints>1&&o.indexOf("Macintosh")!==-1&&o.indexOf("Safari")!==-1&&(a=!0),a}},3910:function(f,l){l.byteLength=function(c){var b=u(c),d=b[0],v=b[1];return 3*(d+v)/4-v},l.toByteArray=function(c){var b,d,v=u(c),x=v[0],g=v[1],m=new r(function(M,A,C){return 3*(A+C)/4-C}(0,x,g)),k=0,h=g>0?x-4:x;for(d=0;d>16&255,m[k++]=b>>8&255,m[k++]=255&b;return g===2&&(b=i[c.charCodeAt(d)]<<2|i[c.charCodeAt(d+1)]>>4,m[k++]=255&b),g===1&&(b=i[c.charCodeAt(d)]<<10|i[c.charCodeAt(d+1)]<<4|i[c.charCodeAt(d+2)]>>2,m[k++]=b>>8&255,m[k++]=255&b),m},l.fromByteArray=function(c){for(var b,d=c.length,v=d%3,x=[],g=16383,m=0,k=d-v;mk?k:m+g));return v===1?(b=c[d-1],x.push(t[b>>2]+t[b<<4&63]+"==")):v===2&&(b=(c[d-2]<<8)+c[d-1],x.push(t[b>>10]+t[b>>4&63]+t[b<<2&63]+"=")),x.join("")};for(var t=[],i=[],r=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=n.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var d=c.indexOf("=");return d===-1&&(d=b),[d,d===b?0:4-d%4]}function p(c,b,d){for(var v,x,g=[],m=b;m>18&63]+t[x>>12&63]+t[x>>6&63]+t[63&x]);return g.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},3187:function(f,l){l.read=function(t,i,r,n,o){var a,u,p=8*o-n-1,c=(1<>1,d=-7,v=r?o-1:0,x=r?-1:1,g=t[i+v];for(v+=x,a=g&(1<<-d)-1,g>>=-d,d+=p;d>0;a=256*a+t[i+v],v+=x,d-=8);for(u=a&(1<<-d)-1,a>>=-d,d+=n;d>0;u=256*u+t[i+v],v+=x,d-=8);if(a===0)a=1-b;else{if(a===c)return u?NaN:1/0*(g?-1:1);u+=Math.pow(2,n),a-=b}return(g?-1:1)*u*Math.pow(2,a-n)},l.write=function(t,i,r,n,o,a){var u,p,c,b=8*a-o-1,d=(1<>1,x=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:a-1,m=n?1:-1,k=i<0||i===0&&1/i<0?1:0;for(i=Math.abs(i),isNaN(i)||i===1/0?(p=isNaN(i)?1:0,u=d):(u=Math.floor(Math.log(i)/Math.LN2),i*(c=Math.pow(2,-u))<1&&(u--,c*=2),(i+=u+v>=1?x/c:x*Math.pow(2,1-v))*c>=2&&(u++,c/=2),u+v>=d?(p=0,u=d):u+v>=1?(p=(i*c-1)*Math.pow(2,o),u+=v):(p=i*Math.pow(2,v-1)*Math.pow(2,o),u=0));o>=8;t[r+g]=255&p,g+=m,p/=256,o-=8);for(u=u<0;t[r+g]=255&u,g+=m,u/=256,b-=8);t[r+g-m]|=128*k}},1152:function(f,l,t){f.exports=function(u){var p=(u=u||{}).eye||[0,0,1],c=u.center||[0,0,0],b=u.up||[0,1,0],d=u.distanceLimits||[0,1/0],v=u.mode||"turntable",x=i(),g=r(),m=n();return x.setDistanceLimits(d[0],d[1]),x.lookAt(0,p,c,b),g.setDistanceLimits(d[0],d[1]),g.lookAt(0,p,c,b),m.setDistanceLimits(d[0],d[1]),m.lookAt(0,p,c,b),new o({turntable:x,orbit:g,matrix:m},v)};var i=t(3440),r=t(7774),n=t(9298);function o(u,p){this._controllerNames=Object.keys(u),this._controllerList=this._controllerNames.map(function(c){return u[c]}),this._mode=p,this._active=u[p],this._active||(this._mode="turntable",this._active=u.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 a=o.prototype;a.flush=function(u){for(var p=this._controllerList,c=0;c"u"?t(5346):WeakMap,r=t(5827),n=t(2944),o=new i;f.exports=function(a){var u=o.get(a),p=u&&(u._triangleBuffer.handle||u._triangleBuffer.buffer);if(!p||!a.isBuffer(p)){var c=r(a,new Float32Array([-1,-1,-1,4,4,-1]));(u=n(a,[{buffer:c,type:a.FLOAT,size:2}]))._triangleBuffer=c,o.set(a,u)}u.bind(),a.drawArrays(a.TRIANGLES,0,3),u.unbind()}},8008:function(f,l,t){var i=t(4930);f.exports=function(r,n,o){n=typeof n=="number"?n:1,o=o||": ";var a=r.split(/\r?\n/),u=String(a.length+n-1).length;return a.map(function(p,c){var b=c+n,d=String(b).length;return i(b,u-d)+o+p}).join(` -`)}},2153:function(f,l,t){f.exports=function(n){var o=n.length;if(o===0)return[];if(o===1)return[0];for(var a=n[0].length,u=[n[0]],p=[0],c=1;c0?d=d.ushln(x):x<0&&(v=v.ushln(-x)),a(d,v)}},234:function(f,l,t){var i=t(3218);f.exports=function(r){return Array.isArray(r)&&r.length===2&&i(r[0])&&i(r[1])}},4275:function(f,l,t){var i=t(1928);f.exports=function(r){return r.cmp(new i(0))}},9958:function(f,l,t){var i=t(4275);f.exports=function(r){var n=r.length,o=r.words,a=0;if(n===1)a=o[0];else if(n===2)a=o[0]+67108864*o[1];else for(var u=0;u20?52:a+32}},3218:function(f,l,t){t(1928),f.exports=function(i){return i&&typeof i=="object"&&!!i.words}},5514:function(f,l,t){var i=t(1928),r=t(8362);f.exports=function(n){var o=r.exponent(n);return o<52?new i(n):new i(n*Math.pow(2,52-o)).ushln(o-52)}},8524:function(f,l,t){var i=t(5514),r=t(4275);f.exports=function(n,o){var a=r(n),u=r(o);if(a===0)return[i(0),i(1)];if(u===0)return[i(0),i(0)];u<0&&(n=n.neg(),o=o.neg());var p=n.gcd(o);return p.cmpn(1)?[n.div(p),o.div(p)]:[n,o]}},2813:function(f,l,t){var i=t(1928);f.exports=function(r){return new i(r)}},3962:function(f,l,t){var i=t(8524);f.exports=function(r,n){return i(r[0].mul(n[0]),r[1].mul(n[1]))}},4951:function(f,l,t){var i=t(4275);f.exports=function(r){return i(r[0])*i(r[1])}},4354:function(f,l,t){var i=t(8524);f.exports=function(r,n){return i(r[0].mul(n[1]).sub(r[1].mul(n[0])),r[1].mul(n[1]))}},7999:function(f,l,t){var i=t(9958),r=t(1112);f.exports=function(n){var o=n[0],a=n[1];if(o.cmpn(0)===0)return 0;var u=o.abs().divmod(a.abs()),p=u.div,c=i(p),b=u.mod,d=o.negative!==a.negative?-1:1;if(b.cmpn(0)===0)return d*c;if(c){var v=r(c)+4,x=i(b.ushln(v).divRound(a));return d*(c+x*Math.pow(2,-v))}var g=a.bitLength()-b.bitLength()+53;return x=i(b.ushln(g).divRound(a)),g<1023?d*x*Math.pow(2,-g):d*(x*=Math.pow(2,-1023))*Math.pow(2,1023-g)}},5070:function(f){function l(a,u,p,c,b){for(var d=b+1;c<=b;){var v=c+b>>>1,x=a[v];(p!==void 0?p(x,u):x-u)>=0?(d=v,b=v-1):c=v+1}return d}function t(a,u,p,c,b){for(var d=b+1;c<=b;){var v=c+b>>>1,x=a[v];(p!==void 0?p(x,u):x-u)>0?(d=v,b=v-1):c=v+1}return d}function i(a,u,p,c,b){for(var d=c-1;c<=b;){var v=c+b>>>1,x=a[v];(p!==void 0?p(x,u):x-u)<0?(d=v,c=v+1):b=v-1}return d}function r(a,u,p,c,b){for(var d=c-1;c<=b;){var v=c+b>>>1,x=a[v];(p!==void 0?p(x,u):x-u)<=0?(d=v,c=v+1):b=v-1}return d}function n(a,u,p,c,b){for(;c<=b;){var d=c+b>>>1,v=a[d],x=p!==void 0?p(v,u):v-u;if(x===0)return d;x<=0?c=d+1:b=d-1}return-1}function o(a,u,p,c,b,d){return typeof p=="function"?d(a,u,p,c===void 0?0:0|c,b===void 0?a.length-1:0|b):d(a,u,void 0,p===void 0?0:0|p,c===void 0?a.length-1:0|c)}f.exports={ge:function(a,u,p,c,b){return o(a,u,p,c,b,l)},gt:function(a,u,p,c,b){return o(a,u,p,c,b,t)},lt:function(a,u,p,c,b){return o(a,u,p,c,b,i)},le:function(a,u,p,c,b){return o(a,u,p,c,b,r)},eq:function(a,u,p,c,b){return o(a,u,p,c,b,n)}}},2288:function(f,l){function t(r){var n=32;return(r&=-r)&&n--,65535&r&&(n-=16),16711935&r&&(n-=8),252645135&r&&(n-=4),858993459&r&&(n-=2),1431655765&r&&(n-=1),n}l.INT_BITS=32,l.INT_MAX=2147483647,l.INT_MIN=-2147483648,l.sign=function(r){return(r>0)-(r<0)},l.abs=function(r){var n=r>>31;return(r^n)-n},l.min=function(r,n){return n^(r^n)&-(r65535)<<4,n|=o=((r>>>=n)>255)<<3,n|=o=((r>>>=o)>15)<<2,(n|=o=((r>>>=o)>3)<<1)|(r>>>=o)>>1},l.log10=function(r){return r>=1e9?9:r>=1e8?8:r>=1e7?7:r>=1e6?6:r>=1e5?5:r>=1e4?4:r>=1e3?3:r>=100?2:r>=10?1:0},l.popCount=function(r){return 16843009*((r=(858993459&(r-=r>>>1&1431655765))+(r>>>2&858993459))+(r>>>4)&252645135)>>>24},l.countTrailingZeros=t,l.nextPow2=function(r){return r+=r===0,--r,r|=r>>>1,r|=r>>>2,r|=r>>>4,1+((r|=r>>>8)|r>>>16)},l.prevPow2=function(r){return r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,(r|=r>>>16)-(r>>>1)},l.parity=function(r){return r^=r>>>16,r^=r>>>8,r^=r>>>4,27030>>>(r&=15)&1};var i=new Array(256);(function(r){for(var n=0;n<256;++n){var o=n,a=n,u=7;for(o>>>=1;o;o>>>=1)a<<=1,a|=1&o,--u;r[n]=a<>>8&255]<<16|i[r>>>16&255]<<8|i[r>>>24&255]},l.interleave2=function(r,n){return(r=1431655765&((r=858993459&((r=252645135&((r=16711935&((r&=65535)|r<<8))|r<<4))|r<<2))|r<<1))|(n=1431655765&((n=858993459&((n=252645135&((n=16711935&((n&=65535)|n<<8))|n<<4))|n<<2))|n<<1))<<1},l.deinterleave2=function(r,n){return(r=65535&((r=16711935&((r=252645135&((r=858993459&((r=r>>>n&1431655765)|r>>>1))|r>>>2))|r>>>4))|r>>>16))<<16>>16},l.interleave3=function(r,n,o){return r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2),(r|=(n=1227133513&((n=3272356035&((n=251719695&((n=4278190335&((n&=1023)|n<<16))|n<<8))|n<<4))|n<<2))<<1)|(o=1227133513&((o=3272356035&((o=251719695&((o=4278190335&((o&=1023)|o<<16))|o<<8))|o<<4))|o<<2))<<2},l.deinterleave3=function(r,n){return(r=1023&((r=4278190335&((r=251719695&((r=3272356035&((r=r>>>n&1227133513)|r>>>2))|r>>>4))|r>>>8))|r>>>16))<<22>>22},l.nextCombination=function(r){var n=r|r-1;return n+1|(~n&-~n)-1>>>t(r)+1}},1928:function(f,l,t){(function(i,r){function n(B,G){if(!B)throw new Error(G||"Assertion failed")}function o(B,G){B.super_=G;var N=function(){};N.prototype=G.prototype,B.prototype=new N,B.prototype.constructor=B}function a(B,G,N){if(a.isBN(B))return B;this.negative=0,this.words=null,this.length=0,this.red=null,B!==null&&(G!=="le"&&G!=="be"||(N=G,G=10),this._init(B||0,G||10,N||"be"))}var u;typeof i=="object"?i.exports=a:r.BN=a,a.BN=a,a.wordSize=26;try{u=typeof window<"u"&&window.Buffer!==void 0?window.Buffer:t(6601).Buffer}catch{}function p(B,G){var N=B.charCodeAt(G);return N>=65&&N<=70?N-55:N>=97&&N<=102?N-87:N-48&15}function c(B,G,N){var j=p(B,N);return N-1>=G&&(j|=p(B,N-1)<<4),j}function b(B,G,N,j){for(var V=0,H=Math.min(B.length,N),ee=G;ee=49?Q-49+10:Q>=17?Q-17+10:Q}return V}a.isBN=function(B){return B instanceof a||B!==null&&typeof B=="object"&&B.constructor.wordSize===a.wordSize&&Array.isArray(B.words)},a.max=function(B,G){return B.cmp(G)>0?B:G},a.min=function(B,G){return B.cmp(G)<0?B:G},a.prototype._init=function(B,G,N){if(typeof B=="number")return this._initNumber(B,G,N);if(typeof B=="object")return this._initArray(B,G,N);G==="hex"&&(G=16),n(G===(0|G)&&G>=2&&G<=36);var j=0;(B=B.toString().replace(/\s+/g,""))[0]==="-"&&(j++,this.negative=1),j=0;j-=3)H=B[j]|B[j-1]<<8|B[j-2]<<16,this.words[V]|=H<>>26-ee&67108863,(ee+=24)>=26&&(ee-=26,V++);else if(N==="le")for(j=0,V=0;j>>26-ee&67108863,(ee+=24)>=26&&(ee-=26,V++);return this.strip()},a.prototype._parseHex=function(B,G,N){this.length=Math.ceil((B.length-G)/6),this.words=new Array(this.length);for(var j=0;j=G;j-=2)V=c(B,G,j)<=18?(H-=18,ee+=1,this.words[ee]|=V>>>26):H+=8;else for(j=(B.length-G)%2==0?G+1:G;j=18?(H-=18,ee+=1,this.words[ee]|=V>>>26):H+=8;this.strip()},a.prototype._parseBase=function(B,G,N){this.words=[0],this.length=1;for(var j=0,V=1;V<=67108863;V*=G)j++;j--,V=V/G|0;for(var H=B.length-N,ee=H%j,Q=Math.min(H,H-ee)+N,X=0,Y=N;Y1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},a.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var d=["","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"],v=[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],x=[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];function g(B,G,N){N.negative=G.negative^B.negative;var j=B.length+G.length|0;N.length=j,j=j-1|0;var V=0|B.words[0],H=0|G.words[0],ee=V*H,Q=67108863&ee,X=ee/67108864|0;N.words[0]=Q;for(var Y=1;Y>>26,te=67108863&X,ae=Math.min(Y,G.length-1),oe=Math.max(0,Y-B.length+1);oe<=ae;oe++){var se=Y-oe|0;K+=(ee=(V=0|B.words[se])*(H=0|G.words[oe])+te)/67108864|0,te=67108863&ee}N.words[Y]=0|te,X=0|K}return X!==0?N.words[Y]=0|X:N.length--,N.strip()}a.prototype.toString=function(B,G){var N;if(G=0|G||1,(B=B||10)===16||B==="hex"){N="";for(var j=0,V=0,H=0;H>>24-j&16777215)!=0||H!==this.length-1?d[6-Q.length]+Q+N:Q+N,(j+=2)>=26&&(j-=26,H--)}for(V!==0&&(N=V.toString(16)+N);N.length%G!=0;)N="0"+N;return this.negative!==0&&(N="-"+N),N}if(B===(0|B)&&B>=2&&B<=36){var X=v[B],Y=x[B];N="";var K=this.clone();for(K.negative=0;!K.isZero();){var te=K.modn(Y).toString(B);N=(K=K.idivn(Y)).isZero()?te+N:d[X-te.length]+te+N}for(this.isZero()&&(N="0"+N);N.length%G!=0;)N="0"+N;return this.negative!==0&&(N="-"+N),N}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var B=this.words[0];return this.length===2?B+=67108864*this.words[1]:this.length===3&&this.words[2]===1?B+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-B:B},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(B,G){return n(u!==void 0),this.toArrayLike(u,B,G)},a.prototype.toArray=function(B,G){return this.toArrayLike(Array,B,G)},a.prototype.toArrayLike=function(B,G,N){var j=this.byteLength(),V=N||Math.max(1,j);n(j<=V,"byte array longer than desired length"),n(V>0,"Requested array length <= 0"),this.strip();var H,ee,Q=G==="le",X=new B(V),Y=this.clone();if(Q){for(ee=0;!Y.isZero();ee++)H=Y.andln(255),Y.iushrn(8),X[ee]=H;for(;ee=4096&&(N+=13,G>>>=13),G>=64&&(N+=7,G>>>=7),G>=8&&(N+=4,G>>>=4),G>=2&&(N+=2,G>>>=2),N+G},a.prototype._zeroBits=function(B){if(B===0)return 26;var G=B,N=0;return!(8191&G)&&(N+=13,G>>>=13),!(127&G)&&(N+=7,G>>>=7),!(15&G)&&(N+=4,G>>>=4),!(3&G)&&(N+=2,G>>>=2),!(1&G)&&N++,N},a.prototype.bitLength=function(){var B=this.words[this.length-1],G=this._countBits(B);return 26*(this.length-1)+G},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var B=0,G=0;GB.length?this.clone().ior(B):B.clone().ior(this)},a.prototype.uor=function(B){return this.length>B.length?this.clone().iuor(B):B.clone().iuor(this)},a.prototype.iuand=function(B){var G;G=this.length>B.length?B:this;for(var N=0;NB.length?this.clone().iand(B):B.clone().iand(this)},a.prototype.uand=function(B){return this.length>B.length?this.clone().iuand(B):B.clone().iuand(this)},a.prototype.iuxor=function(B){var G,N;this.length>B.length?(G=this,N=B):(G=B,N=this);for(var j=0;jB.length?this.clone().ixor(B):B.clone().ixor(this)},a.prototype.uxor=function(B){return this.length>B.length?this.clone().iuxor(B):B.clone().iuxor(this)},a.prototype.inotn=function(B){n(typeof B=="number"&&B>=0);var G=0|Math.ceil(B/26),N=B%26;this._expand(G),N>0&&G--;for(var j=0;j0&&(this.words[j]=~this.words[j]&67108863>>26-N),this.strip()},a.prototype.notn=function(B){return this.clone().inotn(B)},a.prototype.setn=function(B,G){n(typeof B=="number"&&B>=0);var N=B/26|0,j=B%26;return this._expand(N+1),this.words[N]=G?this.words[N]|1<B.length?(N=this,j=B):(N=B,j=this);for(var V=0,H=0;H>>26;for(;V!==0&&H>>26;if(this.length=N.length,V!==0)this.words[this.length]=V,this.length++;else if(N!==this)for(;HB.length?this.clone().iadd(B):B.clone().iadd(this)},a.prototype.isub=function(B){if(B.negative!==0){B.negative=0;var G=this.iadd(B);return B.negative=1,G._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(B),this.negative=1,this._normSign();var N,j,V=this.cmp(B);if(V===0)return this.negative=0,this.length=1,this.words[0]=0,this;V>0?(N=this,j=B):(N=B,j=this);for(var H=0,ee=0;ee>26,this.words[ee]=67108863&G;for(;H!==0&&ee>26,this.words[ee]=67108863&G;if(H===0&&ee>>13,oe=0|ee[1],se=8191&oe,fe=oe>>>13,ye=0|ee[2],pe=8191&ye,de=ye>>>13,he=0|ee[3],xe=8191&he,Re=he>>>13,we=0|ee[4],Ae=8191&we,Me=we>>>13,Ce=0|ee[5],ne=8191&Ce,ue=Ce>>>13,me=0|ee[6],Te=8191&me,Ee=me>>>13,Ue=0|ee[7],De=8191&Ue,je=Ue>>>13,ge=0|ee[8],be=8191&ge,Se=ge>>>13,Ne=0|ee[9],Ye=8191&Ne,Ze=Ne>>>13,st=0|Q[0],ot=8191&st,ft=st>>>13,yt=0|Q[1],Et=8191&yt,Tt=yt>>>13,xt=0|Q[2],Dt=8191&xt,It=xt>>>13,Ft=0|Q[3],qt=8191&Ft,Nt=Ft>>>13,Je=0|Q[4],Ke=8191&Je,Ge=Je>>>13,nt=0|Q[5],ht=8191&nt,Oe=nt>>>13,Be=0|Q[6],Qe=8191&Be,ut=Be>>>13,pt=0|Q[7],bt=8191&pt,Lt=pt>>>13,Ct=0|Q[8],mt=8191&Ct,Ot=Ct>>>13,_t=0|Q[9],Pt=8191&_t,Bt=_t>>>13;N.negative=B.negative^G.negative,N.length=19;var Wt=(Y+(j=Math.imul(te,ot))|0)+((8191&(V=(V=Math.imul(te,ft))+Math.imul(ae,ot)|0))<<13)|0;Y=((H=Math.imul(ae,ft))+(V>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,j=Math.imul(se,ot),V=(V=Math.imul(se,ft))+Math.imul(fe,ot)|0,H=Math.imul(fe,ft);var Gt=(Y+(j=j+Math.imul(te,Et)|0)|0)+((8191&(V=(V=V+Math.imul(te,Tt)|0)+Math.imul(ae,Et)|0))<<13)|0;Y=((H=H+Math.imul(ae,Tt)|0)+(V>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,j=Math.imul(pe,ot),V=(V=Math.imul(pe,ft))+Math.imul(de,ot)|0,H=Math.imul(de,ft),j=j+Math.imul(se,Et)|0,V=(V=V+Math.imul(se,Tt)|0)+Math.imul(fe,Et)|0,H=H+Math.imul(fe,Tt)|0;var Xt=(Y+(j=j+Math.imul(te,Dt)|0)|0)+((8191&(V=(V=V+Math.imul(te,It)|0)+Math.imul(ae,Dt)|0))<<13)|0;Y=((H=H+Math.imul(ae,It)|0)+(V>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,j=Math.imul(xe,ot),V=(V=Math.imul(xe,ft))+Math.imul(Re,ot)|0,H=Math.imul(Re,ft),j=j+Math.imul(pe,Et)|0,V=(V=V+Math.imul(pe,Tt)|0)+Math.imul(de,Et)|0,H=H+Math.imul(de,Tt)|0,j=j+Math.imul(se,Dt)|0,V=(V=V+Math.imul(se,It)|0)+Math.imul(fe,Dt)|0,H=H+Math.imul(fe,It)|0;var Kt=(Y+(j=j+Math.imul(te,qt)|0)|0)+((8191&(V=(V=V+Math.imul(te,Nt)|0)+Math.imul(ae,qt)|0))<<13)|0;Y=((H=H+Math.imul(ae,Nt)|0)+(V>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,j=Math.imul(Ae,ot),V=(V=Math.imul(Ae,ft))+Math.imul(Me,ot)|0,H=Math.imul(Me,ft),j=j+Math.imul(xe,Et)|0,V=(V=V+Math.imul(xe,Tt)|0)+Math.imul(Re,Et)|0,H=H+Math.imul(Re,Tt)|0,j=j+Math.imul(pe,Dt)|0,V=(V=V+Math.imul(pe,It)|0)+Math.imul(de,Dt)|0,H=H+Math.imul(de,It)|0,j=j+Math.imul(se,qt)|0,V=(V=V+Math.imul(se,Nt)|0)+Math.imul(fe,qt)|0,H=H+Math.imul(fe,Nt)|0;var nn=(Y+(j=j+Math.imul(te,Ke)|0)|0)+((8191&(V=(V=V+Math.imul(te,Ge)|0)+Math.imul(ae,Ke)|0))<<13)|0;Y=((H=H+Math.imul(ae,Ge)|0)+(V>>>13)|0)+(nn>>>26)|0,nn&=67108863,j=Math.imul(ne,ot),V=(V=Math.imul(ne,ft))+Math.imul(ue,ot)|0,H=Math.imul(ue,ft),j=j+Math.imul(Ae,Et)|0,V=(V=V+Math.imul(Ae,Tt)|0)+Math.imul(Me,Et)|0,H=H+Math.imul(Me,Tt)|0,j=j+Math.imul(xe,Dt)|0,V=(V=V+Math.imul(xe,It)|0)+Math.imul(Re,Dt)|0,H=H+Math.imul(Re,It)|0,j=j+Math.imul(pe,qt)|0,V=(V=V+Math.imul(pe,Nt)|0)+Math.imul(de,qt)|0,H=H+Math.imul(de,Nt)|0,j=j+Math.imul(se,Ke)|0,V=(V=V+Math.imul(se,Ge)|0)+Math.imul(fe,Ke)|0,H=H+Math.imul(fe,Ge)|0;var yn=(Y+(j=j+Math.imul(te,ht)|0)|0)+((8191&(V=(V=V+Math.imul(te,Oe)|0)+Math.imul(ae,ht)|0))<<13)|0;Y=((H=H+Math.imul(ae,Oe)|0)+(V>>>13)|0)+(yn>>>26)|0,yn&=67108863,j=Math.imul(Te,ot),V=(V=Math.imul(Te,ft))+Math.imul(Ee,ot)|0,H=Math.imul(Ee,ft),j=j+Math.imul(ne,Et)|0,V=(V=V+Math.imul(ne,Tt)|0)+Math.imul(ue,Et)|0,H=H+Math.imul(ue,Tt)|0,j=j+Math.imul(Ae,Dt)|0,V=(V=V+Math.imul(Ae,It)|0)+Math.imul(Me,Dt)|0,H=H+Math.imul(Me,It)|0,j=j+Math.imul(xe,qt)|0,V=(V=V+Math.imul(xe,Nt)|0)+Math.imul(Re,qt)|0,H=H+Math.imul(Re,Nt)|0,j=j+Math.imul(pe,Ke)|0,V=(V=V+Math.imul(pe,Ge)|0)+Math.imul(de,Ke)|0,H=H+Math.imul(de,Ge)|0,j=j+Math.imul(se,ht)|0,V=(V=V+Math.imul(se,Oe)|0)+Math.imul(fe,ht)|0,H=H+Math.imul(fe,Oe)|0;var ln=(Y+(j=j+Math.imul(te,Qe)|0)|0)+((8191&(V=(V=V+Math.imul(te,ut)|0)+Math.imul(ae,Qe)|0))<<13)|0;Y=((H=H+Math.imul(ae,ut)|0)+(V>>>13)|0)+(ln>>>26)|0,ln&=67108863,j=Math.imul(De,ot),V=(V=Math.imul(De,ft))+Math.imul(je,ot)|0,H=Math.imul(je,ft),j=j+Math.imul(Te,Et)|0,V=(V=V+Math.imul(Te,Tt)|0)+Math.imul(Ee,Et)|0,H=H+Math.imul(Ee,Tt)|0,j=j+Math.imul(ne,Dt)|0,V=(V=V+Math.imul(ne,It)|0)+Math.imul(ue,Dt)|0,H=H+Math.imul(ue,It)|0,j=j+Math.imul(Ae,qt)|0,V=(V=V+Math.imul(Ae,Nt)|0)+Math.imul(Me,qt)|0,H=H+Math.imul(Me,Nt)|0,j=j+Math.imul(xe,Ke)|0,V=(V=V+Math.imul(xe,Ge)|0)+Math.imul(Re,Ke)|0,H=H+Math.imul(Re,Ge)|0,j=j+Math.imul(pe,ht)|0,V=(V=V+Math.imul(pe,Oe)|0)+Math.imul(de,ht)|0,H=H+Math.imul(de,Oe)|0,j=j+Math.imul(se,Qe)|0,V=(V=V+Math.imul(se,ut)|0)+Math.imul(fe,Qe)|0,H=H+Math.imul(fe,ut)|0;var kn=(Y+(j=j+Math.imul(te,bt)|0)|0)+((8191&(V=(V=V+Math.imul(te,Lt)|0)+Math.imul(ae,bt)|0))<<13)|0;Y=((H=H+Math.imul(ae,Lt)|0)+(V>>>13)|0)+(kn>>>26)|0,kn&=67108863,j=Math.imul(be,ot),V=(V=Math.imul(be,ft))+Math.imul(Se,ot)|0,H=Math.imul(Se,ft),j=j+Math.imul(De,Et)|0,V=(V=V+Math.imul(De,Tt)|0)+Math.imul(je,Et)|0,H=H+Math.imul(je,Tt)|0,j=j+Math.imul(Te,Dt)|0,V=(V=V+Math.imul(Te,It)|0)+Math.imul(Ee,Dt)|0,H=H+Math.imul(Ee,It)|0,j=j+Math.imul(ne,qt)|0,V=(V=V+Math.imul(ne,Nt)|0)+Math.imul(ue,qt)|0,H=H+Math.imul(ue,Nt)|0,j=j+Math.imul(Ae,Ke)|0,V=(V=V+Math.imul(Ae,Ge)|0)+Math.imul(Me,Ke)|0,H=H+Math.imul(Me,Ge)|0,j=j+Math.imul(xe,ht)|0,V=(V=V+Math.imul(xe,Oe)|0)+Math.imul(Re,ht)|0,H=H+Math.imul(Re,Oe)|0,j=j+Math.imul(pe,Qe)|0,V=(V=V+Math.imul(pe,ut)|0)+Math.imul(de,Qe)|0,H=H+Math.imul(de,ut)|0,j=j+Math.imul(se,bt)|0,V=(V=V+Math.imul(se,Lt)|0)+Math.imul(fe,bt)|0,H=H+Math.imul(fe,Lt)|0;var Wn=(Y+(j=j+Math.imul(te,mt)|0)|0)+((8191&(V=(V=V+Math.imul(te,Ot)|0)+Math.imul(ae,mt)|0))<<13)|0;Y=((H=H+Math.imul(ae,Ot)|0)+(V>>>13)|0)+(Wn>>>26)|0,Wn&=67108863,j=Math.imul(Ye,ot),V=(V=Math.imul(Ye,ft))+Math.imul(Ze,ot)|0,H=Math.imul(Ze,ft),j=j+Math.imul(be,Et)|0,V=(V=V+Math.imul(be,Tt)|0)+Math.imul(Se,Et)|0,H=H+Math.imul(Se,Tt)|0,j=j+Math.imul(De,Dt)|0,V=(V=V+Math.imul(De,It)|0)+Math.imul(je,Dt)|0,H=H+Math.imul(je,It)|0,j=j+Math.imul(Te,qt)|0,V=(V=V+Math.imul(Te,Nt)|0)+Math.imul(Ee,qt)|0,H=H+Math.imul(Ee,Nt)|0,j=j+Math.imul(ne,Ke)|0,V=(V=V+Math.imul(ne,Ge)|0)+Math.imul(ue,Ke)|0,H=H+Math.imul(ue,Ge)|0,j=j+Math.imul(Ae,ht)|0,V=(V=V+Math.imul(Ae,Oe)|0)+Math.imul(Me,ht)|0,H=H+Math.imul(Me,Oe)|0,j=j+Math.imul(xe,Qe)|0,V=(V=V+Math.imul(xe,ut)|0)+Math.imul(Re,Qe)|0,H=H+Math.imul(Re,ut)|0,j=j+Math.imul(pe,bt)|0,V=(V=V+Math.imul(pe,Lt)|0)+Math.imul(de,bt)|0,H=H+Math.imul(de,Lt)|0,j=j+Math.imul(se,mt)|0,V=(V=V+Math.imul(se,Ot)|0)+Math.imul(fe,mt)|0,H=H+Math.imul(fe,Ot)|0;var wn=(Y+(j=j+Math.imul(te,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(te,Bt)|0)+Math.imul(ae,Pt)|0))<<13)|0;Y=((H=H+Math.imul(ae,Bt)|0)+(V>>>13)|0)+(wn>>>26)|0,wn&=67108863,j=Math.imul(Ye,Et),V=(V=Math.imul(Ye,Tt))+Math.imul(Ze,Et)|0,H=Math.imul(Ze,Tt),j=j+Math.imul(be,Dt)|0,V=(V=V+Math.imul(be,It)|0)+Math.imul(Se,Dt)|0,H=H+Math.imul(Se,It)|0,j=j+Math.imul(De,qt)|0,V=(V=V+Math.imul(De,Nt)|0)+Math.imul(je,qt)|0,H=H+Math.imul(je,Nt)|0,j=j+Math.imul(Te,Ke)|0,V=(V=V+Math.imul(Te,Ge)|0)+Math.imul(Ee,Ke)|0,H=H+Math.imul(Ee,Ge)|0,j=j+Math.imul(ne,ht)|0,V=(V=V+Math.imul(ne,Oe)|0)+Math.imul(ue,ht)|0,H=H+Math.imul(ue,Oe)|0,j=j+Math.imul(Ae,Qe)|0,V=(V=V+Math.imul(Ae,ut)|0)+Math.imul(Me,Qe)|0,H=H+Math.imul(Me,ut)|0,j=j+Math.imul(xe,bt)|0,V=(V=V+Math.imul(xe,Lt)|0)+Math.imul(Re,bt)|0,H=H+Math.imul(Re,Lt)|0,j=j+Math.imul(pe,mt)|0,V=(V=V+Math.imul(pe,Ot)|0)+Math.imul(de,mt)|0,H=H+Math.imul(de,Ot)|0;var on=(Y+(j=j+Math.imul(se,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(se,Bt)|0)+Math.imul(fe,Pt)|0))<<13)|0;Y=((H=H+Math.imul(fe,Bt)|0)+(V>>>13)|0)+(on>>>26)|0,on&=67108863,j=Math.imul(Ye,Dt),V=(V=Math.imul(Ye,It))+Math.imul(Ze,Dt)|0,H=Math.imul(Ze,It),j=j+Math.imul(be,qt)|0,V=(V=V+Math.imul(be,Nt)|0)+Math.imul(Se,qt)|0,H=H+Math.imul(Se,Nt)|0,j=j+Math.imul(De,Ke)|0,V=(V=V+Math.imul(De,Ge)|0)+Math.imul(je,Ke)|0,H=H+Math.imul(je,Ge)|0,j=j+Math.imul(Te,ht)|0,V=(V=V+Math.imul(Te,Oe)|0)+Math.imul(Ee,ht)|0,H=H+Math.imul(Ee,Oe)|0,j=j+Math.imul(ne,Qe)|0,V=(V=V+Math.imul(ne,ut)|0)+Math.imul(ue,Qe)|0,H=H+Math.imul(ue,ut)|0,j=j+Math.imul(Ae,bt)|0,V=(V=V+Math.imul(Ae,Lt)|0)+Math.imul(Me,bt)|0,H=H+Math.imul(Me,Lt)|0,j=j+Math.imul(xe,mt)|0,V=(V=V+Math.imul(xe,Ot)|0)+Math.imul(Re,mt)|0,H=H+Math.imul(Re,Ot)|0;var _n=(Y+(j=j+Math.imul(pe,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(pe,Bt)|0)+Math.imul(de,Pt)|0))<<13)|0;Y=((H=H+Math.imul(de,Bt)|0)+(V>>>13)|0)+(_n>>>26)|0,_n&=67108863,j=Math.imul(Ye,qt),V=(V=Math.imul(Ye,Nt))+Math.imul(Ze,qt)|0,H=Math.imul(Ze,Nt),j=j+Math.imul(be,Ke)|0,V=(V=V+Math.imul(be,Ge)|0)+Math.imul(Se,Ke)|0,H=H+Math.imul(Se,Ge)|0,j=j+Math.imul(De,ht)|0,V=(V=V+Math.imul(De,Oe)|0)+Math.imul(je,ht)|0,H=H+Math.imul(je,Oe)|0,j=j+Math.imul(Te,Qe)|0,V=(V=V+Math.imul(Te,ut)|0)+Math.imul(Ee,Qe)|0,H=H+Math.imul(Ee,ut)|0,j=j+Math.imul(ne,bt)|0,V=(V=V+Math.imul(ne,Lt)|0)+Math.imul(ue,bt)|0,H=H+Math.imul(ue,Lt)|0,j=j+Math.imul(Ae,mt)|0,V=(V=V+Math.imul(Ae,Ot)|0)+Math.imul(Me,mt)|0,H=H+Math.imul(Me,Ot)|0;var fn=(Y+(j=j+Math.imul(xe,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(xe,Bt)|0)+Math.imul(Re,Pt)|0))<<13)|0;Y=((H=H+Math.imul(Re,Bt)|0)+(V>>>13)|0)+(fn>>>26)|0,fn&=67108863,j=Math.imul(Ye,Ke),V=(V=Math.imul(Ye,Ge))+Math.imul(Ze,Ke)|0,H=Math.imul(Ze,Ge),j=j+Math.imul(be,ht)|0,V=(V=V+Math.imul(be,Oe)|0)+Math.imul(Se,ht)|0,H=H+Math.imul(Se,Oe)|0,j=j+Math.imul(De,Qe)|0,V=(V=V+Math.imul(De,ut)|0)+Math.imul(je,Qe)|0,H=H+Math.imul(je,ut)|0,j=j+Math.imul(Te,bt)|0,V=(V=V+Math.imul(Te,Lt)|0)+Math.imul(Ee,bt)|0,H=H+Math.imul(Ee,Lt)|0,j=j+Math.imul(ne,mt)|0,V=(V=V+Math.imul(ne,Ot)|0)+Math.imul(ue,mt)|0,H=H+Math.imul(ue,Ot)|0;var hn=(Y+(j=j+Math.imul(Ae,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(Ae,Bt)|0)+Math.imul(Me,Pt)|0))<<13)|0;Y=((H=H+Math.imul(Me,Bt)|0)+(V>>>13)|0)+(hn>>>26)|0,hn&=67108863,j=Math.imul(Ye,ht),V=(V=Math.imul(Ye,Oe))+Math.imul(Ze,ht)|0,H=Math.imul(Ze,Oe),j=j+Math.imul(be,Qe)|0,V=(V=V+Math.imul(be,ut)|0)+Math.imul(Se,Qe)|0,H=H+Math.imul(Se,ut)|0,j=j+Math.imul(De,bt)|0,V=(V=V+Math.imul(De,Lt)|0)+Math.imul(je,bt)|0,H=H+Math.imul(je,Lt)|0,j=j+Math.imul(Te,mt)|0,V=(V=V+Math.imul(Te,Ot)|0)+Math.imul(Ee,mt)|0,H=H+Math.imul(Ee,Ot)|0;var In=(Y+(j=j+Math.imul(ne,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(ne,Bt)|0)+Math.imul(ue,Pt)|0))<<13)|0;Y=((H=H+Math.imul(ue,Bt)|0)+(V>>>13)|0)+(In>>>26)|0,In&=67108863,j=Math.imul(Ye,Qe),V=(V=Math.imul(Ye,ut))+Math.imul(Ze,Qe)|0,H=Math.imul(Ze,ut),j=j+Math.imul(be,bt)|0,V=(V=V+Math.imul(be,Lt)|0)+Math.imul(Se,bt)|0,H=H+Math.imul(Se,Lt)|0,j=j+Math.imul(De,mt)|0,V=(V=V+Math.imul(De,Ot)|0)+Math.imul(je,mt)|0,H=H+Math.imul(je,Ot)|0;var Cn=(Y+(j=j+Math.imul(Te,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(Te,Bt)|0)+Math.imul(Ee,Pt)|0))<<13)|0;Y=((H=H+Math.imul(Ee,Bt)|0)+(V>>>13)|0)+(Cn>>>26)|0,Cn&=67108863,j=Math.imul(Ye,bt),V=(V=Math.imul(Ye,Lt))+Math.imul(Ze,bt)|0,H=Math.imul(Ze,Lt),j=j+Math.imul(be,mt)|0,V=(V=V+Math.imul(be,Ot)|0)+Math.imul(Se,mt)|0,H=H+Math.imul(Se,Ot)|0;var Nn=(Y+(j=j+Math.imul(De,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(De,Bt)|0)+Math.imul(je,Pt)|0))<<13)|0;Y=((H=H+Math.imul(je,Bt)|0)+(V>>>13)|0)+(Nn>>>26)|0,Nn&=67108863,j=Math.imul(Ye,mt),V=(V=Math.imul(Ye,Ot))+Math.imul(Ze,mt)|0,H=Math.imul(Ze,Ot);var Hn=(Y+(j=j+Math.imul(be,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(be,Bt)|0)+Math.imul(Se,Pt)|0))<<13)|0;Y=((H=H+Math.imul(Se,Bt)|0)+(V>>>13)|0)+(Hn>>>26)|0,Hn&=67108863;var qn=(Y+(j=Math.imul(Ye,Pt))|0)+((8191&(V=(V=Math.imul(Ye,Bt))+Math.imul(Ze,Pt)|0))<<13)|0;return Y=((H=Math.imul(Ze,Bt))+(V>>>13)|0)+(qn>>>26)|0,qn&=67108863,X[0]=Wt,X[1]=Gt,X[2]=Xt,X[3]=Kt,X[4]=nn,X[5]=yn,X[6]=ln,X[7]=kn,X[8]=Wn,X[9]=wn,X[10]=on,X[11]=_n,X[12]=fn,X[13]=hn,X[14]=In,X[15]=Cn,X[16]=Nn,X[17]=Hn,X[18]=qn,Y!==0&&(X[19]=Y,N.length++),N};function k(B,G,N){return new h().mulp(B,G,N)}function h(B,G){this.x=B,this.y=G}Math.imul||(m=g),a.prototype.mulTo=function(B,G){var N,j=this.length+B.length;return N=this.length===10&&B.length===10?m(this,B,G):j<63?g(this,B,G):j<1024?function(V,H,ee){ee.negative=H.negative^V.negative,ee.length=V.length+H.length;for(var Q=0,X=0,Y=0;Y>>26)|0)>>>26,K&=67108863}ee.words[Y]=te,Q=K,K=X}return Q!==0?ee.words[Y]=Q:ee.length--,ee.strip()}(this,B,G):k(this,B,G),N},h.prototype.makeRBT=function(B){for(var G=new Array(B),N=a.prototype._countBits(B)-1,j=0;j>=1;return j},h.prototype.permute=function(B,G,N,j,V,H){for(var ee=0;ee>>=1)V++;return 1<>>=13,N[2*H+1]=8191&V,V>>>=13;for(H=2*G;H>=26,G+=j/67108864|0,G+=V>>>26,this.words[N]=67108863&V}return G!==0&&(this.words[N]=G,this.length++),this},a.prototype.muln=function(B){return this.clone().imuln(B)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(B){var G=function(H){for(var ee=new Array(H.bitLength()),Q=0;Q>>Y}return ee}(B);if(G.length===0)return new a(1);for(var N=this,j=0;j=0);var G,N=B%26,j=(B-N)/26,V=67108863>>>26-N<<26-N;if(N!==0){var H=0;for(G=0;G>>26-N}H&&(this.words[G]=H,this.length++)}if(j!==0){for(G=this.length-1;G>=0;G--)this.words[G+j]=this.words[G];for(G=0;G=0),j=G?(G-G%26)/26:0;var V=B%26,H=Math.min((B-V)/26,this.length),ee=67108863^67108863>>>V<H)for(this.length-=H,X=0;X=0&&(Y!==0||X>=j);X--){var K=0|this.words[X];this.words[X]=Y<<26-V|K>>>V,Y=K&ee}return Q&&Y!==0&&(Q.words[Q.length++]=Y),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(B,G,N){return n(this.negative===0),this.iushrn(B,G,N)},a.prototype.shln=function(B){return this.clone().ishln(B)},a.prototype.ushln=function(B){return this.clone().iushln(B)},a.prototype.shrn=function(B){return this.clone().ishrn(B)},a.prototype.ushrn=function(B){return this.clone().iushrn(B)},a.prototype.testn=function(B){n(typeof B=="number"&&B>=0);var G=B%26,N=(B-G)/26,j=1<=0);var G=B%26,N=(B-G)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=N)return this;if(G!==0&&N++,this.length=Math.min(N,this.length),G!==0){var j=67108863^67108863>>>G<=67108864;G++)this.words[G]-=67108864,G===this.length-1?this.words[G+1]=1:this.words[G+1]++;return this.length=Math.max(this.length,G+1),this},a.prototype.isubn=function(B){if(n(typeof B=="number"),n(B<67108864),B<0)return this.iaddn(-B);if(this.negative!==0)return this.negative=0,this.iaddn(B),this.negative=1,this;if(this.words[0]-=B,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var G=0;G>26)-(Q/67108864|0),this.words[j+N]=67108863&V}for(;j>26,this.words[j+N]=67108863&V;if(ee===0)return this.strip();for(n(ee===-1),ee=0,j=0;j>26,this.words[j]=67108863&V;return this.negative=1,this.strip()},a.prototype._wordDiv=function(B,G){var N=(this.length,B.length),j=this.clone(),V=B,H=0|V.words[V.length-1];(N=26-this._countBits(H))!=0&&(V=V.ushln(N),j.iushln(N),H=0|V.words[V.length-1]);var ee,Q=j.length-V.length;if(G!=="mod"){(ee=new a(null)).length=Q+1,ee.words=new Array(ee.length);for(var X=0;X=0;K--){var te=67108864*(0|j.words[V.length+K])+(0|j.words[V.length+K-1]);for(te=Math.min(te/H|0,67108863),j._ishlnsubmul(V,te,K);j.negative!==0;)te--,j.negative=0,j._ishlnsubmul(V,1,K),j.isZero()||(j.negative^=1);ee&&(ee.words[K]=te)}return ee&&ee.strip(),j.strip(),G!=="div"&&N!==0&&j.iushrn(N),{div:ee||null,mod:j}},a.prototype.divmod=function(B,G,N){return n(!B.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:this.negative!==0&&B.negative===0?(H=this.neg().divmod(B,G),G!=="mod"&&(j=H.div.neg()),G!=="div"&&(V=H.mod.neg(),N&&V.negative!==0&&V.iadd(B)),{div:j,mod:V}):this.negative===0&&B.negative!==0?(H=this.divmod(B.neg(),G),G!=="mod"&&(j=H.div.neg()),{div:j,mod:H.mod}):this.negative&B.negative?(H=this.neg().divmod(B.neg(),G),G!=="div"&&(V=H.mod.neg(),N&&V.negative!==0&&V.isub(B)),{div:H.div,mod:V}):B.length>this.length||this.cmp(B)<0?{div:new a(0),mod:this}:B.length===1?G==="div"?{div:this.divn(B.words[0]),mod:null}:G==="mod"?{div:null,mod:new a(this.modn(B.words[0]))}:{div:this.divn(B.words[0]),mod:new a(this.modn(B.words[0]))}:this._wordDiv(B,G);var j,V,H},a.prototype.div=function(B){return this.divmod(B,"div",!1).div},a.prototype.mod=function(B){return this.divmod(B,"mod",!1).mod},a.prototype.umod=function(B){return this.divmod(B,"mod",!0).mod},a.prototype.divRound=function(B){var G=this.divmod(B);if(G.mod.isZero())return G.div;var N=G.div.negative!==0?G.mod.isub(B):G.mod,j=B.ushrn(1),V=B.andln(1),H=N.cmp(j);return H<0||V===1&&H===0?G.div:G.div.negative!==0?G.div.isubn(1):G.div.iaddn(1)},a.prototype.modn=function(B){n(B<=67108863);for(var G=67108864%B,N=0,j=this.length-1;j>=0;j--)N=(G*N+(0|this.words[j]))%B;return N},a.prototype.idivn=function(B){n(B<=67108863);for(var G=0,N=this.length-1;N>=0;N--){var j=(0|this.words[N])+67108864*G;this.words[N]=j/B|0,G=j%B}return this.strip()},a.prototype.divn=function(B){return this.clone().idivn(B)},a.prototype.egcd=function(B){n(B.negative===0),n(!B.isZero());var G=this,N=B.clone();G=G.negative!==0?G.umod(B):G.clone();for(var j=new a(1),V=new a(0),H=new a(0),ee=new a(1),Q=0;G.isEven()&&N.isEven();)G.iushrn(1),N.iushrn(1),++Q;for(var X=N.clone(),Y=G.clone();!G.isZero();){for(var K=0,te=1;!(G.words[0]&te)&&K<26;++K,te<<=1);if(K>0)for(G.iushrn(K);K-- >0;)(j.isOdd()||V.isOdd())&&(j.iadd(X),V.isub(Y)),j.iushrn(1),V.iushrn(1);for(var ae=0,oe=1;!(N.words[0]&oe)&&ae<26;++ae,oe<<=1);if(ae>0)for(N.iushrn(ae);ae-- >0;)(H.isOdd()||ee.isOdd())&&(H.iadd(X),ee.isub(Y)),H.iushrn(1),ee.iushrn(1);G.cmp(N)>=0?(G.isub(N),j.isub(H),V.isub(ee)):(N.isub(G),H.isub(j),ee.isub(V))}return{a:H,b:ee,gcd:N.iushln(Q)}},a.prototype._invmp=function(B){n(B.negative===0),n(!B.isZero());var G=this,N=B.clone();G=G.negative!==0?G.umod(B):G.clone();for(var j,V=new a(1),H=new a(0),ee=N.clone();G.cmpn(1)>0&&N.cmpn(1)>0;){for(var Q=0,X=1;!(G.words[0]&X)&&Q<26;++Q,X<<=1);if(Q>0)for(G.iushrn(Q);Q-- >0;)V.isOdd()&&V.iadd(ee),V.iushrn(1);for(var Y=0,K=1;!(N.words[0]&K)&&Y<26;++Y,K<<=1);if(Y>0)for(N.iushrn(Y);Y-- >0;)H.isOdd()&&H.iadd(ee),H.iushrn(1);G.cmp(N)>=0?(G.isub(N),V.isub(H)):(N.isub(G),H.isub(V))}return(j=G.cmpn(1)===0?V:H).cmpn(0)<0&&j.iadd(B),j},a.prototype.gcd=function(B){if(this.isZero())return B.abs();if(B.isZero())return this.abs();var G=this.clone(),N=B.clone();G.negative=0,N.negative=0;for(var j=0;G.isEven()&&N.isEven();j++)G.iushrn(1),N.iushrn(1);for(;;){for(;G.isEven();)G.iushrn(1);for(;N.isEven();)N.iushrn(1);var V=G.cmp(N);if(V<0){var H=G;G=N,N=H}else if(V===0||N.cmpn(1)===0)break;G.isub(N)}return N.iushln(j)},a.prototype.invm=function(B){return this.egcd(B).a.umod(B)},a.prototype.isEven=function(){return(1&this.words[0])==0},a.prototype.isOdd=function(){return(1&this.words[0])==1},a.prototype.andln=function(B){return this.words[0]&B},a.prototype.bincn=function(B){n(typeof B=="number");var G=B%26,N=(B-G)/26,j=1<>>26,ee&=67108863,this.words[H]=ee}return V!==0&&(this.words[H]=V,this.length++),this},a.prototype.isZero=function(){return this.length===1&&this.words[0]===0},a.prototype.cmpn=function(B){var G,N=B<0;if(this.negative!==0&&!N)return-1;if(this.negative===0&&N)return 1;if(this.strip(),this.length>1)G=1;else{N&&(B=-B),n(B<=67108863,"Number is too big");var j=0|this.words[0];G=j===B?0:jB.length)return 1;if(this.length=0;N--){var j=0|this.words[N],V=0|B.words[N];if(j!==V){jV&&(G=1);break}}return G},a.prototype.gtn=function(B){return this.cmpn(B)===1},a.prototype.gt=function(B){return this.cmp(B)===1},a.prototype.gten=function(B){return this.cmpn(B)>=0},a.prototype.gte=function(B){return this.cmp(B)>=0},a.prototype.ltn=function(B){return this.cmpn(B)===-1},a.prototype.lt=function(B){return this.cmp(B)===-1},a.prototype.lten=function(B){return this.cmpn(B)<=0},a.prototype.lte=function(B){return this.cmp(B)<=0},a.prototype.eqn=function(B){return this.cmpn(B)===0},a.prototype.eq=function(B){return this.cmp(B)===0},a.red=function(B){return new R(B)},a.prototype.toRed=function(B){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),B.convertTo(this)._forceRed(B)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(B){return this.red=B,this},a.prototype.forceRed=function(B){return n(!this.red,"Already a number in reduction context"),this._forceRed(B)},a.prototype.redAdd=function(B){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,B)},a.prototype.redIAdd=function(B){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,B)},a.prototype.redSub=function(B){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,B)},a.prototype.redISub=function(B){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,B)},a.prototype.redShl=function(B){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,B)},a.prototype.redMul=function(B){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,B),this.red.mul(this,B)},a.prototype.redIMul=function(B){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,B),this.red.imul(this,B)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(B){return n(this.red&&!B.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,B)};var M={k256:null,p224:null,p192:null,p25519:null};function A(B,G){this.name=B,this.p=new a(G,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function C(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function L(){A.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function O(){A.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function I(){A.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function R(B){if(typeof B=="string"){var G=a._prime(B);this.m=G.p,this.prime=G}else n(B.gtn(1),"modulus must be greater than 1"),this.m=B,this.prime=null}function U(B){R.call(this,B),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}A.prototype._tmp=function(){var B=new a(null);return B.words=new Array(Math.ceil(this.n/13)),B},A.prototype.ireduce=function(B){var G,N=B;do this.split(N,this.tmp),G=(N=(N=this.imulK(N)).iadd(this.tmp)).bitLength();while(G>this.n);var j=G0?N.isub(this.p):N.strip!==void 0?N.strip():N._strip(),N},A.prototype.split=function(B,G){B.iushrn(this.n,0,G)},A.prototype.imulK=function(B){return B.imul(this.k)},o(C,A),C.prototype.split=function(B,G){for(var N=4194303,j=Math.min(B.length,9),V=0;V>>22,H=ee}H>>>=22,B.words[V-10]=H,H===0&&B.length>10?B.length-=10:B.length-=9},C.prototype.imulK=function(B){B.words[B.length]=0,B.words[B.length+1]=0,B.length+=2;for(var G=0,N=0;N>>=26,B.words[N]=V,G=j}return G!==0&&(B.words[B.length++]=G),B},a._prime=function(B){if(M[B])return M[B];var G;if(B==="k256")G=new C;else if(B==="p224")G=new L;else if(B==="p192")G=new O;else{if(B!=="p25519")throw new Error("Unknown prime "+B);G=new I}return M[B]=G,G},R.prototype._verify1=function(B){n(B.negative===0,"red works only with positives"),n(B.red,"red works only with red numbers")},R.prototype._verify2=function(B,G){n((B.negative|G.negative)==0,"red works only with positives"),n(B.red&&B.red===G.red,"red works only with red numbers")},R.prototype.imod=function(B){return this.prime?this.prime.ireduce(B)._forceRed(this):B.umod(this.m)._forceRed(this)},R.prototype.neg=function(B){return B.isZero()?B.clone():this.m.sub(B)._forceRed(this)},R.prototype.add=function(B,G){this._verify2(B,G);var N=B.add(G);return N.cmp(this.m)>=0&&N.isub(this.m),N._forceRed(this)},R.prototype.iadd=function(B,G){this._verify2(B,G);var N=B.iadd(G);return N.cmp(this.m)>=0&&N.isub(this.m),N},R.prototype.sub=function(B,G){this._verify2(B,G);var N=B.sub(G);return N.cmpn(0)<0&&N.iadd(this.m),N._forceRed(this)},R.prototype.isub=function(B,G){this._verify2(B,G);var N=B.isub(G);return N.cmpn(0)<0&&N.iadd(this.m),N},R.prototype.shl=function(B,G){return this._verify1(B),this.imod(B.ushln(G))},R.prototype.imul=function(B,G){return this._verify2(B,G),this.imod(B.imul(G))},R.prototype.mul=function(B,G){return this._verify2(B,G),this.imod(B.mul(G))},R.prototype.isqr=function(B){return this.imul(B,B.clone())},R.prototype.sqr=function(B){return this.mul(B,B)},R.prototype.sqrt=function(B){if(B.isZero())return B.clone();var G=this.m.andln(3);if(n(G%2==1),G===3){var N=this.m.add(new a(1)).iushrn(2);return this.pow(B,N)}for(var j=this.m.subn(1),V=0;!j.isZero()&&j.andln(1)===0;)V++,j.iushrn(1);n(!j.isZero());var H=new a(1).toRed(this),ee=H.redNeg(),Q=this.m.subn(1).iushrn(1),X=this.m.bitLength();for(X=new a(2*X*X).toRed(this);this.pow(X,Q).cmp(ee)!==0;)X.redIAdd(ee);for(var Y=this.pow(X,j),K=this.pow(B,j.addn(1).iushrn(1)),te=this.pow(B,j),ae=V;te.cmp(H)!==0;){for(var oe=te,se=0;oe.cmp(H)!==0;se++)oe=oe.redSqr();n(se=0;j--){for(var X=G.words[j],Y=Q-1;Y>=0;Y--){var K=X>>Y&1;V!==N[0]&&(V=this.sqr(V)),K!==0||H!==0?(H<<=1,H|=K,(++ee==4||j===0&&Y===0)&&(V=this.mul(V,N[H]),ee=0,H=0)):ee=0}Q=26}return V},R.prototype.convertTo=function(B){var G=B.umod(this.m);return G===B?G.clone():G},R.prototype.convertFrom=function(B){var G=B.clone();return G.red=null,G},a.mont=function(B){return new U(B)},o(U,R),U.prototype.convertTo=function(B){return this.imod(B.ushln(this.shift))},U.prototype.convertFrom=function(B){var G=this.imod(B.mul(this.rinv));return G.red=null,G},U.prototype.imul=function(B,G){if(B.isZero()||G.isZero())return B.words[0]=0,B.length=1,B;var N=B.imul(G),j=N.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),V=N.isub(j).iushrn(this.shift),H=V;return V.cmp(this.m)>=0?H=V.isub(this.m):V.cmpn(0)<0&&(H=V.iadd(this.m)),H._forceRed(this)},U.prototype.mul=function(B,G){if(B.isZero()||G.isZero())return new a(0)._forceRed(this);var N=B.mul(G),j=N.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),V=N.isub(j).iushrn(this.shift),H=V;return V.cmp(this.m)>=0?H=V.isub(this.m):V.cmpn(0)<0&&(H=V.iadd(this.m)),H._forceRed(this)},U.prototype.invm=function(B){return this.imod(B._invmp(this.m).mul(this.r2))._forceRed(this)}})(f=t.nmd(f),this)},2692:function(f){f.exports=function(l){var t,i,r,n=l.length,o=0;for(t=0;t>>1;if(!(M<=0)){var A,C=r.mallocDouble(2*M*k),L=r.mallocInt32(k);if((k=u(v,M,C,L))>0){if(M===1&&m)n.init(k),A=n.sweepComplete(M,g,0,k,C,L,0,k,C,L);else{var O=r.mallocDouble(2*M*h),I=r.mallocInt32(h);(h=u(x,M,O,I))>0&&(n.init(k+h),A=M===1?n.sweepBipartite(M,g,0,k,C,L,0,h,O,I):o(M,g,m,k,C,L,h,O,I),r.free(O),r.free(I))}r.free(C),r.free(L)}return A}}}function c(v,x){i.push([v,x])}function b(v){return i=[],p(v,v,c,!0),i}function d(v,x){return i=[],p(v,x,c,!1),i}},7333:function(f,l){function t(i){return i?function(r,n,o,a,u,p,c,b,d,v,x){return u-a>d-b?function(g,m,k,h,M,A,C,L,O,I,R){for(var U=2*g,B=h,G=U*h;Bv-d?a?function(m,k,h,M,A,C,L,O,I,R,U){for(var B=2*m,G=M,N=B*M;G0;){var Q=6*(H-=1),X=k[Q],Y=k[Q+1],K=k[Q+2],te=k[Q+3],ae=k[Q+4],oe=k[Q+5],se=2*H,fe=h[se],ye=h[se+1],pe=1&oe,de=!!(16&oe),he=U,xe=B,Re=N,we=j;if(pe&&(he=N,xe=j,Re=U,we=B),!(2&oe&&(K=v(L,X,Y,K,he,xe,ye),Y>=K)||4&oe&&(Y=x(L,X,Y,K,he,xe,fe))>=K)){var Ae=K-Y,Me=ae-te;if(de){if(L*Ae*(Ae+Me)<4194304){if((V=u.scanComplete(L,X,O,Y,K,he,xe,te,ae,Re,we))!==void 0)return V;continue}}else{if(L*Math.min(Ae,Me)<128){if((V=o(L,X,O,pe,Y,K,he,xe,te,ae,Re,we))!==void 0)return V;continue}if(L*Ae*Me<4194304){if((V=u.scanBipartite(L,X,O,pe,Y,K,he,xe,te,ae,Re,we))!==void 0)return V;continue}}var Ce=b(L,X,Y,K,he,xe,fe,ye);if(Y=p0)&&!(p1>=hi)"),d=c("lo===p0"),v=c("lo>>1,x=2*n,g=v,m=p[x*v+o];b=C?(g=A,m=C):M>=O?(g=h,m=M):(g=L,m=O):C>=O?(g=A,m=C):O>=M?(g=h,m=M):(g=L,m=O);for(var I=x*(d-1),R=x*g,U=0;Ua&&p[m+o]>x;--g,m-=b){for(var k=m,h=m+b,M=0;Mx;++x,c+=p)if(o[c+v]===u)if(d===x)d+=1,b+=p;else{for(var g=0;p>g;++g){var m=o[c+g];o[c+g]=o[b],o[b++]=m}var k=a[x];a[x]=a[d],a[d++]=k}return d},"lox;++x,c+=p)if(o[c+v]g;++g){var m=o[c+g];o[c+g]=o[b],o[b++]=m}var k=a[x];a[x]=a[d],a[d++]=k}return d},"lo<=p0":function(t,i,r,n,o,a,u){for(var p=2*t,c=p*r,b=c,d=r,v=t+i,x=r;n>x;++x,c+=p)if(o[c+v]<=u)if(d===x)d+=1,b+=p;else{for(var g=0;p>g;++g){var m=o[c+g];o[c+g]=o[b],o[b++]=m}var k=a[x];a[x]=a[d],a[d++]=k}return d},"hi<=p0":function(t,i,r,n,o,a,u){for(var p=2*t,c=p*r,b=c,d=r,v=t+i,x=r;n>x;++x,c+=p)if(o[c+v]<=u)if(d===x)d+=1,b+=p;else{for(var g=0;p>g;++g){var m=o[c+g];o[c+g]=o[b],o[b++]=m}var k=a[x];a[x]=a[d],a[d++]=k}return d},"log;++g,c+=p){var m=o[c+v],k=o[c+x];if(mh;++h){var M=o[c+h];o[c+h]=o[b],o[b++]=M}var A=a[g];a[g]=a[d],a[d++]=A}}return d},"lo<=p0&&p0<=hi":function(t,i,r,n,o,a,u){for(var p=2*t,c=p*r,b=c,d=r,v=i,x=t+i,g=r;n>g;++g,c+=p){var m=o[c+v],k=o[c+x];if(m<=u&&u<=k)if(d===g)d+=1,b+=p;else{for(var h=0;p>h;++h){var M=o[c+h];o[c+h]=o[b],o[b++]=M}var A=a[g];a[g]=a[d],a[d++]=A}}return d},"!(lo>=p0)&&!(p1>=hi)":function(t,i,r,n,o,a,u,p){for(var c=2*t,b=c*r,d=b,v=r,x=i,g=t+i,m=r;n>m;++m,b+=c){var k=o[b+x],h=o[b+g];if(!(k>=u||p>=h))if(v===m)v+=1,d+=c;else{for(var M=0;c>M;++M){var A=o[b+M];o[b+M]=o[d],o[d++]=A}var C=a[m];a[m]=a[v],a[v++]=C}}return v}}},309:function(f){function l(p,c,b){for(var d=2*(p+1),v=p+1;v<=c;++v){for(var x=b[d++],g=b[d++],m=v,k=d-2;m-- >p;){var h=b[k-2],M=b[k-1];if(hb[c+1])}function a(p,c,b,d){var v=d[p*=2];return v>1,m=g-d,k=g+d,h=v,M=m,A=g,C=k,L=x,O=p+1,I=c-1,R=0;o(h,M,b)&&(R=h,h=M,M=R),o(C,L,b)&&(R=C,C=L,L=R),o(h,A,b)&&(R=h,h=A,A=R),o(M,A,b)&&(R=M,M=A,A=R),o(h,C,b)&&(R=h,h=C,C=R),o(A,C,b)&&(R=A,A=C,C=R),o(M,L,b)&&(R=M,M=L,L=R),o(M,A,b)&&(R=M,M=A,A=R),o(C,L,b)&&(R=C,C=L,L=R);for(var U=b[2*M],B=b[2*M+1],G=b[2*C],N=b[2*C+1],j=2*h,V=2*A,H=2*L,ee=2*v,Q=2*g,X=2*x,Y=0;Y<2;++Y){var K=b[j+Y],te=b[V+Y],ae=b[H+Y];b[ee+Y]=K,b[Q+Y]=te,b[X+Y]=ae}i(m,p,b),i(k,c,b);for(var oe=O;oe<=I;++oe)if(a(oe,U,B,b))oe!==O&&t(oe,O,b),++O;else if(!a(oe,G,N,b))for(;;){if(a(I,G,N,b)){a(I,U,B,b)?(r(oe,O,I,b),++O,--I):(t(oe,I,b),--I);break}if(--I>>1;n(x,X);var Y=0,K=0;for(V=0;V=o)g(c,b,K--,te=te-o|0);else if(te>=0)g(u,p,Y--,te);else if(te<=-268435456){te=-te-o|0;for(var ae=0;ae>>1;n(x,X);var Y=0,K=0,te=0;for(V=0;V>1==x[2*V+3]>>1&&(oe=2,V+=1),ae<0){for(var se=-(ae>>1)-1,fe=0;fe>1)-1,oe===0?g(u,p,Y--,se):oe===1?g(c,b,K--,se):oe===2&&g(d,v,te--,se)}},scanBipartite:function(k,h,M,A,C,L,O,I,R,U,B,G){var N=0,j=2*k,V=h,H=h+k,ee=1,Q=1;A?Q=o:ee=o;for(var X=C;X>>1;n(x,ae);var oe=0;for(X=0;X=o?(fe=!A,Y-=o):(fe=!!A,Y-=1),fe)m(u,p,oe++,Y);else{var ye=G[Y],pe=j*Y,de=B[pe+h+1],he=B[pe+h+1+k];e:for(var xe=0;xe>>1;n(x,Y);var K=0;for(H=0;H=o)u[K++]=ee-o;else{var ae=B[ee-=1],oe=N*ee,se=U[oe+h+1],fe=U[oe+h+1+k];e:for(var ye=0;ye=0;--ye)if(u[ye]===ee){for(xe=ye+1;xe0;){for(var m=a.pop(),k=(v=-1,x=-1,b=p[c=a.pop()],1);k=0||(o.flip(c,m),r(n,o,a,v,c,x),r(n,o,a,c,x,v),r(n,o,a,x,m,v),r(n,o,a,m,v,x))}}},7098:function(f,l,t){var i,r=t(5070);function n(a,u,p,c,b,d,v){this.cells=a,this.neighbor=u,this.flags=c,this.constraint=p,this.active=b,this.next=d,this.boundary=v}function o(a,u){return a[0]-u[0]||a[1]-u[1]||a[2]-u[2]}f.exports=function(a,u,p){var c=function(O,I){for(var R=O.cells(),U=R.length,B=0;B0||v.length>0;){for(;d.length>0;){var h=d.pop();if(x[h]!==-b){x[h]=b,g[h];for(var M=0;M<3;++M){var A=k[3*h+M];A>=0&&x[A]===0&&(m[3*h+M]?v.push(A):(d.push(A),x[A]=b))}}}var C=v;v=d,d=C,v.length=0,b=-b}var L=function(O,I,R){for(var U=0,B=0;B1&&r(g[L[O-2]],g[L[O-1]],m)>0;)v.push([L[O-1],L[O-2],k]),O-=1;L.length=O,L.push(k);var I=C.upperIds;for(O=I.length;O>1&&r(g[I[O-2]],g[I[O-1]],m)<0;)v.push([I[O-2],I[O-1],k]),O-=1;I.length=O,I.push(k)}}function c(v,x){var g;return(g=v.a[0]C[0]&&k.push(new o(C,A,2,h),new o(A,C,1,h))}k.sort(a);for(var L=k[0].a[0]-(1+Math.abs(k[0].a[0]))*Math.pow(2,-52),O=[new n([L,1],[L,0],-1,[],[])],I=[],R=(h=0,k.length);h=0}}(),n.removeTriangle=function(a,u,p){var c=this.stars;o(c[a],u,p),o(c[u],p,a),o(c[p],a,u)},n.addTriangle=function(a,u,p){var c=this.stars;c[a].push(u,p),c[u].push(p,a),c[p].push(a,u)},n.opposite=function(a,u){for(var p=this.stars[u],c=1,b=p.length;cA[2]?1:0)}function k(M,A,C){if(M.length!==0){if(A)for(var L=0;L=0;--H){var se=G[ee=(we=j[H])[0]],fe=se[0],ye=se[1],pe=B[fe],de=B[ye];if((pe[0]-de[0]||pe[1]-de[1])<0){var he=fe;fe=ye,ye=he}se[0]=fe;var xe,Re=se[1]=we[1];for(V&&(xe=se[2]);H>0&&j[H-1][0]===ee;){var we,Ae=(we=j[--H])[1];V?G.push([Re,Ae,xe]):G.push([Re,Ae]),Re=Ae}V?G.push([Re,ye,xe]):G.push([Re,ye])}return Q}(M,A,O,I,C),U=x(M,R);return k(A,U,C),!!U||O.length>0||I.length>0}},5528:function(f,l,t){f.exports=function(b,d,v,x){var g=a(d,b),m=a(x,v),k=c(g,m);if(o(k)===0)return null;var h=c(m,a(b,v)),M=r(h,k),A=p(g,M);return u(b,A)};var i=t(3962),r=t(9189),n=t(4354),o=t(4951),a=t(6695),u=t(7584),p=t(4469);function c(b,d){return n(i(b[0],d[1]),i(b[1],d[0]))}},5692:function(f){f.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},9156:function(f,l,t){var i=t(5692),r=t(3578);function n(u){return[u[0]/255,u[1]/255,u[2]/255,u[3]]}function o(u){for(var p,c="#",b=0;b<3;++b)c+=("00"+(p=(p=u[b]).toString(16))).substr(p.length);return c}function a(u){return"rgba("+u.join(",")+")"}f.exports=function(u){var p,c,b,d,v,x,g,m,k,h;if(u||(u={}),m=(u.nshades||72)-1,g=u.format||"hex",(x=u.colormap)||(x="jet"),typeof x=="string"){if(x=x.toLowerCase(),!i[x])throw Error(x+" not a supported colorscale");v=i[x]}else{if(!Array.isArray(x))throw Error("unsupported colormap option",x);v=x.slice()}if(v.length>m+1)throw new Error(x+" map requires nshades to be at least size "+v.length);k=Array.isArray(u.alpha)?u.alpha.length!==2?[1,1]:u.alpha.slice():typeof u.alpha=="number"?[u.alpha,u.alpha]:[1,1],p=v.map(function(O){return Math.round(O.index*m)}),k[0]=Math.min(Math.max(k[0],0),1),k[1]=Math.min(Math.max(k[1],0),1);var M=v.map(function(O,I){var R=v[I].index,U=v[I].rgb.slice();return U.length===4&&U[3]>=0&&U[3]<=1||(U[3]=k[0]+(k[1]-k[0])*R),U}),A=[];for(h=0;h0||u(p,c,d)?-1:1:x===0?g>0||u(p,c,b)?1:-1:r(g-x)}var k=i(p,c,b);return k>0?v>0&&i(p,c,d)>0?1:-1:k<0?v>0||i(p,c,d)>0?1:-1:i(p,c,d)>0||u(p,c,b)?1:-1};var i=t(417),r=t(7538),n=t(87),o=t(2019),a=t(9662);function u(p,c,b){var d=n(p[0],-c[0]),v=n(p[1],-c[1]),x=n(b[0],-c[0]),g=n(b[1],-c[1]),m=a(o(d,x),o(v,g));return m[m.length-1]>=0}},7538:function(f){f.exports=function(l){return l<0?-1:l>0?1:0}},9209:function(f){f.exports=function(i,r){var n=i.length,o=i.length-r.length;if(o)return o;switch(n){case 0:return 0;case 1:return i[0]-r[0];case 2:return i[0]+i[1]-r[0]-r[1]||l(i[0],i[1])-l(r[0],r[1]);case 3:var a=i[0]+i[1],u=r[0]+r[1];if(o=a+i[2]-(u+r[2]))return o;var p=l(i[0],i[1]),c=l(r[0],r[1]);return l(p,i[2])-l(c,r[2])||l(p+i[2],a)-l(c+r[2],u);case 4:var b=i[0],d=i[1],v=i[2],x=i[3],g=r[0],m=r[1],k=r[2],h=r[3];return b+d+v+x-(g+m+k+h)||l(b,d,v,x)-l(g,m,k,h,g)||l(b+d,b+v,b+x,d+v,d+x,v+x)-l(g+m,g+k,g+h,m+k,m+h,k+h)||l(b+d+v,b+d+x,b+v+x,d+v+x)-l(g+m+k,g+m+h,g+k+h,m+k+h);default:for(var M=i.slice().sort(t),A=r.slice().sort(t),C=0;Cl[i][0]&&(i=r);return ti?[[i],[t]]:[[t]]}},8722:function(f,l,t){f.exports=function(r){var n=i(r),o=n.length;if(o<=2)return[];for(var a=new Array(o),u=n[o-1],p=0;p=b[h]&&(k+=1);g[m]=k}}return c}(i(u,!0),a)}};var i=t(2183),r=t(2153)},9680:function(f){f.exports=function(l,t,i,r,n,o){var a=n-1,u=n*n,p=a*a,c=(1+2*n)*p,b=n*p,d=u*(3-2*n),v=u*a;if(l.length){o||(o=new Array(l.length));for(var x=l.length-1;x>=0;--x)o[x]=c*l[x]+b*t[x]+d*i[x]+v*r[x];return o}return c*l+b*t+d*i+v*r},f.exports.derivative=function(l,t,i,r,n,o){var a=6*n*n-6*n,u=3*n*n-4*n+1,p=-6*n*n+6*n,c=3*n*n-2*n;if(l.length){o||(o=new Array(l.length));for(var b=l.length-1;b>=0;--b)o[b]=a*l[b]+u*t[b]+p*i[b]+c*r[b];return o}return a*l+u*t+p*i[b]+c*r}},4419:function(f,l,t){var i=t(2183),r=t(1215);function n(a,u){this.point=a,this.index=u}function o(a,u){for(var p=a.point,c=u.point,b=p.length,d=0;d=2)return!1;R[B]=G}return!0}):I.filter(function(R){for(var U=0;U<=c;++U){var B=A[R[U]];if(B<0)return!1;R[U]=B}return!0}),1&c)for(v=0;v>>31},f.exports.exponent=function(n){return(f.exports.hi(n)<<1>>>21)-1023},f.exports.fraction=function(n){var o=f.exports.lo(n),a=f.exports.hi(n),u=1048575&a;return 2146435072&a&&(u+=1048576),[o,u]},f.exports.denormalized=function(n){return!(2146435072&f.exports.hi(n))}},3094:function(f){function l(t,i,r){var n=0|t[r];if(n<=0)return[];var o,a=new Array(n);if(r===t.length-1)for(o=0;o0)return function(r,n){var o,a;for(o=new Array(r),a=0;a=b-1){h=x.length-1;var A=p-c[b-1];for(M=0;M=b-1)for(var k=x.length-1,h=(c[b-1],0);h=0;--b)if(p[--c])return!1;return!0},a.jump=function(p){var c=this.lastT(),b=this.dimension;if(!(p0;--M)d.push(n(m[M-1],k[M-1],arguments[M])),v.push(0)}},a.push=function(p){var c=this.lastT(),b=this.dimension;if(!(p1e-6?1/g:0;this._time.push(p);for(var A=b;A>0;--A){var C=n(k[A-1],h[A-1],arguments[A]);d.push(C),v.push((C-d[x++])*M)}}},a.set=function(p){var c=this.dimension;if(!(p0;--m)b.push(n(x[m-1],g[m-1],arguments[m])),d.push(0)}},a.move=function(p){var c=this.lastT(),b=this.dimension;if(!(p<=c||arguments.length!==b+1)){var d=this._state,v=this._velocity,x=d.length-this.dimension,g=this.bounds,m=g[0],k=g[1],h=p-c,M=h>1e-6?1/h:0;this._time.push(p);for(var A=b;A>0;--A){var C=arguments[A];d.push(n(m[A-1],k[A-1],d[x++]+C)),v.push(C*M)}}},a.idle=function(p){var c=this.lastT();if(!(p=0;--M)d.push(n(m[M],k[M],d[x]+h*v[x])),v.push(0),x+=1}}},7080:function(f){function l(x,g,m,k,h,M){this._color=x,this.key=g,this.value=m,this.left=k,this.right=h,this._count=M}function t(x){return new l(x._color,x.key,x.value,x.left,x.right,x._count)}function i(x,g){return new l(x,g.key,g.value,g.left,g.right,g._count)}function r(x){x._count=1+(x.left?x.left._count:0)+(x.right?x.right._count:0)}function n(x,g){this._compare=x,this.root=g}f.exports=function(x){return new n(x||v,null)};var o=n.prototype;function a(x,g){var m;return g.left&&(m=a(x,g.left))?m:(m=x(g.key,g.value))||(g.right?a(x,g.right):void 0)}function u(x,g,m,k){if(g(x,k.key)<=0){var h;if(k.left&&(h=u(x,g,m,k.left))||(h=m(k.key,k.value)))return h}if(k.right)return u(x,g,m,k.right)}function p(x,g,m,k,h){var M,A=m(x,h.key),C=m(g,h.key);if(A<=0&&(h.left&&(M=p(x,g,m,k,h.left))||C>0&&(M=k(h.key,h.value))))return M;if(C>0&&h.right)return p(x,g,m,k,h.right)}function c(x,g){this.tree=x,this._stack=g}Object.defineProperty(o,"keys",{get:function(){var x=[];return this.forEach(function(g,m){x.push(g)}),x}}),Object.defineProperty(o,"values",{get:function(){var x=[];return this.forEach(function(g,m){x.push(m)}),x}}),Object.defineProperty(o,"length",{get:function(){return this.root?this.root._count:0}}),o.insert=function(x,g){for(var m=this._compare,k=this.root,h=[],M=[];k;){var A=m(x,k.key);h.push(k),M.push(A),k=A<=0?k.left:k.right}h.push(new l(0,x,g,null,null,1));for(var C=h.length-2;C>=0;--C)k=h[C],M[C]<=0?h[C]=new l(k._color,k.key,k.value,h[C+1],k.right,k._count+1):h[C]=new l(k._color,k.key,k.value,k.left,h[C+1],k._count+1);for(C=h.length-1;C>1;--C){var L=h[C-1];if(k=h[C],L._color===1||k._color===1)break;var O=h[C-2];if(O.left===L)if(L.left===k){if(!(I=O.right)||I._color!==0){O._color=0,O.left=L.right,L._color=1,L.right=O,h[C-2]=L,h[C-1]=k,r(O),r(L),C>=3&&((R=h[C-3]).left===O?R.left=L:R.right=L);break}L._color=1,O.right=i(1,I),O._color=0,C-=1}else{if(!(I=O.right)||I._color!==0){L.right=k.left,O._color=0,O.left=k.right,k._color=1,k.left=L,k.right=O,h[C-2]=k,h[C-1]=L,r(O),r(L),r(k),C>=3&&((R=h[C-3]).left===O?R.left=k:R.right=k);break}L._color=1,O.right=i(1,I),O._color=0,C-=1}else if(L.right===k){if(!(I=O.left)||I._color!==0){O._color=0,O.right=L.left,L._color=1,L.left=O,h[C-2]=L,h[C-1]=k,r(O),r(L),C>=3&&((R=h[C-3]).right===O?R.right=L:R.left=L);break}L._color=1,O.left=i(1,I),O._color=0,C-=1}else{var I;if(!(I=O.left)||I._color!==0){var R;L.left=k.right,O._color=0,O.right=k.left,k._color=1,k.right=L,k.left=O,h[C-2]=k,h[C-1]=L,r(O),r(L),r(k),C>=3&&((R=h[C-3]).right===O?R.right=k:R.left=k);break}L._color=1,O.left=i(1,I),O._color=0,C-=1}}return h[0]._color=1,new n(m,h[0])},o.forEach=function(x,g,m){if(this.root)switch(arguments.length){case 1:return a(x,this.root);case 2:return u(g,this._compare,x,this.root);case 3:return this._compare(g,m)>=0?void 0:p(g,m,this._compare,x,this.root)}},Object.defineProperty(o,"begin",{get:function(){for(var x=[],g=this.root;g;)x.push(g),g=g.left;return new c(this,x)}}),Object.defineProperty(o,"end",{get:function(){for(var x=[],g=this.root;g;)x.push(g),g=g.right;return new c(this,x)}}),o.at=function(x){if(x<0)return new c(this,[]);for(var g=this.root,m=[];;){if(m.push(g),g.left){if(x=g.right._count)break;g=g.right}return new c(this,[])},o.ge=function(x){for(var g=this._compare,m=this.root,k=[],h=0;m;){var M=g(x,m.key);k.push(m),M<=0&&(h=k.length),m=M<=0?m.left:m.right}return k.length=h,new c(this,k)},o.gt=function(x){for(var g=this._compare,m=this.root,k=[],h=0;m;){var M=g(x,m.key);k.push(m),M<0&&(h=k.length),m=M<0?m.left:m.right}return k.length=h,new c(this,k)},o.lt=function(x){for(var g=this._compare,m=this.root,k=[],h=0;m;){var M=g(x,m.key);k.push(m),M>0&&(h=k.length),m=M<=0?m.left:m.right}return k.length=h,new c(this,k)},o.le=function(x){for(var g=this._compare,m=this.root,k=[],h=0;m;){var M=g(x,m.key);k.push(m),M>=0&&(h=k.length),m=M<0?m.left:m.right}return k.length=h,new c(this,k)},o.find=function(x){for(var g=this._compare,m=this.root,k=[];m;){var h=g(x,m.key);if(k.push(m),h===0)return new c(this,k);m=h<=0?m.left:m.right}return new c(this,[])},o.remove=function(x){var g=this.find(x);return g?g.remove():this},o.get=function(x){for(var g=this._compare,m=this.root;m;){var k=g(x,m.key);if(k===0)return m.value;m=k<=0?m.left:m.right}};var b=c.prototype;function d(x,g){x.key=g.key,x.value=g.value,x.left=g.left,x.right=g.right,x._color=g._color,x._count=g._count}function v(x,g){return xg?1:0}Object.defineProperty(b,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(b,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),b.clone=function(){return new c(this.tree,this._stack.slice())},b.remove=function(){var x=this._stack;if(x.length===0)return this.tree;var g=new Array(x.length),m=x[x.length-1];g[g.length-1]=new l(m._color,m.key,m.value,m.left,m.right,m._count);for(var k=x.length-2;k>=0;--k)(m=x[k]).left===x[k+1]?g[k]=new l(m._color,m.key,m.value,g[k+1],m.right,m._count):g[k]=new l(m._color,m.key,m.value,m.left,g[k+1],m._count);if((m=g[g.length-1]).left&&m.right){var h=g.length;for(m=m.left;m.right;)g.push(m),m=m.right;var M=g[h-1];for(g.push(new l(m._color,M.key,M.value,m.left,m.right,m._count)),g[h-1].key=m.key,g[h-1].value=m.value,k=g.length-2;k>=h;--k)m=g[k],g[k]=new l(m._color,m.key,m.value,m.left,g[k+1],m._count);g[h-1].left=g[h]}if((m=g[g.length-1])._color===0){var A=g[g.length-2];for(A.left===m?A.left=null:A.right===m&&(A.right=null),g.pop(),k=0;k=0;--B){if(O=L[B],B===0)return void(O._color=1);if((I=L[B-1]).left===O){if((R=I.right).right&&R.right._color===0)return U=(R=I.right=t(R)).right=t(R.right),I.right=R.left,R.left=I,R.right=U,R._color=I._color,O._color=1,I._color=1,U._color=1,r(I),r(R),B>1&&((G=L[B-2]).left===I?G.left=R:G.right=R),void(L[B-1]=R);if(R.left&&R.left._color===0)return U=(R=I.right=t(R)).left=t(R.left),I.right=U.left,R.left=U.right,U.left=I,U.right=R,U._color=I._color,I._color=1,R._color=1,O._color=1,r(I),r(R),r(U),B>1&&((G=L[B-2]).left===I?G.left=U:G.right=U),void(L[B-1]=U);if(R._color===1){if(I._color===0)return I._color=1,void(I.right=i(0,R));I.right=i(0,R);continue}R=t(R),I.right=R.left,R.left=I,R._color=I._color,I._color=0,r(I),r(R),B>1&&((G=L[B-2]).left===I?G.left=R:G.right=R),L[B-1]=R,L[B]=I,B+11&&((G=L[B-2]).right===I?G.right=R:G.left=R),void(L[B-1]=R);if(R.right&&R.right._color===0)return U=(R=I.left=t(R)).right=t(R.right),I.left=U.right,R.right=U.left,U.right=I,U.left=R,U._color=I._color,I._color=1,R._color=1,O._color=1,r(I),r(R),r(U),B>1&&((G=L[B-2]).right===I?G.right=U:G.left=U),void(L[B-1]=U);if(R._color===1){if(I._color===0)return I._color=1,void(I.left=i(0,R));I.left=i(0,R);continue}var G;R=t(R),I.left=R.right,R.right=I,R._color=I._color,I._color=0,r(I),r(R),B>1&&((G=L[B-2]).right===I?G.right=R:G.left=R),L[B-1]=R,L[B]=I,B+10)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(b,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(b,"index",{get:function(){var x=0,g=this._stack;if(g.length===0){var m=this.tree.root;return m?m._count:0}g[g.length-1].left&&(x=g[g.length-1].left._count);for(var k=g.length-2;k>=0;--k)g[k+1]===g[k].right&&(++x,g[k].left&&(x+=g[k].left._count));return x},enumerable:!0}),b.next=function(){var x=this._stack;if(x.length!==0){var g=x[x.length-1];if(g.right)for(g=g.right;g;)x.push(g),g=g.left;else for(x.pop();x.length>0&&x[x.length-1].right===g;)g=x[x.length-1],x.pop()}},Object.defineProperty(b,"hasNext",{get:function(){var x=this._stack;if(x.length===0)return!1;if(x[x.length-1].right)return!0;for(var g=x.length-1;g>0;--g)if(x[g-1].left===x[g])return!0;return!1}}),b.update=function(x){var g=this._stack;if(g.length===0)throw new Error("Can't update empty node!");var m=new Array(g.length),k=g[g.length-1];m[m.length-1]=new l(k._color,k.key,x,k.left,k.right,k._count);for(var h=g.length-2;h>=0;--h)(k=g[h]).left===g[h+1]?m[h]=new l(k._color,k.key,k.value,m[h+1],k.right,k._count):m[h]=new l(k._color,k.key,k.value,k.left,m[h+1],k._count);return new n(this.tree._compare,m[0])},b.prev=function(){var x=this._stack;if(x.length!==0){var g=x[x.length-1];if(g.left)for(g=g.left;g;)x.push(g),g=g.right;else for(x.pop();x.length>0&&x[x.length-1].left===g;)g=x[x.length-1],x.pop()}},Object.defineProperty(b,"hasPrev",{get:function(){var x=this._stack;if(x.length===0)return!1;if(x[x.length-1].left)return!0;for(var g=x.length-1;g>0;--g)if(x[g-1].right===x[g])return!0;return!1}})},7453:function(f,l,t){f.exports=function(A,C){var L=new c(A);return L.update(C),L};var i=t(9557),r=t(1681),n=t(1011),o=t(2864),a=t(8468),u=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function p(A,C){return A[0]=C[0],A[1]=C[1],A[2]=C[2],A}function c(A){this.gl=A,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.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",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=n(A)}var b=c.prototype;function d(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}b.update=function(A){function C(ee,Q,X){if(X in A){var Y,K=A[X],te=this[X];(ee?Array.isArray(K)&&Array.isArray(K[0]):Array.isArray(K))?this[X]=Y=[Q(K[0]),Q(K[1]),Q(K[2])]:this[X]=Y=[Q(K),Q(K),Q(K)];for(var ae=0;ae<3;++ae)if(Y[ae]!==te[ae])return!0}return!1}A=A||{};var L,O=C.bind(this,!1,Number),I=C.bind(this,!1,Boolean),R=C.bind(this,!1,String),U=C.bind(this,!0,function(ee){if(Array.isArray(ee)){if(ee.length===3)return[+ee[0],+ee[1],+ee[2],1];if(ee.length===4)return[+ee[0],+ee[1],+ee[2],+ee[3]]}return[0,0,0,1]}),B=!1,G=!1;if("bounds"in A)for(var N=A.bounds,j=0;j<2;++j)for(var V=0;V<3;++V)N[j][V]!==this.bounds[j][V]&&(G=!0),this.bounds[j][V]=N[j][V];if("ticks"in A)for(L=A.ticks,B=!0,this.autoTicks=!1,j=0;j<3;++j)this.tickSpacing[j]=0;else O("tickSpacing")&&(this.autoTicks=!0,G=!0);if(this._firstInit&&("ticks"in A||"tickSpacing"in A||(this.autoTicks=!0),G=!0,B=!0,this._firstInit=!1),G&&this.autoTicks&&(L=a.create(this.bounds,this.tickSpacing),B=!0),B){for(j=0;j<3;++j)L[j].sort(function(ee,Q){return ee.x-Q.x});a.equal(L,this.ticks)?B=!1:this.ticks=L}I("tickEnable"),R("tickFont")&&(B=!0),O("tickSize"),O("tickAngle"),O("tickPad"),U("tickColor");var H=R("labels");R("labelFont")&&(H=!0),I("labelEnable"),O("labelSize"),O("labelPad"),U("labelColor"),I("lineEnable"),I("lineMirror"),O("lineWidth"),U("lineColor"),I("lineTickEnable"),I("lineTickMirror"),O("lineTickLength"),O("lineTickWidth"),U("lineTickColor"),I("gridEnable"),O("gridWidth"),U("gridColor"),I("zeroEnable"),U("zeroLineColor"),O("zeroLineWidth"),I("backgroundEnable"),U("backgroundColor"),this._text?this._text&&(H||B)&&this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=i(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&&B&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=r(this.gl,this.bounds,this.ticks))};var v=[new d,new d,new d];function x(A,C,L,O,I){for(var R=A.primalOffset,U=A.primalMinor,B=A.mirrorOffset,G=A.mirrorMinor,N=O[C],j=0;j<3;++j)if(C!==j){var V=R,H=B,ee=U,Q=G;N&1<0?(ee[j]=-1,Q[j]=0):(ee[j]=0,Q[j]=1)}}var g=[0,0,0],m={model:u,view:u,projection:u,_ortho:!1};b.isOpaque=function(){return!0},b.isTransparent=function(){return!1},b.drawTransparent=function(A){};var k=[0,0,0],h=[0,0,0],M=[0,0,0];b.draw=function(A){A=A||m;for(var C=this.gl,L=A.model||u,O=A.view||u,I=A.projection||u,R=this.bounds,U=A._ortho||!1,B=o(L,O,I,R,U),G=B.cubeEdges,N=B.axis,j=O[12],V=O[13],H=O[14],ee=O[15],Q=(U?2:1)*this.pixelRatio*(I[3]*j+I[7]*V+I[11]*H+I[15]*ee)/C.drawingBufferHeight,X=0;X<3;++X)this.lastCubeProps.cubeEdges[X]=G[X],this.lastCubeProps.axis[X]=N[X];var Y=v;for(X=0;X<3;++X)x(v[X],X,this.bounds,G,N);C=this.gl;var K,te,ae,oe=g;for(X=0;X<3;++X)this.backgroundEnable[X]?oe[X]=N[X]:oe[X]=0;for(this._background.draw(L,O,I,R,oe,this.backgroundColor),this._lines.bind(L,O,I,this),X=0;X<3;++X){var se=[0,0,0];N[X]>0?se[X]=R[1][X]:se[X]=R[0][X];for(var fe=0;fe<2;++fe){var ye=(X+1+fe)%3,pe=(X+1+(1^fe))%3;this.gridEnable[ye]&&this._lines.drawGrid(ye,pe,this.bounds,se,this.gridColor[ye],this.gridWidth[ye]*this.pixelRatio)}for(fe=0;fe<2;++fe)ye=(X+1+fe)%3,pe=(X+1+(1^fe))%3,this.zeroEnable[pe]&&Math.min(R[0][pe],R[1][pe])<=0&&Math.max(R[0][pe],R[1][pe])>=0&&this._lines.drawZero(ye,pe,this.bounds,se,this.zeroLineColor[pe],this.zeroLineWidth[pe]*this.pixelRatio)}for(X=0;X<3;++X){this.lineEnable[X]&&this._lines.drawAxisLine(X,this.bounds,Y[X].primalOffset,this.lineColor[X],this.lineWidth[X]*this.pixelRatio),this.lineMirror[X]&&this._lines.drawAxisLine(X,this.bounds,Y[X].mirrorOffset,this.lineColor[X],this.lineWidth[X]*this.pixelRatio);var de=p(k,Y[X].primalMinor),he=p(h,Y[X].mirrorMinor),xe=this.lineTickLength;for(fe=0;fe<3;++fe){var Re=Q/L[5*fe];de[fe]*=xe[fe]*Re,he[fe]*=xe[fe]*Re}this.lineTickEnable[X]&&this._lines.drawAxisTicks(X,Y[X].primalOffset,de,this.lineTickColor[X],this.lineTickWidth[X]*this.pixelRatio),this.lineTickMirror[X]&&this._lines.drawAxisTicks(X,Y[X].mirrorOffset,he,this.lineTickColor[X],this.lineTickWidth[X]*this.pixelRatio)}function we(me){(ae=[0,0,0])[me]=1}function Ae(me,Te,Ee){var Ue=(me+1)%3,De=(me+2)%3,je=Te[Ue],ge=Te[De],be=Ee[Ue],Se=Ee[De];je>0&&Se>0||je>0&&Se<0||je<0&&Se>0||je<0&&Se<0?we(Ue):(ge>0&&be>0||ge>0&&be<0||ge<0&&be>0||ge<0&&be<0)&&we(De)}for(this._lines.unbind(),this._text.bind(L,O,I,this.pixelRatio),X=0;X<3;++X){var Me=Y[X].primalMinor,Ce=Y[X].mirrorMinor,ne=p(M,Y[X].primalOffset);for(fe=0;fe<3;++fe)this.lineTickEnable[X]&&(ne[fe]+=Q*Me[fe]*Math.max(this.lineTickLength[fe],0)/L[5*fe]);var ue=[0,0,0];if(ue[X]=1,this.tickEnable[X]){for(this.tickAngle[X]===-3600?(this.tickAngle[X]=0,this.tickAlign[X]="auto"):this.tickAlign[X]=-1,te=1,(K=[this.tickAlign[X],.5,te])[0]==="auto"?K[0]=0:K[0]=parseInt(""+K[0]),ae=[0,0,0],Ae(X,Me,Ce),fe=0;fe<3;++fe)ne[fe]+=Q*Me[fe]*this.tickPad[fe]/L[5*fe];this._text.drawTicks(X,this.tickSize[X],this.tickAngle[X],ne,this.tickColor[X],ue,ae,K)}if(this.labelEnable[X]){for(te=0,ae=[0,0,0],this.labels[X].length>4&&(we(X),te=1),(K=[this.labelAlign[X],.5,te])[0]==="auto"?K[0]=0:K[0]=parseInt(""+K[0]),fe=0;fe<3;++fe)ne[fe]+=Q*Me[fe]*this.labelPad[fe]/L[5*fe];ne[X]+=.5*(R[0][X]+R[1][X]),this._text.drawLabel(X,this.labelSize[X],this.labelAngle[X],ne,this.labelColor[X],[0,0,0],ae,K)}}this._text.unbind()},b.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},1011:function(f,l,t){f.exports=function(u){for(var p=[],c=[],b=0,d=0;d<3;++d)for(var v=(d+1)%3,x=(d+2)%3,g=[0,0,0],m=[0,0,0],k=-1;k<=1;k+=2){c.push(b,b+2,b+1,b+1,b+2,b+3),g[d]=k,m[d]=k;for(var h=-1;h<=1;h+=2){g[v]=h;for(var M=-1;M<=1;M+=2)g[x]=M,p.push(g[0],g[1],g[2],m[0],m[1],m[2]),b+=1}var A=v;v=x,x=A}var C=i(u,new Float32Array(p)),L=i(u,new Uint16Array(c),u.ELEMENT_ARRAY_BUFFER),O=r(u,[{buffer:C,type:u.FLOAT,size:3,offset:0,stride:24},{buffer:C,type:u.FLOAT,size:3,offset:12,stride:24}],L),I=n(u);return I.attributes.position.location=0,I.attributes.normal.location=1,new o(u,C,O,I)};var i=t(5827),r=t(2944),n=t(1943).bg;function o(u,p,c,b){this.gl=u,this.buffer=p,this.vao=c,this.shader=b}var a=o.prototype;a.draw=function(u,p,c,b,d,v){for(var x=!1,g=0;g<3;++g)x=x||d[g];if(x){var m=this.gl;m.enable(m.POLYGON_OFFSET_FILL),m.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:u,view:p,projection:c,bounds:b,enable:d,colors:v},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),m.disable(m.POLYGON_OFFSET_FILL)}},a.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},2864:function(f,l,t){f.exports=function(h,M,A,C,L){r(a,M,h),r(a,A,a);for(var O=0,I=0;I<2;++I){c[2]=C[I][2];for(var R=0;R<2;++R){c[1]=C[R][1];for(var U=0;U<2;++U)c[0]=C[U][0],d(u[O],c,a),O+=1}}var B=-1;for(I=0;I<8;++I){for(var G=u[I][3],N=0;N<3;++N)p[I][N]=u[I][N]/G;L&&(p[I][2]*=-1),G<0&&(B<0||p[I][2]ee&&(B|=1<ee&&(B|=1<p[I][1])&&(se=I);var fe=-1;for(I=0;I<3;++I)(pe=se^1<p[ye][0]&&(ye=pe))}var de=g;de[0]=de[1]=de[2]=0,de[i.log2(fe^se)]=se&fe,de[i.log2(se^ye)]=se&ye;var he=7^ye;he===B||he===oe?(he=7^fe,de[i.log2(ye^he)]=he&ye):de[i.log2(fe^he)]=he&fe;var xe=m,Re=B;for(j=0;j<3;++j)xe[j]=Re&1<>>8*v)%256/255}function a(d,v,x){for(var g=new Array(8*v),y=0,k=0;kae&&(ae=V[Q].dim1.canvasX,X=Q);K===0&&i(C,0,0,x.canvasWidth,x.canvasHeight);var oe=function(Ae){var Me,Ce,ne,ue=[[],[]];for(ne=0;ne<64;ne++){var me=!Ae&&neoe._length&&(Re=Re.slice(0,oe._length));var we,Ae=oe.tickvals;function Me(Te,Ee){return{val:Te,text:we[Ee]}}function Ce(Te,Ee){return Te.val-Ee.val}if(Array.isArray(Ae)&&Ae.length){we=oe.ticktext,Array.isArray(we)&&we.length?we.length>Ae.length?we=we.slice(0,Ae.length):Ae.length>we.length&&(Ae=Ae.slice(0,we.length)):we=Ae.map(s(oe.tickformat));for(var ne=1;ne=Ue||be>=De)return;var Se=Te.lineLayer.readPixel(ge,De-1-be),Ne=Se[3]!==0,Ye=Ne?Se[2]+256*(Se[1]+256*Se[0]):null,Ze={x:ge,y:be,clientX:Ee.clientX,clientY:Ee.clientY,dataIndex:Te.model.key,curveNumber:Ye};Ye!==xe&&(Ne?V.hover(Ze):V.unhover&&V.unhover(Ze),xe=Ye)}}),fe.style("opacity",function(Te){return Te.pick?0:1}),Q.style("background","rgba(255, 255, 255, 0)");var he=Q.selectAll("."+c.cn.parcoords).data(se,o);he.exit().remove(),he.enter().append("g").classed(c.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),he.attr("transform",function(Te){return l(Te.model.translateX,Te.model.translateY)});var de=he.selectAll("."+c.cn.parcoordsControlView).data(a,o);de.enter().append("g").classed(c.cn.parcoordsControlView,!0),de.attr("transform",function(Te){return l(Te.model.pad.l,Te.model.pad.t)});var pe=de.selectAll("."+c.cn.yAxis).data(function(Te){return Te.dimensions},o);pe.enter().append("g").classed(c.cn.yAxis,!0),de.each(function(Te){R(pe,Te,X)}),fe.each(function(Te){if(Te.viewModel){!Te.lineLayer||V?Te.lineLayer=d(this,Te):Te.lineLayer.update(Te),(Te.key||Te.key===0)&&(Te.viewModel[Te.key]=Te.lineLayer);var Ee=!Te.context||V;Te.lineLayer.render(Te.viewModel.panels,Ee)}}),pe.attr("transform",function(Te){return l(Te.xScale(Te.xIndex),0)}),pe.call(_.behavior.drag().origin(function(Te){return Te}).on("drag",function(Te){var Ee=Te.parent;oe.linePickActive(!1),Te.x=Math.max(-c.overdrag,Math.min(Te.model.width+c.overdrag,_.event.x)),Te.canvasX=Te.x*Te.model.canvasPixelRatio,pe.sort(function(Ue,De){return Ue.x-De.x}).each(function(Ue,De){Ue.xIndex=De,Ue.x=Te===Ue?Ue.x:Ue.xScale(Ue.xIndex),Ue.canvasX=Ue.x*Ue.model.canvasPixelRatio}),R(pe,Ee,X),pe.filter(function(Ue){return Math.abs(Te.xIndex-Ue.xIndex)!==0}).attr("transform",function(Ue){return l(Ue.xScale(Ue.xIndex),0)}),_.select(this).attr("transform",l(Te.x,0)),pe.each(function(Ue,De,je){je===Te.parent.key&&(Ee.dimensions[De]=Ue)}),Ee.contextLayer&&Ee.contextLayer.render(Ee.panels,!1,!A(Ee)),Ee.focusLayer.render&&Ee.focusLayer.render(Ee.panels)}).on("dragend",function(Te){var Ee=Te.parent;Te.x=Te.xScale(Te.xIndex),Te.canvasX=Te.x*Te.model.canvasPixelRatio,R(pe,Ee,X),_.select(this).attr("transform",function(Ue){return l(Ue.x,0)}),Ee.contextLayer&&Ee.contextLayer.render(Ee.panels,!1,!A(Ee)),Ee.focusLayer&&Ee.focusLayer.render(Ee.panels),Ee.pickLayer&&Ee.pickLayer.render(Ee.panels,!0),oe.linePickActive(!0),V&&V.axesMoved&&V.axesMoved(Ee.key,Ee.dimensions.map(function(Ue){return Ue.crossfilterDimensionIndex}))})),pe.exit().remove();var ye=pe.selectAll("."+c.cn.axisOverlays).data(a,o);ye.enter().append("g").classed(c.cn.axisOverlays,!0),ye.selectAll("."+c.cn.axis).remove();var Re=ye.selectAll("."+c.cn.axis).data(a,o);Re.enter().append("g").classed(c.cn.axis,!0),Re.each(function(Te){var Ee=Te.model.height/Te.model.tickDistance,Ue=Te.domainScale,De=Ue.domain();_.select(this).call(_.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(Ee,Te.tickFormat).tickValues(Te.ordinal?De:null).tickFormat(function(je){return p.isOrdinal(Te)?je:U(Te.model.dimensions[Te.visibleIndex],je)}).scale(Ue)),i.font(Re.selectAll("text"),Te.model.tickFont)}),Re.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),Re.selectAll("text").style("text-shadow",t.makeTextShadow(K)).style("cursor","default");var we=ye.selectAll("."+c.cn.axisHeading).data(a,o);we.enter().append("g").classed(c.cn.axisHeading,!0);var Ae=we.selectAll("."+c.cn.axisTitle).data(a,o);Ae.enter().append("text").classed(c.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",H?"none":"auto"),Ae.text(function(Te){return Te.label}).each(function(Te){var Ee=_.select(this);i.font(Ee,Te.model.labelFont),t.convertToTspans(Ee,G)}).attr("transform",function(Te){var Ee=I(Te.model.labelAngle,Te.model.labelSide),Ue=c.axisTitleOffset;return(Ee.dir>0?"":l(0,2*Ue+Te.model.height))+f(Ee.degrees)+l(-Ue*Ee.dx,-Ue*Ee.dy)}).attr("text-anchor",function(Te){var Ee=I(Te.model.labelAngle,Te.model.labelSide);return 2*Math.abs(Ee.dx)>Math.abs(Ee.dy)?Ee.dir*Ee.dx<0?"start":"end":"middle"});var Me=ye.selectAll("."+c.cn.axisExtent).data(a,o);Me.enter().append("g").classed(c.cn.axisExtent,!0);var Ce=Me.selectAll("."+c.cn.axisExtentTop).data(a,o);Ce.enter().append("g").classed(c.cn.axisExtentTop,!0),Ce.attr("transform",l(0,-c.axisExtentOffset));var ne=Ce.selectAll("."+c.cn.axisExtentTopText).data(a,o);ne.enter().append("text").classed(c.cn.axisExtentTopText,!0).call(O),ne.text(function(Te){return B(Te,!0)}).each(function(Te){i.font(_.select(this),Te.model.rangeFont)});var ue=Me.selectAll("."+c.cn.axisExtentBottom).data(a,o);ue.enter().append("g").classed(c.cn.axisExtentBottom,!0),ue.attr("transform",function(Te){return l(0,Te.model.height+c.axisExtentOffset)});var me=ue.selectAll("."+c.cn.axisExtentBottomText).data(a,o);me.enter().append("text").classed(c.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(O),me.text(function(Te){return B(Te,!1)}).each(function(Te){i.font(_.select(this),Te.model.rangeFont)}),b.ensureAxisBrush(ye,K,G)}},21341:function(D,E,e){var _=e(17171),w=e(79749),s=e(1602).isVisible,T={};function m(f,l,t){var i=l.indexOf(t),r=f.indexOf(i);return r===-1&&(r+=l.length),r}(D.exports=function(f,l){var t=f._fullLayout;if(w(f,[],T)){var i={},r={},n={},o={},a=t._size;l.forEach(function(u,p){var c=u[0].trace;n[p]=c.index;var b=o[p]=c._fullInput.index;i[p]=f.data[b].dimensions,r[p]=f.data[b].dimensions.slice()}),_(f,l,{width:a.w,height:a.h,margin:{t:a.t,r:a.r,b:a.b,l:a.l}},{filterChanged:function(u,p,c){var b=r[u][p],d=c.map(function(h){return h.slice()}),v="dimensions["+p+"].constraintrange",x=t._tracePreGUI[f._fullData[n[u]]._fullInput.uid];if(x[v]===void 0){var g=b.constraintrange;x[v]=g||null}var y=f._fullData[n[u]].dimensions[p];d.length?(d.length===1&&(d=d[0]),b.constraintrange=d,y.constraintrange=d.slice(),d=[d]):(delete b.constraintrange,delete y.constraintrange,d=null);var k={};k[v]=d,f.emit("plotly_restyle",[k,[o[u]]])},hover:function(u){f.emit("plotly_hover",u)},unhover:function(u){f.emit("plotly_unhover",u)},axesMoved:function(u,p){var c=function(b,d){return function(v,x){return m(b,d,v)-m(b,d,x)}}(p,r[u].filter(s));i[u].sort(c),r[u].filter(function(b){return!s(b)}).sort(function(b){return r[u].indexOf(b)}).forEach(function(b){i[u].splice(i[u].indexOf(b),1),i[u].splice(r[u].indexOf(b),0,b)}),f.emit("plotly_restyle",[{dimensions:[i[u]]},[o[u]]])}})}}).reglPrecompiled=T},34e3:function(D,E,e){var _=e(9012),w=e(27670).Y,s=e(41940),T=e(22399),m=e(5386).fF,f=e(5386).si,l=e(1426).extendFlat,t=s({editType:"plot",arrayOk:!0,colorEditType:"plot"});D.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:T.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},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:l({},_.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:m({},{keys:["label","color","value","percent","text"]}),texttemplate:f({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:l({},t,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:l({},t,{}),outsidetextfont:l({},t,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:l({},t,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:w({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"},_deprecated:{title:{valType:"string",dflt:"",editType:"calc"},titlefont:l({},t,{}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc"}}}},13584:function(D,E,e){var _=e(74875);E.name="pie",E.plot=function(w,s,T,m){_.plotBasePlot(E.name,w,s,T,m)},E.clean=function(w,s,T,m){_.cleanBasePlot(E.name,w,s,T,m)}},32354:function(D,E,e){var _=e(92770),w=e(84267),s=e(7901),T={};function m(l){return function(t,i){return!!t&&!!(t=w(t)).isValid()&&(t=s.addOpacity(t,t.getAlpha()),l[i]||(l[i]=t),t)}}function f(l,t){var i,r=JSON.stringify(l),n=t[r];if(!n){for(n=l.slice(),i=0;i=0}),(t.type==="funnelarea"?y:t.sort)&&n.sort(function(C,L){return L.v-C.v}),n[0]&&(n[0].vTotal=g),n},crossTraceCalc:function(l,t){var i=(t||{}).type;i||(i="pie");var r=l._fullLayout,n=l.calcdata,o=r[i+"colorway"],a=r["_"+i+"colormap"];r["extend"+i+"colors"]&&(o=f(o,T));for(var u=0,p=0;p0){o=!0;break}}o||(n=0)}return{hasLabels:i,hasValues:r,len:n}}D.exports={handleLabelsAndValues:f,supplyDefaults:function(l,t,i,r){function n(x,g){return w.coerce(l,t,s,x,g)}var o=f(n("labels"),n("values")),a=o.len;if(t._hasLabels=o.hasLabels,t._hasValues=o.hasValues,!t._hasLabels&&t._hasValues&&(n("label0"),n("dlabel")),a){t._length=a,n("marker.line.width")&&n("marker.line.color"),n("marker.colors"),n("scalegroup");var u,p=n("text"),c=n("texttemplate");if(c||(u=n("textinfo",Array.isArray(p)?"text+percent":"percent")),n("hovertext"),n("hovertemplate"),c||u&&u!=="none"){var b=n("textposition");m(l,t,r,n,b,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(b)||b==="auto"||b==="outside")&&n("automargin"),(b==="inside"||b==="auto"||Array.isArray(b))&&n("insidetextorientation")}T(t,r,n);var d=n("hole");if(n("title.text")){var v=n("title.position",d?"middle center":"top center");d||v!=="middle center"||(t.title.position="top center"),w.coerceFont(n,"title.font",r.font)}n("sort"),n("direction"),n("rotation"),n("pull")}else t.visible=!1}}},20007:function(D,E,e){var _=e(23469).appendArrayMultiPointValues;D.exports=function(w,s){var T={curveNumber:s.index,pointNumbers:w.pts,data:s._input,fullData:s,label:w.label,color:w.color,value:w.v,percent:w.percent,text:w.text,bbox:w.bbox,v:w.v};return w.pts.length===1&&(T.pointNumber=T.i=w.pts[0]),_(T,s,w.pts),s.type==="funnelarea"&&(delete T.v,delete T.i),T}},53581:function(D,E,e){var _=e(71828);function w(s){return s.indexOf("e")!==-1?s.replace(/[.]?0+e/,"e"):s.indexOf(".")!==-1?s.replace(/[.]?0+$/,""):s}E.formatPiePercent=function(s,T){var m=w((100*s).toPrecision(3));return _.numSeparate(m,T)+"%"},E.formatPieValue=function(s,T){var m=w(s.toPrecision(10));return _.numSeparate(m,T)},E.getFirstFilled=function(s,T){if(Array.isArray(s))for(var m=0;m"),name:ae.hovertemplate||oe.indexOf("name")!==-1?ae.name:void 0,idealAlign:K.pxmid[0]<0?"left":"right",color:u.castOption(ye.bgcolor,K.pts)||K.color,borderColor:u.castOption(ye.bordercolor,K.pts),fontFamily:u.castOption(Re.family,K.pts),fontSize:u.castOption(Re.size,K.pts),fontColor:u.castOption(Re.color,K.pts),nameLength:u.castOption(ye.namelength,K.pts),textAlign:u.castOption(ye.align,K.pts),hovertemplate:u.castOption(ae.hovertemplate,K.pts),hovertemplateLabels:K,eventData:[p(K,ae)]},{container:te._hoverlayer.node(),outerContainer:te._paper.node(),gd:j,inOut_bbox:we}),K.bbox=we[0],Y._hasHoverLabel=!0}Y._hasHoverEvent=!0,j.emit("plotly_hover",{points:[p(K,ae)],event:_.event})}}),N.on("mouseout",function(K){var te=j._fullLayout,ae=j._fullData[Y.index],oe=_.select(this).datum();Y._hasHoverEvent&&(K.originalEvent=_.event,j.emit("plotly_unhover",{points:[p(oe,ae)],event:_.event}),Y._hasHoverEvent=!1),Y._hasHoverLabel&&(s.loneUnhover(te._hoverlayer.node()),Y._hasHoverLabel=!1)}),N.on("click",function(K){var te=j._fullLayout,ae=j._fullData[Y.index];j._dragging||te.hovermode===!1||(j._hoverdata=[p(K,ae)],s.click(j,_.event))})}function d(N,j,V){var H=u.castOption(N.insidetextfont.color,j.pts);!H&&N._input.textfont&&(H=u.castOption(N._input.textfont.color,j.pts));var ee=u.castOption(N.insidetextfont.family,j.pts)||u.castOption(N.textfont.family,j.pts)||V.family,Q=u.castOption(N.insidetextfont.size,j.pts)||u.castOption(N.textfont.size,j.pts)||V.size;return{color:H||T.contrast(j.color),family:ee,size:Q}}function v(N,j){for(var V,H,ee=0;eeUe&&Ue>je||De=-4;de-=2)pe(Math.PI*de,"tan");for(de=4;de>=-4;de-=2)pe(Math.PI*(de+1),"tan")}if(oe||fe){for(de=4;de>=-4;de-=2)pe(Math.PI*(de+1.5),"rad");for(de=4;de>=-4;de-=2)pe(Math.PI*(de+.5),"rad")}}if(X||xe||oe){var ye=Math.sqrt(N.width*N.width+N.height*N.height);if((Q={scale:ee*H*2/ye,rCenter:1-ee,rotate:0}).textPosAngle=(j.startangle+j.stopangle)/2,Q.scale>=1)return Q;he.push(Q)}(xe||fe)&&((Q=g(N,H,Y,K,te)).textPosAngle=(j.startangle+j.stopangle)/2,he.push(Q)),(xe||se)&&((Q=y(N,H,Y,K,te)).textPosAngle=(j.startangle+j.stopangle)/2,he.push(Q));for(var Re=0,we=0,Ae=0;Ae=1)break}return he[Re]}function g(N,j,V,H,ee){j=Math.max(0,j-2*a);var Q=N.width/N.height,Y=M(Q,H,j,V);return{scale:2*Y/N.height,rCenter:k(Q,Y/j),rotate:h(ee)}}function y(N,j,V,H,ee){j=Math.max(0,j-2*a);var Q=N.height/N.width,Y=M(Q,H,j,V);return{scale:2*Y/N.width,rCenter:k(Q,Y/j),rotate:h(ee+Math.PI/2)}}function k(N,j){return Math.cos(j)-N*j}function h(N){return(180/Math.PI*N+720)%180-90}function M(N,j,V,H){var ee=N+1/(2*Math.tan(j));return V*Math.min(1/(Math.sqrt(ee*ee+.5)+ee),H/(Math.sqrt(N*N+H/2)+N))}function A(N,j){return N.v!==j.vTotal||j.trace.hole?Math.min(1/(1+1/Math.sin(N.halfangle)),N.ring/2):1}function C(N,j){var V=j.pxmid[0],H=j.pxmid[1],ee=N.width/2,Q=N.height/2;return V<0&&(ee*=-1),H<0&&(Q*=-1),{scale:1,rCenter:1,rotate:0,x:ee+Math.abs(Q)*(ee>0?1:-1)/2,y:Q/(1+V*V/(H*H)),outside:!0}}function L(N,j){var V,H,ee,Q=N.trace,Y={x:N.cx,y:N.cy},X={tx:0,ty:0};X.ty+=Q.title.font.size,ee=I(Q),Q.title.position.indexOf("top")!==-1?(Y.y-=(1+ee)*N.r,X.ty-=N.titleBox.height):Q.title.position.indexOf("bottom")!==-1&&(Y.y+=(1+ee)*N.r);var K,te=N.r/((K=N.trace.aspectratio)===void 0?1:K),ae=j.w*(Q.domain.x[1]-Q.domain.x[0])/2;return Q.title.position.indexOf("left")!==-1?(ae+=te,Y.x-=(1+ee)*te,X.tx+=N.titleBox.width/2):Q.title.position.indexOf("center")!==-1?ae*=2:Q.title.position.indexOf("right")!==-1&&(ae+=te,Y.x+=(1+ee)*te,X.tx-=N.titleBox.width/2),V=ae/N.titleBox.width,H=O(N,j)/N.titleBox.height,{x:Y.x,y:Y.y,scale:Math.min(V,H),tx:X.tx,ty:X.ty}}function O(N,j){var V=N.trace,H=j.h*(V.domain.y[1]-V.domain.y[0]);return Math.min(N.titleBox.height,H/2)}function I(N){var j,V=N.pull;if(!V)return 0;if(Array.isArray(V))for(V=0,j=0;jV&&(V=N.pull[j]);return V}function R(N,j){for(var V=[],H=0;H1?Ae=(we=fe.r)/he.aspectratio:we=(Ae=fe.r)*he.aspectratio,Re=(we*=(1+he.baseratio)/2)*Ae}pe=Math.min(pe,Re/fe.vTotal)}for(xe=0;xe")}if(Q){var de=f.castOption(ee,j.i,"texttemplate");if(de){var pe=function(Re){return{label:Re.label,value:Re.v,valueLabel:u.formatPieValue(Re.v,H.separators),percent:Re.v/V.vTotal,percentLabel:u.formatPiePercent(Re.v/V.vTotal,H.separators),color:Re.color,text:Re.text,customdata:f.castOption(ee,Re.i,"customdata")}}(j),ye=u.getFirstFilled(ee.text,j.pts);(c(ye)||ye==="")&&(pe.text=ye),j.text=f.texttemplateString(de,pe,N._fullLayout._d3locale,pe,ee._meta||{})}else j.text=""}}function G(N,j){var V=N.rotate*Math.PI/180,H=Math.cos(V),ee=Math.sin(V),Q=(j.left+j.right)/2,Y=(j.top+j.bottom)/2;N.textX=Q*H-Y*ee,N.textY=Q*ee+Y*H,N.noCenter=!0}D.exports={plot:function(N,j){var V=N._context.staticPlot,H=N._fullLayout,ee=H._size;o("pie",H),v(j,N),R(j,ee);var Q=f.makeTraceGroups(H._pielayer,j,"trace").each(function(Y){var X=_.select(this),K=Y[0],te=K.trace;(function(ae){var oe,se,fe,xe=ae[0],he=xe.r,de=xe.trace,pe=u.getRotationAngle(de.rotation),ye=2*Math.PI/xe.vTotal,Re="px0",we="px1";if(de.direction==="counterclockwise"){for(oe=0;oexe.vTotal/2?1:0,se.halfangle=Math.PI*Math.min(se.v/xe.vTotal,.5),se.ring=1-de.hole,se.rInscribed=A(se,xe))})(Y),X.attr("stroke-linejoin","round"),X.each(function(){var ae=_.select(this).selectAll("g.slice").data(Y);ae.enter().append("g").classed("slice",!0),ae.exit().remove();var oe=[[[],[]],[[],[]]],se=!1;ae.each(function(we,Ae){if(we.hidden)_.select(this).selectAll("path,g").remove();else{we.pointNumber=we.i,we.curveNumber=te.index,oe[we.pxmid[1]<0?0:1][we.pxmid[0]<0?0:1].push(we);var Me=K.cx,Ce=K.cy,ne=_.select(this),ue=ne.selectAll("path.surface").data([we]);if(ue.enter().append("path").classed("surface",!0).style({"pointer-events":V?"none":"all"}),ne.call(b,N,Y),te.pull){var me=+u.castOption(te.pull,we.pts)||0;me>0&&(Me+=me*we.pxmid[0],Ce+=me*we.pxmid[1])}we.cxFinal=Me,we.cyFinal=Ce;var Te=te.hole;if(we.v===K.vTotal){var Ee="M"+(Me+we.px0[0])+","+(Ce+we.px0[1])+be(we.px0,we.pxmid,!0,1)+be(we.pxmid,we.px0,!0,1)+"Z";Te?ue.attr("d","M"+(Me+Te*we.px0[0])+","+(Ce+Te*we.px0[1])+be(we.px0,we.pxmid,!1,Te)+be(we.pxmid,we.px0,!1,Te)+"Z"+Ee):ue.attr("d",Ee)}else{var Ue=be(we.px0,we.px1,!0,1);if(Te){var De=1-Te;ue.attr("d","M"+(Me+Te*we.px1[0])+","+(Ce+Te*we.px1[1])+be(we.px1,we.px0,!1,Te)+"l"+De*we.px0[0]+","+De*we.px0[1]+Ue+"Z")}else ue.attr("d","M"+Me+","+Ce+"l"+we.px0[0]+","+we.px0[1]+Ue+"Z")}B(N,we,K);var je=u.castOption(te.textposition,we.pts),ge=ne.selectAll("g.slicetext").data(we.text&&je!=="none"?[0]:[]);ge.enter().append("g").classed("slicetext",!0),ge.exit().remove(),ge.each(function(){var Se=f.ensureSingle(_.select(this),"text","",function(Et){Et.attr("data-notex",1)}),Ne=f.ensureUniformFontSize(N,je==="outside"?function(Et,Tt,xt){return{color:u.castOption(Et.outsidetextfont.color,Tt.pts)||u.castOption(Et.textfont.color,Tt.pts)||xt.color,family:u.castOption(Et.outsidetextfont.family,Tt.pts)||u.castOption(Et.textfont.family,Tt.pts)||xt.family,size:u.castOption(Et.outsidetextfont.size,Tt.pts)||u.castOption(Et.textfont.size,Tt.pts)||xt.size}}(te,we,H.font):d(te,we,H.font));Se.text(we.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(m.font,Ne).call(i.convertToTspans,N);var Ye,Ze=m.bBox(Se.node());if(je==="outside")Ye=C(Ze,we);else if(Ye=x(Ze,we,K),je==="auto"&&Ye.scale<1){var st=f.ensureUniformFontSize(N,te.outsidetextfont);Se.call(m.font,st),Ye=C(Ze=m.bBox(Se.node()),we)}var ot=Ye.textPosAngle,ft=ot===void 0?we.pxmid:U(K.r,ot);if(Ye.targetX=Me+ft[0]*Ye.rCenter+(Ye.x||0),Ye.targetY=Ce+ft[1]*Ye.rCenter+(Ye.y||0),G(Ye,Ze),Ye.outside){var yt=Ye.targetY;we.yLabelMin=yt-Ze.height/2,we.yLabelMid=yt,we.yLabelMax=yt+Ze.height/2,we.labelExtraX=0,we.labelExtraY=0,se=!0}Ye.fontSize=Ne.size,n(te.type,Ye,H),Y[Ae].transform=Ye,f.setTransormAndDisplay(Se,Ye)})}function be(Se,Ne,Ye,Ze){var st=Ze*(Ne[0]-Se[0]),ot=Ze*(Ne[1]-Se[1]);return"a"+Ze*K.r+","+Ze*K.r+" 0 "+we.largeArc+(Ye?" 1 ":" 0 ")+st+","+ot}});var fe=_.select(this).selectAll("g.titletext").data(te.title.text?[0]:[]);if(fe.enter().append("g").classed("titletext",!0),fe.exit().remove(),fe.each(function(){var we,Ae=f.ensureSingle(_.select(this),"text","",function(Ce){Ce.attr("data-notex",1)}),Me=te.title.text;te._meta&&(Me=f.templateString(Me,te._meta)),Ae.text(Me).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(m.font,te.title.font).call(i.convertToTspans,N),we=te.title.position==="middle center"?function(Ce){var ne=Math.sqrt(Ce.titleBox.width*Ce.titleBox.width+Ce.titleBox.height*Ce.titleBox.height);return{x:Ce.cx,y:Ce.cy,scale:Ce.trace.hole*Ce.r*2/ne,tx:0,ty:-Ce.titleBox.height/2+Ce.trace.title.font.size}}(K):L(K,ee),Ae.attr("transform",t(we.x,we.y)+l(Math.min(1,we.scale))+t(we.tx,we.ty))}),se&&function(we,Ae){var Me,Ce,ne,ue,me,Te,Ee,Ue,De,je,ge,be,Se;function Ne(ot,ft){return ot.pxmid[1]-ft.pxmid[1]}function Ye(ot,ft){return ft.pxmid[1]-ot.pxmid[1]}function Ze(ot,ft){ft||(ft={});var yt,Et,Tt,xt,Dt=ft.labelExtraY+(Ce?ft.yLabelMax:ft.yLabelMin),It=Ce?ot.yLabelMin:ot.yLabelMax,Ft=Ce?ot.yLabelMax:ot.yLabelMin,qt=ot.cyFinal+me(ot.px0[1],ot.px1[1]),Nt=Dt-It;if(Nt*Ee>0&&(ot.labelExtraY=Nt),Array.isArray(Ae.pull))for(Et=0;Et=(u.castOption(Ae.pull,Tt.pts)||0)||((ot.pxmid[1]-Tt.pxmid[1])*Ee>0?(Nt=Tt.cyFinal+me(Tt.px0[1],Tt.px1[1])-It-ot.labelExtraY)*Ee>0&&(ot.labelExtraY+=Nt):(Ft+ot.labelExtraY-qt)*Ee>0&&(yt=3*Te*Math.abs(Et-je.indexOf(ot)),(xt=Tt.cxFinal+ue(Tt.px0[0],Tt.px1[0])+yt-(ot.cxFinal+ot.pxmid[0])-ot.labelExtraX)*Te>0&&(ot.labelExtraX+=xt)))}for(Ce=0;Ce<2;Ce++)for(ne=Ce?Ne:Ye,me=Ce?Math.max:Math.min,Ee=Ce?1:-1,Me=0;Me<2;Me++){for(ue=Me?Math.max:Math.min,Te=Me?1:-1,(Ue=we[Ce][Me]).sort(ne),De=we[1-Ce][Me],je=De.concat(Ue),be=[],ge=0;geMath.abs(Ue)?me+="l"+Ue*Me.pxmid[0]/Me.pxmid[1]+","+Ue+"H"+(ue+Me.labelExtraX+Te):me+="l"+Me.labelExtraX+","+Ee+"v"+(Ue-Ee)+"h"+Te}else me+="V"+(Me.yLabelMid+Me.labelExtraY)+"h"+Te;f.ensureSingle(Ce,"path","textline").call(T.stroke,Ae.outsidetextfont.color).attr({"stroke-width":Math.min(2,Ae.outsidetextfont.size/8),d:me,fill:"none"})}else Ce.select("path.textline").remove()})}(ae,te),se&&te.automargin){var xe=m.bBox(X.node()),he=te.domain,de=ee.w*(he.x[1]-he.x[0]),pe=ee.h*(he.y[1]-he.y[0]),ye=(.5*de-K.r)/ee.w,Re=(.5*pe-K.r)/ee.h;w.autoMargin(N,"pie."+te.uid+".automargin",{xl:he.x[0]-ye,xr:he.x[1]+ye,yb:he.y[0]-Re,yt:he.y[1]+Re,l:Math.max(K.cx-K.r-xe.left,0),r:Math.max(xe.right-(K.cx+K.r),0),b:Math.max(xe.bottom-(K.cy+K.r),0),t:Math.max(K.cy-K.r-xe.top,0),pad:5})}})});setTimeout(function(){Q.selectAll("tspan").each(function(){var Y=_.select(this);Y.attr("dy")&&Y.attr("dy",Y.attr("dy"))})},0)},formatSliceLabel:B,transformInsideText:x,determineInsideTextFont:d,positionTitleOutside:L,prerenderTitles:v,layoutAreas:R,attachFxHandlers:b,computeTransform:G}},68357:function(D,E,e){var _=e(39898),w=e(63463),s=e(72597).resizeText;D.exports=function(T){var m=T._fullLayout._pielayer.selectAll(".trace");s(T,m,"pie"),m.each(function(f){var l=f[0].trace,t=_.select(this);t.style({opacity:l.opacity}),t.selectAll("path.surface").each(function(i){_.select(this).call(w,i,l)})})}},63463:function(D,E,e){var _=e(7901),w=e(53581).castOption;D.exports=function(s,T,m){var f=m.marker.line,l=w(f.color,T.pts)||_.defaultLine,t=w(f.width,T.pts)||0;s.style("stroke-width",t).call(_.fill,T.color).call(_.stroke,l)}},10959:function(D,E,e){var _=e(82196);D.exports={x:_.x,y:_.y,xy:{valType:"data_array",editType:"calc"},indices:{valType:"data_array",editType:"calc"},xbounds:{valType:"data_array",editType:"calc"},ybounds:{valType:"data_array",editType:"calc"},text:_.text,marker:{color:{valType:"color",arrayOk:!1,editType:"calc"},opacity:{valType:"number",min:0,max:1,dflt:1,arrayOk:!1,editType:"calc"},blend:{valType:"boolean",dflt:null,editType:"calc"},sizemin:{valType:"number",min:.1,max:2,dflt:.5,editType:"calc"},sizemax:{valType:"number",min:.1,dflt:20,editType:"calc"},border:{color:{valType:"color",arrayOk:!1,editType:"calc"},arearatio:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},editType:"calc"},editType:"calc"},transforms:void 0}},42743:function(D,E,e){var _=e(9330).gl_pointcloud2d,w=e(78614),s=e(71739).findExtremes,T=e(34603);function m(l,t){this.scene=l,this.uid=t,this.type="pointcloud",this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color="rgb(0, 0, 0)",this.name="",this.hoverinfo="all",this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=_(l.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var f=m.prototype;f.handlePick=function(l){var t=this.idToIndex[l.pointId];return{trace:this,dataCoord:l.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*t],this.pickXYData[2*t+1]]:[this.pickXData[t],this.pickYData[t]],textLabel:Array.isArray(this.textLabels)?this.textLabels[t]:this.textLabels,color:this.color,name:this.name,pointIndex:t,hoverinfo:this.hoverinfo}},f.update=function(l){this.index=l.index,this.textLabels=l.text,this.name=l.name,this.hoverinfo=l.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(l),this.color=T(l,{})},f.updateFast=function(l){var t,i,r,n,o,a,u=this.xData=this.pickXData=l.x,p=this.yData=this.pickYData=l.y,c=this.pickXYData=l.xy,b=l.xbounds&&l.ybounds,d=l.indices,v=this.bounds;if(c){if(r=c,t=c.length>>>1,b)v[0]=l.xbounds[0],v[2]=l.xbounds[1],v[1]=l.ybounds[0],v[3]=l.ybounds[1];else for(a=0;av[2]&&(v[2]=n),ov[3]&&(v[3]=o);if(d)i=d;else for(i=new Int32Array(t),a=0;av[2]&&(v[2]=n),ov[3]&&(v[3]=o);this.idToIndex=i,this.pointcloudOptions.idToIndex=i,this.pointcloudOptions.positions=r;var x=w(l.marker.color),g=w(l.marker.border.color),y=l.opacity*l.marker.opacity;x[3]*=y,this.pointcloudOptions.color=x;var k=l.marker.blend;k===null&&(k=u.length<100||p.length<100),this.pointcloudOptions.blend=k,g[3]*=y,this.pointcloudOptions.borderColor=g;var h=l.marker.sizemin,M=Math.max(l.marker.sizemax,l.marker.sizemin);this.pointcloudOptions.sizeMin=h,this.pointcloudOptions.sizeMax=M,this.pointcloudOptions.areaRatio=l.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var A=this.scene.xaxis,C=this.scene.yaxis,L=M/2||.5;l._extremes[A._id]=s(A,[v[0],v[2]],{ppad:L}),l._extremes[C._id]=s(C,[v[1],v[3]],{ppad:L})},f.dispose=function(){this.pointcloud.dispose()},D.exports=function(l,t){var i=new m(l,t.uid);return i.update(t),i}},33876:function(D,E,e){var _=e(71828),w=e(10959);D.exports=function(s,T,m){function f(l,t){return _.coerce(s,T,w,l,t)}f("x"),f("y"),f("xbounds"),f("ybounds"),s.xy&&s.xy instanceof Float32Array&&(T.xy=s.xy),s.indices&&s.indices instanceof Int32Array&&(T.indices=s.indices),f("text"),f("marker.color",m),f("marker.opacity"),f("marker.blend"),f("marker.sizemin"),f("marker.sizemax"),f("marker.border.color",m),f("marker.border.arearatio"),T._length=null}},20593:function(D,E,e){D.exports={attributes:e(10959),supplyDefaults:e(33876),calc:e(36563),plot:e(42743),moduleType:"trace",name:"pointcloud",basePlotModule:e(4796),categories:["gl","gl2d","showLegend"],meta:{}}},39953:function(D,E,e){var _=e(41940),w=e(9012),s=e(22399),T=e(77914),m=e(27670).Y,f=e(5386).fF,l=e(50693),t=e(44467).templatedArray,i=e(12663).descriptionOnlyNumbers,r=e(1426).extendFlat,n=e(30962).overrideAll;(D.exports=n({hoverinfo:r({},w.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:T.hoverlabel,domain:m({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:i("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:_({}),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:s.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:T.hoverlabel,hovertemplate:f({},{keys:["value","label"]})},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:s.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:T.hoverlabel,hovertemplate:f({},{keys:["value","label"]}),colorscales:t("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:r(l().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")).transforms=void 0},75536:function(D,E,e){var _=e(30962).overrideAll,w=e(27659).a0,s=e(60436),T=e(528),m=e(6964),f=e(28569),l=e(47322).prepSelect,t=e(71828),i=e(73972),r="sankey";function n(o,a){var u=o._fullData[a],p=o._fullLayout,c=p.dragmode,b=p.dragmode==="pan"?"move":"crosshair",d=u._bgRect;if(d&&c!=="pan"&&c!=="zoom"){m(d,b);var v={_id:"x",c2p:t.identity,_offset:u._sankey.translateX,_length:u._sankey.width},x={_id:"y",c2p:t.identity,_offset:u._sankey.translateY,_length:u._sankey.height},g={gd:o,element:d.node(),plotinfo:{id:a,xaxis:v,yaxis:x,fillRangeItems:t.noop},subplot:a,xaxes:[v],yaxes:[x],doneFnCompleted:function(y){var k,h=o._fullData[a],M=h.node.groups.slice(),A=[];function C(R){for(var U=h._sankey.graph.nodes,B=0;Bk&&(k=a.source[n]),a.target[n]>k&&(k=a.target[n]);var h,M=k+1;r.node._count=M;var A=r.node.groups,C={};for(n=0;n0&&m(B,M)&&m(G,M)&&(!C.hasOwnProperty(B)||!C.hasOwnProperty(G)||C[B]!==C[G])){C.hasOwnProperty(G)&&(G=C[G]),C.hasOwnProperty(B)&&(B=C[B]),G=+G,b[B=+B]=b[G]=!0;var N="";a.label&&a.label[n]&&(N=a.label[n]);var j=null;N&&d.hasOwnProperty(N)&&(j=d[N]),u.push({pointNumber:n,label:N,color:p?a.color[n]:a.color,customdata:c?a.customdata[n]:a.customdata,concentrationscale:j,source:B,target:G,value:+U}),R.source.push(B),R.target.push(G)}}var V=M+A.length,H=T(o.color),ee=T(o.customdata),Q=[];for(n=0;nM-1,childrenNodes:[],pointNumber:n,label:Y,color:H?o.color[n]:o.color,customdata:ee?o.customdata[n]:o.customdata})}var X=!1;return function(K,te,ae){for(var oe=w.init2dArray(K,0),se=0;se1})}(V,R.source,R.target)&&(X=!0),{circular:X,links:u,nodes:Q,groups:A,groupLookup:C}}(t);return s({circular:i.circular,_nodes:i.nodes,_links:i.links,_groups:i.groups,_groupLookup:i.groupLookup})}},85247:function(D){D.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"}}},26857:function(D,E,e){var _=e(71828),w=e(39953),s=e(7901),T=e(84267),m=e(27670).c,f=e(38048),l=e(44467),t=e(85501);function i(r,n){function o(a,u){return _.coerce(r,n,w.link.colorscales,a,u)}o("label"),o("cmin"),o("cmax"),o("colorscale")}D.exports=function(r,n,o,a){function u(M,A){return _.coerce(r,n,w,M,A)}var p=_.extendDeep(a.hoverlabel,r.hoverlabel),c=r.node,b=l.newContainer(n,"node");function d(M,A){return _.coerce(c,b,w.node,M,A)}d("label"),d("groups"),d("x"),d("y"),d("pad"),d("thickness"),d("line.color"),d("line.width"),d("hoverinfo",r.hoverinfo),f(c,b,d,p),d("hovertemplate");var v=a.colorway;d("color",b.label.map(function(M,A){return s.addOpacity(function(C){return v[C%v.length]}(A),.8)})),d("customdata");var x=r.link||{},g=l.newContainer(n,"link");function y(M,A){return _.coerce(x,g,w.link,M,A)}y("label"),y("arrowlen"),y("source"),y("target"),y("value"),y("line.color"),y("line.width"),y("hoverinfo",r.hoverinfo),f(x,g,y,p),y("hovertemplate");var k,h=T(a.paper_bgcolor).getLuminance()<.333?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)";y("color",_.repeat(h,g.value.length)),y("customdata"),t(x,g,{name:"colorscales",handleItemDefaults:i}),m(n,a,u),u("orientation"),u("valueformat"),u("valuesuffix"),b.x.length&&b.y.length&&(k="freeform"),u("arrangement",k),_.coerceFont(u,"textfont",_.extendFlat({},a.font)),n._length=null}},29396:function(D,E,e){D.exports={attributes:e(39953),supplyDefaults:e(26857),calc:e(92930),plot:e(60436),moduleType:"trace",name:"sankey",basePlotModule:e(75536),selectPoints:e(84564),categories:["noOpacity"],meta:{}}},60436:function(D,E,e){var _=e(39898),w=e(71828),s=w.numberFormat,T=e(3393),m=e(30211),f=e(7901),l=e(85247).cn,t=w._;function i(x){return x!==""}function r(x,g){return x.filter(function(y){return y.key===g.traceId})}function n(x,g){_.select(x).select("path").style("fill-opacity",g),_.select(x).select("rect").style("fill-opacity",g)}function o(x){_.select(x).select("text.name").style("fill","black")}function a(x){return function(g){return x.node.sourceLinks.indexOf(g.link)!==-1||x.node.targetLinks.indexOf(g.link)!==-1}}function u(x){return function(g){return g.node.sourceLinks.indexOf(x.link)!==-1||g.node.targetLinks.indexOf(x.link)!==-1}}function p(x,g,y){g&&y&&r(y,g).selectAll("."+l.sankeyLink).filter(a(g)).call(b.bind(0,g,y,!1))}function c(x,g,y){g&&y&&r(y,g).selectAll("."+l.sankeyLink).filter(a(g)).call(d.bind(0,g,y,!1))}function b(x,g,y,k){var h=k.datum().link.label;k.style("fill-opacity",function(M){if(!M.link.concentrationscale)return .4}),h&&r(g,x).selectAll("."+l.sankeyLink).filter(function(M){return M.link.label===h}).style("fill-opacity",function(M){if(!M.link.concentrationscale)return .4}),y&&r(g,x).selectAll("."+l.sankeyNode).filter(u(x)).call(p)}function d(x,g,y,k){var h=k.datum().link.label;k.style("fill-opacity",function(M){return M.tinyColorAlpha}),h&&r(g,x).selectAll("."+l.sankeyLink).filter(function(M){return M.link.label===h}).style("fill-opacity",function(M){return M.tinyColorAlpha}),y&&r(g,x).selectAll(l.sankeyNode).filter(u(x)).call(c)}function v(x,g){var y=x.hoverlabel||{},k=w.nestedProperty(y,g).get();return!Array.isArray(k)&&k}D.exports=function(x,g){for(var y=x._fullLayout,k=y._paper,h=y._size,M=0;M"),color:v(G,"bgcolor")||f.addOpacity(H.color,1),borderColor:v(G,"bordercolor"),fontFamily:v(G,"font.family"),fontSize:v(G,"font.size"),fontColor:v(G,"font.color"),nameLength:v(G,"namelength"),textAlign:v(G,"align"),idealAlign:_.event.x"),color:v(G,"bgcolor")||B.tinyColorHue,borderColor:v(G,"bordercolor"),fontFamily:v(G,"font.family"),fontSize:v(G,"font.size"),fontColor:v(G,"font.color"),nameLength:v(G,"namelength"),textAlign:v(G,"align"),idealAlign:"left",hovertemplate:G.hovertemplate,hovertemplateLabels:Y,eventData:[B.node]},{container:y._hoverlayer.node(),outerContainer:y._paper.node(),gd:x});n(te,.85),o(te)}}},unhover:function(U,B,G){x._fullLayout.hovermode!==!1&&(_.select(U).call(c,B,G),B.node.trace.node.hoverinfo!=="skip"&&(B.node.fullData=B.node.trace,x.emit("plotly_unhover",{event:_.event,points:[B.node]})),m.loneUnhover(y._hoverlayer.node()))},select:function(U,B,G){var N=B.node;N.originalEvent=_.event,x._hoverdata=[N],_.select(U).call(c,B,G),m.click(x,{target:!0})}}})}},3393:function(D,E,e){var _=e(49887),w=e(81684).k4,s=e(39898),T=e(30838),m=e(86781),f=e(85247),l=e(84267),t=e(7901),i=e(91424),r=e(71828),n=r.strTranslate,o=r.strRotate,a=e(28984),u=a.keyFun,p=a.repeat,c=a.unwrap,b=e(63893),d=e(73972),v=e(18783),x=v.CAP_SHIFT,g=v.LINE_SPACING;function y(V,H,ee){var Q,Y=c(H),X=Y.trace,K=X.domain,te=X.orientation==="h",ae=X.node.pad,oe=X.node.thickness,se=V.width*(K.x[1]-K.x[0]),fe=V.height*(K.y[1]-K.y[0]),xe=Y._nodes,he=Y._links,de=Y.circular;(Q=de?m.sankeyCircular().circularLinkGap(0):T.sankey()).iterations(f.sankeyIterations).size(te?[se,fe]:[fe,se]).nodeWidth(oe).nodePadding(ae).nodeId(function(Te){return Te.pointNumber}).nodes(xe).links(he);var pe,ye,Re,we=Q();for(var Ae in Q.nodePadding()be+oe&&(ge+=1,Ee=Se.x0),be=Se.x0,je[ge]||(je[ge]=[]),je[ge].push(Se),Ue=Ee-Se.x0,Se.x0+=Ue,Se.x1+=Ue}return je}(xe=we.nodes).forEach(function(Te){var Ee,Ue,De,je=0,ge=Te.length;for(Te.sort(function(be,Se){return be.y0-Se.y0}),De=0;De=je||(Ue=je-Ee.y0)>1e-6&&(Ee.y0+=Ue,Ee.y1+=Ue),je=Ee.y1+ae}),Q.update(we)}return{circular:de,key:ee,trace:X,guid:r.randstr(),horizontal:te,width:se,height:fe,nodePad:X.node.pad,nodeLineColor:X.node.line.color,nodeLineWidth:X.node.line.width,linkLineColor:X.link.line.color,linkLineWidth:X.link.line.width,linkArrowLength:X.link.arrowlen,valueFormat:X.valueformat,valueSuffix:X.valuesuffix,textFont:X.textfont,translateX:K.x[0]*V.width+V.margin.l,translateY:V.height-K.y[1]*V.height+V.margin.t,dragParallel:te?fe:se,dragPerpendicular:te?se:fe,arrangement:X.arrangement,sankey:Q,graph:we,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function k(V,H,ee){var Q=l(H.color),Y=H.source.label+"|"+H.target.label+"__"+ee;return H.trace=V.trace,H.curveNumber=V.trace.index,{circular:V.circular,key:Y,traceId:V.key,pointNumber:H.pointNumber,link:H,tinyColorHue:t.tinyRGB(Q),tinyColorAlpha:Q.getAlpha(),linkPath:h,linkLineColor:V.linkLineColor,linkLineWidth:V.linkLineWidth,linkArrowLength:V.linkArrowLength,valueFormat:V.valueFormat,valueSuffix:V.valueSuffix,sankey:V.sankey,parent:V,interactionState:V.interactionState,flow:H.flow}}function h(){return function(V){var H=V.linkArrowLength;if(V.link.circular)return function(ye,Re){var we=ye.width/2,Ae=ye.circularPathData;return ye.circularLinkType==="top"?"M "+(Ae.targetX-Re)+" "+(Ae.targetY+we)+" L"+(Ae.rightInnerExtent-Re)+" "+(Ae.targetY+we)+"A"+(Ae.rightLargeArcRadius+we)+" "+(Ae.rightSmallArcRadius+we)+" 0 0 1 "+(Ae.rightFullExtent-we-Re)+" "+(Ae.targetY-Ae.rightSmallArcRadius)+"L"+(Ae.rightFullExtent-we-Re)+" "+Ae.verticalRightInnerExtent+"A"+(Ae.rightLargeArcRadius+we)+" "+(Ae.rightLargeArcRadius+we)+" 0 0 1 "+(Ae.rightInnerExtent-Re)+" "+(Ae.verticalFullExtent-we)+"L"+Ae.leftInnerExtent+" "+(Ae.verticalFullExtent-we)+"A"+(Ae.leftLargeArcRadius+we)+" "+(Ae.leftLargeArcRadius+we)+" 0 0 1 "+(Ae.leftFullExtent+we)+" "+Ae.verticalLeftInnerExtent+"L"+(Ae.leftFullExtent+we)+" "+(Ae.sourceY-Ae.leftSmallArcRadius)+"A"+(Ae.leftLargeArcRadius+we)+" "+(Ae.leftSmallArcRadius+we)+" 0 0 1 "+Ae.leftInnerExtent+" "+(Ae.sourceY+we)+"L"+Ae.sourceX+" "+(Ae.sourceY+we)+"L"+Ae.sourceX+" "+(Ae.sourceY-we)+"L"+Ae.leftInnerExtent+" "+(Ae.sourceY-we)+"A"+(Ae.leftLargeArcRadius-we)+" "+(Ae.leftSmallArcRadius-we)+" 0 0 0 "+(Ae.leftFullExtent-we)+" "+(Ae.sourceY-Ae.leftSmallArcRadius)+"L"+(Ae.leftFullExtent-we)+" "+Ae.verticalLeftInnerExtent+"A"+(Ae.leftLargeArcRadius-we)+" "+(Ae.leftLargeArcRadius-we)+" 0 0 0 "+Ae.leftInnerExtent+" "+(Ae.verticalFullExtent+we)+"L"+(Ae.rightInnerExtent-Re)+" "+(Ae.verticalFullExtent+we)+"A"+(Ae.rightLargeArcRadius-we)+" "+(Ae.rightLargeArcRadius-we)+" 0 0 0 "+(Ae.rightFullExtent+we-Re)+" "+Ae.verticalRightInnerExtent+"L"+(Ae.rightFullExtent+we-Re)+" "+(Ae.targetY-Ae.rightSmallArcRadius)+"A"+(Ae.rightLargeArcRadius-we)+" "+(Ae.rightSmallArcRadius-we)+" 0 0 0 "+(Ae.rightInnerExtent-Re)+" "+(Ae.targetY-we)+"L"+(Ae.targetX-Re)+" "+(Ae.targetY-we)+(Re>0?"L"+Ae.targetX+" "+Ae.targetY:"")+"Z":"M "+(Ae.targetX-Re)+" "+(Ae.targetY-we)+" L"+(Ae.rightInnerExtent-Re)+" "+(Ae.targetY-we)+"A"+(Ae.rightLargeArcRadius+we)+" "+(Ae.rightSmallArcRadius+we)+" 0 0 0 "+(Ae.rightFullExtent-we-Re)+" "+(Ae.targetY+Ae.rightSmallArcRadius)+"L"+(Ae.rightFullExtent-we-Re)+" "+Ae.verticalRightInnerExtent+"A"+(Ae.rightLargeArcRadius+we)+" "+(Ae.rightLargeArcRadius+we)+" 0 0 0 "+(Ae.rightInnerExtent-Re)+" "+(Ae.verticalFullExtent+we)+"L"+Ae.leftInnerExtent+" "+(Ae.verticalFullExtent+we)+"A"+(Ae.leftLargeArcRadius+we)+" "+(Ae.leftLargeArcRadius+we)+" 0 0 0 "+(Ae.leftFullExtent+we)+" "+Ae.verticalLeftInnerExtent+"L"+(Ae.leftFullExtent+we)+" "+(Ae.sourceY+Ae.leftSmallArcRadius)+"A"+(Ae.leftLargeArcRadius+we)+" "+(Ae.leftSmallArcRadius+we)+" 0 0 0 "+Ae.leftInnerExtent+" "+(Ae.sourceY-we)+"L"+Ae.sourceX+" "+(Ae.sourceY-we)+"L"+Ae.sourceX+" "+(Ae.sourceY+we)+"L"+Ae.leftInnerExtent+" "+(Ae.sourceY+we)+"A"+(Ae.leftLargeArcRadius-we)+" "+(Ae.leftSmallArcRadius-we)+" 0 0 1 "+(Ae.leftFullExtent-we)+" "+(Ae.sourceY+Ae.leftSmallArcRadius)+"L"+(Ae.leftFullExtent-we)+" "+Ae.verticalLeftInnerExtent+"A"+(Ae.leftLargeArcRadius-we)+" "+(Ae.leftLargeArcRadius-we)+" 0 0 1 "+Ae.leftInnerExtent+" "+(Ae.verticalFullExtent-we)+"L"+(Ae.rightInnerExtent-Re)+" "+(Ae.verticalFullExtent-we)+"A"+(Ae.rightLargeArcRadius-we)+" "+(Ae.rightLargeArcRadius-we)+" 0 0 1 "+(Ae.rightFullExtent+we-Re)+" "+Ae.verticalRightInnerExtent+"L"+(Ae.rightFullExtent+we-Re)+" "+(Ae.targetY+Ae.rightSmallArcRadius)+"A"+(Ae.rightLargeArcRadius-we)+" "+(Ae.rightSmallArcRadius-we)+" 0 0 1 "+(Ae.rightInnerExtent-Re)+" "+(Ae.targetY+we)+"L"+(Ae.targetX-Re)+" "+(Ae.targetY+we)+(Re>0?"L"+Ae.targetX+" "+Ae.targetY:"")+"Z"}(V.link,H);var ee=Math.abs((V.link.target.x0-V.link.source.x1)/2);H>ee&&(H=ee);var Q=V.link.source.x1,Y=V.link.target.x0-H,X=w(Q,Y),K=X(.5),te=X(.5),ae=V.link.y0-V.link.width/2,oe=V.link.y0+V.link.width/2,se=V.link.y1-V.link.width/2,fe=V.link.y1+V.link.width/2,xe="M"+Q+","+ae,he="C"+K+","+ae+" "+te+","+se+" "+Y+","+se,de="C"+te+","+fe+" "+K+","+oe+" "+Q+","+oe,pe=H>0?"L"+(Y+H)+","+(se+V.link.width/2):"";return xe+he+(pe+="L"+Y+","+fe)+de+"Z"}}function M(V,H){var ee=l(H.color),Q=f.nodePadAcross,Y=V.nodePad/2;H.dx=H.x1-H.x0,H.dy=H.y1-H.y0;var X=H.dx,K=Math.max(.5,H.dy),te="node_"+H.pointNumber;return H.group&&(te=r.randstr()),H.trace=V.trace,H.curveNumber=V.trace.index,{index:H.pointNumber,key:te,partOfGroup:H.partOfGroup||!1,group:H.group,traceId:V.key,trace:V.trace,node:H,nodePad:V.nodePad,nodeLineColor:V.nodeLineColor,nodeLineWidth:V.nodeLineWidth,textFont:V.textFont,size:V.horizontal?V.height:V.width,visibleWidth:Math.ceil(X),visibleHeight:K,zoneX:-Q,zoneY:-Y,zoneWidth:X+2*Q,zoneHeight:K+2*Y,labelY:V.horizontal?H.dy/2+1:H.dx/2+1,left:H.originalLayer===1,sizeAcross:V.width,forceLayouts:V.forceLayouts,horizontal:V.horizontal,darkBackground:ee.getBrightness()<=128,tinyColorHue:t.tinyRGB(ee),tinyColorAlpha:ee.getAlpha(),valueFormat:V.valueFormat,valueSuffix:V.valueSuffix,sankey:V.sankey,graph:V.graph,arrangement:V.arrangement,uniqueNodeLabelPathId:[V.guid,V.key,te].join("_"),interactionState:V.interactionState,figure:V}}function A(V){V.attr("transform",function(H){return n(H.node.x0.toFixed(3),H.node.y0.toFixed(3))})}function C(V){V.call(A)}function L(V,H){V.call(C),H.attr("d",h())}function O(V){V.attr("width",function(H){return H.node.x1-H.node.x0}).attr("height",function(H){return H.visibleHeight})}function I(V){return V.link.width>1||V.linkLineWidth>0}function R(V){return n(V.translateX,V.translateY)+(V.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function U(V,H,ee){V.on(".basic",null).on("mouseover.basic",function(Q){Q.interactionState.dragInProgress||Q.partOfGroup||(ee.hover(this,Q,H),Q.interactionState.hovered=[this,Q])}).on("mousemove.basic",function(Q){Q.interactionState.dragInProgress||Q.partOfGroup||(ee.follow(this,Q),Q.interactionState.hovered=[this,Q])}).on("mouseout.basic",function(Q){Q.interactionState.dragInProgress||Q.partOfGroup||(ee.unhover(this,Q,H),Q.interactionState.hovered=!1)}).on("click.basic",function(Q){Q.interactionState.hovered&&(ee.unhover(this,Q,H),Q.interactionState.hovered=!1),Q.interactionState.dragInProgress||Q.partOfGroup||ee.select(this,Q,H)})}function B(V,H,ee,Q){var Y=s.behavior.drag().origin(function(X){return{x:X.node.x0+X.visibleWidth/2,y:X.node.y0+X.visibleHeight/2}}).on("dragstart",function(X){if(X.arrangement!=="fixed"&&(r.ensureSingle(Q._fullLayout._infolayer,"g","dragcover",function(te){Q._fullLayout._dragCover=te}),r.raiseToTop(this),X.interactionState.dragInProgress=X.node,N(X.node),X.interactionState.hovered&&(ee.nodeEvents.unhover.apply(0,X.interactionState.hovered),X.interactionState.hovered=!1),X.arrangement==="snap")){var K=X.traceId+"|"+X.key;X.forceLayouts[K]?X.forceLayouts[K].alpha(1):function(te,ae,oe,se){(function(xe){for(var he=0;he0&&pe.forceLayouts[he].alpha(0)}}(0,ae,fe,oe)).stop()}(0,K,X),function(te,ae,oe,se,fe){window.requestAnimationFrame(function xe(){var he;for(he=0;he0)window.requestAnimationFrame(xe);else{var de=oe.node.originalX;oe.node.x0=de-oe.visibleWidth/2,oe.node.x1=de+oe.visibleWidth/2,G(oe,fe)}})}(V,H,X,K,Q)}}).on("drag",function(X){if(X.arrangement!=="fixed"){var K=s.event.x,te=s.event.y;X.arrangement==="snap"?(X.node.x0=K-X.visibleWidth/2,X.node.x1=K+X.visibleWidth/2,X.node.y0=te-X.visibleHeight/2,X.node.y1=te+X.visibleHeight/2):(X.arrangement==="freeform"&&(X.node.x0=K-X.visibleWidth/2,X.node.x1=K+X.visibleWidth/2),te=Math.max(0,Math.min(X.size-X.visibleHeight/2,te)),X.node.y0=te-X.visibleHeight/2,X.node.y1=te+X.visibleHeight/2),N(X.node),X.arrangement!=="snap"&&(X.sankey.update(X.graph),L(V.filter(j(X)),H))}}).on("dragend",function(X){if(X.arrangement!=="fixed"){X.interactionState.dragInProgress=!1;for(var K=0;Kd&&B[x].gap;)x--;for(y=B[x].s,v=B.length-1;v>x;v--)B[v].s=y;for(;dL[o]&&o=0;o--){var a=T[o];if(a.type==="scatter"&&a.xaxis===r.xaxis&&a.yaxis===r.yaxis){a.opacity=void 0;break}}}}}},17438:function(D,E,e){var _=e(71828),w=e(73972),s=e(82196),T=e(47581),m=e(34098),f=e(67513),l=e(73927),t=e(565),i=e(49508),r=e(11058),n=e(94039),o=e(82410),a=e(28908),u=e(71828).coercePattern;D.exports=function(p,c,b,d){function v(C,L){return _.coerce(p,c,s,C,L)}var x=f(p,c,d,v);if(x||(c.visible=!1),c.visible){l(p,c,d,v),v("xhoverformat"),v("yhoverformat");var g=t(p,c,d,v);d.scattermode==="group"&&c.orientation===void 0&&v("orientation","v");var y=!g&&x=Math.min(de,pe)&&p<=Math.max(de,pe)?0:1/0}var ye=Math.max(3,he.mrc||0),Re=1-1/ye,we=Math.abs(a.c2p(he.x)-p);return we=Math.min(de,pe)&&c<=Math.max(de,pe)?0:1/0}var ye=Math.max(3,he.mrc||0),Re=1-1/ye,we=Math.abs(u.c2p(he.y)-c);return wefe!=(Q=N[B][1])>=fe&&(V=N[B-1][0],H=N[B][0],Q-ee&&(j=V+(H-V)*(fe-ee)/(Q-ee),te=Math.min(te,j),ae=Math.max(ae,j)));te=Math.max(te,0),ae=Math.min(ae,a._length);var xe=m.defaultLine;return m.opacity(o.fillcolor)?xe=o.fillcolor:m.opacity((o.line||{}).color)&&(xe=o.line.color),_.extendFlat(l,{distance:l.maxHoverDistance,x0:te,x1:ae,y0:fe,y1:fe,color:xe,hovertemplate:!1}),delete l.index,o.text&&!Array.isArray(o.text)?l.text=String(o.text):l.text=o.name,[l]}}}},67368:function(D,E,e){var _=e(34098);D.exports={hasLines:_.hasLines,hasMarkers:_.hasMarkers,hasText:_.hasText,isBubble:_.isBubble,attributes:e(82196),layoutAttributes:e(21479),supplyDefaults:e(17438),crossTraceDefaults:e(34936),supplyLayoutDefaults:e(79334),calc:e(47761).calc,crossTraceCalc:e(72626),arraysToCalcdata:e(75225),plot:e(32663),colorbar:e(4898),formatLabels:e(8225),style:e(16296).style,styleOnSelect:e(16296).styleOnSelect,hoverPoints:e(33720),selectPoints:e(98002),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:e(93612),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},21479:function(D){D.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}},79334:function(D,E,e){var _=e(71828),w=e(21479);D.exports=function(s,T){var m,f=T.barmode==="group";T.scattermode==="group"&&(m=f?T.bargap:.2,_.coerce(s,T,w,"scattergap",m))}},11058:function(D,E,e){var _=e(71828).isArrayOrTypedArray,w=e(52075).hasColorscale,s=e(1586);D.exports=function(T,m,f,l,t,i){i||(i={});var r=(T.marker||{}).color;t("line.color",f),w(T,"line")?s(T,m,l,t,{prefix:"line.",cLetter:"c"}):t("line.color",!_(r)&&r||f),t("line.width"),i.noDash||t("line.dash"),i.backoff&&t("line.backoff")}},34621:function(D,E,e){var _=e(91424),w=e(50606),s=w.BADNUM,T=w.LOG_CLIP,m=T+.5,f=T-.5,l=e(71828),t=l.segmentsIntersect,i=l.constrain,r=e(47581);D.exports=function(n,o){var a,u,p,c,b,d,v,x,g,y,k,h,M,A,C,L,O,I,R=o.trace||{},U=o.xaxis,B=o.yaxis,G=U.type==="log",N=B.type==="log",j=U._length,V=B._length,H=o.backoff,ee=R.marker,Q=o.connectGaps,Y=o.baseTolerance,X=o.shape,K=X==="linear",te=R.fill&&R.fill!=="none",ae=[],oe=r.minTolerance,se=n.length,fe=new Array(se),xe=0;function he(Nt){var Je=n[Nt];if(!Je)return!1;var Ke=o.linearized?U.l2p(Je.x):U.c2p(Je.x),Ge=o.linearized?B.l2p(Je.y):B.c2p(Je.y);if(Ke===s){if(G&&(Ke=U.c2p(Je.x,!0)),Ke===s)return!1;N&&Ge===s&&(Ke*=Math.abs(U._m*V*(U._m>0?m:f)/(B._m*j*(B._m>0?m:f)))),Ke*=1e3}if(Ge===s){if(N&&(Ge=B.c2p(Je.y,!0)),Ge===s)return!1;Ge*=1e3}return[Ke,Ge]}function de(Nt,Je,Ke,Ge){var nt=Ke-Nt,ht=Ge-Je,Oe=.5-Nt,Be=.5-Je,Qe=nt*nt+ht*ht,ut=nt*Oe+ht*Be;if(ut>0&&utEe||Nt[1]De)return[i(Nt[0],Te,Ee),i(Nt[1],Ue,De)]}function be(Nt,Je){return Nt[0]===Je[0]&&(Nt[0]===Te||Nt[0]===Ee)||Nt[1]===Je[1]&&(Nt[1]===Ue||Nt[1]===De)||void 0}function Se(Nt,Je,Ke){return function(Ge,nt){var ht=ge(Ge),Oe=ge(nt),Be=[];if(ht&&Oe&&be(ht,Oe))return Be;ht&&Be.push(ht),Oe&&Be.push(Oe);var Qe=2*l.constrain((Ge[Nt]+nt[Nt])/2,Je,Ke)-((ht||Ge)[Nt]+(Oe||nt)[Nt]);return Qe&&((ht&&Oe?Qe>0==ht[Nt]>Oe[Nt]?ht:Oe:ht||Oe)[Nt]+=Qe),Be}}function Ne(Nt){var Je=Nt[0],Ke=Nt[1],Ge=Je===fe[xe-1][0],nt=Ke===fe[xe-1][1];if(!Ge||!nt)if(xe>1){var ht=Je===fe[xe-2][0],Oe=Ke===fe[xe-2][1];Ge&&(Je===Te||Je===Ee)&&ht?Oe?xe--:fe[xe-1]=Nt:nt&&(Ke===Ue||Ke===De)&&Oe?ht?xe--:fe[xe-1]=Nt:fe[xe++]=Nt}else fe[xe++]=Nt}function Ye(Nt){fe[xe-1][0]!==Nt[0]&&fe[xe-1][1]!==Nt[1]&&Ne([Ae,Me]),Ne(Nt),Ce=null,Ae=Me=0}X==="linear"||X==="spline"?ue=function(Nt,Je){for(var Ke=[],Ge=0,nt=0;nt<4;nt++){var ht=je[nt],Oe=t(Nt[0],Nt[1],Je[0],Je[1],ht[0],ht[1],ht[2],ht[3]);Oe&&(!Ge||Math.abs(Oe.x-Ke[0][0])>1||Math.abs(Oe.y-Ke[0][1])>1)&&(Oe=[Oe.x,Oe.y],Ge&&ye(Oe,Nt)Ee?Ee:0,we=Nt[1]De?De:0,Re||we){if(xe)if(Ce){var Je=ue(Ce,Nt);Je.length>1&&(Ye(Je[0]),fe[xe++]=Je[1])}else ne=ue(fe[xe-1],Nt)[0],fe[xe++]=ne;else fe[xe++]=[Re||Nt[0],we||Nt[1]];var Ke=fe[xe-1];Re&&we&&(Ke[0]!==Re||Ke[1]!==we)?(Ce&&(Ae!==Re&&Me!==we?Ne(Ae&&Me?(Ge=Ce,ht=(nt=Nt)[0]-Ge[0],Oe=(nt[1]-Ge[1])/ht,(Ge[1]*nt[0]-nt[1]*Ge[0])/ht>0?[Oe>0?Te:Ee,De]:[Oe>0?Ee:Te,Ue]):[Ae||Re,Me||we]):Ae&&Me&&Ne([Ae,Me])),Ne([Re,we])):Ae-Re&&Me-we&&Ne([Re||Ae,we||Me]),Ce=Nt,Ae=Re,Me=we}else Ce&&Ye(ue(Ce,Nt)[0]),fe[xe++]=Nt;var Ge,nt,ht,Oe}for(a=0;ape(d,ot))break;p=d,(M=g[0]*x[0]+g[1]*x[1])>k?(k=M,c=d,v=!1):M=n.length||!d)break;st(d),u=d}}else st(c)}Ce&&Ne([Ae||Ce[0],Me||Ce[1]]),ae.push(fe.slice(0,xe))}var ft=X.slice(X.length-1);if(H&&ft!=="h"&&ft!=="v"){for(var yt=!1,Et=-1,Tt=[],xt=0;xt=0?l=o:(l=o=n,n++),l0?Math.max(i,f):0}}},4898:function(D){D.exports={container:"marker",min:"cmin",max:"cmax"}},49508:function(D,E,e){var _=e(7901),w=e(52075).hasColorscale,s=e(1586),T=e(34098);D.exports=function(m,f,l,t,i,r){var n=T.isBubble(m),o=(m.line||{}).color;r=r||{},o&&(l=o),i("marker.symbol"),i("marker.opacity",n?.7:1),i("marker.size"),r.noAngle||(i("marker.angle"),r.noAngleRef||i("marker.angleref"),r.noStandOff||i("marker.standoff")),i("marker.color",l),w(m,"marker")&&s(m,f,t,i,{prefix:"marker.",cLetter:"c"}),r.noSelect||(i("selected.marker.color"),i("unselected.marker.color"),i("selected.marker.size"),i("unselected.marker.size")),r.noLine||(i("marker.line.color",o&&!Array.isArray(o)&&f.marker.color!==o?o:n?_.background:_.defaultLine),w(m,"marker.line")&&s(m,f,t,i,{prefix:"marker.line.",cLetter:"c"}),i("marker.line.width",n?1:0)),n&&(i("marker.sizeref"),i("marker.sizemin"),i("marker.sizemode")),r.gradient&&i("marker.gradient.type")!=="none"&&i("marker.gradient.color")}},73927:function(D,E,e){var _=e(71828).dateTick0,w=e(50606).ONEWEEK;function s(T,m){return _(m,T%w==0?1:0)}D.exports=function(T,m,f,l,t){if(t||(t={x:!0,y:!0}),t.x){var i=l("xperiod");i&&(l("xperiod0",s(i,m.xcalendar)),l("xperiodalignment"))}if(t.y){var r=l("yperiod");r&&(l("yperiod0",s(r,m.ycalendar)),l("yperiodalignment"))}}},32663:function(D,E,e){var _=e(39898),w=e(73972),s=e(71828),T=s.ensureSingle,m=s.identity,f=e(91424),l=e(34098),t=e(34621),i=e(68687),r=e(61082).tester;function n(o,a,u,p,c,b,d){var v,x=o._context.staticPlot;(function(ue,me,Te,Ee,Ue){var De=Te.xaxis,je=Te.yaxis,ge=_.extent(s.simpleMap(De.range,De.r2c)),be=_.extent(s.simpleMap(je.range,je.r2c)),Se=Ee[0].trace;if(l.hasMarkers(Se)){var Ne=Se.marker.maxdisplayed;if(Ne!==0){var Ye=Ee.filter(function(ft){return ft.x>=ge[0]&&ft.x<=ge[1]&&ft.y>=be[0]&&ft.y<=be[1]}),Ze=Math.ceil(Ye.length/Ne),st=0;Ue.forEach(function(ft,yt){var Et=ft[0].trace;l.hasMarkers(Et)&&Et.marker.maxdisplayed>0&&yt0;function y(ue){return g?ue.transition():ue}var k=u.xaxis,h=u.yaxis,M=p[0].trace,A=M.line,C=_.select(b),L=T(C,"g","errorbars"),O=T(C,"g","lines"),I=T(C,"g","points"),R=T(C,"g","text");if(w.getComponentMethod("errorbars","plot")(o,L,u,d),M.visible===!0){var U,B;y(C).style("opacity",M.opacity);var G=M.fill.charAt(M.fill.length-1);G!=="x"&&G!=="y"&&(G=""),p[0][u.isRangePlot?"nodeRangePlot3":"node3"]=C;var N,j,V="",H=[],ee=M._prevtrace;ee&&(V=ee._prevRevpath||"",B=ee._nextFill,H=ee._polygons);var Q,Y,X,K,te,ae,oe,se="",fe="",xe=[],he=s.noop;if(U=M._ownFill,l.hasLines(M)||M.fill!=="none"){for(B&&B.datum(p),["hv","vh","hvh","vhv"].indexOf(A.shape)!==-1?(Q=f.steps(A.shape),Y=f.steps(A.shape.split("").reverse().join(""))):Q=Y=A.shape==="spline"?function(ue){var me=ue[ue.length-1];return ue.length>1&&ue[0][0]===me[0]&&ue[0][1]===me[1]?f.smoothclosed(ue.slice(1),A.smoothing):f.smoothopen(ue,A.smoothing)}:function(ue){return"M"+ue.join("L")},X=function(ue){return Y(ue.reverse())},xe=t(p,{xaxis:k,yaxis:h,trace:M,connectGaps:M.connectgaps,baseTolerance:Math.max(A.width||1,3)/4,shape:A.shape,backoff:A.backoff,simplify:A.simplify,fill:M.fill}),oe=M._polygons=new Array(xe.length),v=0;v0,y=i(o,a,u);(d=p.selectAll("g.trace").data(y,function(k){return k[0].trace.uid})).enter().append("g").attr("class",function(k){return"trace scatter trace"+k[0].trace.uid}).style("stroke-miterlimit",2),d.order(),function(k,h,M){h.each(function(A){var C=T(_.select(this),"g","fills");f.setClipUrl(C,M.layerClipId,k);var L=A[0].trace,O=[];L._ownfill&&O.push("_ownFill"),L._nexttrace&&O.push("_nextFill");var I=C.selectAll("g").data(O,m);I.enter().append("g"),I.exit().each(function(R){L[R]=null}).remove(),I.order().each(function(R){L[R]=T(_.select(this),"path","js-fill")})})}(o,d,a),g?(b&&(v=b()),_.transition().duration(c.duration).ease(c.easing).each("end",function(){v&&v()}).each("interrupt",function(){v&&v()}).each(function(){p.selectAll("g.trace").each(function(k,h){n(o,h,a,k,y,this,c)})})):d.each(function(k,h){n(o,h,a,k,y,this,c)}),x&&d.exit().remove(),p.selectAll("path:not([d])").remove()}},98002:function(D,E,e){var _=e(34098);D.exports=function(w,s){var T,m,f,l,t=w.cd,i=w.xaxis,r=w.yaxis,n=[],o=t[0].trace;if(!_.hasMarkers(o)&&!_.hasText(o))return[];if(s===!1)for(T=0;T0){var u=f.c2l(o);f._lowerLogErrorBound||(f._lowerLogErrorBound=u),f._lowerErrorBound=Math.min(f._lowerLogErrorBound,u)}}else t[i]=[-r[0]*m,r[1]*m]}return t}D.exports=function(s,T,m){var f=[w(s.x,s.error_x,T[0],m.xaxis),w(s.y,s.error_y,T[1],m.yaxis),w(s.z,s.error_z,T[2],m.zaxis)],l=function(a){for(var u=0;u-1?-1:h.indexOf("right")>-1?1:0}function d(h){return h==null?0:h.indexOf("top")>-1?-1:h.indexOf("bottom")>-1?1:0}function v(h,M){return M(4*h)}function x(h){return n[h]}function g(h,M,A,C,L){var O=null;if(f.isArrayOrTypedArray(h)){O=[];for(var I=0;I=0){var B=function(G,N,j){var V,H=(j+1)%3,ee=(j+2)%3,Q=[],Y=[];for(V=0;V=0&&o("surfacecolor",u||p);for(var c=["x","y","z"],b=0;b<3;++b){var d="projection."+c[b];o(d+".show")&&(o(d+".opacity"),o(d+".scale"))}var v=_.getComponentMethod("errorbars","supplyDefaults");v(t,i,u||p||r,{axis:"z"}),v(t,i,u||p||r,{axis:"y",inherit:"z"}),v(t,i,u||p||r,{axis:"x",inherit:"z"})}else i.visible=!1}},13551:function(D,E,e){D.exports={plot:e(58925),attributes:e(44542),markerSymbols:e(87381),supplyDefaults:e(21428),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:e(36563),moduleType:"trace",name:"scatter3d",basePlotModule:e(58547),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}},97001:function(D,E,e){var _=e(82196),w=e(9012),s=e(5386).fF,T=e(5386).si,m=e(50693),f=e(1426).extendFlat,l=_.marker,t=_.line,i=l.line;D.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:f({},_.mode,{dflt:"markers"}),text:f({},_.text,{}),texttemplate:T({editType:"plot"},{keys:["a","b","text"]}),hovertext:f({},_.hovertext,{}),line:{color:t.color,width:t.width,dash:t.dash,backoff:t.backoff,shape:f({},t.shape,{values:["linear","spline"]}),smoothing:t.smoothing,editType:"calc"},connectgaps:_.connectgaps,fill:f({},_.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:_.fillcolor,marker:f({symbol:l.symbol,opacity:l.opacity,maxdisplayed:l.maxdisplayed,angle:l.angle,angleref:l.angleref,standoff:l.standoff,size:l.size,sizeref:l.sizeref,sizemin:l.sizemin,sizemode:l.sizemode,line:f({width:i.width,editType:"calc"},m("marker.line")),gradient:l.gradient,editType:"calc"},m("marker")),textfont:_.textfont,textposition:_.textposition,selected:_.selected,unselected:_.unselected,hoverinfo:f({},w.hoverinfo,{flags:["a","b","text","name"]}),hoveron:_.hoveron,hovertemplate:s()}},34618:function(D,E,e){var _=e(92770),w=e(36922),s=e(75225),T=e(66279),m=e(47761).calcMarkerSize,f=e(22882);D.exports=function(l,t){var i=t._carpetTrace=f(l,t);if(i&&i.visible&&i.visible!=="legendonly"){var r;t.xaxis=i.xaxis,t.yaxis=i.yaxis;var n,o,a=t._length,u=new Array(a),p=!1;for(r=0;r")}return l}function v(x,g){var y;y=x.labelprefix&&x.labelprefix.length>0?x.labelprefix.replace(/ = $/,""):x._hovertitle,b.push(y+": "+g.toFixed(3)+x.labelsuffix)}}},46858:function(D,E,e){D.exports={attributes:e(97001),supplyDefaults:e(98965),colorbar:e(4898),formatLabels:e(48953),calc:e(34618),plot:e(1913),style:e(16296).style,styleOnSelect:e(16296).styleOnSelect,hoverPoints:e(22931),selectPoints:e(98002),eventData:e(16165),moduleType:"trace",name:"scattercarpet",basePlotModule:e(93612),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}},1913:function(D,E,e){var _=e(32663),w=e(89298),s=e(91424);D.exports=function(T,m,f,l){var t,i,r,n=f[0][0].carpet,o=w.getFromId(T,n.xaxis||"x"),a=w.getFromId(T,n.yaxis||"y"),u={xaxis:o,yaxis:a,plot:m.plot};for(t=0;t")}function B(G){return G+"°"}}(r,c,f,i[0].t.labels),f.hovertemplate=r.hovertemplate,[f]}}},17988:function(D,E,e){D.exports={attributes:e(19316),supplyDefaults:e(10659),colorbar:e(4898),formatLabels:e(82719),calc:e(84622),calcGeoJSON:e(89171).calcGeoJSON,plot:e(89171).plot,style:e(33095),styleOnSelect:e(16296).styleOnSelect,hoverPoints:e(14977),eventData:e(84084),selectPoints:e(20548),moduleType:"trace",name:"scattergeo",basePlotModule:e(44622),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}},89171:function(D,E,e){var _=e(39898),w=e(71828),s=e(90973).getTopojsonFeatures,T=e(18214),m=e(41327),f=e(71739).findExtremes,l=e(50606).BADNUM,t=e(47761).calcMarkerSize,i=e(34098),r=e(33095);D.exports={calcGeoJSON:function(n,o){var a,u,p=n[0].trace,c=o[p.geo],b=c._subplot,d=p._length;if(Array.isArray(p.locations)){var v=p.locationmode,x=v==="geojson-id"?m.extractTraceFeature(n):s(p,b.topojson);for(a=0;a=u,M=2*k,A={},C=x.makeCalcdata(b,"x"),L=g.makeCalcdata(b,"y"),O=m(b,x,"x",C),I=m(b,g,"y",L),R=O.vals,U=I.vals;b._x=R,b._y=U,b.xperiodalignment&&(b._origX=C,b._xStarts=O.starts,b._xEnds=O.ends),b.yperiodalignment&&(b._origY=L,b._yStarts=I.starts,b._yEnds=I.ends);var B=new Array(M),G=new Array(k);for(d=0;d1&&w.extendFlat(te.line,n.linePositions(H,Q,Y)),te.errorX||te.errorY){var ae=n.errorBarPositions(H,Q,Y,X,K);te.errorX&&w.extendFlat(te.errorX,ae.x),te.errorY&&w.extendFlat(te.errorY,ae.y)}return te.text&&(w.extendFlat(te.text,{positions:Y},n.textPosition(H,Q,te.text,te.marker)),w.extendFlat(te.textSel,{positions:Y},n.textPosition(H,Q,te.text,te.markerSel)),w.extendFlat(te.textUnsel,{positions:Y},n.textPosition(H,Q,te.text,te.markerUnsel))),te}(c,0,b,B,R,U),V=o(c,y);return i(v,b),h?j.marker&&(N=j.marker.sizeAvg||Math.max(j.marker.size,3)):N=l(b,k),t(c,b,x,g,R,U,N),j.errorX&&p(b,x,j.errorX),j.errorY&&p(b,g,j.errorY),j.fill&&!V.fill2d&&(V.fill2d=!0),j.marker&&!V.scatter2d&&(V.scatter2d=!0),j.line&&!V.line2d&&(V.line2d=!0),!j.errorX&&!j.errorY||V.error2d||(V.error2d=!0),j.text&&!V.glText&&(V.glText=!0),j.marker&&(j.marker.snap=k),V.lineOptions.push(j.line),V.errorXOptions.push(j.errorX),V.errorYOptions.push(j.errorY),V.fillOptions.push(j.fill),V.markerOptions.push(j.marker),V.markerSelectedOptions.push(j.markerSel),V.markerUnselectedOptions.push(j.markerUnsel),V.textOptions.push(j.text),V.textSelectedOptions.push(j.textSel),V.textUnselectedOptions.push(j.textUnsel),V.selectBatch.push([]),V.unselectBatch.push([]),A._scene=V,A.index=V.count,A.x=R,A.y=U,A.positions=B,V.count++,[{x:!1,y:!1,t:A,trace:b}]}},78232:function(D){D.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:20,SYMBOL_STROKE:1,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]}}},19635:function(D,E,e){var _=e(92770),w=e(82019),s=e(25075),T=e(73972),m=e(71828),f=e(91424),l=e(41675),t=e(81697).formatColor,i=e(34098),r=e(39984),n=e(68645),o=e(78232),a=e(37822).DESELECTDIM,u={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},p=e(23469).appendArrayPointValue;function c(C,L){var O,I=C._fullLayout,R=L._length,U=L.textfont,B=L.textposition,G=Array.isArray(B)?B:[B],N=U.color,j=U.size,V=U.family,H={},ee=C._context.plotGlPixelRatio,Q=L.texttemplate;if(Q){H.text=[];var Y=I._d3locale,X=Array.isArray(Q),K=X?Math.min(Q.length,R):R,te=X?function(de){return Q[de]}:function(){return Q};for(O=0;Oo.TOO_MANY_POINTS||i.hasMarkers(L)?"rect":"round";if(j&&L.connectgaps){var H=I[0],ee=I[1];for(R=0;R1?N[R]:N[0]:N,Q=Array.isArray(j)?j.length>1?j[R]:j[0]:j,Y=u[ee],X=u[Q],K=V?V/.8+1:0,te=-X*K-.5*X;B.offset[R]=[Y*K/H,te/H]}}return B}}},47148:function(D,E,e){var _=e(71828),w=e(73972),s=e(68645),T=e(42341),m=e(47581),f=e(34098),l=e(67513),t=e(73927),i=e(49508),r=e(11058),n=e(28908),o=e(82410);D.exports=function(a,u,p,c){function b(M,A){return _.coerce(a,u,T,M,A)}var d=!!a.marker&&s.isOpenSymbol(a.marker.symbol),v=f.isBubble(a),x=l(a,u,c,b);if(x){t(a,u,c,b),b("xhoverformat"),b("yhoverformat");var g=x100},E.isDotSymbol=function(w){return typeof w=="string"?_.DOT_RE.test(w):w>200}},20794:function(D,E,e){var _=e(73972),w=e(71828),s=e(34603);function T(m,f,l,t){var i=m.xa,r=m.ya,n=m.distance,o=m.dxy,a=m.index,u={pointNumber:a,x:f[a],y:l[a]};u.tx=Array.isArray(t.text)?t.text[a]:t.text,u.htx=Array.isArray(t.hovertext)?t.hovertext[a]:t.hovertext,u.data=Array.isArray(t.customdata)?t.customdata[a]:t.customdata,u.tp=Array.isArray(t.textposition)?t.textposition[a]:t.textposition;var p=t.textfont;p&&(u.ts=w.isArrayOrTypedArray(p.size)?p.size[a]:p.size,u.tc=Array.isArray(p.color)?p.color[a]:p.color,u.tf=Array.isArray(p.family)?p.family[a]:p.family);var c=t.marker;c&&(u.ms=w.isArrayOrTypedArray(c.size)?c.size[a]:c.size,u.mo=w.isArrayOrTypedArray(c.opacity)?c.opacity[a]:c.opacity,u.mx=w.isArrayOrTypedArray(c.symbol)?c.symbol[a]:c.symbol,u.ma=w.isArrayOrTypedArray(c.angle)?c.angle[a]:c.angle,u.mc=w.isArrayOrTypedArray(c.color)?c.color[a]:c.color);var b=c&&c.line;b&&(u.mlc=Array.isArray(b.color)?b.color[a]:b.color,u.mlw=w.isArrayOrTypedArray(b.width)?b.width[a]:b.width);var d=c&&c.gradient;d&&d.type!=="none"&&(u.mgt=Array.isArray(d.type)?d.type[a]:d.type,u.mgc=Array.isArray(d.color)?d.color[a]:d.color);var v=i.c2p(u.x,!0),x=r.c2p(u.y,!0),g=u.mrc||1,y=t.hoverlabel;y&&(u.hbg=Array.isArray(y.bgcolor)?y.bgcolor[a]:y.bgcolor,u.hbc=Array.isArray(y.bordercolor)?y.bordercolor[a]:y.bordercolor,u.hts=w.isArrayOrTypedArray(y.font.size)?y.font.size[a]:y.font.size,u.htc=Array.isArray(y.font.color)?y.font.color[a]:y.font.color,u.htf=Array.isArray(y.font.family)?y.font.family[a]:y.font.family,u.hnl=w.isArrayOrTypedArray(y.namelength)?y.namelength[a]:y.namelength);var k=t.hoverinfo;k&&(u.hi=Array.isArray(k)?k[a]:k);var h=t.hovertemplate;h&&(u.ht=Array.isArray(h)?h[a]:h);var M={};M[m.index]=u;var A=t._origX,C=t._origY,L=w.extendFlat({},m,{color:s(t,u),x0:v-g,x1:v+g,xLabelVal:A?A[a]:u.x,y0:x-g,y1:x+g,yLabelVal:C?C[a]:u.y,cd:M,distance:n,spikeDistance:o,hovertemplate:u.ht});return u.htx?L.text=u.htx:u.tx?L.text=u.tx:t.text&&(L.text=t.text),w.fillText(u,t,L),_.getComponentMethod("errorbars","hoverInfo")(u,t,L),L}D.exports={hoverPoints:function(m,f,l,t){var i,r,n,o,a,u,p,c,b,d,v=m.cd,x=v[0].t,g=v[0].trace,y=m.xa,k=m.ya,h=x.x,M=x.y,A=y.c2p(f),C=k.c2p(l),L=m.distance;if(x.tree){var O=y.p2c(A-L),I=y.p2c(A+L),R=k.p2c(C-L),U=k.p2c(C+L);i=t==="x"?x.tree.range(Math.min(O,I),Math.min(k._rl[0],k._rl[1]),Math.max(O,I),Math.max(k._rl[0],k._rl[1])):x.tree.range(Math.min(O,I),Math.min(R,U),Math.max(O,I),Math.max(R,U))}else i=x.ids;var B=L;if(t==="x"){var G=!!g.xperiodalignment,N=!!g.yperiodalignment;for(u=0;u=Math.min(j,V)&&A<=Math.max(j,V)?0:1/0}if(p=Math.min(H,ee)&&C<=Math.max(H,ee)?0:1/0}d=Math.sqrt(p*p+c*c),n=i[u]}}}else for(u=i.length-1;u>-1;u--)o=h[r=i[u]],a=M[r],p=y.c2p(o)-A,c=k.c2p(a)-C,(b=Math.sqrt(p*p+c*c))v.glText.length){var h=y-v.glText.length;for(c=0;cse&&(isNaN(oe[fe])||isNaN(oe[fe+1]));)fe-=2;ae.positions=oe.slice(se,fe+2)}return ae}),v.line2d.update(v.lineOptions)),v.error2d){var A=(v.errorXOptions||[]).concat(v.errorYOptions||[]);v.error2d.update(A)}v.scatter2d&&v.scatter2d.update(v.markerOptions),v.fillOrder=m.repeat(null,y),v.fill2d&&(v.fillOptions=v.fillOptions.map(function(ae,oe){var se=p[oe];if(ae&&se&&se[0]&&se[0].trace){var fe,xe,he=se[0],de=he.trace,pe=he.t,ye=v.lineOptions[oe],Re=[];de._ownfill&&Re.push(oe),de._nexttrace&&Re.push(oe+1),Re.length&&(v.fillOrder[oe]=Re);var we,Ae,Me=[],Ce=ye&&ye.positions||pe.positions;if(de.fill==="tozeroy"){for(we=0;wewe&&isNaN(Ce[Ae+1]);)Ae-=2;Ce[we+1]!==0&&(Me=[Ce[we],0]),Me=Me.concat(Ce.slice(we,Ae+2)),Ce[Ae+1]!==0&&(Me=Me.concat([Ce[Ae],0]))}else if(de.fill==="tozerox"){for(we=0;wewe&&isNaN(Ce[Ae]);)Ae-=2;Ce[we]!==0&&(Me=[0,Ce[we+1]]),Me=Me.concat(Ce.slice(we,Ae+2)),Ce[Ae]!==0&&(Me=Me.concat([0,Ce[Ae+1]]))}else if(de.fill==="toself"||de.fill==="tonext"){for(Me=[],fe=0,ae.splitNull=!0,xe=0;xe-1;for(c=0;c")}function b(d){return d+"°"}}D.exports={hoverPoints:function(t,i,r){var n=t.cd,o=n[0].trace,a=t.xa,u=t.ya,p=t.subplot,c=[],b=f+o.uid+"-circle",d=o.cluster&&o.cluster.enabled;if(d){var v=p.map.queryRenderedFeatures(null,{layers:[b]});c=v.map(function(I){return I.id})}var x=360*(i>=0?Math.floor((i+180)/360):Math.ceil((i-180)/360)),g=i-x;if(_.getClosest(n,function(I){var R=I.lonlat;if(R[0]===m||d&&c.indexOf(I.i+1)===-1)return 1/0;var U=w.modHalf(R[0],360),B=R[1],G=p.project([U,B]),N=G.x-a.c2p([g,B]),j=G.y-u.c2p([U,r]),V=Math.max(3,I.mrc||0);return Math.max(Math.sqrt(N*N+j*j)-V,1-3/V)},t),t.index!==!1){var y=n[t.index],k=y.lonlat,h=[w.modHalf(k[0],360)+x,k[1]],M=a.c2p(h),A=u.c2p(h),C=y.mrc||1;t.x0=M-C,t.x1=M+C,t.y0=A-C,t.y1=A+C;var L={};L[o.subplot]={_subplot:p};var O=o._module.formatLabels(y,o,L);return t.lonLabel=O.lonLabel,t.latLabel=O.latLabel,t.color=s(o,y),t.extraText=l(o,y,n[0].t.labels),t.hovertemplate=o.hovertemplate,[t]}},getExtraText:l}},20467:function(D,E,e){D.exports={attributes:e(99181),supplyDefaults:e(76645),colorbar:e(4898),formatLabels:e(15636),calc:e(84622),plot:e(86951),hoverPoints:e(28178).hoverPoints,eventData:e(53353),selectPoints:e(86387),styleOnSelect:function(_,w){w&&w[0].trace._glTrace.update(w)},moduleType:"trace",name:"scattermapbox",basePlotModule:e(50101),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}},86951:function(D,E,e){var _=e(71828),w=e(15790),s=e(77734).traceLayerPrefix,T={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function m(l,t,i,r){this.type="scattermapbox",this.subplot=l,this.uid=t,this.clusterEnabled=i,this.isHidden=r,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:s+t+"-fill",line:s+t+"-line",circle:s+t+"-circle",symbol:s+t+"-symbol",cluster:s+t+"-cluster",clusterCount:s+t+"-cluster-count"},this.below=null}var f=m.prototype;f.addSource=function(l,t,i){var r={type:"geojson",data:t.geojson};i&&i.enabled&&_.extendFlat(r,{cluster:!0,clusterMaxZoom:i.maxzoom});var n=this.subplot.map.getSource(this.sourceIds[l]);n?n.setData(t.geojson):this.subplot.map.addSource(this.sourceIds[l],r)},f.setSourceData=function(l,t){this.subplot.map.getSource(this.sourceIds[l]).setData(t.geojson)},f.addLayer=function(l,t,i){var r={type:t.type,id:this.layerIds[l],source:this.sourceIds[l],layout:t.layout,paint:t.paint};t.filter&&(r.filter=t.filter);for(var n,o=this.layerIds[l],a=this.subplot.getMapLayers(),u=0;u=0;h--){var M=k[h];r.removeLayer(p.layerIds[M])}y||r.removeSource(p.sourceIds.circle)}(g):function(y){for(var k=T.nonCluster,h=k.length-1;h>=0;h--){var M=k[h];r.removeLayer(p.layerIds[M]),y||r.removeSource(p.sourceIds[M])}}(g)}function b(g){a?function(y){y||p.addSource("circle",n.circle,t.cluster);for(var k=T.cluster,h=0;h=0;i--){var r=t[i];l.removeLayer(this.layerIds[r]),l.removeSource(this.sourceIds[r])}},D.exports=function(l,t){var i,r,n,o=t[0].trace,a=o.cluster&&o.cluster.enabled,u=o.visible!==!0,p=new m(l,o.uid,a,u),c=w(l.gd,t),b=p.below=l.belowLookup["trace-"+o.uid];if(a)for(p.addSource("circle",c.circle,o.cluster),i=0;i")}}D.exports={hoverPoints:function(s,T,m,f){var l=_(s,T,m,f);if(l&&l[0].index!==!1){var t=l[0];if(t.index===void 0)return l;var i=s.subplot,r=t.cd[t.index],n=t.trace;if(i.isPtInside(r))return t.xLabelVal=void 0,t.yLabelVal=void 0,w(r,n,i,t),t.hovertemplate=n.hovertemplate,l}},makeHoverPointText:w}},91271:function(D,E,e){D.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:e(23580),categories:["polar","symbols","showLegend","scatter-like"],attributes:e(81245),supplyDefaults:e(22184).supplyDefaults,colorbar:e(4898),formatLabels:e(98608),calc:e(26442),plot:e(45162),style:e(16296).style,styleOnSelect:e(16296).styleOnSelect,hoverPoints:e(59150).hoverPoints,selectPoints:e(98002),meta:{}}},45162:function(D,E,e){var _=e(32663),w=e(50606).BADNUM;D.exports=function(s,T,m){for(var f=T.layers.frontplot.select("g.scatterlayer"),l=T.xaxis,t=T.yaxis,i={xaxis:l,yaxis:t,plot:T.framework,layerClipId:T._hasClipOnAxisFalse?T.clipIds.forTraces:null},r=T.radialAxis,n=T.angularAxis,o=0;o=l&&(y.marker.cluster=d.tree),y.marker&&(y.markerSel.positions=y.markerUnsel.positions=y.marker.positions=M),y.line&&M.length>1&&f.extendFlat(y.line,m.linePositions(t,b,M)),y.text&&(f.extendFlat(y.text,{positions:M},m.textPosition(t,b,y.text,y.marker)),f.extendFlat(y.textSel,{positions:M},m.textPosition(t,b,y.text,y.markerSel)),f.extendFlat(y.textUnsel,{positions:M},m.textPosition(t,b,y.text,y.markerUnsel))),y.fill&&!a.fill2d&&(a.fill2d=!0),y.marker&&!a.scatter2d&&(a.scatter2d=!0),y.line&&!a.line2d&&(a.line2d=!0),y.text&&!a.glText&&(a.glText=!0),a.lineOptions.push(y.line),a.fillOptions.push(y.fill),a.markerOptions.push(y.marker),a.markerSelectedOptions.push(y.markerSel),a.markerUnselectedOptions.push(y.markerUnsel),a.textOptions.push(y.text),a.textSelectedOptions.push(y.textSel),a.textUnselectedOptions.push(y.textUnsel),a.selectBatch.push([]),a.unselectBatch.push([]),d.x=A,d.y=C,d.rawx=A,d.rawy=C,d.r=x,d.theta=g,d.positions=M,d._scene=a,d.index=a.count,a.count++}}),s(t,i,r)}},D.exports.reglPrecompiled={}},48300:function(D,E,e){var _=e(5386).fF,w=e(5386).si,s=e(1426).extendFlat,T=e(82196),m=e(9012),f=T.line;D.exports={mode:T.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:T.text,texttemplate:w({editType:"plot"},{keys:["real","imag","text"]}),hovertext:T.hovertext,line:{color:f.color,width:f.width,dash:f.dash,backoff:f.backoff,shape:s({},f.shape,{values:["linear","spline"]}),smoothing:f.smoothing,editType:"calc"},connectgaps:T.connectgaps,marker:T.marker,cliponaxis:s({},T.cliponaxis,{dflt:!1}),textposition:T.textposition,textfont:T.textfont,fill:s({},T.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:T.fillcolor,hoverinfo:s({},m.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:T.hoveron,hovertemplate:_(),selected:T.selected,unselected:T.unselected}},30621:function(D,E,e){var _=e(92770),w=e(50606).BADNUM,s=e(36922),T=e(75225),m=e(66279),f=e(47761).calcMarkerSize;D.exports=function(l,t){for(var i=l._fullLayout,r=t.subplot,n=i[r].realaxis,o=i[r].imaginaryaxis,a=n.makeCalcdata(t,"real"),u=o.makeCalcdata(t,"imag"),p=t._length,c=new Array(p),b=0;b")}}D.exports={hoverPoints:function(s,T,m,f){var l=_(s,T,m,f);if(l&&l[0].index!==!1){var t=l[0];if(t.index===void 0)return l;var i=s.subplot,r=t.cd[t.index],n=t.trace;if(i.isPtInside(r))return t.xLabelVal=void 0,t.yLabelVal=void 0,w(r,n,i,t),t.hovertemplate=n.hovertemplate,l}},makeHoverPointText:w}},85956:function(D,E,e){D.exports={moduleType:"trace",name:"scattersmith",basePlotModule:e(7504),categories:["smith","symbols","showLegend","scatter-like"],attributes:e(48300),supplyDefaults:e(65269),colorbar:e(4898),formatLabels:e(62047),calc:e(30621),plot:e(12480),style:e(16296).style,styleOnSelect:e(16296).styleOnSelect,hoverPoints:e(11350).hoverPoints,selectPoints:e(98002),meta:{}}},12480:function(D,E,e){var _=e(32663),w=e(50606).BADNUM,s=e(23893).smith;D.exports=function(T,m,f){for(var l=m.layers.frontplot.select("g.scatterlayer"),t=m.xaxis,i=m.yaxis,r={xaxis:t,yaxis:i,plot:m.framework,layerClipId:m._hasClipOnAxisFalse?m.clipIds.forTraces:null},n=0;n"),l.hovertemplate=a.hovertemplate,f}function x(g,y){d.push(g._hovertitle+": "+y)}}},52979:function(D,E,e){D.exports={attributes:e(50413),supplyDefaults:e(46008),colorbar:e(4898),formatLabels:e(93645),calc:e(54337),plot:e(7507),style:e(16296).style,styleOnSelect:e(16296).styleOnSelect,hoverPoints:e(47250),selectPoints:e(98002),eventData:e(4524),moduleType:"trace",name:"scatterternary",basePlotModule:e(61639),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}},7507:function(D,E,e){var _=e(32663);D.exports=function(w,s,T){var m=s.plotContainer;m.select(".scatterlayer").selectAll("*").remove();for(var f=s.xaxis,l=s.yaxis,t={xaxis:f,yaxis:l,plot:m,layerClipId:s._hasClipOnAxisFalse?s.clipIdRelative:null},i=s.layers.frontplot.select("g.scatterlayer"),r=0;rr?g.sizeAvg||Math.max(g.size,3):s(o,x),u=0;uM&&L||h-1,B=!0;if(T(g)||p.selectedpoints||U){var G=p._length;if(p.selectedpoints){b.selectBatch=p.selectedpoints;var N=p.selectedpoints,j={};for(r=0;r1&&(u=v[y-1],c=x[y-1],d=g[y-1]),l=0;lu?"-":"+")+"x")).replace("y",(p>c?"-":"+")+"y")).replace("z",(b>d?"-":"+")+"z");var B=function(){y=0,I=[],R=[],U=[]};(!y||y2?a.slice(1,u-1):u===2?[(a[0]+a[1])/2]:a}function n(a){var u=a.length;return u===1?[.5,.5]:[a[1]-a[0],a[u-1]-a[u-2]]}function o(a,u){var p=a.fullSceneLayout,c=a.dataScale,b=u._len,d={};function v(Q,Y){var X=p[Y],K=c[l[Y]];return s.simpleMap(Q,function(te){return X.d2l(te)*K})}if(d.vectors=f(v(u._u,"xaxis"),v(u._v,"yaxis"),v(u._w,"zaxis"),b),!b)return{positions:[],cells:[]};var x=v(u._Xs,"xaxis"),g=v(u._Ys,"yaxis"),y=v(u._Zs,"zaxis");if(d.meshgrid=[x,g,y],d.gridFill=u._gridFill,u._slen)d.startingPositions=f(v(u._startsX,"xaxis"),v(u._startsY,"yaxis"),v(u._startsZ,"zaxis"));else{for(var k=g[0],h=r(x),M=r(y),A=new Array(h.length*M.length),C=0,L=0;L=0};k?(p=Math.min(y.length,M.length),c=function(se){return R(y[se])&&U(se)},b=function(se){return String(y[se])}):(p=Math.min(h.length,M.length),c=function(se){return R(h[se])&&U(se)},b=function(se){return String(h[se])}),C&&(p=Math.min(p,A.length));for(var B=0;B1){for(var V=s.randstr(),H=0;H"),name:I||ee("name")?k.name:void 0,color:O("hoverlabel.bgcolor")||h.color,borderColor:O("hoverlabel.bordercolor"),fontFamily:O("hoverlabel.font.family"),fontSize:O("hoverlabel.font.size"),fontColor:O("hoverlabel.font.color"),nameLength:O("hoverlabel.namelength"),textAlign:O("hoverlabel.align"),hovertemplate:I,hovertemplateLabels:j,eventData:y};d&&(X.x0=B-x.rInscribed*x.rpx1,X.x1=B+x.rInscribed*x.rpx1,X.idealAlign=x.pxmid[0]<0?"left":"right"),v&&(X.x=B,X.idealAlign=B<0?"left":"right");var K=[];T.loneHover(X,{container:g._hoverlayer.node(),outerContainer:g._paper.node(),gd:o,inOut_bbox:K}),y[0].bbox=K[0],c._hasHoverLabel=!0}if(v){var te=r.select("path.surface");u.styleOne(te,x,k,{hovered:!0})}c._hasHoverEvent=!0,o.emit("plotly_hover",{points:y||[i(x,k,u.eventDataKeys)],event:_.event})}}),r.on("mouseout",function(x){var g=o._fullLayout,y=o._fullData[c.index],k=_.select(this).datum();if(c._hasHoverEvent&&(x.originalEvent=_.event,o.emit("plotly_unhover",{points:[i(k,y,u.eventDataKeys)],event:_.event}),c._hasHoverEvent=!1),c._hasHoverLabel&&(T.loneUnhover(g._hoverlayer.node()),c._hasHoverLabel=!1),v){var h=r.select("path.surface");u.styleOne(h,k,y,{hovered:!1})}}),r.on("click",function(x){var g=o._fullLayout,y=o._fullData[c.index],k=d&&(l.isHierarchyRoot(x)||l.isLeaf(x)),h=l.getPtId(x),M=l.isEntry(x)?l.findEntryWithChild(b,h):l.findEntryWithLevel(b,h),A=l.getPtId(M),C={points:[i(x,y,u.eventDataKeys)],event:_.event};k||(C.nextLevel=A);var L=f.triggerHandler(o,"plotly_"+c.type+"click",C);if(L!==!1&&g.hovermode&&(o._hoverdata=[i(x,y,u.eventDataKeys)],T.click(o,_.event)),!k&&L!==!1&&!o._dragging&&!o._transitioning){w.call("_storeDirectGUIEdit",y,g._tracePreGUI[y.uid],{level:y.level});var O={data:[{level:A}],traces:[c.index]},I={frame:{redraw:!1,duration:u.transitionTime},transition:{duration:u.transitionTime,easing:u.transitionEasing},mode:"immediate",fromcurrent:!0};T.loneUnhover(g._hoverlayer.node()),w.call("animate",o,O,I)}})}},2791:function(D,E,e){var _=e(71828),w=e(7901),s=e(6964),T=e(53581);function m(f){return f.data.data.pid}E.findEntryWithLevel=function(f,l){var t;return l&&f.eachAfter(function(i){if(E.getPtId(i)===l)return t=i.copy()}),t||f},E.findEntryWithChild=function(f,l){var t;return f.eachAfter(function(i){for(var r=i.children||[],n=0;n0)},E.getMaxDepth=function(f){return f.maxdepth>=0?f.maxdepth:1/0},E.isHeader=function(f,l){return!(E.isLeaf(f)||f.depth===l._maxDepth-1)},E.getParent=function(f,l){return E.findEntryWithLevel(f,m(l))},E.listPath=function(f,l){var t=f.parent;if(!t)return[];var i=l?[t.data[l]]:[t];return E.listPath(t,l).concat(i)},E.getPath=function(f){return E.listPath(f,"label").join("/")+"/"},E.formatValue=T.formatPieValue,E.formatPercent=function(f,l){var t=_.formatPercent(f,0);return t==="0%"&&(t=T.formatPiePercent(f,l)),t}},87619:function(D,E,e){D.exports={moduleType:"trace",name:"sunburst",basePlotModule:e(66888),categories:[],animatable:!0,attributes:e(57564),layoutAttributes:e(2654),supplyDefaults:e(17094),supplyLayoutDefaults:e(57034),calc:e(52147).calc,crossTraceCalc:e(52147).crossTraceCalc,plot:e(24714).plot,style:e(29969).style,colorbar:e(4898),meta:{}}},2654:function(D){D.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},57034:function(D,E,e){var _=e(71828),w=e(2654);D.exports=function(s,T){function m(f,l){return _.coerce(s,T,w,f,l)}m("sunburstcolorway",T.colorway),m("extendsunburstcolors")}},24714:function(D,E,e){var _=e(39898),w=e(674),s=e(81684).sX,T=e(91424),m=e(71828),f=e(63893),l=e(72597),t=l.recordMinTextSize,i=l.clearMinTextSize,r=e(14575),n=e(53581).getRotationAngle,o=r.computeTransform,a=r.transformInsideText,u=e(29969).styleOne,p=e(16688).resizeText,c=e(83523),b=e(7055),d=e(2791);function v(g,y,k,h){var M=g._context.staticPlot,A=g._fullLayout,C=!A.uniformtext.mode&&d.hasTransition(h),L=_.select(k).selectAll("g.slice"),O=y[0],I=O.trace,R=O.hierarchy,U=d.findEntryWithLevel(R,I.level),B=d.getMaxDepth(I),G=A._size,N=I.domain,j=G.w*(N.x[1]-N.x[0]),V=G.h*(N.y[1]-N.y[0]),H=.5*Math.min(j,V),ee=O.cx=G.l+G.w*(N.x[1]+N.x[0])/2,Q=O.cy=G.t+G.h*(1-N.y[0])-V/2;if(!U)return L.remove();var Y=null,X={};C&&L.each(function(Ce){X[d.getPtId(Ce)]={rpx0:Ce.rpx0,rpx1:Ce.rpx1,x0:Ce.x0,x1:Ce.x1,transform:Ce.transform},!Y&&d.isEntry(Ce)&&(Y=Ce)});var K=function(Ce){return w.partition().size([2*Math.PI,Ce.height+1])(Ce)}(U).descendants(),te=U.height+1,ae=0,oe=B;O.hasMultipleRoots&&d.isHierarchyRoot(U)&&(K=K.slice(1),te-=1,ae=1,oe+=1),K=K.filter(function(Ce){return Ce.y1<=oe});var se=n(I.rotation);se&&K.forEach(function(Ce){Ce.x0+=se,Ce.x1+=se});var fe=Math.min(te,B),xe=function(Ce){return(Ce-ae)/fe*H},he=function(Ce,ne){return[Ce*Math.cos(ne),-Ce*Math.sin(ne)]},de=function(Ce){return m.pathAnnulus(Ce.rpx0,Ce.rpx1,Ce.x0,Ce.x1,ee,Q)},pe=function(Ce){return ee+x(Ce)[0]*(Ce.transform.rCenter||0)+(Ce.transform.x||0)},ye=function(Ce){return Q+x(Ce)[1]*(Ce.transform.rCenter||0)+(Ce.transform.y||0)};(L=L.data(K,d.getPtId)).enter().append("g").classed("slice",!0),C?L.exit().transition().each(function(){var Ce=_.select(this);Ce.select("path.surface").transition().attrTween("d",function(ne){var ue=function(me){var Te,Ee=d.getPtId(me),Ue=X[Ee],De=X[d.getPtId(U)];if(De){var je=(me.x1>De.x1?2*Math.PI:0)+se;Te=me.rpx1Re?2*Math.PI:0)+se;Se={x0:Ze,x1:Ze}}else Se={rpx0:H,rpx1:H},m.extendFlat(Se,Me(be));else Se={rpx0:0,rpx1:0};else Se={x0:se,x1:se};return s(Se,Ye)}(je);return function(be){return de(ge(be))}}):ue.attr("d",de),ne.call(c,U,g,y,{eventDataKeys:b.eventDataKeys,transitionTime:b.CLICK_TRANSITION_TIME,transitionEasing:b.CLICK_TRANSITION_EASING}).call(d.setSliceCursor,g,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:g._transitioning}),ue.call(u,Ce,I);var me=m.ensureSingle(ne,"g","slicetext"),Te=m.ensureSingle(me,"text","",function(je){je.attr("data-notex",1)}),Ee=m.ensureUniformFontSize(g,d.determineTextFont(I,Ce,A.font));Te.text(E.formatSliceLabel(Ce,U,I,y,A)).classed("slicetext",!0).attr("text-anchor","middle").call(T.font,Ee).call(f.convertToTspans,g);var Ue=T.bBox(Te.node());Ce.transform=a(Ue,Ce,O),Ce.transform.targetX=pe(Ce),Ce.transform.targetY=ye(Ce);var De=function(je,ge){var be=je.transform;return o(be,ge),be.fontSize=Ee.size,t(I.type,be,A),m.getTextTransform(be)};C?Te.transition().attrTween("transform",function(je){var ge=function(be){var Se,Ne=X[d.getPtId(be)],Ye=be.transform;if(Ne)Se=Ne;else if(Se={rpx1:be.rpx1,transform:{textPosAngle:Ye.textPosAngle,scale:0,rotate:Ye.rotate,rCenter:Ye.rCenter,x:Ye.x,y:Ye.y}},Y)if(be.parent)if(Re){var Ze=be.x1>Re?2*Math.PI:0;Se.x0=Se.x1=Ze}else m.extendFlat(Se,Me(be));else Se.x0=Se.x1=se;else Se.x0=Se.x1=se;var st=s(Se.transform.textPosAngle,be.transform.textPosAngle),ot=s(Se.rpx1,be.rpx1),ft=s(Se.x0,be.x0),yt=s(Se.x1,be.x1),Et=s(Se.transform.scale,Ye.scale),Tt=s(Se.transform.rotate,Ye.rotate),xt=Ye.rCenter===0?3:Se.transform.rCenter===0?1/3:1,Dt=s(Se.transform.rCenter,Ye.rCenter);return function(It){var Ft=ot(It),qt=ft(It),Nt=yt(It),Je=function(Ge){return Dt(Math.pow(Ge,xt))}(It),Ke={pxmid:he(Ft,(qt+Nt)/2),rpx1:Ft,transform:{textPosAngle:st(It),rCenter:Je,x:Ye.x,y:Ye.y}};return t(I.type,Ye,A),{transform:{targetX:pe(Ke),targetY:ye(Ke),scale:Et(It),rotate:Tt(It),rCenter:Je}}}}(je);return function(be){return De(ge(be),Ue)}}):Te.attr("transform",De(Ce,Ue))})}function x(g){return y=g.rpx1,k=g.transform.textPosAngle,[y*Math.sin(k),-y*Math.cos(k)];var y,k}E.plot=function(g,y,k,h){var M,A,C=g._fullLayout,L=C._sunburstlayer,O=!k,I=!C.uniformtext.mode&&d.hasTransition(k);i("sunburst",C),(M=L.selectAll("g.trace.sunburst").data(y,function(R){return R[0].trace.uid})).enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),M.order(),I?(h&&(A=h()),_.transition().duration(k.duration).ease(k.easing).each("end",function(){A&&A()}).each("interrupt",function(){A&&A()}).each(function(){L.selectAll("g.trace").each(function(R){v(g,R,this,k)})})):(M.each(function(R){v(g,R,this,k)}),C.uniformtext.mode&&p(g,C._sunburstlayer.selectAll(".trace"),"sunburst")),O&&M.exit().remove()},E.formatSliceLabel=function(g,y,k,h,M){var A=k.texttemplate,C=k.textinfo;if(!(A||C&&C!=="none"))return"";var L=M.separators,O=h[0],I=g.data.data,R=O.hierarchy,U=d.isHierarchyRoot(g),B=d.getParent(R,g),G=d.getValue(g);if(!A){var N,j=C.split("+"),V=function(oe){return j.indexOf(oe)!==-1},H=[];if(V("label")&&I.label&&H.push(I.label),I.hasOwnProperty("v")&&V("value")&&H.push(d.formatValue(I.v,L)),!U){V("current path")&&H.push(d.getPath(g.data));var ee=0;V("percent parent")&&ee++,V("percent entry")&&ee++,V("percent root")&&ee++;var Q=ee>1;if(ee){var Y,X=function(oe){N=d.formatPercent(Y,L),Q&&(N+=" of "+oe),H.push(N)};V("percent parent")&&!U&&(Y=G/d.getValue(B),X("parent")),V("percent entry")&&(Y=G/d.getValue(y),X("entry")),V("percent root")&&(Y=G/d.getValue(R),X("root"))}}return V("text")&&(N=m.castOption(k,I.i,"text"),m.isValidTextValue(N)&&H.push(N)),H.join("
")}var K=m.castOption(k,I.i,"texttemplate");if(!K)return"";var te={};I.label&&(te.label=I.label),I.hasOwnProperty("v")&&(te.value=I.v,te.valueLabel=d.formatValue(I.v,L)),te.currentPath=d.getPath(g.data),U||(te.percentParent=G/d.getValue(B),te.percentParentLabel=d.formatPercent(te.percentParent,L),te.parent=d.getPtLabel(B)),te.percentEntry=G/d.getValue(y),te.percentEntryLabel=d.formatPercent(te.percentEntry,L),te.entry=d.getPtLabel(y),te.percentRoot=G/d.getValue(R),te.percentRootLabel=d.formatPercent(te.percentRoot,L),te.root=d.getPtLabel(R),I.hasOwnProperty("color")&&(te.color=I.color);var ae=m.castOption(k,I.i,"text");return(m.isValidTextValue(ae)||ae==="")&&(te.text=ae),te.customdata=m.castOption(k,I.i,"customdata"),m.texttemplateString(K,te,M._d3locale,te,k._meta||{})}},29969:function(D,E,e){var _=e(39898),w=e(7901),s=e(71828),T=e(72597).resizeText;function m(f,l,t){var i=l.data.data,r=!l.children,n=i.i,o=s.castOption(t,n,"marker.line.color")||w.defaultLine,a=s.castOption(t,n,"marker.line.width")||0;f.style("stroke-width",a).call(w.fill,i.color).call(w.stroke,o).style("opacity",r?t.leaf.opacity:null)}D.exports={style:function(f){var l=f._fullLayout._sunburstlayer.selectAll(".trace");T(f,l,"sunburst"),l.each(function(t){var i=_.select(this),r=t[0].trace;i.style("opacity",r.opacity),i.selectAll("path.surface").each(function(n){_.select(this).call(m,n,r)})})},styleOne:m}},54532:function(D,E,e){var _=e(7901),w=e(50693),s=e(12663).axisHoverFormat,T=e(5386).fF,m=e(9012),f=e(1426).extendFlat,l=e(30962).overrideAll;function t(r){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:{valType:"boolean",dflt:!1},y:{valType:"boolean",dflt:!1},z:{valType:"boolean",dflt:!1}},color:{valType:"color",dflt:_.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:_.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var i=D.exports=l(f({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:T(),xhoverformat:s("x"),yhoverformat:s("y"),zhoverformat:s("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},w("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:t(),y:t(),z:t()},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"},_deprecated:{zauto:f({},w.zauto,{}),zmin:f({},w.zmin,{}),zmax:f({},w.zmax,{})},hoverinfo:f({},m.hoverinfo),showlegend:f({},m.showlegend,{dflt:!1})}),"calc","nested");i.x.editType=i.y.editType=i.z.editType="calc+clearAxisTypes",i.transforms=void 0},18396:function(D,E,e){var _=e(78803);D.exports=function(w,s){s.surfacecolor?_(w,s,{vals:s.surfacecolor,containerStr:"",cLetter:"c"}):_(w,s,{vals:s.z,containerStr:"",cLetter:"c"})}},43768:function(D,E,e){var _=e(9330).gl_surface3d,w=e(9330).ndarray,s=e(9330).ndarray_linear_interpolate.d2,T=e(824),m=e(43907),f=e(71828).isArrayOrTypedArray,l=e(81697).parseColorScale,t=e(78614),i=e(21081).extractOpts;function r(k,h,M){this.scene=k,this.uid=M,this.surface=h,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var n=r.prototype;n.getXat=function(k,h,M,A){var C=f(this.data.x)?f(this.data.x[0])?this.data.x[h][k]:this.data.x[k]:k;return M===void 0?C:A.d2l(C,0,M)},n.getYat=function(k,h,M,A){var C=f(this.data.y)?f(this.data.y[0])?this.data.y[h][k]:this.data.y[h]:h;return M===void 0?C:A.d2l(C,0,M)},n.getZat=function(k,h,M,A){var C=this.data.z[h][k];return C===null&&this.data.connectgaps&&this.data._interpolatedZ&&(C=this.data._interpolatedZ[h][k]),M===void 0?C:A.d2l(C,0,M)},n.handlePick=function(k){if(k.object===this.surface){var h=(k.data.index[0]-1)/this.dataScaleX-1,M=(k.data.index[1]-1)/this.dataScaleY-1,A=Math.max(Math.min(Math.round(h),this.data.z[0].length-1),0),C=Math.max(Math.min(Math.round(M),this.data._ylength-1),0);k.index=[A,C],k.traceCoordinate=[this.getXat(A,C),this.getYat(A,C),this.getZat(A,C)],k.dataCoordinate=[this.getXat(A,C,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(A,C,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(A,C,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var L=0;L<3;L++)k.dataCoordinate[L]!=null&&(k.dataCoordinate[L]*=this.scene.dataScale[L]);var O=this.data.hovertext||this.data.text;return Array.isArray(O)&&O[C]&&O[C][A]!==void 0?k.textLabel=O[C][A]:k.textLabel=O||"",k.data.dataCoordinate=k.dataCoordinate.slice(),this.surface.highlight(k.data),this.scene.glplot.spikes.position=k.dataCoordinate,!0}};var o=[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 a(k,h){if(k0){M=o[A];break}return M}function c(k,h){if(!(k<1||h<1)){for(var M=u(k),A=u(h),C=1,L=0;Lv;)M--,M/=p(M),++M1?A:1},n.refineCoords=function(k){for(var h=this.dataScaleX,M=this.dataScaleY,A=k[0].shape[0],C=k[0].shape[1],L=0|Math.floor(k[0].shape[0]*h+1),O=0|Math.floor(k[0].shape[1]*M+1),I=1+A+1,R=1+C+1,U=w(new Float32Array(I*R),[I,R]),B=[1/h,0,0,0,1/M,0,0,0,1],G=0;G0&&this.contourStart[k]!==null&&this.contourEnd[k]!==null&&this.contourEnd[k]>this.contourStart[k]))for(C[k]=!0,h=this.contourStart[k];hC&&(this.minValues[h]=C),this.maxValues[h]",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"}}},51018:function(D,E,e){var _=e(49850),w=e(1426).extendFlat,s=e(92770);function T(n){if(Array.isArray(n)){for(var o=0,a=0;a=o||x===n.length-1)&&(u[p]=b,b.key=v++,b.firstRowIndex=d,b.lastRowIndex=x,b={firstRowIndex:null,lastRowIndex:null,rows:[]},p+=c,d=x+1,c=0);return u}D.exports=function(n,o){var a=f(o.cells.values),u=function(U){return U.slice(o.header.values.length,U.length)},p=f(o.header.values);p.length&&!p[0].length&&(p[0]=[""],p=f(p));var c=p.concat(u(a).map(function(){return l((p[0]||[""]).length)})),b=o.domain,d=Math.floor(n._fullLayout._size.w*(b.x[1]-b.x[0])),v=Math.floor(n._fullLayout._size.h*(b.y[1]-b.y[0])),x=o.header.values.length?c[0].map(function(){return o.header.height}):[_.emptyHeaderHeight],g=a.length?a[0].map(function(){return o.cells.height}):[],y=x.reduce(m,0),k=r(g,v-y+_.uplift),h=i(r(x,y),[]),M=i(k,h),A={},C=o._fullInput.columnorder.concat(u(a.map(function(U,B){return B}))),L=c.map(function(U,B){var G=Array.isArray(o.columnwidth)?o.columnwidth[Math.min(B,o.columnwidth.length-1)]:o.columnwidth;return s(G)?Number(G):1}),O=L.reduce(m,0);L=L.map(function(U){return U/O*d});var I=Math.max(T(o.header.line.width),T(o.cells.line.width)),R={key:o.uid+n._context.staticPlot,translateX:b.x[0]*n._fullLayout._size.w,translateY:n._fullLayout._size.h*(1-b.y[1]),size:n._fullLayout._size,width:d,maxLineWidth:I,height:v,columnOrder:C,groupHeight:v,rowBlocks:M,headerRowBlocks:h,scrollY:0,cells:w({},o.cells,{values:a}),headerCells:w({},o.header,{values:c}),gdColumns:c.map(function(U){return U[0]}),gdColumnsOriginalOrder:c.map(function(U){return U[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:c.map(function(U,B){var G=A[U];return A[U]=(G||0)+1,{key:U+"__"+A[U],label:U,specIndex:B,xIndex:C[B],xScale:t,x:void 0,calcdata:void 0,columnWidth:L[B]}})};return R.columns.forEach(function(U){U.calcdata=R,U.x=t(U)}),R}},56269:function(D,E,e){var _=e(1426).extendFlat;E.splitToPanels=function(w){var s=[0,0],T=_({},w,{key:"header",type:"header",page:0,prevPages:s,currentRepaint:[null,null],dragHandle:!0,values:w.calcdata.headerCells.values[w.specIndex],rowBlocks:w.calcdata.headerRowBlocks,calcdata:_({},w.calcdata,{cells:w.calcdata.headerCells})});return[_({},w,{key:"cells1",type:"cells",page:0,prevPages:s,currentRepaint:[null,null],dragHandle:!1,values:w.calcdata.cells.values[w.specIndex],rowBlocks:w.calcdata.rowBlocks}),_({},w,{key:"cells2",type:"cells",page:1,prevPages:s,currentRepaint:[null,null],dragHandle:!1,values:w.calcdata.cells.values[w.specIndex],rowBlocks:w.calcdata.rowBlocks}),T]},E.splitToCells=function(w){var s=function(T){var m=T.rowBlocks[T.page],f=m?m.rows[0].rowIndex:0;return[f,m?f+m.rows.length:0]}(w);return(w.values||[]).slice(s[0],s[1]).map(function(T,m){return{keyWithinBlock:m+(typeof T=="string"&&T.match(/[<$&> ]/)?"_keybuster_"+Math.random():""),key:s[0]+m,column:w,calcdata:w.calcdata,page:w.page,rowBlocks:w.rowBlocks,value:T}})}},39754:function(D,E,e){var _=e(71828),w=e(44464),s=e(27670).c;D.exports=function(T,m,f,l){function t(i,r){return _.coerce(T,m,w,i,r)}s(m,l,t),t("columnwidth"),t("header.values"),t("header.format"),t("header.align"),t("header.prefix"),t("header.suffix"),t("header.height"),t("header.line.width"),t("header.line.color"),t("header.fill.color"),_.coerceFont(t,"header.font",_.extendFlat({},l.font)),function(i,r){for(var n=i.columnorder||[],o=i.header.values.length,a=n.slice(0,o),u=a.slice().sort(function(b,d){return b-d}),p=a.map(function(b){return u.indexOf(b)}),c=p.length;c/i),se=!ae||oe;Y.mayHaveMarkup=ae&&te.match(/[<&>]/);var fe,xe=typeof(fe=te)=="string"&&fe.match(_.latexCheck);Y.latex=xe;var he,de,pe=xe?"":g(Y.calcdata.cells.prefix,X,K)||"",ye=xe?"":g(Y.calcdata.cells.suffix,X,K)||"",Re=xe?null:g(Y.calcdata.cells.format,X,K)||null,we=pe+(Re?s(Re)(Y.value):Y.value)+ye;if(Y.wrappingNeeded=!Y.wrapped&&!se&&!xe&&(he=x(we)),Y.cellHeightMayIncrease=oe||xe||Y.mayHaveMarkup||(he===void 0?x(we):he),Y.needsConvertToTspans=Y.mayHaveMarkup||Y.wrappingNeeded||Y.latex,Y.wrappingNeeded){var Ae=(_.wrapSplitCharacter===" "?we.replace(/
de&&he.push(pe),de+=we}return he}(Y,ae,te);oe.length===1&&(oe[0]===Y.length-1?oe.unshift(oe[0]-1):oe.push(oe[0]+1)),oe[0]%2&&oe.reverse(),H.each(function(se,fe){se.page=oe[fe],se.scrollY=ae}),H.attr("transform",function(se){var fe=B(se.rowBlocks,se.page)-se.scrollY;return t(0,fe)}),V&&(L(V,ee,H,oe,Q.prevPages,Q,0),L(V,ee,H,oe,Q.prevPages,Q,1),b(ee,V))}}function C(V,H,ee,Q){return function(Y){var X=Y.calcdata?Y.calcdata:Y,K=H.filter(function(se){return X.key===se.key}),te=ee||X.scrollbarState.dragMultiplier,ae=X.scrollY;X.scrollY=Q===void 0?X.scrollY+te*w.event.dy:Q;var oe=K.selectAll("."+_.cn.yColumn).selectAll("."+_.cn.columnBlock).filter(k);return A(V,oe,K),X.scrollY===ae}}function L(V,H,ee,Q,Y,X,K){Q[K]!==Y[K]&&(clearTimeout(X.currentRepaint[K]),X.currentRepaint[K]=setTimeout(function(){var te=ee.filter(function(ae,oe){return oe===K&&Q[oe]!==Y[oe]});d(V,H,te,ee),Y[K]=Q[K]}))}function O(V,H,ee,Q){return function(){var Y=w.select(H.parentNode);Y.each(function(X){var K=X.fragments;Y.selectAll("tspan.line").each(function(de,pe){K[pe].width=this.getComputedTextLength()});var te,ae,oe=K[K.length-1].width,se=K.slice(0,-1),fe=[],xe=0,he=X.column.columnWidth-2*_.cellPad;for(X.value="";se.length;)xe+(ae=(te=se.shift()).width+oe)>he&&(X.value+=fe.join(_.wrapSpacer)+_.lineBreaker,fe=[],xe=0),fe.push(te.text),xe+=ae;xe&&(X.value+=fe.join(_.wrapSpacer)),X.wrapped=!0}),Y.selectAll("tspan.line").remove(),v(Y.select("."+_.cn.cellText),ee,V,Q),w.select(H.parentNode.parentNode).call(U)}}function I(V,H,ee,Q,Y){return function(){if(!Y.settledY){var X=w.select(H.parentNode),K=j(Y),te=Y.key-K.firstRowIndex,ae=K.rows[te].rowHeight,oe=Y.cellHeightMayIncrease?H.parentNode.getBoundingClientRect().height+2*_.cellPad:ae,se=Math.max(oe,ae);se-K.rows[te].rowHeight&&(K.rows[te].rowHeight=se,V.selectAll("."+_.cn.columnCell).call(U),A(null,V.filter(k),0),b(ee,Q,!0)),X.attr("transform",function(){var fe=this,xe=fe.parentNode.getBoundingClientRect(),he=w.select(fe.parentNode).select("."+_.cn.cellRect).node().getBoundingClientRect(),de=fe.transform.baseVal.consolidate(),pe=he.top-xe.top+(de?de.matrix.f:_.cellPad);return t(R(Y,w.select(fe.parentNode).select("."+_.cn.cellTextHolder).node().getBoundingClientRect().width),pe)}),Y.settledY=!0}}}function R(V,H){switch(V.align){case"left":default:return _.cellPad;case"right":return V.column.columnWidth-(H||0)-_.cellPad;case"center":return(V.column.columnWidth-(H||0))/2}}function U(V){V.attr("transform",function(H){var ee=H.rowBlocks[0].auxiliaryBlocks.reduce(function(Y,X){return Y+G(X,1/0)},0),Q=G(j(H),H.key);return t(0,Q+ee)}).selectAll("."+_.cn.cellRect).attr("height",function(H){return(ee=j(H),Q=H.key,ee.rows[Q-ee.firstRowIndex]).rowHeight;var ee,Q})}function B(V,H){for(var ee=0,Q=H-1;Q>=0;Q--)ee+=N(V[Q]);return ee}function G(V,H){for(var ee=0,Q=0;Q","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:t({},m.textfont,{}),editType:"calc"},text:m.text,textinfo:f.textinfo,texttemplate:w({editType:"plot"},{keys:l.eventDataKeys.concat(["label","value"])}),hovertext:m.hovertext,hoverinfo:f.hoverinfo,hovertemplate:_({},{keys:l.eventDataKeys}),textfont:m.textfont,insidetextfont:m.insidetextfont,outsidetextfont:t({},m.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:m.sort,root:f.root,domain:T({name:"treemap",trace:!0,editType:"calc"})}},78018:function(D,E,e){var _=e(74875);E.name="treemap",E.plot=function(w,s,T,m){_.plotBasePlot(E.name,w,s,T,m)},E.clean=function(w,s,T,m){_.cleanBasePlot(E.name,w,s,T,m)}},65039:function(D,E,e){var _=e(52147);E.y=function(w,s){return _.calc(w,s)},E.T=function(w){return _._runCrossTraceCalc("treemap",w)}},43473:function(D){D.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}},91174:function(D,E,e){var _=e(71828),w=e(45802),s=e(7901),T=e(27670).c,m=e(90769).handleText,f=e(97313).TEXTPAD,l=e(21081),t=l.hasColorscale,i=l.handleDefaults;D.exports=function(r,n,o,a){function u(k,h){return _.coerce(r,n,w,k,h)}var p=u("labels"),c=u("parents");if(p&&p.length&&c&&c.length){var b=u("values");b&&b.length?u("branchvalues"):u("count"),u("level"),u("maxdepth"),u("tiling.packing")==="squarify"&&u("tiling.squarifyratio"),u("tiling.flip"),u("tiling.pad");var d=u("text");u("texttemplate"),n.texttemplate||u("textinfo",Array.isArray(d)?"text+label":"label"),u("hovertext"),u("hovertemplate");var v=u("pathbar.visible");m(r,n,a,u,"auto",{hasPathbar:v,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),u("textposition");var x=n.textposition.indexOf("bottom")!==-1;u("marker.line.width")&&u("marker.line.color",a.paper_bgcolor);var g=u("marker.colors");(n._hasColorscale=t(r,"marker","colors")||(r.marker||{}).coloraxis)?i(r,n,a,u,{prefix:"marker.",cLetter:"c"}):u("marker.depthfade",!(g||[]).length);var y=2*n.textfont.size;u("marker.pad.t",x?y/4:y),u("marker.pad.l",y/4),u("marker.pad.r",y/4),u("marker.pad.b",x?y:y/4),u("marker.cornerradius"),n._hovered={marker:{line:{width:2,color:s.contrast(a.paper_bgcolor)}}},v&&(u("pathbar.thickness",n.pathbar.textfont.size+2*f),u("pathbar.side"),u("pathbar.edgeshape")),u("sort"),u("root.color"),T(n,a,u),n._length=null}else n.visible=!1}},80694:function(D,E,e){var _=e(39898),w=e(2791),s=e(72597).clearMinTextSize,T=e(16688).resizeText,m=e(46650);D.exports=function(f,l,t,i,r){var n,o,a=r.type,u=r.drawDescendants,p=f._fullLayout,c=p["_"+a+"layer"],b=!t;s(a,p),(n=c.selectAll("g.trace."+a).data(l,function(d){return d[0].trace.uid})).enter().append("g").classed("trace",!0).classed(a,!0),n.order(),!p.uniformtext.mode&&w.hasTransition(t)?(i&&(o=i()),_.transition().duration(t.duration).ease(t.easing).each("end",function(){o&&o()}).each("interrupt",function(){o&&o()}).each(function(){c.selectAll("g.trace").each(function(d){m(f,d,this,t,u)})})):(n.each(function(d){m(f,d,this,t,u)}),p.uniformtext.mode&&T(f,c.selectAll(".trace"),a)),b&&n.exit().remove()}},66209:function(D,E,e){var _=e(39898),w=e(71828),s=e(91424),T=e(63893),m=e(37210),f=e(96362).styleOne,l=e(43473),t=e(2791),i=e(83523),r=!0;D.exports=function(n,o,a,u,p){var c=p.barDifY,b=p.width,d=p.height,v=p.viewX,x=p.viewY,g=p.pathSlice,y=p.toMoveInsideSlice,k=p.strTransform,h=p.hasTransition,M=p.handleSlicesExit,A=p.makeUpdateSliceInterpolator,C=p.makeUpdateTextInterpolator,L={},O=n._context.staticPlot,I=n._fullLayout,R=o[0],U=R.trace,B=R.hierarchy,G=b/U._entryDepth,N=t.listPath(a.data,"id"),j=m(B.copy(),[b,d],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();(j=j.filter(function(H){var ee=N.indexOf(H.data.id);return ee!==-1&&(H.x0=G*ee,H.x1=G*(ee+1),H.y0=c,H.y1=c+d,H.onPathbar=!0,!0)})).reverse(),(u=u.data(j,t.getPtId)).enter().append("g").classed("pathbar",!0),M(u,r,L,[b,d],g),u.order();var V=u;h&&(V=V.transition().each("end",function(){var H=_.select(this);t.setSliceCursor(H,n,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),V.each(function(H){H._x0=v(H.x0),H._x1=v(H.x1),H._y0=x(H.y0),H._y1=x(H.y1),H._hoverX=v(H.x1-Math.min(b,d)/2),H._hoverY=x(H.y1-d/2);var ee=_.select(this),Q=w.ensureSingle(ee,"path","surface",function(te){te.style("pointer-events",O?"none":"all")});h?Q.transition().attrTween("d",function(te){var ae=A(te,r,L,[b,d]);return function(oe){return g(ae(oe))}}):Q.attr("d",g),ee.call(i,a,n,o,{styleOne:f,eventDataKeys:l.eventDataKeys,transitionTime:l.CLICK_TRANSITION_TIME,transitionEasing:l.CLICK_TRANSITION_EASING}).call(t.setSliceCursor,n,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:n._transitioning}),Q.call(f,H,U,{hovered:!1}),H._text=(t.getPtLabel(H)||"").split("
").join(" ")||"";var Y=w.ensureSingle(ee,"g","slicetext"),X=w.ensureSingle(Y,"text","",function(te){te.attr("data-notex",1)}),K=w.ensureUniformFontSize(n,t.determineTextFont(U,H,I.font,{onPathbar:!0}));X.text(H._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(s.font,K).call(T.convertToTspans,n),H.textBB=s.bBox(X.node()),H.transform=y(H,{fontSize:K.size,onPathbar:!0}),H.transform.fontSize=K.size,h?X.transition().attrTween("transform",function(te){var ae=C(te,r,L,[b,d]);return function(oe){return k(ae(oe))}}):X.attr("transform",k(H))})}},52583:function(D,E,e){var _=e(39898),w=e(71828),s=e(91424),T=e(63893),m=e(37210),f=e(96362).styleOne,l=e(43473),t=e(2791),i=e(83523),r=e(24714).formatSliceLabel,n=!1;D.exports=function(o,a,u,p,c){var b=c.width,d=c.height,v=c.viewX,x=c.viewY,g=c.pathSlice,y=c.toMoveInsideSlice,k=c.strTransform,h=c.hasTransition,M=c.handleSlicesExit,A=c.makeUpdateSliceInterpolator,C=c.makeUpdateTextInterpolator,L=c.prevEntry,O=o._context.staticPlot,I=o._fullLayout,R=a[0].trace,U=R.textposition.indexOf("left")!==-1,B=R.textposition.indexOf("right")!==-1,G=R.textposition.indexOf("bottom")!==-1,N=!G&&!R.marker.pad.t||G&&!R.marker.pad.b,j=m(u,[b,d],{packing:R.tiling.packing,squarifyratio:R.tiling.squarifyratio,flipX:R.tiling.flip.indexOf("x")>-1,flipY:R.tiling.flip.indexOf("y")>-1,pad:{inner:R.tiling.pad,top:R.marker.pad.t,left:R.marker.pad.l,right:R.marker.pad.r,bottom:R.marker.pad.b}}).descendants(),V=1/0,H=-1/0;j.forEach(function(K){var te=K.depth;te>=R._maxDepth?(K.x0=K.x1=(K.x0+K.x1)/2,K.y0=K.y1=(K.y0+K.y1)/2):(V=Math.min(V,te),H=Math.max(H,te))}),p=p.data(j,t.getPtId),R._maxVisibleLayers=isFinite(H)?H-V+1:0,p.enter().append("g").classed("slice",!0),M(p,n,{},[b,d],g),p.order();var ee=null;if(h&&L){var Q=t.getPtId(L);p.each(function(K){ee===null&&t.getPtId(K)===Q&&(ee={x0:K.x0,x1:K.x1,y0:K.y0,y1:K.y1})})}var Y=function(){return ee||{x0:0,x1:b,y0:0,y1:d}},X=p;return h&&(X=X.transition().each("end",function(){var K=_.select(this);t.setSliceCursor(K,o,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),X.each(function(K){var te=t.isHeader(K,R);K._x0=v(K.x0),K._x1=v(K.x1),K._y0=x(K.y0),K._y1=x(K.y1),K._hoverX=v(K.x1-R.marker.pad.r),K._hoverY=x(G?K.y1-R.marker.pad.b/2:K.y0+R.marker.pad.t/2);var ae=_.select(this),oe=w.ensureSingle(ae,"path","surface",function(he){he.style("pointer-events",O?"none":"all")});h?oe.transition().attrTween("d",function(he){var de=A(he,n,Y(),[b,d]);return function(pe){return g(de(pe))}}):oe.attr("d",g),ae.call(i,u,o,a,{styleOne:f,eventDataKeys:l.eventDataKeys,transitionTime:l.CLICK_TRANSITION_TIME,transitionEasing:l.CLICK_TRANSITION_EASING}).call(t.setSliceCursor,o,{isTransitioning:o._transitioning}),oe.call(f,K,R,{hovered:!1}),K.x0===K.x1||K.y0===K.y1?K._text="":K._text=te?N?"":t.getPtLabel(K)||"":r(K,u,R,a,I)||"";var se=w.ensureSingle(ae,"g","slicetext"),fe=w.ensureSingle(se,"text","",function(he){he.attr("data-notex",1)}),xe=w.ensureUniformFontSize(o,t.determineTextFont(R,K,I.font));fe.text(K._text||" ").classed("slicetext",!0).attr("text-anchor",B?"end":U||te?"start":"middle").call(s.font,xe).call(T.convertToTspans,o),K.textBB=s.bBox(fe.node()),K.transform=y(K,{fontSize:xe.size,isHeader:te}),K.transform.fontSize=xe.size,h?fe.transition().attrTween("transform",function(he){var de=C(he,n,Y(),[b,d]);return function(pe){return k(de(pe))}}):fe.attr("transform",k(K))}),ee}},14102:function(D){D.exports=function E(e,_,w){var s;w.swapXY&&(s=e.x0,e.x0=e.y0,e.y0=s,s=e.x1,e.x1=e.y1,e.y1=s),w.flipX&&(s=e.x0,e.x0=_[0]-e.x1,e.x1=_[0]-s),w.flipY&&(s=e.y0,e.y0=_[1]-e.y1,e.y1=_[1]-s);var T=e.children;if(T)for(var m=0;m-1?R+G:-(B+G):0,j={x0:U,x1:U,y0:N,y1:N+B},V=function(ge,be,Se){var Ne=d.tiling.pad,Ye=function(ft){return ft-Ne<=be.x0},Ze=function(ft){return ft+Ne>=be.x1},st=function(ft){return ft-Ne<=be.y0},ot=function(ft){return ft+Ne>=be.y1};return ge.x0===be.x0&&ge.x1===be.x1&&ge.y0===be.y0&&ge.y1===be.y1?{x0:ge.x0,x1:ge.x1,y0:ge.y0,y1:ge.y1}:{x0:Ye(ge.x0-Ne)?0:Ze(ge.x0-Ne)?Se[0]:ge.x0,x1:Ye(ge.x1+Ne)?0:Ze(ge.x1+Ne)?Se[0]:ge.x1,y0:st(ge.y0-Ne)?0:ot(ge.y0-Ne)?Se[1]:ge.y0,y1:st(ge.y1+Ne)?0:ot(ge.y1+Ne)?Se[1]:ge.y1}},H=null,ee={},Q={},Y=null,X=function(ge,be){return be?ee[r(ge)]:Q[r(ge)]};b.hasMultipleRoots&&M&&C++,d._maxDepth=C,d._backgroundColor=c.paper_bgcolor,d._entryDepth=g.data.depth,d._atRootLevel=M;var K=-I/2+L.l+L.w*(O.x[1]+O.x[0])/2,te=-R/2+L.t+L.h*(1-(O.y[1]+O.y[0])/2),ae=function(ge){return K+ge},oe=function(ge){return te+ge},se=oe(0),fe=ae(0),xe=function(ge){return fe+ge},he=function(ge){return se+ge};function de(ge,be){return ge+","+be}var pe=xe(0),ye=function(ge){ge.x=Math.max(pe,ge.x)},Re=d.pathbar.edgeshape,we=d[v?"tiling":"marker"].pad,Ae=function(ge){return d.textposition.indexOf(ge)!==-1},Me=Ae("top"),Ce=Ae("left"),ne=Ae("right"),ue=Ae("bottom"),me=function(ge,be){var Se=ge.x0,Ne=ge.x1,Ye=ge.y0,Ze=ge.y1,st=ge.textBB,ot=Me||be.isHeader&&!ue?"start":ue?"end":"middle",ft=Ae("right"),yt=Ae("left")||be.onPathbar?-1:ft?1:0;if(be.isHeader){if((Se+=(v?we:we.l)-m)>=(Ne-=(v?we:we.r)-m)){var Et=(Se+Ne)/2;Se=Et,Ne=Et}var Tt;ue?Ye<(Tt=Ze-(v?we:we.b))&&Tt"?(ft.x-=Ze,yt.x-=Ze,Et.x-=Ze,Tt.x-=Ze):Re==="/"?(Et.x-=Ze,Tt.x-=Ze,st.x-=Ze/2,ot.x-=Ze/2):Re==="\\"?(ft.x-=Ze,yt.x-=Ze,st.x-=Ze/2,ot.x-=Ze/2):Re==="<"&&(st.x-=Ze,ot.x-=Ze),ye(ft),ye(Tt),ye(st),ye(yt),ye(Et),ye(ot),"M"+de(ft.x,ft.y)+"L"+de(yt.x,yt.y)+"L"+de(ot.x,ot.y)+"L"+de(Et.x,Et.y)+"L"+de(Tt.x,Tt.y)+"L"+de(st.x,st.y)+"Z"},toMoveInsideSlice:me,makeUpdateSliceInterpolator:Ee,makeUpdateTextInterpolator:Ue,handleSlicesExit:De,hasTransition:A,strTransform:je}):k.remove()}},96362:function(D,E,e){var _=e(39898),w=e(7901),s=e(71828),T=e(2791),m=e(72597).resizeText;function f(l,t,i,r){var n,o,a=(r||{}).hovered,u=t.data.data,p=u.i,c=u.color,b=T.isHierarchyRoot(t),d=1;if(a)n=i._hovered.marker.line.color,o=i._hovered.marker.line.width;else if(b&&c===i.root.color)d=100,n="rgba(0,0,0,0)",o=0;else if(n=s.castOption(i,p,"marker.line.color")||w.defaultLine,o=s.castOption(i,p,"marker.line.width")||0,!i._hasColorscale&&!t.onPathbar){var v=i.marker.depthfade;if(v){var x,g=w.combine(w.addOpacity(i._backgroundColor,.75),c);if(v===!0){var y=T.getMaxDepth(i);x=isFinite(y)?T.isLeaf(t)?0:i._maxVisibleLayers-(t.data.depth-i._entryDepth):t.data.height+1}else x=t.data.depth-i._entryDepth,i._atRootLevel||x++;if(x>0)for(var k=0;k0){var g,y,k,h,M,A=f.xa,C=f.ya;p.orientation==="h"?(M=l,g="y",k=C,y="x",h=A):(M=t,g="x",k=A,y="y",h=C);var L=u[f.index];if(M>=L.span[0]&&M<=L.span[1]){var O=w.extendFlat({},f),I=h.c2p(M,!0),R=m.getKdeValue(L,p,M),U=m.getPositionOnKdePath(L,p,I),B=k._offset,G=k._length;O[g+"0"]=U[0],O[g+"1"]=U[1],O[y+"0"]=O[y+"1"]=I,O[y+"Label"]=y+": "+s.hoverLabelText(h,M,p[y+"hoverformat"])+", "+u[0].t.labels.kde+" "+R.toFixed(3);for(var N=0,j=0;j")),o.color=function(C,L){var O=C[L.dir].marker,I=O.color,R=O.line.color,U=O.line.width;return w(I)?I:w(R)&&U?R:void 0}(u,d),[o]}function A(C){return _(b,C,u[c+"hoverformat"])}}},19990:function(D,E,e){D.exports={attributes:e(43037),layoutAttributes:e(13494),supplyDefaults:e(83266).supplyDefaults,crossTraceDefaults:e(83266).crossTraceDefaults,supplyLayoutDefaults:e(5176),calc:e(52752),crossTraceCalc:e(70766),plot:e(30436),style:e(55750).style,hoverPoints:e(61326),eventData:e(58593),selectPoints:e(81974),moduleType:"trace",name:"waterfall",basePlotModule:e(93612),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},13494:function(D){D.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"}}},5176:function(D,E,e){var _=e(71828),w=e(13494);D.exports=function(s,T,m){var f=!1;function l(r,n){return _.coerce(s,T,w,r,n)}for(var t=0;t0&&(R+=y?"M"+O[0]+","+I[1]+"V"+I[0]:"M"+O[1]+","+I[0]+"H"+O[0]),k!=="between"&&(A.isSum||C path").each(function(p){if(!p.isBlank){var c=u[p.dir].marker;_.select(this).call(s.fill,c.color).call(s.stroke,c.line.color).call(w.dashLine,c.line.dash,c.line.width).style("opacity",u.selectedpoints&&!p.selected?T:1)}}),l(a,u,t),a.selectAll(".lines").each(function(){var p=u.connector.line;w.lineGroupStyle(_.select(this).selectAll("path"),p.width,p.color,p.dash)})})}}},82887:function(D,E,e){var _=e(89298),w=e(71828),s=e(86281),T=e(79344).p,m=e(50606).BADNUM;E.moduleType="transform",E.name="aggregate";var f=E.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},aggregations:{_isLinkedToArray:"aggregation",target:{valType:"string",editType:"calc"},func:{valType:"enumerated",values:["count","sum","avg","median","mode","rms","stddev","min","max","first","last","change","range"],dflt:"first",editType:"calc"},funcmode:{valType:"enumerated",values:["sample","population"],dflt:"sample",editType:"calc"},enabled:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},editType:"calc"},l=f.aggregations;function t(o,a,u,p){if(p.enabled){for(var c=p.target,b=w.nestedProperty(a,c),d=b.get(),v=function(y,k){var h=y.func,M=k.d2c,A=k.c2d;switch(h){case"count":return i;case"first":return r;case"last":return n;case"sum":return function(C,L){for(var O=0,I=0;II&&(I=G,R=B)}}return I?A(R):m};case"rms":return function(C,L){for(var O=0,I=0,R=0;R":return function(H){return V(H)>N};case">=":return function(H){return V(H)>=N};case"[]":return function(H){var ee=V(H);return ee>=N[0]&&ee<=N[1]};case"()":return function(H){var ee=V(H);return ee>N[0]&&ee=N[0]&&eeN[0]&&ee<=N[1]};case"][":return function(H){var ee=V(H);return ee<=N[0]||ee>=N[1]};case")(":return function(H){var ee=V(H);return eeN[1]};case"](":return function(H){var ee=V(H);return ee<=N[0]||ee>N[1]};case")[":return function(H){var ee=V(H);return ee=N[1]};case"{}":return function(H){return N.indexOf(V(H))!==-1};case"}{":return function(H){return N.indexOf(V(H))===-1}}}(n,s.getDataToCoordFunc(i,r,a,o),p),y={},k={},h=0;b?(v=function(L){y[L.astr]=_.extendDeep([],L.get()),L.set(new Array(u))},x=function(L,O){var I=y[L.astr][O];L.get()[O]=I}):(v=function(L){y[L.astr]=_.extendDeep([],L.get()),L.set([])},x=function(L,O){var I=y[L.astr][O];L.get().push(I)}),C(v);for(var M=T(r.transforms,n),A=0;A1?"%{group} (%{trace})":"%{group}");var o=f.styles,a=r.styles=[];if(o)for(i=0;iv)throw new RangeError('The value "'+ge+'" is invalid for option "size"');var be=new Uint8Array(ge);return Object.setPrototypeOf(be,g.prototype),be}function g(ge,be,Se){if(typeof ge=="number"){if(typeof be=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return h(ge)}return y(ge,be,Se)}function y(ge,be,Se){if(typeof ge=="string")return function(Ze,st){if(typeof st=="string"&&st!==""||(st="utf8"),!g.isEncoding(st))throw new TypeError("Unknown encoding: "+st);var ot=0|L(Ze,st),ft=x(ot),yt=ft.write(Ze,st);return yt!==ot&&(ft=ft.slice(0,yt)),ft}(ge,be);if(ArrayBuffer.isView(ge))return function(Ze){if(Te(Ze,Uint8Array)){var st=new Uint8Array(Ze);return A(st.buffer,st.byteOffset,st.byteLength)}return M(Ze)}(ge);if(ge==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+p(ge));if(Te(ge,ArrayBuffer)||ge&&Te(ge.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Te(ge,SharedArrayBuffer)||ge&&Te(ge.buffer,SharedArrayBuffer)))return A(ge,be,Se);if(typeof ge=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Ne=ge.valueOf&&ge.valueOf();if(Ne!=null&&Ne!==ge)return g.from(Ne,be,Se);var Ye=function(Ze){if(g.isBuffer(Ze)){var st=0|C(Ze.length),ot=x(st);return ot.length===0||Ze.copy(ot,0,0,st),ot}return Ze.length!==void 0?typeof Ze.length!="number"||Ee(Ze.length)?x(0):M(Ze):Ze.type==="Buffer"&&Array.isArray(Ze.data)?M(Ze.data):void 0}(ge);if(Ye)return Ye;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ge[Symbol.toPrimitive]=="function")return g.from(ge[Symbol.toPrimitive]("string"),be,Se);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+p(ge))}function k(ge){if(typeof ge!="number")throw new TypeError('"size" argument must be of type number');if(ge<0)throw new RangeError('The value "'+ge+'" is invalid for option "size"')}function h(ge){return k(ge),x(ge<0?0:0|C(ge))}function M(ge){for(var be=ge.length<0?0:0|C(ge.length),Se=x(be),Ne=0;Ne=v)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+v.toString(16)+" bytes");return 0|ge}function L(ge,be){if(g.isBuffer(ge))return ge.length;if(ArrayBuffer.isView(ge)||Te(ge,ArrayBuffer))return ge.byteLength;if(typeof ge!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+p(ge));var Se=ge.length,Ne=arguments.length>2&&arguments[2]===!0;if(!Ne&&Se===0)return 0;for(var Ye=!1;;)switch(be){case"ascii":case"latin1":case"binary":return Se;case"utf8":case"utf-8":return ne(ge).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*Se;case"hex":return Se>>>1;case"base64":return ue(ge).length;default:if(Ye)return Ne?-1:ne(ge).length;be=(""+be).toLowerCase(),Ye=!0}}function O(ge,be,Se){var Ne=!1;if((be===void 0||be<0)&&(be=0),be>this.length||((Se===void 0||Se>this.length)&&(Se=this.length),Se<=0)||(Se>>>=0)<=(be>>>=0))return"";for(ge||(ge="utf8");;)switch(ge){case"hex":return K(this,be,Se);case"utf8":case"utf-8":return ee(this,be,Se);case"ascii":return Y(this,be,Se);case"latin1":case"binary":return X(this,be,Se);case"base64":return H(this,be,Se);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return te(this,be,Se);default:if(Ne)throw new TypeError("Unknown encoding: "+ge);ge=(ge+"").toLowerCase(),Ne=!0}}function I(ge,be,Se){var Ne=ge[be];ge[be]=ge[Se],ge[Se]=Ne}function R(ge,be,Se,Ne,Ye){if(ge.length===0)return-1;if(typeof Se=="string"?(Ne=Se,Se=0):Se>2147483647?Se=2147483647:Se<-2147483648&&(Se=-2147483648),Ee(Se=+Se)&&(Se=Ye?0:ge.length-1),Se<0&&(Se=ge.length+Se),Se>=ge.length){if(Ye)return-1;Se=ge.length-1}else if(Se<0){if(!Ye)return-1;Se=0}if(typeof be=="string"&&(be=g.from(be,Ne)),g.isBuffer(be))return be.length===0?-1:U(ge,be,Se,Ne,Ye);if(typeof be=="number")return be&=255,typeof Uint8Array.prototype.indexOf=="function"?Ye?Uint8Array.prototype.indexOf.call(ge,be,Se):Uint8Array.prototype.lastIndexOf.call(ge,be,Se):U(ge,[be],Se,Ne,Ye);throw new TypeError("val must be string, number or Buffer")}function U(ge,be,Se,Ne,Ye){var Ze,st=1,ot=ge.length,ft=be.length;if(Ne!==void 0&&((Ne=String(Ne).toLowerCase())==="ucs2"||Ne==="ucs-2"||Ne==="utf16le"||Ne==="utf-16le")){if(ge.length<2||be.length<2)return-1;st=2,ot/=2,ft/=2,Se/=2}function yt(Dt,It){return st===1?Dt[It]:Dt.readUInt16BE(It*st)}if(Ye){var Et=-1;for(Ze=Se;Zeot&&(Se=ot-ft),Ze=Se;Ze>=0;Ze--){for(var Tt=!0,xt=0;xtYe&&(Ne=Ye):Ne=Ye;var Ze,st=be.length;for(Ne>st/2&&(Ne=st/2),Ze=0;Ze>8,ft=st%256,yt.push(ft),yt.push(ot);return yt}(be,ge.length-Se),ge,Se,Ne)}function H(ge,be,Se){return be===0&&Se===ge.length?c.fromByteArray(ge):c.fromByteArray(ge.slice(be,Se))}function ee(ge,be,Se){Se=Math.min(ge.length,Se);for(var Ne=[],Ye=be;Ye239?4:Ze>223?3:Ze>191?2:1;if(Ye+ot<=Se){var ft=void 0,yt=void 0,Et=void 0,Tt=void 0;switch(ot){case 1:Ze<128&&(st=Ze);break;case 2:(192&(ft=ge[Ye+1]))==128&&(Tt=(31&Ze)<<6|63&ft)>127&&(st=Tt);break;case 3:ft=ge[Ye+1],yt=ge[Ye+2],(192&ft)==128&&(192&yt)==128&&(Tt=(15&Ze)<<12|(63&ft)<<6|63&yt)>2047&&(Tt<55296||Tt>57343)&&(st=Tt);break;case 4:ft=ge[Ye+1],yt=ge[Ye+2],Et=ge[Ye+3],(192&ft)==128&&(192&yt)==128&&(192&Et)==128&&(Tt=(15&Ze)<<18|(63&ft)<<12|(63&yt)<<6|63&Et)>65535&&Tt<1114112&&(st=Tt)}}st===null?(st=65533,ot=1):st>65535&&(st-=65536,Ne.push(st>>>10&1023|55296),st=56320|1023&st),Ne.push(st),Ye+=ot}return function(xt){var Dt=xt.length;if(Dt<=Q)return String.fromCharCode.apply(String,xt);for(var It="",Ft=0;Ft"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(g.prototype,"parent",{enumerable:!0,get:function(){if(g.isBuffer(this))return this.buffer}}),Object.defineProperty(g.prototype,"offset",{enumerable:!0,get:function(){if(g.isBuffer(this))return this.byteOffset}}),g.poolSize=8192,g.from=function(ge,be,Se){return y(ge,be,Se)},Object.setPrototypeOf(g.prototype,Uint8Array.prototype),Object.setPrototypeOf(g,Uint8Array),g.alloc=function(ge,be,Se){return function(Ne,Ye,Ze){return k(Ne),Ne<=0?x(Ne):Ye!==void 0?typeof Ze=="string"?x(Ne).fill(Ye,Ze):x(Ne).fill(Ye):x(Ne)}(ge,be,Se)},g.allocUnsafe=function(ge){return h(ge)},g.allocUnsafeSlow=function(ge){return h(ge)},g.isBuffer=function(ge){return ge!=null&&ge._isBuffer===!0&&ge!==g.prototype},g.compare=function(ge,be){if(Te(ge,Uint8Array)&&(ge=g.from(ge,ge.offset,ge.byteLength)),Te(be,Uint8Array)&&(be=g.from(be,be.offset,be.byteLength)),!g.isBuffer(ge)||!g.isBuffer(be))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ge===be)return 0;for(var Se=ge.length,Ne=be.length,Ye=0,Ze=Math.min(Se,Ne);YeNe.length?(g.isBuffer(Ze)||(Ze=g.from(Ze)),Ze.copy(Ne,Ye)):Uint8Array.prototype.set.call(Ne,Ze,Ye);else{if(!g.isBuffer(Ze))throw new TypeError('"list" argument must be an Array of Buffers');Ze.copy(Ne,Ye)}Ye+=Ze.length}return Ne},g.byteLength=L,g.prototype._isBuffer=!0,g.prototype.swap16=function(){var ge=this.length;if(ge%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var be=0;bebe&&(ge+=" ... "),""},d&&(g.prototype[d]=g.prototype.inspect),g.prototype.compare=function(ge,be,Se,Ne,Ye){if(Te(ge,Uint8Array)&&(ge=g.from(ge,ge.offset,ge.byteLength)),!g.isBuffer(ge))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+p(ge));if(be===void 0&&(be=0),Se===void 0&&(Se=ge?ge.length:0),Ne===void 0&&(Ne=0),Ye===void 0&&(Ye=this.length),be<0||Se>ge.length||Ne<0||Ye>this.length)throw new RangeError("out of range index");if(Ne>=Ye&&be>=Se)return 0;if(Ne>=Ye)return-1;if(be>=Se)return 1;if(this===ge)return 0;for(var Ze=(Ye>>>=0)-(Ne>>>=0),st=(Se>>>=0)-(be>>>=0),ot=Math.min(Ze,st),ft=this.slice(Ne,Ye),yt=ge.slice(be,Se),Et=0;Et>>=0,isFinite(Se)?(Se>>>=0,Ne===void 0&&(Ne="utf8")):(Ne=Se,Se=void 0)}var Ye=this.length-be;if((Se===void 0||Se>Ye)&&(Se=Ye),ge.length>0&&(Se<0||be<0)||be>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ne||(Ne="utf8");for(var Ze=!1;;)switch(Ne){case"hex":return B(this,ge,be,Se);case"utf8":case"utf-8":return G(this,ge,be,Se);case"ascii":case"latin1":case"binary":return N(this,ge,be,Se);case"base64":return j(this,ge,be,Se);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return V(this,ge,be,Se);default:if(Ze)throw new TypeError("Unknown encoding: "+Ne);Ne=(""+Ne).toLowerCase(),Ze=!0}},g.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;function Y(ge,be,Se){var Ne="";Se=Math.min(ge.length,Se);for(var Ye=be;YeNe)&&(Se=Ne);for(var Ye="",Ze=be;ZeSe)throw new RangeError("Trying to access beyond buffer length")}function oe(ge,be,Se,Ne,Ye,Ze){if(!g.isBuffer(ge))throw new TypeError('"buffer" argument must be a Buffer instance');if(be>Ye||bege.length)throw new RangeError("Index out of range")}function se(ge,be,Se,Ne,Ye){we(be,Ne,Ye,ge,Se,7);var Ze=Number(be&BigInt(4294967295));ge[Se++]=Ze,Ze>>=8,ge[Se++]=Ze,Ze>>=8,ge[Se++]=Ze,Ze>>=8,ge[Se++]=Ze;var st=Number(be>>BigInt(32)&BigInt(4294967295));return ge[Se++]=st,st>>=8,ge[Se++]=st,st>>=8,ge[Se++]=st,st>>=8,ge[Se++]=st,Se}function fe(ge,be,Se,Ne,Ye){we(be,Ne,Ye,ge,Se,7);var Ze=Number(be&BigInt(4294967295));ge[Se+7]=Ze,Ze>>=8,ge[Se+6]=Ze,Ze>>=8,ge[Se+5]=Ze,Ze>>=8,ge[Se+4]=Ze;var st=Number(be>>BigInt(32)&BigInt(4294967295));return ge[Se+3]=st,st>>=8,ge[Se+2]=st,st>>=8,ge[Se+1]=st,st>>=8,ge[Se]=st,Se+8}function xe(ge,be,Se,Ne,Ye,Ze){if(Se+Ne>ge.length)throw new RangeError("Index out of range");if(Se<0)throw new RangeError("Index out of range")}function he(ge,be,Se,Ne,Ye){return be=+be,Se>>>=0,Ye||xe(ge,0,Se,4),b.write(ge,be,Se,Ne,23,4),Se+4}function de(ge,be,Se,Ne,Ye){return be=+be,Se>>>=0,Ye||xe(ge,0,Se,8),b.write(ge,be,Se,Ne,52,8),Se+8}g.prototype.slice=function(ge,be){var Se=this.length;(ge=~~ge)<0?(ge+=Se)<0&&(ge=0):ge>Se&&(ge=Se),(be=be===void 0?Se:~~be)<0?(be+=Se)<0&&(be=0):be>Se&&(be=Se),be>>=0,be>>>=0,Se||ae(ge,be,this.length);for(var Ne=this[ge],Ye=1,Ze=0;++Ze>>=0,be>>>=0,Se||ae(ge,be,this.length);for(var Ne=this[ge+--be],Ye=1;be>0&&(Ye*=256);)Ne+=this[ge+--be]*Ye;return Ne},g.prototype.readUint8=g.prototype.readUInt8=function(ge,be){return ge>>>=0,be||ae(ge,1,this.length),this[ge]},g.prototype.readUint16LE=g.prototype.readUInt16LE=function(ge,be){return ge>>>=0,be||ae(ge,2,this.length),this[ge]|this[ge+1]<<8},g.prototype.readUint16BE=g.prototype.readUInt16BE=function(ge,be){return ge>>>=0,be||ae(ge,2,this.length),this[ge]<<8|this[ge+1]},g.prototype.readUint32LE=g.prototype.readUInt32LE=function(ge,be){return ge>>>=0,be||ae(ge,4,this.length),(this[ge]|this[ge+1]<<8|this[ge+2]<<16)+16777216*this[ge+3]},g.prototype.readUint32BE=g.prototype.readUInt32BE=function(ge,be){return ge>>>=0,be||ae(ge,4,this.length),16777216*this[ge]+(this[ge+1]<<16|this[ge+2]<<8|this[ge+3])},g.prototype.readBigUInt64LE=De(function(ge){Ae(ge>>>=0,"offset");var be=this[ge],Se=this[ge+7];be!==void 0&&Se!==void 0||Me(ge,this.length-8);var Ne=be+this[++ge]*Math.pow(2,8)+this[++ge]*Math.pow(2,16)+this[++ge]*Math.pow(2,24),Ye=this[++ge]+this[++ge]*Math.pow(2,8)+this[++ge]*Math.pow(2,16)+Se*Math.pow(2,24);return BigInt(Ne)+(BigInt(Ye)<>>=0,"offset");var be=this[ge],Se=this[ge+7];be!==void 0&&Se!==void 0||Me(ge,this.length-8);var Ne=be*Math.pow(2,24)+this[++ge]*Math.pow(2,16)+this[++ge]*Math.pow(2,8)+this[++ge],Ye=this[++ge]*Math.pow(2,24)+this[++ge]*Math.pow(2,16)+this[++ge]*Math.pow(2,8)+Se;return(BigInt(Ne)<>>=0,be>>>=0,Se||ae(ge,be,this.length);for(var Ne=this[ge],Ye=1,Ze=0;++Ze=(Ye*=128)&&(Ne-=Math.pow(2,8*be)),Ne},g.prototype.readIntBE=function(ge,be,Se){ge>>>=0,be>>>=0,Se||ae(ge,be,this.length);for(var Ne=be,Ye=1,Ze=this[ge+--Ne];Ne>0&&(Ye*=256);)Ze+=this[ge+--Ne]*Ye;return Ze>=(Ye*=128)&&(Ze-=Math.pow(2,8*be)),Ze},g.prototype.readInt8=function(ge,be){return ge>>>=0,be||ae(ge,1,this.length),128&this[ge]?-1*(255-this[ge]+1):this[ge]},g.prototype.readInt16LE=function(ge,be){ge>>>=0,be||ae(ge,2,this.length);var Se=this[ge]|this[ge+1]<<8;return 32768&Se?4294901760|Se:Se},g.prototype.readInt16BE=function(ge,be){ge>>>=0,be||ae(ge,2,this.length);var Se=this[ge+1]|this[ge]<<8;return 32768&Se?4294901760|Se:Se},g.prototype.readInt32LE=function(ge,be){return ge>>>=0,be||ae(ge,4,this.length),this[ge]|this[ge+1]<<8|this[ge+2]<<16|this[ge+3]<<24},g.prototype.readInt32BE=function(ge,be){return ge>>>=0,be||ae(ge,4,this.length),this[ge]<<24|this[ge+1]<<16|this[ge+2]<<8|this[ge+3]},g.prototype.readBigInt64LE=De(function(ge){Ae(ge>>>=0,"offset");var be=this[ge],Se=this[ge+7];be!==void 0&&Se!==void 0||Me(ge,this.length-8);var Ne=this[ge+4]+this[ge+5]*Math.pow(2,8)+this[ge+6]*Math.pow(2,16)+(Se<<24);return(BigInt(Ne)<>>=0,"offset");var be=this[ge],Se=this[ge+7];be!==void 0&&Se!==void 0||Me(ge,this.length-8);var Ne=(be<<24)+this[++ge]*Math.pow(2,16)+this[++ge]*Math.pow(2,8)+this[++ge];return(BigInt(Ne)<>>=0,be||ae(ge,4,this.length),b.read(this,ge,!0,23,4)},g.prototype.readFloatBE=function(ge,be){return ge>>>=0,be||ae(ge,4,this.length),b.read(this,ge,!1,23,4)},g.prototype.readDoubleLE=function(ge,be){return ge>>>=0,be||ae(ge,8,this.length),b.read(this,ge,!0,52,8)},g.prototype.readDoubleBE=function(ge,be){return ge>>>=0,be||ae(ge,8,this.length),b.read(this,ge,!1,52,8)},g.prototype.writeUintLE=g.prototype.writeUIntLE=function(ge,be,Se,Ne){ge=+ge,be>>>=0,Se>>>=0,Ne||oe(this,ge,be,Se,Math.pow(2,8*Se)-1,0);var Ye=1,Ze=0;for(this[be]=255≥++Ze>>=0,Se>>>=0,Ne||oe(this,ge,be,Se,Math.pow(2,8*Se)-1,0);var Ye=Se-1,Ze=1;for(this[be+Ye]=255≥--Ye>=0&&(Ze*=256);)this[be+Ye]=ge/Ze&255;return be+Se},g.prototype.writeUint8=g.prototype.writeUInt8=function(ge,be,Se){return ge=+ge,be>>>=0,Se||oe(this,ge,be,1,255,0),this[be]=255&ge,be+1},g.prototype.writeUint16LE=g.prototype.writeUInt16LE=function(ge,be,Se){return ge=+ge,be>>>=0,Se||oe(this,ge,be,2,65535,0),this[be]=255&ge,this[be+1]=ge>>>8,be+2},g.prototype.writeUint16BE=g.prototype.writeUInt16BE=function(ge,be,Se){return ge=+ge,be>>>=0,Se||oe(this,ge,be,2,65535,0),this[be]=ge>>>8,this[be+1]=255&ge,be+2},g.prototype.writeUint32LE=g.prototype.writeUInt32LE=function(ge,be,Se){return ge=+ge,be>>>=0,Se||oe(this,ge,be,4,4294967295,0),this[be+3]=ge>>>24,this[be+2]=ge>>>16,this[be+1]=ge>>>8,this[be]=255&ge,be+4},g.prototype.writeUint32BE=g.prototype.writeUInt32BE=function(ge,be,Se){return ge=+ge,be>>>=0,Se||oe(this,ge,be,4,4294967295,0),this[be]=ge>>>24,this[be+1]=ge>>>16,this[be+2]=ge>>>8,this[be+3]=255&ge,be+4},g.prototype.writeBigUInt64LE=De(function(ge){var be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return se(this,ge,be,BigInt(0),BigInt("0xffffffffffffffff"))}),g.prototype.writeBigUInt64BE=De(function(ge){var be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return fe(this,ge,be,BigInt(0),BigInt("0xffffffffffffffff"))}),g.prototype.writeIntLE=function(ge,be,Se,Ne){if(ge=+ge,be>>>=0,!Ne){var Ye=Math.pow(2,8*Se-1);oe(this,ge,be,Se,Ye-1,-Ye)}var Ze=0,st=1,ot=0;for(this[be]=255≥++Ze>0)-ot&255;return be+Se},g.prototype.writeIntBE=function(ge,be,Se,Ne){if(ge=+ge,be>>>=0,!Ne){var Ye=Math.pow(2,8*Se-1);oe(this,ge,be,Se,Ye-1,-Ye)}var Ze=Se-1,st=1,ot=0;for(this[be+Ze]=255≥--Ze>=0&&(st*=256);)ge<0&&ot===0&&this[be+Ze+1]!==0&&(ot=1),this[be+Ze]=(ge/st>>0)-ot&255;return be+Se},g.prototype.writeInt8=function(ge,be,Se){return ge=+ge,be>>>=0,Se||oe(this,ge,be,1,127,-128),ge<0&&(ge=255+ge+1),this[be]=255&ge,be+1},g.prototype.writeInt16LE=function(ge,be,Se){return ge=+ge,be>>>=0,Se||oe(this,ge,be,2,32767,-32768),this[be]=255&ge,this[be+1]=ge>>>8,be+2},g.prototype.writeInt16BE=function(ge,be,Se){return ge=+ge,be>>>=0,Se||oe(this,ge,be,2,32767,-32768),this[be]=ge>>>8,this[be+1]=255&ge,be+2},g.prototype.writeInt32LE=function(ge,be,Se){return ge=+ge,be>>>=0,Se||oe(this,ge,be,4,2147483647,-2147483648),this[be]=255&ge,this[be+1]=ge>>>8,this[be+2]=ge>>>16,this[be+3]=ge>>>24,be+4},g.prototype.writeInt32BE=function(ge,be,Se){return ge=+ge,be>>>=0,Se||oe(this,ge,be,4,2147483647,-2147483648),ge<0&&(ge=4294967295+ge+1),this[be]=ge>>>24,this[be+1]=ge>>>16,this[be+2]=ge>>>8,this[be+3]=255&ge,be+4},g.prototype.writeBigInt64LE=De(function(ge){var be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return se(this,ge,be,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),g.prototype.writeBigInt64BE=De(function(ge){var be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return fe(this,ge,be,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),g.prototype.writeFloatLE=function(ge,be,Se){return he(this,ge,be,!0,Se)},g.prototype.writeFloatBE=function(ge,be,Se){return he(this,ge,be,!1,Se)},g.prototype.writeDoubleLE=function(ge,be,Se){return de(this,ge,be,!0,Se)},g.prototype.writeDoubleBE=function(ge,be,Se){return de(this,ge,be,!1,Se)},g.prototype.copy=function(ge,be,Se,Ne){if(!g.isBuffer(ge))throw new TypeError("argument should be a Buffer");if(Se||(Se=0),Ne||Ne===0||(Ne=this.length),be>=ge.length&&(be=ge.length),be||(be=0),Ne>0&&Ne=this.length)throw new RangeError("Index out of range");if(Ne<0)throw new RangeError("sourceEnd out of bounds");Ne>this.length&&(Ne=this.length),ge.length-be>>=0,Se=Se===void 0?this.length:Se>>>0,ge||(ge=0),typeof ge=="number")for(Ze=be;Ze"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var Et,Tt=u(st);if(ot){var xt=u(this).constructor;Et=Reflect.construct(Tt,arguments,xt)}else Et=Tt.apply(this,arguments);return o(this,Et)});function yt(){var Et;return i(this,yt),Et=ft.call(this),Object.defineProperty(a(Et),"message",{value:be.apply(a(Et),arguments),writable:!0,configurable:!0}),Et.name="".concat(Et.name," [").concat(ge,"]"),Et.stack,delete Et.name,Et}return Ye=yt,(Ze=[{key:"code",get:function(){return ge},set:function(Et){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Et,writable:!0})}},{key:"toString",value:function(){return"".concat(this.name," [").concat(ge,"]: ").concat(this.message)}}])&&r(Ye.prototype,Ze),Object.defineProperty(Ye,"prototype",{writable:!1}),yt}(Se)}function Re(ge){for(var be="",Se=ge.length,Ne=ge[0]==="-"?1:0;Se>=Ne+4;Se-=3)be="_".concat(ge.slice(Se-3,Se)).concat(be);return"".concat(ge.slice(0,Se)).concat(be)}function we(ge,be,Se,Ne,Ye,Ze){if(ge>Se||ge3?be===0||be===BigInt(0)?">= 0".concat(ot," and < 2").concat(ot," ** ").concat(8*(Ze+1)).concat(ot):">= -(2".concat(ot," ** ").concat(8*(Ze+1)-1).concat(ot,") and < 2 ** ")+"".concat(8*(Ze+1)-1).concat(ot):">= ".concat(be).concat(ot," and <= ").concat(Se).concat(ot),new pe.ERR_OUT_OF_RANGE("value",st,ge)}(function(ft,yt,Et){Ae(yt,"offset"),ft[yt]!==void 0&&ft[yt+Et]!==void 0||Me(yt,ft.length-(Et+1))})(Ne,Ye,Ze)}function Ae(ge,be){if(typeof ge!="number")throw new pe.ERR_INVALID_ARG_TYPE(be,"number",ge)}function Me(ge,be,Se){throw Math.floor(ge)!==ge?(Ae(ge,Se),new pe.ERR_OUT_OF_RANGE(Se||"offset","an integer",ge)):be<0?new pe.ERR_BUFFER_OUT_OF_BOUNDS:new pe.ERR_OUT_OF_RANGE(Se||"offset",">= ".concat(Se?1:0," and <= ").concat(be),ge)}ye("ERR_BUFFER_OUT_OF_BOUNDS",function(ge){return ge?"".concat(ge," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),ye("ERR_INVALID_ARG_TYPE",function(ge,be){return'The "'.concat(ge,'" argument must be of type number. Received type ').concat(p(be))},TypeError),ye("ERR_OUT_OF_RANGE",function(ge,be,Se){var Ne='The value of "'.concat(ge,'" is out of range.'),Ye=Se;return Number.isInteger(Se)&&Math.abs(Se)>Math.pow(2,32)?Ye=Re(String(Se)):typeof Se=="bigint"&&(Ye=String(Se),(Se>Math.pow(BigInt(2),BigInt(32))||Se<-Math.pow(BigInt(2),BigInt(32)))&&(Ye=Re(Ye)),Ye+="n"),Ne+" It must be ".concat(be,". Received ").concat(Ye)},RangeError);var Ce=/[^+/0-9A-Za-z-_]/g;function ne(ge,be){var Se;be=be||1/0;for(var Ne=ge.length,Ye=null,Ze=[],st=0;st55295&&Se<57344){if(!Ye){if(Se>56319){(be-=3)>-1&&Ze.push(239,191,189);continue}if(st+1===Ne){(be-=3)>-1&&Ze.push(239,191,189);continue}Ye=Se;continue}if(Se<56320){(be-=3)>-1&&Ze.push(239,191,189),Ye=Se;continue}Se=65536+(Ye-55296<<10|Se-56320)}else Ye&&(be-=3)>-1&&Ze.push(239,191,189);if(Ye=null,Se<128){if((be-=1)<0)break;Ze.push(Se)}else if(Se<2048){if((be-=2)<0)break;Ze.push(Se>>6|192,63&Se|128)}else if(Se<65536){if((be-=3)<0)break;Ze.push(Se>>12|224,Se>>6&63|128,63&Se|128)}else{if(!(Se<1114112))throw new Error("Invalid code point");if((be-=4)<0)break;Ze.push(Se>>18|240,Se>>12&63|128,Se>>6&63|128,63&Se|128)}}return Ze}function ue(ge){return c.toByteArray(function(be){if((be=(be=be.split("=")[0]).trim().replace(Ce,"")).length<2)return"";for(;be.length%4!=0;)be+="=";return be}(ge))}function me(ge,be,Se,Ne){var Ye;for(Ye=0;Ye=be.length||Ye>=ge.length);++Ye)be[Ye+Se]=ge[Ye];return Ye}function Te(ge,be){return ge instanceof be||ge!=null&&ge.constructor!=null&&ge.constructor.name!=null&&ge.constructor.name===be.name}function Ee(ge){return ge!=ge}var Ue=function(){for(var ge="0123456789abcdef",be=new Array(256),Se=0;Se<16;++Se)for(var Ne=16*Se,Ye=0;Ye<16;++Ye)be[Ne+Ye]=ge[Se]+ge[Ye];return be}();function De(ge){return typeof BigInt>"u"?je:ge}function je(){throw new Error("BigInt not supported")}},2321:function(f){f.exports=r,f.exports.isMobile=r,f.exports.default=r;var l=/(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,t=/CrOS/,i=/android|ipad|playbook|silk/i;function r(n){n||(n={});var o=n.ua;if(o||typeof navigator>"u"||(o=navigator.userAgent),o&&o.headers&&typeof o.headers["user-agent"]=="string"&&(o=o.headers["user-agent"]),typeof o!="string")return!1;var a=l.test(o)&&!t.test(o)||!!n.tablet&&i.test(o);return!a&&n.tablet&&n.featureDetect&&navigator&&navigator.maxTouchPoints>1&&o.indexOf("Macintosh")!==-1&&o.indexOf("Safari")!==-1&&(a=!0),a}},3910:function(f,l){l.byteLength=function(c){var b=u(c),d=b[0],v=b[1];return 3*(d+v)/4-v},l.toByteArray=function(c){var b,d,v=u(c),x=v[0],g=v[1],y=new r(function(M,A,C){return 3*(A+C)/4-C}(0,x,g)),k=0,h=g>0?x-4:x;for(d=0;d>16&255,y[k++]=b>>8&255,y[k++]=255&b;return g===2&&(b=i[c.charCodeAt(d)]<<2|i[c.charCodeAt(d+1)]>>4,y[k++]=255&b),g===1&&(b=i[c.charCodeAt(d)]<<10|i[c.charCodeAt(d+1)]<<4|i[c.charCodeAt(d+2)]>>2,y[k++]=b>>8&255,y[k++]=255&b),y},l.fromByteArray=function(c){for(var b,d=c.length,v=d%3,x=[],g=16383,y=0,k=d-v;yk?k:y+g));return v===1?(b=c[d-1],x.push(t[b>>2]+t[b<<4&63]+"==")):v===2&&(b=(c[d-2]<<8)+c[d-1],x.push(t[b>>10]+t[b>>4&63]+t[b<<2&63]+"=")),x.join("")};for(var t=[],i=[],r=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=n.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var d=c.indexOf("=");return d===-1&&(d=b),[d,d===b?0:4-d%4]}function p(c,b,d){for(var v,x,g=[],y=b;y>18&63]+t[x>>12&63]+t[x>>6&63]+t[63&x]);return g.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},3187:function(f,l){l.read=function(t,i,r,n,o){var a,u,p=8*o-n-1,c=(1<>1,d=-7,v=r?o-1:0,x=r?-1:1,g=t[i+v];for(v+=x,a=g&(1<<-d)-1,g>>=-d,d+=p;d>0;a=256*a+t[i+v],v+=x,d-=8);for(u=a&(1<<-d)-1,a>>=-d,d+=n;d>0;u=256*u+t[i+v],v+=x,d-=8);if(a===0)a=1-b;else{if(a===c)return u?NaN:1/0*(g?-1:1);u+=Math.pow(2,n),a-=b}return(g?-1:1)*u*Math.pow(2,a-n)},l.write=function(t,i,r,n,o,a){var u,p,c,b=8*a-o-1,d=(1<>1,x=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:a-1,y=n?1:-1,k=i<0||i===0&&1/i<0?1:0;for(i=Math.abs(i),isNaN(i)||i===1/0?(p=isNaN(i)?1:0,u=d):(u=Math.floor(Math.log(i)/Math.LN2),i*(c=Math.pow(2,-u))<1&&(u--,c*=2),(i+=u+v>=1?x/c:x*Math.pow(2,1-v))*c>=2&&(u++,c/=2),u+v>=d?(p=0,u=d):u+v>=1?(p=(i*c-1)*Math.pow(2,o),u+=v):(p=i*Math.pow(2,v-1)*Math.pow(2,o),u=0));o>=8;t[r+g]=255&p,g+=y,p/=256,o-=8);for(u=u<0;t[r+g]=255&u,g+=y,u/=256,b-=8);t[r+g-y]|=128*k}},1152:function(f,l,t){f.exports=function(u){var p=(u=u||{}).eye||[0,0,1],c=u.center||[0,0,0],b=u.up||[0,1,0],d=u.distanceLimits||[0,1/0],v=u.mode||"turntable",x=i(),g=r(),y=n();return x.setDistanceLimits(d[0],d[1]),x.lookAt(0,p,c,b),g.setDistanceLimits(d[0],d[1]),g.lookAt(0,p,c,b),y.setDistanceLimits(d[0],d[1]),y.lookAt(0,p,c,b),new o({turntable:x,orbit:g,matrix:y},v)};var i=t(3440),r=t(7774),n=t(9298);function o(u,p){this._controllerNames=Object.keys(u),this._controllerList=this._controllerNames.map(function(c){return u[c]}),this._mode=p,this._active=u[p],this._active||(this._mode="turntable",this._active=u.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 a=o.prototype;a.flush=function(u){for(var p=this._controllerList,c=0;c"u"?t(5346):WeakMap,r=t(5827),n=t(2944),o=new i;f.exports=function(a){var u=o.get(a),p=u&&(u._triangleBuffer.handle||u._triangleBuffer.buffer);if(!p||!a.isBuffer(p)){var c=r(a,new Float32Array([-1,-1,-1,4,4,-1]));(u=n(a,[{buffer:c,type:a.FLOAT,size:2}]))._triangleBuffer=c,o.set(a,u)}u.bind(),a.drawArrays(a.TRIANGLES,0,3),u.unbind()}},8008:function(f,l,t){var i=t(4930);f.exports=function(r,n,o){n=typeof n=="number"?n:1,o=o||": ";var a=r.split(/\r?\n/),u=String(a.length+n-1).length;return a.map(function(p,c){var b=c+n,d=String(b).length;return i(b,u-d)+o+p}).join(` +`)}},2153:function(f,l,t){f.exports=function(n){var o=n.length;if(o===0)return[];if(o===1)return[0];for(var a=n[0].length,u=[n[0]],p=[0],c=1;c0?d=d.ushln(x):x<0&&(v=v.ushln(-x)),a(d,v)}},234:function(f,l,t){var i=t(3218);f.exports=function(r){return Array.isArray(r)&&r.length===2&&i(r[0])&&i(r[1])}},4275:function(f,l,t){var i=t(1928);f.exports=function(r){return r.cmp(new i(0))}},9958:function(f,l,t){var i=t(4275);f.exports=function(r){var n=r.length,o=r.words,a=0;if(n===1)a=o[0];else if(n===2)a=o[0]+67108864*o[1];else for(var u=0;u20?52:a+32}},3218:function(f,l,t){t(1928),f.exports=function(i){return i&&typeof i=="object"&&!!i.words}},5514:function(f,l,t){var i=t(1928),r=t(8362);f.exports=function(n){var o=r.exponent(n);return o<52?new i(n):new i(n*Math.pow(2,52-o)).ushln(o-52)}},8524:function(f,l,t){var i=t(5514),r=t(4275);f.exports=function(n,o){var a=r(n),u=r(o);if(a===0)return[i(0),i(1)];if(u===0)return[i(0),i(0)];u<0&&(n=n.neg(),o=o.neg());var p=n.gcd(o);return p.cmpn(1)?[n.div(p),o.div(p)]:[n,o]}},2813:function(f,l,t){var i=t(1928);f.exports=function(r){return new i(r)}},3962:function(f,l,t){var i=t(8524);f.exports=function(r,n){return i(r[0].mul(n[0]),r[1].mul(n[1]))}},4951:function(f,l,t){var i=t(4275);f.exports=function(r){return i(r[0])*i(r[1])}},4354:function(f,l,t){var i=t(8524);f.exports=function(r,n){return i(r[0].mul(n[1]).sub(r[1].mul(n[0])),r[1].mul(n[1]))}},7999:function(f,l,t){var i=t(9958),r=t(1112);f.exports=function(n){var o=n[0],a=n[1];if(o.cmpn(0)===0)return 0;var u=o.abs().divmod(a.abs()),p=u.div,c=i(p),b=u.mod,d=o.negative!==a.negative?-1:1;if(b.cmpn(0)===0)return d*c;if(c){var v=r(c)+4,x=i(b.ushln(v).divRound(a));return d*(c+x*Math.pow(2,-v))}var g=a.bitLength()-b.bitLength()+53;return x=i(b.ushln(g).divRound(a)),g<1023?d*x*Math.pow(2,-g):d*(x*=Math.pow(2,-1023))*Math.pow(2,1023-g)}},5070:function(f){function l(a,u,p,c,b){for(var d=b+1;c<=b;){var v=c+b>>>1,x=a[v];(p!==void 0?p(x,u):x-u)>=0?(d=v,b=v-1):c=v+1}return d}function t(a,u,p,c,b){for(var d=b+1;c<=b;){var v=c+b>>>1,x=a[v];(p!==void 0?p(x,u):x-u)>0?(d=v,b=v-1):c=v+1}return d}function i(a,u,p,c,b){for(var d=c-1;c<=b;){var v=c+b>>>1,x=a[v];(p!==void 0?p(x,u):x-u)<0?(d=v,c=v+1):b=v-1}return d}function r(a,u,p,c,b){for(var d=c-1;c<=b;){var v=c+b>>>1,x=a[v];(p!==void 0?p(x,u):x-u)<=0?(d=v,c=v+1):b=v-1}return d}function n(a,u,p,c,b){for(;c<=b;){var d=c+b>>>1,v=a[d],x=p!==void 0?p(v,u):v-u;if(x===0)return d;x<=0?c=d+1:b=d-1}return-1}function o(a,u,p,c,b,d){return typeof p=="function"?d(a,u,p,c===void 0?0:0|c,b===void 0?a.length-1:0|b):d(a,u,void 0,p===void 0?0:0|p,c===void 0?a.length-1:0|c)}f.exports={ge:function(a,u,p,c,b){return o(a,u,p,c,b,l)},gt:function(a,u,p,c,b){return o(a,u,p,c,b,t)},lt:function(a,u,p,c,b){return o(a,u,p,c,b,i)},le:function(a,u,p,c,b){return o(a,u,p,c,b,r)},eq:function(a,u,p,c,b){return o(a,u,p,c,b,n)}}},2288:function(f,l){function t(r){var n=32;return(r&=-r)&&n--,65535&r&&(n-=16),16711935&r&&(n-=8),252645135&r&&(n-=4),858993459&r&&(n-=2),1431655765&r&&(n-=1),n}l.INT_BITS=32,l.INT_MAX=2147483647,l.INT_MIN=-2147483648,l.sign=function(r){return(r>0)-(r<0)},l.abs=function(r){var n=r>>31;return(r^n)-n},l.min=function(r,n){return n^(r^n)&-(r65535)<<4,n|=o=((r>>>=n)>255)<<3,n|=o=((r>>>=o)>15)<<2,(n|=o=((r>>>=o)>3)<<1)|(r>>>=o)>>1},l.log10=function(r){return r>=1e9?9:r>=1e8?8:r>=1e7?7:r>=1e6?6:r>=1e5?5:r>=1e4?4:r>=1e3?3:r>=100?2:r>=10?1:0},l.popCount=function(r){return 16843009*((r=(858993459&(r-=r>>>1&1431655765))+(r>>>2&858993459))+(r>>>4)&252645135)>>>24},l.countTrailingZeros=t,l.nextPow2=function(r){return r+=r===0,--r,r|=r>>>1,r|=r>>>2,r|=r>>>4,1+((r|=r>>>8)|r>>>16)},l.prevPow2=function(r){return r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,(r|=r>>>16)-(r>>>1)},l.parity=function(r){return r^=r>>>16,r^=r>>>8,r^=r>>>4,27030>>>(r&=15)&1};var i=new Array(256);(function(r){for(var n=0;n<256;++n){var o=n,a=n,u=7;for(o>>>=1;o;o>>>=1)a<<=1,a|=1&o,--u;r[n]=a<>>8&255]<<16|i[r>>>16&255]<<8|i[r>>>24&255]},l.interleave2=function(r,n){return(r=1431655765&((r=858993459&((r=252645135&((r=16711935&((r&=65535)|r<<8))|r<<4))|r<<2))|r<<1))|(n=1431655765&((n=858993459&((n=252645135&((n=16711935&((n&=65535)|n<<8))|n<<4))|n<<2))|n<<1))<<1},l.deinterleave2=function(r,n){return(r=65535&((r=16711935&((r=252645135&((r=858993459&((r=r>>>n&1431655765)|r>>>1))|r>>>2))|r>>>4))|r>>>16))<<16>>16},l.interleave3=function(r,n,o){return r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2),(r|=(n=1227133513&((n=3272356035&((n=251719695&((n=4278190335&((n&=1023)|n<<16))|n<<8))|n<<4))|n<<2))<<1)|(o=1227133513&((o=3272356035&((o=251719695&((o=4278190335&((o&=1023)|o<<16))|o<<8))|o<<4))|o<<2))<<2},l.deinterleave3=function(r,n){return(r=1023&((r=4278190335&((r=251719695&((r=3272356035&((r=r>>>n&1227133513)|r>>>2))|r>>>4))|r>>>8))|r>>>16))<<22>>22},l.nextCombination=function(r){var n=r|r-1;return n+1|(~n&-~n)-1>>>t(r)+1}},1928:function(f,l,t){(function(i,r){function n(B,G){if(!B)throw new Error(G||"Assertion failed")}function o(B,G){B.super_=G;var N=function(){};N.prototype=G.prototype,B.prototype=new N,B.prototype.constructor=B}function a(B,G,N){if(a.isBN(B))return B;this.negative=0,this.words=null,this.length=0,this.red=null,B!==null&&(G!=="le"&&G!=="be"||(N=G,G=10),this._init(B||0,G||10,N||"be"))}var u;typeof i=="object"?i.exports=a:r.BN=a,a.BN=a,a.wordSize=26;try{u=typeof window<"u"&&window.Buffer!==void 0?window.Buffer:t(6601).Buffer}catch{}function p(B,G){var N=B.charCodeAt(G);return N>=65&&N<=70?N-55:N>=97&&N<=102?N-87:N-48&15}function c(B,G,N){var j=p(B,N);return N-1>=G&&(j|=p(B,N-1)<<4),j}function b(B,G,N,j){for(var V=0,H=Math.min(B.length,N),ee=G;ee=49?Q-49+10:Q>=17?Q-17+10:Q}return V}a.isBN=function(B){return B instanceof a||B!==null&&typeof B=="object"&&B.constructor.wordSize===a.wordSize&&Array.isArray(B.words)},a.max=function(B,G){return B.cmp(G)>0?B:G},a.min=function(B,G){return B.cmp(G)<0?B:G},a.prototype._init=function(B,G,N){if(typeof B=="number")return this._initNumber(B,G,N);if(typeof B=="object")return this._initArray(B,G,N);G==="hex"&&(G=16),n(G===(0|G)&&G>=2&&G<=36);var j=0;(B=B.toString().replace(/\s+/g,""))[0]==="-"&&(j++,this.negative=1),j=0;j-=3)H=B[j]|B[j-1]<<8|B[j-2]<<16,this.words[V]|=H<>>26-ee&67108863,(ee+=24)>=26&&(ee-=26,V++);else if(N==="le")for(j=0,V=0;j>>26-ee&67108863,(ee+=24)>=26&&(ee-=26,V++);return this.strip()},a.prototype._parseHex=function(B,G,N){this.length=Math.ceil((B.length-G)/6),this.words=new Array(this.length);for(var j=0;j=G;j-=2)V=c(B,G,j)<=18?(H-=18,ee+=1,this.words[ee]|=V>>>26):H+=8;else for(j=(B.length-G)%2==0?G+1:G;j=18?(H-=18,ee+=1,this.words[ee]|=V>>>26):H+=8;this.strip()},a.prototype._parseBase=function(B,G,N){this.words=[0],this.length=1;for(var j=0,V=1;V<=67108863;V*=G)j++;j--,V=V/G|0;for(var H=B.length-N,ee=H%j,Q=Math.min(H,H-ee)+N,Y=0,X=N;X1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},a.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var d=["","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"],v=[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],x=[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];function g(B,G,N){N.negative=G.negative^B.negative;var j=B.length+G.length|0;N.length=j,j=j-1|0;var V=0|B.words[0],H=0|G.words[0],ee=V*H,Q=67108863&ee,Y=ee/67108864|0;N.words[0]=Q;for(var X=1;X>>26,te=67108863&Y,ae=Math.min(X,G.length-1),oe=Math.max(0,X-B.length+1);oe<=ae;oe++){var se=X-oe|0;K+=(ee=(V=0|B.words[se])*(H=0|G.words[oe])+te)/67108864|0,te=67108863&ee}N.words[X]=0|te,Y=0|K}return Y!==0?N.words[X]=0|Y:N.length--,N.strip()}a.prototype.toString=function(B,G){var N;if(G=0|G||1,(B=B||10)===16||B==="hex"){N="";for(var j=0,V=0,H=0;H>>24-j&16777215)!=0||H!==this.length-1?d[6-Q.length]+Q+N:Q+N,(j+=2)>=26&&(j-=26,H--)}for(V!==0&&(N=V.toString(16)+N);N.length%G!=0;)N="0"+N;return this.negative!==0&&(N="-"+N),N}if(B===(0|B)&&B>=2&&B<=36){var Y=v[B],X=x[B];N="";var K=this.clone();for(K.negative=0;!K.isZero();){var te=K.modn(X).toString(B);N=(K=K.idivn(X)).isZero()?te+N:d[Y-te.length]+te+N}for(this.isZero()&&(N="0"+N);N.length%G!=0;)N="0"+N;return this.negative!==0&&(N="-"+N),N}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var B=this.words[0];return this.length===2?B+=67108864*this.words[1]:this.length===3&&this.words[2]===1?B+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-B:B},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(B,G){return n(u!==void 0),this.toArrayLike(u,B,G)},a.prototype.toArray=function(B,G){return this.toArrayLike(Array,B,G)},a.prototype.toArrayLike=function(B,G,N){var j=this.byteLength(),V=N||Math.max(1,j);n(j<=V,"byte array longer than desired length"),n(V>0,"Requested array length <= 0"),this.strip();var H,ee,Q=G==="le",Y=new B(V),X=this.clone();if(Q){for(ee=0;!X.isZero();ee++)H=X.andln(255),X.iushrn(8),Y[ee]=H;for(;ee=4096&&(N+=13,G>>>=13),G>=64&&(N+=7,G>>>=7),G>=8&&(N+=4,G>>>=4),G>=2&&(N+=2,G>>>=2),N+G},a.prototype._zeroBits=function(B){if(B===0)return 26;var G=B,N=0;return!(8191&G)&&(N+=13,G>>>=13),!(127&G)&&(N+=7,G>>>=7),!(15&G)&&(N+=4,G>>>=4),!(3&G)&&(N+=2,G>>>=2),!(1&G)&&N++,N},a.prototype.bitLength=function(){var B=this.words[this.length-1],G=this._countBits(B);return 26*(this.length-1)+G},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var B=0,G=0;GB.length?this.clone().ior(B):B.clone().ior(this)},a.prototype.uor=function(B){return this.length>B.length?this.clone().iuor(B):B.clone().iuor(this)},a.prototype.iuand=function(B){var G;G=this.length>B.length?B:this;for(var N=0;NB.length?this.clone().iand(B):B.clone().iand(this)},a.prototype.uand=function(B){return this.length>B.length?this.clone().iuand(B):B.clone().iuand(this)},a.prototype.iuxor=function(B){var G,N;this.length>B.length?(G=this,N=B):(G=B,N=this);for(var j=0;jB.length?this.clone().ixor(B):B.clone().ixor(this)},a.prototype.uxor=function(B){return this.length>B.length?this.clone().iuxor(B):B.clone().iuxor(this)},a.prototype.inotn=function(B){n(typeof B=="number"&&B>=0);var G=0|Math.ceil(B/26),N=B%26;this._expand(G),N>0&&G--;for(var j=0;j0&&(this.words[j]=~this.words[j]&67108863>>26-N),this.strip()},a.prototype.notn=function(B){return this.clone().inotn(B)},a.prototype.setn=function(B,G){n(typeof B=="number"&&B>=0);var N=B/26|0,j=B%26;return this._expand(N+1),this.words[N]=G?this.words[N]|1<B.length?(N=this,j=B):(N=B,j=this);for(var V=0,H=0;H>>26;for(;V!==0&&H>>26;if(this.length=N.length,V!==0)this.words[this.length]=V,this.length++;else if(N!==this)for(;HB.length?this.clone().iadd(B):B.clone().iadd(this)},a.prototype.isub=function(B){if(B.negative!==0){B.negative=0;var G=this.iadd(B);return B.negative=1,G._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(B),this.negative=1,this._normSign();var N,j,V=this.cmp(B);if(V===0)return this.negative=0,this.length=1,this.words[0]=0,this;V>0?(N=this,j=B):(N=B,j=this);for(var H=0,ee=0;ee>26,this.words[ee]=67108863&G;for(;H!==0&&ee>26,this.words[ee]=67108863&G;if(H===0&&ee>>13,oe=0|ee[1],se=8191&oe,fe=oe>>>13,xe=0|ee[2],he=8191&xe,de=xe>>>13,pe=0|ee[3],ye=8191&pe,Re=pe>>>13,we=0|ee[4],Ae=8191&we,Me=we>>>13,Ce=0|ee[5],ne=8191&Ce,ue=Ce>>>13,me=0|ee[6],Te=8191&me,Ee=me>>>13,Ue=0|ee[7],De=8191&Ue,je=Ue>>>13,ge=0|ee[8],be=8191&ge,Se=ge>>>13,Ne=0|ee[9],Ye=8191&Ne,Ze=Ne>>>13,st=0|Q[0],ot=8191&st,ft=st>>>13,yt=0|Q[1],Et=8191&yt,Tt=yt>>>13,xt=0|Q[2],Dt=8191&xt,It=xt>>>13,Ft=0|Q[3],qt=8191&Ft,Nt=Ft>>>13,Je=0|Q[4],Ke=8191&Je,Ge=Je>>>13,nt=0|Q[5],ht=8191&nt,Oe=nt>>>13,Be=0|Q[6],Qe=8191&Be,ut=Be>>>13,pt=0|Q[7],bt=8191&pt,Lt=pt>>>13,Ct=0|Q[8],mt=8191&Ct,Ot=Ct>>>13,_t=0|Q[9],Pt=8191&_t,Bt=_t>>>13;N.negative=B.negative^G.negative,N.length=19;var Wt=(X+(j=Math.imul(te,ot))|0)+((8191&(V=(V=Math.imul(te,ft))+Math.imul(ae,ot)|0))<<13)|0;X=((H=Math.imul(ae,ft))+(V>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,j=Math.imul(se,ot),V=(V=Math.imul(se,ft))+Math.imul(fe,ot)|0,H=Math.imul(fe,ft);var Gt=(X+(j=j+Math.imul(te,Et)|0)|0)+((8191&(V=(V=V+Math.imul(te,Tt)|0)+Math.imul(ae,Et)|0))<<13)|0;X=((H=H+Math.imul(ae,Tt)|0)+(V>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,j=Math.imul(he,ot),V=(V=Math.imul(he,ft))+Math.imul(de,ot)|0,H=Math.imul(de,ft),j=j+Math.imul(se,Et)|0,V=(V=V+Math.imul(se,Tt)|0)+Math.imul(fe,Et)|0,H=H+Math.imul(fe,Tt)|0;var Xt=(X+(j=j+Math.imul(te,Dt)|0)|0)+((8191&(V=(V=V+Math.imul(te,It)|0)+Math.imul(ae,Dt)|0))<<13)|0;X=((H=H+Math.imul(ae,It)|0)+(V>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,j=Math.imul(ye,ot),V=(V=Math.imul(ye,ft))+Math.imul(Re,ot)|0,H=Math.imul(Re,ft),j=j+Math.imul(he,Et)|0,V=(V=V+Math.imul(he,Tt)|0)+Math.imul(de,Et)|0,H=H+Math.imul(de,Tt)|0,j=j+Math.imul(se,Dt)|0,V=(V=V+Math.imul(se,It)|0)+Math.imul(fe,Dt)|0,H=H+Math.imul(fe,It)|0;var Kt=(X+(j=j+Math.imul(te,qt)|0)|0)+((8191&(V=(V=V+Math.imul(te,Nt)|0)+Math.imul(ae,qt)|0))<<13)|0;X=((H=H+Math.imul(ae,Nt)|0)+(V>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,j=Math.imul(Ae,ot),V=(V=Math.imul(Ae,ft))+Math.imul(Me,ot)|0,H=Math.imul(Me,ft),j=j+Math.imul(ye,Et)|0,V=(V=V+Math.imul(ye,Tt)|0)+Math.imul(Re,Et)|0,H=H+Math.imul(Re,Tt)|0,j=j+Math.imul(he,Dt)|0,V=(V=V+Math.imul(he,It)|0)+Math.imul(de,Dt)|0,H=H+Math.imul(de,It)|0,j=j+Math.imul(se,qt)|0,V=(V=V+Math.imul(se,Nt)|0)+Math.imul(fe,qt)|0,H=H+Math.imul(fe,Nt)|0;var nn=(X+(j=j+Math.imul(te,Ke)|0)|0)+((8191&(V=(V=V+Math.imul(te,Ge)|0)+Math.imul(ae,Ke)|0))<<13)|0;X=((H=H+Math.imul(ae,Ge)|0)+(V>>>13)|0)+(nn>>>26)|0,nn&=67108863,j=Math.imul(ne,ot),V=(V=Math.imul(ne,ft))+Math.imul(ue,ot)|0,H=Math.imul(ue,ft),j=j+Math.imul(Ae,Et)|0,V=(V=V+Math.imul(Ae,Tt)|0)+Math.imul(Me,Et)|0,H=H+Math.imul(Me,Tt)|0,j=j+Math.imul(ye,Dt)|0,V=(V=V+Math.imul(ye,It)|0)+Math.imul(Re,Dt)|0,H=H+Math.imul(Re,It)|0,j=j+Math.imul(he,qt)|0,V=(V=V+Math.imul(he,Nt)|0)+Math.imul(de,qt)|0,H=H+Math.imul(de,Nt)|0,j=j+Math.imul(se,Ke)|0,V=(V=V+Math.imul(se,Ge)|0)+Math.imul(fe,Ke)|0,H=H+Math.imul(fe,Ge)|0;var yn=(X+(j=j+Math.imul(te,ht)|0)|0)+((8191&(V=(V=V+Math.imul(te,Oe)|0)+Math.imul(ae,ht)|0))<<13)|0;X=((H=H+Math.imul(ae,Oe)|0)+(V>>>13)|0)+(yn>>>26)|0,yn&=67108863,j=Math.imul(Te,ot),V=(V=Math.imul(Te,ft))+Math.imul(Ee,ot)|0,H=Math.imul(Ee,ft),j=j+Math.imul(ne,Et)|0,V=(V=V+Math.imul(ne,Tt)|0)+Math.imul(ue,Et)|0,H=H+Math.imul(ue,Tt)|0,j=j+Math.imul(Ae,Dt)|0,V=(V=V+Math.imul(Ae,It)|0)+Math.imul(Me,Dt)|0,H=H+Math.imul(Me,It)|0,j=j+Math.imul(ye,qt)|0,V=(V=V+Math.imul(ye,Nt)|0)+Math.imul(Re,qt)|0,H=H+Math.imul(Re,Nt)|0,j=j+Math.imul(he,Ke)|0,V=(V=V+Math.imul(he,Ge)|0)+Math.imul(de,Ke)|0,H=H+Math.imul(de,Ge)|0,j=j+Math.imul(se,ht)|0,V=(V=V+Math.imul(se,Oe)|0)+Math.imul(fe,ht)|0,H=H+Math.imul(fe,Oe)|0;var ln=(X+(j=j+Math.imul(te,Qe)|0)|0)+((8191&(V=(V=V+Math.imul(te,ut)|0)+Math.imul(ae,Qe)|0))<<13)|0;X=((H=H+Math.imul(ae,ut)|0)+(V>>>13)|0)+(ln>>>26)|0,ln&=67108863,j=Math.imul(De,ot),V=(V=Math.imul(De,ft))+Math.imul(je,ot)|0,H=Math.imul(je,ft),j=j+Math.imul(Te,Et)|0,V=(V=V+Math.imul(Te,Tt)|0)+Math.imul(Ee,Et)|0,H=H+Math.imul(Ee,Tt)|0,j=j+Math.imul(ne,Dt)|0,V=(V=V+Math.imul(ne,It)|0)+Math.imul(ue,Dt)|0,H=H+Math.imul(ue,It)|0,j=j+Math.imul(Ae,qt)|0,V=(V=V+Math.imul(Ae,Nt)|0)+Math.imul(Me,qt)|0,H=H+Math.imul(Me,Nt)|0,j=j+Math.imul(ye,Ke)|0,V=(V=V+Math.imul(ye,Ge)|0)+Math.imul(Re,Ke)|0,H=H+Math.imul(Re,Ge)|0,j=j+Math.imul(he,ht)|0,V=(V=V+Math.imul(he,Oe)|0)+Math.imul(de,ht)|0,H=H+Math.imul(de,Oe)|0,j=j+Math.imul(se,Qe)|0,V=(V=V+Math.imul(se,ut)|0)+Math.imul(fe,Qe)|0,H=H+Math.imul(fe,ut)|0;var kn=(X+(j=j+Math.imul(te,bt)|0)|0)+((8191&(V=(V=V+Math.imul(te,Lt)|0)+Math.imul(ae,bt)|0))<<13)|0;X=((H=H+Math.imul(ae,Lt)|0)+(V>>>13)|0)+(kn>>>26)|0,kn&=67108863,j=Math.imul(be,ot),V=(V=Math.imul(be,ft))+Math.imul(Se,ot)|0,H=Math.imul(Se,ft),j=j+Math.imul(De,Et)|0,V=(V=V+Math.imul(De,Tt)|0)+Math.imul(je,Et)|0,H=H+Math.imul(je,Tt)|0,j=j+Math.imul(Te,Dt)|0,V=(V=V+Math.imul(Te,It)|0)+Math.imul(Ee,Dt)|0,H=H+Math.imul(Ee,It)|0,j=j+Math.imul(ne,qt)|0,V=(V=V+Math.imul(ne,Nt)|0)+Math.imul(ue,qt)|0,H=H+Math.imul(ue,Nt)|0,j=j+Math.imul(Ae,Ke)|0,V=(V=V+Math.imul(Ae,Ge)|0)+Math.imul(Me,Ke)|0,H=H+Math.imul(Me,Ge)|0,j=j+Math.imul(ye,ht)|0,V=(V=V+Math.imul(ye,Oe)|0)+Math.imul(Re,ht)|0,H=H+Math.imul(Re,Oe)|0,j=j+Math.imul(he,Qe)|0,V=(V=V+Math.imul(he,ut)|0)+Math.imul(de,Qe)|0,H=H+Math.imul(de,ut)|0,j=j+Math.imul(se,bt)|0,V=(V=V+Math.imul(se,Lt)|0)+Math.imul(fe,bt)|0,H=H+Math.imul(fe,Lt)|0;var Wn=(X+(j=j+Math.imul(te,mt)|0)|0)+((8191&(V=(V=V+Math.imul(te,Ot)|0)+Math.imul(ae,mt)|0))<<13)|0;X=((H=H+Math.imul(ae,Ot)|0)+(V>>>13)|0)+(Wn>>>26)|0,Wn&=67108863,j=Math.imul(Ye,ot),V=(V=Math.imul(Ye,ft))+Math.imul(Ze,ot)|0,H=Math.imul(Ze,ft),j=j+Math.imul(be,Et)|0,V=(V=V+Math.imul(be,Tt)|0)+Math.imul(Se,Et)|0,H=H+Math.imul(Se,Tt)|0,j=j+Math.imul(De,Dt)|0,V=(V=V+Math.imul(De,It)|0)+Math.imul(je,Dt)|0,H=H+Math.imul(je,It)|0,j=j+Math.imul(Te,qt)|0,V=(V=V+Math.imul(Te,Nt)|0)+Math.imul(Ee,qt)|0,H=H+Math.imul(Ee,Nt)|0,j=j+Math.imul(ne,Ke)|0,V=(V=V+Math.imul(ne,Ge)|0)+Math.imul(ue,Ke)|0,H=H+Math.imul(ue,Ge)|0,j=j+Math.imul(Ae,ht)|0,V=(V=V+Math.imul(Ae,Oe)|0)+Math.imul(Me,ht)|0,H=H+Math.imul(Me,Oe)|0,j=j+Math.imul(ye,Qe)|0,V=(V=V+Math.imul(ye,ut)|0)+Math.imul(Re,Qe)|0,H=H+Math.imul(Re,ut)|0,j=j+Math.imul(he,bt)|0,V=(V=V+Math.imul(he,Lt)|0)+Math.imul(de,bt)|0,H=H+Math.imul(de,Lt)|0,j=j+Math.imul(se,mt)|0,V=(V=V+Math.imul(se,Ot)|0)+Math.imul(fe,mt)|0,H=H+Math.imul(fe,Ot)|0;var wn=(X+(j=j+Math.imul(te,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(te,Bt)|0)+Math.imul(ae,Pt)|0))<<13)|0;X=((H=H+Math.imul(ae,Bt)|0)+(V>>>13)|0)+(wn>>>26)|0,wn&=67108863,j=Math.imul(Ye,Et),V=(V=Math.imul(Ye,Tt))+Math.imul(Ze,Et)|0,H=Math.imul(Ze,Tt),j=j+Math.imul(be,Dt)|0,V=(V=V+Math.imul(be,It)|0)+Math.imul(Se,Dt)|0,H=H+Math.imul(Se,It)|0,j=j+Math.imul(De,qt)|0,V=(V=V+Math.imul(De,Nt)|0)+Math.imul(je,qt)|0,H=H+Math.imul(je,Nt)|0,j=j+Math.imul(Te,Ke)|0,V=(V=V+Math.imul(Te,Ge)|0)+Math.imul(Ee,Ke)|0,H=H+Math.imul(Ee,Ge)|0,j=j+Math.imul(ne,ht)|0,V=(V=V+Math.imul(ne,Oe)|0)+Math.imul(ue,ht)|0,H=H+Math.imul(ue,Oe)|0,j=j+Math.imul(Ae,Qe)|0,V=(V=V+Math.imul(Ae,ut)|0)+Math.imul(Me,Qe)|0,H=H+Math.imul(Me,ut)|0,j=j+Math.imul(ye,bt)|0,V=(V=V+Math.imul(ye,Lt)|0)+Math.imul(Re,bt)|0,H=H+Math.imul(Re,Lt)|0,j=j+Math.imul(he,mt)|0,V=(V=V+Math.imul(he,Ot)|0)+Math.imul(de,mt)|0,H=H+Math.imul(de,Ot)|0;var on=(X+(j=j+Math.imul(se,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(se,Bt)|0)+Math.imul(fe,Pt)|0))<<13)|0;X=((H=H+Math.imul(fe,Bt)|0)+(V>>>13)|0)+(on>>>26)|0,on&=67108863,j=Math.imul(Ye,Dt),V=(V=Math.imul(Ye,It))+Math.imul(Ze,Dt)|0,H=Math.imul(Ze,It),j=j+Math.imul(be,qt)|0,V=(V=V+Math.imul(be,Nt)|0)+Math.imul(Se,qt)|0,H=H+Math.imul(Se,Nt)|0,j=j+Math.imul(De,Ke)|0,V=(V=V+Math.imul(De,Ge)|0)+Math.imul(je,Ke)|0,H=H+Math.imul(je,Ge)|0,j=j+Math.imul(Te,ht)|0,V=(V=V+Math.imul(Te,Oe)|0)+Math.imul(Ee,ht)|0,H=H+Math.imul(Ee,Oe)|0,j=j+Math.imul(ne,Qe)|0,V=(V=V+Math.imul(ne,ut)|0)+Math.imul(ue,Qe)|0,H=H+Math.imul(ue,ut)|0,j=j+Math.imul(Ae,bt)|0,V=(V=V+Math.imul(Ae,Lt)|0)+Math.imul(Me,bt)|0,H=H+Math.imul(Me,Lt)|0,j=j+Math.imul(ye,mt)|0,V=(V=V+Math.imul(ye,Ot)|0)+Math.imul(Re,mt)|0,H=H+Math.imul(Re,Ot)|0;var _n=(X+(j=j+Math.imul(he,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(he,Bt)|0)+Math.imul(de,Pt)|0))<<13)|0;X=((H=H+Math.imul(de,Bt)|0)+(V>>>13)|0)+(_n>>>26)|0,_n&=67108863,j=Math.imul(Ye,qt),V=(V=Math.imul(Ye,Nt))+Math.imul(Ze,qt)|0,H=Math.imul(Ze,Nt),j=j+Math.imul(be,Ke)|0,V=(V=V+Math.imul(be,Ge)|0)+Math.imul(Se,Ke)|0,H=H+Math.imul(Se,Ge)|0,j=j+Math.imul(De,ht)|0,V=(V=V+Math.imul(De,Oe)|0)+Math.imul(je,ht)|0,H=H+Math.imul(je,Oe)|0,j=j+Math.imul(Te,Qe)|0,V=(V=V+Math.imul(Te,ut)|0)+Math.imul(Ee,Qe)|0,H=H+Math.imul(Ee,ut)|0,j=j+Math.imul(ne,bt)|0,V=(V=V+Math.imul(ne,Lt)|0)+Math.imul(ue,bt)|0,H=H+Math.imul(ue,Lt)|0,j=j+Math.imul(Ae,mt)|0,V=(V=V+Math.imul(Ae,Ot)|0)+Math.imul(Me,mt)|0,H=H+Math.imul(Me,Ot)|0;var fn=(X+(j=j+Math.imul(ye,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(ye,Bt)|0)+Math.imul(Re,Pt)|0))<<13)|0;X=((H=H+Math.imul(Re,Bt)|0)+(V>>>13)|0)+(fn>>>26)|0,fn&=67108863,j=Math.imul(Ye,Ke),V=(V=Math.imul(Ye,Ge))+Math.imul(Ze,Ke)|0,H=Math.imul(Ze,Ge),j=j+Math.imul(be,ht)|0,V=(V=V+Math.imul(be,Oe)|0)+Math.imul(Se,ht)|0,H=H+Math.imul(Se,Oe)|0,j=j+Math.imul(De,Qe)|0,V=(V=V+Math.imul(De,ut)|0)+Math.imul(je,Qe)|0,H=H+Math.imul(je,ut)|0,j=j+Math.imul(Te,bt)|0,V=(V=V+Math.imul(Te,Lt)|0)+Math.imul(Ee,bt)|0,H=H+Math.imul(Ee,Lt)|0,j=j+Math.imul(ne,mt)|0,V=(V=V+Math.imul(ne,Ot)|0)+Math.imul(ue,mt)|0,H=H+Math.imul(ue,Ot)|0;var hn=(X+(j=j+Math.imul(Ae,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(Ae,Bt)|0)+Math.imul(Me,Pt)|0))<<13)|0;X=((H=H+Math.imul(Me,Bt)|0)+(V>>>13)|0)+(hn>>>26)|0,hn&=67108863,j=Math.imul(Ye,ht),V=(V=Math.imul(Ye,Oe))+Math.imul(Ze,ht)|0,H=Math.imul(Ze,Oe),j=j+Math.imul(be,Qe)|0,V=(V=V+Math.imul(be,ut)|0)+Math.imul(Se,Qe)|0,H=H+Math.imul(Se,ut)|0,j=j+Math.imul(De,bt)|0,V=(V=V+Math.imul(De,Lt)|0)+Math.imul(je,bt)|0,H=H+Math.imul(je,Lt)|0,j=j+Math.imul(Te,mt)|0,V=(V=V+Math.imul(Te,Ot)|0)+Math.imul(Ee,mt)|0,H=H+Math.imul(Ee,Ot)|0;var In=(X+(j=j+Math.imul(ne,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(ne,Bt)|0)+Math.imul(ue,Pt)|0))<<13)|0;X=((H=H+Math.imul(ue,Bt)|0)+(V>>>13)|0)+(In>>>26)|0,In&=67108863,j=Math.imul(Ye,Qe),V=(V=Math.imul(Ye,ut))+Math.imul(Ze,Qe)|0,H=Math.imul(Ze,ut),j=j+Math.imul(be,bt)|0,V=(V=V+Math.imul(be,Lt)|0)+Math.imul(Se,bt)|0,H=H+Math.imul(Se,Lt)|0,j=j+Math.imul(De,mt)|0,V=(V=V+Math.imul(De,Ot)|0)+Math.imul(je,mt)|0,H=H+Math.imul(je,Ot)|0;var Cn=(X+(j=j+Math.imul(Te,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(Te,Bt)|0)+Math.imul(Ee,Pt)|0))<<13)|0;X=((H=H+Math.imul(Ee,Bt)|0)+(V>>>13)|0)+(Cn>>>26)|0,Cn&=67108863,j=Math.imul(Ye,bt),V=(V=Math.imul(Ye,Lt))+Math.imul(Ze,bt)|0,H=Math.imul(Ze,Lt),j=j+Math.imul(be,mt)|0,V=(V=V+Math.imul(be,Ot)|0)+Math.imul(Se,mt)|0,H=H+Math.imul(Se,Ot)|0;var Nn=(X+(j=j+Math.imul(De,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(De,Bt)|0)+Math.imul(je,Pt)|0))<<13)|0;X=((H=H+Math.imul(je,Bt)|0)+(V>>>13)|0)+(Nn>>>26)|0,Nn&=67108863,j=Math.imul(Ye,mt),V=(V=Math.imul(Ye,Ot))+Math.imul(Ze,mt)|0,H=Math.imul(Ze,Ot);var Hn=(X+(j=j+Math.imul(be,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(be,Bt)|0)+Math.imul(Se,Pt)|0))<<13)|0;X=((H=H+Math.imul(Se,Bt)|0)+(V>>>13)|0)+(Hn>>>26)|0,Hn&=67108863;var qn=(X+(j=Math.imul(Ye,Pt))|0)+((8191&(V=(V=Math.imul(Ye,Bt))+Math.imul(Ze,Pt)|0))<<13)|0;return X=((H=Math.imul(Ze,Bt))+(V>>>13)|0)+(qn>>>26)|0,qn&=67108863,Y[0]=Wt,Y[1]=Gt,Y[2]=Xt,Y[3]=Kt,Y[4]=nn,Y[5]=yn,Y[6]=ln,Y[7]=kn,Y[8]=Wn,Y[9]=wn,Y[10]=on,Y[11]=_n,Y[12]=fn,Y[13]=hn,Y[14]=In,Y[15]=Cn,Y[16]=Nn,Y[17]=Hn,Y[18]=qn,X!==0&&(Y[19]=X,N.length++),N};function k(B,G,N){return new h().mulp(B,G,N)}function h(B,G){this.x=B,this.y=G}Math.imul||(y=g),a.prototype.mulTo=function(B,G){var N,j=this.length+B.length;return N=this.length===10&&B.length===10?y(this,B,G):j<63?g(this,B,G):j<1024?function(V,H,ee){ee.negative=H.negative^V.negative,ee.length=V.length+H.length;for(var Q=0,Y=0,X=0;X>>26)|0)>>>26,K&=67108863}ee.words[X]=te,Q=K,K=Y}return Q!==0?ee.words[X]=Q:ee.length--,ee.strip()}(this,B,G):k(this,B,G),N},h.prototype.makeRBT=function(B){for(var G=new Array(B),N=a.prototype._countBits(B)-1,j=0;j>=1;return j},h.prototype.permute=function(B,G,N,j,V,H){for(var ee=0;ee>>=1)V++;return 1<>>=13,N[2*H+1]=8191&V,V>>>=13;for(H=2*G;H>=26,G+=j/67108864|0,G+=V>>>26,this.words[N]=67108863&V}return G!==0&&(this.words[N]=G,this.length++),this},a.prototype.muln=function(B){return this.clone().imuln(B)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(B){var G=function(H){for(var ee=new Array(H.bitLength()),Q=0;Q>>X}return ee}(B);if(G.length===0)return new a(1);for(var N=this,j=0;j=0);var G,N=B%26,j=(B-N)/26,V=67108863>>>26-N<<26-N;if(N!==0){var H=0;for(G=0;G>>26-N}H&&(this.words[G]=H,this.length++)}if(j!==0){for(G=this.length-1;G>=0;G--)this.words[G+j]=this.words[G];for(G=0;G=0),j=G?(G-G%26)/26:0;var V=B%26,H=Math.min((B-V)/26,this.length),ee=67108863^67108863>>>V<H)for(this.length-=H,Y=0;Y=0&&(X!==0||Y>=j);Y--){var K=0|this.words[Y];this.words[Y]=X<<26-V|K>>>V,X=K&ee}return Q&&X!==0&&(Q.words[Q.length++]=X),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(B,G,N){return n(this.negative===0),this.iushrn(B,G,N)},a.prototype.shln=function(B){return this.clone().ishln(B)},a.prototype.ushln=function(B){return this.clone().iushln(B)},a.prototype.shrn=function(B){return this.clone().ishrn(B)},a.prototype.ushrn=function(B){return this.clone().iushrn(B)},a.prototype.testn=function(B){n(typeof B=="number"&&B>=0);var G=B%26,N=(B-G)/26,j=1<=0);var G=B%26,N=(B-G)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=N)return this;if(G!==0&&N++,this.length=Math.min(N,this.length),G!==0){var j=67108863^67108863>>>G<=67108864;G++)this.words[G]-=67108864,G===this.length-1?this.words[G+1]=1:this.words[G+1]++;return this.length=Math.max(this.length,G+1),this},a.prototype.isubn=function(B){if(n(typeof B=="number"),n(B<67108864),B<0)return this.iaddn(-B);if(this.negative!==0)return this.negative=0,this.iaddn(B),this.negative=1,this;if(this.words[0]-=B,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var G=0;G>26)-(Q/67108864|0),this.words[j+N]=67108863&V}for(;j>26,this.words[j+N]=67108863&V;if(ee===0)return this.strip();for(n(ee===-1),ee=0,j=0;j>26,this.words[j]=67108863&V;return this.negative=1,this.strip()},a.prototype._wordDiv=function(B,G){var N=(this.length,B.length),j=this.clone(),V=B,H=0|V.words[V.length-1];(N=26-this._countBits(H))!=0&&(V=V.ushln(N),j.iushln(N),H=0|V.words[V.length-1]);var ee,Q=j.length-V.length;if(G!=="mod"){(ee=new a(null)).length=Q+1,ee.words=new Array(ee.length);for(var Y=0;Y=0;K--){var te=67108864*(0|j.words[V.length+K])+(0|j.words[V.length+K-1]);for(te=Math.min(te/H|0,67108863),j._ishlnsubmul(V,te,K);j.negative!==0;)te--,j.negative=0,j._ishlnsubmul(V,1,K),j.isZero()||(j.negative^=1);ee&&(ee.words[K]=te)}return ee&&ee.strip(),j.strip(),G!=="div"&&N!==0&&j.iushrn(N),{div:ee||null,mod:j}},a.prototype.divmod=function(B,G,N){return n(!B.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:this.negative!==0&&B.negative===0?(H=this.neg().divmod(B,G),G!=="mod"&&(j=H.div.neg()),G!=="div"&&(V=H.mod.neg(),N&&V.negative!==0&&V.iadd(B)),{div:j,mod:V}):this.negative===0&&B.negative!==0?(H=this.divmod(B.neg(),G),G!=="mod"&&(j=H.div.neg()),{div:j,mod:H.mod}):this.negative&B.negative?(H=this.neg().divmod(B.neg(),G),G!=="div"&&(V=H.mod.neg(),N&&V.negative!==0&&V.isub(B)),{div:H.div,mod:V}):B.length>this.length||this.cmp(B)<0?{div:new a(0),mod:this}:B.length===1?G==="div"?{div:this.divn(B.words[0]),mod:null}:G==="mod"?{div:null,mod:new a(this.modn(B.words[0]))}:{div:this.divn(B.words[0]),mod:new a(this.modn(B.words[0]))}:this._wordDiv(B,G);var j,V,H},a.prototype.div=function(B){return this.divmod(B,"div",!1).div},a.prototype.mod=function(B){return this.divmod(B,"mod",!1).mod},a.prototype.umod=function(B){return this.divmod(B,"mod",!0).mod},a.prototype.divRound=function(B){var G=this.divmod(B);if(G.mod.isZero())return G.div;var N=G.div.negative!==0?G.mod.isub(B):G.mod,j=B.ushrn(1),V=B.andln(1),H=N.cmp(j);return H<0||V===1&&H===0?G.div:G.div.negative!==0?G.div.isubn(1):G.div.iaddn(1)},a.prototype.modn=function(B){n(B<=67108863);for(var G=67108864%B,N=0,j=this.length-1;j>=0;j--)N=(G*N+(0|this.words[j]))%B;return N},a.prototype.idivn=function(B){n(B<=67108863);for(var G=0,N=this.length-1;N>=0;N--){var j=(0|this.words[N])+67108864*G;this.words[N]=j/B|0,G=j%B}return this.strip()},a.prototype.divn=function(B){return this.clone().idivn(B)},a.prototype.egcd=function(B){n(B.negative===0),n(!B.isZero());var G=this,N=B.clone();G=G.negative!==0?G.umod(B):G.clone();for(var j=new a(1),V=new a(0),H=new a(0),ee=new a(1),Q=0;G.isEven()&&N.isEven();)G.iushrn(1),N.iushrn(1),++Q;for(var Y=N.clone(),X=G.clone();!G.isZero();){for(var K=0,te=1;!(G.words[0]&te)&&K<26;++K,te<<=1);if(K>0)for(G.iushrn(K);K-- >0;)(j.isOdd()||V.isOdd())&&(j.iadd(Y),V.isub(X)),j.iushrn(1),V.iushrn(1);for(var ae=0,oe=1;!(N.words[0]&oe)&&ae<26;++ae,oe<<=1);if(ae>0)for(N.iushrn(ae);ae-- >0;)(H.isOdd()||ee.isOdd())&&(H.iadd(Y),ee.isub(X)),H.iushrn(1),ee.iushrn(1);G.cmp(N)>=0?(G.isub(N),j.isub(H),V.isub(ee)):(N.isub(G),H.isub(j),ee.isub(V))}return{a:H,b:ee,gcd:N.iushln(Q)}},a.prototype._invmp=function(B){n(B.negative===0),n(!B.isZero());var G=this,N=B.clone();G=G.negative!==0?G.umod(B):G.clone();for(var j,V=new a(1),H=new a(0),ee=N.clone();G.cmpn(1)>0&&N.cmpn(1)>0;){for(var Q=0,Y=1;!(G.words[0]&Y)&&Q<26;++Q,Y<<=1);if(Q>0)for(G.iushrn(Q);Q-- >0;)V.isOdd()&&V.iadd(ee),V.iushrn(1);for(var X=0,K=1;!(N.words[0]&K)&&X<26;++X,K<<=1);if(X>0)for(N.iushrn(X);X-- >0;)H.isOdd()&&H.iadd(ee),H.iushrn(1);G.cmp(N)>=0?(G.isub(N),V.isub(H)):(N.isub(G),H.isub(V))}return(j=G.cmpn(1)===0?V:H).cmpn(0)<0&&j.iadd(B),j},a.prototype.gcd=function(B){if(this.isZero())return B.abs();if(B.isZero())return this.abs();var G=this.clone(),N=B.clone();G.negative=0,N.negative=0;for(var j=0;G.isEven()&&N.isEven();j++)G.iushrn(1),N.iushrn(1);for(;;){for(;G.isEven();)G.iushrn(1);for(;N.isEven();)N.iushrn(1);var V=G.cmp(N);if(V<0){var H=G;G=N,N=H}else if(V===0||N.cmpn(1)===0)break;G.isub(N)}return N.iushln(j)},a.prototype.invm=function(B){return this.egcd(B).a.umod(B)},a.prototype.isEven=function(){return(1&this.words[0])==0},a.prototype.isOdd=function(){return(1&this.words[0])==1},a.prototype.andln=function(B){return this.words[0]&B},a.prototype.bincn=function(B){n(typeof B=="number");var G=B%26,N=(B-G)/26,j=1<>>26,ee&=67108863,this.words[H]=ee}return V!==0&&(this.words[H]=V,this.length++),this},a.prototype.isZero=function(){return this.length===1&&this.words[0]===0},a.prototype.cmpn=function(B){var G,N=B<0;if(this.negative!==0&&!N)return-1;if(this.negative===0&&N)return 1;if(this.strip(),this.length>1)G=1;else{N&&(B=-B),n(B<=67108863,"Number is too big");var j=0|this.words[0];G=j===B?0:jB.length)return 1;if(this.length=0;N--){var j=0|this.words[N],V=0|B.words[N];if(j!==V){jV&&(G=1);break}}return G},a.prototype.gtn=function(B){return this.cmpn(B)===1},a.prototype.gt=function(B){return this.cmp(B)===1},a.prototype.gten=function(B){return this.cmpn(B)>=0},a.prototype.gte=function(B){return this.cmp(B)>=0},a.prototype.ltn=function(B){return this.cmpn(B)===-1},a.prototype.lt=function(B){return this.cmp(B)===-1},a.prototype.lten=function(B){return this.cmpn(B)<=0},a.prototype.lte=function(B){return this.cmp(B)<=0},a.prototype.eqn=function(B){return this.cmpn(B)===0},a.prototype.eq=function(B){return this.cmp(B)===0},a.red=function(B){return new R(B)},a.prototype.toRed=function(B){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),B.convertTo(this)._forceRed(B)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(B){return this.red=B,this},a.prototype.forceRed=function(B){return n(!this.red,"Already a number in reduction context"),this._forceRed(B)},a.prototype.redAdd=function(B){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,B)},a.prototype.redIAdd=function(B){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,B)},a.prototype.redSub=function(B){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,B)},a.prototype.redISub=function(B){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,B)},a.prototype.redShl=function(B){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,B)},a.prototype.redMul=function(B){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,B),this.red.mul(this,B)},a.prototype.redIMul=function(B){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,B),this.red.imul(this,B)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(B){return n(this.red&&!B.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,B)};var M={k256:null,p224:null,p192:null,p25519:null};function A(B,G){this.name=B,this.p=new a(G,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function C(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function L(){A.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function O(){A.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function I(){A.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function R(B){if(typeof B=="string"){var G=a._prime(B);this.m=G.p,this.prime=G}else n(B.gtn(1),"modulus must be greater than 1"),this.m=B,this.prime=null}function U(B){R.call(this,B),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}A.prototype._tmp=function(){var B=new a(null);return B.words=new Array(Math.ceil(this.n/13)),B},A.prototype.ireduce=function(B){var G,N=B;do this.split(N,this.tmp),G=(N=(N=this.imulK(N)).iadd(this.tmp)).bitLength();while(G>this.n);var j=G0?N.isub(this.p):N.strip!==void 0?N.strip():N._strip(),N},A.prototype.split=function(B,G){B.iushrn(this.n,0,G)},A.prototype.imulK=function(B){return B.imul(this.k)},o(C,A),C.prototype.split=function(B,G){for(var N=4194303,j=Math.min(B.length,9),V=0;V>>22,H=ee}H>>>=22,B.words[V-10]=H,H===0&&B.length>10?B.length-=10:B.length-=9},C.prototype.imulK=function(B){B.words[B.length]=0,B.words[B.length+1]=0,B.length+=2;for(var G=0,N=0;N>>=26,B.words[N]=V,G=j}return G!==0&&(B.words[B.length++]=G),B},a._prime=function(B){if(M[B])return M[B];var G;if(B==="k256")G=new C;else if(B==="p224")G=new L;else if(B==="p192")G=new O;else{if(B!=="p25519")throw new Error("Unknown prime "+B);G=new I}return M[B]=G,G},R.prototype._verify1=function(B){n(B.negative===0,"red works only with positives"),n(B.red,"red works only with red numbers")},R.prototype._verify2=function(B,G){n((B.negative|G.negative)==0,"red works only with positives"),n(B.red&&B.red===G.red,"red works only with red numbers")},R.prototype.imod=function(B){return this.prime?this.prime.ireduce(B)._forceRed(this):B.umod(this.m)._forceRed(this)},R.prototype.neg=function(B){return B.isZero()?B.clone():this.m.sub(B)._forceRed(this)},R.prototype.add=function(B,G){this._verify2(B,G);var N=B.add(G);return N.cmp(this.m)>=0&&N.isub(this.m),N._forceRed(this)},R.prototype.iadd=function(B,G){this._verify2(B,G);var N=B.iadd(G);return N.cmp(this.m)>=0&&N.isub(this.m),N},R.prototype.sub=function(B,G){this._verify2(B,G);var N=B.sub(G);return N.cmpn(0)<0&&N.iadd(this.m),N._forceRed(this)},R.prototype.isub=function(B,G){this._verify2(B,G);var N=B.isub(G);return N.cmpn(0)<0&&N.iadd(this.m),N},R.prototype.shl=function(B,G){return this._verify1(B),this.imod(B.ushln(G))},R.prototype.imul=function(B,G){return this._verify2(B,G),this.imod(B.imul(G))},R.prototype.mul=function(B,G){return this._verify2(B,G),this.imod(B.mul(G))},R.prototype.isqr=function(B){return this.imul(B,B.clone())},R.prototype.sqr=function(B){return this.mul(B,B)},R.prototype.sqrt=function(B){if(B.isZero())return B.clone();var G=this.m.andln(3);if(n(G%2==1),G===3){var N=this.m.add(new a(1)).iushrn(2);return this.pow(B,N)}for(var j=this.m.subn(1),V=0;!j.isZero()&&j.andln(1)===0;)V++,j.iushrn(1);n(!j.isZero());var H=new a(1).toRed(this),ee=H.redNeg(),Q=this.m.subn(1).iushrn(1),Y=this.m.bitLength();for(Y=new a(2*Y*Y).toRed(this);this.pow(Y,Q).cmp(ee)!==0;)Y.redIAdd(ee);for(var X=this.pow(Y,j),K=this.pow(B,j.addn(1).iushrn(1)),te=this.pow(B,j),ae=V;te.cmp(H)!==0;){for(var oe=te,se=0;oe.cmp(H)!==0;se++)oe=oe.redSqr();n(se=0;j--){for(var Y=G.words[j],X=Q-1;X>=0;X--){var K=Y>>X&1;V!==N[0]&&(V=this.sqr(V)),K!==0||H!==0?(H<<=1,H|=K,(++ee==4||j===0&&X===0)&&(V=this.mul(V,N[H]),ee=0,H=0)):ee=0}Q=26}return V},R.prototype.convertTo=function(B){var G=B.umod(this.m);return G===B?G.clone():G},R.prototype.convertFrom=function(B){var G=B.clone();return G.red=null,G},a.mont=function(B){return new U(B)},o(U,R),U.prototype.convertTo=function(B){return this.imod(B.ushln(this.shift))},U.prototype.convertFrom=function(B){var G=this.imod(B.mul(this.rinv));return G.red=null,G},U.prototype.imul=function(B,G){if(B.isZero()||G.isZero())return B.words[0]=0,B.length=1,B;var N=B.imul(G),j=N.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),V=N.isub(j).iushrn(this.shift),H=V;return V.cmp(this.m)>=0?H=V.isub(this.m):V.cmpn(0)<0&&(H=V.iadd(this.m)),H._forceRed(this)},U.prototype.mul=function(B,G){if(B.isZero()||G.isZero())return new a(0)._forceRed(this);var N=B.mul(G),j=N.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),V=N.isub(j).iushrn(this.shift),H=V;return V.cmp(this.m)>=0?H=V.isub(this.m):V.cmpn(0)<0&&(H=V.iadd(this.m)),H._forceRed(this)},U.prototype.invm=function(B){return this.imod(B._invmp(this.m).mul(this.r2))._forceRed(this)}})(f=t.nmd(f),this)},2692:function(f){f.exports=function(l){var t,i,r,n=l.length,o=0;for(t=0;t>>1;if(!(M<=0)){var A,C=r.mallocDouble(2*M*k),L=r.mallocInt32(k);if((k=u(v,M,C,L))>0){if(M===1&&y)n.init(k),A=n.sweepComplete(M,g,0,k,C,L,0,k,C,L);else{var O=r.mallocDouble(2*M*h),I=r.mallocInt32(h);(h=u(x,M,O,I))>0&&(n.init(k+h),A=M===1?n.sweepBipartite(M,g,0,k,C,L,0,h,O,I):o(M,g,y,k,C,L,h,O,I),r.free(O),r.free(I))}r.free(C),r.free(L)}return A}}}function c(v,x){i.push([v,x])}function b(v){return i=[],p(v,v,c,!0),i}function d(v,x){return i=[],p(v,x,c,!1),i}},7333:function(f,l){function t(i){return i?function(r,n,o,a,u,p,c,b,d,v,x){return u-a>d-b?function(g,y,k,h,M,A,C,L,O,I,R){for(var U=2*g,B=h,G=U*h;Bv-d?a?function(y,k,h,M,A,C,L,O,I,R,U){for(var B=2*y,G=M,N=B*M;G0;){var Q=6*(H-=1),Y=k[Q],X=k[Q+1],K=k[Q+2],te=k[Q+3],ae=k[Q+4],oe=k[Q+5],se=2*H,fe=h[se],xe=h[se+1],he=1&oe,de=!!(16&oe),pe=U,ye=B,Re=N,we=j;if(he&&(pe=N,ye=j,Re=U,we=B),!(2&oe&&(K=v(L,Y,X,K,pe,ye,xe),X>=K)||4&oe&&(X=x(L,Y,X,K,pe,ye,fe))>=K)){var Ae=K-X,Me=ae-te;if(de){if(L*Ae*(Ae+Me)<4194304){if((V=u.scanComplete(L,Y,O,X,K,pe,ye,te,ae,Re,we))!==void 0)return V;continue}}else{if(L*Math.min(Ae,Me)<128){if((V=o(L,Y,O,he,X,K,pe,ye,te,ae,Re,we))!==void 0)return V;continue}if(L*Ae*Me<4194304){if((V=u.scanBipartite(L,Y,O,he,X,K,pe,ye,te,ae,Re,we))!==void 0)return V;continue}}var Ce=b(L,Y,X,K,pe,ye,fe,xe);if(X=p0)&&!(p1>=hi)"),d=c("lo===p0"),v=c("lo>>1,x=2*n,g=v,y=p[x*v+o];b=C?(g=A,y=C):M>=O?(g=h,y=M):(g=L,y=O):C>=O?(g=A,y=C):O>=M?(g=h,y=M):(g=L,y=O);for(var I=x*(d-1),R=x*g,U=0;Ua&&p[y+o]>x;--g,y-=b){for(var k=y,h=y+b,M=0;Mx;++x,c+=p)if(o[c+v]===u)if(d===x)d+=1,b+=p;else{for(var g=0;p>g;++g){var y=o[c+g];o[c+g]=o[b],o[b++]=y}var k=a[x];a[x]=a[d],a[d++]=k}return d},"lox;++x,c+=p)if(o[c+v]g;++g){var y=o[c+g];o[c+g]=o[b],o[b++]=y}var k=a[x];a[x]=a[d],a[d++]=k}return d},"lo<=p0":function(t,i,r,n,o,a,u){for(var p=2*t,c=p*r,b=c,d=r,v=t+i,x=r;n>x;++x,c+=p)if(o[c+v]<=u)if(d===x)d+=1,b+=p;else{for(var g=0;p>g;++g){var y=o[c+g];o[c+g]=o[b],o[b++]=y}var k=a[x];a[x]=a[d],a[d++]=k}return d},"hi<=p0":function(t,i,r,n,o,a,u){for(var p=2*t,c=p*r,b=c,d=r,v=t+i,x=r;n>x;++x,c+=p)if(o[c+v]<=u)if(d===x)d+=1,b+=p;else{for(var g=0;p>g;++g){var y=o[c+g];o[c+g]=o[b],o[b++]=y}var k=a[x];a[x]=a[d],a[d++]=k}return d},"log;++g,c+=p){var y=o[c+v],k=o[c+x];if(yh;++h){var M=o[c+h];o[c+h]=o[b],o[b++]=M}var A=a[g];a[g]=a[d],a[d++]=A}}return d},"lo<=p0&&p0<=hi":function(t,i,r,n,o,a,u){for(var p=2*t,c=p*r,b=c,d=r,v=i,x=t+i,g=r;n>g;++g,c+=p){var y=o[c+v],k=o[c+x];if(y<=u&&u<=k)if(d===g)d+=1,b+=p;else{for(var h=0;p>h;++h){var M=o[c+h];o[c+h]=o[b],o[b++]=M}var A=a[g];a[g]=a[d],a[d++]=A}}return d},"!(lo>=p0)&&!(p1>=hi)":function(t,i,r,n,o,a,u,p){for(var c=2*t,b=c*r,d=b,v=r,x=i,g=t+i,y=r;n>y;++y,b+=c){var k=o[b+x],h=o[b+g];if(!(k>=u||p>=h))if(v===y)v+=1,d+=c;else{for(var M=0;c>M;++M){var A=o[b+M];o[b+M]=o[d],o[d++]=A}var C=a[y];a[y]=a[v],a[v++]=C}}return v}}},309:function(f){function l(p,c,b){for(var d=2*(p+1),v=p+1;v<=c;++v){for(var x=b[d++],g=b[d++],y=v,k=d-2;y-- >p;){var h=b[k-2],M=b[k-1];if(hb[c+1])}function a(p,c,b,d){var v=d[p*=2];return v>1,y=g-d,k=g+d,h=v,M=y,A=g,C=k,L=x,O=p+1,I=c-1,R=0;o(h,M,b)&&(R=h,h=M,M=R),o(C,L,b)&&(R=C,C=L,L=R),o(h,A,b)&&(R=h,h=A,A=R),o(M,A,b)&&(R=M,M=A,A=R),o(h,C,b)&&(R=h,h=C,C=R),o(A,C,b)&&(R=A,A=C,C=R),o(M,L,b)&&(R=M,M=L,L=R),o(M,A,b)&&(R=M,M=A,A=R),o(C,L,b)&&(R=C,C=L,L=R);for(var U=b[2*M],B=b[2*M+1],G=b[2*C],N=b[2*C+1],j=2*h,V=2*A,H=2*L,ee=2*v,Q=2*g,Y=2*x,X=0;X<2;++X){var K=b[j+X],te=b[V+X],ae=b[H+X];b[ee+X]=K,b[Q+X]=te,b[Y+X]=ae}i(y,p,b),i(k,c,b);for(var oe=O;oe<=I;++oe)if(a(oe,U,B,b))oe!==O&&t(oe,O,b),++O;else if(!a(oe,G,N,b))for(;;){if(a(I,G,N,b)){a(I,U,B,b)?(r(oe,O,I,b),++O,--I):(t(oe,I,b),--I);break}if(--I>>1;n(x,Y);var X=0,K=0;for(V=0;V=o)g(c,b,K--,te=te-o|0);else if(te>=0)g(u,p,X--,te);else if(te<=-268435456){te=-te-o|0;for(var ae=0;ae>>1;n(x,Y);var X=0,K=0,te=0;for(V=0;V>1==x[2*V+3]>>1&&(oe=2,V+=1),ae<0){for(var se=-(ae>>1)-1,fe=0;fe>1)-1,oe===0?g(u,p,X--,se):oe===1?g(c,b,K--,se):oe===2&&g(d,v,te--,se)}},scanBipartite:function(k,h,M,A,C,L,O,I,R,U,B,G){var N=0,j=2*k,V=h,H=h+k,ee=1,Q=1;A?Q=o:ee=o;for(var Y=C;Y>>1;n(x,ae);var oe=0;for(Y=0;Y=o?(fe=!A,X-=o):(fe=!!A,X-=1),fe)y(u,p,oe++,X);else{var xe=G[X],he=j*X,de=B[he+h+1],pe=B[he+h+1+k];e:for(var ye=0;ye>>1;n(x,X);var K=0;for(H=0;H=o)u[K++]=ee-o;else{var ae=B[ee-=1],oe=N*ee,se=U[oe+h+1],fe=U[oe+h+1+k];e:for(var xe=0;xe=0;--xe)if(u[xe]===ee){for(ye=xe+1;ye0;){for(var y=a.pop(),k=(v=-1,x=-1,b=p[c=a.pop()],1);k=0||(o.flip(c,y),r(n,o,a,v,c,x),r(n,o,a,c,x,v),r(n,o,a,x,y,v),r(n,o,a,y,v,x))}}},7098:function(f,l,t){var i,r=t(5070);function n(a,u,p,c,b,d,v){this.cells=a,this.neighbor=u,this.flags=c,this.constraint=p,this.active=b,this.next=d,this.boundary=v}function o(a,u){return a[0]-u[0]||a[1]-u[1]||a[2]-u[2]}f.exports=function(a,u,p){var c=function(O,I){for(var R=O.cells(),U=R.length,B=0;B0||v.length>0;){for(;d.length>0;){var h=d.pop();if(x[h]!==-b){x[h]=b,g[h];for(var M=0;M<3;++M){var A=k[3*h+M];A>=0&&x[A]===0&&(y[3*h+M]?v.push(A):(d.push(A),x[A]=b))}}}var C=v;v=d,d=C,v.length=0,b=-b}var L=function(O,I,R){for(var U=0,B=0;B1&&r(g[L[O-2]],g[L[O-1]],y)>0;)v.push([L[O-1],L[O-2],k]),O-=1;L.length=O,L.push(k);var I=C.upperIds;for(O=I.length;O>1&&r(g[I[O-2]],g[I[O-1]],y)<0;)v.push([I[O-2],I[O-1],k]),O-=1;I.length=O,I.push(k)}}function c(v,x){var g;return(g=v.a[0]C[0]&&k.push(new o(C,A,2,h),new o(A,C,1,h))}k.sort(a);for(var L=k[0].a[0]-(1+Math.abs(k[0].a[0]))*Math.pow(2,-52),O=[new n([L,1],[L,0],-1,[],[])],I=[],R=(h=0,k.length);h=0}}(),n.removeTriangle=function(a,u,p){var c=this.stars;o(c[a],u,p),o(c[u],p,a),o(c[p],a,u)},n.addTriangle=function(a,u,p){var c=this.stars;c[a].push(u,p),c[u].push(p,a),c[p].push(a,u)},n.opposite=function(a,u){for(var p=this.stars[u],c=1,b=p.length;cA[2]?1:0)}function k(M,A,C){if(M.length!==0){if(A)for(var L=0;L=0;--H){var se=G[ee=(we=j[H])[0]],fe=se[0],xe=se[1],he=B[fe],de=B[xe];if((he[0]-de[0]||he[1]-de[1])<0){var pe=fe;fe=xe,xe=pe}se[0]=fe;var ye,Re=se[1]=we[1];for(V&&(ye=se[2]);H>0&&j[H-1][0]===ee;){var we,Ae=(we=j[--H])[1];V?G.push([Re,Ae,ye]):G.push([Re,Ae]),Re=Ae}V?G.push([Re,xe,ye]):G.push([Re,xe])}return Q}(M,A,O,I,C),U=x(M,R);return k(A,U,C),!!U||O.length>0||I.length>0}},5528:function(f,l,t){f.exports=function(b,d,v,x){var g=a(d,b),y=a(x,v),k=c(g,y);if(o(k)===0)return null;var h=c(y,a(b,v)),M=r(h,k),A=p(g,M);return u(b,A)};var i=t(3962),r=t(9189),n=t(4354),o=t(4951),a=t(6695),u=t(7584),p=t(4469);function c(b,d){return n(i(b[0],d[1]),i(b[1],d[0]))}},5692:function(f){f.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},9156:function(f,l,t){var i=t(5692),r=t(3578);function n(u){return[u[0]/255,u[1]/255,u[2]/255,u[3]]}function o(u){for(var p,c="#",b=0;b<3;++b)c+=("00"+(p=(p=u[b]).toString(16))).substr(p.length);return c}function a(u){return"rgba("+u.join(",")+")"}f.exports=function(u){var p,c,b,d,v,x,g,y,k,h;if(u||(u={}),y=(u.nshades||72)-1,g=u.format||"hex",(x=u.colormap)||(x="jet"),typeof x=="string"){if(x=x.toLowerCase(),!i[x])throw Error(x+" not a supported colorscale");v=i[x]}else{if(!Array.isArray(x))throw Error("unsupported colormap option",x);v=x.slice()}if(v.length>y+1)throw new Error(x+" map requires nshades to be at least size "+v.length);k=Array.isArray(u.alpha)?u.alpha.length!==2?[1,1]:u.alpha.slice():typeof u.alpha=="number"?[u.alpha,u.alpha]:[1,1],p=v.map(function(O){return Math.round(O.index*y)}),k[0]=Math.min(Math.max(k[0],0),1),k[1]=Math.min(Math.max(k[1],0),1);var M=v.map(function(O,I){var R=v[I].index,U=v[I].rgb.slice();return U.length===4&&U[3]>=0&&U[3]<=1||(U[3]=k[0]+(k[1]-k[0])*R),U}),A=[];for(h=0;h0||u(p,c,d)?-1:1:x===0?g>0||u(p,c,b)?1:-1:r(g-x)}var k=i(p,c,b);return k>0?v>0&&i(p,c,d)>0?1:-1:k<0?v>0||i(p,c,d)>0?1:-1:i(p,c,d)>0||u(p,c,b)?1:-1};var i=t(417),r=t(7538),n=t(87),o=t(2019),a=t(9662);function u(p,c,b){var d=n(p[0],-c[0]),v=n(p[1],-c[1]),x=n(b[0],-c[0]),g=n(b[1],-c[1]),y=a(o(d,x),o(v,g));return y[y.length-1]>=0}},7538:function(f){f.exports=function(l){return l<0?-1:l>0?1:0}},9209:function(f){f.exports=function(i,r){var n=i.length,o=i.length-r.length;if(o)return o;switch(n){case 0:return 0;case 1:return i[0]-r[0];case 2:return i[0]+i[1]-r[0]-r[1]||l(i[0],i[1])-l(r[0],r[1]);case 3:var a=i[0]+i[1],u=r[0]+r[1];if(o=a+i[2]-(u+r[2]))return o;var p=l(i[0],i[1]),c=l(r[0],r[1]);return l(p,i[2])-l(c,r[2])||l(p+i[2],a)-l(c+r[2],u);case 4:var b=i[0],d=i[1],v=i[2],x=i[3],g=r[0],y=r[1],k=r[2],h=r[3];return b+d+v+x-(g+y+k+h)||l(b,d,v,x)-l(g,y,k,h,g)||l(b+d,b+v,b+x,d+v,d+x,v+x)-l(g+y,g+k,g+h,y+k,y+h,k+h)||l(b+d+v,b+d+x,b+v+x,d+v+x)-l(g+y+k,g+y+h,g+k+h,y+k+h);default:for(var M=i.slice().sort(t),A=r.slice().sort(t),C=0;Cl[i][0]&&(i=r);return ti?[[i],[t]]:[[t]]}},8722:function(f,l,t){f.exports=function(r){var n=i(r),o=n.length;if(o<=2)return[];for(var a=new Array(o),u=n[o-1],p=0;p=b[h]&&(k+=1);g[y]=k}}return c}(i(u,!0),a)}};var i=t(2183),r=t(2153)},9680:function(f){f.exports=function(l,t,i,r,n,o){var a=n-1,u=n*n,p=a*a,c=(1+2*n)*p,b=n*p,d=u*(3-2*n),v=u*a;if(l.length){o||(o=new Array(l.length));for(var x=l.length-1;x>=0;--x)o[x]=c*l[x]+b*t[x]+d*i[x]+v*r[x];return o}return c*l+b*t+d*i+v*r},f.exports.derivative=function(l,t,i,r,n,o){var a=6*n*n-6*n,u=3*n*n-4*n+1,p=-6*n*n+6*n,c=3*n*n-2*n;if(l.length){o||(o=new Array(l.length));for(var b=l.length-1;b>=0;--b)o[b]=a*l[b]+u*t[b]+p*i[b]+c*r[b];return o}return a*l+u*t+p*i[b]+c*r}},4419:function(f,l,t){var i=t(2183),r=t(1215);function n(a,u){this.point=a,this.index=u}function o(a,u){for(var p=a.point,c=u.point,b=p.length,d=0;d=2)return!1;R[B]=G}return!0}):I.filter(function(R){for(var U=0;U<=c;++U){var B=A[R[U]];if(B<0)return!1;R[U]=B}return!0}),1&c)for(v=0;v>>31},f.exports.exponent=function(n){return(f.exports.hi(n)<<1>>>21)-1023},f.exports.fraction=function(n){var o=f.exports.lo(n),a=f.exports.hi(n),u=1048575&a;return 2146435072&a&&(u+=1048576),[o,u]},f.exports.denormalized=function(n){return!(2146435072&f.exports.hi(n))}},3094:function(f){function l(t,i,r){var n=0|t[r];if(n<=0)return[];var o,a=new Array(n);if(r===t.length-1)for(o=0;o0)return function(r,n){var o,a;for(o=new Array(r),a=0;a=b-1){h=x.length-1;var A=p-c[b-1];for(M=0;M=b-1)for(var k=x.length-1,h=(c[b-1],0);h=0;--b)if(p[--c])return!1;return!0},a.jump=function(p){var c=this.lastT(),b=this.dimension;if(!(p0;--M)d.push(n(y[M-1],k[M-1],arguments[M])),v.push(0)}},a.push=function(p){var c=this.lastT(),b=this.dimension;if(!(p1e-6?1/g:0;this._time.push(p);for(var A=b;A>0;--A){var C=n(k[A-1],h[A-1],arguments[A]);d.push(C),v.push((C-d[x++])*M)}}},a.set=function(p){var c=this.dimension;if(!(p0;--y)b.push(n(x[y-1],g[y-1],arguments[y])),d.push(0)}},a.move=function(p){var c=this.lastT(),b=this.dimension;if(!(p<=c||arguments.length!==b+1)){var d=this._state,v=this._velocity,x=d.length-this.dimension,g=this.bounds,y=g[0],k=g[1],h=p-c,M=h>1e-6?1/h:0;this._time.push(p);for(var A=b;A>0;--A){var C=arguments[A];d.push(n(y[A-1],k[A-1],d[x++]+C)),v.push(C*M)}}},a.idle=function(p){var c=this.lastT();if(!(p=0;--M)d.push(n(y[M],k[M],d[x]+h*v[x])),v.push(0),x+=1}}},7080:function(f){function l(x,g,y,k,h,M){this._color=x,this.key=g,this.value=y,this.left=k,this.right=h,this._count=M}function t(x){return new l(x._color,x.key,x.value,x.left,x.right,x._count)}function i(x,g){return new l(x,g.key,g.value,g.left,g.right,g._count)}function r(x){x._count=1+(x.left?x.left._count:0)+(x.right?x.right._count:0)}function n(x,g){this._compare=x,this.root=g}f.exports=function(x){return new n(x||v,null)};var o=n.prototype;function a(x,g){var y;return g.left&&(y=a(x,g.left))?y:(y=x(g.key,g.value))||(g.right?a(x,g.right):void 0)}function u(x,g,y,k){if(g(x,k.key)<=0){var h;if(k.left&&(h=u(x,g,y,k.left))||(h=y(k.key,k.value)))return h}if(k.right)return u(x,g,y,k.right)}function p(x,g,y,k,h){var M,A=y(x,h.key),C=y(g,h.key);if(A<=0&&(h.left&&(M=p(x,g,y,k,h.left))||C>0&&(M=k(h.key,h.value))))return M;if(C>0&&h.right)return p(x,g,y,k,h.right)}function c(x,g){this.tree=x,this._stack=g}Object.defineProperty(o,"keys",{get:function(){var x=[];return this.forEach(function(g,y){x.push(g)}),x}}),Object.defineProperty(o,"values",{get:function(){var x=[];return this.forEach(function(g,y){x.push(y)}),x}}),Object.defineProperty(o,"length",{get:function(){return this.root?this.root._count:0}}),o.insert=function(x,g){for(var y=this._compare,k=this.root,h=[],M=[];k;){var A=y(x,k.key);h.push(k),M.push(A),k=A<=0?k.left:k.right}h.push(new l(0,x,g,null,null,1));for(var C=h.length-2;C>=0;--C)k=h[C],M[C]<=0?h[C]=new l(k._color,k.key,k.value,h[C+1],k.right,k._count+1):h[C]=new l(k._color,k.key,k.value,k.left,h[C+1],k._count+1);for(C=h.length-1;C>1;--C){var L=h[C-1];if(k=h[C],L._color===1||k._color===1)break;var O=h[C-2];if(O.left===L)if(L.left===k){if(!(I=O.right)||I._color!==0){O._color=0,O.left=L.right,L._color=1,L.right=O,h[C-2]=L,h[C-1]=k,r(O),r(L),C>=3&&((R=h[C-3]).left===O?R.left=L:R.right=L);break}L._color=1,O.right=i(1,I),O._color=0,C-=1}else{if(!(I=O.right)||I._color!==0){L.right=k.left,O._color=0,O.left=k.right,k._color=1,k.left=L,k.right=O,h[C-2]=k,h[C-1]=L,r(O),r(L),r(k),C>=3&&((R=h[C-3]).left===O?R.left=k:R.right=k);break}L._color=1,O.right=i(1,I),O._color=0,C-=1}else if(L.right===k){if(!(I=O.left)||I._color!==0){O._color=0,O.right=L.left,L._color=1,L.left=O,h[C-2]=L,h[C-1]=k,r(O),r(L),C>=3&&((R=h[C-3]).right===O?R.right=L:R.left=L);break}L._color=1,O.left=i(1,I),O._color=0,C-=1}else{var I;if(!(I=O.left)||I._color!==0){var R;L.left=k.right,O._color=0,O.right=k.left,k._color=1,k.right=L,k.left=O,h[C-2]=k,h[C-1]=L,r(O),r(L),r(k),C>=3&&((R=h[C-3]).right===O?R.right=k:R.left=k);break}L._color=1,O.left=i(1,I),O._color=0,C-=1}}return h[0]._color=1,new n(y,h[0])},o.forEach=function(x,g,y){if(this.root)switch(arguments.length){case 1:return a(x,this.root);case 2:return u(g,this._compare,x,this.root);case 3:return this._compare(g,y)>=0?void 0:p(g,y,this._compare,x,this.root)}},Object.defineProperty(o,"begin",{get:function(){for(var x=[],g=this.root;g;)x.push(g),g=g.left;return new c(this,x)}}),Object.defineProperty(o,"end",{get:function(){for(var x=[],g=this.root;g;)x.push(g),g=g.right;return new c(this,x)}}),o.at=function(x){if(x<0)return new c(this,[]);for(var g=this.root,y=[];;){if(y.push(g),g.left){if(x=g.right._count)break;g=g.right}return new c(this,[])},o.ge=function(x){for(var g=this._compare,y=this.root,k=[],h=0;y;){var M=g(x,y.key);k.push(y),M<=0&&(h=k.length),y=M<=0?y.left:y.right}return k.length=h,new c(this,k)},o.gt=function(x){for(var g=this._compare,y=this.root,k=[],h=0;y;){var M=g(x,y.key);k.push(y),M<0&&(h=k.length),y=M<0?y.left:y.right}return k.length=h,new c(this,k)},o.lt=function(x){for(var g=this._compare,y=this.root,k=[],h=0;y;){var M=g(x,y.key);k.push(y),M>0&&(h=k.length),y=M<=0?y.left:y.right}return k.length=h,new c(this,k)},o.le=function(x){for(var g=this._compare,y=this.root,k=[],h=0;y;){var M=g(x,y.key);k.push(y),M>=0&&(h=k.length),y=M<0?y.left:y.right}return k.length=h,new c(this,k)},o.find=function(x){for(var g=this._compare,y=this.root,k=[];y;){var h=g(x,y.key);if(k.push(y),h===0)return new c(this,k);y=h<=0?y.left:y.right}return new c(this,[])},o.remove=function(x){var g=this.find(x);return g?g.remove():this},o.get=function(x){for(var g=this._compare,y=this.root;y;){var k=g(x,y.key);if(k===0)return y.value;y=k<=0?y.left:y.right}};var b=c.prototype;function d(x,g){x.key=g.key,x.value=g.value,x.left=g.left,x.right=g.right,x._color=g._color,x._count=g._count}function v(x,g){return xg?1:0}Object.defineProperty(b,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(b,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),b.clone=function(){return new c(this.tree,this._stack.slice())},b.remove=function(){var x=this._stack;if(x.length===0)return this.tree;var g=new Array(x.length),y=x[x.length-1];g[g.length-1]=new l(y._color,y.key,y.value,y.left,y.right,y._count);for(var k=x.length-2;k>=0;--k)(y=x[k]).left===x[k+1]?g[k]=new l(y._color,y.key,y.value,g[k+1],y.right,y._count):g[k]=new l(y._color,y.key,y.value,y.left,g[k+1],y._count);if((y=g[g.length-1]).left&&y.right){var h=g.length;for(y=y.left;y.right;)g.push(y),y=y.right;var M=g[h-1];for(g.push(new l(y._color,M.key,M.value,y.left,y.right,y._count)),g[h-1].key=y.key,g[h-1].value=y.value,k=g.length-2;k>=h;--k)y=g[k],g[k]=new l(y._color,y.key,y.value,y.left,g[k+1],y._count);g[h-1].left=g[h]}if((y=g[g.length-1])._color===0){var A=g[g.length-2];for(A.left===y?A.left=null:A.right===y&&(A.right=null),g.pop(),k=0;k=0;--B){if(O=L[B],B===0)return void(O._color=1);if((I=L[B-1]).left===O){if((R=I.right).right&&R.right._color===0)return U=(R=I.right=t(R)).right=t(R.right),I.right=R.left,R.left=I,R.right=U,R._color=I._color,O._color=1,I._color=1,U._color=1,r(I),r(R),B>1&&((G=L[B-2]).left===I?G.left=R:G.right=R),void(L[B-1]=R);if(R.left&&R.left._color===0)return U=(R=I.right=t(R)).left=t(R.left),I.right=U.left,R.left=U.right,U.left=I,U.right=R,U._color=I._color,I._color=1,R._color=1,O._color=1,r(I),r(R),r(U),B>1&&((G=L[B-2]).left===I?G.left=U:G.right=U),void(L[B-1]=U);if(R._color===1){if(I._color===0)return I._color=1,void(I.right=i(0,R));I.right=i(0,R);continue}R=t(R),I.right=R.left,R.left=I,R._color=I._color,I._color=0,r(I),r(R),B>1&&((G=L[B-2]).left===I?G.left=R:G.right=R),L[B-1]=R,L[B]=I,B+11&&((G=L[B-2]).right===I?G.right=R:G.left=R),void(L[B-1]=R);if(R.right&&R.right._color===0)return U=(R=I.left=t(R)).right=t(R.right),I.left=U.right,R.right=U.left,U.right=I,U.left=R,U._color=I._color,I._color=1,R._color=1,O._color=1,r(I),r(R),r(U),B>1&&((G=L[B-2]).right===I?G.right=U:G.left=U),void(L[B-1]=U);if(R._color===1){if(I._color===0)return I._color=1,void(I.left=i(0,R));I.left=i(0,R);continue}var G;R=t(R),I.left=R.right,R.right=I,R._color=I._color,I._color=0,r(I),r(R),B>1&&((G=L[B-2]).right===I?G.right=R:G.left=R),L[B-1]=R,L[B]=I,B+10)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(b,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(b,"index",{get:function(){var x=0,g=this._stack;if(g.length===0){var y=this.tree.root;return y?y._count:0}g[g.length-1].left&&(x=g[g.length-1].left._count);for(var k=g.length-2;k>=0;--k)g[k+1]===g[k].right&&(++x,g[k].left&&(x+=g[k].left._count));return x},enumerable:!0}),b.next=function(){var x=this._stack;if(x.length!==0){var g=x[x.length-1];if(g.right)for(g=g.right;g;)x.push(g),g=g.left;else for(x.pop();x.length>0&&x[x.length-1].right===g;)g=x[x.length-1],x.pop()}},Object.defineProperty(b,"hasNext",{get:function(){var x=this._stack;if(x.length===0)return!1;if(x[x.length-1].right)return!0;for(var g=x.length-1;g>0;--g)if(x[g-1].left===x[g])return!0;return!1}}),b.update=function(x){var g=this._stack;if(g.length===0)throw new Error("Can't update empty node!");var y=new Array(g.length),k=g[g.length-1];y[y.length-1]=new l(k._color,k.key,x,k.left,k.right,k._count);for(var h=g.length-2;h>=0;--h)(k=g[h]).left===g[h+1]?y[h]=new l(k._color,k.key,k.value,y[h+1],k.right,k._count):y[h]=new l(k._color,k.key,k.value,k.left,y[h+1],k._count);return new n(this.tree._compare,y[0])},b.prev=function(){var x=this._stack;if(x.length!==0){var g=x[x.length-1];if(g.left)for(g=g.left;g;)x.push(g),g=g.right;else for(x.pop();x.length>0&&x[x.length-1].left===g;)g=x[x.length-1],x.pop()}},Object.defineProperty(b,"hasPrev",{get:function(){var x=this._stack;if(x.length===0)return!1;if(x[x.length-1].left)return!0;for(var g=x.length-1;g>0;--g)if(x[g-1].right===x[g])return!0;return!1}})},7453:function(f,l,t){f.exports=function(A,C){var L=new c(A);return L.update(C),L};var i=t(9557),r=t(1681),n=t(1011),o=t(2864),a=t(8468),u=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function p(A,C){return A[0]=C[0],A[1]=C[1],A[2]=C[2],A}function c(A){this.gl=A,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.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",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=n(A)}var b=c.prototype;function d(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}b.update=function(A){function C(ee,Q,Y){if(Y in A){var X,K=A[Y],te=this[Y];(ee?Array.isArray(K)&&Array.isArray(K[0]):Array.isArray(K))?this[Y]=X=[Q(K[0]),Q(K[1]),Q(K[2])]:this[Y]=X=[Q(K),Q(K),Q(K)];for(var ae=0;ae<3;++ae)if(X[ae]!==te[ae])return!0}return!1}A=A||{};var L,O=C.bind(this,!1,Number),I=C.bind(this,!1,Boolean),R=C.bind(this,!1,String),U=C.bind(this,!0,function(ee){if(Array.isArray(ee)){if(ee.length===3)return[+ee[0],+ee[1],+ee[2],1];if(ee.length===4)return[+ee[0],+ee[1],+ee[2],+ee[3]]}return[0,0,0,1]}),B=!1,G=!1;if("bounds"in A)for(var N=A.bounds,j=0;j<2;++j)for(var V=0;V<3;++V)N[j][V]!==this.bounds[j][V]&&(G=!0),this.bounds[j][V]=N[j][V];if("ticks"in A)for(L=A.ticks,B=!0,this.autoTicks=!1,j=0;j<3;++j)this.tickSpacing[j]=0;else O("tickSpacing")&&(this.autoTicks=!0,G=!0);if(this._firstInit&&("ticks"in A||"tickSpacing"in A||(this.autoTicks=!0),G=!0,B=!0,this._firstInit=!1),G&&this.autoTicks&&(L=a.create(this.bounds,this.tickSpacing),B=!0),B){for(j=0;j<3;++j)L[j].sort(function(ee,Q){return ee.x-Q.x});a.equal(L,this.ticks)?B=!1:this.ticks=L}I("tickEnable"),R("tickFont")&&(B=!0),O("tickSize"),O("tickAngle"),O("tickPad"),U("tickColor");var H=R("labels");R("labelFont")&&(H=!0),I("labelEnable"),O("labelSize"),O("labelPad"),U("labelColor"),I("lineEnable"),I("lineMirror"),O("lineWidth"),U("lineColor"),I("lineTickEnable"),I("lineTickMirror"),O("lineTickLength"),O("lineTickWidth"),U("lineTickColor"),I("gridEnable"),O("gridWidth"),U("gridColor"),I("zeroEnable"),U("zeroLineColor"),O("zeroLineWidth"),I("backgroundEnable"),U("backgroundColor"),this._text?this._text&&(H||B)&&this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=i(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&&B&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=r(this.gl,this.bounds,this.ticks))};var v=[new d,new d,new d];function x(A,C,L,O,I){for(var R=A.primalOffset,U=A.primalMinor,B=A.mirrorOffset,G=A.mirrorMinor,N=O[C],j=0;j<3;++j)if(C!==j){var V=R,H=B,ee=U,Q=G;N&1<0?(ee[j]=-1,Q[j]=0):(ee[j]=0,Q[j]=1)}}var g=[0,0,0],y={model:u,view:u,projection:u,_ortho:!1};b.isOpaque=function(){return!0},b.isTransparent=function(){return!1},b.drawTransparent=function(A){};var k=[0,0,0],h=[0,0,0],M=[0,0,0];b.draw=function(A){A=A||y;for(var C=this.gl,L=A.model||u,O=A.view||u,I=A.projection||u,R=this.bounds,U=A._ortho||!1,B=o(L,O,I,R,U),G=B.cubeEdges,N=B.axis,j=O[12],V=O[13],H=O[14],ee=O[15],Q=(U?2:1)*this.pixelRatio*(I[3]*j+I[7]*V+I[11]*H+I[15]*ee)/C.drawingBufferHeight,Y=0;Y<3;++Y)this.lastCubeProps.cubeEdges[Y]=G[Y],this.lastCubeProps.axis[Y]=N[Y];var X=v;for(Y=0;Y<3;++Y)x(v[Y],Y,this.bounds,G,N);C=this.gl;var K,te,ae,oe=g;for(Y=0;Y<3;++Y)this.backgroundEnable[Y]?oe[Y]=N[Y]:oe[Y]=0;for(this._background.draw(L,O,I,R,oe,this.backgroundColor),this._lines.bind(L,O,I,this),Y=0;Y<3;++Y){var se=[0,0,0];N[Y]>0?se[Y]=R[1][Y]:se[Y]=R[0][Y];for(var fe=0;fe<2;++fe){var xe=(Y+1+fe)%3,he=(Y+1+(1^fe))%3;this.gridEnable[xe]&&this._lines.drawGrid(xe,he,this.bounds,se,this.gridColor[xe],this.gridWidth[xe]*this.pixelRatio)}for(fe=0;fe<2;++fe)xe=(Y+1+fe)%3,he=(Y+1+(1^fe))%3,this.zeroEnable[he]&&Math.min(R[0][he],R[1][he])<=0&&Math.max(R[0][he],R[1][he])>=0&&this._lines.drawZero(xe,he,this.bounds,se,this.zeroLineColor[he],this.zeroLineWidth[he]*this.pixelRatio)}for(Y=0;Y<3;++Y){this.lineEnable[Y]&&this._lines.drawAxisLine(Y,this.bounds,X[Y].primalOffset,this.lineColor[Y],this.lineWidth[Y]*this.pixelRatio),this.lineMirror[Y]&&this._lines.drawAxisLine(Y,this.bounds,X[Y].mirrorOffset,this.lineColor[Y],this.lineWidth[Y]*this.pixelRatio);var de=p(k,X[Y].primalMinor),pe=p(h,X[Y].mirrorMinor),ye=this.lineTickLength;for(fe=0;fe<3;++fe){var Re=Q/L[5*fe];de[fe]*=ye[fe]*Re,pe[fe]*=ye[fe]*Re}this.lineTickEnable[Y]&&this._lines.drawAxisTicks(Y,X[Y].primalOffset,de,this.lineTickColor[Y],this.lineTickWidth[Y]*this.pixelRatio),this.lineTickMirror[Y]&&this._lines.drawAxisTicks(Y,X[Y].mirrorOffset,pe,this.lineTickColor[Y],this.lineTickWidth[Y]*this.pixelRatio)}function we(me){(ae=[0,0,0])[me]=1}function Ae(me,Te,Ee){var Ue=(me+1)%3,De=(me+2)%3,je=Te[Ue],ge=Te[De],be=Ee[Ue],Se=Ee[De];je>0&&Se>0||je>0&&Se<0||je<0&&Se>0||je<0&&Se<0?we(Ue):(ge>0&&be>0||ge>0&&be<0||ge<0&&be>0||ge<0&&be<0)&&we(De)}for(this._lines.unbind(),this._text.bind(L,O,I,this.pixelRatio),Y=0;Y<3;++Y){var Me=X[Y].primalMinor,Ce=X[Y].mirrorMinor,ne=p(M,X[Y].primalOffset);for(fe=0;fe<3;++fe)this.lineTickEnable[Y]&&(ne[fe]+=Q*Me[fe]*Math.max(this.lineTickLength[fe],0)/L[5*fe]);var ue=[0,0,0];if(ue[Y]=1,this.tickEnable[Y]){for(this.tickAngle[Y]===-3600?(this.tickAngle[Y]=0,this.tickAlign[Y]="auto"):this.tickAlign[Y]=-1,te=1,(K=[this.tickAlign[Y],.5,te])[0]==="auto"?K[0]=0:K[0]=parseInt(""+K[0]),ae=[0,0,0],Ae(Y,Me,Ce),fe=0;fe<3;++fe)ne[fe]+=Q*Me[fe]*this.tickPad[fe]/L[5*fe];this._text.drawTicks(Y,this.tickSize[Y],this.tickAngle[Y],ne,this.tickColor[Y],ue,ae,K)}if(this.labelEnable[Y]){for(te=0,ae=[0,0,0],this.labels[Y].length>4&&(we(Y),te=1),(K=[this.labelAlign[Y],.5,te])[0]==="auto"?K[0]=0:K[0]=parseInt(""+K[0]),fe=0;fe<3;++fe)ne[fe]+=Q*Me[fe]*this.labelPad[fe]/L[5*fe];ne[Y]+=.5*(R[0][Y]+R[1][Y]),this._text.drawLabel(Y,this.labelSize[Y],this.labelAngle[Y],ne,this.labelColor[Y],[0,0,0],ae,K)}}this._text.unbind()},b.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},1011:function(f,l,t){f.exports=function(u){for(var p=[],c=[],b=0,d=0;d<3;++d)for(var v=(d+1)%3,x=(d+2)%3,g=[0,0,0],y=[0,0,0],k=-1;k<=1;k+=2){c.push(b,b+2,b+1,b+1,b+2,b+3),g[d]=k,y[d]=k;for(var h=-1;h<=1;h+=2){g[v]=h;for(var M=-1;M<=1;M+=2)g[x]=M,p.push(g[0],g[1],g[2],y[0],y[1],y[2]),b+=1}var A=v;v=x,x=A}var C=i(u,new Float32Array(p)),L=i(u,new Uint16Array(c),u.ELEMENT_ARRAY_BUFFER),O=r(u,[{buffer:C,type:u.FLOAT,size:3,offset:0,stride:24},{buffer:C,type:u.FLOAT,size:3,offset:12,stride:24}],L),I=n(u);return I.attributes.position.location=0,I.attributes.normal.location=1,new o(u,C,O,I)};var i=t(5827),r=t(2944),n=t(1943).bg;function o(u,p,c,b){this.gl=u,this.buffer=p,this.vao=c,this.shader=b}var a=o.prototype;a.draw=function(u,p,c,b,d,v){for(var x=!1,g=0;g<3;++g)x=x||d[g];if(x){var y=this.gl;y.enable(y.POLYGON_OFFSET_FILL),y.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:u,view:p,projection:c,bounds:b,enable:d,colors:v},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),y.disable(y.POLYGON_OFFSET_FILL)}},a.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},2864:function(f,l,t){f.exports=function(h,M,A,C,L){r(a,M,h),r(a,A,a);for(var O=0,I=0;I<2;++I){c[2]=C[I][2];for(var R=0;R<2;++R){c[1]=C[R][1];for(var U=0;U<2;++U)c[0]=C[U][0],d(u[O],c,a),O+=1}}var B=-1;for(I=0;I<8;++I){for(var G=u[I][3],N=0;N<3;++N)p[I][N]=u[I][N]/G;L&&(p[I][2]*=-1),G<0&&(B<0||p[I][2]ee&&(B|=1<ee&&(B|=1<p[I][1])&&(se=I);var fe=-1;for(I=0;I<3;++I)(he=se^1<p[xe][0]&&(xe=he))}var de=g;de[0]=de[1]=de[2]=0,de[i.log2(fe^se)]=se&fe,de[i.log2(se^xe)]=se&xe;var pe=7^xe;pe===B||pe===oe?(pe=7^fe,de[i.log2(xe^pe)]=pe&xe):de[i.log2(fe^pe)]=pe&fe;var ye=y,Re=B;for(j=0;j<3;++j)ye[j]=Re&1<=0;--oe){var se=X[ae[oe]];k.push(Q*se[0],-Q*se[1],U)}}for(var M=[0,0,0],A=[0,0,0],C=[0,0,0],L=[0,0,0],O={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},I=0;I<3;++I){C[I]=k.length/3|0,h(.5*(d[0][I]+d[1][I]),v[I],x[I],12,1.25,O),L[I]=(k.length/3|0)-C[I],M[I]=k.length/3|0;for(var R=0;R=0&&(a=n.length-o-1);var u=Math.pow(10,a),p=Math.round(i*r*u),c=p+"";if(c.indexOf("e")>=0)return c;var b=p/u,d=p%u;p<0?(b=0|-Math.ceil(b),d=0|-d):(b=0|Math.floor(b),d|=0);var v=""+b;if(p<0&&(v="-"+v),a){for(var x=""+d;x.length=i[0][o];--u)a.push({x:u*r[o],text:t(r[o],u)});n.push(a)}return n},l.equal=function(i,r){for(var n=0;n<3;++n){if(i[n].length!==r[n].length)return!1;for(var o=0;ov)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return b.bufferSubData(d,m,g),v}function c(b,d){for(var v=i.malloc(b.length,d),x=b.length,g=0;g=0;--A){if(h[A]!==M)return!1;M*=k[A]}return!0}(b.shape,b.stride))b.offset===0&&b.data.length===b.shape[0]?this.length=p(this.gl,this.type,this.length,this.usage,b.data,d):this.length=p(this.gl,this.type,this.length,this.usage,b.data.subarray(b.offset,b.shape[0]),d);else{var x=i.malloc(b.size,v),g=n(x,b.shape);r.assign(g,b),this.length=p(this.gl,this.type,this.length,this.usage,d<0?x:x.subarray(0,b.size),d),i.free(x)}}else if(Array.isArray(b)){var m;m=this.type===this.gl.ELEMENT_ARRAY_BUFFER?c(b,"uint16"):c(b,"float32"),this.length=p(this.gl,this.type,this.length,this.usage,d<0?m:m.subarray(0,b.length),d),i.free(m)}else if(typeof b=="object"&&typeof b.length=="number")this.length=p(this.gl,this.type,this.length,this.usage,b,d);else{if(typeof b!="number"&&b!==void 0)throw new Error("gl-buffer: Invalid data type");if(d>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");(b|=0)<=0&&(b=1),this.gl.bufferData(this.type,0|b,this.usage),this.length=b}},f.exports=function(b,d,v,x){if(v=v||b.ARRAY_BUFFER,x=x||b.DYNAMIC_DRAW,v!==b.ARRAY_BUFFER&&v!==b.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!==b.DYNAMIC_DRAW&&x!==b.STATIC_DRAW&&x!==b.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 g=b.createBuffer(),m=new a(b,v,g,0,x);return m.update(d),m}},1140:function(f,l,t){var i=t(2858);f.exports=function(n,o){var a=n.positions,u=n.vectors,p={positions:[],vertexIntensity:[],vertexIntensityBounds:n.vertexIntensityBounds,vectors:[],cells:[],coneOffset:n.coneOffset,colormap:n.colormap};if(n.positions.length===0)return o&&(o[0]=[0,0,0],o[1]=[0,0,0]),p;for(var c=0,b=1/0,d=-1/0,v=1/0,x=-1/0,g=1/0,m=-1/0,k=null,h=null,M=[],A=1/0,C=!1,L=0;Lc&&(c=i.length(I)),L){var R=2*i.distance(k,O)/(i.length(h)+i.length(I));R?(A=Math.min(A,R),C=!1):C=!0}C||(k=O,h=I),M.push(I)}var U=[b,v,g],B=[d,x,m];o&&(o[0]=U,o[1]=B),c===0&&(c=1);var G=1/c;isFinite(A)||(A=1),p.vectorScale=A;var N=n.coneSize||.5;n.absoluteConeSize&&(N=n.absoluteConeSize*G),p.coneScale=N,L=0;for(var j=0;L=1},v.isTransparent=function(){return this.opacity<1},v.pickSlots=1,v.setPickBase=function(m){this.pickId=m},v.update=function(m){m=m||{};var k=this.gl;this.dirty=!0,"lightPosition"in m&&(this.lightPosition=m.lightPosition),"opacity"in m&&(this.opacity=m.opacity),"ambient"in m&&(this.ambientLight=m.ambient),"diffuse"in m&&(this.diffuseLight=m.diffuse),"specular"in m&&(this.specularLight=m.specular),"roughness"in m&&(this.roughness=m.roughness),"fresnel"in m&&(this.fresnel=m.fresnel),m.tubeScale!==void 0&&(this.tubeScale=m.tubeScale),m.vectorScale!==void 0&&(this.vectorScale=m.vectorScale),m.coneScale!==void 0&&(this.coneScale=m.coneScale),m.coneOffset!==void 0&&(this.coneOffset=m.coneOffset),m.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=k.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=k.LINEAR,this.texture.setPixels(function(se){for(var fe=c({colormap:se,nshades:256,format:"rgba"}),ye=new Uint8Array(1024),pe=0;pe<256;++pe){for(var de=fe[pe],he=0;he<3;++he)ye[4*pe+he]=de[he];ye[4*pe+3]=255*de[3]}return p(ye,[256,256,4],[4,0,1])}(m.colormap)),this.texture.generateMipmap());var h=m.cells,M=m.positions,A=m.vectors;if(M&&h&&A){var C=[],L=[],O=[],I=[],R=[];this.cells=h,this.positions=M,this.vectors=A;var U=m.meshColor||[1,1,1,1],B=m.vertexIntensity,G=1/0,N=-1/0;if(B)if(m.vertexIntensityBounds)G=+m.vertexIntensityBounds[0],N=+m.vertexIntensityBounds[1];else for(var j=0;j0){var G=this.triShader;G.bind(),G.uniforms=O,this.triangleVAO.bind(),k.drawArrays(k.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},v.drawPick=function(m){m=m||{};for(var k=this.gl,h=m.model||b,M=m.view||b,A=m.projection||b,C=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],L=0;L<3;++L)C[0][L]=Math.max(C[0][L],this.clipBounds[0][L]),C[1][L]=Math.min(C[1][L],this.clipBounds[1][L]);this._model=[].slice.call(h),this._view=[].slice.call(M),this._projection=[].slice.call(A),this._resolution=[k.drawingBufferWidth,k.drawingBufferHeight];var O={model:h,view:M,projection:A,clipBounds:C,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},I=this.pickShader;I.bind(),I.uniforms=O,this.triangleCount>0&&(this.triangleVAO.bind(),k.drawArrays(k.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind())},v.pick=function(m){if(!m||m.id!==this.pickId)return null;var k=m.value[0]+256*m.value[1]+65536*m.value[2],h=this.cells[k],M=this.positions[h[1]].slice(0,3),A={position:M,dataCoordinate:M,index:Math.floor(h[1]/48)};return this.traceType==="cone"?A.index=Math.floor(h[1]/48):this.traceType==="streamtube"&&(A.intensity=this.intensity[h[1]],A.velocity=this.vectors[h[1]].slice(0,3),A.divergence=this.vectors[h[1]][3],A.index=k),A},v.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()},f.exports=function(m,k,h){var M=h.shaders;arguments.length===1&&(m=(k=m).gl);var A=x(m,M),C=g(m,M),L=o(m,p(new Uint8Array([255,255,255,255]),[1,1,4]));L.generateMipmap(),L.minFilter=m.LINEAR_MIPMAP_LINEAR,L.magFilter=m.LINEAR;var O=r(m),I=r(m),R=r(m),U=r(m),B=r(m),G=n(m,[{buffer:O,type:m.FLOAT,size:4},{buffer:B,type:m.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:R,type:m.FLOAT,size:4},{buffer:U,type:m.FLOAT,size:2},{buffer:I,type:m.FLOAT,size:4}]),N=new d(m,L,A,C,O,I,B,R,U,G,h.traceType||"cone");return N.update(k),N}},7234:function(f,l,t){var i=t(6832),r=i([`precision highp float; +}`]);l.bg=function(b){return r(b,p,c,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},9557:function(f,l,t){f.exports=function(d,v,x,g,y,k){var h=i(d),M=r(d,[{buffer:h,size:3}]),A=o(d);A.attributes.position.location=0;var C=new p(d,A,h,M);return C.update(v,x,g,y,k),C};var i=t(5827),r=t(2944),n=t(875),o=t(1943).f,a=window||w.global||{},u=a.__TEXT_CACHE||{};function p(d,v,x,g){this.gl=d,this.shader=v,this.buffer=x,this.vao=g,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}a.__TEXT_CACHE={};var c=p.prototype,b=[0,0];c.bind=function(d,v,x,g){this.vao.bind(),this.shader.bind();var y=this.shader.uniforms;y.model=d,y.view=v,y.projection=x,y.pixelScale=g,b[0]=this.gl.drawingBufferWidth,b[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=b},c.unbind=function(){this.vao.unbind()},c.update=function(d,v,x,g,y){var k=[];function h(U,B,G,N,j,V){var H=u[G];H||(H=u[G]={});var ee=H[B];ee||(ee=H[B]=function(fe,xe){try{return n(fe,xe)}catch(he){return console.warn('error vectorizing text:"'+fe+'" error:',he),{cells:[],positions:[]}}}(B,{triangles:!0,font:G,textAlign:"center",textBaseline:"middle",lineSpacing:j,styletags:V}));for(var Q=(N||12)/12,Y=ee.positions,X=ee.cells,K=0,te=X.length;K=0;--oe){var se=Y[ae[oe]];k.push(Q*se[0],-Q*se[1],U)}}for(var M=[0,0,0],A=[0,0,0],C=[0,0,0],L=[0,0,0],O={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},I=0;I<3;++I){C[I]=k.length/3|0,h(.5*(d[0][I]+d[1][I]),v[I],x[I],12,1.25,O),L[I]=(k.length/3|0)-C[I],M[I]=k.length/3|0;for(var R=0;R=0&&(a=n.length-o-1);var u=Math.pow(10,a),p=Math.round(i*r*u),c=p+"";if(c.indexOf("e")>=0)return c;var b=p/u,d=p%u;p<0?(b=0|-Math.ceil(b),d=0|-d):(b=0|Math.floor(b),d|=0);var v=""+b;if(p<0&&(v="-"+v),a){for(var x=""+d;x.length=i[0][o];--u)a.push({x:u*r[o],text:t(r[o],u)});n.push(a)}return n},l.equal=function(i,r){for(var n=0;n<3;++n){if(i[n].length!==r[n].length)return!1;for(var o=0;ov)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return b.bufferSubData(d,y,g),v}function c(b,d){for(var v=i.malloc(b.length,d),x=b.length,g=0;g=0;--A){if(h[A]!==M)return!1;M*=k[A]}return!0}(b.shape,b.stride))b.offset===0&&b.data.length===b.shape[0]?this.length=p(this.gl,this.type,this.length,this.usage,b.data,d):this.length=p(this.gl,this.type,this.length,this.usage,b.data.subarray(b.offset,b.shape[0]),d);else{var x=i.malloc(b.size,v),g=n(x,b.shape);r.assign(g,b),this.length=p(this.gl,this.type,this.length,this.usage,d<0?x:x.subarray(0,b.size),d),i.free(x)}}else if(Array.isArray(b)){var y;y=this.type===this.gl.ELEMENT_ARRAY_BUFFER?c(b,"uint16"):c(b,"float32"),this.length=p(this.gl,this.type,this.length,this.usage,d<0?y:y.subarray(0,b.length),d),i.free(y)}else if(typeof b=="object"&&typeof b.length=="number")this.length=p(this.gl,this.type,this.length,this.usage,b,d);else{if(typeof b!="number"&&b!==void 0)throw new Error("gl-buffer: Invalid data type");if(d>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");(b|=0)<=0&&(b=1),this.gl.bufferData(this.type,0|b,this.usage),this.length=b}},f.exports=function(b,d,v,x){if(v=v||b.ARRAY_BUFFER,x=x||b.DYNAMIC_DRAW,v!==b.ARRAY_BUFFER&&v!==b.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!==b.DYNAMIC_DRAW&&x!==b.STATIC_DRAW&&x!==b.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 g=b.createBuffer(),y=new a(b,v,g,0,x);return y.update(d),y}},1140:function(f,l,t){var i=t(2858);f.exports=function(n,o){var a=n.positions,u=n.vectors,p={positions:[],vertexIntensity:[],vertexIntensityBounds:n.vertexIntensityBounds,vectors:[],cells:[],coneOffset:n.coneOffset,colormap:n.colormap};if(n.positions.length===0)return o&&(o[0]=[0,0,0],o[1]=[0,0,0]),p;for(var c=0,b=1/0,d=-1/0,v=1/0,x=-1/0,g=1/0,y=-1/0,k=null,h=null,M=[],A=1/0,C=!1,L=0;Lc&&(c=i.length(I)),L){var R=2*i.distance(k,O)/(i.length(h)+i.length(I));R?(A=Math.min(A,R),C=!1):C=!0}C||(k=O,h=I),M.push(I)}var U=[b,v,g],B=[d,x,y];o&&(o[0]=U,o[1]=B),c===0&&(c=1);var G=1/c;isFinite(A)||(A=1),p.vectorScale=A;var N=n.coneSize||.5;n.absoluteConeSize&&(N=n.absoluteConeSize*G),p.coneScale=N,L=0;for(var j=0;L=1},v.isTransparent=function(){return this.opacity<1},v.pickSlots=1,v.setPickBase=function(y){this.pickId=y},v.update=function(y){y=y||{};var k=this.gl;this.dirty=!0,"lightPosition"in y&&(this.lightPosition=y.lightPosition),"opacity"in y&&(this.opacity=y.opacity),"ambient"in y&&(this.ambientLight=y.ambient),"diffuse"in y&&(this.diffuseLight=y.diffuse),"specular"in y&&(this.specularLight=y.specular),"roughness"in y&&(this.roughness=y.roughness),"fresnel"in y&&(this.fresnel=y.fresnel),y.tubeScale!==void 0&&(this.tubeScale=y.tubeScale),y.vectorScale!==void 0&&(this.vectorScale=y.vectorScale),y.coneScale!==void 0&&(this.coneScale=y.coneScale),y.coneOffset!==void 0&&(this.coneOffset=y.coneOffset),y.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=k.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=k.LINEAR,this.texture.setPixels(function(se){for(var fe=c({colormap:se,nshades:256,format:"rgba"}),xe=new Uint8Array(1024),he=0;he<256;++he){for(var de=fe[he],pe=0;pe<3;++pe)xe[4*he+pe]=de[pe];xe[4*he+3]=255*de[3]}return p(xe,[256,256,4],[4,0,1])}(y.colormap)),this.texture.generateMipmap());var h=y.cells,M=y.positions,A=y.vectors;if(M&&h&&A){var C=[],L=[],O=[],I=[],R=[];this.cells=h,this.positions=M,this.vectors=A;var U=y.meshColor||[1,1,1,1],B=y.vertexIntensity,G=1/0,N=-1/0;if(B)if(y.vertexIntensityBounds)G=+y.vertexIntensityBounds[0],N=+y.vertexIntensityBounds[1];else for(var j=0;j0){var G=this.triShader;G.bind(),G.uniforms=O,this.triangleVAO.bind(),k.drawArrays(k.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},v.drawPick=function(y){y=y||{};for(var k=this.gl,h=y.model||b,M=y.view||b,A=y.projection||b,C=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],L=0;L<3;++L)C[0][L]=Math.max(C[0][L],this.clipBounds[0][L]),C[1][L]=Math.min(C[1][L],this.clipBounds[1][L]);this._model=[].slice.call(h),this._view=[].slice.call(M),this._projection=[].slice.call(A),this._resolution=[k.drawingBufferWidth,k.drawingBufferHeight];var O={model:h,view:M,projection:A,clipBounds:C,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},I=this.pickShader;I.bind(),I.uniforms=O,this.triangleCount>0&&(this.triangleVAO.bind(),k.drawArrays(k.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind())},v.pick=function(y){if(!y||y.id!==this.pickId)return null;var k=y.value[0]+256*y.value[1]+65536*y.value[2],h=this.cells[k],M=this.positions[h[1]].slice(0,3),A={position:M,dataCoordinate:M,index:Math.floor(h[1]/48)};return this.traceType==="cone"?A.index=Math.floor(h[1]/48):this.traceType==="streamtube"&&(A.intensity=this.intensity[h[1]],A.velocity=this.vectors[h[1]].slice(0,3),A.divergence=this.vectors[h[1]][3],A.index=k),A},v.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()},f.exports=function(y,k,h){var M=h.shaders;arguments.length===1&&(y=(k=y).gl);var A=x(y,M),C=g(y,M),L=o(y,p(new Uint8Array([255,255,255,255]),[1,1,4]));L.generateMipmap(),L.minFilter=y.LINEAR_MIPMAP_LINEAR,L.magFilter=y.LINEAR;var O=r(y),I=r(y),R=r(y),U=r(y),B=r(y),G=n(y,[{buffer:O,type:y.FLOAT,size:4},{buffer:B,type:y.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:R,type:y.FLOAT,size:4},{buffer:U,type:y.FLOAT,size:2},{buffer:I,type:y.FLOAT,size:4}]),N=new d(y,L,A,C,O,I,B,R,U,G,h.traceType||"cone");return N.update(k),N}},7234:function(f,l,t){var i=t(6832),r=i([`precision highp float; precision highp float; #define GLSLIFY 1 @@ -775,7 +775,7 @@ if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); -}`]);l.meshShader={vertex:r,fragment:n,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},l.pickShader={vertex:o,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},1950:function(f){f.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"}},6603:function(f,l,t){var i=t(1950);f.exports=function(r){return i[r]}},3110:function(f,l,t){f.exports=function(d){var v=d.gl,x=i(v),g=r(v,[{buffer:x,type:v.FLOAT,size:3,offset:0,stride:40},{buffer:x,type:v.FLOAT,size:4,offset:12,stride:40},{buffer:x,type:v.FLOAT,size:3,offset:28,stride:40}]),m=n(v);m.attributes.position.location=0,m.attributes.color.location=1,m.attributes.offset.location=2;var k=new a(v,x,g,m);return k.update(d),k};var i=t(5827),r=t(2944),n=t(7667),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function a(d,v,x,g){this.gl=d,this.shader=g,this.buffer=v,this.vao=x,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 u=a.prototype;function p(d,v){for(var x=0;x<3;++x)d[0][x]=Math.min(d[0][x],v[x]),d[1][x]=Math.max(d[1][x],v[x])}u.isOpaque=function(){return!this.hasAlpha},u.isTransparent=function(){return this.hasAlpha},u.drawTransparent=u.draw=function(d){var v=this.gl,x=this.shader.uniforms;this.shader.bind();var g=x.view=d.view||o,m=x.projection=d.projection||o;x.model=d.model||o,x.clipBounds=this.clipBounds,x.opacity=this.opacity;var k=g[12],h=g[13],M=g[14],A=g[15],C=(d._ortho?2:1)*this.pixelRatio*(m[3]*k+m[7]*h+m[11]*M+m[15]*A)/v.drawingBufferHeight;this.vao.bind();for(var L=0;L<3;++L)v.lineWidth(this.lineWidth[L]*this.pixelRatio),x.capSize=this.capSize[L]*C,this.lineCount[L]&&v.drawArrays(v.LINES,this.lineOffset[L],this.lineCount[L]);this.vao.unbind()};var c=function(){for(var d=new Array(3),v=0;v<3;++v){for(var x=[],g=1;g<=2;++g)for(var m=-1;m<=1;m+=2){var k=[0,0,0];k[(g+v)%3]=m,x.push(k)}d[v]=x}return d}();function b(d,v,x,g){for(var m=c[g],k=0;k0&&((O=C.slice())[M]+=I[1][M],m.push(C[0],C[1],C[2],R[0],R[1],R[2],R[3],0,0,0,O[0],O[1],O[2],R[0],R[1],R[2],R[3],0,0,0),p(this.bounds,O),h+=2+b(m,O,R,M)))}this.lineCount[M]=h-this.lineOffset[M]}this.buffer.update(m)}},u.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},7667:function(f,l,t){var i=t(6832),r=t(5158),n=i([`precision highp float; +}`]);l.meshShader={vertex:r,fragment:n,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},l.pickShader={vertex:o,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},1950:function(f){f.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"}},6603:function(f,l,t){var i=t(1950);f.exports=function(r){return i[r]}},3110:function(f,l,t){f.exports=function(d){var v=d.gl,x=i(v),g=r(v,[{buffer:x,type:v.FLOAT,size:3,offset:0,stride:40},{buffer:x,type:v.FLOAT,size:4,offset:12,stride:40},{buffer:x,type:v.FLOAT,size:3,offset:28,stride:40}]),y=n(v);y.attributes.position.location=0,y.attributes.color.location=1,y.attributes.offset.location=2;var k=new a(v,x,g,y);return k.update(d),k};var i=t(5827),r=t(2944),n=t(7667),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function a(d,v,x,g){this.gl=d,this.shader=g,this.buffer=v,this.vao=x,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 u=a.prototype;function p(d,v){for(var x=0;x<3;++x)d[0][x]=Math.min(d[0][x],v[x]),d[1][x]=Math.max(d[1][x],v[x])}u.isOpaque=function(){return!this.hasAlpha},u.isTransparent=function(){return this.hasAlpha},u.drawTransparent=u.draw=function(d){var v=this.gl,x=this.shader.uniforms;this.shader.bind();var g=x.view=d.view||o,y=x.projection=d.projection||o;x.model=d.model||o,x.clipBounds=this.clipBounds,x.opacity=this.opacity;var k=g[12],h=g[13],M=g[14],A=g[15],C=(d._ortho?2:1)*this.pixelRatio*(y[3]*k+y[7]*h+y[11]*M+y[15]*A)/v.drawingBufferHeight;this.vao.bind();for(var L=0;L<3;++L)v.lineWidth(this.lineWidth[L]*this.pixelRatio),x.capSize=this.capSize[L]*C,this.lineCount[L]&&v.drawArrays(v.LINES,this.lineOffset[L],this.lineCount[L]);this.vao.unbind()};var c=function(){for(var d=new Array(3),v=0;v<3;++v){for(var x=[],g=1;g<=2;++g)for(var y=-1;y<=1;y+=2){var k=[0,0,0];k[(g+v)%3]=y,x.push(k)}d[v]=x}return d}();function b(d,v,x,g){for(var y=c[g],k=0;k0&&((O=C.slice())[M]+=I[1][M],y.push(C[0],C[1],C[2],R[0],R[1],R[2],R[3],0,0,0,O[0],O[1],O[2],R[0],R[1],R[2],R[3],0,0,0),p(this.bounds,O),h+=2+b(y,O,R,M)))}this.lineCount[M]=h-this.lineOffset[M]}this.buffer.update(y)}},u.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},7667:function(f,l,t){var i=t(6832),r=t(5158),n=i([`precision highp float; #define GLSLIFY 1 attribute vec3 position, offset; @@ -826,13 +826,13 @@ ) discard; gl_FragColor = opacity * fragColor; -}`]);f.exports=function(a){return r(a,n,o,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},4234:function(f,l,t){var i=t(8931);f.exports=function(k,h,M,A){r||(r=k.FRAMEBUFFER_UNSUPPORTED,n=k.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,o=k.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,a=k.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var C=k.getExtension("WEBGL_draw_buffers");if(!u&&C&&function(G,N){var j=G.getParameter(N.MAX_COLOR_ATTACHMENTS_WEBGL);u=new Array(j+1);for(var V=0;V<=j;++V){for(var H=new Array(j),ee=0;eeL||M<0||M>L)throw new Error("gl-fbo: Parameters are too large for FBO");var O=1;if("color"in(A=A||{})){if((O=Math.max(0|A.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(O>1){if(!C)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(O>k.getParameter(C.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+O+" draw buffers")}}var I=k.UNSIGNED_BYTE,R=k.getExtension("OES_texture_float");if(A.float&&O>0){if(!R)throw new Error("gl-fbo: Context does not support floating point textures");I=k.FLOAT}else A.preferFloat&&O>0&&R&&(I=k.FLOAT);var U=!0;"depth"in A&&(U=!!A.depth);var B=!1;return"stencil"in A&&(B=!!A.stencil),new x(k,h,M,I,O,U,B,C)};var r,n,o,a,u=null;function p(k){return[k.getParameter(k.FRAMEBUFFER_BINDING),k.getParameter(k.RENDERBUFFER_BINDING),k.getParameter(k.TEXTURE_BINDING_2D)]}function c(k,h){k.bindFramebuffer(k.FRAMEBUFFER,h[0]),k.bindRenderbuffer(k.RENDERBUFFER,h[1]),k.bindTexture(k.TEXTURE_2D,h[2])}function b(k){switch(k){case r:throw new Error("gl-fbo: Framebuffer unsupported");case n:throw new Error("gl-fbo: Framebuffer incomplete attachment");case o:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case a:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function d(k,h,M,A,C,L){if(!A)return null;var O=i(k,h,M,C,A);return O.magFilter=k.NEAREST,O.minFilter=k.NEAREST,O.mipSamples=1,O.bind(),k.framebufferTexture2D(k.FRAMEBUFFER,L,k.TEXTURE_2D,O.handle,0),O}function v(k,h,M,A,C){var L=k.createRenderbuffer();return k.bindRenderbuffer(k.RENDERBUFFER,L),k.renderbufferStorage(k.RENDERBUFFER,A,h,M),k.framebufferRenderbuffer(k.FRAMEBUFFER,C,k.RENDERBUFFER,L),L}function x(k,h,M,A,C,L,O,I){this.gl=k,this._shape=[0|h,0|M],this._destroyed=!1,this._ext=I,this.color=new Array(C);for(var R=0;R1&&X.drawBuffersWEBGL(u[Q]);var oe=j.getExtension("WEBGL_depth_texture");oe?Y?G.depth=d(j,H,ee,oe.UNSIGNED_INT_24_8_WEBGL,j.DEPTH_STENCIL,j.DEPTH_STENCIL_ATTACHMENT):K&&(G.depth=d(j,H,ee,j.UNSIGNED_SHORT,j.DEPTH_COMPONENT,j.DEPTH_ATTACHMENT)):K&&Y?G._depth_rb=v(j,H,ee,j.DEPTH_STENCIL,j.DEPTH_STENCIL_ATTACHMENT):K?G._depth_rb=v(j,H,ee,j.DEPTH_COMPONENT16,j.DEPTH_ATTACHMENT):Y&&(G._depth_rb=v(j,H,ee,j.STENCIL_INDEX,j.STENCIL_ATTACHMENT));var se=j.checkFramebufferStatus(j.FRAMEBUFFER);if(se!==j.FRAMEBUFFER_COMPLETE){for(G._destroyed=!0,j.bindFramebuffer(j.FRAMEBUFFER,null),j.deleteFramebuffer(G.handle),G.handle=null,G.depth&&(G.depth.dispose(),G.depth=null),G._depth_rb&&(j.deleteRenderbuffer(G._depth_rb),G._depth_rb=null),ae=0;aeC||M<0||M>C)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");k._shape[0]=h,k._shape[1]=M;for(var L=p(A),O=0;OL||M<0||M>L)throw new Error("gl-fbo: Parameters are too large for FBO");var O=1;if("color"in(A=A||{})){if((O=Math.max(0|A.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(O>1){if(!C)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(O>k.getParameter(C.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+O+" draw buffers")}}var I=k.UNSIGNED_BYTE,R=k.getExtension("OES_texture_float");if(A.float&&O>0){if(!R)throw new Error("gl-fbo: Context does not support floating point textures");I=k.FLOAT}else A.preferFloat&&O>0&&R&&(I=k.FLOAT);var U=!0;"depth"in A&&(U=!!A.depth);var B=!1;return"stencil"in A&&(B=!!A.stencil),new x(k,h,M,I,O,U,B,C)};var r,n,o,a,u=null;function p(k){return[k.getParameter(k.FRAMEBUFFER_BINDING),k.getParameter(k.RENDERBUFFER_BINDING),k.getParameter(k.TEXTURE_BINDING_2D)]}function c(k,h){k.bindFramebuffer(k.FRAMEBUFFER,h[0]),k.bindRenderbuffer(k.RENDERBUFFER,h[1]),k.bindTexture(k.TEXTURE_2D,h[2])}function b(k){switch(k){case r:throw new Error("gl-fbo: Framebuffer unsupported");case n:throw new Error("gl-fbo: Framebuffer incomplete attachment");case o:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case a:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function d(k,h,M,A,C,L){if(!A)return null;var O=i(k,h,M,C,A);return O.magFilter=k.NEAREST,O.minFilter=k.NEAREST,O.mipSamples=1,O.bind(),k.framebufferTexture2D(k.FRAMEBUFFER,L,k.TEXTURE_2D,O.handle,0),O}function v(k,h,M,A,C){var L=k.createRenderbuffer();return k.bindRenderbuffer(k.RENDERBUFFER,L),k.renderbufferStorage(k.RENDERBUFFER,A,h,M),k.framebufferRenderbuffer(k.FRAMEBUFFER,C,k.RENDERBUFFER,L),L}function x(k,h,M,A,C,L,O,I){this.gl=k,this._shape=[0|h,0|M],this._destroyed=!1,this._ext=I,this.color=new Array(C);for(var R=0;R1&&Y.drawBuffersWEBGL(u[Q]);var oe=j.getExtension("WEBGL_depth_texture");oe?X?G.depth=d(j,H,ee,oe.UNSIGNED_INT_24_8_WEBGL,j.DEPTH_STENCIL,j.DEPTH_STENCIL_ATTACHMENT):K&&(G.depth=d(j,H,ee,j.UNSIGNED_SHORT,j.DEPTH_COMPONENT,j.DEPTH_ATTACHMENT)):K&&X?G._depth_rb=v(j,H,ee,j.DEPTH_STENCIL,j.DEPTH_STENCIL_ATTACHMENT):K?G._depth_rb=v(j,H,ee,j.DEPTH_COMPONENT16,j.DEPTH_ATTACHMENT):X&&(G._depth_rb=v(j,H,ee,j.STENCIL_INDEX,j.STENCIL_ATTACHMENT));var se=j.checkFramebufferStatus(j.FRAMEBUFFER);if(se!==j.FRAMEBUFFER_COMPLETE){for(G._destroyed=!0,j.bindFramebuffer(j.FRAMEBUFFER,null),j.deleteFramebuffer(G.handle),G.handle=null,G.depth&&(G.depth.dispose(),G.depth=null),G._depth_rb&&(j.deleteRenderbuffer(G._depth_rb),G._depth_rb=null),ae=0;aeC||M<0||M>C)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");k._shape[0]=h,k._shape[1]=M;for(var L=p(A),O=0;O>8*U&255;this.pickOffset=g,k.bind();var B=k.uniforms;B.viewTransform=v,B.pickOffset=x,B.shape=this.shape;var G=k.attributes;return this.positionBuffer.bind(),G.position.pointer(),this.weightBuffer.bind(),G.weight.pointer(A.UNSIGNED_BYTE,!1),this.idBuffer.bind(),G.pickId.pointer(A.UNSIGNED_BYTE,!1),A.drawArrays(A.TRIANGLES,0,M),g+this.shape[0]*this.shape[1]}}}(),b.pick=function(v,x,g){var m=this.pickOffset,k=this.shape[0]*this.shape[1];if(g=m+k)return null;var h=g-m,M=this.xData,A=this.yData;return{object:this,pointId:h,dataCoord:[M[h%this.shape[0]],A[h/this.shape[0]|0]]}},b.update=function(v){var x=(v=v||{}).shape||[0,0],g=v.x||r(x[0]),m=v.y||r(x[1]),k=v.z||new Float32Array(x[0]*x[1]),h=v.zsmooth!==!1;this.xData=g,this.yData=m;var M,A,C,L,O=v.colorLevels||[0],I=v.colorValues||[0,0,0,1],R=O.length,U=this.bounds;h?(M=U[0]=g[0],A=U[1]=m[0],C=U[2]=g[g.length-1],L=U[3]=m[m.length-1]):(M=U[0]=g[0]+(g[1]-g[0])/2,A=U[1]=m[0]+(m[1]-m[0])/2,C=U[2]=g[g.length-1]+(g[g.length-1]-g[g.length-2])/2,L=U[3]=m[m.length-1]+(m[m.length-1]-m[m.length-2])/2);var B=1/(C-M),G=1/(L-A),N=x[0],j=x[1];this.shape=[N,j];var V=(h?(N-1)*(j-1):N*j)*(d.length>>>1);this.numVertices=V;for(var H=n.mallocUint8(4*V),ee=n.mallocFloat32(2*V),Q=n.mallocUint8(2*V),X=n.mallocUint32(V),Y=0,K=h?N-1:N,te=h?j-1:j,ae=0;ae>8*U&255;this.pickOffset=g,k.bind();var B=k.uniforms;B.viewTransform=v,B.pickOffset=x,B.shape=this.shape;var G=k.attributes;return this.positionBuffer.bind(),G.position.pointer(),this.weightBuffer.bind(),G.weight.pointer(A.UNSIGNED_BYTE,!1),this.idBuffer.bind(),G.pickId.pointer(A.UNSIGNED_BYTE,!1),A.drawArrays(A.TRIANGLES,0,M),g+this.shape[0]*this.shape[1]}}}(),b.pick=function(v,x,g){var y=this.pickOffset,k=this.shape[0]*this.shape[1];if(g=y+k)return null;var h=g-y,M=this.xData,A=this.yData;return{object:this,pointId:h,dataCoord:[M[h%this.shape[0]],A[h/this.shape[0]|0]]}},b.update=function(v){var x=(v=v||{}).shape||[0,0],g=v.x||r(x[0]),y=v.y||r(x[1]),k=v.z||new Float32Array(x[0]*x[1]),h=v.zsmooth!==!1;this.xData=g,this.yData=y;var M,A,C,L,O=v.colorLevels||[0],I=v.colorValues||[0,0,0,1],R=O.length,U=this.bounds;h?(M=U[0]=g[0],A=U[1]=y[0],C=U[2]=g[g.length-1],L=U[3]=y[y.length-1]):(M=U[0]=g[0]+(g[1]-g[0])/2,A=U[1]=y[0]+(y[1]-y[0])/2,C=U[2]=g[g.length-1]+(g[g.length-1]-g[g.length-2])/2,L=U[3]=y[y.length-1]+(y[y.length-1]-y[y.length-2])/2);var B=1/(C-M),G=1/(L-A),N=x[0],j=x[1];this.shape=[N,j];var V=(h?(N-1)*(j-1):N*j)*(d.length>>>1);this.numVertices=V;for(var H=n.mallocUint8(4*V),ee=n.mallocFloat32(2*V),Q=n.mallocUint8(2*V),Y=n.mallocUint32(V),X=0,K=h?N-1:N,te=h?j-1:j,ae=0;ae0){for(var te=0;te<24;++te)O.push(O[O.length-12]);B+=2,H=!0}continue e}G[0][C]=Math.min(G[0][C],Y[C],K[C]),G[1][C]=Math.max(G[1][C],Y[C],K[C])}Array.isArray(j[0])?(ee=j.length>A-1?j[A-1]:j.length>0?j[j.length-1]:[0,0,0,1],Q=j.length>A?j[A]:j.length>0?j[j.length-1]:[0,0,0,1]):ee=Q=j,ee.length===3&&(ee=[ee[0],ee[1],ee[2],1]),Q.length===3&&(Q=[Q[0],Q[1],Q[2],1]),!this.hasAlpha&&ee[3]<1&&(this.hasAlpha=!0),X=Array.isArray(V)?V.length>A-1?V[A-1]:V.length>0?V[V.length-1]:[0,0,0,1]:V;var ae=U;if(U+=x(Y,K),H){for(C=0;C<2;++C)O.push(Y[0],Y[1],Y[2],K[0],K[1],K[2],ae,X,ee[0],ee[1],ee[2],ee[3]);B+=2,H=!1}O.push(Y[0],Y[1],Y[2],K[0],K[1],K[2],ae,X,ee[0],ee[1],ee[2],ee[3],Y[0],Y[1],Y[2],K[0],K[1],K[2],ae,-X,ee[0],ee[1],ee[2],ee[3],K[0],K[1],K[2],Y[0],Y[1],Y[2],U,-X,Q[0],Q[1],Q[2],Q[3],K[0],K[1],K[2],Y[0],Y[1],Y[2],U,X,Q[0],Q[1],Q[2],Q[3]),B+=4}}if(this.buffer.update(O),I.push(U),R.push(N[N.length-1].slice()),this.bounds=G,this.vertexCount=B,this.points=R,this.arcLength=I,"dashes"in M){var oe=M.dashes.slice();for(oe.unshift(0),A=1;A1.0001)return null;C+=A[g]}return Math.abs(C-1)>.001?null:[m,a(u,A),A]}},2056:function(f,l,t){var i=t(6832),r=i([`precision highp float; +}`]),u=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];l.createShader=function(p){return r(p,n,o,null,u)},l.createPickShader=function(p){return r(p,n,a,null,u)}},6086:function(f,l,t){f.exports=function(M){var A=M.gl||M.scene&&M.scene.gl,C=b(A);C.attributes.position.location=0,C.attributes.nextPosition.location=1,C.attributes.arcLength.location=2,C.attributes.lineWidth.location=3,C.attributes.color.location=4;var L=d(A);L.attributes.position.location=0,L.attributes.nextPosition.location=1,L.attributes.arcLength.location=2,L.attributes.lineWidth.location=3,L.attributes.color.location=4;for(var O=i(A),I=r(A,[{buffer:O,size:3,offset:0,stride:48},{buffer:O,size:3,offset:12,stride:48},{buffer:O,size:1,offset:24,stride:48},{buffer:O,size:1,offset:28,stride:48},{buffer:O,size:4,offset:32,stride:48}]),R=p(new Array(1024),[256,1,4]),U=0;U<1024;++U)R.data[U]=255;var B=n(A,R);B.wrap=A.REPEAT;var G=new k(A,C,L,O,I,B);return G.update(M),G};var i=t(5827),r=t(2944),n=t(8931),o=new Uint8Array(4),a=new Float32Array(o.buffer),u=t(5070),p=t(5050),c=t(248),b=c.createShader,d=c.createPickShader,v=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function x(M,A){for(var C=0,L=0;L<3;++L){var O=M[L]-A[L];C+=O*O}return Math.sqrt(C)}function g(M){for(var A=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],C=0;C<3;++C)A[0][C]=Math.max(M[0][C],A[0][C]),A[1][C]=Math.min(M[1][C],A[1][C]);return A}function y(M,A,C,L){this.arcLength=M,this.position=A,this.index=C,this.dataCoordinate=L}function k(M,A,C,L,O,I){this.gl=M,this.shader=A,this.pickShader=C,this.buffer=L,this.vao=O,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=I,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var h=k.prototype;h.isTransparent=function(){return this.hasAlpha},h.isOpaque=function(){return!this.hasAlpha},h.pickSlots=1,h.setPickBase=function(M){this.pickId=M},h.drawTransparent=h.draw=function(M){if(this.vertexCount){var A=this.gl,C=this.shader,L=this.vao;C.bind(),C.uniforms={model:M.model||v,view:M.view||v,projection:M.projection||v,clipBounds:g(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},L.bind(),L.draw(A.TRIANGLE_STRIP,this.vertexCount),L.unbind()}},h.drawPick=function(M){if(this.vertexCount){var A=this.gl,C=this.pickShader,L=this.vao;C.bind(),C.uniforms={model:M.model||v,view:M.view||v,projection:M.projection||v,pickId:this.pickId,clipBounds:g(this.clipBounds),screenShape:[A.drawingBufferWidth,A.drawingBufferHeight],pixelRatio:this.pixelRatio},L.bind(),L.draw(A.TRIANGLE_STRIP,this.vertexCount),L.unbind()}},h.update=function(M){var A,C;this.dirty=!0;var L=!!M.connectGaps;"dashScale"in M&&(this.dashScale=M.dashScale),this.hasAlpha=!1,"opacity"in M&&(this.opacity=+M.opacity,this.opacity<1&&(this.hasAlpha=!0));var O=[],I=[],R=[],U=0,B=0,G=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],N=M.position||M.positions;if(N){var j=M.color||M.colors||[0,0,0,1],V=M.lineWidth||1,H=!1;e:for(A=1;A0){for(var te=0;te<24;++te)O.push(O[O.length-12]);B+=2,H=!0}continue e}G[0][C]=Math.min(G[0][C],X[C],K[C]),G[1][C]=Math.max(G[1][C],X[C],K[C])}Array.isArray(j[0])?(ee=j.length>A-1?j[A-1]:j.length>0?j[j.length-1]:[0,0,0,1],Q=j.length>A?j[A]:j.length>0?j[j.length-1]:[0,0,0,1]):ee=Q=j,ee.length===3&&(ee=[ee[0],ee[1],ee[2],1]),Q.length===3&&(Q=[Q[0],Q[1],Q[2],1]),!this.hasAlpha&&ee[3]<1&&(this.hasAlpha=!0),Y=Array.isArray(V)?V.length>A-1?V[A-1]:V.length>0?V[V.length-1]:[0,0,0,1]:V;var ae=U;if(U+=x(X,K),H){for(C=0;C<2;++C)O.push(X[0],X[1],X[2],K[0],K[1],K[2],ae,Y,ee[0],ee[1],ee[2],ee[3]);B+=2,H=!1}O.push(X[0],X[1],X[2],K[0],K[1],K[2],ae,Y,ee[0],ee[1],ee[2],ee[3],X[0],X[1],X[2],K[0],K[1],K[2],ae,-Y,ee[0],ee[1],ee[2],ee[3],K[0],K[1],K[2],X[0],X[1],X[2],U,-Y,Q[0],Q[1],Q[2],Q[3],K[0],K[1],K[2],X[0],X[1],X[2],U,Y,Q[0],Q[1],Q[2],Q[3]),B+=4}}if(this.buffer.update(O),I.push(U),R.push(N[N.length-1].slice()),this.bounds=G,this.vertexCount=B,this.points=R,this.arcLength=I,"dashes"in M){var oe=M.dashes.slice();for(oe.unshift(0),A=1;A1.0001)return null;C+=A[g]}return Math.abs(C-1)>.001?null:[y,a(u,A),A]}},2056:function(f,l,t){var i=t(6832),r=i([`precision highp float; #define GLSLIFY 1 attribute vec3 position, normal; @@ -1427,7 +1427,7 @@ void main() { gl_FragColor = vec4(contourColor, 1.0); } -`]);l.meshShader={vertex:r,fragment:n,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},l.wireShader={vertex:o,fragment:a,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},l.pointShader={vertex:u,fragment:p,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},l.pickShader={vertex:c,fragment:b,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},l.pointPickShader={vertex:d,fragment:b,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},l.contourShader={vertex:v,fragment:x,attributes:[{name:"position",type:"vec3"}]}},8116:function(f,l,t){var i=t(5158),r=t(5827),n=t(2944),o=t(8931),a=t(115),u=t(104),p=t(7437),c=t(5050),b=t(9156),d=t(7212),v=t(5306),x=t(2056),g=t(4340),m=x.meshShader,k=x.wireShader,h=x.pointShader,M=x.pickShader,A=x.pointPickShader,C=x.contourShader,L=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function O(H,ee,Q,X,Y,K,te,ae,oe,se,fe,ye,pe,de,he,xe,Re,we,Ae,Me,Ce,ne,ue,me,Te,Ee,Ue){this.gl=H,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=ee,this.dirty=!0,this.triShader=Q,this.lineShader=X,this.pointShader=Y,this.pickShader=K,this.pointPickShader=te,this.contourShader=ae,this.trianglePositions=oe,this.triangleColors=fe,this.triangleNormals=pe,this.triangleUVs=ye,this.triangleIds=se,this.triangleVAO=de,this.triangleCount=0,this.lineWidth=1,this.edgePositions=he,this.edgeColors=Re,this.edgeUVs=we,this.edgeIds=xe,this.edgeVAO=Ae,this.edgeCount=0,this.pointPositions=Me,this.pointColors=ne,this.pointUVs=ue,this.pointSizes=me,this.pointIds=Ce,this.pointVAO=Te,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=Ee,this.contourVAO=Ue,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=L,this._view=L,this._projection=L,this._resolution=[1,1]}var I=O.prototype;function R(H,ee){if(!ee||!ee.length)return 1;for(var Q=0;QH&&Q>0){var X=(ee[Q][0]-H)/(ee[Q][0]-ee[Q-1][0]);return ee[Q][1]*(1-X)+X*ee[Q-1][1]}}return 1}function U(H){var ee=i(H,m.vertex,m.fragment);return ee.attributes.position.location=0,ee.attributes.color.location=2,ee.attributes.uv.location=3,ee.attributes.normal.location=4,ee}function B(H){var ee=i(H,k.vertex,k.fragment);return ee.attributes.position.location=0,ee.attributes.color.location=2,ee.attributes.uv.location=3,ee}function G(H){var ee=i(H,h.vertex,h.fragment);return ee.attributes.position.location=0,ee.attributes.color.location=2,ee.attributes.uv.location=3,ee.attributes.pointSize.location=4,ee}function N(H){var ee=i(H,M.vertex,M.fragment);return ee.attributes.position.location=0,ee.attributes.id.location=1,ee}function j(H){var ee=i(H,A.vertex,A.fragment);return ee.attributes.position.location=0,ee.attributes.id.location=1,ee.attributes.pointSize.location=4,ee}function V(H){var ee=i(H,C.vertex,C.fragment);return ee.attributes.position.location=0,ee}I.isOpaque=function(){return!this.hasAlpha},I.isTransparent=function(){return this.hasAlpha},I.pickSlots=1,I.setPickBase=function(H){this.pickId=H},I.highlight=function(H){if(H&&this.contourEnable){for(var ee=d(this.cells,this.intensity,H.intensity),Q=ee.cells,X=ee.vertexIds,Y=ee.vertexWeights,K=Q.length,te=v.mallocFloat32(6*K),ae=0,oe=0;oe0&&((se=this.triShader).bind(),se.uniforms=ae,this.triangleVAO.bind(),ee.drawArrays(ee.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&this.lineWidth>0&&((se=this.lineShader).bind(),se.uniforms=ae,this.edgeVAO.bind(),ee.lineWidth(this.lineWidth*this.pixelRatio),ee.drawArrays(ee.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((se=this.pointShader).bind(),se.uniforms=ae,this.pointVAO.bind(),ee.drawArrays(ee.POINTS,0,this.pointCount),this.pointVAO.unbind()),this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((se=this.contourShader).bind(),se.uniforms=ae,this.contourVAO.bind(),ee.drawArrays(ee.LINES,0,this.contourCount),this.contourVAO.unbind())},I.drawPick=function(H){H=H||{};for(var ee=this.gl,Q=H.model||L,X=H.view||L,Y=H.projection||L,K=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],te=0;te<3;++te)K[0][te]=Math.max(K[0][te],this.clipBounds[0][te]),K[1][te]=Math.min(K[1][te],this.clipBounds[1][te]);this._model=[].slice.call(Q),this._view=[].slice.call(X),this._projection=[].slice.call(Y),this._resolution=[ee.drawingBufferWidth,ee.drawingBufferHeight];var ae,oe={model:Q,view:X,projection:Y,clipBounds:K,pickId:this.pickId/255};(ae=this.pickShader).bind(),ae.uniforms=oe,this.triangleCount>0&&(this.triangleVAO.bind(),ee.drawArrays(ee.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),ee.lineWidth(this.lineWidth*this.pixelRatio),ee.drawArrays(ee.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((ae=this.pointPickShader).bind(),ae.uniforms=oe,this.pointVAO.bind(),ee.drawArrays(ee.POINTS,0,this.pointCount),this.pointVAO.unbind())},I.pick=function(H){if(!H||H.id!==this.pickId)return null;for(var ee=H.value[0]+256*H.value[1]+65536*H.value[2],Q=this.cells[ee],X=this.positions,Y=new Array(Q.length),K=0;KH&&Q>0){var Y=(ee[Q][0]-H)/(ee[Q][0]-ee[Q-1][0]);return ee[Q][1]*(1-Y)+Y*ee[Q-1][1]}}return 1}function U(H){var ee=i(H,y.vertex,y.fragment);return ee.attributes.position.location=0,ee.attributes.color.location=2,ee.attributes.uv.location=3,ee.attributes.normal.location=4,ee}function B(H){var ee=i(H,k.vertex,k.fragment);return ee.attributes.position.location=0,ee.attributes.color.location=2,ee.attributes.uv.location=3,ee}function G(H){var ee=i(H,h.vertex,h.fragment);return ee.attributes.position.location=0,ee.attributes.color.location=2,ee.attributes.uv.location=3,ee.attributes.pointSize.location=4,ee}function N(H){var ee=i(H,M.vertex,M.fragment);return ee.attributes.position.location=0,ee.attributes.id.location=1,ee}function j(H){var ee=i(H,A.vertex,A.fragment);return ee.attributes.position.location=0,ee.attributes.id.location=1,ee.attributes.pointSize.location=4,ee}function V(H){var ee=i(H,C.vertex,C.fragment);return ee.attributes.position.location=0,ee}I.isOpaque=function(){return!this.hasAlpha},I.isTransparent=function(){return this.hasAlpha},I.pickSlots=1,I.setPickBase=function(H){this.pickId=H},I.highlight=function(H){if(H&&this.contourEnable){for(var ee=d(this.cells,this.intensity,H.intensity),Q=ee.cells,Y=ee.vertexIds,X=ee.vertexWeights,K=Q.length,te=v.mallocFloat32(6*K),ae=0,oe=0;oe0&&((se=this.triShader).bind(),se.uniforms=ae,this.triangleVAO.bind(),ee.drawArrays(ee.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&this.lineWidth>0&&((se=this.lineShader).bind(),se.uniforms=ae,this.edgeVAO.bind(),ee.lineWidth(this.lineWidth*this.pixelRatio),ee.drawArrays(ee.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((se=this.pointShader).bind(),se.uniforms=ae,this.pointVAO.bind(),ee.drawArrays(ee.POINTS,0,this.pointCount),this.pointVAO.unbind()),this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((se=this.contourShader).bind(),se.uniforms=ae,this.contourVAO.bind(),ee.drawArrays(ee.LINES,0,this.contourCount),this.contourVAO.unbind())},I.drawPick=function(H){H=H||{};for(var ee=this.gl,Q=H.model||L,Y=H.view||L,X=H.projection||L,K=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],te=0;te<3;++te)K[0][te]=Math.max(K[0][te],this.clipBounds[0][te]),K[1][te]=Math.min(K[1][te],this.clipBounds[1][te]);this._model=[].slice.call(Q),this._view=[].slice.call(Y),this._projection=[].slice.call(X),this._resolution=[ee.drawingBufferWidth,ee.drawingBufferHeight];var ae,oe={model:Q,view:Y,projection:X,clipBounds:K,pickId:this.pickId/255};(ae=this.pickShader).bind(),ae.uniforms=oe,this.triangleCount>0&&(this.triangleVAO.bind(),ee.drawArrays(ee.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),ee.lineWidth(this.lineWidth*this.pixelRatio),ee.drawArrays(ee.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((ae=this.pointPickShader).bind(),ae.uniforms=oe,this.pointVAO.bind(),ee.drawArrays(ee.POINTS,0,this.pointCount),this.pointVAO.unbind())},I.pick=function(H){if(!H||H.id!==this.pickId)return null;for(var ee=H.value[0]+256*H.value[1]+65536*H.value[2],Q=this.cells[ee],Y=this.positions,X=new Array(Q.length),K=0;KA[Y]&&(h.uniforms.dataAxis=p,h.uniforms.screenOffset=c,h.uniforms.color=G[m],h.uniforms.angle=N[m],C.drawArrays(C.TRIANGLES,A[Y],A[K]-A[Y]))),j[m]&&X&&(c[1^m]-=te*R*V[m],h.uniforms.dataAxis=b,h.uniforms.screenOffset=c,h.uniforms.color=H[m],h.uniforms.angle=ee[m],C.drawArrays(C.TRIANGLES,Q,X)),c[1^m]=te*L[2+(1^m)]-1,U[m+2]&&(c[1^m]+=te*R*B[m+2],YA[Y]&&(h.uniforms.dataAxis=p,h.uniforms.screenOffset=c,h.uniforms.color=G[m+2],h.uniforms.angle=N[m+2],C.drawArrays(C.TRIANGLES,A[Y],A[K]-A[Y]))),j[m+2]&&X&&(c[1^m]+=te*R*V[m+2],h.uniforms.dataAxis=b,h.uniforms.screenOffset=c,h.uniforms.color=H[m+2],h.uniforms.angle=ee[m+2],C.drawArrays(C.TRIANGLES,Q,X))}),g.drawTitle=function(){var m=[0,0],k=[0,0];return function(){var h=this.plot,M=this.shader,A=h.gl,C=h.screenBox,L=h.titleCenter,O=h.titleAngle,I=h.titleColor,R=h.pixelRatio;if(this.titleCount){for(var U=0;U<2;++U)k[U]=2*(L[U]*R-C[U])/(C[2+U]-C[U])-1;M.bind(),M.uniforms.dataAxis=m,M.uniforms.screenOffset=k,M.uniforms.angle=O,M.uniforms.color=I,A.drawArrays(A.TRIANGLES,this.titleOffset,this.titleCount)}}}(),g.bind=(d=[0,0],v=[0,0],x=[0,0],function(){var m=this.plot,k=this.shader,h=m._tickBounds,M=m.dataBox,A=m.screenBox,C=m.viewBox;k.bind();for(var L=0;L<2;++L){var O=h[L],I=h[L+2]-O,R=.5*(M[L+2]+M[L]),U=M[L+2]-M[L],B=C[L],G=C[L+2]-B,N=A[L],j=A[L+2]-N;v[L]=2*I/U*G/j,d[L]=2*(O-R)/U*G/j}x[1]=2*m.pixelRatio/(A[3]-A[1]),x[0]=x[1]*(A[3]-A[1])/(A[2]-A[0]),k.uniforms.dataScale=v,k.uniforms.dataShift=d,k.uniforms.textScale=x,this.vbo.bind(),k.attributes.textCoordinate.pointer()}),g.update=function(m){var k,h,M,A,C,L=[],O=m.ticks,I=m.bounds;for(C=0;C<2;++C){var R=[Math.floor(L.length/3)],U=[-1/0],B=O[C];for(k=0;k=0){var B=v[U]-g[U]*(v[U+2]-v[U])/(g[U+2]-g[U]);U===0?h.drawLine(B,v[1],B,v[3],R[U],I[U]):h.drawLine(v[0],B,v[2],B,R[U],I[U])}}for(U=0;U=0;--d)this.objects[d].dispose();for(this.objects.length=0,d=this.overlays.length-1;d>=0;--d)this.overlays[d].dispose();this.overlays.length=0,this.gl=null},p.addObject=function(d){this.objects.indexOf(d)<0&&(this.objects.push(d),this.setDirty())},p.removeObject=function(d){for(var v=this.objects,x=0;xMath.abs(A))d.rotate(O,0,0,-M*C*Math.PI*k.rotateSpeed/window.innerWidth);else if(!k._ortho){var I=-k.zoomSpeed*L*A/window.innerHeight*(O-d.lastT())/20;d.pan(O,0,0,x*(Math.exp(I)-1))}}},!0)},k.enableMouseListeners(),k};var i=t(8161),r=t(1152),n=t(6145),o=t(6475),a=t(2565),u=t(5233)},8245:function(f,l,t){var i=t(6832),r=t(5158),n=i([`precision mediump float; +`])}},5613:function(f,l,t){f.exports=function(y){var k=y.gl;return new u(y,i(k),r(k,a.textVert,a.textFrag))};var i=t(5827),r=t(5158),n=t(6946),o=t(5070),a=t(2709);function u(y,k,h){this.plot=y,this.vbo=k,this.shader=h,this.tickOffset=[[],[]],this.tickX=[[],[]],this.labelOffset=[0,0],this.labelCount=[0,0]}var p,c,b,d,v,x,g=u.prototype;g.drawTicks=(p=[0,0],c=[0,0],b=[0,0],function(y){var k=this.plot,h=this.shader,M=this.tickX[y],A=this.tickOffset[y],C=k.gl,L=k.viewBox,O=k.dataBox,I=k.screenBox,R=k.pixelRatio,U=k.tickEnable,B=k.tickPad,G=k.tickColor,N=k.tickAngle,j=k.labelEnable,V=k.labelPad,H=k.labelColor,ee=k.labelAngle,Q=this.labelOffset[y],Y=this.labelCount[y],X=o.lt(M,O[y]),K=o.le(M,O[y+2]);p[0]=p[1]=0,p[y]=1,c[y]=(L[2+y]+L[y])/(I[2+y]-I[y])-1;var te=2/I[2+(1^y)]-I[1^y];c[1^y]=te*L[1^y]-1,U[y]&&(c[1^y]-=te*R*B[y],XA[X]&&(h.uniforms.dataAxis=p,h.uniforms.screenOffset=c,h.uniforms.color=G[y],h.uniforms.angle=N[y],C.drawArrays(C.TRIANGLES,A[X],A[K]-A[X]))),j[y]&&Y&&(c[1^y]-=te*R*V[y],h.uniforms.dataAxis=b,h.uniforms.screenOffset=c,h.uniforms.color=H[y],h.uniforms.angle=ee[y],C.drawArrays(C.TRIANGLES,Q,Y)),c[1^y]=te*L[2+(1^y)]-1,U[y+2]&&(c[1^y]+=te*R*B[y+2],XA[X]&&(h.uniforms.dataAxis=p,h.uniforms.screenOffset=c,h.uniforms.color=G[y+2],h.uniforms.angle=N[y+2],C.drawArrays(C.TRIANGLES,A[X],A[K]-A[X]))),j[y+2]&&Y&&(c[1^y]+=te*R*V[y+2],h.uniforms.dataAxis=b,h.uniforms.screenOffset=c,h.uniforms.color=H[y+2],h.uniforms.angle=ee[y+2],C.drawArrays(C.TRIANGLES,Q,Y))}),g.drawTitle=function(){var y=[0,0],k=[0,0];return function(){var h=this.plot,M=this.shader,A=h.gl,C=h.screenBox,L=h.titleCenter,O=h.titleAngle,I=h.titleColor,R=h.pixelRatio;if(this.titleCount){for(var U=0;U<2;++U)k[U]=2*(L[U]*R-C[U])/(C[2+U]-C[U])-1;M.bind(),M.uniforms.dataAxis=y,M.uniforms.screenOffset=k,M.uniforms.angle=O,M.uniforms.color=I,A.drawArrays(A.TRIANGLES,this.titleOffset,this.titleCount)}}}(),g.bind=(d=[0,0],v=[0,0],x=[0,0],function(){var y=this.plot,k=this.shader,h=y._tickBounds,M=y.dataBox,A=y.screenBox,C=y.viewBox;k.bind();for(var L=0;L<2;++L){var O=h[L],I=h[L+2]-O,R=.5*(M[L+2]+M[L]),U=M[L+2]-M[L],B=C[L],G=C[L+2]-B,N=A[L],j=A[L+2]-N;v[L]=2*I/U*G/j,d[L]=2*(O-R)/U*G/j}x[1]=2*y.pixelRatio/(A[3]-A[1]),x[0]=x[1]*(A[3]-A[1])/(A[2]-A[0]),k.uniforms.dataScale=v,k.uniforms.dataShift=d,k.uniforms.textScale=x,this.vbo.bind(),k.attributes.textCoordinate.pointer()}),g.update=function(y){var k,h,M,A,C,L=[],O=y.ticks,I=y.bounds;for(C=0;C<2;++C){var R=[Math.floor(L.length/3)],U=[-1/0],B=O[C];for(k=0;k=0){var B=v[U]-g[U]*(v[U+2]-v[U])/(g[U+2]-g[U]);U===0?h.drawLine(B,v[1],B,v[3],R[U],I[U]):h.drawLine(v[0],B,v[2],B,R[U],I[U])}}for(U=0;U=0;--d)this.objects[d].dispose();for(this.objects.length=0,d=this.overlays.length-1;d>=0;--d)this.overlays[d].dispose();this.overlays.length=0,this.gl=null},p.addObject=function(d){this.objects.indexOf(d)<0&&(this.objects.push(d),this.setDirty())},p.removeObject=function(d){for(var v=this.objects,x=0;xMath.abs(A))d.rotate(O,0,0,-M*C*Math.PI*k.rotateSpeed/window.innerWidth);else if(!k._ortho){var I=-k.zoomSpeed*L*A/window.innerHeight*(O-d.lastT())/20;d.pan(O,0,0,x*(Math.exp(I)-1))}}},!0)},k.enableMouseListeners(),k};var i=t(8161),r=t(1152),n=t(6145),o=t(6475),a=t(2565),u=t(5233)},8245:function(f,l,t){var i=t(6832),r=t(5158),n=i([`precision mediump float; #define GLSLIFY 1 attribute vec2 position; varying vec2 uv; @@ -1525,7 +1525,7 @@ void main() { vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0)); gl_FragColor = min(vec4(1,1,1,1), accum); -}`]);f.exports=function(a){return r(a,n,o,null,[{name:"position",type:"vec2"}])}},1059:function(f,l,t){var i=t(4296),r=t(7453),n=t(2771),o=t(6496),a=t(2611),u=t(4234),p=t(8126),c=t(6145),b=t(1120),d=t(5268),v=t(8245),x=t(2321)({tablet:!0,featureDetect:!0});function g(){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 m(h){var M=Math.round(Math.log(Math.abs(h))/Math.log(10));if(M<0){var A=Math.round(Math.pow(10,-M));return Math.ceil(h*A)/A}return M>0?(A=Math.round(Math.pow(10,M)),Math.ceil(h/A)*A):Math.ceil(h)}function k(h){return typeof h!="boolean"||h}f.exports={createScene:function(h){(h=h||{}).camera=h.camera||{};var M=h.canvas;M||(M=document.createElement("canvas"),h.container?h.container.appendChild(M):document.body.appendChild(M));var A=h.gl;if(A||(h.glOptions&&(x=!!h.glOptions.preserveDrawingBuffer),A=function(Re,we){var Ae=null;try{(Ae=Re.getContext("webgl",we))||(Ae=Re.getContext("experimental-webgl",we))}catch{return null}return Ae}(M,h.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:x})),!A)throw new Error("webgl not supported");var C=h.bounds||[[-10,-10,-10],[10,10,10]],L=new g,O=u(A,A.drawingBufferWidth,A.drawingBufferHeight,{preferFloat:!x}),I=v(A),R=h.cameraObject&&h.cameraObject._ortho===!0||h.camera.projection&&h.camera.projection.type==="orthographic"||!1,U={eye:h.camera.eye||[2,0,0],center:h.camera.center||[0,0,0],up:h.camera.up||[0,1,0],zoomMin:h.camera.zoomMax||.1,zoomMax:h.camera.zoomMin||100,mode:h.camera.mode||"turntable",_ortho:R},B=h.axes||{},G=r(A,B);G.enable=!B.disable;var N=h.spikes||{},j=o(A,N),V=[],H=[],ee=[],Q=[],X=!0,Y=!0,K={view:null,projection:new Array(16),model:new Array(16),_ortho:!1},te=(Y=!0,[A.drawingBufferWidth,A.drawingBufferHeight]),ae=h.cameraObject||i(M,U),oe={gl:A,contextLost:!1,pixelRatio:h.pixelRatio||1,canvas:M,selection:L,camera:ae,axes:G,axesPixels:null,spikes:j,bounds:C,objects:V,shape:te,aspect:h.aspectRatio||[1,1,1],pickRadius:h.pickRadius||10,zNear:h.zNear||.01,zFar:h.zFar||1e3,fovy:h.fovy||Math.PI/4,clearColor:h.clearColor||[0,0,0,0],autoResize:k(h.autoResize),autoBounds:k(h.autoBounds),autoScale:!!h.autoScale,autoCenter:k(h.autoCenter),clipToBounds:k(h.clipToBounds),snapToData:!!h.snapToData,onselect:h.onselect||null,onrender:h.onrender||null,onclick:h.onclick||null,cameraParams:K,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(Re){this.aspect[0]=Re.x,this.aspect[1]=Re.y,this.aspect[2]=Re.z,Y=!0},setBounds:function(Re,we){this.bounds[0][Re]=we.min,this.bounds[1][Re]=we.max},setClearColor:function(Re){this.clearColor=Re},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)}},se=[A.drawingBufferWidth/oe.pixelRatio|0,A.drawingBufferHeight/oe.pixelRatio|0];function fe(){if(!oe._stopped&&oe.autoResize){var Re=M.parentNode,we=1,Ae=1;Re&&Re!==document.body?(we=Re.clientWidth,Ae=Re.clientHeight):(we=window.innerWidth,Ae=window.innerHeight);var Me=0|Math.ceil(we*oe.pixelRatio),Ce=0|Math.ceil(Ae*oe.pixelRatio);if(Me!==M.width||Ce!==M.height){M.width=Me,M.height=Ce;var ne=M.style;ne.position=ne.position||"absolute",ne.left="0px",ne.top="0px",ne.width=we+"px",ne.height=Ae+"px",X=!0}}}function ye(){for(var Re=V.length,we=Q.length,Ae=0;Ae0&&ee[we-1]===0;)ee.pop(),Q.pop().dispose()}function pe(){if(oe.contextLost)return!0;A.isContextLost()&&(oe.contextLost=!0,oe.mouseListener.enabled=!1,oe.selection.object=null,oe.oncontextloss&&oe.oncontextloss())}oe.autoResize&&fe(),window.addEventListener("resize",fe),oe.update=function(Re){oe._stopped||(X=!0,Y=!0)},oe.add=function(Re){oe._stopped||(Re.axes=G,V.push(Re),H.push(-1),X=!0,Y=!0,ye())},oe.remove=function(Re){if(!oe._stopped){var we=V.indexOf(Re);we<0||(V.splice(we,1),H.pop(),X=!0,Y=!0,ye())}},oe.dispose=function(){if(!oe._stopped&&(oe._stopped=!0,window.removeEventListener("resize",fe),M.removeEventListener("webglcontextlost",pe),oe.mouseListener.enabled=!1,!oe.contextLost)){G.dispose(),j.dispose();for(var Re=0;ReL.distance)continue;for(var Ee=0;Ee0?(A=Math.round(Math.pow(10,M)),Math.ceil(h/A)*A):Math.ceil(h)}function k(h){return typeof h!="boolean"||h}f.exports={createScene:function(h){(h=h||{}).camera=h.camera||{};var M=h.canvas;M||(M=document.createElement("canvas"),h.container?h.container.appendChild(M):document.body.appendChild(M));var A=h.gl;if(A||(h.glOptions&&(x=!!h.glOptions.preserveDrawingBuffer),A=function(Re,we){var Ae=null;try{(Ae=Re.getContext("webgl",we))||(Ae=Re.getContext("experimental-webgl",we))}catch{return null}return Ae}(M,h.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:x})),!A)throw new Error("webgl not supported");var C=h.bounds||[[-10,-10,-10],[10,10,10]],L=new g,O=u(A,A.drawingBufferWidth,A.drawingBufferHeight,{preferFloat:!x}),I=v(A),R=h.cameraObject&&h.cameraObject._ortho===!0||h.camera.projection&&h.camera.projection.type==="orthographic"||!1,U={eye:h.camera.eye||[2,0,0],center:h.camera.center||[0,0,0],up:h.camera.up||[0,1,0],zoomMin:h.camera.zoomMax||.1,zoomMax:h.camera.zoomMin||100,mode:h.camera.mode||"turntable",_ortho:R},B=h.axes||{},G=r(A,B);G.enable=!B.disable;var N=h.spikes||{},j=o(A,N),V=[],H=[],ee=[],Q=[],Y=!0,X=!0,K={view:null,projection:new Array(16),model:new Array(16),_ortho:!1},te=(X=!0,[A.drawingBufferWidth,A.drawingBufferHeight]),ae=h.cameraObject||i(M,U),oe={gl:A,contextLost:!1,pixelRatio:h.pixelRatio||1,canvas:M,selection:L,camera:ae,axes:G,axesPixels:null,spikes:j,bounds:C,objects:V,shape:te,aspect:h.aspectRatio||[1,1,1],pickRadius:h.pickRadius||10,zNear:h.zNear||.01,zFar:h.zFar||1e3,fovy:h.fovy||Math.PI/4,clearColor:h.clearColor||[0,0,0,0],autoResize:k(h.autoResize),autoBounds:k(h.autoBounds),autoScale:!!h.autoScale,autoCenter:k(h.autoCenter),clipToBounds:k(h.clipToBounds),snapToData:!!h.snapToData,onselect:h.onselect||null,onrender:h.onrender||null,onclick:h.onclick||null,cameraParams:K,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(Re){this.aspect[0]=Re.x,this.aspect[1]=Re.y,this.aspect[2]=Re.z,X=!0},setBounds:function(Re,we){this.bounds[0][Re]=we.min,this.bounds[1][Re]=we.max},setClearColor:function(Re){this.clearColor=Re},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)}},se=[A.drawingBufferWidth/oe.pixelRatio|0,A.drawingBufferHeight/oe.pixelRatio|0];function fe(){if(!oe._stopped&&oe.autoResize){var Re=M.parentNode,we=1,Ae=1;Re&&Re!==document.body?(we=Re.clientWidth,Ae=Re.clientHeight):(we=window.innerWidth,Ae=window.innerHeight);var Me=0|Math.ceil(we*oe.pixelRatio),Ce=0|Math.ceil(Ae*oe.pixelRatio);if(Me!==M.width||Ce!==M.height){M.width=Me,M.height=Ce;var ne=M.style;ne.position=ne.position||"absolute",ne.left="0px",ne.top="0px",ne.width=we+"px",ne.height=Ae+"px",Y=!0}}}function xe(){for(var Re=V.length,we=Q.length,Ae=0;Ae0&&ee[we-1]===0;)ee.pop(),Q.pop().dispose()}function he(){if(oe.contextLost)return!0;A.isContextLost()&&(oe.contextLost=!0,oe.mouseListener.enabled=!1,oe.selection.object=null,oe.oncontextloss&&oe.oncontextloss())}oe.autoResize&&fe(),window.addEventListener("resize",fe),oe.update=function(Re){oe._stopped||(Y=!0,X=!0)},oe.add=function(Re){oe._stopped||(Re.axes=G,V.push(Re),H.push(-1),Y=!0,X=!0,xe())},oe.remove=function(Re){if(!oe._stopped){var we=V.indexOf(Re);we<0||(V.splice(we,1),H.pop(),Y=!0,X=!0,xe())}},oe.dispose=function(){if(!oe._stopped&&(oe._stopped=!0,window.removeEventListener("resize",fe),M.removeEventListener("webglcontextlost",he),oe.mouseListener.enabled=!1,!oe.contextLost)){G.dispose(),j.dispose();for(var Re=0;ReL.distance)continue;for(var Ee=0;Ee>>1,g=b.positions instanceof Float32Array,m=b.idToIndex instanceof Int32Array&&b.idToIndex.length>=x,k=b.positions,h=g?k:n.mallocFloat32(k.length),M=m?b.idToIndex:n.mallocInt32(x);if(g||h.set(k),!m)for(h.set(k),d=0;d>>1;for(I=0;I=O[0]&&B<=O[2]&&G>=O[1]&&G<=O[3]&&R++}return R}(this.points,g),M=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(h,.33333)));u[0]=2/m,u[4]=2/k,u[6]=-2*g[0]/m-1,u[7]=-2*g[1]/k-1,this.offsetBuffer.bind(),v.bind(),v.attributes.position.pointer(),v.uniforms.matrix=u,v.uniforms.color=this.color,v.uniforms.borderColor=this.borderColor,v.uniforms.pointCloud=M<5,v.uniforms.pointSize=M,v.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),d&&(p[0]=255&b,p[1]=b>>8&255,p[2]=b>>16&255,p[3]=b>>24&255,this.pickBuffer.bind(),v.attributes.pickId.pointer(x.UNSIGNED_BYTE),v.uniforms.pickOffset=p,this.pickOffset=b);var A=x.getParameter(x.BLEND),C=x.getParameter(x.DITHER);return A&&!this.blend&&x.disable(x.BLEND),C&&x.disable(x.DITHER),x.drawArrays(x.POINTS,0,this.pointCount),A&&!this.blend&&x.enable(x.BLEND),C&&x.enable(x.DITHER),b+this.pointCount}),c.draw=c.unifiedDraw,c.drawPick=c.unifiedDraw,c.pick=function(b,d,v){var x=this.pickOffset,g=this.pointCount;if(v=x+g)return null;var m=v-x,k=this.points;return{object:this,pointId:m,dataCoord:[k[2*m],k[2*m+1]]}}},6093:function(f){f.exports=function(l,t,i,r){var n,o,a,u,p,c=t[0],b=t[1],d=t[2],v=t[3],x=i[0],g=i[1],m=i[2],k=i[3];return(o=c*x+b*g+d*m+v*k)<0&&(o=-o,x=-x,g=-g,m=-m,k=-k),1-o>1e-6?(n=Math.acos(o),a=Math.sin(n),u=Math.sin((1-r)*n)/a,p=Math.sin(r*n)/a):(u=1-r,p=r),l[0]=u*c+p*x,l[1]=u*b+p*g,l[2]=u*d+p*m,l[3]=u*v+p*k,l}},8240:function(f){f.exports=function(l){return l||l===0?l.toString():""}},4123:function(f,l,t){var i=t(875);f.exports=function(n,o,a){var u=r[o];if(u||(u=r[o]={}),n in u)return u[n];var p={textAlign:"center",textBaseline:"middle",lineHeight:1,font:o,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},triangles:!0},c=i(n,p);p.triangles=!1;var b,d,v=i(n,p);if(a&&a!==1){for(b=0;b>>1,g=b.positions instanceof Float32Array,y=b.idToIndex instanceof Int32Array&&b.idToIndex.length>=x,k=b.positions,h=g?k:n.mallocFloat32(k.length),M=y?b.idToIndex:n.mallocInt32(x);if(g||h.set(k),!y)for(h.set(k),d=0;d>>1;for(I=0;I=O[0]&&B<=O[2]&&G>=O[1]&&G<=O[3]&&R++}return R}(this.points,g),M=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(h,.33333)));u[0]=2/y,u[4]=2/k,u[6]=-2*g[0]/y-1,u[7]=-2*g[1]/k-1,this.offsetBuffer.bind(),v.bind(),v.attributes.position.pointer(),v.uniforms.matrix=u,v.uniforms.color=this.color,v.uniforms.borderColor=this.borderColor,v.uniforms.pointCloud=M<5,v.uniforms.pointSize=M,v.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),d&&(p[0]=255&b,p[1]=b>>8&255,p[2]=b>>16&255,p[3]=b>>24&255,this.pickBuffer.bind(),v.attributes.pickId.pointer(x.UNSIGNED_BYTE),v.uniforms.pickOffset=p,this.pickOffset=b);var A=x.getParameter(x.BLEND),C=x.getParameter(x.DITHER);return A&&!this.blend&&x.disable(x.BLEND),C&&x.disable(x.DITHER),x.drawArrays(x.POINTS,0,this.pointCount),A&&!this.blend&&x.enable(x.BLEND),C&&x.enable(x.DITHER),b+this.pointCount}),c.draw=c.unifiedDraw,c.drawPick=c.unifiedDraw,c.pick=function(b,d,v){var x=this.pickOffset,g=this.pointCount;if(v=x+g)return null;var y=v-x,k=this.points;return{object:this,pointId:y,dataCoord:[k[2*y],k[2*y+1]]}}},6093:function(f){f.exports=function(l,t,i,r){var n,o,a,u,p,c=t[0],b=t[1],d=t[2],v=t[3],x=i[0],g=i[1],y=i[2],k=i[3];return(o=c*x+b*g+d*y+v*k)<0&&(o=-o,x=-x,g=-g,y=-y,k=-k),1-o>1e-6?(n=Math.acos(o),a=Math.sin(n),u=Math.sin((1-r)*n)/a,p=Math.sin(r*n)/a):(u=1-r,p=r),l[0]=u*c+p*x,l[1]=u*b+p*g,l[2]=u*d+p*y,l[3]=u*v+p*k,l}},8240:function(f){f.exports=function(l){return l||l===0?l.toString():""}},4123:function(f,l,t){var i=t(875);f.exports=function(n,o,a){var u=r[o];if(u||(u=r[o]={}),n in u)return u[n];var p={textAlign:"center",textBaseline:"middle",lineHeight:1,font:o,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},triangles:!0},c=i(n,p);p.triangles=!1;var b,d,v=i(n,p);if(a&&a!==1){for(b=0;b1?1:H}function m(H,ee,Q,X,Y,K,te,ae,oe,se,fe,ye){this.gl=H,this.pixelRatio=1,this.shader=ee,this.orthoShader=Q,this.projectShader=X,this.pointBuffer=Y,this.colorBuffer=K,this.glyphBuffer=te,this.idBuffer=ae,this.vao=oe,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=se,this.pickOrthoShader=fe,this.pickProjectShader=ye,this.points=[],this._selectResult=new x(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}f.exports=function(H){var ee=H.gl,Q=u.createPerspective(ee),X=u.createOrtho(ee),Y=u.createProject(ee),K=u.createPickPerspective(ee),te=u.createPickOrtho(ee),ae=u.createPickProject(ee),oe=r(ee),se=r(ee),fe=r(ee),ye=r(ee),pe=new m(ee,Q,X,Y,oe,se,fe,ye,n(ee,[{buffer:oe,size:3,type:ee.FLOAT},{buffer:se,size:4,type:ee.FLOAT},{buffer:fe,size:2,type:ee.FLOAT},{buffer:ye,size:4,type:ee.UNSIGNED_BYTE,normalized:!0}]),K,te,ae);return pe.update(H),pe};var k=m.prototype;k.pickSlots=1,k.setPickBase=function(H){this.pickId=H},k.isTransparent=function(){if(this.hasAlpha)return!0;for(var H=0;H<3;++H)if(this.axesProject[H]&&this.projectHasAlpha)return!0;return!1},k.isOpaque=function(){if(!this.hasAlpha)return!0;for(var H=0;H<3;++H)if(this.axesProject[H]&&!this.projectHasAlpha)return!0;return!1};var h=[0,0],M=[0,0,0],A=[0,0,0],C=[0,0,0,1],L=[0,0,0,1],O=b.slice(),I=[0,0,0],R=[[0,0,0],[0,0,0]];function U(H){return H[0]=H[1]=H[2]=0,H}function B(H,ee){return H[0]=ee[0],H[1]=ee[1],H[2]=ee[2],H[3]=1,H}function G(H,ee,Q,X){return H[0]=ee[0],H[1]=ee[1],H[2]=ee[2],H[Q]=X,H}var N=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function j(H,ee,Q,X,Y,K,te){var ae=Q.gl;if((K===Q.projectHasAlpha||te)&&function(se,fe,ye,pe){var de,he=fe.axesProject,xe=fe.gl,Re=se.uniforms,we=ye.model||b,Ae=ye.view||b,Me=ye.projection||b,Ce=fe.axesBounds,ne=function(st){for(var ot=R,ft=0;ft<2;++ft)for(var yt=0;yt<3;++yt)ot[ft][yt]=Math.max(Math.min(st[ft][yt],1e8),-1e8);return ot}(fe.clipBounds);de=fe.axes&&fe.axes.lastCubeProps?fe.axes.lastCubeProps.axis:[1,1,1],h[0]=2/xe.drawingBufferWidth,h[1]=2/xe.drawingBufferHeight,se.bind(),Re.view=Ae,Re.projection=Me,Re.screenSize=h,Re.highlightId=fe.highlightId,Re.highlightScale=fe.highlightScale,Re.clipBounds=ne,Re.pickGroup=fe.pickId/255,Re.pixelRatio=pe;for(var ue=0;ue<3;++ue)if(he[ue]){Re.scale=fe.projectScale[ue],Re.opacity=fe.projectOpacity[ue];for(var me=O,Te=0;Te<16;++Te)me[Te]=0;for(Te=0;Te<4;++Te)me[5*Te]=1;me[5*ue]=0,de[ue]<0?me[12+ue]=Ce[0][ue]:me[12+ue]=Ce[1][ue],a(me,we,me),Re.model=me;var Ee=(ue+1)%3,Ue=(ue+2)%3,De=U(M),je=U(A);De[Ee]=1,je[Ue]=1;var ge=v(0,0,0,B(C,De)),be=v(0,0,0,B(L,je));if(Math.abs(ge[1])>Math.abs(be[1])){var Se=ge;ge=be,be=Se,Se=De,De=je,je=Se;var Ne=Ee;Ee=Ue,Ue=Ne}ge[0]<0&&(De[Ee]=-1),be[1]>0&&(je[Ue]=-1);var Ye=0,Ze=0;for(Te=0;Te<4;++Te)Ye+=Math.pow(we[4*Ee+Te],2),Ze+=Math.pow(we[4*Ue+Te],2);De[Ee]/=Math.sqrt(Ye),je[Ue]/=Math.sqrt(Ze),Re.axes[0]=De,Re.axes[1]=je,Re.fragClipBounds[0]=G(I,ne[0],ue,-1e8),Re.fragClipBounds[1]=G(I,ne[1],ue,1e8),fe.vao.bind(),fe.vao.draw(xe.TRIANGLES,fe.vertexCount),fe.lineWidth>0&&(xe.lineWidth(fe.lineWidth*pe),fe.vao.draw(xe.LINES,fe.lineVertexCount,fe.vertexCount)),fe.vao.unbind()}}(ee,Q,X,Y),K===Q.hasAlpha||te){H.bind();var oe=H.uniforms;oe.model=X.model||b,oe.view=X.view||b,oe.projection=X.projection||b,h[0]=2/ae.drawingBufferWidth,h[1]=2/ae.drawingBufferHeight,oe.screenSize=h,oe.highlightId=Q.highlightId,oe.highlightScale=Q.highlightScale,oe.fragClipBounds=N,oe.clipBounds=Q.axes.bounds,oe.opacity=Q.opacity,oe.pickGroup=Q.pickId/255,oe.pixelRatio=Y,Q.vao.bind(),Q.vao.draw(ae.TRIANGLES,Q.vertexCount),Q.lineWidth>0&&(ae.lineWidth(Q.lineWidth*Y),Q.vao.draw(ae.LINES,Q.lineVertexCount,Q.vertexCount)),Q.vao.unbind()}}function V(H,ee,Q,X){var Y;Y=Array.isArray(H)?ee=this.pointCount||ee<0)return null;var Q=this.points[ee],X=this._selectResult;X.index=ee;for(var Y=0;Y<3;++Y)X.position[Y]=X.dataCoordinate[Y]=Q[Y];return X},k.highlight=function(H){if(H){var ee=H.index,Q=255&ee,X=ee>>8&255,Y=ee>>16&255;this.highlightId=[Q/255,X/255,Y/255,0]}else this.highlightId=[1,1,1,1]},k.update=function(H){if("perspective"in(H=H||{})&&(this.useOrtho=!H.perspective),"orthographic"in H&&(this.useOrtho=!!H.orthographic),"lineWidth"in H&&(this.lineWidth=H.lineWidth),"project"in H)if(Array.isArray(H.project))this.axesProject=H.project;else{var ee=!!H.project;this.axesProject=[ee,ee,ee]}if("projectScale"in H)if(Array.isArray(H.projectScale))this.projectScale=H.projectScale.slice();else{var Q=+H.projectScale;this.projectScale=[Q,Q,Q]}if(this.projectHasAlpha=!1,"projectOpacity"in H){Array.isArray(H.projectOpacity)?this.projectOpacity=H.projectOpacity.slice():(Q=+H.projectOpacity,this.projectOpacity=[Q,Q,Q]);for(var X=0;X<3;++X)this.projectOpacity[X]=g(this.projectOpacity[X]),this.projectOpacity[X]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in H&&(this.opacity=g(H.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var Y,K,te=H.position,ae=H.font||"normal",oe=H.alignment||[0,0];if(oe.length===2)Y=oe[0],K=oe[1];else for(Y=[],K=[],X=0;X0){var be=0,Se=we,Ne=[0,0,0,1],Ye=[0,0,0,1],Ze=Array.isArray(pe)&&Array.isArray(pe[0]),st=Array.isArray(xe)&&Array.isArray(xe[0]);e:for(X=0;X0?1-Te[0][0]:It<0?1+Te[1][0]:1,Ft*=Ft>0?1-Te[0][1]:Ft<0?1+Te[1][1]:1],Nt=ue.cells||[],Je=ue.positions||[];for(ne=0;ne1?1:H}function y(H,ee,Q,Y,X,K,te,ae,oe,se,fe,xe){this.gl=H,this.pixelRatio=1,this.shader=ee,this.orthoShader=Q,this.projectShader=Y,this.pointBuffer=X,this.colorBuffer=K,this.glyphBuffer=te,this.idBuffer=ae,this.vao=oe,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=se,this.pickOrthoShader=fe,this.pickProjectShader=xe,this.points=[],this._selectResult=new x(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}f.exports=function(H){var ee=H.gl,Q=u.createPerspective(ee),Y=u.createOrtho(ee),X=u.createProject(ee),K=u.createPickPerspective(ee),te=u.createPickOrtho(ee),ae=u.createPickProject(ee),oe=r(ee),se=r(ee),fe=r(ee),xe=r(ee),he=new y(ee,Q,Y,X,oe,se,fe,xe,n(ee,[{buffer:oe,size:3,type:ee.FLOAT},{buffer:se,size:4,type:ee.FLOAT},{buffer:fe,size:2,type:ee.FLOAT},{buffer:xe,size:4,type:ee.UNSIGNED_BYTE,normalized:!0}]),K,te,ae);return he.update(H),he};var k=y.prototype;k.pickSlots=1,k.setPickBase=function(H){this.pickId=H},k.isTransparent=function(){if(this.hasAlpha)return!0;for(var H=0;H<3;++H)if(this.axesProject[H]&&this.projectHasAlpha)return!0;return!1},k.isOpaque=function(){if(!this.hasAlpha)return!0;for(var H=0;H<3;++H)if(this.axesProject[H]&&!this.projectHasAlpha)return!0;return!1};var h=[0,0],M=[0,0,0],A=[0,0,0],C=[0,0,0,1],L=[0,0,0,1],O=b.slice(),I=[0,0,0],R=[[0,0,0],[0,0,0]];function U(H){return H[0]=H[1]=H[2]=0,H}function B(H,ee){return H[0]=ee[0],H[1]=ee[1],H[2]=ee[2],H[3]=1,H}function G(H,ee,Q,Y){return H[0]=ee[0],H[1]=ee[1],H[2]=ee[2],H[Q]=Y,H}var N=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function j(H,ee,Q,Y,X,K,te){var ae=Q.gl;if((K===Q.projectHasAlpha||te)&&function(se,fe,xe,he){var de,pe=fe.axesProject,ye=fe.gl,Re=se.uniforms,we=xe.model||b,Ae=xe.view||b,Me=xe.projection||b,Ce=fe.axesBounds,ne=function(st){for(var ot=R,ft=0;ft<2;++ft)for(var yt=0;yt<3;++yt)ot[ft][yt]=Math.max(Math.min(st[ft][yt],1e8),-1e8);return ot}(fe.clipBounds);de=fe.axes&&fe.axes.lastCubeProps?fe.axes.lastCubeProps.axis:[1,1,1],h[0]=2/ye.drawingBufferWidth,h[1]=2/ye.drawingBufferHeight,se.bind(),Re.view=Ae,Re.projection=Me,Re.screenSize=h,Re.highlightId=fe.highlightId,Re.highlightScale=fe.highlightScale,Re.clipBounds=ne,Re.pickGroup=fe.pickId/255,Re.pixelRatio=he;for(var ue=0;ue<3;++ue)if(pe[ue]){Re.scale=fe.projectScale[ue],Re.opacity=fe.projectOpacity[ue];for(var me=O,Te=0;Te<16;++Te)me[Te]=0;for(Te=0;Te<4;++Te)me[5*Te]=1;me[5*ue]=0,de[ue]<0?me[12+ue]=Ce[0][ue]:me[12+ue]=Ce[1][ue],a(me,we,me),Re.model=me;var Ee=(ue+1)%3,Ue=(ue+2)%3,De=U(M),je=U(A);De[Ee]=1,je[Ue]=1;var ge=v(0,0,0,B(C,De)),be=v(0,0,0,B(L,je));if(Math.abs(ge[1])>Math.abs(be[1])){var Se=ge;ge=be,be=Se,Se=De,De=je,je=Se;var Ne=Ee;Ee=Ue,Ue=Ne}ge[0]<0&&(De[Ee]=-1),be[1]>0&&(je[Ue]=-1);var Ye=0,Ze=0;for(Te=0;Te<4;++Te)Ye+=Math.pow(we[4*Ee+Te],2),Ze+=Math.pow(we[4*Ue+Te],2);De[Ee]/=Math.sqrt(Ye),je[Ue]/=Math.sqrt(Ze),Re.axes[0]=De,Re.axes[1]=je,Re.fragClipBounds[0]=G(I,ne[0],ue,-1e8),Re.fragClipBounds[1]=G(I,ne[1],ue,1e8),fe.vao.bind(),fe.vao.draw(ye.TRIANGLES,fe.vertexCount),fe.lineWidth>0&&(ye.lineWidth(fe.lineWidth*he),fe.vao.draw(ye.LINES,fe.lineVertexCount,fe.vertexCount)),fe.vao.unbind()}}(ee,Q,Y,X),K===Q.hasAlpha||te){H.bind();var oe=H.uniforms;oe.model=Y.model||b,oe.view=Y.view||b,oe.projection=Y.projection||b,h[0]=2/ae.drawingBufferWidth,h[1]=2/ae.drawingBufferHeight,oe.screenSize=h,oe.highlightId=Q.highlightId,oe.highlightScale=Q.highlightScale,oe.fragClipBounds=N,oe.clipBounds=Q.axes.bounds,oe.opacity=Q.opacity,oe.pickGroup=Q.pickId/255,oe.pixelRatio=X,Q.vao.bind(),Q.vao.draw(ae.TRIANGLES,Q.vertexCount),Q.lineWidth>0&&(ae.lineWidth(Q.lineWidth*X),Q.vao.draw(ae.LINES,Q.lineVertexCount,Q.vertexCount)),Q.vao.unbind()}}function V(H,ee,Q,Y){var X;X=Array.isArray(H)?ee=this.pointCount||ee<0)return null;var Q=this.points[ee],Y=this._selectResult;Y.index=ee;for(var X=0;X<3;++X)Y.position[X]=Y.dataCoordinate[X]=Q[X];return Y},k.highlight=function(H){if(H){var ee=H.index,Q=255&ee,Y=ee>>8&255,X=ee>>16&255;this.highlightId=[Q/255,Y/255,X/255,0]}else this.highlightId=[1,1,1,1]},k.update=function(H){if("perspective"in(H=H||{})&&(this.useOrtho=!H.perspective),"orthographic"in H&&(this.useOrtho=!!H.orthographic),"lineWidth"in H&&(this.lineWidth=H.lineWidth),"project"in H)if(Array.isArray(H.project))this.axesProject=H.project;else{var ee=!!H.project;this.axesProject=[ee,ee,ee]}if("projectScale"in H)if(Array.isArray(H.projectScale))this.projectScale=H.projectScale.slice();else{var Q=+H.projectScale;this.projectScale=[Q,Q,Q]}if(this.projectHasAlpha=!1,"projectOpacity"in H){Array.isArray(H.projectOpacity)?this.projectOpacity=H.projectOpacity.slice():(Q=+H.projectOpacity,this.projectOpacity=[Q,Q,Q]);for(var Y=0;Y<3;++Y)this.projectOpacity[Y]=g(this.projectOpacity[Y]),this.projectOpacity[Y]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in H&&(this.opacity=g(H.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var X,K,te=H.position,ae=H.font||"normal",oe=H.alignment||[0,0];if(oe.length===2)X=oe[0],K=oe[1];else for(X=[],K=[],Y=0;Y0){var be=0,Se=we,Ne=[0,0,0,1],Ye=[0,0,0,1],Ze=Array.isArray(he)&&Array.isArray(he[0]),st=Array.isArray(ye)&&Array.isArray(ye[0]);e:for(Y=0;Y0?1-Te[0][0]:It<0?1+Te[1][0]:1,Ft*=Ft>0?1-Te[0][1]:Ft<0?1+Te[1][1]:1],Nt=ue.cells||[],Je=ue.positions||[];for(ne=0;ne0){var R=c*h;x.drawBox(M-R,A-R,C+R,A+R,v),x.drawBox(M-R,L-R,C+R,L+R,v),x.drawBox(M-R,A-R,M+R,L+R,v),x.drawBox(C-R,A-R,C+R,L+R,v)}}}},a.update=function(u){u=u||{},this.innerFill=!!u.innerFill,this.outerFill=!!u.outerFill,this.innerColor=(u.innerColor||[0,0,0,.5]).slice(),this.outerColor=(u.outerColor||[0,0,0,.5]).slice(),this.borderColor=(u.borderColor||[0,0,0,1]).slice(),this.borderWidth=u.borderWidth||0,this.selectBox=(u.selectBox||this.selectBox).slice()},a.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},2611:function(f,l,t){f.exports=function(c,b){var d=b[0],v=b[1];return new u(c,i(c,d,v,{}),r.mallocUint8(d*v*4))};var i=t(4234),r=t(5306),n=t(5050),o=t(2288).nextPow2;function a(c,b,d,v,x){this.coord=[c,b],this.id=d,this.value=v,this.distance=x}function u(c,b,d){this.gl=c,this.fbo=b,this.buffer=d,this._readTimeout=null;var v=this;this._readCallback=function(){v.gl&&(b.bind(),c.readPixels(0,0,b.shape[0],b.shape[1],c.RGBA,c.UNSIGNED_BYTE,v.buffer),v._readTimeout=null)}}var p=u.prototype;Object.defineProperty(p,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(c){if(this.gl){this.fbo.shape=c;var b=this.fbo.shape[0],d=this.fbo.shape[1];if(d*b*4>this.buffer.length){r.free(this.buffer);for(var v=this.buffer=r.mallocUint8(o(d*b*4)),x=0;xx)for(d=x;dv)for(d=v;d=0){for(var G=0|B.type.charAt(B.type.length-1),N=new Array(G),j=0;j=0;)V+=1;U[O]=V}var H=new Array(x.length);function ee(){k.program=o.program(h,k._vref,k._fref,R,U);for(var Q=0;Q=0){if((A=h.charCodeAt(h.length-1)-48)<2||A>4)throw new i("","Invalid data type for attribute "+k+": "+h);a(p,c,M[0],d,A,v,k)}else{if(!(h.indexOf("mat")>=0))throw new i("","Unknown data type for attribute "+k+": "+h);var A;if((A=h.charCodeAt(h.length-1)-48)<2||A>4)throw new i("","Invalid data type for attribute "+k+": "+h);u(p,c,M,d,A,v,k)}}}return v};var i=t(9068);function r(p,c,b,d,v,x){this._gl=p,this._wrapper=c,this._index=b,this._locations=d,this._dimension=v,this._constFunc=x}var n=r.prototype;n.pointer=function(p,c,b,d){var v=this,x=v._gl,g=v._locations[v._index];x.vertexAttribPointer(g,v._dimension,p||x.FLOAT,!!c,b||0,d||0),x.enableVertexAttribArray(g)},n.set=function(p,c,b,d){return this._constFunc(this._locations[this._index],p,c,b,d)},Object.defineProperty(n,"location",{get:function(){return this._locations[this._index]},set:function(p){return p!==this._locations[this._index]&&(this._locations[this._index]=0|p,this._wrapper.program=null),0|p}});var o=[function(p,c,b){return b.length===void 0?p.vertexAttrib1f(c,b):p.vertexAttrib1fv(c,b)},function(p,c,b,d){return b.length===void 0?p.vertexAttrib2f(c,b,d):p.vertexAttrib2fv(c,b)},function(p,c,b,d,v){return b.length===void 0?p.vertexAttrib3f(c,b,d,v):p.vertexAttrib3fv(c,b)},function(p,c,b,d,v,x){return b.length===void 0?p.vertexAttrib4f(c,b,d,v,x):p.vertexAttrib4fv(c,b)}];function a(p,c,b,d,v,x,g){var m=o[v],k=new r(p,c,b,d,v,m);Object.defineProperty(x,g,{set:function(h){return p.disableVertexAttribArray(d[b]),m(p,d[b],h),h},get:function(){return k},enumerable:!0})}function u(p,c,b,d,v,x,g){for(var m=new Array(v),k=new Array(v),h=0;h4)throw new r("","Invalid uniform dimension type for matrix "+name+": "+N);a["uniformMatrix"+G+"fv"](c[L],!1,O);break}throw new r("","Unknown uniform data type for "+name+": "+N)}if((G=N.charCodeAt(N.length-1)-48)<2||G>4)throw new r("","Invalid data type");switch(N.charAt(0)){case"b":case"i":a["uniform"+G+"iv"](c[L],O);break;case"v":a["uniform"+G+"fv"](c[L],O);break;default:throw new r("","Unrecognized data type for vector "+name+": "+N)}}}}}}function d(m,k){if(typeof k!="object")return[[m,k]];var h=[];for(var M in k){var A=k[M],C=m;parseInt(M)+""===M?C+="["+M+"]":C+="."+M,typeof A=="object"?h.push.apply(h,d(C,A)):h.push([C,A])}return h}function v(m,k,h){if(typeof h=="object"){var M=x(h);Object.defineProperty(m,k,{get:n(M),set:b(h),enumerable:!0,configurable:!1})}else c[h]?Object.defineProperty(m,k,{get:(A=h,function(C,L,O){return C.getUniform(L.program,O[A])}),set:b(h),enumerable:!0,configurable:!1}):m[k]=function(C){switch(C){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":case"float":return 0;default:var L=C.indexOf("vec");if(0<=L&&L<=1&&C.length===4+L){if((O=C.charCodeAt(C.length-1)-48)<2||O>4)throw new r("","Invalid data type");return C.charAt(0)==="b"?o(O,!1):o(O,0)}if(C.indexOf("mat")===0&&C.length===4){var O;if((O=C.charCodeAt(C.length-1)-48)<2||O>4)throw new r("","Invalid uniform dimension type for matrix "+name+": "+C);return o(O*O,0)}throw new r("","Unknown uniform data type for "+name+": "+C)}}(p[h].type);var A}function x(m){var k;if(Array.isArray(m)){k=new Array(m.length);for(var h=0;h1){u[0]in o||(o[u[0]]=[]),o=o[u[0]];for(var p=1;p1)for(var d=0;d"u"?t(4037):WeakMap),o=0;function a(b,d,v,x,g,m,k){this.id=b,this.src=d,this.type=v,this.shader=x,this.count=m,this.programs=[],this.cache=k}function u(b){this.gl=b,this.shaders=[{},{}],this.programs={}}a.prototype.dispose=function(){if(--this.count==0){for(var b=this.cache,d=b.gl,v=this.programs,x=0,g=v.length;x0){var R=c*h;x.drawBox(M-R,A-R,C+R,A+R,v),x.drawBox(M-R,L-R,C+R,L+R,v),x.drawBox(M-R,A-R,M+R,L+R,v),x.drawBox(C-R,A-R,C+R,L+R,v)}}}},a.update=function(u){u=u||{},this.innerFill=!!u.innerFill,this.outerFill=!!u.outerFill,this.innerColor=(u.innerColor||[0,0,0,.5]).slice(),this.outerColor=(u.outerColor||[0,0,0,.5]).slice(),this.borderColor=(u.borderColor||[0,0,0,1]).slice(),this.borderWidth=u.borderWidth||0,this.selectBox=(u.selectBox||this.selectBox).slice()},a.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},2611:function(f,l,t){f.exports=function(c,b){var d=b[0],v=b[1];return new u(c,i(c,d,v,{}),r.mallocUint8(d*v*4))};var i=t(4234),r=t(5306),n=t(5050),o=t(2288).nextPow2;function a(c,b,d,v,x){this.coord=[c,b],this.id=d,this.value=v,this.distance=x}function u(c,b,d){this.gl=c,this.fbo=b,this.buffer=d,this._readTimeout=null;var v=this;this._readCallback=function(){v.gl&&(b.bind(),c.readPixels(0,0,b.shape[0],b.shape[1],c.RGBA,c.UNSIGNED_BYTE,v.buffer),v._readTimeout=null)}}var p=u.prototype;Object.defineProperty(p,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(c){if(this.gl){this.fbo.shape=c;var b=this.fbo.shape[0],d=this.fbo.shape[1];if(d*b*4>this.buffer.length){r.free(this.buffer);for(var v=this.buffer=r.mallocUint8(o(d*b*4)),x=0;xx)for(d=x;dv)for(d=v;d=0){for(var G=0|B.type.charAt(B.type.length-1),N=new Array(G),j=0;j=0;)V+=1;U[O]=V}var H=new Array(x.length);function ee(){k.program=o.program(h,k._vref,k._fref,R,U);for(var Q=0;Q=0){if((A=h.charCodeAt(h.length-1)-48)<2||A>4)throw new i("","Invalid data type for attribute "+k+": "+h);a(p,c,M[0],d,A,v,k)}else{if(!(h.indexOf("mat")>=0))throw new i("","Unknown data type for attribute "+k+": "+h);var A;if((A=h.charCodeAt(h.length-1)-48)<2||A>4)throw new i("","Invalid data type for attribute "+k+": "+h);u(p,c,M,d,A,v,k)}}}return v};var i=t(9068);function r(p,c,b,d,v,x){this._gl=p,this._wrapper=c,this._index=b,this._locations=d,this._dimension=v,this._constFunc=x}var n=r.prototype;n.pointer=function(p,c,b,d){var v=this,x=v._gl,g=v._locations[v._index];x.vertexAttribPointer(g,v._dimension,p||x.FLOAT,!!c,b||0,d||0),x.enableVertexAttribArray(g)},n.set=function(p,c,b,d){return this._constFunc(this._locations[this._index],p,c,b,d)},Object.defineProperty(n,"location",{get:function(){return this._locations[this._index]},set:function(p){return p!==this._locations[this._index]&&(this._locations[this._index]=0|p,this._wrapper.program=null),0|p}});var o=[function(p,c,b){return b.length===void 0?p.vertexAttrib1f(c,b):p.vertexAttrib1fv(c,b)},function(p,c,b,d){return b.length===void 0?p.vertexAttrib2f(c,b,d):p.vertexAttrib2fv(c,b)},function(p,c,b,d,v){return b.length===void 0?p.vertexAttrib3f(c,b,d,v):p.vertexAttrib3fv(c,b)},function(p,c,b,d,v,x){return b.length===void 0?p.vertexAttrib4f(c,b,d,v,x):p.vertexAttrib4fv(c,b)}];function a(p,c,b,d,v,x,g){var y=o[v],k=new r(p,c,b,d,v,y);Object.defineProperty(x,g,{set:function(h){return p.disableVertexAttribArray(d[b]),y(p,d[b],h),h},get:function(){return k},enumerable:!0})}function u(p,c,b,d,v,x,g){for(var y=new Array(v),k=new Array(v),h=0;h4)throw new r("","Invalid uniform dimension type for matrix "+name+": "+N);a["uniformMatrix"+G+"fv"](c[L],!1,O);break}throw new r("","Unknown uniform data type for "+name+": "+N)}if((G=N.charCodeAt(N.length-1)-48)<2||G>4)throw new r("","Invalid data type");switch(N.charAt(0)){case"b":case"i":a["uniform"+G+"iv"](c[L],O);break;case"v":a["uniform"+G+"fv"](c[L],O);break;default:throw new r("","Unrecognized data type for vector "+name+": "+N)}}}}}}function d(y,k){if(typeof k!="object")return[[y,k]];var h=[];for(var M in k){var A=k[M],C=y;parseInt(M)+""===M?C+="["+M+"]":C+="."+M,typeof A=="object"?h.push.apply(h,d(C,A)):h.push([C,A])}return h}function v(y,k,h){if(typeof h=="object"){var M=x(h);Object.defineProperty(y,k,{get:n(M),set:b(h),enumerable:!0,configurable:!1})}else c[h]?Object.defineProperty(y,k,{get:(A=h,function(C,L,O){return C.getUniform(L.program,O[A])}),set:b(h),enumerable:!0,configurable:!1}):y[k]=function(C){switch(C){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":case"float":return 0;default:var L=C.indexOf("vec");if(0<=L&&L<=1&&C.length===4+L){if((O=C.charCodeAt(C.length-1)-48)<2||O>4)throw new r("","Invalid data type");return C.charAt(0)==="b"?o(O,!1):o(O,0)}if(C.indexOf("mat")===0&&C.length===4){var O;if((O=C.charCodeAt(C.length-1)-48)<2||O>4)throw new r("","Invalid uniform dimension type for matrix "+name+": "+C);return o(O*O,0)}throw new r("","Unknown uniform data type for "+name+": "+C)}}(p[h].type);var A}function x(y){var k;if(Array.isArray(y)){k=new Array(y.length);for(var h=0;h1){u[0]in o||(o[u[0]]=[]),o=o[u[0]];for(var p=1;p1)for(var d=0;d"u"?t(4037):WeakMap),o=0;function a(b,d,v,x,g,y,k){this.id=b,this.src=d,this.type=v,this.shader=x,this.count=y,this.programs=[],this.cache=k}function u(b){this.gl=b,this.shaders=[{},{}],this.programs={}}a.prototype.dispose=function(){if(--this.count==0){for(var b=this.cache,d=b.gl,v=this.programs,x=0,g=v.length;xd)return v-1}return v},a=function(b,d,v){return bv?v:b},u=function(b){var d=1/0;b.sort(function(m,k){return m-k});for(var v=b.length,x=1;xTe-1||Se>Ee-1||Ne>Ue-1)return i.create();var Ye,Ze,st,ot,ft,yt,Et=Ce[0][De],Tt=Ce[0][be],xt=Ce[1][je],Dt=Ce[1][Se],It=Ce[2][ge],Ft=(ne-Et)/(Tt-Et),qt=(ue-xt)/(Dt-xt),Nt=(me-It)/(Ce[2][Ne]-It);switch(isFinite(Ft)||(Ft=.5),isFinite(qt)||(qt=.5),isFinite(Nt)||(Nt=.5),Ae.reversedX&&(De=Te-1-De,be=Te-1-be),Ae.reversedY&&(je=Ee-1-je,Se=Ee-1-Se),Ae.reversedZ&&(ge=Ue-1-ge,Ne=Ue-1-Ne),Ae.filled){case 5:ft=ge,yt=Ne,st=je*Ue,ot=Se*Ue,Ye=De*Ue*Ee,Ze=be*Ue*Ee;break;case 4:ft=ge,yt=Ne,Ye=De*Ue,Ze=be*Ue,st=je*Ue*Te,ot=Se*Ue*Te;break;case 3:st=je,ot=Se,ft=ge*Ee,yt=Ne*Ee,Ye=De*Ee*Ue,Ze=be*Ee*Ue;break;case 2:st=je,ot=Se,Ye=De*Ee,Ze=be*Ee,ft=ge*Ee*Te,yt=Ne*Ee*Te;break;case 1:Ye=De,Ze=be,ft=ge*Te,yt=Ne*Te,st=je*Te*Ue,ot=Se*Te*Ue;break;default:Ye=De,Ze=be,st=je*Te,ot=Se*Te,ft=ge*Te*Ee,yt=Ne*Te*Ee}var Je=Me[Ye+st+ft],Ke=Me[Ye+st+yt],Ge=Me[Ye+ot+ft],nt=Me[Ye+ot+yt],ht=Me[Ze+st+ft],Oe=Me[Ze+st+yt],Be=Me[Ze+ot+ft],Qe=Me[Ze+ot+yt],ut=i.create(),pt=i.create(),bt=i.create(),Lt=i.create();i.lerp(ut,Je,ht,Ft),i.lerp(pt,Ke,Oe,Ft),i.lerp(bt,Ge,Be,Ft),i.lerp(Lt,nt,Qe,Ft);var Ct=i.create(),mt=i.create();i.lerp(Ct,ut,bt,qt),i.lerp(mt,pt,Lt,qt);var Ot=i.create();return i.lerp(Ot,Ct,mt,Nt),Ot}(xe,b,h)},A=b.getDivergence||function(xe,Re){var we=i.create(),Ae=1e-4;i.add(we,xe,[Ae,0,0]);var Me=M(we);i.subtract(Me,Me,Re),i.scale(Me,Me,1/Ae),i.add(we,xe,[0,Ae,0]);var Ce=M(we);i.subtract(Ce,Ce,Re),i.scale(Ce,Ce,1/Ae),i.add(we,xe,[0,0,Ae]);var ne=M(we);return i.subtract(ne,ne,Re),i.scale(ne,ne,1/Ae),i.add(we,Me,Ce),i.add(we,we,ne),we},C=[],L=d[0][0],O=d[0][1],I=d[0][2],R=d[1][0],U=d[1][1],B=d[1][2],G=function(xe){var Re=xe[0],we=xe[1],Ae=xe[2];return!(ReR||weU||AeB)},N=10*i.distance(d[0],d[1])/x,j=N*N,V=1,H=0,ee=v.length;ee>1&&(V=function(xe){for(var Re=[],we=[],Ae=[],Me={},Ce={},ne={},ue=xe.length,me=0;meH&&(H=fe),oe.push(fe),C.push({points:Y,velocities:K,divergences:oe});for(var ye=0;ye<100*x&&Y.lengthj&&i.scale(pe,pe,N/Math.sqrt(de)),i.add(pe,pe,X),te=M(pe),i.squaredDistance(ae,pe)-j>-1e-4*j&&(Y.push(pe),ae=pe,K.push(te),se=A(pe,te),fe=i.length(se),isFinite(fe)&&fe>H&&(H=fe),oe.push(fe)),X=pe}}var he=function(xe,Re,we,Ae){for(var Me=0,Ce=0;Ce0)for(ut=0;ut<8;ut++){var pt=(ut+1)%8;xt.push(Ft[ut],qt[ut],qt[pt],qt[pt],Ft[pt],Ft[ut]),It.push(nt,Ge,Ge,Ge,nt,nt),Nt.push(Je,Ke,Ke,Ke,Je,Je);var bt=xt.length;Dt.push([bt-6,bt-5,bt-4],[bt-3,bt-2,bt-1])}var Lt=Ft;Ft=qt,qt=Lt;var Ct=nt;nt=Ge,Ge=Ct;var mt=Je;Je=Ke,Ke=mt}return{positions:xt,cells:Dt,vectors:It,vertexIntensity:Nt}}(Ye,we,Ae,Me)}),Te=[],Ee=[],Ue=[],De=[];for(Ce=0;Ced)return v-1}return v},a=function(b,d,v){return bv?v:b},u=function(b){var d=1/0;b.sort(function(y,k){return y-k});for(var v=b.length,x=1;xTe-1||Se>Ee-1||Ne>Ue-1)return i.create();var Ye,Ze,st,ot,ft,yt,Et=Ce[0][De],Tt=Ce[0][be],xt=Ce[1][je],Dt=Ce[1][Se],It=Ce[2][ge],Ft=(ne-Et)/(Tt-Et),qt=(ue-xt)/(Dt-xt),Nt=(me-It)/(Ce[2][Ne]-It);switch(isFinite(Ft)||(Ft=.5),isFinite(qt)||(qt=.5),isFinite(Nt)||(Nt=.5),Ae.reversedX&&(De=Te-1-De,be=Te-1-be),Ae.reversedY&&(je=Ee-1-je,Se=Ee-1-Se),Ae.reversedZ&&(ge=Ue-1-ge,Ne=Ue-1-Ne),Ae.filled){case 5:ft=ge,yt=Ne,st=je*Ue,ot=Se*Ue,Ye=De*Ue*Ee,Ze=be*Ue*Ee;break;case 4:ft=ge,yt=Ne,Ye=De*Ue,Ze=be*Ue,st=je*Ue*Te,ot=Se*Ue*Te;break;case 3:st=je,ot=Se,ft=ge*Ee,yt=Ne*Ee,Ye=De*Ee*Ue,Ze=be*Ee*Ue;break;case 2:st=je,ot=Se,Ye=De*Ee,Ze=be*Ee,ft=ge*Ee*Te,yt=Ne*Ee*Te;break;case 1:Ye=De,Ze=be,ft=ge*Te,yt=Ne*Te,st=je*Te*Ue,ot=Se*Te*Ue;break;default:Ye=De,Ze=be,st=je*Te,ot=Se*Te,ft=ge*Te*Ee,yt=Ne*Te*Ee}var Je=Me[Ye+st+ft],Ke=Me[Ye+st+yt],Ge=Me[Ye+ot+ft],nt=Me[Ye+ot+yt],ht=Me[Ze+st+ft],Oe=Me[Ze+st+yt],Be=Me[Ze+ot+ft],Qe=Me[Ze+ot+yt],ut=i.create(),pt=i.create(),bt=i.create(),Lt=i.create();i.lerp(ut,Je,ht,Ft),i.lerp(pt,Ke,Oe,Ft),i.lerp(bt,Ge,Be,Ft),i.lerp(Lt,nt,Qe,Ft);var Ct=i.create(),mt=i.create();i.lerp(Ct,ut,bt,qt),i.lerp(mt,pt,Lt,qt);var Ot=i.create();return i.lerp(Ot,Ct,mt,Nt),Ot}(ye,b,h)},A=b.getDivergence||function(ye,Re){var we=i.create(),Ae=1e-4;i.add(we,ye,[Ae,0,0]);var Me=M(we);i.subtract(Me,Me,Re),i.scale(Me,Me,1/Ae),i.add(we,ye,[0,Ae,0]);var Ce=M(we);i.subtract(Ce,Ce,Re),i.scale(Ce,Ce,1/Ae),i.add(we,ye,[0,0,Ae]);var ne=M(we);return i.subtract(ne,ne,Re),i.scale(ne,ne,1/Ae),i.add(we,Me,Ce),i.add(we,we,ne),we},C=[],L=d[0][0],O=d[0][1],I=d[0][2],R=d[1][0],U=d[1][1],B=d[1][2],G=function(ye){var Re=ye[0],we=ye[1],Ae=ye[2];return!(ReR||weU||AeB)},N=10*i.distance(d[0],d[1])/x,j=N*N,V=1,H=0,ee=v.length;ee>1&&(V=function(ye){for(var Re=[],we=[],Ae=[],Me={},Ce={},ne={},ue=ye.length,me=0;meH&&(H=fe),oe.push(fe),C.push({points:X,velocities:K,divergences:oe});for(var xe=0;xe<100*x&&X.lengthj&&i.scale(he,he,N/Math.sqrt(de)),i.add(he,he,Y),te=M(he),i.squaredDistance(ae,he)-j>-1e-4*j&&(X.push(he),ae=he,K.push(te),se=A(he,te),fe=i.length(se),isFinite(fe)&&fe>H&&(H=fe),oe.push(fe)),Y=he}}var pe=function(ye,Re,we,Ae){for(var Me=0,Ce=0;Ce0)for(ut=0;ut<8;ut++){var pt=(ut+1)%8;xt.push(Ft[ut],qt[ut],qt[pt],qt[pt],Ft[pt],Ft[ut]),It.push(nt,Ge,Ge,Ge,nt,nt),Nt.push(Je,Ke,Ke,Ke,Je,Je);var bt=xt.length;Dt.push([bt-6,bt-5,bt-4],[bt-3,bt-2,bt-1])}var Lt=Ft;Ft=qt,qt=Lt;var Ct=nt;nt=Ge,Ge=Ct;var mt=Je;Je=Ke,Ke=mt}return{positions:xt,cells:Dt,vectors:It,vertexIntensity:Nt}}(Ye,we,Ae,Me)}),Te=[],Ee=[],Ue=[],De=[];for(Ce=0;Cehe&&Re>0){var we=(xe[Re][0]-he)/(xe[Re][0]-xe[Re-1][0]);return xe[Re][1]*(1-we)+we*xe[Re-1][1]}}return 1}(pe/255,oe):ye[3];return de<1&&(se=!0),[ye[0],ye[1],ye[2],255*de]})]);return p.divseq(fe,255),this.hasAlphaScale=se,fe},B.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},B.isOpaque=function(){return!this.isTransparent()},B.pickSlots=1,B.setPickBase=function(ae){this.pickId=ae};var G=[0,0,0],N={showSurface:!1,showContour:!1,projections:[L.slice(),L.slice(),L.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function j(ae,oe){var se,fe,ye,pe=oe.axes&&oe.axes.lastCubeProps.axis||G,de=oe.showSurface,he=oe.showContour;for(se=0;se<3;++se)for(de=de||oe.surfaceProject[se],fe=0;fe<3;++fe)he=he||oe.contourProject[se][fe];for(se=0;se<3;++se){var xe=N.projections[se];for(fe=0;fe<16;++fe)xe[fe]=0;for(fe=0;fe<4;++fe)xe[5*fe]=1;xe[5*se]=0,xe[12+se]=oe.axesBounds[+(pe[se]>0)][se],v(xe,ae.model,xe);var Re=N.clipBounds[se];for(ye=0;ye<2;++ye)for(fe=0;fe<3;++fe)Re[ye][fe]=ae.clipBounds[ye][fe];Re[0][se]=-1e8,Re[1][se]=1e8}return N.showSurface=de,N.showContour=he,N}var V={model:L,view:L,projection:L,inverseModel:L.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},H=L.slice(),ee=[1,0,0,0,1,0,0,0,1];function Q(ae,oe){ae=ae||{};var se=this.gl;se.disable(se.CULL_FACE),this._colorMap.bind(0);var fe=V;fe.model=ae.model||L,fe.view=ae.view||L,fe.projection=ae.projection||L,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=x(fe.inverseModel,fe.model);for(var ye=0;ye<2;++ye)for(var pe=fe.clipBounds[ye],de=0;de<3;++de)pe[de]=Math.min(Math.max(this.clipBounds[ye][de],-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=ee,fe.vertexColor=this.vertexColor;var he=H;for(v(he,fe.view,fe.model),v(he,fe.projection,he),x(he,he),ye=0;ye<3;++ye)fe.eyePosition[ye]=he[12+ye]/he[15];var xe=he[15];for(ye=0;ye<3;++ye)xe+=this.lightPosition[ye]*he[4*ye+3];for(ye=0;ye<3;++ye){var Re=he[12+ye];for(de=0;de<3;++de)Re+=he[4*de+ye]*this.lightPosition[de];fe.lightPosition[ye]=Re/xe}var we=j(fe,this);if(we.showSurface){for(this._shader.bind(),this._shader.uniforms=fe,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(se.TRIANGLES,this._vertexCount),ye=0;ye<3;++ye)this.surfaceProject[ye]&&this.vertexCount&&(this._shader.uniforms.model=we.projections[ye],this._shader.uniforms.clipBounds=we.clipBounds[ye],this._vao.draw(se.TRIANGLES,this._vertexCount));this._vao.unbind()}if(we.showContour){var Ae=this._contourShader;fe.kambient=1,fe.kdiffuse=0,fe.kspecular=0,fe.opacity=1,Ae.bind(),Ae.uniforms=fe;var Me=this._contourVAO;for(Me.bind(),ye=0;ye<3;++ye)for(Ae.uniforms.permutation=I[ye],se.lineWidth(this.contourWidth[ye]*this.pixelRatio),de=0;de>4)/16)/255,ye=Math.floor(fe),pe=fe-ye,de=oe[1]*(ae.value[1]+(15&ae.value[2])/16)/255,he=Math.floor(de),xe=de-he;ye+=1,he+=1;var Re=se.position;Re[0]=Re[1]=Re[2]=0;for(var we=0;we<2;++we)for(var Ae=we?pe:1-pe,Me=0;Me<2;++Me)for(var Ce=ye+we,ne=he+Me,ue=Ae*(Me?xe:1-xe),me=0;me<3;++me)Re[me]+=this._field[me].get(Ce,ne)*ue;for(var Te=this._pickResult.level,Ee=0;Ee<3;++Ee)if(Te[Ee]=g.le(this.contourLevels[Ee],Re[Ee]),Te[Ee]<0)this.contourLevels[Ee].length>0&&(Te[Ee]=0);else if(Te[Ee]Math.abs(De-Re[Ee])&&(Te[Ee]+=1)}for(se.index[0]=pe<.5?ye:ye+1,se.index[1]=xe<.5?he:he+1,se.uv[0]=fe/oe[0],se.uv[1]=de/oe[1],me=0;me<3;++me)se.dataCoordinate[me]=this._field[me].get(se.index[0],se.index[1]);return se},B.padField=function(ae,oe){var se=oe.shape.slice(),fe=ae.shape.slice();p.assign(ae.lo(1,1).hi(se[0],se[1]),oe),p.assign(ae.lo(1).hi(se[0],1),oe.hi(se[0],1)),p.assign(ae.lo(1,fe[1]-1).hi(se[0],1),oe.lo(0,se[1]-1).hi(se[0],1)),p.assign(ae.lo(0,1).hi(1,se[1]),oe.hi(1)),p.assign(ae.lo(fe[0]-1,1).hi(1,se[1]),oe.lo(se[0]-1)),ae.set(0,0,oe.get(0,0)),ae.set(0,fe[1]-1,oe.get(0,se[1]-1)),ae.set(fe[0]-1,0,oe.get(se[0]-1,0)),ae.set(fe[0]-1,fe[1]-1,oe.get(se[0]-1,se[1]-1))},B.update=function(ae){ae=ae||{},this.objectOffset=ae.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in ae&&(this.contourWidth=Y(ae.contourWidth,Number)),"showContour"in ae&&(this.showContour=Y(ae.showContour,Boolean)),"showSurface"in ae&&(this.showSurface=!!ae.showSurface),"contourTint"in ae&&(this.contourTint=Y(ae.contourTint,Boolean)),"contourColor"in ae&&(this.contourColor=te(ae.contourColor)),"contourProject"in ae&&(this.contourProject=Y(ae.contourProject,function(wn){return Y(wn,Boolean)})),"surfaceProject"in ae&&(this.surfaceProject=ae.surfaceProject),"dynamicColor"in ae&&(this.dynamicColor=te(ae.dynamicColor)),"dynamicTint"in ae&&(this.dynamicTint=Y(ae.dynamicTint,Number)),"dynamicWidth"in ae&&(this.dynamicWidth=Y(ae.dynamicWidth,Number)),"opacity"in ae&&(this.opacity=ae.opacity),"opacityscale"in ae&&(this.opacityscale=ae.opacityscale),"colorBounds"in ae&&(this.colorBounds=ae.colorBounds),"vertexColor"in ae&&(this.vertexColor=ae.vertexColor?1:0),"colormap"in ae&&this._colorMap.setPixels(this.genColormap(ae.colormap,this.opacityscale));var oe=ae.field||ae.coords&&ae.coords[2]||null,se=!1;if(oe||(oe=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),"field"in ae||"coords"in ae){var fe=(oe.shape[0]+2)*(oe.shape[1]+2);fe>this._field[2].data.length&&(a.freeFloat(this._field[2].data),this._field[2].data=a.mallocFloat(i.nextPow2(fe))),this._field[2]=b(this._field[2].data,[oe.shape[0]+2,oe.shape[1]+2]),this.padField(this._field[2],oe),this.shape=oe.shape.slice();for(var ye=this.shape,pe=0;pe<2;++pe)this._field[2].size>this._field[pe].data.length&&(a.freeFloat(this._field[pe].data),this._field[pe].data=a.mallocFloat(this._field[2].size)),this._field[pe]=b(this._field[pe].data,[ye[0]+2,ye[1]+2]);if(ae.coords){var de=ae.coords;if(!Array.isArray(de)||de.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(pe=0;pe<2;++pe){var he=de[pe];for(Me=0;Me<2;++Me)if(he.shape[Me]!==ye[Me])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[pe],he)}}else if(ae.ticks){var xe=ae.ticks;if(!Array.isArray(xe)||xe.length!==2)throw new Error("gl-surface: invalid ticks");for(pe=0;pe<2;++pe){var Re=xe[pe];if((Array.isArray(Re)||Re.length)&&(Re=b(Re)),Re.shape[0]!==ye[pe])throw new Error("gl-surface: invalid tick length");var we=b(Re.data,ye);we.stride[pe]=Re.stride[0],we.stride[1^pe]=0,this.padField(this._field[pe],we)}}else{for(pe=0;pe<2;++pe){var Ae=[0,0];Ae[pe]=1,this._field[pe]=b(this._field[pe].data,[ye[0]+2,ye[1]+2],Ae,0)}this._field[0].set(0,0,0);for(var Me=0;Me0){for(var kn=0;kn<5;++kn)ht.pop();Tt-=1}continue e}ht.push(pt[0],pt[1],Ct[0],Ct[1],pt[2]),Tt+=1}}ut.push(Tt)}this._contourOffsets[Oe]=Qe,this._contourCounts[Oe]=ut}var Wn=a.mallocFloat(ht.length);for(pe=0;peI||L<0||L>I)throw new Error("gl-texture2d: Invalid texture size");return A._shape=[C,L],A.bind(),O.texImage2D(O.TEXTURE_2D,0,A.format,C,L,0,A.format,A.type,null),A._mipLevels=[0],A}function v(A,C,L,O,I,R){this.gl=A,this.handle=C,this.format=I,this.type=R,this._shape=[L,O],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 U=this,B=[this._wrapS,this._wrapT];Object.defineProperties(B,[{get:function(){return U._wrapS},set:function(N){return U.wrapS=N}},{get:function(){return U._wrapT},set:function(N){return U.wrapT=N}}]),this._wrapVector=B;var G=[this._shape[0],this._shape[1]];Object.defineProperties(G,[{get:function(){return U._shape[0]},set:function(N){return U.width=N}},{get:function(){return U._shape[1]},set:function(N){return U.height=N}}]),this._shapeVector=G}var x=v.prototype;function g(A,C){return A.length===3?C[2]===1&&C[1]===A[0]*A[2]&&C[0]===A[2]:C[0]===1&&C[1]===A[0]}function m(A){var C=A.createTexture();return A.bindTexture(A.TEXTURE_2D,C),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),C}function k(A,C,L,O,I){var R=A.getParameter(A.MAX_TEXTURE_SIZE);if(C<0||C>R||L<0||L>R)throw new Error("gl-texture2d: Invalid texture shape");if(I===A.FLOAT&&!A.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var U=m(A);return A.texImage2D(A.TEXTURE_2D,0,O,C,L,0,O,I,null),new v(A,U,C,L,O,I)}function h(A,C,L,O,I,R){var U=m(A);return A.texImage2D(A.TEXTURE_2D,0,I,I,R,C),new v(A,U,L,O,I,R)}function M(A,C){var L=C.dtype,O=C.shape.slice(),I=A.getParameter(A.MAX_TEXTURE_SIZE);if(O[0]<0||O[0]>I||O[1]<0||O[1]>I)throw new Error("gl-texture2d: Invalid texture size");var R=g(O,C.stride.slice()),U=0;L==="float32"?U=A.FLOAT:L==="float64"?(U=A.FLOAT,R=!1,L="float32"):L==="uint8"?U=A.UNSIGNED_BYTE:(U=A.UNSIGNED_BYTE,R=!1,L="uint8");var B,G,N=0;if(O.length===2)N=A.LUMINANCE,O=[O[0],O[1],1],C=i(C.data,O,[C.stride[0],C.stride[1],1],C.offset);else{if(O.length!==3)throw new Error("gl-texture2d: Invalid shape for texture");if(O[2]===1)N=A.ALPHA;else if(O[2]===2)N=A.LUMINANCE_ALPHA;else if(O[2]===3)N=A.RGB;else{if(O[2]!==4)throw new Error("gl-texture2d: Invalid shape for pixel coords");N=A.RGBA}}U!==A.FLOAT||A.getExtension("OES_texture_float")||(U=A.UNSIGNED_BYTE,R=!1);var j=C.size;if(R)B=C.offset===0&&C.data.length===j?C.data:C.data.subarray(C.offset,C.offset+j);else{var V=[O[2],O[2]*O[0],1];G=n.malloc(j,L);var H=i(G,O,V,0);L!=="float32"&&L!=="float64"||U!==A.UNSIGNED_BYTE?r.assign(H,C):b(H,C),B=G.subarray(0,j)}var ee=m(A);return A.texImage2D(A.TEXTURE_2D,0,N,O[0],O[1],0,N,U,B),R||n.free(G),new v(A,ee,O[0],O[1],N,U)}Object.defineProperties(x,{minFilter:{get:function(){return this._minFilter},set:function(A){this.bind();var C=this.gl;if(this.type===C.FLOAT&&o.indexOf(A)>=0&&(C.getExtension("OES_texture_float_linear")||(A=C.NEAREST)),a.indexOf(A)<0)throw new Error("gl-texture2d: Unknown filter mode "+A);return C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MIN_FILTER,A),this._minFilter=A}},magFilter:{get:function(){return this._magFilter},set:function(A){this.bind();var C=this.gl;if(this.type===C.FLOAT&&o.indexOf(A)>=0&&(C.getExtension("OES_texture_float_linear")||(A=C.NEAREST)),a.indexOf(A)<0)throw new Error("gl-texture2d: Unknown filter mode "+A);return C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MAG_FILTER,A),this._magFilter=A}},mipSamples:{get:function(){return this._anisoSamples},set:function(A){var C=this._anisoSamples;if(this._anisoSamples=0|Math.max(A,1),C!==this._anisoSamples){var L=this.gl.getExtension("EXT_texture_filter_anisotropic");L&&this.gl.texParameterf(this.gl.TEXTURE_2D,L.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(A){if(this.bind(),u.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(),u.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 C=0;C<2;++C)if(u.indexOf(A[C])<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);this._wrapS=A[0],this._wrapT=A[1];var L=this.gl;return this.bind(),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_WRAP_S,this._wrapS),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_WRAP_T,this._wrapT),A}},shape:{get:function(){return this._shapeVector},set:function(A){if(Array.isArray(A)){if(A.length!==2)throw new Error("gl-texture2d: Invalid texture shape")}else A=[0|A,0|A];return d(this,0|A[0],0|A[1]),[0|A[0],0|A[1]]}},width:{get:function(){return this._shape[0]},set:function(A){return d(this,A|=0,this._shape[1]),A}},height:{get:function(){return this._shape[1]},set:function(A){return A|=0,d(this,this._shape[0],A),A}}}),x.bind=function(A){var C=this.gl;return A!==void 0&&C.activeTexture(C.TEXTURE0+(0|A)),C.bindTexture(C.TEXTURE_2D,this.handle),A!==void 0?0|A:C.getParameter(C.ACTIVE_TEXTURE)-C.TEXTURE0},x.dispose=function(){this.gl.deleteTexture(this.handle)},x.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var A=Math.min(this._shape[0],this._shape[1]),C=0;A>0;++C,A>>>=1)this._mipLevels.indexOf(C)<0&&this._mipLevels.push(C)},x.setPixels=function(A,C,L,O){var I=this.gl;this.bind(),Array.isArray(C)?(O=L,L=0|C[1],C=0|C[0]):(C=C||0,L=L||0),O=O||0;var R=c(A)?A:A.raw;if(R)this._mipLevels.indexOf(O)<0?(I.texImage2D(I.TEXTURE_2D,0,this.format,this.format,this.type,R),this._mipLevels.push(O)):I.texSubImage2D(I.TEXTURE_2D,O,C,L,this.format,this.type,R);else{if(!(A.shape&&A.stride&&A.data))throw new Error("gl-texture2d: Unsupported data type");if(A.shape.length<2||C+A.shape[1]>this._shape[1]>>>O||L+A.shape[0]>this._shape[0]>>>O||C<0||L<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");(function(U,B,G,N,j,V,H,ee){var Q=ee.dtype,X=ee.shape.slice();if(X.length<2||X.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var Y=0,K=0,te=g(X,ee.stride.slice());if(Q==="float32"?Y=U.FLOAT:Q==="float64"?(Y=U.FLOAT,te=!1,Q="float32"):Q==="uint8"?Y=U.UNSIGNED_BYTE:(Y=U.UNSIGNED_BYTE,te=!1,Q="uint8"),X.length===2)K=U.LUMINANCE,X=[X[0],X[1],1],ee=i(ee.data,X,[ee.stride[0],ee.stride[1],1],ee.offset);else{if(X.length!==3)throw new Error("gl-texture2d: Invalid shape for texture");if(X[2]===1)K=U.ALPHA;else if(X[2]===2)K=U.LUMINANCE_ALPHA;else if(X[2]===3)K=U.RGB;else{if(X[2]!==4)throw new Error("gl-texture2d: Invalid shape for pixel coords");K=U.RGBA}X[2]}if(K!==U.LUMINANCE&&K!==U.ALPHA||j!==U.LUMINANCE&&j!==U.ALPHA||(K=j),K!==j)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var ae=ee.size,oe=H.indexOf(N)<0;if(oe&&H.push(N),Y===V&&te)ee.offset===0&&ee.data.length===ae?oe?U.texImage2D(U.TEXTURE_2D,N,j,X[0],X[1],0,j,V,ee.data):U.texSubImage2D(U.TEXTURE_2D,N,B,G,X[0],X[1],j,V,ee.data):oe?U.texImage2D(U.TEXTURE_2D,N,j,X[0],X[1],0,j,V,ee.data.subarray(ee.offset,ee.offset+ae)):U.texSubImage2D(U.TEXTURE_2D,N,B,G,X[0],X[1],j,V,ee.data.subarray(ee.offset,ee.offset+ae));else{var se;se=V===U.FLOAT?n.mallocFloat32(ae):n.mallocUint8(ae);var fe=i(se,X,[X[2],X[2]*X[0],1]);Y===U.FLOAT&&V===U.UNSIGNED_BYTE?b(fe,ee):r.assign(fe,ee),oe?U.texImage2D(U.TEXTURE_2D,N,j,X[0],X[1],0,j,V,se.subarray(0,ae)):U.texSubImage2D(U.TEXTURE_2D,N,B,G,X[0],X[1],j,V,se.subarray(0,ae)),V===U.FLOAT?n.freeFloat32(se):n.freeUint8(se)}})(I,C,L,O,this.format,this.type,this._mipLevels,A)}}},3056:function(f){f.exports=function(l,t,i){t?t.bind():l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,null);var r=0|l.getParameter(l.MAX_VERTEX_ATTRIBS);if(i){if(i.length>r)throw new Error("gl-vao: Too many vertex attributes");for(var n=0;n1?0:Math.acos(c)};var i=t(5415),r=t(899),n=t(9305)},8827:function(f){f.exports=function(l,t){return l[0]=Math.ceil(t[0]),l[1]=Math.ceil(t[1]),l[2]=Math.ceil(t[2]),l}},7622:function(f){f.exports=function(l){var t=new Float32Array(3);return t[0]=l[0],t[1]=l[1],t[2]=l[2],t}},8782:function(f){f.exports=function(l,t){return l[0]=t[0],l[1]=t[1],l[2]=t[2],l}},8501:function(f){f.exports=function(){var l=new Float32Array(3);return l[0]=0,l[1]=0,l[2]=0,l}},903:function(f){f.exports=function(l,t,i){var r=t[0],n=t[1],o=t[2],a=i[0],u=i[1],p=i[2];return l[0]=n*p-o*u,l[1]=o*a-r*p,l[2]=r*u-n*a,l}},5981:function(f,l,t){f.exports=t(8288)},8288:function(f){f.exports=function(l,t){var i=t[0]-l[0],r=t[1]-l[1],n=t[2]-l[2];return Math.sqrt(i*i+r*r+n*n)}},8629:function(f,l,t){f.exports=t(7979)},7979:function(f){f.exports=function(l,t,i){return l[0]=t[0]/i[0],l[1]=t[1]/i[1],l[2]=t[2]/i[2],l}},9305:function(f){f.exports=function(l,t){return l[0]*t[0]+l[1]*t[1]+l[2]*t[2]}},154:function(f){f.exports=1e-6},4932:function(f,l,t){f.exports=function(r,n){var o=r[0],a=r[1],u=r[2],p=n[0],c=n[1],b=n[2];return Math.abs(o-p)<=i*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(a-c)<=i*Math.max(1,Math.abs(a),Math.abs(c))&&Math.abs(u-b)<=i*Math.max(1,Math.abs(u),Math.abs(b))};var i=t(154)},5777:function(f){f.exports=function(l,t){return l[0]===t[0]&&l[1]===t[1]&&l[2]===t[2]}},3306:function(f){f.exports=function(l,t){return l[0]=Math.floor(t[0]),l[1]=Math.floor(t[1]),l[2]=Math.floor(t[2]),l}},7447:function(f,l,t){f.exports=function(r,n,o,a,u,p){var c,b;for(n||(n=3),o||(o=0),b=a?Math.min(a*n+o,r.length):r.length,c=o;c0&&(o=1/Math.sqrt(o),l[0]=t[0]*o,l[1]=t[1]*o,l[2]=t[2]*o),l}},6660:function(f){f.exports=function(l,t){t=t||1;var i=2*Math.random()*Math.PI,r=2*Math.random()-1,n=Math.sqrt(1-r*r)*t;return l[0]=Math.cos(i)*n,l[1]=Math.sin(i)*n,l[2]=r*t,l}},392:function(f){f.exports=function(l,t,i,r){var n=i[1],o=i[2],a=t[1]-n,u=t[2]-o,p=Math.sin(r),c=Math.cos(r);return l[0]=t[0],l[1]=n+a*c-u*p,l[2]=o+a*p+u*c,l}},3222:function(f){f.exports=function(l,t,i,r){var n=i[0],o=i[2],a=t[0]-n,u=t[2]-o,p=Math.sin(r),c=Math.cos(r);return l[0]=n+u*p+a*c,l[1]=t[1],l[2]=o+u*c-a*p,l}},3388:function(f){f.exports=function(l,t,i,r){var n=i[0],o=i[1],a=t[0]-n,u=t[1]-o,p=Math.sin(r),c=Math.cos(r);return l[0]=n+a*c-u*p,l[1]=o+a*p+u*c,l[2]=t[2],l}},1624:function(f){f.exports=function(l,t){return l[0]=Math.round(t[0]),l[1]=Math.round(t[1]),l[2]=Math.round(t[2]),l}},5685:function(f){f.exports=function(l,t,i){return l[0]=t[0]*i,l[1]=t[1]*i,l[2]=t[2]*i,l}},6722:function(f){f.exports=function(l,t,i,r){return l[0]=t[0]+i[0]*r,l[1]=t[1]+i[1]*r,l[2]=t[2]+i[2]*r,l}},831:function(f){f.exports=function(l,t,i,r){return l[0]=t,l[1]=i,l[2]=r,l}},5294:function(f,l,t){f.exports=t(6403)},3303:function(f,l,t){f.exports=t(4337)},6403:function(f){f.exports=function(l,t){var i=t[0]-l[0],r=t[1]-l[1],n=t[2]-l[2];return i*i+r*r+n*n}},4337:function(f){f.exports=function(l){var t=l[0],i=l[1],r=l[2];return t*t+i*i+r*r}},8921:function(f,l,t){f.exports=t(911)},911:function(f){f.exports=function(l,t,i){return l[0]=t[0]-i[0],l[1]=t[1]-i[1],l[2]=t[2]-i[2],l}},9908:function(f){f.exports=function(l,t,i){var r=t[0],n=t[1],o=t[2];return l[0]=r*i[0]+n*i[3]+o*i[6],l[1]=r*i[1]+n*i[4]+o*i[7],l[2]=r*i[2]+n*i[5]+o*i[8],l}},3255:function(f){f.exports=function(l,t,i){var r=t[0],n=t[1],o=t[2],a=i[3]*r+i[7]*n+i[11]*o+i[15];return a=a||1,l[0]=(i[0]*r+i[4]*n+i[8]*o+i[12])/a,l[1]=(i[1]*r+i[5]*n+i[9]*o+i[13])/a,l[2]=(i[2]*r+i[6]*n+i[10]*o+i[14])/a,l}},6568:function(f){f.exports=function(l,t,i){var r=t[0],n=t[1],o=t[2],a=i[0],u=i[1],p=i[2],c=i[3],b=c*r+u*o-p*n,d=c*n+p*r-a*o,v=c*o+a*n-u*r,x=-a*r-u*n-p*o;return l[0]=b*c+x*-a+d*-p-v*-u,l[1]=d*c+x*-u+v*-a-b*-p,l[2]=v*c+x*-p+b*-u-d*-a,l}},3433:function(f){f.exports=function(l,t,i){return l[0]=t[0]+i[0],l[1]=t[1]+i[1],l[2]=t[2]+i[2],l[3]=t[3]+i[3],l}},1413:function(f){f.exports=function(l){var t=new Float32Array(4);return t[0]=l[0],t[1]=l[1],t[2]=l[2],t[3]=l[3],t}},3470:function(f){f.exports=function(l,t){return l[0]=t[0],l[1]=t[1],l[2]=t[2],l[3]=t[3],l}},5313:function(f){f.exports=function(){var l=new Float32Array(4);return l[0]=0,l[1]=0,l[2]=0,l[3]=0,l}},5446:function(f){f.exports=function(l,t){var i=t[0]-l[0],r=t[1]-l[1],n=t[2]-l[2],o=t[3]-l[3];return Math.sqrt(i*i+r*r+n*n+o*o)}},205:function(f){f.exports=function(l,t,i){return l[0]=t[0]/i[0],l[1]=t[1]/i[1],l[2]=t[2]/i[2],l[3]=t[3]/i[3],l}},4242:function(f){f.exports=function(l,t){return l[0]*t[0]+l[1]*t[1]+l[2]*t[2]+l[3]*t[3]}},5680:function(f){f.exports=function(l,t,i,r){var n=new Float32Array(4);return n[0]=l,n[1]=t,n[2]=i,n[3]=r,n}},4020:function(f,l,t){f.exports={create:t(5313),clone:t(1413),fromValues:t(5680),copy:t(3470),set:t(6453),add:t(3433),subtract:t(2705),multiply:t(746),divide:t(205),min:t(2170),max:t(3030),scale:t(5510),scaleAndAdd:t(4224),distance:t(5446),squaredDistance:t(1542),length:t(8177),squaredLength:t(9037),negate:t(6459),inverse:t(8057),normalize:t(381),dot:t(4242),lerp:t(8746),random:t(3770),transformMat4:t(6342),transformQuat:t(5022)}},8057:function(f){f.exports=function(l,t){return l[0]=1/t[0],l[1]=1/t[1],l[2]=1/t[2],l[3]=1/t[3],l}},8177:function(f){f.exports=function(l){var t=l[0],i=l[1],r=l[2],n=l[3];return Math.sqrt(t*t+i*i+r*r+n*n)}},8746:function(f){f.exports=function(l,t,i,r){var n=t[0],o=t[1],a=t[2],u=t[3];return l[0]=n+r*(i[0]-n),l[1]=o+r*(i[1]-o),l[2]=a+r*(i[2]-a),l[3]=u+r*(i[3]-u),l}},3030:function(f){f.exports=function(l,t,i){return l[0]=Math.max(t[0],i[0]),l[1]=Math.max(t[1],i[1]),l[2]=Math.max(t[2],i[2]),l[3]=Math.max(t[3],i[3]),l}},2170:function(f){f.exports=function(l,t,i){return l[0]=Math.min(t[0],i[0]),l[1]=Math.min(t[1],i[1]),l[2]=Math.min(t[2],i[2]),l[3]=Math.min(t[3],i[3]),l}},746:function(f){f.exports=function(l,t,i){return l[0]=t[0]*i[0],l[1]=t[1]*i[1],l[2]=t[2]*i[2],l[3]=t[3]*i[3],l}},6459:function(f){f.exports=function(l,t){return l[0]=-t[0],l[1]=-t[1],l[2]=-t[2],l[3]=-t[3],l}},381:function(f){f.exports=function(l,t){var i=t[0],r=t[1],n=t[2],o=t[3],a=i*i+r*r+n*n+o*o;return a>0&&(a=1/Math.sqrt(a),l[0]=i*a,l[1]=r*a,l[2]=n*a,l[3]=o*a),l}},3770:function(f,l,t){var i=t(381),r=t(5510);f.exports=function(n,o){return o=o||1,n[0]=Math.random(),n[1]=Math.random(),n[2]=Math.random(),n[3]=Math.random(),i(n,n),r(n,n,o),n}},5510:function(f){f.exports=function(l,t,i){return l[0]=t[0]*i,l[1]=t[1]*i,l[2]=t[2]*i,l[3]=t[3]*i,l}},4224:function(f){f.exports=function(l,t,i,r){return l[0]=t[0]+i[0]*r,l[1]=t[1]+i[1]*r,l[2]=t[2]+i[2]*r,l[3]=t[3]+i[3]*r,l}},6453:function(f){f.exports=function(l,t,i,r,n){return l[0]=t,l[1]=i,l[2]=r,l[3]=n,l}},1542:function(f){f.exports=function(l,t){var i=t[0]-l[0],r=t[1]-l[1],n=t[2]-l[2],o=t[3]-l[3];return i*i+r*r+n*n+o*o}},9037:function(f){f.exports=function(l){var t=l[0],i=l[1],r=l[2],n=l[3];return t*t+i*i+r*r+n*n}},2705:function(f){f.exports=function(l,t,i){return l[0]=t[0]-i[0],l[1]=t[1]-i[1],l[2]=t[2]-i[2],l[3]=t[3]-i[3],l}},6342:function(f){f.exports=function(l,t,i){var r=t[0],n=t[1],o=t[2],a=t[3];return l[0]=i[0]*r+i[4]*n+i[8]*o+i[12]*a,l[1]=i[1]*r+i[5]*n+i[9]*o+i[13]*a,l[2]=i[2]*r+i[6]*n+i[10]*o+i[14]*a,l[3]=i[3]*r+i[7]*n+i[11]*o+i[15]*a,l}},5022:function(f){f.exports=function(l,t,i){var r=t[0],n=t[1],o=t[2],a=i[0],u=i[1],p=i[2],c=i[3],b=c*r+u*o-p*n,d=c*n+p*r-a*o,v=c*o+a*n-u*r,x=-a*r-u*n-p*o;return l[0]=b*c+x*-a+d*-p-v*-u,l[1]=d*c+x*-u+v*-a-b*-p,l[2]=v*c+x*-p+b*-u-d*-a,l[3]=t[3],l}},9365:function(f,l,t){var i=t(8096),r=t(7896);f.exports=function(n){for(var o=Array.isArray(n)?n:i(n),a=0;a0)continue;ye=se.slice(0,1).join("")}return j(ye),L+=ye.length,(h=h.slice(ye.length)).length}}function K(){return/[^a-fA-F0-9]/.test(d)?(j(h.join("")),k=u,g):(h.push(d),v=d,g+1)}function te(){return d==="."||/[eE]/.test(d)?(h.push(d),k=5,v=d,g+1):d==="x"&&h.length===1&&h[0]==="0"?(k=11,h.push(d),v=d,g+1):/[^\d]/.test(d)?(j(h.join("")),k=u,g):(h.push(d),v=d,g+1)}function ae(){return d==="f"&&(h.push(d),v=d,g+=1),/[eE]/.test(d)?(h.push(d),v=d,g+1):(d!=="-"&&d!=="+"||!/[eE]/.test(v))&&/[^\d]/.test(d)?(j(h.join("")),k=u,g):(h.push(d),v=d,g+1)}function oe(){if(/[^\d\w_]/.test(d)){var se=h.join("");return k=N[se]?8:G[se]?7:6,j(h.join("")),k=u,g}return h.push(d),v=d,g+1}};var i=t(399),r=t(9746),n=t(9525),o=t(9458),a=t(3585),u=999,p=9999,c=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},3585:function(f,l,t){var i=t(9525);i=i.slice().filter(function(r){return!/^(gl\_|texture)/.test(r)}),f.exports=i.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"])},9525:function(f){f.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"]},9458:function(f,l,t){var i=t(399);f.exports=i.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"])},399:function(f){f.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"]},9746:function(f){f.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},8096:function(f,l,t){var i=t(3193);f.exports=function(r,n){var o=i(n),a=[];return(a=a.concat(o(r))).concat(o(null))}},6832:function(f){f.exports=function(l){typeof l=="string"&&(l=[l]);for(var t=[].slice.call(arguments,1),i=[],r=0;r0;)for(var h=(b=k.pop()).adjacent,M=0;M<=v;++M){var A=h[M];if(A.boundary&&!(A.lastVisited<=-x)){for(var C=A.vertices,L=0;L<=v;++L){var O=C[L];g[L]=O<0?d:m[O]}var I=this.orient();if(I>0)return A;A.lastVisited=-x,I===0&&k.push(A)}}return null},c.walk=function(b,d){var v=this.vertices.length-1,x=this.dimension,g=this.vertices,m=this.tuple,k=d?this.interior.length*Math.random()|0:this.interior.length-1,h=this.interior[k];e:for(;!h.boundary;){for(var M=h.vertices,A=h.adjacent,C=0;C<=x;++C)m[C]=g[M[C]];for(h.lastVisited=v,C=0;C<=x;++C){var L=A[C];if(!(L.lastVisited>=v)){var O=m[C];m[C]=b;var I=this.orient();if(m[C]=O,I<0){h=L;continue e}L.boundary?L.lastVisited=-v:L.lastVisited=v}}return}return h},c.addPeaks=function(b,d){var v=this.vertices.length-1,x=this.dimension,g=this.vertices,m=this.tuple,k=this.interior,h=this.simplices,M=[d];d.lastVisited=v,d.vertices[d.vertices.indexOf(-1)]=v,d.boundary=!1,k.push(d);for(var A=[];M.length>0;){var C=(d=M.pop()).vertices,L=d.adjacent,O=C.indexOf(v);if(!(O<0)){for(var I=0;I<=x;++I)if(I!==O){var R=L[I];if(R.boundary&&!(R.lastVisited>=v)){var U=R.vertices;if(R.lastVisited!==-v){for(var B=0,G=0;G<=x;++G)U[G]<0?(B=G,m[G]=b):m[G]=g[U[G]];if(this.orient()>0){U[B]=v,R.boundary=!1,k.push(R),M.push(R),R.lastVisited=v;continue}R.lastVisited=-v}var N=R.adjacent,j=C.slice(),V=L.slice(),H=new n(j,V,!0);h.push(H);var ee=N.indexOf(d);if(!(ee<0))for(N[ee]=H,V[O]=R,j[I]=-1,V[I]=d,L[I]=H,H.flip(),G=0;G<=x;++G){var Q=j[G];if(!(Q<0||Q===v)){for(var X=new Array(x-1),Y=0,K=0;K<=x;++K){var te=j[K];te<0||K===G||(X[Y++]=te)}A.push(new o(X,H,G))}}}}}}for(A.sort(a),I=0;I+1=0?k[M++]=h[C]:A=1&C;if(A===(1&b)){var L=k[0];k[0]=k[1],k[1]=L}d.push(k)}}return d}},9014:function(f,l,t){var i=t(5070);function r(M,A,C,L,O){this.mid=M,this.left=A,this.right=C,this.leftPoints=L,this.rightPoints=O,this.count=(A?A.count:0)+(C?C.count:0)+L.length}f.exports=function(M){return M&&M.length!==0?new k(m(M)):new k(null)};var n=r.prototype;function o(M,A){M.mid=A.mid,M.left=A.left,M.right=A.right,M.leftPoints=A.leftPoints,M.rightPoints=A.rightPoints,M.count=A.count}function a(M,A){var C=m(A);M.mid=C.mid,M.left=C.left,M.right=C.right,M.leftPoints=C.leftPoints,M.rightPoints=C.rightPoints,M.count=C.count}function u(M,A){var C=M.intervals([]);C.push(A),a(M,C)}function p(M,A){var C=M.intervals([]),L=C.indexOf(A);return L<0?0:(C.splice(L,1),a(M,C),1)}function c(M,A,C){for(var L=0;L=0&&M[L][1]>=A;--L){var O=C(M[L]);if(O)return O}}function d(M,A){for(var C=0;C>1],O=[],I=[],R=[];for(C=0;C3*(A+1)?u(this,M):this.left.insert(M):this.left=m([M]);else if(M[0]>this.mid)this.right?4*(this.right.count+1)>3*(A+1)?u(this,M):this.right.insert(M):this.right=m([M]);else{var C=i.ge(this.leftPoints,M,x),L=i.ge(this.rightPoints,M,g);this.leftPoints.splice(C,0,M),this.rightPoints.splice(L,0,M)}},n.remove=function(M){var A=this.count-this.leftPoints;if(M[1]3*(A-1)?p(this,M):(I=this.left.remove(M))===2?(this.left=null,this.count-=1,1):(I===1&&(this.count-=1),I):0;if(M[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(A-1)?p(this,M):(I=this.right.remove(M))===2?(this.right=null,this.count-=1,1):(I===1&&(this.count-=1),I):0;if(this.count===1)return this.leftPoints[0]===M?2:0;if(this.leftPoints.length===1&&this.leftPoints[0]===M){if(this.left&&this.right){for(var C=this,L=this.left;L.right;)C=L,L=L.right;if(C===this)L.right=this.right;else{var O=this.left,I=this.right;C.count-=L.count,C.right=L.left,L.left=O,L.right=I}o(this,L),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?o(this,this.left):o(this,this.right);return 1}for(O=i.ge(this.leftPoints,M,x);Othis.mid?this.right&&(C=this.right.queryPoint(M,A))?C:b(this.rightPoints,M,A):d(this.leftPoints,A);var C},n.queryInterval=function(M,A,C){var L;return Mthis.mid&&this.right&&(L=this.right.queryInterval(M,A,C))?L:Athis.mid?b(this.rightPoints,M,C):d(this.leftPoints,C)};var h=k.prototype;h.insert=function(M){this.root?this.root.insert(M):this.root=new r(M[0],null,null,[M],[M])},h.remove=function(M){if(this.root){var A=this.root.remove(M);return A===2&&(this.root=null),A!==0}return!1},h.queryPoint=function(M,A){if(this.root)return this.root.queryPoint(M,A)},h.queryInterval=function(M,A,C){if(M<=A&&this.root)return this.root.queryInterval(M,A,C)},Object.defineProperty(h,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(h,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},9560:function(f){f.exports=function(l){for(var t=new Array(l),i=0;i13)&&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}},3578:function(f){f.exports=function(l,t,i){return l*(1-i)+t*i}},7191:function(f,l,t){var i=t(4690),r=t(9823),n=t(7332),o=t(7787),a=t(7437),u=t(2142),p={length:t(4693),normalize:t(899),dot:t(9305),cross:t(903)},c=r(),b=r(),d=[0,0,0,0],v=[[0,0,0],[0,0,0],[0,0,0]],x=[0,0,0];function g(m,k,h,M,A){m[0]=k[0]*M+h[0]*A,m[1]=k[1]*M+h[1]*A,m[2]=k[2]*M+h[2]*A}f.exports=function(m,k,h,M,A,C){if(k||(k=[0,0,0]),h||(h=[0,0,0]),M||(M=[0,0,0]),A||(A=[0,0,0,1]),C||(C=[0,0,0,1]),!i(c,m)||(n(b,c),b[3]=0,b[7]=0,b[11]=0,b[15]=1,Math.abs(o(b)<1e-8)))return!1;var L,O,I,R,U,B,G,N=c[3],j=c[7],V=c[11],H=c[12],ee=c[13],Q=c[14],X=c[15];if(N!==0||j!==0||V!==0){if(d[0]=N,d[1]=j,d[2]=V,d[3]=X,!a(b,b))return!1;u(b,b),L=A,I=b,R=(O=d)[0],U=O[1],B=O[2],G=O[3],L[0]=I[0]*R+I[4]*U+I[8]*B+I[12]*G,L[1]=I[1]*R+I[5]*U+I[9]*B+I[13]*G,L[2]=I[2]*R+I[6]*U+I[10]*B+I[14]*G,L[3]=I[3]*R+I[7]*U+I[11]*B+I[15]*G}else A[0]=A[1]=A[2]=0,A[3]=1;if(k[0]=H,k[1]=ee,k[2]=Q,function(K,te){K[0][0]=te[0],K[0][1]=te[1],K[0][2]=te[2],K[1][0]=te[4],K[1][1]=te[5],K[1][2]=te[6],K[2][0]=te[8],K[2][1]=te[9],K[2][2]=te[10]}(v,c),h[0]=p.length(v[0]),p.normalize(v[0],v[0]),M[0]=p.dot(v[0],v[1]),g(v[1],v[1],v[0],1,-M[0]),h[1]=p.length(v[1]),p.normalize(v[1],v[1]),M[0]/=h[1],M[1]=p.dot(v[0],v[2]),g(v[2],v[2],v[0],1,-M[1]),M[2]=p.dot(v[1],v[2]),g(v[2],v[2],v[1],1,-M[2]),h[2]=p.length(v[2]),p.normalize(v[2],v[2]),M[1]/=h[2],M[2]/=h[2],p.cross(x,v[1],v[2]),p.dot(v[0],x)<0)for(var Y=0;Y<3;Y++)h[Y]*=-1,v[Y][0]*=-1,v[Y][1]*=-1,v[Y][2]*=-1;return C[0]=.5*Math.sqrt(Math.max(1+v[0][0]-v[1][1]-v[2][2],0)),C[1]=.5*Math.sqrt(Math.max(1-v[0][0]+v[1][1]-v[2][2],0)),C[2]=.5*Math.sqrt(Math.max(1-v[0][0]-v[1][1]+v[2][2],0)),C[3]=.5*Math.sqrt(Math.max(1+v[0][0]+v[1][1]+v[2][2],0)),v[2][1]>v[1][2]&&(C[0]=-C[0]),v[0][2]>v[2][0]&&(C[1]=-C[1]),v[1][0]>v[0][1]&&(C[2]=-C[2]),!0}},4690:function(f){f.exports=function(l,t){var i=t[15];if(i===0)return!1;for(var r=1/i,n=0;n<16;n++)l[n]=t[n]*r;return!0}},7649:function(f,l,t){var i=t(1868),r=t(1102),n=t(7191),o=t(7787),a=t(1116),u=b(),p=b(),c=b();function b(){return{translate:d(),scale:d(1),skew:d(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function d(v){return[v||0,v||0,v||0]}f.exports=function(v,x,g,m){if(o(x)===0||o(g)===0)return!1;var k=n(x,u.translate,u.scale,u.skew,u.perspective,u.quaternion),h=n(g,p.translate,p.scale,p.skew,p.perspective,p.quaternion);return!(!k||!h||(i(c.translate,u.translate,p.translate,m),i(c.skew,u.skew,p.skew,m),i(c.scale,u.scale,p.scale,m),i(c.perspective,u.perspective,p.perspective,m),a(c.quaternion,u.quaternion,p.quaternion,m),r(v,c.translate,c.scale,c.skew,c.perspective,c.quaternion),0))}},1102:function(f,l,t){var i={identity:t(9947),translate:t(998),multiply:t(104),create:t(9823),scale:t(3668),fromRotationTranslation:t(7280)},r=(i.create(),i.create());f.exports=function(n,o,a,u,p,c){return i.identity(n),i.fromRotationTranslation(n,c,o),n[3]=p[0],n[7]=p[1],n[11]=p[2],n[15]=p[3],i.identity(r),u[2]!==0&&(r[9]=u[2],i.multiply(n,n,r)),u[1]!==0&&(r[9]=0,r[8]=u[1],i.multiply(n,n,r)),u[0]!==0&&(r[8]=0,r[4]=u[0],i.multiply(n,n,r)),i.scale(n,n,a),n}},9298:function(f,l,t){var i=t(5070),r=t(7649),n=t(7437),o=t(6109),a=t(7115),u=t(5240),p=t(3012),c=t(998),b=(t(3668),t(899)),d=[0,0,0];function v(m){this._components=m.slice(),this._time=[0],this.prevMatrix=m.slice(),this.nextMatrix=m.slice(),this.computedMatrix=m.slice(),this.computedInverse=m.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]}f.exports=function(m){return new v((m=m||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var x=v.prototype;x.recalcMatrix=function(m){var k=this._time,h=i.le(k,m),M=this.computedMatrix;if(!(h<0)){var A=this._components;if(h===k.length-1)for(var C=16*h,L=0;L<16;++L)M[L]=A[C++];else{var O=k[h+1]-k[h],I=(C=16*h,this.prevMatrix),R=!0;for(L=0;L<16;++L)I[L]=A[C++];var U=this.nextMatrix;for(L=0;L<16;++L)U[L]=A[C++],R=R&&I[L]===U[L];if(O<1e-6||R)for(L=0;L<16;++L)M[L]=I[L];else r(M,I,U,(m-k[h])/O)}var B=this.computedUp;B[0]=M[1],B[1]=M[5],B[2]=M[9],b(B,B);var G=this.computedInverse;n(G,M);var N=this.computedEye,j=G[15];N[0]=G[12]/j,N[1]=G[13]/j,N[2]=G[14]/j;var V=this.computedCenter,H=Math.exp(this.computedRadius[0]);for(L=0;L<3;++L)V[L]=N[L]-M[2+4*L]*H}},x.idle=function(m){if(!(m1&&i(r[p[v-2]],r[p[v-1]],d)<=0;)v-=1,p.pop();for(p.push(b),v=c.length;v>1&&i(r[c[v-2]],r[c[v-1]],d)>=0;)v-=1,c.pop();c.push(b)}o=new Array(c.length+p.length-2);for(var x=0,g=(a=0,p.length);a0;--m)o[x++]=c[m];return o};var i=t(417)[3]},6145:function(f,l,t){f.exports=function(r,n){n||(n=r,r=window);var o=0,a=0,u=0,p={shift:!1,alt:!1,control:!1,meta:!1},c=!1;function b(C){var L=!1;return"altKey"in C&&(L=L||C.altKey!==p.alt,p.alt=!!C.altKey),"shiftKey"in C&&(L=L||C.shiftKey!==p.shift,p.shift=!!C.shiftKey),"ctrlKey"in C&&(L=L||C.ctrlKey!==p.control,p.control=!!C.ctrlKey),"metaKey"in C&&(L=L||C.metaKey!==p.meta,p.meta=!!C.metaKey),L}function d(C,L){var O=i.x(L),I=i.y(L);"buttons"in L&&(C=0|L.buttons),(C!==o||O!==a||I!==u||b(L))&&(o=0|C,a=O||0,u=I||0,n&&n(o,a,u,p))}function v(C){d(0,C)}function x(){(o||a||u||p.shift||p.alt||p.meta||p.control)&&(a=u=0,o=0,p.shift=p.alt=p.control=p.meta=!1,n&&n(0,0,0,p))}function g(C){b(C)&&n&&n(o,a,u,p)}function m(C){i.buttons(C)===0?d(0,C):d(o,C)}function k(C){d(o|i.buttons(C),C)}function h(C){d(o&~i.buttons(C),C)}function M(){c||(c=!0,r.addEventListener("mousemove",m),r.addEventListener("mousedown",k),r.addEventListener("mouseup",h),r.addEventListener("mouseleave",v),r.addEventListener("mouseenter",v),r.addEventListener("mouseout",v),r.addEventListener("mouseover",v),r.addEventListener("blur",x),r.addEventListener("keyup",g),r.addEventListener("keydown",g),r.addEventListener("keypress",g),r!==window&&(window.addEventListener("blur",x),window.addEventListener("keyup",g),window.addEventListener("keydown",g),window.addEventListener("keypress",g)))}M();var A={element:r};return Object.defineProperties(A,{enabled:{get:function(){return c},set:function(C){C?M():c&&(c=!1,r.removeEventListener("mousemove",m),r.removeEventListener("mousedown",k),r.removeEventListener("mouseup",h),r.removeEventListener("mouseleave",v),r.removeEventListener("mouseenter",v),r.removeEventListener("mouseout",v),r.removeEventListener("mouseover",v),r.removeEventListener("blur",x),r.removeEventListener("keyup",g),r.removeEventListener("keydown",g),r.removeEventListener("keypress",g),r!==window&&(window.removeEventListener("blur",x),window.removeEventListener("keyup",g),window.removeEventListener("keydown",g),window.removeEventListener("keypress",g)))},enumerable:!0},buttons:{get:function(){return o},enumerable:!0},x:{get:function(){return a},enumerable:!0},y:{get:function(){return u},enumerable:!0},mods:{get:function(){return p},enumerable:!0}}),A};var i=t(4110)},2565:function(f){var l={left:0,top:0};f.exports=function(t,i,r){i=i||t.currentTarget||t.srcElement,Array.isArray(r)||(r=[0,0]);var n,o=t.clientX||0,a=t.clientY||0,u=(n=i)===window||n===document||n===document.body?l:n.getBoundingClientRect();return r[0]=o-u.left,r[1]=a-u.top,r}},4110:function(f,l){function t(i){return i.target||i.srcElement||window}l.buttons=function(i){if(typeof i=="object"){if("buttons"in i)return i.buttons;if("which"in i){if((r=i.which)===2)return 4;if(r===3)return 2;if(r>0)return 1<=0)return 1< 0"),typeof n.vertex!="function"&&o("Must specify vertex creation function"),typeof n.cell!="function"&&o("Must specify cell creation function"),typeof n.phase!="function"&&o("Must specify phase function");for(var p=n.getters||[],c=new Array(u),b=0;b=0?c[b]=!0:c[b]=!1;return function(d,v,x,g,m,k){var h=[k,m].join(",");return(0,r[h])(d,v,x,i.mallocUint32,i.freeUint32)}(n.vertex,n.cell,n.phase,0,a,c)};var r={"false,0,1":function(n,o,a,u,p){return function(c,b,d,v){var x,g=0|c.shape[0],m=0|c.shape[1],k=c.data,h=0|c.offset,M=0|c.stride[0],A=0|c.stride[1],C=h,L=0|-M,O=0,I=0|-A,R=0,U=-M-A|0,B=0,G=0|M,N=A-M*g|0,j=0,V=0,H=0,ee=2*g|0,Q=u(ee),X=u(ee),Y=0,K=0,te=-1,ae=-1,oe=0,se=0|-g,fe=0|g,ye=0,pe=-g-1|0,de=g-1|0,he=0,xe=0,Re=0;for(j=0;j0){if(V=1,Q[Y++]=a(k[C],b,d,v),C+=G,g>0)for(j=1,x=k[C],K=Q[Y]=a(x,b,d,v),oe=Q[Y+te],ye=Q[Y+se],he=Q[Y+pe],K===oe&&K===ye&&K===he||(O=k[C+L],R=k[C+I],B=k[C+U],n(j,V,x,O,R,B,K,oe,ye,he,b,d,v),xe=X[Y]=H++),Y+=1,C+=G,j=2;j0)for(j=1,x=k[C],K=Q[Y]=a(x,b,d,v),oe=Q[Y+te],ye=Q[Y+se],he=Q[Y+pe],K===oe&&K===ye&&K===he||(O=k[C+L],R=k[C+I],B=k[C+U],n(j,V,x,O,R,B,K,oe,ye,he,b,d,v),xe=X[Y]=H++,he!==ye&&o(X[Y+se],xe,R,B,ye,he,b,d,v)),Y+=1,C+=G,j=2;j0){if(j=1,Q[Y++]=a(k[C],b,d,v),C+=G,m>0)for(V=1,x=k[C],K=Q[Y]=a(x,b,d,v),ye=Q[Y+se],oe=Q[Y+te],he=Q[Y+pe],K===ye&&K===oe&&K===he||(O=k[C+L],R=k[C+I],B=k[C+U],n(j,V,x,O,R,B,K,ye,oe,he,b,d,v),xe=X[Y]=H++),Y+=1,C+=G,V=2;V0)for(V=1,x=k[C],K=Q[Y]=a(x,b,d,v),ye=Q[Y+se],oe=Q[Y+te],he=Q[Y+pe],K===ye&&K===oe&&K===he||(O=k[C+L],R=k[C+I],B=k[C+U],n(j,V,x,O,R,B,K,ye,oe,he,b,d,v),xe=X[Y]=H++,he!==ye&&o(X[Y+se],xe,B,O,he,ye,b,d,v)),Y+=1,C+=G,V=2;V2&&C[1]>2&&h(A.pick(-1,-1).lo(1,1).hi(C[0]-2,C[1]-2),M.pick(-1,-1,0).lo(1,1).hi(C[0]-2,C[1]-2),M.pick(-1,-1,1).lo(1,1).hi(C[0]-2,C[1]-2)),C[1]>2&&(k(A.pick(0,-1).lo(1).hi(C[1]-2),M.pick(0,-1,1).lo(1).hi(C[1]-2)),m(M.pick(0,-1,0).lo(1).hi(C[1]-2))),C[1]>2&&(k(A.pick(C[0]-1,-1).lo(1).hi(C[1]-2),M.pick(C[0]-1,-1,1).lo(1).hi(C[1]-2)),m(M.pick(C[0]-1,-1,0).lo(1).hi(C[1]-2))),C[0]>2&&(k(A.pick(-1,0).lo(1).hi(C[0]-2),M.pick(-1,0,0).lo(1).hi(C[0]-2)),m(M.pick(-1,0,1).lo(1).hi(C[0]-2))),C[0]>2&&(k(A.pick(-1,C[1]-1).lo(1).hi(C[0]-2),M.pick(-1,C[1]-1,0).lo(1).hi(C[0]-2)),m(M.pick(-1,C[1]-1,1).lo(1).hi(C[0]-2))),M.set(0,0,0,0),M.set(0,0,1,0),M.set(C[0]-1,0,0,0),M.set(C[0]-1,0,1,0),M.set(0,C[1]-1,0,0),M.set(0,C[1]-1,1,0),M.set(C[0]-1,C[1]-1,0,0),M.set(C[0]-1,C[1]-1,1,0),M}}f.exports=function(g,m,k){return Array.isArray(k)||(k=i(m.dimension,typeof k=="string"?k:"clamp")),m.size===0?g:m.dimension===0?(g.set(0),g):function(h){var M=h.join();if(O=c[M])return O;for(var A=h.length,C=[b,d],L=1;L<=A;++L)C.push(v(L));var O=x.apply(void 0,C);return c[M]=O,O}(k)(g,m)}},3581:function(f){function l(n,o){var a=Math.floor(o),u=o-a,p=0<=a&&a0;){U<64?(g=U,U=0):(g=64,U-=64);for(var B=0|a[1];B>0;){B<64?(m=B,B=0):(m=64,B-=64),c=I+U*h+B*M,v=R+U*C+B*L;var G=0,N=0,j=0,V=A,H=h-k*A,ee=M-g*h,Q=O,X=C-k*O,Y=L-g*C;for(j=0;j0;){L<64?(g=L,L=0):(g=64,L-=64);for(var O=0|a[0];O>0;){O<64?(x=O,O=0):(x=64,O-=64),c=A+L*k+O*m,v=C+L*M+O*h;var I=0,R=0,U=k,B=m-g*k,G=M,N=h-g*M;for(R=0;R0;){R<64?(m=R,R=0):(m=64,R-=64);for(var U=0|a[0];U>0;){U<64?(x=U,U=0):(x=64,U-=64);for(var B=0|a[1];B>0;){B<64?(g=B,B=0):(g=64,B-=64),c=O+R*M+U*k+B*h,v=I+R*L+U*A+B*C;var G=0,N=0,j=0,V=M,H=k-m*M,ee=h-x*k,Q=L,X=A-m*L,Y=C-x*A;for(j=0;jc;){R=0,U=O-x;t:for(I=0;IG)break t;U+=M,R+=A}for(R=O,U=O-x,I=0;I>1,Ce=Me-Re,ne=Me+Re,ue=we,me=Ce,Te=Me,Ee=ne,Ue=Ae,De=d+1,je=v-1,ge=!0,be=0,Se=0,Ne=0,Ye=M,Ze=p(Ye),st=p(Ye);ee=m*ue,Q=m*me,xe=g;e:for(H=0;H0){I=ue,ue=me,me=I;break e}if(Ne<0)break e;xe+=C}ee=m*Ee,Q=m*Ue,xe=g;e:for(H=0;H0){I=Ee,Ee=Ue,Ue=I;break e}if(Ne<0)break e;xe+=C}ee=m*ue,Q=m*Te,xe=g;e:for(H=0;H0){I=ue,ue=Te,Te=I;break e}if(Ne<0)break e;xe+=C}ee=m*me,Q=m*Te,xe=g;e:for(H=0;H0){I=me,me=Te,Te=I;break e}if(Ne<0)break e;xe+=C}ee=m*ue,Q=m*Ee,xe=g;e:for(H=0;H0){I=ue,ue=Ee,Ee=I;break e}if(Ne<0)break e;xe+=C}ee=m*Te,Q=m*Ee,xe=g;e:for(H=0;H0){I=Te,Te=Ee,Ee=I;break e}if(Ne<0)break e;xe+=C}ee=m*me,Q=m*Ue,xe=g;e:for(H=0;H0){I=me,me=Ue,Ue=I;break e}if(Ne<0)break e;xe+=C}ee=m*me,Q=m*Te,xe=g;e:for(H=0;H0){I=me,me=Te,Te=I;break e}if(Ne<0)break e;xe+=C}ee=m*Ee,Q=m*Ue,xe=g;e:for(H=0;H0){I=Ee,Ee=Ue,Ue=I;break e}if(Ne<0)break e;xe+=C}for(ee=m*ue,Q=m*me,X=m*Te,Y=m*Ee,K=m*Ue,te=m*we,ae=m*Me,oe=m*Ae,he=0,xe=g,H=0;H0)){if(Ne<0){for(ee=m*G,Q=m*De,X=m*je,xe=g,H=0;H0)for(;;){for(N=g+je*m,he=0,H=0;H0)){for(N=g+je*m,he=0,H=0;HAe){e:for(;;){for(N=g+De*m,he=0,xe=g,H=0;H1&&k?M(m,k[0],k[1]):M(m)}(u,p,d);return b(d,v)}},8729:function(f,l,t){var i=t(8139),r={};f.exports=function(n){var o=n.order,a=n.dtype,u=[o,a].join(":"),p=r[u];return p||(r[u]=p=i(o,a)),p(n),n}},5050:function(f,l,t){var i=t(4780),r=typeof Float64Array<"u";function n(c,b){return c[0]-b[0]}function o(){var c,b=this.stride,d=new Array(b.length);for(c=0;c=0&&(m+=M*(k=0|g),h-=k),new v(this.data,h,M,m)},x.step=function(g){var m=this.shape[0],k=this.stride[0],h=this.offset,M=0,A=Math.ceil;return typeof g=="number"&&((M=0|g)<0?(h+=k*(m-1),m=A(-m/M)):m=A(m/M),k*=M),new v(this.data,m,k,h)},x.transpose=function(g){g=g===void 0?0:0|g;var m=this.shape,k=this.stride;return new v(this.data,m[g],k[g],this.offset)},x.pick=function(g){var m=[],k=[],h=this.offset;return typeof g=="number"&&g>=0?h=h+this.stride[0]*g|0:(m.push(this.shape[0]),k.push(this.stride[0])),(0,b[m.length+1])(this.data,m,k,h)},function(g,m,k,h){return new v(g,m[0],k[0],h)}},2:function(c,b,d){function v(g,m,k,h,M,A){this.data=g,this.shape=[m,k],this.stride=[h,M],this.offset=0|A}var x=v.prototype;return x.dtype=c,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(g,m,k){return c==="generic"?this.data.set(this.offset+this.stride[0]*g+this.stride[1]*m,k):this.data[this.offset+this.stride[0]*g+this.stride[1]*m]=k},x.get=function(g,m){return c==="generic"?this.data.get(this.offset+this.stride[0]*g+this.stride[1]*m):this.data[this.offset+this.stride[0]*g+this.stride[1]*m]},x.index=function(g,m){return this.offset+this.stride[0]*g+this.stride[1]*m},x.hi=function(g,m){return new v(this.data,typeof g!="number"||g<0?this.shape[0]:0|g,typeof m!="number"||m<0?this.shape[1]:0|m,this.stride[0],this.stride[1],this.offset)},x.lo=function(g,m){var k=this.offset,h=0,M=this.shape[0],A=this.shape[1],C=this.stride[0],L=this.stride[1];return typeof g=="number"&&g>=0&&(k+=C*(h=0|g),M-=h),typeof m=="number"&&m>=0&&(k+=L*(h=0|m),A-=h),new v(this.data,M,A,C,L,k)},x.step=function(g,m){var k=this.shape[0],h=this.shape[1],M=this.stride[0],A=this.stride[1],C=this.offset,L=0,O=Math.ceil;return typeof g=="number"&&((L=0|g)<0?(C+=M*(k-1),k=O(-k/L)):k=O(k/L),M*=L),typeof m=="number"&&((L=0|m)<0?(C+=A*(h-1),h=O(-h/L)):h=O(h/L),A*=L),new v(this.data,k,h,M,A,C)},x.transpose=function(g,m){g=g===void 0?0:0|g,m=m===void 0?1:0|m;var k=this.shape,h=this.stride;return new v(this.data,k[g],k[m],h[g],h[m],this.offset)},x.pick=function(g,m){var k=[],h=[],M=this.offset;return typeof g=="number"&&g>=0?M=M+this.stride[0]*g|0:(k.push(this.shape[0]),h.push(this.stride[0])),typeof m=="number"&&m>=0?M=M+this.stride[1]*m|0:(k.push(this.shape[1]),h.push(this.stride[1])),(0,b[k.length+1])(this.data,k,h,M)},function(g,m,k,h){return new v(g,m[0],m[1],k[0],k[1],h)}},3:function(c,b,d){function v(g,m,k,h,M,A,C,L){this.data=g,this.shape=[m,k,h],this.stride=[M,A,C],this.offset=0|L}var x=v.prototype;return x.dtype=c,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 g=Math.abs(this.stride[0]),m=Math.abs(this.stride[1]),k=Math.abs(this.stride[2]);return g>m?m>k?[2,1,0]:g>k?[1,2,0]:[1,0,2]:g>k?[2,0,1]:k>m?[0,1,2]:[0,2,1]}}),x.set=function(g,m,k,h){return c==="generic"?this.data.set(this.offset+this.stride[0]*g+this.stride[1]*m+this.stride[2]*k,h):this.data[this.offset+this.stride[0]*g+this.stride[1]*m+this.stride[2]*k]=h},x.get=function(g,m,k){return c==="generic"?this.data.get(this.offset+this.stride[0]*g+this.stride[1]*m+this.stride[2]*k):this.data[this.offset+this.stride[0]*g+this.stride[1]*m+this.stride[2]*k]},x.index=function(g,m,k){return this.offset+this.stride[0]*g+this.stride[1]*m+this.stride[2]*k},x.hi=function(g,m,k){return new v(this.data,typeof g!="number"||g<0?this.shape[0]:0|g,typeof m!="number"||m<0?this.shape[1]:0|m,typeof k!="number"||k<0?this.shape[2]:0|k,this.stride[0],this.stride[1],this.stride[2],this.offset)},x.lo=function(g,m,k){var h=this.offset,M=0,A=this.shape[0],C=this.shape[1],L=this.shape[2],O=this.stride[0],I=this.stride[1],R=this.stride[2];return typeof g=="number"&&g>=0&&(h+=O*(M=0|g),A-=M),typeof m=="number"&&m>=0&&(h+=I*(M=0|m),C-=M),typeof k=="number"&&k>=0&&(h+=R*(M=0|k),L-=M),new v(this.data,A,C,L,O,I,R,h)},x.step=function(g,m,k){var h=this.shape[0],M=this.shape[1],A=this.shape[2],C=this.stride[0],L=this.stride[1],O=this.stride[2],I=this.offset,R=0,U=Math.ceil;return typeof g=="number"&&((R=0|g)<0?(I+=C*(h-1),h=U(-h/R)):h=U(h/R),C*=R),typeof m=="number"&&((R=0|m)<0?(I+=L*(M-1),M=U(-M/R)):M=U(M/R),L*=R),typeof k=="number"&&((R=0|k)<0?(I+=O*(A-1),A=U(-A/R)):A=U(A/R),O*=R),new v(this.data,h,M,A,C,L,O,I)},x.transpose=function(g,m,k){g=g===void 0?0:0|g,m=m===void 0?1:0|m,k=k===void 0?2:0|k;var h=this.shape,M=this.stride;return new v(this.data,h[g],h[m],h[k],M[g],M[m],M[k],this.offset)},x.pick=function(g,m,k){var h=[],M=[],A=this.offset;return typeof g=="number"&&g>=0?A=A+this.stride[0]*g|0:(h.push(this.shape[0]),M.push(this.stride[0])),typeof m=="number"&&m>=0?A=A+this.stride[1]*m|0:(h.push(this.shape[1]),M.push(this.stride[1])),typeof k=="number"&&k>=0?A=A+this.stride[2]*k|0:(h.push(this.shape[2]),M.push(this.stride[2])),(0,b[h.length+1])(this.data,h,M,A)},function(g,m,k,h){return new v(g,m[0],m[1],m[2],k[0],k[1],k[2],h)}},4:function(c,b,d){function v(g,m,k,h,M,A,C,L,O,I){this.data=g,this.shape=[m,k,h,M],this.stride=[A,C,L,O],this.offset=0|I}var x=v.prototype;return x.dtype=c,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:d}),x.set=function(g,m,k,h,M){return c==="generic"?this.data.set(this.offset+this.stride[0]*g+this.stride[1]*m+this.stride[2]*k+this.stride[3]*h,M):this.data[this.offset+this.stride[0]*g+this.stride[1]*m+this.stride[2]*k+this.stride[3]*h]=M},x.get=function(g,m,k,h){return c==="generic"?this.data.get(this.offset+this.stride[0]*g+this.stride[1]*m+this.stride[2]*k+this.stride[3]*h):this.data[this.offset+this.stride[0]*g+this.stride[1]*m+this.stride[2]*k+this.stride[3]*h]},x.index=function(g,m,k,h){return this.offset+this.stride[0]*g+this.stride[1]*m+this.stride[2]*k+this.stride[3]*h},x.hi=function(g,m,k,h){return new v(this.data,typeof g!="number"||g<0?this.shape[0]:0|g,typeof m!="number"||m<0?this.shape[1]:0|m,typeof k!="number"||k<0?this.shape[2]:0|k,typeof h!="number"||h<0?this.shape[3]:0|h,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},x.lo=function(g,m,k,h){var M=this.offset,A=0,C=this.shape[0],L=this.shape[1],O=this.shape[2],I=this.shape[3],R=this.stride[0],U=this.stride[1],B=this.stride[2],G=this.stride[3];return typeof g=="number"&&g>=0&&(M+=R*(A=0|g),C-=A),typeof m=="number"&&m>=0&&(M+=U*(A=0|m),L-=A),typeof k=="number"&&k>=0&&(M+=B*(A=0|k),O-=A),typeof h=="number"&&h>=0&&(M+=G*(A=0|h),I-=A),new v(this.data,C,L,O,I,R,U,B,G,M)},x.step=function(g,m,k,h){var M=this.shape[0],A=this.shape[1],C=this.shape[2],L=this.shape[3],O=this.stride[0],I=this.stride[1],R=this.stride[2],U=this.stride[3],B=this.offset,G=0,N=Math.ceil;return typeof g=="number"&&((G=0|g)<0?(B+=O*(M-1),M=N(-M/G)):M=N(M/G),O*=G),typeof m=="number"&&((G=0|m)<0?(B+=I*(A-1),A=N(-A/G)):A=N(A/G),I*=G),typeof k=="number"&&((G=0|k)<0?(B+=R*(C-1),C=N(-C/G)):C=N(C/G),R*=G),typeof h=="number"&&((G=0|h)<0?(B+=U*(L-1),L=N(-L/G)):L=N(L/G),U*=G),new v(this.data,M,A,C,L,O,I,R,U,B)},x.transpose=function(g,m,k,h){g=g===void 0?0:0|g,m=m===void 0?1:0|m,k=k===void 0?2:0|k,h=h===void 0?3:0|h;var M=this.shape,A=this.stride;return new v(this.data,M[g],M[m],M[k],M[h],A[g],A[m],A[k],A[h],this.offset)},x.pick=function(g,m,k,h){var M=[],A=[],C=this.offset;return typeof g=="number"&&g>=0?C=C+this.stride[0]*g|0:(M.push(this.shape[0]),A.push(this.stride[0])),typeof m=="number"&&m>=0?C=C+this.stride[1]*m|0:(M.push(this.shape[1]),A.push(this.stride[1])),typeof k=="number"&&k>=0?C=C+this.stride[2]*k|0:(M.push(this.shape[2]),A.push(this.stride[2])),typeof h=="number"&&h>=0?C=C+this.stride[3]*h|0:(M.push(this.shape[3]),A.push(this.stride[3])),(0,b[M.length+1])(this.data,M,A,C)},function(g,m,k,h){return new v(g,m[0],m[1],m[2],m[3],k[0],k[1],k[2],k[3],h)}},5:function(c,b,d){function v(g,m,k,h,M,A,C,L,O,I,R,U){this.data=g,this.shape=[m,k,h,M,A],this.stride=[C,L,O,I,R],this.offset=0|U}var x=v.prototype;return x.dtype=c,x.dimension=5,Object.defineProperty(x,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(x,"order",{get:d}),x.set=function(g,m,k,h,M,A){return c==="generic"?this.data.set(this.offset+this.stride[0]*g+this.stride[1]*m+this.stride[2]*k+this.stride[3]*h+this.stride[4]*M,A):this.data[this.offset+this.stride[0]*g+this.stride[1]*m+this.stride[2]*k+this.stride[3]*h+this.stride[4]*M]=A},x.get=function(g,m,k,h,M){return c==="generic"?this.data.get(this.offset+this.stride[0]*g+this.stride[1]*m+this.stride[2]*k+this.stride[3]*h+this.stride[4]*M):this.data[this.offset+this.stride[0]*g+this.stride[1]*m+this.stride[2]*k+this.stride[3]*h+this.stride[4]*M]},x.index=function(g,m,k,h,M){return this.offset+this.stride[0]*g+this.stride[1]*m+this.stride[2]*k+this.stride[3]*h+this.stride[4]*M},x.hi=function(g,m,k,h,M){return new v(this.data,typeof g!="number"||g<0?this.shape[0]:0|g,typeof m!="number"||m<0?this.shape[1]:0|m,typeof k!="number"||k<0?this.shape[2]:0|k,typeof h!="number"||h<0?this.shape[3]:0|h,typeof M!="number"||M<0?this.shape[4]:0|M,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},x.lo=function(g,m,k,h,M){var A=this.offset,C=0,L=this.shape[0],O=this.shape[1],I=this.shape[2],R=this.shape[3],U=this.shape[4],B=this.stride[0],G=this.stride[1],N=this.stride[2],j=this.stride[3],V=this.stride[4];return typeof g=="number"&&g>=0&&(A+=B*(C=0|g),L-=C),typeof m=="number"&&m>=0&&(A+=G*(C=0|m),O-=C),typeof k=="number"&&k>=0&&(A+=N*(C=0|k),I-=C),typeof h=="number"&&h>=0&&(A+=j*(C=0|h),R-=C),typeof M=="number"&&M>=0&&(A+=V*(C=0|M),U-=C),new v(this.data,L,O,I,R,U,B,G,N,j,V,A)},x.step=function(g,m,k,h,M){var A=this.shape[0],C=this.shape[1],L=this.shape[2],O=this.shape[3],I=this.shape[4],R=this.stride[0],U=this.stride[1],B=this.stride[2],G=this.stride[3],N=this.stride[4],j=this.offset,V=0,H=Math.ceil;return typeof g=="number"&&((V=0|g)<0?(j+=R*(A-1),A=H(-A/V)):A=H(A/V),R*=V),typeof m=="number"&&((V=0|m)<0?(j+=U*(C-1),C=H(-C/V)):C=H(C/V),U*=V),typeof k=="number"&&((V=0|k)<0?(j+=B*(L-1),L=H(-L/V)):L=H(L/V),B*=V),typeof h=="number"&&((V=0|h)<0?(j+=G*(O-1),O=H(-O/V)):O=H(O/V),G*=V),typeof M=="number"&&((V=0|M)<0?(j+=N*(I-1),I=H(-I/V)):I=H(I/V),N*=V),new v(this.data,A,C,L,O,I,R,U,B,G,N,j)},x.transpose=function(g,m,k,h,M){g=g===void 0?0:0|g,m=m===void 0?1:0|m,k=k===void 0?2:0|k,h=h===void 0?3:0|h,M=M===void 0?4:0|M;var A=this.shape,C=this.stride;return new v(this.data,A[g],A[m],A[k],A[h],A[M],C[g],C[m],C[k],C[h],C[M],this.offset)},x.pick=function(g,m,k,h,M){var A=[],C=[],L=this.offset;return typeof g=="number"&&g>=0?L=L+this.stride[0]*g|0:(A.push(this.shape[0]),C.push(this.stride[0])),typeof m=="number"&&m>=0?L=L+this.stride[1]*m|0:(A.push(this.shape[1]),C.push(this.stride[1])),typeof k=="number"&&k>=0?L=L+this.stride[2]*k|0:(A.push(this.shape[2]),C.push(this.stride[2])),typeof h=="number"&&h>=0?L=L+this.stride[3]*h|0:(A.push(this.shape[3]),C.push(this.stride[3])),typeof M=="number"&&M>=0?L=L+this.stride[4]*M|0:(A.push(this.shape[4]),C.push(this.stride[4])),(0,b[A.length+1])(this.data,A,C,L)},function(g,m,k,h){return new v(g,m[0],m[1],m[2],m[3],m[4],k[0],k[1],k[2],k[3],k[4],h)}}};function u(c,b){var d=b===-1?"T":String(b),v=a[d];return b===-1?v(c):b===0?v(c,p[c][0]):v(c,p[c],o)}var p={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};f.exports=function(c,b,d,v){if(c===void 0)return(0,p.array[0])([]);typeof c=="number"&&(c=[c]),b===void 0&&(b=[c.length]);var x=b.length;if(d===void 0){d=new Array(x);for(var g=x-1,m=1;g>=0;--g)d[g]=m,m*=b[g]}if(v===void 0)for(v=0,g=0;g>>0;f.exports=function(o,a){if(isNaN(o)||isNaN(a))return NaN;if(o===a)return o;if(o===0)return a<0?-r:r;var u=i.hi(o),p=i.lo(o);return a>o==o>0?p===n?(u+=1,p=0):p+=1:p===0?(p=n,u-=1):p-=1,i.pack(p,u)}},115:function(f,l){l.vertexNormals=function(t,i,r){for(var n=i.length,o=new Array(n),a=r===void 0?1e-6:r,u=0;ua){var L=o[b],O=1/Math.sqrt(h*A);for(C=0;C<3;++C){var I=(C+1)%3,R=(C+2)%3;L[C]+=O*(M[I]*k[R]-M[R]*k[I])}}}for(u=0;ua)for(O=1/Math.sqrt(U),C=0;C<3;++C)L[C]*=O;else for(C=0;C<3;++C)L[C]=0}return o},l.faceNormals=function(t,i,r){for(var n=t.length,o=new Array(n),a=r===void 0?1e-6:r,u=0;ua?1/Math.sqrt(g):0,b=0;b<3;++b)x[b]*=g;o[u]=x}return o}},567:function(f){f.exports=function(l,t,i,r,n,o,a,u,p,c){var b=t+o+c;if(d>0){var d=Math.sqrt(b+1);l[0]=.5*(a-p)/d,l[1]=.5*(u-r)/d,l[2]=.5*(i-o)/d,l[3]=.5*d}else{var v=Math.max(t,o,c);d=Math.sqrt(2*v-b+1),t>=v?(l[0]=.5*d,l[1]=.5*(n+i)/d,l[2]=.5*(u+r)/d,l[3]=.5*(a-p)/d):o>=v?(l[0]=.5*(i+n)/d,l[1]=.5*d,l[2]=.5*(p+a)/d,l[3]=.5*(u-r)/d):(l[0]=.5*(r+u)/d,l[1]=.5*(a+p)/d,l[2]=.5*d,l[3]=.5*(i-n)/d)}return l}},7774:function(f,l,t){f.exports=function(v){var x=(v=v||{}).center||[0,0,0],g=v.rotation||[0,0,0,1],m=v.radius||1;x=[].slice.call(x,0,3),c(g=[].slice.call(g,0,4),g);var k=new b(g,x,Math.log(m));return k.setDistanceLimits(v.zoomMin,v.zoomMax),("eye"in v||"up"in v)&&k.lookAt(0,v.eye,v.center,v.up),k};var i=t(8444),r=t(3012),n=t(5950),o=t(7437),a=t(567);function u(v,x,g){return Math.sqrt(Math.pow(v,2)+Math.pow(x,2)+Math.pow(g,2))}function p(v,x,g,m){return Math.sqrt(Math.pow(v,2)+Math.pow(x,2)+Math.pow(g,2)+Math.pow(m,2))}function c(v,x){var g=x[0],m=x[1],k=x[2],h=x[3],M=p(g,m,k,h);M>1e-6?(v[0]=g/M,v[1]=m/M,v[2]=k/M,v[3]=h/M):(v[0]=v[1]=v[2]=0,v[3]=1)}function b(v,x,g){this.radius=i([g]),this.center=i(x),this.rotation=i(v),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 d=b.prototype;d.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},d.recalcMatrix=function(v){this.radius.curve(v),this.center.curve(v),this.rotation.curve(v);var x=this.computedRotation;c(x,x);var g=this.computedMatrix;n(g,x);var m=this.computedCenter,k=this.computedEye,h=this.computedUp,M=Math.exp(this.computedRadius[0]);k[0]=m[0]+M*g[2],k[1]=m[1]+M*g[6],k[2]=m[2]+M*g[10],h[0]=g[1],h[1]=g[5],h[2]=g[9];for(var A=0;A<3;++A){for(var C=0,L=0;L<3;++L)C+=g[A+4*L]*k[L];g[12+A]=-C}},d.getMatrix=function(v,x){this.recalcMatrix(v);var g=this.computedMatrix;if(x){for(var m=0;m<16;++m)x[m]=g[m];return x}return g},d.idle=function(v){this.center.idle(v),this.radius.idle(v),this.rotation.idle(v)},d.flush=function(v){this.center.flush(v),this.radius.flush(v),this.rotation.flush(v)},d.pan=function(v,x,g,m){x=x||0,g=g||0,m=m||0,this.recalcMatrix(v);var k=this.computedMatrix,h=k[1],M=k[5],A=k[9],C=u(h,M,A);h/=C,M/=C,A/=C;var L=k[0],O=k[4],I=k[8],R=L*h+O*M+I*A,U=u(L-=h*R,O-=M*R,I-=A*R);L/=U,O/=U,I/=U,k[2],k[6],k[10];var B=L*x+h*g,G=O*x+M*g,N=I*x+A*g;this.center.move(v,B,G,N);var j=Math.exp(this.computedRadius[0]);j=Math.max(1e-4,j+m),this.radius.set(v,Math.log(j))},d.rotate=function(v,x,g,m){this.recalcMatrix(v),x=x||0,g=g||0;var k=this.computedMatrix,h=k[0],M=k[4],A=k[8],C=k[1],L=k[5],O=k[9],I=k[2],R=k[6],U=k[10],B=x*h+g*C,G=x*M+g*L,N=x*A+g*O,j=-(R*N-U*G),V=-(U*B-I*N),H=-(I*G-R*B),ee=Math.sqrt(Math.max(0,1-Math.pow(j,2)-Math.pow(V,2)-Math.pow(H,2))),Q=p(j,V,H,ee);Q>1e-6?(j/=Q,V/=Q,H/=Q,ee/=Q):(j=V=H=0,ee=1);var X=this.computedRotation,Y=X[0],K=X[1],te=X[2],ae=X[3],oe=Y*ee+ae*j+K*H-te*V,se=K*ee+ae*V+te*j-Y*H,fe=te*ee+ae*H+Y*V-K*j,ye=ae*ee-Y*j-K*V-te*H;if(m){j=I,V=R,H=U;var pe=Math.sin(m)/u(j,V,H);j*=pe,V*=pe,H*=pe,ye=ye*(ee=Math.cos(x))-(oe=oe*ee+ye*j+se*H-fe*V)*j-(se=se*ee+ye*V+fe*j-oe*H)*V-(fe=fe*ee+ye*H+oe*V-se*j)*H}var de=p(oe,se,fe,ye);de>1e-6?(oe/=de,se/=de,fe/=de,ye/=de):(oe=se=fe=0,ye=1),this.rotation.set(v,oe,se,fe,ye)},d.lookAt=function(v,x,g,m){this.recalcMatrix(v),g=g||this.computedCenter,x=x||this.computedEye,m=m||this.computedUp;var k=this.computedMatrix;r(k,x,g,m);var h=this.computedRotation;a(h,k[0],k[1],k[2],k[4],k[5],k[6],k[8],k[9],k[10]),c(h,h),this.rotation.set(v,h[0],h[1],h[2],h[3]);for(var M=0,A=0;A<3;++A)M+=Math.pow(g[A]-x[A],2);this.radius.set(v,.5*Math.log(Math.max(M,1e-6))),this.center.set(v,g[0],g[1],g[2])},d.translate=function(v,x,g,m){this.center.move(v,x||0,g||0,m||0)},d.setMatrix=function(v,x){var g=this.computedRotation;a(g,x[0],x[1],x[2],x[4],x[5],x[6],x[8],x[9],x[10]),c(g,g),this.rotation.set(v,g[0],g[1],g[2],g[3]);var m=this.computedMatrix;o(m,x);var k=m[15];if(Math.abs(k)>1e-6){var h=m[12]/k,M=m[13]/k,A=m[14]/k;this.recalcMatrix(v);var C=Math.exp(this.computedRadius[0]);this.center.set(v,h-m[2]*C,M-m[6]*C,A-m[10]*C),this.radius.idle(v)}else this.center.idle(v),this.radius.idle(v)},d.setDistance=function(v,x){x>0&&this.radius.set(v,Math.log(x))},d.setDistanceLimits=function(v,x){v=v>0?Math.log(v):-1/0,x=x>0?Math.log(x):1/0,x=Math.max(x,v),this.radius.bounds[0][0]=v,this.radius.bounds[1][0]=x},d.getDistanceLimits=function(v){var x=this.radius.bounds;return v?(v[0]=Math.exp(x[0][0]),v[1]=Math.exp(x[1][0]),v):[Math.exp(x[0][0]),Math.exp(x[1][0])]},d.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]}},d.fromJSON=function(v){var x=this.lastT(),g=v.center;g&&this.center.set(x,g[0],g[1],g[2]);var m=v.rotation;m&&this.rotation.set(x,m[0],m[1],m[2],m[3]);var k=v.distance;k&&k>0&&this.radius.set(x,Math.log(k)),this.setDistanceLimits(v.zoomMin,v.zoomMax)}},4930:function(f,l,t){var i=t(6184);f.exports=function(r,n,o){return i(o=o!==void 0?o+"":" ",n)+r}},4405:function(f){f.exports=function(l,t){t||(t=[0,""]),l=String(l);var i=parseFloat(l,10);return t[0]=i,t[1]=l.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t}},4166:function(f,l,t){f.exports=function(r,n){for(var o=0|n.length,a=r.length,u=[new Array(o),new Array(o)],p=0;p0){L=u[R][A][0],I=R;break}O=L[1^I];for(var U=0;U<2;++U)for(var B=u[U][A],G=0;G0&&(L=N,O=j,I=U)}return C||L&&d(L,I),O}function x(M,A){var C=u[A][M][0],L=[M];d(C,A);for(var O=C[1^A];;){for(;O!==M;)L.push(O),O=v(L[L.length-2],O,!1);if(u[0][M].length+u[1][M].length===0)break;var I=L[L.length-1],R=M,U=L[1],B=v(I,R,!0);if(i(n[I],n[R],n[U],n[B])<0)break;L.push(M),O=v(I,R)}return L}function g(M,A){return A[1]===A[A.length-1]}for(p=0;p0;){u[0][p].length;var h=x(p,m);g(0,h)?k.push.apply(k,h):(k.length>0&&b.push(k),k=h)}k.length>0&&b.push(k)}return b};var i=t(9398)},3959:function(f,l,t){f.exports=function(r,n){for(var o=i(r,n.length),a=new Array(n.length),u=new Array(n.length),p=[],c=0;c0;){var d=p.pop();a[d]=!1;var v=o[d];for(c=0;c0})).length,M=new Array(h),A=new Array(h);for(m=0;m0;){var se=ae.pop(),fe=V[se];u(fe,function(Re,we){return Re-we});var ye,pe=fe.length,de=oe[se];if(de===0){var he=k[se];ye=[he]}for(m=0;m=0||(oe[xe]=1^de,ae.push(xe),de===0&&(te(he=k[xe])||(he.reverse(),ye.push(he))))}de===0&&v.push(ye)}return v};var i=t(8348),r=t(4166),n=t(211),o=t(9660),a=t(9662),u=t(1215),p=t(3959);function c(b,d){for(var v=new Array(b),x=0;x0&&R[B]===U[0]))return 1;G=I[B-1]}for(var N=1;G;){var j=G.key,V=i(U,j[0],j[1]);if(j[0][0]0))return 0;N=-1,G=G.right}else if(V>0)G=G.left;else{if(!(V<0))return 0;N=1,G=G.right}}return N}}(L.slabs,L.coordinates);return v.length===0?O:function(I,R){return function(U){return I(U[0],U[1])?0:R(U)}}(u(v),O)};var i=t(417)[3],r=t(4385),n=t(9014),o=t(5070);function a(){return!0}function u(c){for(var b={},d=0;d=c?(R=1,M=c+2*v+g):M=v*(R=-v/c)+g):(R=0,x>=0?(U=0,M=g):-x>=d?(U=1,M=d+2*x+g):M=x*(U=-x/d)+g);else if(U<0)U=0,v>=0?(R=0,M=g):-v>=c?(R=1,M=c+2*v+g):M=v*(R=-v/c)+g;else{var B=1/I;M=(R*=B)*(c*R+b*(U*=B)+2*v)+U*(b*R+d*U+2*x)+g}else R<0?(C=d+x)>(A=b+v)?(L=C-A)>=(O=c-2*b+d)?(R=1,U=0,M=c+2*v+g):M=(R=L/O)*(c*R+b*(U=1-R)+2*v)+U*(b*R+d*U+2*x)+g:(R=0,C<=0?(U=1,M=d+2*x+g):x>=0?(U=0,M=g):M=x*(U=-x/d)+g):U<0?(C=c+v)>(A=b+x)?(L=C-A)>=(O=c-2*b+d)?(U=1,R=0,M=d+2*x+g):M=(R=1-(U=L/O))*(c*R+b*U+2*v)+U*(b*R+d*U+2*x)+g:(U=0,C<=0?(R=1,M=c+2*v+g):v>=0?(R=0,M=g):M=v*(R=-v/c)+g):(L=d+x-b-v)<=0?(R=0,U=1,M=d+2*x+g):L>=(O=c-2*b+d)?(R=1,U=0,M=c+2*v+g):M=(R=L/O)*(c*R+b*(U=1-R)+2*v)+U*(b*R+d*U+2*x)+g;var G=1-R-U;for(p=0;p0){var d=o[u-1];if(i(c,d)===0&&n(d)!==b){u-=1;continue}}o[u++]=c}}return o.length=u,o}},6184:function(f){var l,t="";f.exports=function(i,r){if(typeof i!="string")throw new TypeError("expected a string");if(r===1)return i;if(r===2)return i+i;var n=i.length*r;if(l!==i||l===void 0)l=i,t="";else if(t.length>=n)return t.substr(0,n);for(;n>t.length&&r>1;)1&r&&(t+=i),r>>=1,i+=i;return t=(t+=i).substr(0,n)}},8161:function(f,l,t){f.exports=t.g.performance&&t.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},402:function(f){f.exports=function(l){for(var t=l.length,i=l[l.length-1],r=t,n=t-2;n>=0;--n){var o=i,a=l[n];(p=a-((i=o+a)-o))&&(l[--r]=i,i=p)}var u=0;for(n=r;n0){if(C<=0)return L;M=A+C}else{if(!(A<0)||C>=0)return L;M=-(A+C)}var O=33306690738754716e-32*M;return L>=O||L<=-O?L:b(m,k,h)},function(m,k,h,M){var A=m[0]-M[0],C=k[0]-M[0],L=h[0]-M[0],O=m[1]-M[1],I=k[1]-M[1],R=h[1]-M[1],U=m[2]-M[2],B=k[2]-M[2],G=h[2]-M[2],N=C*R,j=L*I,V=L*O,H=A*R,ee=A*I,Q=C*O,X=U*(N-j)+B*(V-H)+G*(ee-Q),Y=7771561172376103e-31*((Math.abs(N)+Math.abs(j))*Math.abs(U)+(Math.abs(V)+Math.abs(H))*Math.abs(B)+(Math.abs(ee)+Math.abs(Q))*Math.abs(G));return X>Y||-X>Y?X:d(m,k,h,M)}];function x(m){var k=v[m.length];return k||(k=v[m.length]=c(m.length)),k.apply(void 0,m)}function g(m,k,h,M,A,C,L){return function(O,I,R,U,B){switch(arguments.length){case 0:case 1:return 0;case 2:return M(O,I);case 3:return A(O,I,R);case 4:return C(O,I,R,U);case 5:return L(O,I,R,U,B)}for(var G=new Array(arguments.length),N=0;N0&&p>0||u<0&&p<0)return!1;var c=i(o,r,n),b=i(a,r,n);return!(c>0&&b>0||c<0&&b<0)&&(u!==0||p!==0||c!==0||b!==0||function(d,v,x,g){for(var m=0;m<2;++m){var k=d[m],h=v[m],M=Math.min(k,h),A=Math.max(k,h),C=x[m],L=g[m],O=Math.min(C,L);if(Math.max(C,L)=r?(n=d,(p+=1)=r?(n=d,(p+=1)>1,d=r[2*b+1];if(d===u)return b;u>1,d=r[2*b+1];if(d===u)return b;u>1,d=r[2*b+1];if(d===u)return b;u0)-(r<0)},l.abs=function(r){var n=r>>31;return(r^n)-n},l.min=function(r,n){return n^(r^n)&-(r65535)<<4,n|=o=((r>>>=n)>255)<<3,n|=o=((r>>>=o)>15)<<2,(n|=o=((r>>>=o)>3)<<1)|(r>>>=o)>>1},l.log10=function(r){return r>=1e9?9:r>=1e8?8:r>=1e7?7:r>=1e6?6:r>=1e5?5:r>=1e4?4:r>=1e3?3:r>=100?2:r>=10?1:0},l.popCount=function(r){return 16843009*((r=(858993459&(r-=r>>>1&1431655765))+(r>>>2&858993459))+(r>>>4)&252645135)>>>24},l.countTrailingZeros=t,l.nextPow2=function(r){return r+=r===0,--r,r|=r>>>1,r|=r>>>2,r|=r>>>4,1+((r|=r>>>8)|r>>>16)},l.prevPow2=function(r){return r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,(r|=r>>>16)-(r>>>1)},l.parity=function(r){return r^=r>>>16,r^=r>>>8,r^=r>>>4,27030>>>(r&=15)&1};var i=new Array(256);(function(r){for(var n=0;n<256;++n){var o=n,a=n,u=7;for(o>>>=1;o;o>>>=1)a<<=1,a|=1&o,--u;r[n]=a<>>8&255]<<16|i[r>>>16&255]<<8|i[r>>>24&255]},l.interleave2=function(r,n){return(r=1431655765&((r=858993459&((r=252645135&((r=16711935&((r&=65535)|r<<8))|r<<4))|r<<2))|r<<1))|(n=1431655765&((n=858993459&((n=252645135&((n=16711935&((n&=65535)|n<<8))|n<<4))|n<<2))|n<<1))<<1},l.deinterleave2=function(r,n){return(r=65535&((r=16711935&((r=252645135&((r=858993459&((r=r>>>n&1431655765)|r>>>1))|r>>>2))|r>>>4))|r>>>16))<<16>>16},l.interleave3=function(r,n,o){return r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2),(r|=(n=1227133513&((n=3272356035&((n=251719695&((n=4278190335&((n&=1023)|n<<16))|n<<8))|n<<4))|n<<2))<<1)|(o=1227133513&((o=3272356035&((o=251719695&((o=4278190335&((o&=1023)|o<<16))|o<<8))|o<<4))|o<<2))<<2},l.deinterleave3=function(r,n){return(r=1023&((r=4278190335&((r=251719695&((r=3272356035&((r=r>>>n&1227133513)|r>>>2))|r>>>4))|r>>>8))|r>>>16))<<22>>22},l.nextCombination=function(r){var n=r|r-1;return n+1|(~n&-~n)-1>>>t(r)+1}},6656:function(f,l,t){var i=t(9392),r=t(9521);function n(d,v){var x=d.length,g=d.length-v.length,m=Math.min;if(g)return g;switch(x){case 0:return 0;case 1:return d[0]-v[0];case 2:return(M=d[0]+d[1]-v[0]-v[1])||m(d[0],d[1])-m(v[0],v[1]);case 3:var k=d[0]+d[1],h=v[0]+v[1];if(M=k+d[2]-(h+v[2]))return M;var M,A=m(d[0],d[1]),C=m(v[0],v[1]);return(M=m(A,d[2])-m(C,v[2]))||m(A+d[2],k)-m(C+v[2],h);default:var L=d.slice(0);L.sort();var O=v.slice(0);O.sort();for(var I=0;I>1,h=n(d[k],v);h<=0?(h===0&&(m=k),x=k+1):h>0&&(g=k-1)}return m}function c(d,v){for(var x=new Array(d.length),g=0,m=x.length;g=d.length||n(d[R],k)!==0););}return x}function b(d,v){if(v<0)return[];for(var x=[],g=(1<>>C&1&&A.push(m[C]);v.push(A)}return a(v)},l.skeleton=b,l.boundary=function(d){for(var v=[],x=0,g=d.length;x>1:(Q>>1)-1}function L(Q){for(var X=A(Q);;){var Y=X,K=2*Q+1,te=2*(Q+1),ae=Q;if(K0;){var Y=C(Q);if(!(Y>=0&&X0){var Q=B[0];return M(0,N-1),N-=1,L(0),Q}return-1}function R(Q,X){var Y=B[Q];return d[Y]===X?Q:(d[Y]=-1/0,O(Q),I(),d[Y]=X,O((N+=1)-1))}function U(Q){if(!v[Q]){v[Q]=!0;var X=c[Q],Y=b[Q];c[Y]>=0&&(c[Y]=X),b[X]>=0&&(b[X]=Y),G[X]>=0&&R(G[X],h(X)),G[Y]>=0&&R(G[Y],h(Y))}}var B=[],G=new Array(u);for(x=0;x>1;x>=0;--x)L(x);for(;;){var j=I();if(j<0||d[j]>a)break;U(j)}var V=[];for(x=0;x=0&&Y>=0&&X!==Y){var K=G[X],te=G[Y];K!==te&&ee.push([K,te])}}),r.unique(r.normalize(ee)),{positions:V,edges:ee}};var i=t(417),r=t(6656)},6638:function(f,l,t){f.exports=function(n,o){var a,u,p,c;if(o[0][0]o[1][0]))return r(o,n);a=o[1],u=o[0]}if(n[0][0]n[1][0]))return-r(n,o);p=n[1],c=n[0]}var b=i(a,u,c),d=i(a,u,p);if(b<0){if(d<=0)return b}else if(b>0){if(d>=0)return b}else if(d)return d;if(b=i(c,p,u),d=i(c,p,a),b<0){if(d<=0)return b}else if(b>0){if(d>=0)return b}else if(d)return d;return u[0]-c[0]};var i=t(417);function r(n,o){var a,u,p,c;if(o[0][0]o[1][0])){var b=Math.min(n[0][1],n[1][1]),d=Math.max(n[0][1],n[1][1]),v=Math.min(o[0][1],o[1][1]),x=Math.max(o[0][1],o[1][1]);return dx?b-x:d-x}a=o[1],u=o[0]}n[0][1]0)if(v[0]!==k[1][0])x=d,d=d.right;else{if(M=p(d.right,v))return M;d=d.left}else{if(v[0]!==k[1][0])return d;var M;if(M=p(d.right,v))return M;d=d.left}}return x}function c(d,v,x,g){this.y=d,this.index=v,this.start=x,this.closed=g}function b(d,v,x,g){this.x=d,this.segment=v,this.create=x,this.index=g}a.prototype.castUp=function(d){var v=i.le(this.coordinates,d[0]);if(v<0)return-1;this.slabs[v];var x=p(this.slabs[v],d),g=-1;if(x&&(g=x.value),this.coordinates[v]===d[0]){var m=null;if(x&&(m=x.key),v>0){var k=p(this.slabs[v-1],d);k&&(m?o(k.key,m)>0&&(m=k.key,g=k.value):(g=k.value,m=k.key))}var h=this.horizontal[v];if(h.length>0){var M=i.ge(h,d[1],u);if(M=h.length)return g;A=h[M]}}if(A.start)if(m){var C=n(m[0],m[1],[d[0],A.y]);m[0][0]>m[1][0]&&(C=-C),C>0&&(g=A.index)}else g=A.index;else A.y!==d[1]&&(g=A.index)}}}return g}},4670:function(f,l,t){var i=t(9130),r=t(9662);function n(a,u){var p=r(i(a,u),[u[u.length-1]]);return p[p.length-1]}function o(a,u,p,c){var b=-u/(c-u);b<0?b=0:b>1&&(b=1);for(var d=1-b,v=a.length,x=new Array(v),g=0;g0||b>0&&g<0){var m=o(d,g,v,b);p.push(m),c.push(m.slice())}g<0?c.push(v.slice()):g>0?p.push(v.slice()):(p.push(v.slice()),c.push(v.slice())),b=g}return{positive:p,negative:c}},f.exports.positive=function(a,u){for(var p=[],c=n(a[a.length-1],u),b=a[a.length-1],d=a[0],v=0;v0||c>0&&x<0)&&p.push(o(b,x,d,c)),x>=0&&p.push(d.slice()),c=x}return p},f.exports.negative=function(a,u){for(var p=[],c=n(a[a.length-1],u),b=a[a.length-1],d=a[0],v=0;v0||c>0&&x<0)&&p.push(o(b,x,d,c)),x<=0&&p.push(d.slice()),c=x}return p}},8974:function(f,l,t){var i;(function(){var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function n(c){return a(p(c),arguments)}function o(c,b){return n.apply(null,[c].concat(b||[]))}function a(c,b){var d,v,x,g,m,k,h,M,A,C=1,L=c.length,O="";for(v=0;v=0),g.type){case"b":d=parseInt(d,10).toString(2);break;case"c":d=String.fromCharCode(parseInt(d,10));break;case"d":case"i":d=parseInt(d,10);break;case"j":d=JSON.stringify(d,null,g.width?parseInt(g.width):0);break;case"e":d=g.precision?parseFloat(d).toExponential(g.precision):parseFloat(d).toExponential();break;case"f":d=g.precision?parseFloat(d).toFixed(g.precision):parseFloat(d);break;case"g":d=g.precision?String(Number(d.toPrecision(g.precision))):parseFloat(d);break;case"o":d=(parseInt(d,10)>>>0).toString(8);break;case"s":d=String(d),d=g.precision?d.substring(0,g.precision):d;break;case"t":d=String(!!d),d=g.precision?d.substring(0,g.precision):d;break;case"T":d=Object.prototype.toString.call(d).slice(8,-1).toLowerCase(),d=g.precision?d.substring(0,g.precision):d;break;case"u":d=parseInt(d,10)>>>0;break;case"v":d=d.valueOf(),d=g.precision?d.substring(0,g.precision):d;break;case"x":d=(parseInt(d,10)>>>0).toString(16);break;case"X":d=(parseInt(d,10)>>>0).toString(16).toUpperCase()}r.json.test(g.type)?O+=d:(!r.number.test(g.type)||M&&!g.sign?A="":(A=M?"+":"-",d=d.toString().replace(r.sign,"")),k=g.pad_char?g.pad_char==="0"?"0":g.pad_char.charAt(1):" ",h=g.width-(A+d).length,m=g.width&&h>0?k.repeat(h):"",O+=g.align?A+d+m:k==="0"?A+m+d:m+A+d)}return O}var u=Object.create(null);function p(c){if(u[c])return u[c];for(var b,d=c,v=[],x=0;d;){if((b=r.text.exec(d))!==null)v.push(b[0]);else if((b=r.modulo.exec(d))!==null)v.push("%");else{if((b=r.placeholder.exec(d))===null)throw new SyntaxError("[sprintf] unexpected placeholder");if(b[2]){x|=1;var g=[],m=b[2],k=[];if((k=r.key.exec(m))===null)throw new SyntaxError("[sprintf] failed to parse named argument key");for(g.push(k[1]);(m=m.substring(k[0].length))!=="";)if((k=r.key_access.exec(m))!==null)g.push(k[1]);else{if((k=r.index_access.exec(m))===null)throw new SyntaxError("[sprintf] failed to parse named argument key");g.push(k[1])}b[2]=g}else x|=2;if(x===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");v.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]})}d=d.substring(b[0].length)}return u[c]=v}l.sprintf=n,l.vsprintf=o,typeof window<"u"&&(window.sprintf=n,window.vsprintf=o,(i=function(){return{sprintf:n,vsprintf:o}}.call(l,t,l,f))===void 0||(f.exports=i))})()},4162:function(f,l,t){f.exports=function(a,u){if(a.dimension<=0)return{positions:[],cells:[]};if(a.dimension===1)return function(b,d){for(var v=r(b,d),x=v.length,g=new Array(x),m=new Array(x),k=0;kx|0},vertex:function(b,d,v,x,g,m,k,h,M,A,C,L,O){var I=(k<<0)+(h<<1)+(M<<2)+(A<<3)|0;if(I!==0&&I!==15)switch(I){case 0:case 15:C.push([b-.5,d-.5]);break;case 1:C.push([b-.25-.25*(x+v-2*O)/(v-x),d-.25-.25*(g+v-2*O)/(v-g)]);break;case 2:C.push([b-.75-.25*(-x-v+2*O)/(x-v),d-.25-.25*(m+x-2*O)/(x-m)]);break;case 3:C.push([b-.5,d-.5-.5*(g+v+m+x-4*O)/(v-g+x-m)]);break;case 4:C.push([b-.25-.25*(m+g-2*O)/(g-m),d-.75-.25*(-g-v+2*O)/(g-v)]);break;case 5:C.push([b-.5-.5*(x+v+m+g-4*O)/(v-x+g-m),d-.5]);break;case 6:C.push([b-.5-.25*(-x-v+m+g)/(x-v+g-m),d-.5-.25*(-g-v+m+x)/(g-v+x-m)]);break;case 7:C.push([b-.75-.25*(m+g-2*O)/(g-m),d-.75-.25*(m+x-2*O)/(x-m)]);break;case 8:C.push([b-.75-.25*(-m-g+2*O)/(m-g),d-.75-.25*(-m-x+2*O)/(m-x)]);break;case 9:C.push([b-.5-.25*(x+v+-m-g)/(v-x+m-g),d-.5-.25*(g+v+-m-x)/(v-g+m-x)]);break;case 10:C.push([b-.5-.5*(-x-v-m-g+4*O)/(x-v+m-g),d-.5]);break;case 11:C.push([b-.25-.25*(-m-g+2*O)/(m-g),d-.75-.25*(g+v-2*O)/(v-g)]);break;case 12:C.push([b-.5,d-.5-.5*(-g-v-m-x+4*O)/(g-v+m-x)]);break;case 13:C.push([b-.75-.25*(x+v-2*O)/(v-x),d-.25-.25*(-m-x+2*O)/(m-x)]);break;case 14:C.push([b-.25-.25*(-x-v+2*O)/(x-v),d-.25-.25*(-g-v+2*O)/(g-v)])}},cell:function(b,d,v,x,g,m,k,h,M){g?h.push([b,d]):h.push([d,b])}});return function(b,d){var v=[],x=[];return c(b,v,x,d),{positions:v,cells:x}}}},o={}},6946:function(f,l,t){f.exports=function o(a,u,p){p=p||{};var c=n[a];c||(c=n[a]={" ":{data:new Float32Array(0),shape:.2}});var b=c[u];if(!b)if(u.length<=1||!/\d/.test(u))b=c[u]=function(L){for(var O=L.cells,I=L.positions,R=new Float32Array(6*O.length),U=0,B=0,G=0;G0&&(g+=.02);var k=new Float32Array(x),h=0,M=-.5*g;for(m=0;mMath.max(k,h)?M[2]=1:k>Math.max(m,h)?M[0]=1:M[1]=1;for(var A=0,C=0,L=0;L<3;++L)A+=g[L]*g[L],C+=M[L]*g[L];for(L=0;L<3;++L)M[L]-=C/A*g[L];return a(M,M),M}function d(g,m,k,h,M,A,C,L){this.center=i(k),this.up=i(h),this.right=i(M),this.radius=i([A]),this.angle=i([C,L]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(g,m),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var O=0;O<16;++O)this.computedMatrix[O]=.5;this.recalcMatrix(0)}var v=d.prototype;v.setDistanceLimits=function(g,m){g=g>0?Math.log(g):-1/0,m=m>0?Math.log(m):1/0,m=Math.max(m,g),this.radius.bounds[0][0]=g,this.radius.bounds[1][0]=m},v.getDistanceLimits=function(g){var m=this.radius.bounds[0];return g?(g[0]=Math.exp(m[0][0]),g[1]=Math.exp(m[1][0]),g):[Math.exp(m[0][0]),Math.exp(m[1][0])]},v.recalcMatrix=function(g){this.center.curve(g),this.up.curve(g),this.right.curve(g),this.radius.curve(g),this.angle.curve(g);for(var m=this.computedUp,k=this.computedRight,h=0,M=0,A=0;A<3;++A)M+=m[A]*k[A],h+=m[A]*m[A];var C=Math.sqrt(h),L=0;for(A=0;A<3;++A)k[A]-=m[A]*M/h,L+=k[A]*k[A],m[A]/=C;var O=Math.sqrt(L);for(A=0;A<3;++A)k[A]/=O;var I=this.computedToward;o(I,m,k),a(I,I);var R=Math.exp(this.computedRadius[0]),U=this.computedAngle[0],B=this.computedAngle[1],G=Math.cos(U),N=Math.sin(U),j=Math.cos(B),V=Math.sin(B),H=this.computedCenter,ee=G*j,Q=N*j,X=V,Y=-G*V,K=-N*V,te=j,ae=this.computedEye,oe=this.computedMatrix;for(A=0;A<3;++A){var se=ee*k[A]+Q*I[A]+X*m[A];oe[4*A+1]=Y*k[A]+K*I[A]+te*m[A],oe[4*A+2]=se,oe[4*A+3]=0}var fe=oe[1],ye=oe[5],pe=oe[9],de=oe[2],he=oe[6],xe=oe[10],Re=ye*xe-pe*he,we=pe*de-fe*xe,Ae=fe*he-ye*de,Me=p(Re,we,Ae);for(Re/=Me,we/=Me,Ae/=Me,oe[0]=Re,oe[4]=we,oe[8]=Ae,A=0;A<3;++A)ae[A]=H[A]+oe[2+4*A]*R;for(A=0;A<3;++A){L=0;for(var Ce=0;Ce<3;++Ce)L+=oe[A+4*Ce]*ae[Ce];oe[12+A]=-L}oe[15]=1},v.getMatrix=function(g,m){this.recalcMatrix(g);var k=this.computedMatrix;if(m){for(var h=0;h<16;++h)m[h]=k[h];return m}return k};var x=[0,0,0];v.rotate=function(g,m,k,h){if(this.angle.move(g,m,k),h){this.recalcMatrix(g);var M=this.computedMatrix;x[0]=M[2],x[1]=M[6],x[2]=M[10];for(var A=this.computedUp,C=this.computedRight,L=this.computedToward,O=0;O<3;++O)M[4*O]=A[O],M[4*O+1]=C[O],M[4*O+2]=L[O];for(n(M,M,h,x),O=0;O<3;++O)A[O]=M[4*O],C[O]=M[4*O+1];this.up.set(g,A[0],A[1],A[2]),this.right.set(g,C[0],C[1],C[2])}},v.pan=function(g,m,k,h){m=m||0,k=k||0,h=h||0,this.recalcMatrix(g);var M=this.computedMatrix,A=(Math.exp(this.computedRadius[0]),M[1]),C=M[5],L=M[9],O=p(A,C,L);A/=O,C/=O,L/=O;var I=M[0],R=M[4],U=M[8],B=I*A+R*C+U*L,G=p(I-=A*B,R-=C*B,U-=L*B),N=(I/=G)*m+A*k,j=(R/=G)*m+C*k,V=(U/=G)*m+L*k;this.center.move(g,N,j,V);var H=Math.exp(this.computedRadius[0]);H=Math.max(1e-4,H+h),this.radius.set(g,Math.log(H))},v.translate=function(g,m,k,h){this.center.move(g,m||0,k||0,h||0)},v.setMatrix=function(g,m,k,h){var M=1;typeof k=="number"&&(M=0|k),(M<0||M>3)&&(M=1);var A=(M+2)%3;m||(this.recalcMatrix(g),m=this.computedMatrix);var C=m[M],L=m[M+4],O=m[M+8];if(h){var I=Math.abs(C),R=Math.abs(L),U=Math.abs(O),B=Math.max(I,R,U);I===B?(C=C<0?-1:1,L=O=0):U===B?(O=O<0?-1:1,C=L=0):(L=L<0?-1:1,C=O=0)}else{var G=p(C,L,O);C/=G,L/=G,O/=G}var N,j,V=m[A],H=m[A+4],ee=m[A+8],Q=V*C+H*L+ee*O,X=p(V-=C*Q,H-=L*Q,ee-=O*Q),Y=L*(ee/=X)-O*(H/=X),K=O*(V/=X)-C*ee,te=C*H-L*V,ae=p(Y,K,te);if(Y/=ae,K/=ae,te/=ae,this.center.jump(g,Te,Ee,Ue),this.radius.idle(g),this.up.jump(g,C,L,O),this.right.jump(g,V,H,ee),M===2){var oe=m[1],se=m[5],fe=m[9],ye=oe*V+se*H+fe*ee,pe=oe*Y+se*K+fe*te;N=Re<0?-Math.PI/2:Math.PI/2,j=Math.atan2(pe,ye)}else{var de=m[2],he=m[6],xe=m[10],Re=de*C+he*L+xe*O,we=de*V+he*H+xe*ee,Ae=de*Y+he*K+xe*te;N=Math.asin(c(Re)),j=Math.atan2(Ae,we)}this.angle.jump(g,j,N),this.recalcMatrix(g);var Me=m[2],Ce=m[6],ne=m[10],ue=this.computedMatrix;r(ue,m);var me=ue[15],Te=ue[12]/me,Ee=ue[13]/me,Ue=ue[14]/me,De=Math.exp(this.computedRadius[0]);this.center.jump(g,Te-Me*De,Ee-Ce*De,Ue-ne*De)},v.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},v.idle=function(g){this.center.idle(g),this.up.idle(g),this.right.idle(g),this.radius.idle(g),this.angle.idle(g)},v.flush=function(g){this.center.flush(g),this.up.flush(g),this.right.flush(g),this.radius.flush(g),this.angle.flush(g)},v.setDistance=function(g,m){m>0&&this.radius.set(g,Math.log(m))},v.lookAt=function(g,m,k,h){this.recalcMatrix(g),m=m||this.computedEye,k=k||this.computedCenter;var M=(h=h||this.computedUp)[0],A=h[1],C=h[2],L=p(M,A,C);if(!(L<1e-6)){M/=L,A/=L,C/=L;var O=m[0]-k[0],I=m[1]-k[1],R=m[2]-k[2],U=p(O,I,R);if(!(U<1e-6)){O/=U,I/=U,R/=U;var B=this.computedRight,G=B[0],N=B[1],j=B[2],V=M*G+A*N+C*j,H=p(G-=V*M,N-=V*A,j-=V*C);if(!(H<.01&&(H=p(G=A*R-C*I,N=C*O-M*R,j=M*I-A*O))<1e-6)){G/=H,N/=H,j/=H,this.up.set(g,M,A,C),this.right.set(g,G,N,j),this.center.set(g,k[0],k[1],k[2]),this.radius.set(g,Math.log(U));var ee=A*j-C*N,Q=C*G-M*j,X=M*N-A*G,Y=p(ee,Q,X),K=M*O+A*I+C*R,te=G*O+N*I+j*R,ae=(ee/=Y)*O+(Q/=Y)*I+(X/=Y)*R,oe=Math.asin(c(K)),se=Math.atan2(ae,te),fe=this.angle._state,ye=fe[fe.length-1],pe=fe[fe.length-2];ye%=2*Math.PI;var de=Math.abs(ye+2*Math.PI-se),he=Math.abs(ye-se),xe=Math.abs(ye-2*Math.PI-se);de0?N.pop():new ArrayBuffer(B)}function x(B){return new Uint8Array(v(B),0,B)}function g(B){return new Uint16Array(v(2*B),0,B)}function m(B){return new Uint32Array(v(4*B),0,B)}function k(B){return new Int8Array(v(B),0,B)}function h(B){return new Int16Array(v(2*B),0,B)}function M(B){return new Int32Array(v(4*B),0,B)}function A(B){return new Float32Array(v(4*B),0,B)}function C(B){return new Float64Array(v(8*B),0,B)}function L(B){return o?new Uint8ClampedArray(v(B),0,B):x(B)}function O(B){return a?new BigUint64Array(v(8*B),0,B):null}function I(B){return u?new BigInt64Array(v(8*B),0,B):null}function R(B){return new DataView(v(B),0,B)}function U(B){B=i.nextPow2(B);var G=i.log2(B),N=b[G];return N.length>0?N.pop():new n(B)}l.free=function(B){if(n.isBuffer(B))b[i.log2(B.length)].push(B);else{if(Object.prototype.toString.call(B)!=="[object ArrayBuffer]"&&(B=B.buffer),!B)return;var G=B.length||B.byteLength,N=0|i.log2(G);c[N].push(B)}},l.freeUint8=l.freeUint16=l.freeUint32=l.freeBigUint64=l.freeInt8=l.freeInt16=l.freeInt32=l.freeBigInt64=l.freeFloat32=l.freeFloat=l.freeFloat64=l.freeDouble=l.freeUint8Clamped=l.freeDataView=function(B){d(B.buffer)},l.freeArrayBuffer=d,l.freeBuffer=function(B){b[i.log2(B.length)].push(B)},l.malloc=function(B,G){if(G===void 0||G==="arraybuffer")return v(B);switch(G){case"uint8":return x(B);case"uint16":return g(B);case"uint32":return m(B);case"int8":return k(B);case"int16":return h(B);case"int32":return M(B);case"float":case"float32":return A(B);case"double":case"float64":return C(B);case"uint8_clamped":return L(B);case"bigint64":return I(B);case"biguint64":return O(B);case"buffer":return U(B);case"data":case"dataview":return R(B);default:return null}return null},l.mallocArrayBuffer=v,l.mallocUint8=x,l.mallocUint16=g,l.mallocUint32=m,l.mallocInt8=k,l.mallocInt16=h,l.mallocInt32=M,l.mallocFloat32=l.mallocFloat=A,l.mallocFloat64=l.mallocDouble=C,l.mallocUint8Clamped=L,l.mallocBigUint64=O,l.mallocBigInt64=I,l.mallocDataView=R,l.mallocBuffer=U,l.clearCache=function(){for(var B=0;B<32;++B)p.UINT8[B].length=0,p.UINT16[B].length=0,p.UINT32[B].length=0,p.INT8[B].length=0,p.INT16[B].length=0,p.INT32[B].length=0,p.FLOAT[B].length=0,p.DOUBLE[B].length=0,p.BIGUINT64[B].length=0,p.BIGINT64[B].length=0,p.UINT8C[B].length=0,c[B].length=0,b[B].length=0}},1731:function(f){function l(i){this.roots=new Array(i),this.ranks=new Array(i);for(var r=0;r0&&(M=h.size),h.lineSpacing&&h.lineSpacing>0&&(A=h.lineSpacing),h.styletags&&h.styletags.breaklines&&(C.breaklines=!!h.styletags.breaklines),h.styletags&&h.styletags.bolds&&(C.bolds=!!h.styletags.bolds),h.styletags&&h.styletags.italics&&(C.italics=!!h.styletags.italics),h.styletags&&h.styletags.subscripts&&(C.subscripts=!!h.styletags.subscripts),h.styletags&&h.styletags.superscripts&&(C.superscripts=!!h.styletags.superscripts)),k.font=[h.fontStyle,h.fontVariant,h.fontWeight,M+"px",h.font].filter(function(L){return L}).join(" "),k.textAlign="start",k.textBaseline="alphabetic",k.direction="ltr",x(function(L,O,I,R,U,B){I=I.replace(/\n/g,""),I=B.breaklines===!0?I.replace(/\/g,` -`):I.replace(/\/g," ");var G="",N=[];for(ee=0;ee-1?parseInt(ue[1+Ee]):0,je=Ue>-1?parseInt(me[1+Ue]):0;De!==je&&(Te=Te.replace(xe(),"?px "),Y*=Math.pow(.75,je-De),Te=Te.replace("?px ",xe())),X+=.25*ae*(je-De)}if(B.superscripts===!0){var ge=ue.indexOf("+"),be=me.indexOf("+"),Se=ge>-1?parseInt(ue[1+ge]):0,Ne=be>-1?parseInt(me[1+be]):0;Se!==Ne&&(Te=Te.replace(xe(),"?px "),Y*=Math.pow(.75,Ne-Se),Te=Te.replace("?px ",xe())),X-=.25*ae*(Ne-Se)}if(B.bolds===!0){var Ye=ue.indexOf(p)>-1,Ze=me.indexOf(p)>-1;!Ye&&Ze&&(Te=st?Te.replace("italic ","italic bold "):"bold "+Te),Ye&&!Ze&&(Te=Te.replace("bold ",""))}if(B.italics===!0){var st=ue.indexOf(c)>-1,ot=me.indexOf(c)>-1;!st&&ot&&(Te="italic "+Te),st&&!ot&&(Te=Te.replace("italic ",""))}O.font=Te}for(H=0;H",A="",C=M.length,L=A.length,O=m[0]==="+"||m[0]==="-",I=0,R=-L;I>-1&&(I=k.indexOf(M,I))!==-1&&(R=k.indexOf(A,I+C))!==-1&&!(R<=I);){for(var U=I;U=R)h[U]=null,k=k.substr(0,U)+" "+k.substr(U+1);else if(h[U]!==null){var B=h[U].indexOf(m[0]);B===-1?h[U]+=m:O&&(h[U]=h[U].substr(0,B+1)+(1+parseInt(h[U][B+1]))+h[U].substr(B+2))}var G=I+C,N=k.substr(G,R-G).indexOf(M);I=N!==-1?N:R+L}return h}function d(g,m){var k=i(g,128);return m?n(k.cells,k.positions,.25):{edges:k.cells,positions:k.positions}}function v(g,m,k,h){var M=d(g,h),A=function(H,ee,Q){for(var X=ee.textAlign||"start",Y=ee.textBaseline||"alphabetic",K=[1<<30,1<<30],te=[0,0],ae=H.length,oe=0;oe"u"||!ses.ok||ses.ok()){typeof ses<"u"&&(ses.weakMapPermitHostObjects=m);var l=!1;if(typeof WeakMap=="function"){var t=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var i=new t,r=Object.freeze({});if(i.set(r,1),i.get(r)===1)return void(f.exports=WeakMap);l=!0}}var n=Object.getOwnPropertyNames,o=Object.defineProperty,a=Object.isExtensible,u="weakmap:",p="weakmap:ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var c=new ArrayBuffer(25),b=new Uint8Array(c);crypto.getRandomValues(b),p="weakmap:rand:"+Array.prototype.map.call(b,function(C){return(C%36).toString(36)}).join("")+"___"}if(o(Object,"getOwnPropertyNames",{value:function(C){return n(C).filter(k)}}),"getPropertyNames"in Object){var d=Object.getPropertyNames;o(Object,"getPropertyNames",{value:function(C){return d(C).filter(k)}})}(function(){var C=Object.freeze;o(Object,"freeze",{value:function(I){return h(I),C(I)}});var L=Object.seal;o(Object,"seal",{value:function(I){return h(I),L(I)}});var O=Object.preventExtensions;o(Object,"preventExtensions",{value:function(I){return h(I),O(I)}})})();var v=!1,x=0,g=function(){this instanceof g||A();var C=[],L=[],O=x++;return Object.create(g.prototype,{get___:{value:M(function(I,R){var U,B=h(I);return B?O in B?B[O]:R:(U=C.indexOf(I))>=0?L[U]:R})},has___:{value:M(function(I){var R=h(I);return R?O in R:C.indexOf(I)>=0})},set___:{value:M(function(I,R){var U,B=h(I);return B?B[O]=R:(U=C.indexOf(I))>=0?L[U]=R:(U=C.length,L[U]=R,C[U]=I),this})},delete___:{value:M(function(I){var R,U,B=h(I);return B?O in B&&delete B[O]:!((R=C.indexOf(I))<0||(U=C.length-1,C[R]=void 0,L[R]=L[U],C[R]=C[U],C.length=U,L.length=U,0))})}})};g.prototype=Object.create(Object.prototype,{get:{value:function(C,L){return this.get___(C,L)},writable:!0,configurable:!0},has:{value:function(C){return this.has___(C)},writable:!0,configurable:!0},set:{value:function(C,L){return this.set___(C,L)},writable:!0,configurable:!0},delete:{value:function(C){return this.delete___(C)},writable:!0,configurable:!0}}),typeof t=="function"?function(){function C(){this instanceof g||A();var L,O=new t,I=void 0,R=!1;return L=l?function(U,B){return O.set(U,B),O.has(U)||(I||(I=new g),I.set(U,B)),this}:function(U,B){if(R)try{O.set(U,B)}catch{I||(I=new g),I.set___(U,B)}else O.set(U,B);return this},Object.create(g.prototype,{get___:{value:M(function(U,B){return I?O.has(U)?O.get(U):I.get___(U,B):O.get(U,B)})},has___:{value:M(function(U){return O.has(U)||!!I&&I.has___(U)})},set___:{value:M(L)},delete___:{value:M(function(U){var B=!!O.delete(U);return I&&I.delete___(U)||B})},permitHostObjects___:{value:M(function(U){if(U!==m)throw new Error("bogus call to permitHostObjects___");R=!0})}})}l&&typeof Proxy<"u"&&(Proxy=void 0),C.prototype=g.prototype,f.exports=C,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),f.exports=g)}function m(C){C.permitHostObjects___&&C.permitHostObjects___(m)}function k(C){return!(C.substr(0,u.length)==u&&C.substr(C.length-3)==="___")}function h(C){if(C!==Object(C))throw new TypeError("Not an object: "+C);var L=C[p];if(L&&L.key===C)return L;if(a(C)){L={key:C};try{return o(C,p,{value:L,writable:!1,enumerable:!1,configurable:!1}),L}catch{return}}}function M(C){return C.prototype=null,Object.freeze(C)}function A(){v||typeof console>"u"||(v=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}})()},9222:function(f,l,t){var i=t(7178);f.exports=function(){var r={};return function(n){if((typeof n!="object"||n===null)&&typeof n!="function")throw new Error("Weakmap-shim: Key must be object");var o=n.valueOf(r);return o&&o.identity===r?o:i(n,r)}}},7178:function(f){f.exports=function(l,t){var i={identity:t},r=l.valueOf;return Object.defineProperty(l,"valueOf",{value:function(n){return n!==t?r.apply(this,arguments):i},writable:!0}),i}},4037:function(f,l,t){var i=t(9222);f.exports=function(){var r=i();return{get:function(n,o){var a=r(n);return a.hasOwnProperty("value")?a.value:o},set:function(n,o){return r(n).value=o,this},has:function(n){return"value"in r(n)},delete:function(n){return delete r(n).value}}}},6183:function(f){f.exports=function(l){var t={};return function(i,r,n){var o=i.dtype,a=i.order,u=[o,a.join()].join(),p=t[u];return p||(t[u]=p=l([o,a])),p(i.shape.slice(0),i.data,i.stride,0|i.offset,r,n)}}(function(){return function(l,t,i,r,n,o){var a=l[0],u=i[0],p=[0],c=u;r|=0;var b=0,d=u;for(b=0;b=0!=x>=0&&n.push(p[0]+.5+.5*(v+x)/(v-x)),r+=d,++p[0]}}}.bind(void 0,{funcName:"zeroCrossings"}))},9584:function(f,l,t){f.exports=function(r,n){var o=[];return n=+n||0,i(r.hi(r.shape[0]-1),o,n),o};var i=t(6183)},6601:function(){}},T={};function y(f){var l=T[f];if(l!==void 0)return l.exports;var t=T[f]={id:f,loaded:!1,exports:{}};return s[f].call(t.exports,t,t.exports,y),t.loaded=!0,t.exports}return y.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),y.nmd=function(f){return f.paths=[],f.children||(f.children=[]),f},y(7386)}()},D.exports=_()},12856:function(D,E,e){function _(ne,ue){if(!(ne instanceof ue))throw new TypeError("Cannot call a class as a function")}function w(ne,ue){for(var me=0;men)throw new RangeError('The value "'+ne+'" is invalid for option "size"');var ue=new Uint8Array(ne);return Object.setPrototypeOf(ue,a.prototype),ue}function a(ne,ue,me){if(typeof ne=="number"){if(typeof ue=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return c(ne)}return u(ne,ue,me)}function u(ne,ue,me){if(typeof ne=="string")return function(Ue,De){if(typeof De=="string"&&De!==""||(De="utf8"),!a.isEncoding(De))throw new TypeError("Unknown encoding: "+De);var je=0|x(Ue,De),ge=o(je),be=ge.write(Ue,De);return be!==je&&(ge=ge.slice(0,be)),ge}(ne,ue);if(ArrayBuffer.isView(ne))return function(Ue){if(Re(Ue,Uint8Array)){var De=new Uint8Array(Ue);return d(De.buffer,De.byteOffset,De.byteLength)}return b(Ue)}(ne);if(ne==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(ne));if(Re(ne,ArrayBuffer)||ne&&Re(ne.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Re(ne,SharedArrayBuffer)||ne&&Re(ne.buffer,SharedArrayBuffer)))return d(ne,ue,me);if(typeof ne=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Te=ne.valueOf&&ne.valueOf();if(Te!=null&&Te!==ne)return a.from(Te,ue,me);var Ee=function(Ue){if(a.isBuffer(Ue)){var De=0|v(Ue.length),je=o(De);return je.length===0||Ue.copy(je,0,0,De),je}return Ue.length!==void 0?typeof Ue.length!="number"||we(Ue.length)?o(0):b(Ue):Ue.type==="Buffer"&&Array.isArray(Ue.data)?b(Ue.data):void 0}(ne);if(Ee)return Ee;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ne[Symbol.toPrimitive]=="function")return a.from(ne[Symbol.toPrimitive]("string"),ue,me);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(ne))}function p(ne){if(typeof ne!="number")throw new TypeError('"size" argument must be of type number');if(ne<0)throw new RangeError('The value "'+ne+'" is invalid for option "size"')}function c(ne){return p(ne),o(ne<0?0:0|v(ne))}function b(ne){for(var ue=ne.length<0?0:0|v(ne.length),me=o(ue),Te=0;Te=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return 0|ne}function x(ne,ue){if(a.isBuffer(ne))return ne.length;if(ArrayBuffer.isView(ne)||Re(ne,ArrayBuffer))return ne.byteLength;if(typeof ne!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+l(ne));var me=ne.length,Te=arguments.length>2&&arguments[2]===!0;if(!Te&&me===0)return 0;for(var Ee=!1;;)switch(ue){case"ascii":case"latin1":case"binary":return me;case"utf8":case"utf-8":return de(ne).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*me;case"hex":return me>>>1;case"base64":return he(ne).length;default:if(Ee)return Te?-1:de(ne).length;ue=(""+ue).toLowerCase(),Ee=!0}}function g(ne,ue,me){var Te=!1;if((ue===void 0||ue<0)&&(ue=0),ue>this.length||((me===void 0||me>this.length)&&(me=this.length),me<=0)||(me>>>=0)<=(ue>>>=0))return"";for(ne||(ne="utf8");;)switch(ne){case"hex":return N(this,ue,me);case"utf8":case"utf-8":return R(this,ue,me);case"ascii":return B(this,ue,me);case"latin1":case"binary":return G(this,ue,me);case"base64":return I(this,ue,me);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,ue,me);default:if(Te)throw new TypeError("Unknown encoding: "+ne);ne=(ne+"").toLowerCase(),Te=!0}}function m(ne,ue,me){var Te=ne[ue];ne[ue]=ne[me],ne[me]=Te}function k(ne,ue,me,Te,Ee){if(ne.length===0)return-1;if(typeof me=="string"?(Te=me,me=0):me>2147483647?me=2147483647:me<-2147483648&&(me=-2147483648),we(me=+me)&&(me=Ee?0:ne.length-1),me<0&&(me=ne.length+me),me>=ne.length){if(Ee)return-1;me=ne.length-1}else if(me<0){if(!Ee)return-1;me=0}if(typeof ue=="string"&&(ue=a.from(ue,Te)),a.isBuffer(ue))return ue.length===0?-1:h(ne,ue,me,Te,Ee);if(typeof ue=="number")return ue&=255,typeof Uint8Array.prototype.indexOf=="function"?Ee?Uint8Array.prototype.indexOf.call(ne,ue,me):Uint8Array.prototype.lastIndexOf.call(ne,ue,me):h(ne,[ue],me,Te,Ee);throw new TypeError("val must be string, number or Buffer")}function h(ne,ue,me,Te,Ee){var Ue,De=1,je=ne.length,ge=ue.length;if(Te!==void 0&&((Te=String(Te).toLowerCase())==="ucs2"||Te==="ucs-2"||Te==="utf16le"||Te==="utf-16le")){if(ne.length<2||ue.length<2)return-1;De=2,je/=2,ge/=2,me/=2}function be(Ze,st){return De===1?Ze[st]:Ze.readUInt16BE(st*De)}if(Ee){var Se=-1;for(Ue=me;Ueje&&(me=je-ge),Ue=me;Ue>=0;Ue--){for(var Ne=!0,Ye=0;YeEe&&(Te=Ee):Te=Ee;var Ue,De=ue.length;for(Te>De/2&&(Te=De/2),Ue=0;Ue>8,ge=De%256,be.push(ge),be.push(je);return be}(ue,ne.length-me),ne,me,Te)}function I(ne,ue,me){return ue===0&&me===ne.length?t.fromByteArray(ne):t.fromByteArray(ne.slice(ue,me))}function R(ne,ue,me){me=Math.min(ne.length,me);for(var Te=[],Ee=ue;Ee239?4:Ue>223?3:Ue>191?2:1;if(Ee+je<=me){var ge=void 0,be=void 0,Se=void 0,Ne=void 0;switch(je){case 1:Ue<128&&(De=Ue);break;case 2:(192&(ge=ne[Ee+1]))==128&&(Ne=(31&Ue)<<6|63&ge)>127&&(De=Ne);break;case 3:ge=ne[Ee+1],be=ne[Ee+2],(192&ge)==128&&(192&be)==128&&(Ne=(15&Ue)<<12|(63&ge)<<6|63&be)>2047&&(Ne<55296||Ne>57343)&&(De=Ne);break;case 4:ge=ne[Ee+1],be=ne[Ee+2],Se=ne[Ee+3],(192&ge)==128&&(192&be)==128&&(192&Se)==128&&(Ne=(15&Ue)<<18|(63&ge)<<12|(63&be)<<6|63&Se)>65535&&Ne<1114112&&(De=Ne)}}De===null?(De=65533,je=1):De>65535&&(De-=65536,Te.push(De>>>10&1023|55296),De=56320|1023&De),Te.push(De),Ee+=je}return function(Ye){var Ze=Ye.length;if(Ze<=U)return String.fromCharCode.apply(String,Ye);for(var st="",ot=0;ot"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(ne,ue,me){return u(ne,ue,me)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(ne,ue,me){return function(Te,Ee,Ue){return p(Te),Te<=0?o(Te):Ee!==void 0?typeof Ue=="string"?o(Te).fill(Ee,Ue):o(Te).fill(Ee):o(Te)}(ne,ue,me)},a.allocUnsafe=function(ne){return c(ne)},a.allocUnsafeSlow=function(ne){return c(ne)},a.isBuffer=function(ne){return ne!=null&&ne._isBuffer===!0&&ne!==a.prototype},a.compare=function(ne,ue){if(Re(ne,Uint8Array)&&(ne=a.from(ne,ne.offset,ne.byteLength)),Re(ue,Uint8Array)&&(ue=a.from(ue,ue.offset,ue.byteLength)),!a.isBuffer(ne)||!a.isBuffer(ue))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ne===ue)return 0;for(var me=ne.length,Te=ue.length,Ee=0,Ue=Math.min(me,Te);EeTe.length?(a.isBuffer(Ue)||(Ue=a.from(Ue)),Ue.copy(Te,Ee)):Uint8Array.prototype.set.call(Te,Ue,Ee);else{if(!a.isBuffer(Ue))throw new TypeError('"list" argument must be an Array of Buffers');Ue.copy(Te,Ee)}Ee+=Ue.length}return Te},a.byteLength=x,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var ne=this.length;if(ne%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ue=0;ueue&&(ne+=" ... "),""},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(ne,ue,me,Te,Ee){if(Re(ne,Uint8Array)&&(ne=a.from(ne,ne.offset,ne.byteLength)),!a.isBuffer(ne))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+l(ne));if(ue===void 0&&(ue=0),me===void 0&&(me=ne?ne.length:0),Te===void 0&&(Te=0),Ee===void 0&&(Ee=this.length),ue<0||me>ne.length||Te<0||Ee>this.length)throw new RangeError("out of range index");if(Te>=Ee&&ue>=me)return 0;if(Te>=Ee)return-1;if(ue>=me)return 1;if(this===ne)return 0;for(var Ue=(Ee>>>=0)-(Te>>>=0),De=(me>>>=0)-(ue>>>=0),je=Math.min(Ue,De),ge=this.slice(Te,Ee),be=ne.slice(ue,me),Se=0;Se>>=0,isFinite(me)?(me>>>=0,Te===void 0&&(Te="utf8")):(Te=me,me=void 0)}var Ee=this.length-ue;if((me===void 0||me>Ee)&&(me=Ee),ne.length>0&&(me<0||ue<0)||ue>this.length)throw new RangeError("Attempt to write outside buffer bounds");Te||(Te="utf8");for(var Ue=!1;;)switch(Te){case"hex":return M(this,ne,ue,me);case"utf8":case"utf-8":return A(this,ne,ue,me);case"ascii":case"latin1":case"binary":return C(this,ne,ue,me);case"base64":return L(this,ne,ue,me);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,ne,ue,me);default:if(Ue)throw new TypeError("Unknown encoding: "+Te);Te=(""+Te).toLowerCase(),Ue=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var U=4096;function B(ne,ue,me){var Te="";me=Math.min(ne.length,me);for(var Ee=ue;EeTe)&&(me=Te);for(var Ee="",Ue=ue;Ueme)throw new RangeError("Trying to access beyond buffer length")}function H(ne,ue,me,Te,Ee,Ue){if(!a.isBuffer(ne))throw new TypeError('"buffer" argument must be a Buffer instance');if(ue>Ee||uene.length)throw new RangeError("Index out of range")}function ee(ne,ue,me,Te,Ee){se(ue,Te,Ee,ne,me,7);var Ue=Number(ue&BigInt(4294967295));ne[me++]=Ue,Ue>>=8,ne[me++]=Ue,Ue>>=8,ne[me++]=Ue,Ue>>=8,ne[me++]=Ue;var De=Number(ue>>BigInt(32)&BigInt(4294967295));return ne[me++]=De,De>>=8,ne[me++]=De,De>>=8,ne[me++]=De,De>>=8,ne[me++]=De,me}function Q(ne,ue,me,Te,Ee){se(ue,Te,Ee,ne,me,7);var Ue=Number(ue&BigInt(4294967295));ne[me+7]=Ue,Ue>>=8,ne[me+6]=Ue,Ue>>=8,ne[me+5]=Ue,Ue>>=8,ne[me+4]=Ue;var De=Number(ue>>BigInt(32)&BigInt(4294967295));return ne[me+3]=De,De>>=8,ne[me+2]=De,De>>=8,ne[me+1]=De,De>>=8,ne[me]=De,me+8}function X(ne,ue,me,Te,Ee,Ue){if(me+Te>ne.length)throw new RangeError("Index out of range");if(me<0)throw new RangeError("Index out of range")}function Y(ne,ue,me,Te,Ee){return ue=+ue,me>>>=0,Ee||X(ne,0,me,4),i.write(ne,ue,me,Te,23,4),me+4}function K(ne,ue,me,Te,Ee){return ue=+ue,me>>>=0,Ee||X(ne,0,me,8),i.write(ne,ue,me,Te,52,8),me+8}a.prototype.slice=function(ne,ue){var me=this.length;(ne=~~ne)<0?(ne+=me)<0&&(ne=0):ne>me&&(ne=me),(ue=ue===void 0?me:~~ue)<0?(ue+=me)<0&&(ue=0):ue>me&&(ue=me),ue>>=0,ue>>>=0,me||V(ne,ue,this.length);for(var Te=this[ne],Ee=1,Ue=0;++Ue>>=0,ue>>>=0,me||V(ne,ue,this.length);for(var Te=this[ne+--ue],Ee=1;ue>0&&(Ee*=256);)Te+=this[ne+--ue]*Ee;return Te},a.prototype.readUint8=a.prototype.readUInt8=function(ne,ue){return ne>>>=0,ue||V(ne,1,this.length),this[ne]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(ne,ue){return ne>>>=0,ue||V(ne,2,this.length),this[ne]|this[ne+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(ne,ue){return ne>>>=0,ue||V(ne,2,this.length),this[ne]<<8|this[ne+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(ne,ue){return ne>>>=0,ue||V(ne,4,this.length),(this[ne]|this[ne+1]<<8|this[ne+2]<<16)+16777216*this[ne+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(ne,ue){return ne>>>=0,ue||V(ne,4,this.length),16777216*this[ne]+(this[ne+1]<<16|this[ne+2]<<8|this[ne+3])},a.prototype.readBigUInt64LE=Me(function(ne){fe(ne>>>=0,"offset");var ue=this[ne],me=this[ne+7];ue!==void 0&&me!==void 0||ye(ne,this.length-8);var Te=ue+this[++ne]*Math.pow(2,8)+this[++ne]*Math.pow(2,16)+this[++ne]*Math.pow(2,24),Ee=this[++ne]+this[++ne]*Math.pow(2,8)+this[++ne]*Math.pow(2,16)+me*Math.pow(2,24);return BigInt(Te)+(BigInt(Ee)<>>=0,"offset");var ue=this[ne],me=this[ne+7];ue!==void 0&&me!==void 0||ye(ne,this.length-8);var Te=ue*Math.pow(2,24)+this[++ne]*Math.pow(2,16)+this[++ne]*Math.pow(2,8)+this[++ne],Ee=this[++ne]*Math.pow(2,24)+this[++ne]*Math.pow(2,16)+this[++ne]*Math.pow(2,8)+me;return(BigInt(Te)<>>=0,ue>>>=0,me||V(ne,ue,this.length);for(var Te=this[ne],Ee=1,Ue=0;++Ue=(Ee*=128)&&(Te-=Math.pow(2,8*ue)),Te},a.prototype.readIntBE=function(ne,ue,me){ne>>>=0,ue>>>=0,me||V(ne,ue,this.length);for(var Te=ue,Ee=1,Ue=this[ne+--Te];Te>0&&(Ee*=256);)Ue+=this[ne+--Te]*Ee;return Ue>=(Ee*=128)&&(Ue-=Math.pow(2,8*ue)),Ue},a.prototype.readInt8=function(ne,ue){return ne>>>=0,ue||V(ne,1,this.length),128&this[ne]?-1*(255-this[ne]+1):this[ne]},a.prototype.readInt16LE=function(ne,ue){ne>>>=0,ue||V(ne,2,this.length);var me=this[ne]|this[ne+1]<<8;return 32768&me?4294901760|me:me},a.prototype.readInt16BE=function(ne,ue){ne>>>=0,ue||V(ne,2,this.length);var me=this[ne+1]|this[ne]<<8;return 32768&me?4294901760|me:me},a.prototype.readInt32LE=function(ne,ue){return ne>>>=0,ue||V(ne,4,this.length),this[ne]|this[ne+1]<<8|this[ne+2]<<16|this[ne+3]<<24},a.prototype.readInt32BE=function(ne,ue){return ne>>>=0,ue||V(ne,4,this.length),this[ne]<<24|this[ne+1]<<16|this[ne+2]<<8|this[ne+3]},a.prototype.readBigInt64LE=Me(function(ne){fe(ne>>>=0,"offset");var ue=this[ne],me=this[ne+7];ue!==void 0&&me!==void 0||ye(ne,this.length-8);var Te=this[ne+4]+this[ne+5]*Math.pow(2,8)+this[ne+6]*Math.pow(2,16)+(me<<24);return(BigInt(Te)<>>=0,"offset");var ue=this[ne],me=this[ne+7];ue!==void 0&&me!==void 0||ye(ne,this.length-8);var Te=(ue<<24)+this[++ne]*Math.pow(2,16)+this[++ne]*Math.pow(2,8)+this[++ne];return(BigInt(Te)<>>=0,ue||V(ne,4,this.length),i.read(this,ne,!0,23,4)},a.prototype.readFloatBE=function(ne,ue){return ne>>>=0,ue||V(ne,4,this.length),i.read(this,ne,!1,23,4)},a.prototype.readDoubleLE=function(ne,ue){return ne>>>=0,ue||V(ne,8,this.length),i.read(this,ne,!0,52,8)},a.prototype.readDoubleBE=function(ne,ue){return ne>>>=0,ue||V(ne,8,this.length),i.read(this,ne,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(ne,ue,me,Te){ne=+ne,ue>>>=0,me>>>=0,Te||H(this,ne,ue,me,Math.pow(2,8*me)-1,0);var Ee=1,Ue=0;for(this[ue]=255≠++Ue>>=0,me>>>=0,Te||H(this,ne,ue,me,Math.pow(2,8*me)-1,0);var Ee=me-1,Ue=1;for(this[ue+Ee]=255≠--Ee>=0&&(Ue*=256);)this[ue+Ee]=ne/Ue&255;return ue+me},a.prototype.writeUint8=a.prototype.writeUInt8=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,1,255,0),this[ue]=255&ne,ue+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,2,65535,0),this[ue]=255&ne,this[ue+1]=ne>>>8,ue+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,2,65535,0),this[ue]=ne>>>8,this[ue+1]=255&ne,ue+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,4,4294967295,0),this[ue+3]=ne>>>24,this[ue+2]=ne>>>16,this[ue+1]=ne>>>8,this[ue]=255&ne,ue+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,4,4294967295,0),this[ue]=ne>>>24,this[ue+1]=ne>>>16,this[ue+2]=ne>>>8,this[ue+3]=255&ne,ue+4},a.prototype.writeBigUInt64LE=Me(function(ne){var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ee(this,ne,ue,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=Me(function(ne){var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Q(this,ne,ue,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(ne,ue,me,Te){if(ne=+ne,ue>>>=0,!Te){var Ee=Math.pow(2,8*me-1);H(this,ne,ue,me,Ee-1,-Ee)}var Ue=0,De=1,je=0;for(this[ue]=255≠++Ue>0)-je&255;return ue+me},a.prototype.writeIntBE=function(ne,ue,me,Te){if(ne=+ne,ue>>>=0,!Te){var Ee=Math.pow(2,8*me-1);H(this,ne,ue,me,Ee-1,-Ee)}var Ue=me-1,De=1,je=0;for(this[ue+Ue]=255≠--Ue>=0&&(De*=256);)ne<0&&je===0&&this[ue+Ue+1]!==0&&(je=1),this[ue+Ue]=(ne/De>>0)-je&255;return ue+me},a.prototype.writeInt8=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,1,127,-128),ne<0&&(ne=255+ne+1),this[ue]=255&ne,ue+1},a.prototype.writeInt16LE=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,2,32767,-32768),this[ue]=255&ne,this[ue+1]=ne>>>8,ue+2},a.prototype.writeInt16BE=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,2,32767,-32768),this[ue]=ne>>>8,this[ue+1]=255&ne,ue+2},a.prototype.writeInt32LE=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,4,2147483647,-2147483648),this[ue]=255&ne,this[ue+1]=ne>>>8,this[ue+2]=ne>>>16,this[ue+3]=ne>>>24,ue+4},a.prototype.writeInt32BE=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,4,2147483647,-2147483648),ne<0&&(ne=4294967295+ne+1),this[ue]=ne>>>24,this[ue+1]=ne>>>16,this[ue+2]=ne>>>8,this[ue+3]=255&ne,ue+4},a.prototype.writeBigInt64LE=Me(function(ne){var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ee(this,ne,ue,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=Me(function(ne){var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Q(this,ne,ue,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeFloatLE=function(ne,ue,me){return Y(this,ne,ue,!0,me)},a.prototype.writeFloatBE=function(ne,ue,me){return Y(this,ne,ue,!1,me)},a.prototype.writeDoubleLE=function(ne,ue,me){return K(this,ne,ue,!0,me)},a.prototype.writeDoubleBE=function(ne,ue,me){return K(this,ne,ue,!1,me)},a.prototype.copy=function(ne,ue,me,Te){if(!a.isBuffer(ne))throw new TypeError("argument should be a Buffer");if(me||(me=0),Te||Te===0||(Te=this.length),ue>=ne.length&&(ue=ne.length),ue||(ue=0),Te>0&&Te=this.length)throw new RangeError("Index out of range");if(Te<0)throw new RangeError("sourceEnd out of bounds");Te>this.length&&(Te=this.length),ne.length-ue>>=0,me=me===void 0?this.length:me>>>0,ne||(ne=0),typeof ne=="number")for(Ue=ue;Ue"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var Se,Ne=f(De);if(je){var Ye=f(this).constructor;Se=Reflect.construct(Ne,arguments,Ye)}else Se=Ne.apply(this,arguments);return T(this,Se)});function be(){var Se;return _(this,be),Se=ge.call(this),Object.defineProperty(y(Se),"message",{value:ue.apply(y(Se),arguments),writable:!0,configurable:!0}),Se.name="".concat(Se.name," [").concat(ne,"]"),Se.stack,delete Se.name,Se}return Ee=be,(Ue=[{key:"code",get:function(){return ne},set:function(Se){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Se,writable:!0})}},{key:"toString",value:function(){return"".concat(this.name," [").concat(ne,"]: ").concat(this.message)}}])&&w(Ee.prototype,Ue),Object.defineProperty(Ee,"prototype",{writable:!1}),be}(me)}function oe(ne){for(var ue="",me=ne.length,Te=ne[0]==="-"?1:0;me>=Te+4;me-=3)ue="_".concat(ne.slice(me-3,me)).concat(ue);return"".concat(ne.slice(0,me)).concat(ue)}function se(ne,ue,me,Te,Ee,Ue){if(ne>me||ne3?ue===0||ue===BigInt(0)?">= 0".concat(je," and < 2").concat(je," ** ").concat(8*(Ue+1)).concat(je):">= -(2".concat(je," ** ").concat(8*(Ue+1)-1).concat(je,") and < 2 ** ")+"".concat(8*(Ue+1)-1).concat(je):">= ".concat(ue).concat(je," and <= ").concat(me).concat(je),new te.ERR_OUT_OF_RANGE("value",De,ne)}(function(ge,be,Se){fe(be,"offset"),ge[be]!==void 0&&ge[be+Se]!==void 0||ye(be,ge.length-(Se+1))})(Te,Ee,Ue)}function fe(ne,ue){if(typeof ne!="number")throw new te.ERR_INVALID_ARG_TYPE(ue,"number",ne)}function ye(ne,ue,me){throw Math.floor(ne)!==ne?(fe(ne,me),new te.ERR_OUT_OF_RANGE(me||"offset","an integer",ne)):ue<0?new te.ERR_BUFFER_OUT_OF_BOUNDS:new te.ERR_OUT_OF_RANGE(me||"offset",">= ".concat(me?1:0," and <= ").concat(ue),ne)}ae("ERR_BUFFER_OUT_OF_BOUNDS",function(ne){return ne?"".concat(ne," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),ae("ERR_INVALID_ARG_TYPE",function(ne,ue){return'The "'.concat(ne,'" argument must be of type number. Received type ').concat(l(ue))},TypeError),ae("ERR_OUT_OF_RANGE",function(ne,ue,me){var Te='The value of "'.concat(ne,'" is out of range.'),Ee=me;return Number.isInteger(me)&&Math.abs(me)>Math.pow(2,32)?Ee=oe(String(me)):typeof me=="bigint"&&(Ee=String(me),(me>Math.pow(BigInt(2),BigInt(32))||me<-Math.pow(BigInt(2),BigInt(32)))&&(Ee=oe(Ee)),Ee+="n"),Te+" It must be ".concat(ue,". Received ").concat(Ee)},RangeError);var pe=/[^+/0-9A-Za-z-_]/g;function de(ne,ue){var me;ue=ue||1/0;for(var Te=ne.length,Ee=null,Ue=[],De=0;De55295&&me<57344){if(!Ee){if(me>56319){(ue-=3)>-1&&Ue.push(239,191,189);continue}if(De+1===Te){(ue-=3)>-1&&Ue.push(239,191,189);continue}Ee=me;continue}if(me<56320){(ue-=3)>-1&&Ue.push(239,191,189),Ee=me;continue}me=65536+(Ee-55296<<10|me-56320)}else Ee&&(ue-=3)>-1&&Ue.push(239,191,189);if(Ee=null,me<128){if((ue-=1)<0)break;Ue.push(me)}else if(me<2048){if((ue-=2)<0)break;Ue.push(me>>6|192,63&me|128)}else if(me<65536){if((ue-=3)<0)break;Ue.push(me>>12|224,me>>6&63|128,63&me|128)}else{if(!(me<1114112))throw new Error("Invalid code point");if((ue-=4)<0)break;Ue.push(me>>18|240,me>>12&63|128,me>>6&63|128,63&me|128)}}return Ue}function he(ne){return t.toByteArray(function(ue){if((ue=(ue=ue.split("=")[0]).trim().replace(pe,"")).length<2)return"";for(;ue.length%4!=0;)ue+="=";return ue}(ne))}function xe(ne,ue,me,Te){var Ee;for(Ee=0;Ee=ue.length||Ee>=ne.length);++Ee)ue[Ee+me]=ne[Ee];return Ee}function Re(ne,ue){return ne instanceof ue||ne!=null&&ne.constructor!=null&&ne.constructor.name!=null&&ne.constructor.name===ue.name}function we(ne){return ne!=ne}var Ae=function(){for(var ne="0123456789abcdef",ue=new Array(256),me=0;me<16;++me)for(var Te=16*me,Ee=0;Ee<16;++Ee)ue[Te+Ee]=ne[me]+ne[Ee];return ue}();function Me(ne){return typeof BigInt>"u"?Ce:ne}function Ce(){throw new Error("BigInt not supported")}},35791:function(D){D.exports=w,D.exports.isMobile=w,D.exports.default=w;var E=/(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,e=/CrOS/,_=/android|ipad|playbook|silk/i;function w(s){s||(s={});var T=s.ua;if(T||typeof navigator>"u"||(T=navigator.userAgent),T&&T.headers&&typeof T.headers["user-agent"]=="string"&&(T=T.headers["user-agent"]),typeof T!="string")return!1;var y=E.test(T)&&!e.test(T)||!!s.tablet&&_.test(T);return!y&&s.tablet&&s.featureDetect&&navigator&&navigator.maxTouchPoints>1&&T.indexOf("Macintosh")!==-1&&T.indexOf("Safari")!==-1&&(y=!0),y}},86781:function(D,E,e){e.r(E),e.d(E,{sankeyCenter:function(){return r},sankeyCircular:function(){return C},sankeyJustify:function(){return i},sankeyLeft:function(){return l},sankeyRight:function(){return t}});var _=e(33064),w=e(15140),s=e(45879),T=e(2502),y=e.n(T);function f(he){return he.target.depth}function l(he){return he.depth}function t(he,xe){return xe-1-he.height}function i(he,xe){return he.sourceLinks.length?he.depth:xe-1}function r(he){return he.targetLinks.length?he.depth:he.sourceLinks.length?(0,_.VV)(he.sourceLinks,f)-1:0}function n(he){return function(){return he}}var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(he){return typeof he}:function(he){return he&&typeof Symbol=="function"&&he.constructor===Symbol&&he!==Symbol.prototype?"symbol":typeof he};function a(he,xe){return p(he.source,xe.source)||he.index-xe.index}function u(he,xe){return p(he.target,xe.target)||he.index-xe.index}function p(he,xe){return he.partOfCycle===xe.partOfCycle?he.y0-xe.y0:he.circularLinkType==="top"||xe.circularLinkType==="bottom"?-1:1}function c(he){return he.value}function b(he){return(he.y0+he.y1)/2}function d(he){return b(he.source)}function v(he){return b(he.target)}function x(he){return he.index}function g(he){return he.nodes}function m(he){return he.links}function k(he,xe){var Re=he.get(xe);if(!Re)throw new Error("missing: "+xe);return Re}function h(he,xe){return xe(he)}var M=25,A=10;function C(){var he,xe,Re=0,we=0,Ae=1,Me=1,Ce=24,ne=x,ue=i,me=g,Te=m,Ee=32,Ue=2,De=null;function je(){var Ze={nodes:me.apply(null,arguments),links:Te.apply(null,arguments)};ge(Ze),L(Ze,0,De),be(Ze),Se(Ze),O(Ze,ne),Ne(Ze,Ee,ne),Ye(Ze);for(var st=4,ot=0;ot0?Ke+M+A:Ke,bottom:Ge=Ge>0?Ge+M+A:Ge,left:ht=ht>0?ht+M+A:ht,right:nt=nt>0?nt+M+A:nt}}(Ze),Nt=function(Je,Ke){var Ge=(0,_.Fp)(Je.nodes,function(Qe){return Qe.column}),nt=Ae-Re,ht=Me-we,Oe=nt/(nt+Ke.right+Ke.left),Be=ht/(ht+Ke.top+Ke.bottom);return Re=Re*Oe+Ke.left,Ae=Ke.right==0?Ae:Ae*Oe,we=we*Be+Ke.top,Me*=Be,Je.nodes.forEach(function(Qe){Qe.x0=Re+Qe.column*((Ae-Re-Ce)/Ge),Qe.x1=Qe.x0+Ce}),Be}(Ze,qt);Ft*=Nt,Ze.links.forEach(function(Je){Je.width=Je.value*Ft}),ft.forEach(function(Je){var Ke=Je.length;Je.forEach(function(Ge,nt){Ge.depth==ft.length-1&&Ke==1||Ge.depth==0&&Ke==1?(Ge.y0=Me/2-Ge.value*Ft,Ge.y1=Ge.y0+Ge.value*Ft):Ge.partOfCycle?R(Ge,Dt)==0?(Ge.y0=Me/2+nt,Ge.y1=Ge.y0+Ge.value*Ft):Ge.circularLinkType=="top"?(Ge.y0=we+nt,Ge.y1=Ge.y0+Ge.value*Ft):(Ge.y0=Me-Ge.value*Ft-nt,Ge.y1=Ge.y0+Ge.value*Ft):qt.top==0||qt.bottom==0?(Ge.y0=(Me-we)/Ke*nt,Ge.y1=Ge.y0+Ge.value*Ft):(Ge.y0=(Me-we)/2-Ke/2+nt,Ge.y1=Ge.y0+Ge.value*Ft)})})})(ot),xt();for(var yt=1,Et=st;Et>0;--Et)Tt(yt*=.99,ot),xt();function Tt(Dt,It){var Ft=ft.length;ft.forEach(function(qt){var Nt=qt.length,Je=qt[0].depth;qt.forEach(function(Ke){var Ge;if((Ke.sourceLinks.length||Ke.targetLinks.length)&&!(Ke.partOfCycle&&R(Ke,It)>0))if(Je==0&&Nt==1)Ge=Ke.y1-Ke.y0,Ke.y0=Me/2-Ge/2,Ke.y1=Me/2+Ge/2;else if(Je==Ft-1&&Nt==1)Ge=Ke.y1-Ke.y0,Ke.y0=Me/2-Ge/2,Ke.y1=Me/2+Ge/2;else{var nt=(0,_.J6)(Ke.sourceLinks,v),ht=(0,_.J6)(Ke.targetLinks,d),Oe=((nt&&ht?(nt+ht)/2:nt||ht)-b(Ke))*Dt;Ke.y0+=Oe,Ke.y1+=Oe}})})}function xt(){ft.forEach(function(Dt){var It,Ft,qt,Nt=we,Je=Dt.length;for(Dt.sort(p),qt=0;qt0&&(It.y0+=Ft,It.y1+=Ft),Nt=It.y1+he;if((Ft=Nt-he-Me)>0)for(Nt=It.y0-=Ft,It.y1-=Ft,qt=Je-2;qt>=0;--qt)(Ft=(It=Dt[qt]).y1+he-Nt)>0&&(It.y0-=Ft,It.y1-=Ft),Nt=It.y0})}}function Ye(Ze){Ze.nodes.forEach(function(st){st.sourceLinks.sort(u),st.targetLinks.sort(a)}),Ze.nodes.forEach(function(st){var ot=st.y0,ft=ot,yt=st.y1,Et=yt;st.sourceLinks.forEach(function(Tt){Tt.circular?(Tt.y0=yt-Tt.width/2,yt-=Tt.width):(Tt.y0=ot+Tt.width/2,ot+=Tt.width)}),st.targetLinks.forEach(function(Tt){Tt.circular?(Tt.y1=Et-Tt.width/2,Et-=Tt.width):(Tt.y1=ft+Tt.width/2,ft+=Tt.width)})})}return je.nodeId=function(Ze){return arguments.length?(ne=typeof Ze=="function"?Ze:n(Ze),je):ne},je.nodeAlign=function(Ze){return arguments.length?(ue=typeof Ze=="function"?Ze:n(Ze),je):ue},je.nodeWidth=function(Ze){return arguments.length?(Ce=+Ze,je):Ce},je.nodePadding=function(Ze){return arguments.length?(he=+Ze,je):he},je.nodes=function(Ze){return arguments.length?(me=typeof Ze=="function"?Ze:n(Ze),je):me},je.links=function(Ze){return arguments.length?(Te=typeof Ze=="function"?Ze:n(Ze),je):Te},je.size=function(Ze){return arguments.length?(Re=we=0,Ae=+Ze[0],Me=+Ze[1],je):[Ae-Re,Me-we]},je.extent=function(Ze){return arguments.length?(Re=+Ze[0][0],Ae=+Ze[1][0],we=+Ze[0][1],Me=+Ze[1][1],je):[[Re,we],[Ae,Me]]},je.iterations=function(Ze){return arguments.length?(Ee=+Ze,je):Ee},je.circularLinkGap=function(Ze){return arguments.length?(Ue=+Ze,je):Ue},je.nodePaddingRatio=function(Ze){return arguments.length?(xe=+Ze,je):xe},je.sortNodes=function(Ze){return arguments.length?(De=Ze,je):De},je.update=function(Ze){return O(Ze,ne),Ye(Ze),Ze.links.forEach(function(st){st.circular&&(st.circularLinkType=st.y0+st.y11||Ae>1)}function B(he,xe,Re){return he.sort(N),he.forEach(function(we,Ae){var Me,Ce,ne=0;if(pe(we,Re)&&U(we))we.circularPathData.verticalBuffer=ne+we.width/2;else{for(var ue=0;ueCe.source.column)){var me=he[ue].circularPathData.verticalBuffer+he[ue].width/2+xe;ne=me>ne?me:ne}we.circularPathData.verticalBuffer=ne+we.width/2}}),he}function G(he,xe,Re,we){var Ae=(0,_.VV)(he.links,function(Me){return Me.source.y0});he.links.forEach(function(Me){Me.circular&&(Me.circularPathData={})}),B(he.links.filter(function(Me){return Me.circularLinkType=="top"}),xe,we),B(he.links.filter(function(Me){return Me.circularLinkType=="bottom"}),xe,we),he.links.forEach(function(Me){if(Me.circular){if(Me.circularPathData.arcRadius=Me.width+A,Me.circularPathData.leftNodeBuffer=5,Me.circularPathData.rightNodeBuffer=5,Me.circularPathData.sourceWidth=Me.source.x1-Me.source.x0,Me.circularPathData.sourceX=Me.source.x0+Me.circularPathData.sourceWidth,Me.circularPathData.targetX=Me.target.x0,Me.circularPathData.sourceY=Me.y0,Me.circularPathData.targetY=Me.y1,pe(Me,we)&&U(Me))Me.circularPathData.leftSmallArcRadius=A+Me.width/2,Me.circularPathData.leftLargeArcRadius=A+Me.width/2,Me.circularPathData.rightSmallArcRadius=A+Me.width/2,Me.circularPathData.rightLargeArcRadius=A+Me.width/2,Me.circularLinkType=="bottom"?(Me.circularPathData.verticalFullExtent=Me.source.y1+M+Me.circularPathData.verticalBuffer,Me.circularPathData.verticalLeftInnerExtent=Me.circularPathData.verticalFullExtent-Me.circularPathData.leftLargeArcRadius,Me.circularPathData.verticalRightInnerExtent=Me.circularPathData.verticalFullExtent-Me.circularPathData.rightLargeArcRadius):(Me.circularPathData.verticalFullExtent=Me.source.y0-M-Me.circularPathData.verticalBuffer,Me.circularPathData.verticalLeftInnerExtent=Me.circularPathData.verticalFullExtent+Me.circularPathData.leftLargeArcRadius,Me.circularPathData.verticalRightInnerExtent=Me.circularPathData.verticalFullExtent+Me.circularPathData.rightLargeArcRadius);else{var Ce=Me.source.column,ne=Me.circularLinkType,ue=he.links.filter(function(Ee){return Ee.source.column==Ce&&Ee.circularLinkType==ne});Me.circularLinkType=="bottom"?ue.sort(V):ue.sort(j);var me=0;ue.forEach(function(Ee,Ue){Ee.circularLinkID==Me.circularLinkID&&(Me.circularPathData.leftSmallArcRadius=A+Me.width/2+me,Me.circularPathData.leftLargeArcRadius=A+Me.width/2+Ue*xe+me),me+=Ee.width}),Ce=Me.target.column,ue=he.links.filter(function(Ee){return Ee.target.column==Ce&&Ee.circularLinkType==ne}),Me.circularLinkType=="bottom"?ue.sort(ee):ue.sort(H),me=0,ue.forEach(function(Ee,Ue){Ee.circularLinkID==Me.circularLinkID&&(Me.circularPathData.rightSmallArcRadius=A+Me.width/2+me,Me.circularPathData.rightLargeArcRadius=A+Me.width/2+Ue*xe+me),me+=Ee.width}),Me.circularLinkType=="bottom"?(Me.circularPathData.verticalFullExtent=Math.max(Re,Me.source.y1,Me.target.y1)+M+Me.circularPathData.verticalBuffer,Me.circularPathData.verticalLeftInnerExtent=Me.circularPathData.verticalFullExtent-Me.circularPathData.leftLargeArcRadius,Me.circularPathData.verticalRightInnerExtent=Me.circularPathData.verticalFullExtent-Me.circularPathData.rightLargeArcRadius):(Me.circularPathData.verticalFullExtent=Ae-M-Me.circularPathData.verticalBuffer,Me.circularPathData.verticalLeftInnerExtent=Me.circularPathData.verticalFullExtent+Me.circularPathData.leftLargeArcRadius,Me.circularPathData.verticalRightInnerExtent=Me.circularPathData.verticalFullExtent+Me.circularPathData.rightLargeArcRadius)}Me.circularPathData.leftInnerExtent=Me.circularPathData.sourceX+Me.circularPathData.leftNodeBuffer,Me.circularPathData.rightInnerExtent=Me.circularPathData.targetX-Me.circularPathData.rightNodeBuffer,Me.circularPathData.leftFullExtent=Me.circularPathData.sourceX+Me.circularPathData.leftLargeArcRadius+Me.circularPathData.leftNodeBuffer,Me.circularPathData.rightFullExtent=Me.circularPathData.targetX-Me.circularPathData.rightLargeArcRadius-Me.circularPathData.rightNodeBuffer}if(Me.circular)Me.path=function(Ee){return Ee.circularLinkType=="top"?"M"+Ee.circularPathData.sourceX+" "+Ee.circularPathData.sourceY+" L"+Ee.circularPathData.leftInnerExtent+" "+Ee.circularPathData.sourceY+" A"+Ee.circularPathData.leftLargeArcRadius+" "+Ee.circularPathData.leftSmallArcRadius+" 0 0 0 "+Ee.circularPathData.leftFullExtent+" "+(Ee.circularPathData.sourceY-Ee.circularPathData.leftSmallArcRadius)+" L"+Ee.circularPathData.leftFullExtent+" "+Ee.circularPathData.verticalLeftInnerExtent+" A"+Ee.circularPathData.leftLargeArcRadius+" "+Ee.circularPathData.leftLargeArcRadius+" 0 0 0 "+Ee.circularPathData.leftInnerExtent+" "+Ee.circularPathData.verticalFullExtent+" L"+Ee.circularPathData.rightInnerExtent+" "+Ee.circularPathData.verticalFullExtent+" A"+Ee.circularPathData.rightLargeArcRadius+" "+Ee.circularPathData.rightLargeArcRadius+" 0 0 0 "+Ee.circularPathData.rightFullExtent+" "+Ee.circularPathData.verticalRightInnerExtent+" L"+Ee.circularPathData.rightFullExtent+" "+(Ee.circularPathData.targetY-Ee.circularPathData.rightSmallArcRadius)+" A"+Ee.circularPathData.rightLargeArcRadius+" "+Ee.circularPathData.rightSmallArcRadius+" 0 0 0 "+Ee.circularPathData.rightInnerExtent+" "+Ee.circularPathData.targetY+" L"+Ee.circularPathData.targetX+" "+Ee.circularPathData.targetY:"M"+Ee.circularPathData.sourceX+" "+Ee.circularPathData.sourceY+" L"+Ee.circularPathData.leftInnerExtent+" "+Ee.circularPathData.sourceY+" A"+Ee.circularPathData.leftLargeArcRadius+" "+Ee.circularPathData.leftSmallArcRadius+" 0 0 1 "+Ee.circularPathData.leftFullExtent+" "+(Ee.circularPathData.sourceY+Ee.circularPathData.leftSmallArcRadius)+" L"+Ee.circularPathData.leftFullExtent+" "+Ee.circularPathData.verticalLeftInnerExtent+" A"+Ee.circularPathData.leftLargeArcRadius+" "+Ee.circularPathData.leftLargeArcRadius+" 0 0 1 "+Ee.circularPathData.leftInnerExtent+" "+Ee.circularPathData.verticalFullExtent+" L"+Ee.circularPathData.rightInnerExtent+" "+Ee.circularPathData.verticalFullExtent+" A"+Ee.circularPathData.rightLargeArcRadius+" "+Ee.circularPathData.rightLargeArcRadius+" 0 0 1 "+Ee.circularPathData.rightFullExtent+" "+Ee.circularPathData.verticalRightInnerExtent+" L"+Ee.circularPathData.rightFullExtent+" "+(Ee.circularPathData.targetY+Ee.circularPathData.rightSmallArcRadius)+" A"+Ee.circularPathData.rightLargeArcRadius+" "+Ee.circularPathData.rightSmallArcRadius+" 0 0 1 "+Ee.circularPathData.rightInnerExtent+" "+Ee.circularPathData.targetY+" L"+Ee.circularPathData.targetX+" "+Ee.circularPathData.targetY}(Me);else{var Te=(0,s.h5)().source(function(Ee){return[Ee.source.x0+(Ee.source.x1-Ee.source.x0),Ee.y0]}).target(function(Ee){return[Ee.target.x0,Ee.y1]});Me.path=Te(Me)}})}function N(he,xe){return Q(he)==Q(xe)?he.circularLinkType=="bottom"?V(he,xe):j(he,xe):Q(xe)-Q(he)}function j(he,xe){return he.y0-xe.y0}function V(he,xe){return xe.y0-he.y0}function H(he,xe){return he.y1-xe.y1}function ee(he,xe){return xe.y1-he.y1}function Q(he){return he.target.column-he.source.column}function X(he){return he.target.x0-he.source.x1}function Y(he,xe){var Re=I(he),we=X(xe)/Math.tan(Re);return ye(he)=="up"?he.y1+we:he.y1-we}function K(he,xe){var Re=I(he),we=X(xe)/Math.tan(Re);return ye(he)=="up"?he.y1-we:he.y1+we}function te(he,xe,Re,we){he.links.forEach(function(Ae){if(!Ae.circular&&Ae.target.column-Ae.source.column>1){var Me=Ae.source.column+1,Ce=Ae.target.column-1,ne=1,ue=Ce-Me+1;for(ne=1;Me<=Ce;Me++,ne++)he.nodes.forEach(function(me){if(me.column==Me){var Te,Ee=ne/(ue+1),Ue=Math.pow(1-Ee,3),De=3*Ee*Math.pow(1-Ee,2),je=3*Math.pow(Ee,2)*(1-Ee),ge=Math.pow(Ee,3),be=Ue*Ae.y0+De*Ae.y0+je*Ae.y1+ge*Ae.y1,Se=be-Ae.width/2,Ne=be+Ae.width/2;Se>me.y0&&Sest.y0&&Ze.y0st.y0&&Ze.y1st.y1)&&ae(Ye,Te,xe,Re)})):(Ne>me.y0&&Neme.y1)&&(Te=Ne-me.y0+10,me=ae(me,Te,xe,Re),he.nodes.forEach(function(Ye){h(Ye,we)!=h(me,we)&&Ye.column==me.column&&Ye.y0me.y1&&ae(Ye,Te,xe,Re)}))}})}})}function ae(he,xe,Re,we){return he.y0+xe>=Re&&he.y1+xe<=we&&(he.y0=he.y0+xe,he.y1=he.y1+xe,he.targetLinks.forEach(function(Ae){Ae.y1=Ae.y1+xe}),he.sourceLinks.forEach(function(Ae){Ae.y0=Ae.y0+xe})),he}function oe(he,xe,Re,we){he.nodes.forEach(function(Ae){we&&Ae.y+(Ae.y1-Ae.y0)>xe&&(Ae.y=Ae.y-(Ae.y+(Ae.y1-Ae.y0)-xe));var Me=he.links.filter(function(ue){return h(ue.source,Re)==h(Ae,Re)}),Ce=Me.length;Ce>1&&Me.sort(function(ue,me){if(!ue.circular&&!me.circular){if(ue.target.column==me.target.column||!fe(ue,me))return ue.y1-me.y1;if(ue.target.column>me.target.column){var Te=K(me,ue);return ue.y1-Te}if(me.target.column>ue.target.column)return K(ue,me)-me.y1}return ue.circular&&!me.circular?ue.circularLinkType=="top"?-1:1:me.circular&&!ue.circular?me.circularLinkType=="top"?1:-1:ue.circular&&me.circular?ue.circularLinkType===me.circularLinkType&&ue.circularLinkType=="top"?ue.target.column===me.target.column?ue.target.y1-me.target.y1:me.target.column-ue.target.column:ue.circularLinkType===me.circularLinkType&&ue.circularLinkType=="bottom"?ue.target.column===me.target.column?me.target.y1-ue.target.y1:ue.target.column-me.target.column:ue.circularLinkType=="top"?-1:1:void 0});var ne=Ae.y0;Me.forEach(function(ue){ue.y0=ne+ue.width/2,ne+=ue.width}),Me.forEach(function(ue,me){if(ue.circularLinkType=="bottom"){for(var Te=me+1,Ee=0;Te1&&Ae.sort(function(ne,ue){if(!ne.circular&&!ue.circular){if(ne.source.column==ue.source.column||!fe(ne,ue))return ne.y0-ue.y0;if(ue.source.column0?"up":"down"}function pe(he,xe){return h(he.source,xe)==h(he.target,xe)}function de(he,xe,Re){var we=he.nodes,Ae=he.links,Me=!1,Ce=!1;if(Ae.forEach(function(me){me.circularLinkType=="top"?Me=!0:me.circularLinkType=="bottom"&&(Ce=!0)}),Me==0||Ce==0){var ne=(0,_.VV)(we,function(me){return me.y0}),ue=(Re-xe)/((0,_.Fp)(we,function(me){return me.y1})-ne);we.forEach(function(me){var Te=(me.y1-me.y0)*ue;me.y0=(me.y0-ne)*ue,me.y1=me.y0+Te}),Ae.forEach(function(me){me.y0=(me.y0-ne)*ue,me.y1=(me.y1-ne)*ue,me.width=me.width*ue})}}},30838:function(D,E,e){e.r(E),e.d(E,{sankey:function(){return x},sankeyCenter:function(){return l},sankeyJustify:function(){return f},sankeyLeft:function(){return T},sankeyLinkHorizontal:function(){return h},sankeyRight:function(){return y}});var _=e(33064),w=e(15140);function s(M){return M.target.depth}function T(M){return M.depth}function y(M,A){return A-1-M.height}function f(M,A){return M.sourceLinks.length?M.depth:A-1}function l(M){return M.targetLinks.length?M.depth:M.sourceLinks.length?(0,_.VV)(M.sourceLinks,s)-1:0}function t(M){return function(){return M}}function i(M,A){return n(M.source,A.source)||M.index-A.index}function r(M,A){return n(M.target,A.target)||M.index-A.index}function n(M,A){return M.y0-A.y0}function o(M){return M.value}function a(M){return(M.y0+M.y1)/2}function u(M){return a(M.source)*M.value}function p(M){return a(M.target)*M.value}function c(M){return M.index}function b(M){return M.nodes}function d(M){return M.links}function v(M,A){var C=M.get(A);if(!C)throw new Error("missing: "+A);return C}function x(){var M=0,A=0,C=1,L=1,O=24,I=8,R=c,U=f,B=b,G=d,N=32;function j(){var Y={nodes:B.apply(null,arguments),links:G.apply(null,arguments)};return V(Y),H(Y),ee(Y),Q(Y),X(Y),Y}function V(Y){Y.nodes.forEach(function(te,ae){te.index=ae,te.sourceLinks=[],te.targetLinks=[]});var K=(0,w.UI)(Y.nodes,R);Y.links.forEach(function(te,ae){te.index=ae;var oe=te.source,se=te.target;typeof oe!="object"&&(oe=te.source=v(K,oe)),typeof se!="object"&&(se=te.target=v(K,se)),oe.sourceLinks.push(te),se.targetLinks.push(te)})}function H(Y){Y.nodes.forEach(function(K){K.value=Math.max((0,_.Sm)(K.sourceLinks,o),(0,_.Sm)(K.targetLinks,o))})}function ee(Y){var K,te,ae;for(K=Y.nodes,te=[],ae=0;K.length;++ae,K=te,te=[])K.forEach(function(se){se.depth=ae,se.sourceLinks.forEach(function(fe){te.indexOf(fe.target)<0&&te.push(fe.target)})});for(K=Y.nodes,te=[],ae=0;K.length;++ae,K=te,te=[])K.forEach(function(se){se.height=ae,se.targetLinks.forEach(function(fe){te.indexOf(fe.source)<0&&te.push(fe.source)})});var oe=(C-M-O)/(ae-1);Y.nodes.forEach(function(se){se.x1=(se.x0=M+Math.max(0,Math.min(ae-1,Math.floor(U.call(null,se,ae))))*oe)+O})}function Q(Y){var K=(0,w.b1)().key(function(ye){return ye.x0}).sortKeys(_.j2).entries(Y.nodes).map(function(ye){return ye.values});(function(){var ye=(0,_.Fp)(K,function(he){return he.length}),pe=.6666666666666666*(L-A)/(ye-1);I>pe&&(I=pe);var de=(0,_.VV)(K,function(he){return(L-A-(he.length-1)*I)/(0,_.Sm)(he,o)});K.forEach(function(he){he.forEach(function(xe,Re){xe.y1=(xe.y0=Re)+xe.value*de})}),Y.links.forEach(function(he){he.width=he.value*de})})(),fe();for(var te=1,ae=N;ae>0;--ae)se(te*=.99),fe(),oe(te),fe();function oe(ye){K.forEach(function(pe){pe.forEach(function(de){if(de.targetLinks.length){var he=((0,_.Sm)(de.targetLinks,u)/(0,_.Sm)(de.targetLinks,o)-a(de))*ye;de.y0+=he,de.y1+=he}})})}function se(ye){K.slice().reverse().forEach(function(pe){pe.forEach(function(de){if(de.sourceLinks.length){var he=((0,_.Sm)(de.sourceLinks,p)/(0,_.Sm)(de.sourceLinks,o)-a(de))*ye;de.y0+=he,de.y1+=he}})})}function fe(){K.forEach(function(ye){var pe,de,he,xe=A,Re=ye.length;for(ye.sort(n),he=0;he0&&(pe.y0+=de,pe.y1+=de),xe=pe.y1+I;if((de=xe-I-L)>0)for(xe=pe.y0-=de,pe.y1-=de,he=Re-2;he>=0;--he)(de=(pe=ye[he]).y1+I-xe)>0&&(pe.y0-=de,pe.y1-=de),xe=pe.y0})}}function X(Y){Y.nodes.forEach(function(K){K.sourceLinks.sort(r),K.targetLinks.sort(i)}),Y.nodes.forEach(function(K){var te=K.y0,ae=te;K.sourceLinks.forEach(function(oe){oe.y0=te+oe.width/2,te+=oe.width}),K.targetLinks.forEach(function(oe){oe.y1=ae+oe.width/2,ae+=oe.width})})}return j.update=function(Y){return X(Y),Y},j.nodeId=function(Y){return arguments.length?(R=typeof Y=="function"?Y:t(Y),j):R},j.nodeAlign=function(Y){return arguments.length?(U=typeof Y=="function"?Y:t(Y),j):U},j.nodeWidth=function(Y){return arguments.length?(O=+Y,j):O},j.nodePadding=function(Y){return arguments.length?(I=+Y,j):I},j.nodes=function(Y){return arguments.length?(B=typeof Y=="function"?Y:t(Y),j):B},j.links=function(Y){return arguments.length?(G=typeof Y=="function"?Y:t(Y),j):G},j.size=function(Y){return arguments.length?(M=A=0,C=+Y[0],L=+Y[1],j):[C-M,L-A]},j.extent=function(Y){return arguments.length?(M=+Y[0][0],C=+Y[1][0],A=+Y[0][1],L=+Y[1][1],j):[[M,A],[C,L]]},j.iterations=function(Y){return arguments.length?(N=+Y,j):N},j}var g=e(45879);function m(M){return[M.source.x1,M.y0]}function k(M){return[M.target.x0,M.y1]}function h(){return(0,g.h5)().source(m).target(k)}},39898:function(D,E,e){var _,w;(function(){var s={version:"3.8.0"},T=[].slice,y=function(re){return T.call(re)},f=self.document;function l(re){return re&&(re.ownerDocument||re.document||re).documentElement}function t(re){return re&&(re.ownerDocument&&re.ownerDocument.defaultView||re.document&&re||re.defaultView)}if(f)try{y(f.documentElement.childNodes)[0].nodeType}catch{y=function(ve){for(var Le=ve.length,Fe=new Array(Le);Le--;)Fe[Le]=ve[Le];return Fe}}if(Date.now||(Date.now=function(){return+new Date}),f)try{f.createElement("DIV").style.setProperty("opacity",0,"")}catch{var i=this.Element.prototype,r=i.setAttribute,n=i.setAttributeNS,o=this.CSSStyleDeclaration.prototype,a=o.setProperty;i.setAttribute=function(ve,Le){r.call(this,ve,Le+"")},i.setAttributeNS=function(ve,Le,Fe){n.call(this,ve,Le,Fe+"")},o.setProperty=function(ve,Le,Fe){a.call(this,ve,Le+"",Fe)}}function u(re,ve){return reve?1:re>=ve?0:NaN}function p(re){return re===null?NaN:+re}function c(re){return!isNaN(re)}function b(re){return{left:function(ve,Le,Fe,Ve){for(arguments.length<3&&(Fe=0),arguments.length<4&&(Ve=ve.length);Fe>>1;re(ve[We],Le)<0?Fe=We+1:Ve=We}return Fe},right:function(ve,Le,Fe,Ve){for(arguments.length<3&&(Fe=0),arguments.length<4&&(Ve=ve.length);Fe>>1;re(ve[We],Le)>0?Ve=We:Fe=We+1}return Fe}}}s.ascending=u,s.descending=function(re,ve){return vere?1:ve>=re?0:NaN},s.min=function(re,ve){var Le,Fe,Ve=-1,We=re.length;if(arguments.length===1){for(;++Ve=Fe){Le=Fe;break}for(;++VeFe&&(Le=Fe)}else{for(;++Ve=Fe){Le=Fe;break}for(;++VeFe&&(Le=Fe)}return Le},s.max=function(re,ve){var Le,Fe,Ve=-1,We=re.length;if(arguments.length===1){for(;++Ve=Fe){Le=Fe;break}for(;++VeLe&&(Le=Fe)}else{for(;++Ve=Fe){Le=Fe;break}for(;++VeLe&&(Le=Fe)}return Le},s.extent=function(re,ve){var Le,Fe,Ve,We=-1,$e=re.length;if(arguments.length===1){for(;++We<$e;)if((Fe=re[We])!=null&&Fe>=Fe){Le=Ve=Fe;break}for(;++We<$e;)(Fe=re[We])!=null&&(Le>Fe&&(Le=Fe),Ve=Fe){Le=Ve=Fe;break}for(;++We<$e;)(Fe=ve.call(re,re[We],We))!=null&&(Le>Fe&&(Le=Fe),Ve1)return $e/(lt-1)},s.deviation=function(){var re=s.variance.apply(this,arguments);return re&&Math.sqrt(re)};var d=b(u);function v(re){return re.length}s.bisectLeft=d.left,s.bisect=s.bisectRight=d.right,s.bisector=function(re){return b(re.length===1?function(ve,Le){return u(re(ve),Le)}:re)},s.shuffle=function(re,ve,Le){(We=arguments.length)<3&&(Le=re.length,We<2&&(ve=0));for(var Fe,Ve,We=Le-ve;We;)Ve=Math.random()*We--|0,Fe=re[We+ve],re[We+ve]=re[Ve+ve],re[Ve+ve]=Fe;return re},s.permute=function(re,ve){for(var Le=ve.length,Fe=new Array(Le);Le--;)Fe[Le]=re[ve[Le]];return Fe},s.pairs=function(re){for(var ve=0,Le=re.length-1,Fe=re[0],Ve=new Array(Le<0?0:Le);ve=0;)for(ve=(Fe=re[Ve]).length;--ve>=0;)Le[--$e]=Fe[ve];return Le};var x=Math.abs;function g(re){for(var ve=1;re*ve%1;)ve*=10;return ve}function m(re,ve){for(var Le in ve)Object.defineProperty(re.prototype,Le,{value:ve[Le],enumerable:!1})}function k(){this._=Object.create(null)}function h(re){return(re+="")=="__proto__"||re[0]==="\0"?"\0"+re:re}function M(re){return(re+="")[0]==="\0"?re.slice(1):re}function A(re){return h(re)in this._}function C(re){return(re=h(re))in this._&&delete this._[re]}function L(){var re=[];for(var ve in this._)re.push(M(ve));return re}function O(){var re=0;for(var ve in this._)++re;return re}function I(){for(var re in this._)return!1;return!0}function R(){this._=Object.create(null)}function U(re){return re}function B(re,ve,Le){return function(){var Fe=Le.apply(ve,arguments);return Fe===ve?re:Fe}}function G(re,ve){if(ve in re)return ve;ve=ve.charAt(0).toUpperCase()+ve.slice(1);for(var Le=0,Fe=N.length;Leve;)Ve.push(Fe/We);else for(;(Fe=re+Le*++$e)=Fe.length)return ve?ve.call(Le,lt):re?lt.sort(re):lt;for(var zt,Ut,Vt,Qt,gn=-1,en=lt.length,sn=Fe[gt++],rn=new k;++gn=Fe.length)return tt;var gt=[],zt=Ve[lt++];return tt.forEach(function(Ut,Vt){gt.push({key:Ut,values:$e(Vt,lt)})}),zt?gt.sort(function(Ut,Vt){return zt(Ut.key,Vt.key)}):gt}return Le.map=function(tt,lt){return We(lt,tt,0)},Le.entries=function(tt){return $e(We(s.map,tt,0),0)},Le.key=function(tt){return Fe.push(tt),Le},Le.sortKeys=function(tt){return Ve[Fe.length-1]=tt,Le},Le.sortValues=function(tt){return re=tt,Le},Le.rollup=function(tt){return ve=tt,Le},Le},s.set=function(re){var ve=new R;if(re)for(var Le=0,Fe=re.length;Le=0&&(Fe=re.slice(Le+1),re=re.slice(0,Le)),re)return arguments.length<2?this[re].on(Fe):this[re].on(Fe,ve);if(arguments.length===2){if(ve==null)for(re in this)this.hasOwnProperty(re)&&this[re].on(Fe,null);return this}},s.event=null,s.requote=function(re){return re.replace(Y,"\\$&")};var Y=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,K={}.__proto__?function(re,ve){re.__proto__=ve}:function(re,ve){for(var Le in ve)re[Le]=ve[Le]};function te(re){return K(re,fe),re}var ae=function(re,ve){return ve.querySelector(re)},oe=function(re,ve){return ve.querySelectorAll(re)},se=function(re,ve){var Le=re.matches||re[G(re,"matchesSelector")];return se=function(Fe,Ve){return Le.call(Fe,Ve)},se(re,ve)};typeof Sizzle=="function"&&(ae=function(re,ve){return Sizzle(re,ve)[0]||null},oe=Sizzle,se=Sizzle.matchesSelector),s.selection=function(){return s.select(f.documentElement)};var fe=s.selection.prototype=[];function ye(re){return typeof re=="function"?re:function(){return ae(re,this)}}function pe(re){return typeof re=="function"?re:function(){return oe(re,this)}}fe.select=function(re){var ve,Le,Fe,Ve,We=[];re=ye(re);for(var $e=-1,tt=this.length;++$e=0&&(Le=re.slice(0,ve))!=="xmlns"&&(re=re.slice(ve+1)),he.hasOwnProperty(Le)?{space:he[Le],local:re}:re}},fe.attr=function(re,ve){if(arguments.length<2){if(typeof re=="string"){var Le=this.node();return(re=s.ns.qualify(re)).local?Le.getAttributeNS(re.space,re.local):Le.getAttribute(re)}for(ve in re)this.each(xe(ve,re[ve]));return this}return this.each(xe(re,ve))},fe.classed=function(re,ve){if(arguments.length<2){if(typeof re=="string"){var Le=this.node(),Fe=(re=Ae(re)).length,Ve=-1;if(ve=Le.classList){for(;++Ve=0;)(Le=Fe[Ve])&&(We&&We!==Le.nextSibling&&We.parentNode.insertBefore(Le,We),We=Le);return this},fe.sort=function(re){re=De.apply(this,arguments);for(var ve=-1,Le=this.length;++ve=ve&&(ve=Ve+1);!($e=tt[ve])&&++ve0&&(re=re.slice(0,Ve));var $e=Ye.get(re);function tt(){var lt=this[Fe];lt&&(this.removeEventListener(re,lt,lt.$),delete this[Fe])}return $e&&(re=$e,We=st),Ve?ve?function(){var lt=We(ve,y(arguments));tt.call(this),this.addEventListener(re,this[Fe]=lt,lt.$=Le),lt._=ve}:tt:ve?j:function(){var lt,gt=new RegExp("^__on([^.]+)"+s.requote(re)+"$");for(var zt in this)if(lt=zt.match(gt)){var Ut=this[zt];this.removeEventListener(lt[1],Ut,Ut.$),delete this[zt]}}}s.selection.enter=ge,s.selection.enter.prototype=be,be.append=fe.append,be.empty=fe.empty,be.node=fe.node,be.call=fe.call,be.size=fe.size,be.select=function(re){for(var ve,Le,Fe,Ve,We,$e=[],tt=-1,lt=this.length;++tt1?Nt:re<-1?-Nt:Math.asin(re)}function nt(re){return((re=Math.exp(re))+1/re)/2}var ht=Math.SQRT2;s.interpolateZoom=function(re,ve){var Le,Fe,Ve=re[0],We=re[1],$e=re[2],tt=ve[0],lt=ve[1],gt=ve[2],zt=tt-Ve,Ut=lt-We,Vt=zt*zt+Ut*Ut;if(Vt<1e-12)Fe=Math.log(gt/$e)/ht,Le=function(Mn){return[Ve+Mn*zt,We+Mn*Ut,$e*Math.exp(ht*Mn*Fe)]};else{var Qt=Math.sqrt(Vt),gn=(gt*gt-$e*$e+4*Vt)/(2*$e*2*Qt),en=(gt*gt-$e*$e-4*Vt)/(2*gt*2*Qt),sn=Math.log(Math.sqrt(gn*gn+1)-gn),rn=Math.log(Math.sqrt(en*en+1)-en);Fe=(rn-sn)/ht,Le=function(Mn){var xn,an=Mn*Fe,zn=nt(sn),Vn=$e/(2*Qt)*(zn*(xn=ht*an+sn,((xn=Math.exp(2*xn))-1)/(xn+1))-function(nr){return((nr=Math.exp(nr))-1/nr)/2}(sn));return[Ve+Vn*zt,We+Vn*Ut,$e*zn/nt(ht*an+sn)]}}return Le.duration=1e3*Fe,Le},s.behavior.zoom=function(){var re,ve,Le,Fe,Ve,We,$e,tt,lt,gt={x:0,y:0,k:1},zt=[960,500],Ut=Qe,Vt=250,Qt=0,gn="mousedown.zoom",en="mousemove.zoom",sn="mouseup.zoom",rn="touchstart.zoom",Mn=X(xn,"zoomstart","zoom","zoomend");function xn(xr){xr.on(gn,wr).on(Be+".zoom",Jr).on("dblclick.zoom",Kr).on(rn,Rr)}function an(xr){return[(xr[0]-gt.x)/gt.k,(xr[1]-gt.y)/gt.k]}function zn(xr){gt.k=Math.max(Ut[0],Math.min(Ut[1],xr))}function Vn(xr,zr){zr=function(Wr){return[Wr[0]*gt.k+gt.x,Wr[1]*gt.k+gt.y]}(zr),gt.x+=xr[0]-zr[0],gt.y+=xr[1]-zr[1]}function nr(xr,zr,Wr,Gr){xr.__chart__={x:gt.x,y:gt.y,k:gt.k},zn(Math.pow(2,Gr)),Vn(ve=zr,Wr),xr=s.select(xr),Vt>0&&(xr=xr.transition().duration(Vt)),xr.call(xn.event)}function rr(){$e&&$e.domain(We.range().map(function(xr){return(xr-gt.x)/gt.k}).map(We.invert)),lt&<.domain(tt.range().map(function(xr){return(xr-gt.y)/gt.k}).map(tt.invert))}function Tr(xr){Qt++||xr({type:"zoomstart"})}function Ar(xr){rr(),xr({type:"zoom",scale:gt.k,translate:[gt.x,gt.y]})}function mr(xr){--Qt||(xr({type:"zoomend"}),ve=null)}function wr(){var xr=this,zr=Mn.of(xr,arguments),Wr=0,Gr=s.select(t(xr)).on(en,ui).on(sn,ki),ii=an(s.mouse(xr)),ti=yt(xr);function ui(){Wr=1,Vn(s.mouse(xr),ii),Ar(zr)}function ki(){Gr.on(en,null).on(sn,null),ti(Wr),mr(zr)}Si.call(xr),Tr(zr)}function Rr(){var xr,zr=this,Wr=Mn.of(zr,arguments),Gr={},ii=0,ti=".zoom-"+s.event.changedTouches[0].identifier,ui="touchmove"+ti,ki="touchend"+ti,Ii=[],Ei=s.select(zr),wi=yt(zr);function Ai(){var ta=s.touches(zr);return xr=gt.k,ta.forEach(function(Yr){Yr.identifier in Gr&&(Gr[Yr.identifier]=an(Yr))}),ta}function Ci(){var ta=s.event.target;s.select(ta).on(ui,qi).on(ki,_s),Ii.push(ta);for(var Yr=s.event.changedTouches,pa=0,wa=Yr.length;pa1){ai=Ui[0];var na=Ui[1],Ba=ai[0]-na[0],Kl=ai[1]-na[1];ii=Ba*Ba+Kl*Kl}}function qi(){var ta,Yr,pa,wa,Ui=s.touches(zr);Si.call(zr);for(var ko=0,ai=Ui.length;ko360?tt-=360:tt<0&&(tt+=360),tt<60?Fe+(Ve-Fe)*tt/60:tt<180?Ve:tt<240?Fe+(Ve-Fe)*(240-tt)/60:Fe}($e))}return re=isNaN(re)?0:(re%=360)<0?re+360:re,ve=isNaN(ve)||ve<0?0:ve>1?1:ve,Fe=2*(Le=Le<0?0:Le>1?1:Le)-(Ve=Le<=.5?Le*(1+ve):Le+ve-Le*ve),new kn(We(re+120),We(re),We(re-120))}function Ct(re,ve,Le){return this instanceof Ct?(this.h=+re,this.c=+ve,void(this.l=+Le)):arguments.length<2?re instanceof Ct?new Ct(re.h,re.c,re.l):Kt(re instanceof _t?re.l:(re=In((re=s.rgb(re)).r,re.g,re.b)).l,re.a,re.b):new Ct(re,ve,Le)}bt.brighter=function(re){return re=Math.pow(.7,arguments.length?re:1),new pt(this.h,this.s,this.l/re)},bt.darker=function(re){return re=Math.pow(.7,arguments.length?re:1),new pt(this.h,this.s,re*this.l)},bt.rgb=function(){return Lt(this.h,this.s,this.l)},s.hcl=Ct;var mt=Ct.prototype=new ut;function Ot(re,ve,Le){return isNaN(re)&&(re=0),isNaN(ve)&&(ve=0),new _t(Le,Math.cos(re*=Je)*ve,Math.sin(re)*ve)}function _t(re,ve,Le){return this instanceof _t?(this.l=+re,this.a=+ve,void(this.b=+Le)):arguments.length<2?re instanceof _t?new _t(re.l,re.a,re.b):re instanceof Ct?Ot(re.h,re.c,re.l):In((re=kn(re)).r,re.g,re.b):new _t(re,ve,Le)}mt.brighter=function(re){return new Ct(this.h,this.c,Math.min(100,this.l+Pt*(arguments.length?re:1)))},mt.darker=function(re){return new Ct(this.h,this.c,Math.max(0,this.l-Pt*(arguments.length?re:1)))},mt.rgb=function(){return Ot(this.h,this.c,this.l).rgb()},s.lab=_t;var Pt=18,Bt=.95047,Wt=1.08883,Gt=_t.prototype=new ut;function Xt(re,ve,Le){var Fe=(re+16)/116,Ve=Fe+ve/500,We=Fe-Le/200;return new kn(ln(3.2404542*(Ve=nn(Ve)*Bt)-1.5371385*(Fe=1*nn(Fe))-.4985314*(We=nn(We)*Wt)),ln(-.969266*Ve+1.8760108*Fe+.041556*We),ln(.0556434*Ve-.2040259*Fe+1.0572252*We))}function Kt(re,ve,Le){return re>0?new Ct(Math.atan2(Le,ve)*Ke,Math.sqrt(ve*ve+Le*Le),re):new Ct(NaN,NaN,re)}function nn(re){return re>.206893034?re*re*re:(re-.13793103448275862)/7.787037}function yn(re){return re>.008856?Math.pow(re,.3333333333333333):7.787037*re+.13793103448275862}function ln(re){return Math.round(255*(re<=.00304?12.92*re:1.055*Math.pow(re,.4166666666666667)-.055))}function kn(re,ve,Le){return this instanceof kn?(this.r=~~re,this.g=~~ve,void(this.b=~~Le)):arguments.length<2?re instanceof kn?new kn(re.r,re.g,re.b):fn(""+re,kn,Lt):new kn(re,ve,Le)}function Wn(re){return new kn(re>>16,re>>8&255,255&re)}function wn(re){return Wn(re)+""}Gt.brighter=function(re){return new _t(Math.min(100,this.l+Pt*(arguments.length?re:1)),this.a,this.b)},Gt.darker=function(re){return new _t(Math.max(0,this.l-Pt*(arguments.length?re:1)),this.a,this.b)},Gt.rgb=function(){return Xt(this.l,this.a,this.b)},s.rgb=kn;var on=kn.prototype=new ut;function _n(re){return re<16?"0"+Math.max(0,re).toString(16):Math.min(255,re).toString(16)}function fn(re,ve,Le){var Fe,Ve,We,$e=0,tt=0,lt=0;if(Fe=/([a-z]+)\((.*)\)/.exec(re=re.toLowerCase()))switch(Ve=Fe[2].split(","),Fe[1]){case"hsl":return Le(parseFloat(Ve[0]),parseFloat(Ve[1])/100,parseFloat(Ve[2])/100);case"rgb":return ve(Nn(Ve[0]),Nn(Ve[1]),Nn(Ve[2]))}return(We=Hn.get(re))?ve(We.r,We.g,We.b):(re==null||re.charAt(0)!=="#"||isNaN(We=parseInt(re.slice(1),16))||(re.length===4?($e=(3840&We)>>4,$e|=$e>>4,tt=240&We,tt|=tt>>4,lt=15&We,lt|=lt<<4):re.length===7&&($e=(16711680&We)>>16,tt=(65280&We)>>8,lt=255&We)),ve($e,tt,lt))}function hn(re,ve,Le){var Fe,Ve,We=Math.min(re/=255,ve/=255,Le/=255),$e=Math.max(re,ve,Le),tt=$e-We,lt=($e+We)/2;return tt?(Ve=lt<.5?tt/($e+We):tt/(2-$e-We),Fe=re==$e?(ve-Le)/tt+(ve0&<<1?0:Fe),new pt(Fe,Ve,lt)}function In(re,ve,Le){var Fe=yn((.4124564*(re=Cn(re))+.3575761*(ve=Cn(ve))+.1804375*(Le=Cn(Le)))/Bt),Ve=yn((.2126729*re+.7151522*ve+.072175*Le)/1);return _t(116*Ve-16,500*(Fe-Ve),200*(Ve-yn((.0193339*re+.119192*ve+.9503041*Le)/Wt)))}function Cn(re){return(re/=255)<=.04045?re/12.92:Math.pow((re+.055)/1.055,2.4)}function Nn(re){var ve=parseFloat(re);return re.charAt(re.length-1)==="%"?Math.round(2.55*ve):ve}on.brighter=function(re){re=Math.pow(.7,arguments.length?re:1);var ve=this.r,Le=this.g,Fe=this.b,Ve=30;return ve||Le||Fe?(ve&&ve=200&&Ut<300||Ut===304){try{zt=Le.call(Ve,tt)}catch(Vt){return void We.error.call(Ve,Vt)}We.load.call(Ve,zt)}else We.error.call(Ve,tt)}return self.XDomainRequest&&!("withCredentials"in tt)&&/^(http(s)?:)?\/\//.test(re)&&(tt=new XDomainRequest),"onload"in tt?tt.onload=tt.onerror=gt:tt.onreadystatechange=function(){tt.readyState>3&>()},tt.onprogress=function(zt){var Ut=s.event;s.event=zt;try{We.progress.call(Ve,tt)}finally{s.event=Ut}},Ve.header=function(zt,Ut){return zt=(zt+"").toLowerCase(),arguments.length<2?$e[zt]:(Ut==null?delete $e[zt]:$e[zt]=Ut+"",Ve)},Ve.mimeType=function(zt){return arguments.length?(ve=zt==null?null:zt+"",Ve):ve},Ve.responseType=function(zt){return arguments.length?(lt=zt,Ve):lt},Ve.response=function(zt){return Le=zt,Ve},["get","post"].forEach(function(zt){Ve[zt]=function(){return Ve.send.apply(Ve,[zt].concat(y(arguments)))}}),Ve.send=function(zt,Ut,Vt){if(arguments.length===2&&typeof Ut=="function"&&(Vt=Ut,Ut=null),tt.open(zt,re,!0),ve==null||"accept"in $e||($e.accept=ve+",*/*"),tt.setRequestHeader)for(var Qt in $e)tt.setRequestHeader(Qt,$e[Qt]);return ve!=null&&tt.overrideMimeType&&tt.overrideMimeType(ve),lt!=null&&(tt.responseType=lt),Vt!=null&&Ve.on("error",Vt).on("load",function(gn){Vt(null,gn)}),We.beforesend.call(Ve,tt),tt.send(Ut??null),Ve},Ve.abort=function(){return tt.abort(),Ve},s.rebind(Ve,We,"on"),Fe==null?Ve:Ve.get(function(zt){return zt.length===1?function(Ut,Vt){zt(Ut==null?Vt:null)}:zt}(Fe))}Hn.forEach(function(re,ve){Hn.set(re,Wn(ve))}),s.functor=qn,s.xhr=or(U),s.dsv=function(re,ve){var Le=new RegExp('["'+re+` +`]);l.createShader=function(p){var c=i(p,n,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return c.attributes.uv.location=0,c.attributes.f.location=1,c.attributes.normal.location=2,c},l.createPickShader=function(p){var c=i(p,n,u,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return c.attributes.uv.location=0,c.attributes.f.location=1,c.attributes.normal.location=2,c},l.createContourShader=function(p){var c=i(p,a,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return c.attributes.uv.location=0,c.attributes.f.location=1,c},l.createPickContourShader=function(p){var c=i(p,a,u,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return c.attributes.uv.location=0,c.attributes.f.location=1,c}},3754:function(f,l,t){f.exports=function(ae){var oe=ae.gl,se=h(oe),fe=A(oe),xe=M(oe),he=C(oe),de=r(oe),pe=n(oe,[{buffer:de,size:4,stride:40,offset:0},{buffer:de,size:3,stride:40,offset:16},{buffer:de,size:3,stride:40,offset:28}]),ye=r(oe),Re=n(oe,[{buffer:ye,size:4,stride:20,offset:0},{buffer:ye,size:1,stride:20,offset:16}]),we=r(oe),Ae=n(oe,[{buffer:we,size:2,type:oe.FLOAT}]),Me=o(oe,1,256,oe.RGBA,oe.UNSIGNED_BYTE);Me.minFilter=oe.LINEAR,Me.magFilter=oe.LINEAR;var Ce=new U(oe,[0,0],[[0,0,0],[0,0,0]],se,fe,de,pe,Me,xe,he,ye,Re,we,Ae,[0,0,0]),ne={levels:[[],[],[]]};for(var ue in ae)ne[ue]=ae[ue];return ne.colormap=ne.colormap||"jet",Ce.update(ne),Ce};var i=t(2288),r=t(5827),n=t(2944),o=t(8931),a=t(5306),u=t(9156),p=t(7498),c=t(7382),b=t(5050),d=t(4162),v=t(104),x=t(7437),g=t(5070),y=t(9144),k=t(9054),h=k.createShader,M=k.createContourShader,A=k.createPickShader,C=k.createPickContourShader,L=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],O=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],I=[[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 R(ae,oe,se,fe,xe){this.position=ae,this.index=oe,this.uv=se,this.level=fe,this.dataCoordinate=xe}function U(ae,oe,se,fe,xe,he,de,pe,ye,Re,we,Ae,Me,Ce,ne){this.gl=ae,this.shape=oe,this.bounds=se,this.objectOffset=ne,this.intensityBounds=[],this._shader=fe,this._pickShader=xe,this._coordinateBuffer=he,this._vao=de,this._colorMap=pe,this._contourShader=ye,this._contourPickShader=Re,this._contourBuffer=we,this._contourVAO=Ae,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new R([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=Me,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=[b(a.mallocFloat(1024),[0,0]),b(a.mallocFloat(1024),[0,0]),b(a.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}(function(){for(var ae=0;ae<3;++ae){var oe=I[ae],se=(ae+2)%3;oe[(ae+1)%3+0]=1,oe[se+3]=1,oe[ae+6]=1}})();var B=U.prototype;B.genColormap=function(ae,oe){var se=!1,fe=c([u({colormap:ae,nshades:256,format:"rgba"}).map(function(xe,he){var de=oe?function(pe,ye){if(!ye||!ye.length)return 1;for(var Re=0;Repe&&Re>0){var we=(ye[Re][0]-pe)/(ye[Re][0]-ye[Re-1][0]);return ye[Re][1]*(1-we)+we*ye[Re-1][1]}}return 1}(he/255,oe):xe[3];return de<1&&(se=!0),[xe[0],xe[1],xe[2],255*de]})]);return p.divseq(fe,255),this.hasAlphaScale=se,fe},B.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},B.isOpaque=function(){return!this.isTransparent()},B.pickSlots=1,B.setPickBase=function(ae){this.pickId=ae};var G=[0,0,0],N={showSurface:!1,showContour:!1,projections:[L.slice(),L.slice(),L.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function j(ae,oe){var se,fe,xe,he=oe.axes&&oe.axes.lastCubeProps.axis||G,de=oe.showSurface,pe=oe.showContour;for(se=0;se<3;++se)for(de=de||oe.surfaceProject[se],fe=0;fe<3;++fe)pe=pe||oe.contourProject[se][fe];for(se=0;se<3;++se){var ye=N.projections[se];for(fe=0;fe<16;++fe)ye[fe]=0;for(fe=0;fe<4;++fe)ye[5*fe]=1;ye[5*se]=0,ye[12+se]=oe.axesBounds[+(he[se]>0)][se],v(ye,ae.model,ye);var Re=N.clipBounds[se];for(xe=0;xe<2;++xe)for(fe=0;fe<3;++fe)Re[xe][fe]=ae.clipBounds[xe][fe];Re[0][se]=-1e8,Re[1][se]=1e8}return N.showSurface=de,N.showContour=pe,N}var V={model:L,view:L,projection:L,inverseModel:L.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},H=L.slice(),ee=[1,0,0,0,1,0,0,0,1];function Q(ae,oe){ae=ae||{};var se=this.gl;se.disable(se.CULL_FACE),this._colorMap.bind(0);var fe=V;fe.model=ae.model||L,fe.view=ae.view||L,fe.projection=ae.projection||L,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=x(fe.inverseModel,fe.model);for(var xe=0;xe<2;++xe)for(var he=fe.clipBounds[xe],de=0;de<3;++de)he[de]=Math.min(Math.max(this.clipBounds[xe][de],-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=ee,fe.vertexColor=this.vertexColor;var pe=H;for(v(pe,fe.view,fe.model),v(pe,fe.projection,pe),x(pe,pe),xe=0;xe<3;++xe)fe.eyePosition[xe]=pe[12+xe]/pe[15];var ye=pe[15];for(xe=0;xe<3;++xe)ye+=this.lightPosition[xe]*pe[4*xe+3];for(xe=0;xe<3;++xe){var Re=pe[12+xe];for(de=0;de<3;++de)Re+=pe[4*de+xe]*this.lightPosition[de];fe.lightPosition[xe]=Re/ye}var we=j(fe,this);if(we.showSurface){for(this._shader.bind(),this._shader.uniforms=fe,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(se.TRIANGLES,this._vertexCount),xe=0;xe<3;++xe)this.surfaceProject[xe]&&this.vertexCount&&(this._shader.uniforms.model=we.projections[xe],this._shader.uniforms.clipBounds=we.clipBounds[xe],this._vao.draw(se.TRIANGLES,this._vertexCount));this._vao.unbind()}if(we.showContour){var Ae=this._contourShader;fe.kambient=1,fe.kdiffuse=0,fe.kspecular=0,fe.opacity=1,Ae.bind(),Ae.uniforms=fe;var Me=this._contourVAO;for(Me.bind(),xe=0;xe<3;++xe)for(Ae.uniforms.permutation=I[xe],se.lineWidth(this.contourWidth[xe]*this.pixelRatio),de=0;de>4)/16)/255,xe=Math.floor(fe),he=fe-xe,de=oe[1]*(ae.value[1]+(15&ae.value[2])/16)/255,pe=Math.floor(de),ye=de-pe;xe+=1,pe+=1;var Re=se.position;Re[0]=Re[1]=Re[2]=0;for(var we=0;we<2;++we)for(var Ae=we?he:1-he,Me=0;Me<2;++Me)for(var Ce=xe+we,ne=pe+Me,ue=Ae*(Me?ye:1-ye),me=0;me<3;++me)Re[me]+=this._field[me].get(Ce,ne)*ue;for(var Te=this._pickResult.level,Ee=0;Ee<3;++Ee)if(Te[Ee]=g.le(this.contourLevels[Ee],Re[Ee]),Te[Ee]<0)this.contourLevels[Ee].length>0&&(Te[Ee]=0);else if(Te[Ee]Math.abs(De-Re[Ee])&&(Te[Ee]+=1)}for(se.index[0]=he<.5?xe:xe+1,se.index[1]=ye<.5?pe:pe+1,se.uv[0]=fe/oe[0],se.uv[1]=de/oe[1],me=0;me<3;++me)se.dataCoordinate[me]=this._field[me].get(se.index[0],se.index[1]);return se},B.padField=function(ae,oe){var se=oe.shape.slice(),fe=ae.shape.slice();p.assign(ae.lo(1,1).hi(se[0],se[1]),oe),p.assign(ae.lo(1).hi(se[0],1),oe.hi(se[0],1)),p.assign(ae.lo(1,fe[1]-1).hi(se[0],1),oe.lo(0,se[1]-1).hi(se[0],1)),p.assign(ae.lo(0,1).hi(1,se[1]),oe.hi(1)),p.assign(ae.lo(fe[0]-1,1).hi(1,se[1]),oe.lo(se[0]-1)),ae.set(0,0,oe.get(0,0)),ae.set(0,fe[1]-1,oe.get(0,se[1]-1)),ae.set(fe[0]-1,0,oe.get(se[0]-1,0)),ae.set(fe[0]-1,fe[1]-1,oe.get(se[0]-1,se[1]-1))},B.update=function(ae){ae=ae||{},this.objectOffset=ae.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in ae&&(this.contourWidth=X(ae.contourWidth,Number)),"showContour"in ae&&(this.showContour=X(ae.showContour,Boolean)),"showSurface"in ae&&(this.showSurface=!!ae.showSurface),"contourTint"in ae&&(this.contourTint=X(ae.contourTint,Boolean)),"contourColor"in ae&&(this.contourColor=te(ae.contourColor)),"contourProject"in ae&&(this.contourProject=X(ae.contourProject,function(wn){return X(wn,Boolean)})),"surfaceProject"in ae&&(this.surfaceProject=ae.surfaceProject),"dynamicColor"in ae&&(this.dynamicColor=te(ae.dynamicColor)),"dynamicTint"in ae&&(this.dynamicTint=X(ae.dynamicTint,Number)),"dynamicWidth"in ae&&(this.dynamicWidth=X(ae.dynamicWidth,Number)),"opacity"in ae&&(this.opacity=ae.opacity),"opacityscale"in ae&&(this.opacityscale=ae.opacityscale),"colorBounds"in ae&&(this.colorBounds=ae.colorBounds),"vertexColor"in ae&&(this.vertexColor=ae.vertexColor?1:0),"colormap"in ae&&this._colorMap.setPixels(this.genColormap(ae.colormap,this.opacityscale));var oe=ae.field||ae.coords&&ae.coords[2]||null,se=!1;if(oe||(oe=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),"field"in ae||"coords"in ae){var fe=(oe.shape[0]+2)*(oe.shape[1]+2);fe>this._field[2].data.length&&(a.freeFloat(this._field[2].data),this._field[2].data=a.mallocFloat(i.nextPow2(fe))),this._field[2]=b(this._field[2].data,[oe.shape[0]+2,oe.shape[1]+2]),this.padField(this._field[2],oe),this.shape=oe.shape.slice();for(var xe=this.shape,he=0;he<2;++he)this._field[2].size>this._field[he].data.length&&(a.freeFloat(this._field[he].data),this._field[he].data=a.mallocFloat(this._field[2].size)),this._field[he]=b(this._field[he].data,[xe[0]+2,xe[1]+2]);if(ae.coords){var de=ae.coords;if(!Array.isArray(de)||de.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(he=0;he<2;++he){var pe=de[he];for(Me=0;Me<2;++Me)if(pe.shape[Me]!==xe[Me])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[he],pe)}}else if(ae.ticks){var ye=ae.ticks;if(!Array.isArray(ye)||ye.length!==2)throw new Error("gl-surface: invalid ticks");for(he=0;he<2;++he){var Re=ye[he];if((Array.isArray(Re)||Re.length)&&(Re=b(Re)),Re.shape[0]!==xe[he])throw new Error("gl-surface: invalid tick length");var we=b(Re.data,xe);we.stride[he]=Re.stride[0],we.stride[1^he]=0,this.padField(this._field[he],we)}}else{for(he=0;he<2;++he){var Ae=[0,0];Ae[he]=1,this._field[he]=b(this._field[he].data,[xe[0]+2,xe[1]+2],Ae,0)}this._field[0].set(0,0,0);for(var Me=0;Me0){for(var kn=0;kn<5;++kn)ht.pop();Tt-=1}continue e}ht.push(pt[0],pt[1],Ct[0],Ct[1],pt[2]),Tt+=1}}ut.push(Tt)}this._contourOffsets[Oe]=Qe,this._contourCounts[Oe]=ut}var Wn=a.mallocFloat(ht.length);for(he=0;heI||L<0||L>I)throw new Error("gl-texture2d: Invalid texture size");return A._shape=[C,L],A.bind(),O.texImage2D(O.TEXTURE_2D,0,A.format,C,L,0,A.format,A.type,null),A._mipLevels=[0],A}function v(A,C,L,O,I,R){this.gl=A,this.handle=C,this.format=I,this.type=R,this._shape=[L,O],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 U=this,B=[this._wrapS,this._wrapT];Object.defineProperties(B,[{get:function(){return U._wrapS},set:function(N){return U.wrapS=N}},{get:function(){return U._wrapT},set:function(N){return U.wrapT=N}}]),this._wrapVector=B;var G=[this._shape[0],this._shape[1]];Object.defineProperties(G,[{get:function(){return U._shape[0]},set:function(N){return U.width=N}},{get:function(){return U._shape[1]},set:function(N){return U.height=N}}]),this._shapeVector=G}var x=v.prototype;function g(A,C){return A.length===3?C[2]===1&&C[1]===A[0]*A[2]&&C[0]===A[2]:C[0]===1&&C[1]===A[0]}function y(A){var C=A.createTexture();return A.bindTexture(A.TEXTURE_2D,C),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),C}function k(A,C,L,O,I){var R=A.getParameter(A.MAX_TEXTURE_SIZE);if(C<0||C>R||L<0||L>R)throw new Error("gl-texture2d: Invalid texture shape");if(I===A.FLOAT&&!A.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var U=y(A);return A.texImage2D(A.TEXTURE_2D,0,O,C,L,0,O,I,null),new v(A,U,C,L,O,I)}function h(A,C,L,O,I,R){var U=y(A);return A.texImage2D(A.TEXTURE_2D,0,I,I,R,C),new v(A,U,L,O,I,R)}function M(A,C){var L=C.dtype,O=C.shape.slice(),I=A.getParameter(A.MAX_TEXTURE_SIZE);if(O[0]<0||O[0]>I||O[1]<0||O[1]>I)throw new Error("gl-texture2d: Invalid texture size");var R=g(O,C.stride.slice()),U=0;L==="float32"?U=A.FLOAT:L==="float64"?(U=A.FLOAT,R=!1,L="float32"):L==="uint8"?U=A.UNSIGNED_BYTE:(U=A.UNSIGNED_BYTE,R=!1,L="uint8");var B,G,N=0;if(O.length===2)N=A.LUMINANCE,O=[O[0],O[1],1],C=i(C.data,O,[C.stride[0],C.stride[1],1],C.offset);else{if(O.length!==3)throw new Error("gl-texture2d: Invalid shape for texture");if(O[2]===1)N=A.ALPHA;else if(O[2]===2)N=A.LUMINANCE_ALPHA;else if(O[2]===3)N=A.RGB;else{if(O[2]!==4)throw new Error("gl-texture2d: Invalid shape for pixel coords");N=A.RGBA}}U!==A.FLOAT||A.getExtension("OES_texture_float")||(U=A.UNSIGNED_BYTE,R=!1);var j=C.size;if(R)B=C.offset===0&&C.data.length===j?C.data:C.data.subarray(C.offset,C.offset+j);else{var V=[O[2],O[2]*O[0],1];G=n.malloc(j,L);var H=i(G,O,V,0);L!=="float32"&&L!=="float64"||U!==A.UNSIGNED_BYTE?r.assign(H,C):b(H,C),B=G.subarray(0,j)}var ee=y(A);return A.texImage2D(A.TEXTURE_2D,0,N,O[0],O[1],0,N,U,B),R||n.free(G),new v(A,ee,O[0],O[1],N,U)}Object.defineProperties(x,{minFilter:{get:function(){return this._minFilter},set:function(A){this.bind();var C=this.gl;if(this.type===C.FLOAT&&o.indexOf(A)>=0&&(C.getExtension("OES_texture_float_linear")||(A=C.NEAREST)),a.indexOf(A)<0)throw new Error("gl-texture2d: Unknown filter mode "+A);return C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MIN_FILTER,A),this._minFilter=A}},magFilter:{get:function(){return this._magFilter},set:function(A){this.bind();var C=this.gl;if(this.type===C.FLOAT&&o.indexOf(A)>=0&&(C.getExtension("OES_texture_float_linear")||(A=C.NEAREST)),a.indexOf(A)<0)throw new Error("gl-texture2d: Unknown filter mode "+A);return C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MAG_FILTER,A),this._magFilter=A}},mipSamples:{get:function(){return this._anisoSamples},set:function(A){var C=this._anisoSamples;if(this._anisoSamples=0|Math.max(A,1),C!==this._anisoSamples){var L=this.gl.getExtension("EXT_texture_filter_anisotropic");L&&this.gl.texParameterf(this.gl.TEXTURE_2D,L.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(A){if(this.bind(),u.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(),u.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 C=0;C<2;++C)if(u.indexOf(A[C])<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);this._wrapS=A[0],this._wrapT=A[1];var L=this.gl;return this.bind(),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_WRAP_S,this._wrapS),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_WRAP_T,this._wrapT),A}},shape:{get:function(){return this._shapeVector},set:function(A){if(Array.isArray(A)){if(A.length!==2)throw new Error("gl-texture2d: Invalid texture shape")}else A=[0|A,0|A];return d(this,0|A[0],0|A[1]),[0|A[0],0|A[1]]}},width:{get:function(){return this._shape[0]},set:function(A){return d(this,A|=0,this._shape[1]),A}},height:{get:function(){return this._shape[1]},set:function(A){return A|=0,d(this,this._shape[0],A),A}}}),x.bind=function(A){var C=this.gl;return A!==void 0&&C.activeTexture(C.TEXTURE0+(0|A)),C.bindTexture(C.TEXTURE_2D,this.handle),A!==void 0?0|A:C.getParameter(C.ACTIVE_TEXTURE)-C.TEXTURE0},x.dispose=function(){this.gl.deleteTexture(this.handle)},x.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var A=Math.min(this._shape[0],this._shape[1]),C=0;A>0;++C,A>>>=1)this._mipLevels.indexOf(C)<0&&this._mipLevels.push(C)},x.setPixels=function(A,C,L,O){var I=this.gl;this.bind(),Array.isArray(C)?(O=L,L=0|C[1],C=0|C[0]):(C=C||0,L=L||0),O=O||0;var R=c(A)?A:A.raw;if(R)this._mipLevels.indexOf(O)<0?(I.texImage2D(I.TEXTURE_2D,0,this.format,this.format,this.type,R),this._mipLevels.push(O)):I.texSubImage2D(I.TEXTURE_2D,O,C,L,this.format,this.type,R);else{if(!(A.shape&&A.stride&&A.data))throw new Error("gl-texture2d: Unsupported data type");if(A.shape.length<2||C+A.shape[1]>this._shape[1]>>>O||L+A.shape[0]>this._shape[0]>>>O||C<0||L<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");(function(U,B,G,N,j,V,H,ee){var Q=ee.dtype,Y=ee.shape.slice();if(Y.length<2||Y.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var X=0,K=0,te=g(Y,ee.stride.slice());if(Q==="float32"?X=U.FLOAT:Q==="float64"?(X=U.FLOAT,te=!1,Q="float32"):Q==="uint8"?X=U.UNSIGNED_BYTE:(X=U.UNSIGNED_BYTE,te=!1,Q="uint8"),Y.length===2)K=U.LUMINANCE,Y=[Y[0],Y[1],1],ee=i(ee.data,Y,[ee.stride[0],ee.stride[1],1],ee.offset);else{if(Y.length!==3)throw new Error("gl-texture2d: Invalid shape for texture");if(Y[2]===1)K=U.ALPHA;else if(Y[2]===2)K=U.LUMINANCE_ALPHA;else if(Y[2]===3)K=U.RGB;else{if(Y[2]!==4)throw new Error("gl-texture2d: Invalid shape for pixel coords");K=U.RGBA}Y[2]}if(K!==U.LUMINANCE&&K!==U.ALPHA||j!==U.LUMINANCE&&j!==U.ALPHA||(K=j),K!==j)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var ae=ee.size,oe=H.indexOf(N)<0;if(oe&&H.push(N),X===V&&te)ee.offset===0&&ee.data.length===ae?oe?U.texImage2D(U.TEXTURE_2D,N,j,Y[0],Y[1],0,j,V,ee.data):U.texSubImage2D(U.TEXTURE_2D,N,B,G,Y[0],Y[1],j,V,ee.data):oe?U.texImage2D(U.TEXTURE_2D,N,j,Y[0],Y[1],0,j,V,ee.data.subarray(ee.offset,ee.offset+ae)):U.texSubImage2D(U.TEXTURE_2D,N,B,G,Y[0],Y[1],j,V,ee.data.subarray(ee.offset,ee.offset+ae));else{var se;se=V===U.FLOAT?n.mallocFloat32(ae):n.mallocUint8(ae);var fe=i(se,Y,[Y[2],Y[2]*Y[0],1]);X===U.FLOAT&&V===U.UNSIGNED_BYTE?b(fe,ee):r.assign(fe,ee),oe?U.texImage2D(U.TEXTURE_2D,N,j,Y[0],Y[1],0,j,V,se.subarray(0,ae)):U.texSubImage2D(U.TEXTURE_2D,N,B,G,Y[0],Y[1],j,V,se.subarray(0,ae)),V===U.FLOAT?n.freeFloat32(se):n.freeUint8(se)}})(I,C,L,O,this.format,this.type,this._mipLevels,A)}}},3056:function(f){f.exports=function(l,t,i){t?t.bind():l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,null);var r=0|l.getParameter(l.MAX_VERTEX_ATTRIBS);if(i){if(i.length>r)throw new Error("gl-vao: Too many vertex attributes");for(var n=0;n1?0:Math.acos(c)};var i=t(5415),r=t(899),n=t(9305)},8827:function(f){f.exports=function(l,t){return l[0]=Math.ceil(t[0]),l[1]=Math.ceil(t[1]),l[2]=Math.ceil(t[2]),l}},7622:function(f){f.exports=function(l){var t=new Float32Array(3);return t[0]=l[0],t[1]=l[1],t[2]=l[2],t}},8782:function(f){f.exports=function(l,t){return l[0]=t[0],l[1]=t[1],l[2]=t[2],l}},8501:function(f){f.exports=function(){var l=new Float32Array(3);return l[0]=0,l[1]=0,l[2]=0,l}},903:function(f){f.exports=function(l,t,i){var r=t[0],n=t[1],o=t[2],a=i[0],u=i[1],p=i[2];return l[0]=n*p-o*u,l[1]=o*a-r*p,l[2]=r*u-n*a,l}},5981:function(f,l,t){f.exports=t(8288)},8288:function(f){f.exports=function(l,t){var i=t[0]-l[0],r=t[1]-l[1],n=t[2]-l[2];return Math.sqrt(i*i+r*r+n*n)}},8629:function(f,l,t){f.exports=t(7979)},7979:function(f){f.exports=function(l,t,i){return l[0]=t[0]/i[0],l[1]=t[1]/i[1],l[2]=t[2]/i[2],l}},9305:function(f){f.exports=function(l,t){return l[0]*t[0]+l[1]*t[1]+l[2]*t[2]}},154:function(f){f.exports=1e-6},4932:function(f,l,t){f.exports=function(r,n){var o=r[0],a=r[1],u=r[2],p=n[0],c=n[1],b=n[2];return Math.abs(o-p)<=i*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(a-c)<=i*Math.max(1,Math.abs(a),Math.abs(c))&&Math.abs(u-b)<=i*Math.max(1,Math.abs(u),Math.abs(b))};var i=t(154)},5777:function(f){f.exports=function(l,t){return l[0]===t[0]&&l[1]===t[1]&&l[2]===t[2]}},3306:function(f){f.exports=function(l,t){return l[0]=Math.floor(t[0]),l[1]=Math.floor(t[1]),l[2]=Math.floor(t[2]),l}},7447:function(f,l,t){f.exports=function(r,n,o,a,u,p){var c,b;for(n||(n=3),o||(o=0),b=a?Math.min(a*n+o,r.length):r.length,c=o;c0&&(o=1/Math.sqrt(o),l[0]=t[0]*o,l[1]=t[1]*o,l[2]=t[2]*o),l}},6660:function(f){f.exports=function(l,t){t=t||1;var i=2*Math.random()*Math.PI,r=2*Math.random()-1,n=Math.sqrt(1-r*r)*t;return l[0]=Math.cos(i)*n,l[1]=Math.sin(i)*n,l[2]=r*t,l}},392:function(f){f.exports=function(l,t,i,r){var n=i[1],o=i[2],a=t[1]-n,u=t[2]-o,p=Math.sin(r),c=Math.cos(r);return l[0]=t[0],l[1]=n+a*c-u*p,l[2]=o+a*p+u*c,l}},3222:function(f){f.exports=function(l,t,i,r){var n=i[0],o=i[2],a=t[0]-n,u=t[2]-o,p=Math.sin(r),c=Math.cos(r);return l[0]=n+u*p+a*c,l[1]=t[1],l[2]=o+u*c-a*p,l}},3388:function(f){f.exports=function(l,t,i,r){var n=i[0],o=i[1],a=t[0]-n,u=t[1]-o,p=Math.sin(r),c=Math.cos(r);return l[0]=n+a*c-u*p,l[1]=o+a*p+u*c,l[2]=t[2],l}},1624:function(f){f.exports=function(l,t){return l[0]=Math.round(t[0]),l[1]=Math.round(t[1]),l[2]=Math.round(t[2]),l}},5685:function(f){f.exports=function(l,t,i){return l[0]=t[0]*i,l[1]=t[1]*i,l[2]=t[2]*i,l}},6722:function(f){f.exports=function(l,t,i,r){return l[0]=t[0]+i[0]*r,l[1]=t[1]+i[1]*r,l[2]=t[2]+i[2]*r,l}},831:function(f){f.exports=function(l,t,i,r){return l[0]=t,l[1]=i,l[2]=r,l}},5294:function(f,l,t){f.exports=t(6403)},3303:function(f,l,t){f.exports=t(4337)},6403:function(f){f.exports=function(l,t){var i=t[0]-l[0],r=t[1]-l[1],n=t[2]-l[2];return i*i+r*r+n*n}},4337:function(f){f.exports=function(l){var t=l[0],i=l[1],r=l[2];return t*t+i*i+r*r}},8921:function(f,l,t){f.exports=t(911)},911:function(f){f.exports=function(l,t,i){return l[0]=t[0]-i[0],l[1]=t[1]-i[1],l[2]=t[2]-i[2],l}},9908:function(f){f.exports=function(l,t,i){var r=t[0],n=t[1],o=t[2];return l[0]=r*i[0]+n*i[3]+o*i[6],l[1]=r*i[1]+n*i[4]+o*i[7],l[2]=r*i[2]+n*i[5]+o*i[8],l}},3255:function(f){f.exports=function(l,t,i){var r=t[0],n=t[1],o=t[2],a=i[3]*r+i[7]*n+i[11]*o+i[15];return a=a||1,l[0]=(i[0]*r+i[4]*n+i[8]*o+i[12])/a,l[1]=(i[1]*r+i[5]*n+i[9]*o+i[13])/a,l[2]=(i[2]*r+i[6]*n+i[10]*o+i[14])/a,l}},6568:function(f){f.exports=function(l,t,i){var r=t[0],n=t[1],o=t[2],a=i[0],u=i[1],p=i[2],c=i[3],b=c*r+u*o-p*n,d=c*n+p*r-a*o,v=c*o+a*n-u*r,x=-a*r-u*n-p*o;return l[0]=b*c+x*-a+d*-p-v*-u,l[1]=d*c+x*-u+v*-a-b*-p,l[2]=v*c+x*-p+b*-u-d*-a,l}},3433:function(f){f.exports=function(l,t,i){return l[0]=t[0]+i[0],l[1]=t[1]+i[1],l[2]=t[2]+i[2],l[3]=t[3]+i[3],l}},1413:function(f){f.exports=function(l){var t=new Float32Array(4);return t[0]=l[0],t[1]=l[1],t[2]=l[2],t[3]=l[3],t}},3470:function(f){f.exports=function(l,t){return l[0]=t[0],l[1]=t[1],l[2]=t[2],l[3]=t[3],l}},5313:function(f){f.exports=function(){var l=new Float32Array(4);return l[0]=0,l[1]=0,l[2]=0,l[3]=0,l}},5446:function(f){f.exports=function(l,t){var i=t[0]-l[0],r=t[1]-l[1],n=t[2]-l[2],o=t[3]-l[3];return Math.sqrt(i*i+r*r+n*n+o*o)}},205:function(f){f.exports=function(l,t,i){return l[0]=t[0]/i[0],l[1]=t[1]/i[1],l[2]=t[2]/i[2],l[3]=t[3]/i[3],l}},4242:function(f){f.exports=function(l,t){return l[0]*t[0]+l[1]*t[1]+l[2]*t[2]+l[3]*t[3]}},5680:function(f){f.exports=function(l,t,i,r){var n=new Float32Array(4);return n[0]=l,n[1]=t,n[2]=i,n[3]=r,n}},4020:function(f,l,t){f.exports={create:t(5313),clone:t(1413),fromValues:t(5680),copy:t(3470),set:t(6453),add:t(3433),subtract:t(2705),multiply:t(746),divide:t(205),min:t(2170),max:t(3030),scale:t(5510),scaleAndAdd:t(4224),distance:t(5446),squaredDistance:t(1542),length:t(8177),squaredLength:t(9037),negate:t(6459),inverse:t(8057),normalize:t(381),dot:t(4242),lerp:t(8746),random:t(3770),transformMat4:t(6342),transformQuat:t(5022)}},8057:function(f){f.exports=function(l,t){return l[0]=1/t[0],l[1]=1/t[1],l[2]=1/t[2],l[3]=1/t[3],l}},8177:function(f){f.exports=function(l){var t=l[0],i=l[1],r=l[2],n=l[3];return Math.sqrt(t*t+i*i+r*r+n*n)}},8746:function(f){f.exports=function(l,t,i,r){var n=t[0],o=t[1],a=t[2],u=t[3];return l[0]=n+r*(i[0]-n),l[1]=o+r*(i[1]-o),l[2]=a+r*(i[2]-a),l[3]=u+r*(i[3]-u),l}},3030:function(f){f.exports=function(l,t,i){return l[0]=Math.max(t[0],i[0]),l[1]=Math.max(t[1],i[1]),l[2]=Math.max(t[2],i[2]),l[3]=Math.max(t[3],i[3]),l}},2170:function(f){f.exports=function(l,t,i){return l[0]=Math.min(t[0],i[0]),l[1]=Math.min(t[1],i[1]),l[2]=Math.min(t[2],i[2]),l[3]=Math.min(t[3],i[3]),l}},746:function(f){f.exports=function(l,t,i){return l[0]=t[0]*i[0],l[1]=t[1]*i[1],l[2]=t[2]*i[2],l[3]=t[3]*i[3],l}},6459:function(f){f.exports=function(l,t){return l[0]=-t[0],l[1]=-t[1],l[2]=-t[2],l[3]=-t[3],l}},381:function(f){f.exports=function(l,t){var i=t[0],r=t[1],n=t[2],o=t[3],a=i*i+r*r+n*n+o*o;return a>0&&(a=1/Math.sqrt(a),l[0]=i*a,l[1]=r*a,l[2]=n*a,l[3]=o*a),l}},3770:function(f,l,t){var i=t(381),r=t(5510);f.exports=function(n,o){return o=o||1,n[0]=Math.random(),n[1]=Math.random(),n[2]=Math.random(),n[3]=Math.random(),i(n,n),r(n,n,o),n}},5510:function(f){f.exports=function(l,t,i){return l[0]=t[0]*i,l[1]=t[1]*i,l[2]=t[2]*i,l[3]=t[3]*i,l}},4224:function(f){f.exports=function(l,t,i,r){return l[0]=t[0]+i[0]*r,l[1]=t[1]+i[1]*r,l[2]=t[2]+i[2]*r,l[3]=t[3]+i[3]*r,l}},6453:function(f){f.exports=function(l,t,i,r,n){return l[0]=t,l[1]=i,l[2]=r,l[3]=n,l}},1542:function(f){f.exports=function(l,t){var i=t[0]-l[0],r=t[1]-l[1],n=t[2]-l[2],o=t[3]-l[3];return i*i+r*r+n*n+o*o}},9037:function(f){f.exports=function(l){var t=l[0],i=l[1],r=l[2],n=l[3];return t*t+i*i+r*r+n*n}},2705:function(f){f.exports=function(l,t,i){return l[0]=t[0]-i[0],l[1]=t[1]-i[1],l[2]=t[2]-i[2],l[3]=t[3]-i[3],l}},6342:function(f){f.exports=function(l,t,i){var r=t[0],n=t[1],o=t[2],a=t[3];return l[0]=i[0]*r+i[4]*n+i[8]*o+i[12]*a,l[1]=i[1]*r+i[5]*n+i[9]*o+i[13]*a,l[2]=i[2]*r+i[6]*n+i[10]*o+i[14]*a,l[3]=i[3]*r+i[7]*n+i[11]*o+i[15]*a,l}},5022:function(f){f.exports=function(l,t,i){var r=t[0],n=t[1],o=t[2],a=i[0],u=i[1],p=i[2],c=i[3],b=c*r+u*o-p*n,d=c*n+p*r-a*o,v=c*o+a*n-u*r,x=-a*r-u*n-p*o;return l[0]=b*c+x*-a+d*-p-v*-u,l[1]=d*c+x*-u+v*-a-b*-p,l[2]=v*c+x*-p+b*-u-d*-a,l[3]=t[3],l}},9365:function(f,l,t){var i=t(8096),r=t(7896);f.exports=function(n){for(var o=Array.isArray(n)?n:i(n),a=0;a0)continue;xe=se.slice(0,1).join("")}return j(xe),L+=xe.length,(h=h.slice(xe.length)).length}}function K(){return/[^a-fA-F0-9]/.test(d)?(j(h.join("")),k=u,g):(h.push(d),v=d,g+1)}function te(){return d==="."||/[eE]/.test(d)?(h.push(d),k=5,v=d,g+1):d==="x"&&h.length===1&&h[0]==="0"?(k=11,h.push(d),v=d,g+1):/[^\d]/.test(d)?(j(h.join("")),k=u,g):(h.push(d),v=d,g+1)}function ae(){return d==="f"&&(h.push(d),v=d,g+=1),/[eE]/.test(d)?(h.push(d),v=d,g+1):(d!=="-"&&d!=="+"||!/[eE]/.test(v))&&/[^\d]/.test(d)?(j(h.join("")),k=u,g):(h.push(d),v=d,g+1)}function oe(){if(/[^\d\w_]/.test(d)){var se=h.join("");return k=N[se]?8:G[se]?7:6,j(h.join("")),k=u,g}return h.push(d),v=d,g+1}};var i=t(399),r=t(9746),n=t(9525),o=t(9458),a=t(3585),u=999,p=9999,c=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},3585:function(f,l,t){var i=t(9525);i=i.slice().filter(function(r){return!/^(gl\_|texture)/.test(r)}),f.exports=i.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"])},9525:function(f){f.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"]},9458:function(f,l,t){var i=t(399);f.exports=i.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"])},399:function(f){f.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"]},9746:function(f){f.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},8096:function(f,l,t){var i=t(3193);f.exports=function(r,n){var o=i(n),a=[];return(a=a.concat(o(r))).concat(o(null))}},6832:function(f){f.exports=function(l){typeof l=="string"&&(l=[l]);for(var t=[].slice.call(arguments,1),i=[],r=0;r0;)for(var h=(b=k.pop()).adjacent,M=0;M<=v;++M){var A=h[M];if(A.boundary&&!(A.lastVisited<=-x)){for(var C=A.vertices,L=0;L<=v;++L){var O=C[L];g[L]=O<0?d:y[O]}var I=this.orient();if(I>0)return A;A.lastVisited=-x,I===0&&k.push(A)}}return null},c.walk=function(b,d){var v=this.vertices.length-1,x=this.dimension,g=this.vertices,y=this.tuple,k=d?this.interior.length*Math.random()|0:this.interior.length-1,h=this.interior[k];e:for(;!h.boundary;){for(var M=h.vertices,A=h.adjacent,C=0;C<=x;++C)y[C]=g[M[C]];for(h.lastVisited=v,C=0;C<=x;++C){var L=A[C];if(!(L.lastVisited>=v)){var O=y[C];y[C]=b;var I=this.orient();if(y[C]=O,I<0){h=L;continue e}L.boundary?L.lastVisited=-v:L.lastVisited=v}}return}return h},c.addPeaks=function(b,d){var v=this.vertices.length-1,x=this.dimension,g=this.vertices,y=this.tuple,k=this.interior,h=this.simplices,M=[d];d.lastVisited=v,d.vertices[d.vertices.indexOf(-1)]=v,d.boundary=!1,k.push(d);for(var A=[];M.length>0;){var C=(d=M.pop()).vertices,L=d.adjacent,O=C.indexOf(v);if(!(O<0)){for(var I=0;I<=x;++I)if(I!==O){var R=L[I];if(R.boundary&&!(R.lastVisited>=v)){var U=R.vertices;if(R.lastVisited!==-v){for(var B=0,G=0;G<=x;++G)U[G]<0?(B=G,y[G]=b):y[G]=g[U[G]];if(this.orient()>0){U[B]=v,R.boundary=!1,k.push(R),M.push(R),R.lastVisited=v;continue}R.lastVisited=-v}var N=R.adjacent,j=C.slice(),V=L.slice(),H=new n(j,V,!0);h.push(H);var ee=N.indexOf(d);if(!(ee<0))for(N[ee]=H,V[O]=R,j[I]=-1,V[I]=d,L[I]=H,H.flip(),G=0;G<=x;++G){var Q=j[G];if(!(Q<0||Q===v)){for(var Y=new Array(x-1),X=0,K=0;K<=x;++K){var te=j[K];te<0||K===G||(Y[X++]=te)}A.push(new o(Y,H,G))}}}}}}for(A.sort(a),I=0;I+1=0?k[M++]=h[C]:A=1&C;if(A===(1&b)){var L=k[0];k[0]=k[1],k[1]=L}d.push(k)}}return d}},9014:function(f,l,t){var i=t(5070);function r(M,A,C,L,O){this.mid=M,this.left=A,this.right=C,this.leftPoints=L,this.rightPoints=O,this.count=(A?A.count:0)+(C?C.count:0)+L.length}f.exports=function(M){return M&&M.length!==0?new k(y(M)):new k(null)};var n=r.prototype;function o(M,A){M.mid=A.mid,M.left=A.left,M.right=A.right,M.leftPoints=A.leftPoints,M.rightPoints=A.rightPoints,M.count=A.count}function a(M,A){var C=y(A);M.mid=C.mid,M.left=C.left,M.right=C.right,M.leftPoints=C.leftPoints,M.rightPoints=C.rightPoints,M.count=C.count}function u(M,A){var C=M.intervals([]);C.push(A),a(M,C)}function p(M,A){var C=M.intervals([]),L=C.indexOf(A);return L<0?0:(C.splice(L,1),a(M,C),1)}function c(M,A,C){for(var L=0;L=0&&M[L][1]>=A;--L){var O=C(M[L]);if(O)return O}}function d(M,A){for(var C=0;C>1],O=[],I=[],R=[];for(C=0;C3*(A+1)?u(this,M):this.left.insert(M):this.left=y([M]);else if(M[0]>this.mid)this.right?4*(this.right.count+1)>3*(A+1)?u(this,M):this.right.insert(M):this.right=y([M]);else{var C=i.ge(this.leftPoints,M,x),L=i.ge(this.rightPoints,M,g);this.leftPoints.splice(C,0,M),this.rightPoints.splice(L,0,M)}},n.remove=function(M){var A=this.count-this.leftPoints;if(M[1]3*(A-1)?p(this,M):(I=this.left.remove(M))===2?(this.left=null,this.count-=1,1):(I===1&&(this.count-=1),I):0;if(M[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(A-1)?p(this,M):(I=this.right.remove(M))===2?(this.right=null,this.count-=1,1):(I===1&&(this.count-=1),I):0;if(this.count===1)return this.leftPoints[0]===M?2:0;if(this.leftPoints.length===1&&this.leftPoints[0]===M){if(this.left&&this.right){for(var C=this,L=this.left;L.right;)C=L,L=L.right;if(C===this)L.right=this.right;else{var O=this.left,I=this.right;C.count-=L.count,C.right=L.left,L.left=O,L.right=I}o(this,L),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?o(this,this.left):o(this,this.right);return 1}for(O=i.ge(this.leftPoints,M,x);Othis.mid?this.right&&(C=this.right.queryPoint(M,A))?C:b(this.rightPoints,M,A):d(this.leftPoints,A);var C},n.queryInterval=function(M,A,C){var L;return Mthis.mid&&this.right&&(L=this.right.queryInterval(M,A,C))?L:Athis.mid?b(this.rightPoints,M,C):d(this.leftPoints,C)};var h=k.prototype;h.insert=function(M){this.root?this.root.insert(M):this.root=new r(M[0],null,null,[M],[M])},h.remove=function(M){if(this.root){var A=this.root.remove(M);return A===2&&(this.root=null),A!==0}return!1},h.queryPoint=function(M,A){if(this.root)return this.root.queryPoint(M,A)},h.queryInterval=function(M,A,C){if(M<=A&&this.root)return this.root.queryInterval(M,A,C)},Object.defineProperty(h,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(h,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},9560:function(f){f.exports=function(l){for(var t=new Array(l),i=0;i13)&&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}},3578:function(f){f.exports=function(l,t,i){return l*(1-i)+t*i}},7191:function(f,l,t){var i=t(4690),r=t(9823),n=t(7332),o=t(7787),a=t(7437),u=t(2142),p={length:t(4693),normalize:t(899),dot:t(9305),cross:t(903)},c=r(),b=r(),d=[0,0,0,0],v=[[0,0,0],[0,0,0],[0,0,0]],x=[0,0,0];function g(y,k,h,M,A){y[0]=k[0]*M+h[0]*A,y[1]=k[1]*M+h[1]*A,y[2]=k[2]*M+h[2]*A}f.exports=function(y,k,h,M,A,C){if(k||(k=[0,0,0]),h||(h=[0,0,0]),M||(M=[0,0,0]),A||(A=[0,0,0,1]),C||(C=[0,0,0,1]),!i(c,y)||(n(b,c),b[3]=0,b[7]=0,b[11]=0,b[15]=1,Math.abs(o(b)<1e-8)))return!1;var L,O,I,R,U,B,G,N=c[3],j=c[7],V=c[11],H=c[12],ee=c[13],Q=c[14],Y=c[15];if(N!==0||j!==0||V!==0){if(d[0]=N,d[1]=j,d[2]=V,d[3]=Y,!a(b,b))return!1;u(b,b),L=A,I=b,R=(O=d)[0],U=O[1],B=O[2],G=O[3],L[0]=I[0]*R+I[4]*U+I[8]*B+I[12]*G,L[1]=I[1]*R+I[5]*U+I[9]*B+I[13]*G,L[2]=I[2]*R+I[6]*U+I[10]*B+I[14]*G,L[3]=I[3]*R+I[7]*U+I[11]*B+I[15]*G}else A[0]=A[1]=A[2]=0,A[3]=1;if(k[0]=H,k[1]=ee,k[2]=Q,function(K,te){K[0][0]=te[0],K[0][1]=te[1],K[0][2]=te[2],K[1][0]=te[4],K[1][1]=te[5],K[1][2]=te[6],K[2][0]=te[8],K[2][1]=te[9],K[2][2]=te[10]}(v,c),h[0]=p.length(v[0]),p.normalize(v[0],v[0]),M[0]=p.dot(v[0],v[1]),g(v[1],v[1],v[0],1,-M[0]),h[1]=p.length(v[1]),p.normalize(v[1],v[1]),M[0]/=h[1],M[1]=p.dot(v[0],v[2]),g(v[2],v[2],v[0],1,-M[1]),M[2]=p.dot(v[1],v[2]),g(v[2],v[2],v[1],1,-M[2]),h[2]=p.length(v[2]),p.normalize(v[2],v[2]),M[1]/=h[2],M[2]/=h[2],p.cross(x,v[1],v[2]),p.dot(v[0],x)<0)for(var X=0;X<3;X++)h[X]*=-1,v[X][0]*=-1,v[X][1]*=-1,v[X][2]*=-1;return C[0]=.5*Math.sqrt(Math.max(1+v[0][0]-v[1][1]-v[2][2],0)),C[1]=.5*Math.sqrt(Math.max(1-v[0][0]+v[1][1]-v[2][2],0)),C[2]=.5*Math.sqrt(Math.max(1-v[0][0]-v[1][1]+v[2][2],0)),C[3]=.5*Math.sqrt(Math.max(1+v[0][0]+v[1][1]+v[2][2],0)),v[2][1]>v[1][2]&&(C[0]=-C[0]),v[0][2]>v[2][0]&&(C[1]=-C[1]),v[1][0]>v[0][1]&&(C[2]=-C[2]),!0}},4690:function(f){f.exports=function(l,t){var i=t[15];if(i===0)return!1;for(var r=1/i,n=0;n<16;n++)l[n]=t[n]*r;return!0}},7649:function(f,l,t){var i=t(1868),r=t(1102),n=t(7191),o=t(7787),a=t(1116),u=b(),p=b(),c=b();function b(){return{translate:d(),scale:d(1),skew:d(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function d(v){return[v||0,v||0,v||0]}f.exports=function(v,x,g,y){if(o(x)===0||o(g)===0)return!1;var k=n(x,u.translate,u.scale,u.skew,u.perspective,u.quaternion),h=n(g,p.translate,p.scale,p.skew,p.perspective,p.quaternion);return!(!k||!h||(i(c.translate,u.translate,p.translate,y),i(c.skew,u.skew,p.skew,y),i(c.scale,u.scale,p.scale,y),i(c.perspective,u.perspective,p.perspective,y),a(c.quaternion,u.quaternion,p.quaternion,y),r(v,c.translate,c.scale,c.skew,c.perspective,c.quaternion),0))}},1102:function(f,l,t){var i={identity:t(9947),translate:t(998),multiply:t(104),create:t(9823),scale:t(3668),fromRotationTranslation:t(7280)},r=(i.create(),i.create());f.exports=function(n,o,a,u,p,c){return i.identity(n),i.fromRotationTranslation(n,c,o),n[3]=p[0],n[7]=p[1],n[11]=p[2],n[15]=p[3],i.identity(r),u[2]!==0&&(r[9]=u[2],i.multiply(n,n,r)),u[1]!==0&&(r[9]=0,r[8]=u[1],i.multiply(n,n,r)),u[0]!==0&&(r[8]=0,r[4]=u[0],i.multiply(n,n,r)),i.scale(n,n,a),n}},9298:function(f,l,t){var i=t(5070),r=t(7649),n=t(7437),o=t(6109),a=t(7115),u=t(5240),p=t(3012),c=t(998),b=(t(3668),t(899)),d=[0,0,0];function v(y){this._components=y.slice(),this._time=[0],this.prevMatrix=y.slice(),this.nextMatrix=y.slice(),this.computedMatrix=y.slice(),this.computedInverse=y.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}f.exports=function(y){return new v((y=y||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var x=v.prototype;x.recalcMatrix=function(y){var k=this._time,h=i.le(k,y),M=this.computedMatrix;if(!(h<0)){var A=this._components;if(h===k.length-1)for(var C=16*h,L=0;L<16;++L)M[L]=A[C++];else{var O=k[h+1]-k[h],I=(C=16*h,this.prevMatrix),R=!0;for(L=0;L<16;++L)I[L]=A[C++];var U=this.nextMatrix;for(L=0;L<16;++L)U[L]=A[C++],R=R&&I[L]===U[L];if(O<1e-6||R)for(L=0;L<16;++L)M[L]=I[L];else r(M,I,U,(y-k[h])/O)}var B=this.computedUp;B[0]=M[1],B[1]=M[5],B[2]=M[9],b(B,B);var G=this.computedInverse;n(G,M);var N=this.computedEye,j=G[15];N[0]=G[12]/j,N[1]=G[13]/j,N[2]=G[14]/j;var V=this.computedCenter,H=Math.exp(this.computedRadius[0]);for(L=0;L<3;++L)V[L]=N[L]-M[2+4*L]*H}},x.idle=function(y){if(!(y1&&i(r[p[v-2]],r[p[v-1]],d)<=0;)v-=1,p.pop();for(p.push(b),v=c.length;v>1&&i(r[c[v-2]],r[c[v-1]],d)>=0;)v-=1,c.pop();c.push(b)}o=new Array(c.length+p.length-2);for(var x=0,g=(a=0,p.length);a0;--y)o[x++]=c[y];return o};var i=t(417)[3]},6145:function(f,l,t){f.exports=function(r,n){n||(n=r,r=window);var o=0,a=0,u=0,p={shift:!1,alt:!1,control:!1,meta:!1},c=!1;function b(C){var L=!1;return"altKey"in C&&(L=L||C.altKey!==p.alt,p.alt=!!C.altKey),"shiftKey"in C&&(L=L||C.shiftKey!==p.shift,p.shift=!!C.shiftKey),"ctrlKey"in C&&(L=L||C.ctrlKey!==p.control,p.control=!!C.ctrlKey),"metaKey"in C&&(L=L||C.metaKey!==p.meta,p.meta=!!C.metaKey),L}function d(C,L){var O=i.x(L),I=i.y(L);"buttons"in L&&(C=0|L.buttons),(C!==o||O!==a||I!==u||b(L))&&(o=0|C,a=O||0,u=I||0,n&&n(o,a,u,p))}function v(C){d(0,C)}function x(){(o||a||u||p.shift||p.alt||p.meta||p.control)&&(a=u=0,o=0,p.shift=p.alt=p.control=p.meta=!1,n&&n(0,0,0,p))}function g(C){b(C)&&n&&n(o,a,u,p)}function y(C){i.buttons(C)===0?d(0,C):d(o,C)}function k(C){d(o|i.buttons(C),C)}function h(C){d(o&~i.buttons(C),C)}function M(){c||(c=!0,r.addEventListener("mousemove",y),r.addEventListener("mousedown",k),r.addEventListener("mouseup",h),r.addEventListener("mouseleave",v),r.addEventListener("mouseenter",v),r.addEventListener("mouseout",v),r.addEventListener("mouseover",v),r.addEventListener("blur",x),r.addEventListener("keyup",g),r.addEventListener("keydown",g),r.addEventListener("keypress",g),r!==window&&(window.addEventListener("blur",x),window.addEventListener("keyup",g),window.addEventListener("keydown",g),window.addEventListener("keypress",g)))}M();var A={element:r};return Object.defineProperties(A,{enabled:{get:function(){return c},set:function(C){C?M():c&&(c=!1,r.removeEventListener("mousemove",y),r.removeEventListener("mousedown",k),r.removeEventListener("mouseup",h),r.removeEventListener("mouseleave",v),r.removeEventListener("mouseenter",v),r.removeEventListener("mouseout",v),r.removeEventListener("mouseover",v),r.removeEventListener("blur",x),r.removeEventListener("keyup",g),r.removeEventListener("keydown",g),r.removeEventListener("keypress",g),r!==window&&(window.removeEventListener("blur",x),window.removeEventListener("keyup",g),window.removeEventListener("keydown",g),window.removeEventListener("keypress",g)))},enumerable:!0},buttons:{get:function(){return o},enumerable:!0},x:{get:function(){return a},enumerable:!0},y:{get:function(){return u},enumerable:!0},mods:{get:function(){return p},enumerable:!0}}),A};var i=t(4110)},2565:function(f){var l={left:0,top:0};f.exports=function(t,i,r){i=i||t.currentTarget||t.srcElement,Array.isArray(r)||(r=[0,0]);var n,o=t.clientX||0,a=t.clientY||0,u=(n=i)===window||n===document||n===document.body?l:n.getBoundingClientRect();return r[0]=o-u.left,r[1]=a-u.top,r}},4110:function(f,l){function t(i){return i.target||i.srcElement||window}l.buttons=function(i){if(typeof i=="object"){if("buttons"in i)return i.buttons;if("which"in i){if((r=i.which)===2)return 4;if(r===3)return 2;if(r>0)return 1<=0)return 1< 0"),typeof n.vertex!="function"&&o("Must specify vertex creation function"),typeof n.cell!="function"&&o("Must specify cell creation function"),typeof n.phase!="function"&&o("Must specify phase function");for(var p=n.getters||[],c=new Array(u),b=0;b=0?c[b]=!0:c[b]=!1;return function(d,v,x,g,y,k){var h=[k,y].join(",");return(0,r[h])(d,v,x,i.mallocUint32,i.freeUint32)}(n.vertex,n.cell,n.phase,0,a,c)};var r={"false,0,1":function(n,o,a,u,p){return function(c,b,d,v){var x,g=0|c.shape[0],y=0|c.shape[1],k=c.data,h=0|c.offset,M=0|c.stride[0],A=0|c.stride[1],C=h,L=0|-M,O=0,I=0|-A,R=0,U=-M-A|0,B=0,G=0|M,N=A-M*g|0,j=0,V=0,H=0,ee=2*g|0,Q=u(ee),Y=u(ee),X=0,K=0,te=-1,ae=-1,oe=0,se=0|-g,fe=0|g,xe=0,he=-g-1|0,de=g-1|0,pe=0,ye=0,Re=0;for(j=0;j0){if(V=1,Q[X++]=a(k[C],b,d,v),C+=G,g>0)for(j=1,x=k[C],K=Q[X]=a(x,b,d,v),oe=Q[X+te],xe=Q[X+se],pe=Q[X+he],K===oe&&K===xe&&K===pe||(O=k[C+L],R=k[C+I],B=k[C+U],n(j,V,x,O,R,B,K,oe,xe,pe,b,d,v),ye=Y[X]=H++),X+=1,C+=G,j=2;j0)for(j=1,x=k[C],K=Q[X]=a(x,b,d,v),oe=Q[X+te],xe=Q[X+se],pe=Q[X+he],K===oe&&K===xe&&K===pe||(O=k[C+L],R=k[C+I],B=k[C+U],n(j,V,x,O,R,B,K,oe,xe,pe,b,d,v),ye=Y[X]=H++,pe!==xe&&o(Y[X+se],ye,R,B,xe,pe,b,d,v)),X+=1,C+=G,j=2;j0){if(j=1,Q[X++]=a(k[C],b,d,v),C+=G,y>0)for(V=1,x=k[C],K=Q[X]=a(x,b,d,v),xe=Q[X+se],oe=Q[X+te],pe=Q[X+he],K===xe&&K===oe&&K===pe||(O=k[C+L],R=k[C+I],B=k[C+U],n(j,V,x,O,R,B,K,xe,oe,pe,b,d,v),ye=Y[X]=H++),X+=1,C+=G,V=2;V0)for(V=1,x=k[C],K=Q[X]=a(x,b,d,v),xe=Q[X+se],oe=Q[X+te],pe=Q[X+he],K===xe&&K===oe&&K===pe||(O=k[C+L],R=k[C+I],B=k[C+U],n(j,V,x,O,R,B,K,xe,oe,pe,b,d,v),ye=Y[X]=H++,pe!==xe&&o(Y[X+se],ye,B,O,pe,xe,b,d,v)),X+=1,C+=G,V=2;V2&&C[1]>2&&h(A.pick(-1,-1).lo(1,1).hi(C[0]-2,C[1]-2),M.pick(-1,-1,0).lo(1,1).hi(C[0]-2,C[1]-2),M.pick(-1,-1,1).lo(1,1).hi(C[0]-2,C[1]-2)),C[1]>2&&(k(A.pick(0,-1).lo(1).hi(C[1]-2),M.pick(0,-1,1).lo(1).hi(C[1]-2)),y(M.pick(0,-1,0).lo(1).hi(C[1]-2))),C[1]>2&&(k(A.pick(C[0]-1,-1).lo(1).hi(C[1]-2),M.pick(C[0]-1,-1,1).lo(1).hi(C[1]-2)),y(M.pick(C[0]-1,-1,0).lo(1).hi(C[1]-2))),C[0]>2&&(k(A.pick(-1,0).lo(1).hi(C[0]-2),M.pick(-1,0,0).lo(1).hi(C[0]-2)),y(M.pick(-1,0,1).lo(1).hi(C[0]-2))),C[0]>2&&(k(A.pick(-1,C[1]-1).lo(1).hi(C[0]-2),M.pick(-1,C[1]-1,0).lo(1).hi(C[0]-2)),y(M.pick(-1,C[1]-1,1).lo(1).hi(C[0]-2))),M.set(0,0,0,0),M.set(0,0,1,0),M.set(C[0]-1,0,0,0),M.set(C[0]-1,0,1,0),M.set(0,C[1]-1,0,0),M.set(0,C[1]-1,1,0),M.set(C[0]-1,C[1]-1,0,0),M.set(C[0]-1,C[1]-1,1,0),M}}f.exports=function(g,y,k){return Array.isArray(k)||(k=i(y.dimension,typeof k=="string"?k:"clamp")),y.size===0?g:y.dimension===0?(g.set(0),g):function(h){var M=h.join();if(O=c[M])return O;for(var A=h.length,C=[b,d],L=1;L<=A;++L)C.push(v(L));var O=x.apply(void 0,C);return c[M]=O,O}(k)(g,y)}},3581:function(f){function l(n,o){var a=Math.floor(o),u=o-a,p=0<=a&&a0;){U<64?(g=U,U=0):(g=64,U-=64);for(var B=0|a[1];B>0;){B<64?(y=B,B=0):(y=64,B-=64),c=I+U*h+B*M,v=R+U*C+B*L;var G=0,N=0,j=0,V=A,H=h-k*A,ee=M-g*h,Q=O,Y=C-k*O,X=L-g*C;for(j=0;j0;){L<64?(g=L,L=0):(g=64,L-=64);for(var O=0|a[0];O>0;){O<64?(x=O,O=0):(x=64,O-=64),c=A+L*k+O*y,v=C+L*M+O*h;var I=0,R=0,U=k,B=y-g*k,G=M,N=h-g*M;for(R=0;R0;){R<64?(y=R,R=0):(y=64,R-=64);for(var U=0|a[0];U>0;){U<64?(x=U,U=0):(x=64,U-=64);for(var B=0|a[1];B>0;){B<64?(g=B,B=0):(g=64,B-=64),c=O+R*M+U*k+B*h,v=I+R*L+U*A+B*C;var G=0,N=0,j=0,V=M,H=k-y*M,ee=h-x*k,Q=L,Y=A-y*L,X=C-x*A;for(j=0;jc;){R=0,U=O-x;t:for(I=0;IG)break t;U+=M,R+=A}for(R=O,U=O-x,I=0;I>1,Ce=Me-Re,ne=Me+Re,ue=we,me=Ce,Te=Me,Ee=ne,Ue=Ae,De=d+1,je=v-1,ge=!0,be=0,Se=0,Ne=0,Ye=M,Ze=p(Ye),st=p(Ye);ee=y*ue,Q=y*me,ye=g;e:for(H=0;H0){I=ue,ue=me,me=I;break e}if(Ne<0)break e;ye+=C}ee=y*Ee,Q=y*Ue,ye=g;e:for(H=0;H0){I=Ee,Ee=Ue,Ue=I;break e}if(Ne<0)break e;ye+=C}ee=y*ue,Q=y*Te,ye=g;e:for(H=0;H0){I=ue,ue=Te,Te=I;break e}if(Ne<0)break e;ye+=C}ee=y*me,Q=y*Te,ye=g;e:for(H=0;H0){I=me,me=Te,Te=I;break e}if(Ne<0)break e;ye+=C}ee=y*ue,Q=y*Ee,ye=g;e:for(H=0;H0){I=ue,ue=Ee,Ee=I;break e}if(Ne<0)break e;ye+=C}ee=y*Te,Q=y*Ee,ye=g;e:for(H=0;H0){I=Te,Te=Ee,Ee=I;break e}if(Ne<0)break e;ye+=C}ee=y*me,Q=y*Ue,ye=g;e:for(H=0;H0){I=me,me=Ue,Ue=I;break e}if(Ne<0)break e;ye+=C}ee=y*me,Q=y*Te,ye=g;e:for(H=0;H0){I=me,me=Te,Te=I;break e}if(Ne<0)break e;ye+=C}ee=y*Ee,Q=y*Ue,ye=g;e:for(H=0;H0){I=Ee,Ee=Ue,Ue=I;break e}if(Ne<0)break e;ye+=C}for(ee=y*ue,Q=y*me,Y=y*Te,X=y*Ee,K=y*Ue,te=y*we,ae=y*Me,oe=y*Ae,pe=0,ye=g,H=0;H0)){if(Ne<0){for(ee=y*G,Q=y*De,Y=y*je,ye=g,H=0;H0)for(;;){for(N=g+je*y,pe=0,H=0;H0)){for(N=g+je*y,pe=0,H=0;HAe){e:for(;;){for(N=g+De*y,pe=0,ye=g,H=0;H1&&k?M(y,k[0],k[1]):M(y)}(u,p,d);return b(d,v)}},8729:function(f,l,t){var i=t(8139),r={};f.exports=function(n){var o=n.order,a=n.dtype,u=[o,a].join(":"),p=r[u];return p||(r[u]=p=i(o,a)),p(n),n}},5050:function(f,l,t){var i=t(4780),r=typeof Float64Array<"u";function n(c,b){return c[0]-b[0]}function o(){var c,b=this.stride,d=new Array(b.length);for(c=0;c=0&&(y+=M*(k=0|g),h-=k),new v(this.data,h,M,y)},x.step=function(g){var y=this.shape[0],k=this.stride[0],h=this.offset,M=0,A=Math.ceil;return typeof g=="number"&&((M=0|g)<0?(h+=k*(y-1),y=A(-y/M)):y=A(y/M),k*=M),new v(this.data,y,k,h)},x.transpose=function(g){g=g===void 0?0:0|g;var y=this.shape,k=this.stride;return new v(this.data,y[g],k[g],this.offset)},x.pick=function(g){var y=[],k=[],h=this.offset;return typeof g=="number"&&g>=0?h=h+this.stride[0]*g|0:(y.push(this.shape[0]),k.push(this.stride[0])),(0,b[y.length+1])(this.data,y,k,h)},function(g,y,k,h){return new v(g,y[0],k[0],h)}},2:function(c,b,d){function v(g,y,k,h,M,A){this.data=g,this.shape=[y,k],this.stride=[h,M],this.offset=0|A}var x=v.prototype;return x.dtype=c,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(g,y,k){return c==="generic"?this.data.set(this.offset+this.stride[0]*g+this.stride[1]*y,k):this.data[this.offset+this.stride[0]*g+this.stride[1]*y]=k},x.get=function(g,y){return c==="generic"?this.data.get(this.offset+this.stride[0]*g+this.stride[1]*y):this.data[this.offset+this.stride[0]*g+this.stride[1]*y]},x.index=function(g,y){return this.offset+this.stride[0]*g+this.stride[1]*y},x.hi=function(g,y){return new v(this.data,typeof g!="number"||g<0?this.shape[0]:0|g,typeof y!="number"||y<0?this.shape[1]:0|y,this.stride[0],this.stride[1],this.offset)},x.lo=function(g,y){var k=this.offset,h=0,M=this.shape[0],A=this.shape[1],C=this.stride[0],L=this.stride[1];return typeof g=="number"&&g>=0&&(k+=C*(h=0|g),M-=h),typeof y=="number"&&y>=0&&(k+=L*(h=0|y),A-=h),new v(this.data,M,A,C,L,k)},x.step=function(g,y){var k=this.shape[0],h=this.shape[1],M=this.stride[0],A=this.stride[1],C=this.offset,L=0,O=Math.ceil;return typeof g=="number"&&((L=0|g)<0?(C+=M*(k-1),k=O(-k/L)):k=O(k/L),M*=L),typeof y=="number"&&((L=0|y)<0?(C+=A*(h-1),h=O(-h/L)):h=O(h/L),A*=L),new v(this.data,k,h,M,A,C)},x.transpose=function(g,y){g=g===void 0?0:0|g,y=y===void 0?1:0|y;var k=this.shape,h=this.stride;return new v(this.data,k[g],k[y],h[g],h[y],this.offset)},x.pick=function(g,y){var k=[],h=[],M=this.offset;return typeof g=="number"&&g>=0?M=M+this.stride[0]*g|0:(k.push(this.shape[0]),h.push(this.stride[0])),typeof y=="number"&&y>=0?M=M+this.stride[1]*y|0:(k.push(this.shape[1]),h.push(this.stride[1])),(0,b[k.length+1])(this.data,k,h,M)},function(g,y,k,h){return new v(g,y[0],y[1],k[0],k[1],h)}},3:function(c,b,d){function v(g,y,k,h,M,A,C,L){this.data=g,this.shape=[y,k,h],this.stride=[M,A,C],this.offset=0|L}var x=v.prototype;return x.dtype=c,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 g=Math.abs(this.stride[0]),y=Math.abs(this.stride[1]),k=Math.abs(this.stride[2]);return g>y?y>k?[2,1,0]:g>k?[1,2,0]:[1,0,2]:g>k?[2,0,1]:k>y?[0,1,2]:[0,2,1]}}),x.set=function(g,y,k,h){return c==="generic"?this.data.set(this.offset+this.stride[0]*g+this.stride[1]*y+this.stride[2]*k,h):this.data[this.offset+this.stride[0]*g+this.stride[1]*y+this.stride[2]*k]=h},x.get=function(g,y,k){return c==="generic"?this.data.get(this.offset+this.stride[0]*g+this.stride[1]*y+this.stride[2]*k):this.data[this.offset+this.stride[0]*g+this.stride[1]*y+this.stride[2]*k]},x.index=function(g,y,k){return this.offset+this.stride[0]*g+this.stride[1]*y+this.stride[2]*k},x.hi=function(g,y,k){return new v(this.data,typeof g!="number"||g<0?this.shape[0]:0|g,typeof y!="number"||y<0?this.shape[1]:0|y,typeof k!="number"||k<0?this.shape[2]:0|k,this.stride[0],this.stride[1],this.stride[2],this.offset)},x.lo=function(g,y,k){var h=this.offset,M=0,A=this.shape[0],C=this.shape[1],L=this.shape[2],O=this.stride[0],I=this.stride[1],R=this.stride[2];return typeof g=="number"&&g>=0&&(h+=O*(M=0|g),A-=M),typeof y=="number"&&y>=0&&(h+=I*(M=0|y),C-=M),typeof k=="number"&&k>=0&&(h+=R*(M=0|k),L-=M),new v(this.data,A,C,L,O,I,R,h)},x.step=function(g,y,k){var h=this.shape[0],M=this.shape[1],A=this.shape[2],C=this.stride[0],L=this.stride[1],O=this.stride[2],I=this.offset,R=0,U=Math.ceil;return typeof g=="number"&&((R=0|g)<0?(I+=C*(h-1),h=U(-h/R)):h=U(h/R),C*=R),typeof y=="number"&&((R=0|y)<0?(I+=L*(M-1),M=U(-M/R)):M=U(M/R),L*=R),typeof k=="number"&&((R=0|k)<0?(I+=O*(A-1),A=U(-A/R)):A=U(A/R),O*=R),new v(this.data,h,M,A,C,L,O,I)},x.transpose=function(g,y,k){g=g===void 0?0:0|g,y=y===void 0?1:0|y,k=k===void 0?2:0|k;var h=this.shape,M=this.stride;return new v(this.data,h[g],h[y],h[k],M[g],M[y],M[k],this.offset)},x.pick=function(g,y,k){var h=[],M=[],A=this.offset;return typeof g=="number"&&g>=0?A=A+this.stride[0]*g|0:(h.push(this.shape[0]),M.push(this.stride[0])),typeof y=="number"&&y>=0?A=A+this.stride[1]*y|0:(h.push(this.shape[1]),M.push(this.stride[1])),typeof k=="number"&&k>=0?A=A+this.stride[2]*k|0:(h.push(this.shape[2]),M.push(this.stride[2])),(0,b[h.length+1])(this.data,h,M,A)},function(g,y,k,h){return new v(g,y[0],y[1],y[2],k[0],k[1],k[2],h)}},4:function(c,b,d){function v(g,y,k,h,M,A,C,L,O,I){this.data=g,this.shape=[y,k,h,M],this.stride=[A,C,L,O],this.offset=0|I}var x=v.prototype;return x.dtype=c,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:d}),x.set=function(g,y,k,h,M){return c==="generic"?this.data.set(this.offset+this.stride[0]*g+this.stride[1]*y+this.stride[2]*k+this.stride[3]*h,M):this.data[this.offset+this.stride[0]*g+this.stride[1]*y+this.stride[2]*k+this.stride[3]*h]=M},x.get=function(g,y,k,h){return c==="generic"?this.data.get(this.offset+this.stride[0]*g+this.stride[1]*y+this.stride[2]*k+this.stride[3]*h):this.data[this.offset+this.stride[0]*g+this.stride[1]*y+this.stride[2]*k+this.stride[3]*h]},x.index=function(g,y,k,h){return this.offset+this.stride[0]*g+this.stride[1]*y+this.stride[2]*k+this.stride[3]*h},x.hi=function(g,y,k,h){return new v(this.data,typeof g!="number"||g<0?this.shape[0]:0|g,typeof y!="number"||y<0?this.shape[1]:0|y,typeof k!="number"||k<0?this.shape[2]:0|k,typeof h!="number"||h<0?this.shape[3]:0|h,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},x.lo=function(g,y,k,h){var M=this.offset,A=0,C=this.shape[0],L=this.shape[1],O=this.shape[2],I=this.shape[3],R=this.stride[0],U=this.stride[1],B=this.stride[2],G=this.stride[3];return typeof g=="number"&&g>=0&&(M+=R*(A=0|g),C-=A),typeof y=="number"&&y>=0&&(M+=U*(A=0|y),L-=A),typeof k=="number"&&k>=0&&(M+=B*(A=0|k),O-=A),typeof h=="number"&&h>=0&&(M+=G*(A=0|h),I-=A),new v(this.data,C,L,O,I,R,U,B,G,M)},x.step=function(g,y,k,h){var M=this.shape[0],A=this.shape[1],C=this.shape[2],L=this.shape[3],O=this.stride[0],I=this.stride[1],R=this.stride[2],U=this.stride[3],B=this.offset,G=0,N=Math.ceil;return typeof g=="number"&&((G=0|g)<0?(B+=O*(M-1),M=N(-M/G)):M=N(M/G),O*=G),typeof y=="number"&&((G=0|y)<0?(B+=I*(A-1),A=N(-A/G)):A=N(A/G),I*=G),typeof k=="number"&&((G=0|k)<0?(B+=R*(C-1),C=N(-C/G)):C=N(C/G),R*=G),typeof h=="number"&&((G=0|h)<0?(B+=U*(L-1),L=N(-L/G)):L=N(L/G),U*=G),new v(this.data,M,A,C,L,O,I,R,U,B)},x.transpose=function(g,y,k,h){g=g===void 0?0:0|g,y=y===void 0?1:0|y,k=k===void 0?2:0|k,h=h===void 0?3:0|h;var M=this.shape,A=this.stride;return new v(this.data,M[g],M[y],M[k],M[h],A[g],A[y],A[k],A[h],this.offset)},x.pick=function(g,y,k,h){var M=[],A=[],C=this.offset;return typeof g=="number"&&g>=0?C=C+this.stride[0]*g|0:(M.push(this.shape[0]),A.push(this.stride[0])),typeof y=="number"&&y>=0?C=C+this.stride[1]*y|0:(M.push(this.shape[1]),A.push(this.stride[1])),typeof k=="number"&&k>=0?C=C+this.stride[2]*k|0:(M.push(this.shape[2]),A.push(this.stride[2])),typeof h=="number"&&h>=0?C=C+this.stride[3]*h|0:(M.push(this.shape[3]),A.push(this.stride[3])),(0,b[M.length+1])(this.data,M,A,C)},function(g,y,k,h){return new v(g,y[0],y[1],y[2],y[3],k[0],k[1],k[2],k[3],h)}},5:function(c,b,d){function v(g,y,k,h,M,A,C,L,O,I,R,U){this.data=g,this.shape=[y,k,h,M,A],this.stride=[C,L,O,I,R],this.offset=0|U}var x=v.prototype;return x.dtype=c,x.dimension=5,Object.defineProperty(x,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(x,"order",{get:d}),x.set=function(g,y,k,h,M,A){return c==="generic"?this.data.set(this.offset+this.stride[0]*g+this.stride[1]*y+this.stride[2]*k+this.stride[3]*h+this.stride[4]*M,A):this.data[this.offset+this.stride[0]*g+this.stride[1]*y+this.stride[2]*k+this.stride[3]*h+this.stride[4]*M]=A},x.get=function(g,y,k,h,M){return c==="generic"?this.data.get(this.offset+this.stride[0]*g+this.stride[1]*y+this.stride[2]*k+this.stride[3]*h+this.stride[4]*M):this.data[this.offset+this.stride[0]*g+this.stride[1]*y+this.stride[2]*k+this.stride[3]*h+this.stride[4]*M]},x.index=function(g,y,k,h,M){return this.offset+this.stride[0]*g+this.stride[1]*y+this.stride[2]*k+this.stride[3]*h+this.stride[4]*M},x.hi=function(g,y,k,h,M){return new v(this.data,typeof g!="number"||g<0?this.shape[0]:0|g,typeof y!="number"||y<0?this.shape[1]:0|y,typeof k!="number"||k<0?this.shape[2]:0|k,typeof h!="number"||h<0?this.shape[3]:0|h,typeof M!="number"||M<0?this.shape[4]:0|M,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},x.lo=function(g,y,k,h,M){var A=this.offset,C=0,L=this.shape[0],O=this.shape[1],I=this.shape[2],R=this.shape[3],U=this.shape[4],B=this.stride[0],G=this.stride[1],N=this.stride[2],j=this.stride[3],V=this.stride[4];return typeof g=="number"&&g>=0&&(A+=B*(C=0|g),L-=C),typeof y=="number"&&y>=0&&(A+=G*(C=0|y),O-=C),typeof k=="number"&&k>=0&&(A+=N*(C=0|k),I-=C),typeof h=="number"&&h>=0&&(A+=j*(C=0|h),R-=C),typeof M=="number"&&M>=0&&(A+=V*(C=0|M),U-=C),new v(this.data,L,O,I,R,U,B,G,N,j,V,A)},x.step=function(g,y,k,h,M){var A=this.shape[0],C=this.shape[1],L=this.shape[2],O=this.shape[3],I=this.shape[4],R=this.stride[0],U=this.stride[1],B=this.stride[2],G=this.stride[3],N=this.stride[4],j=this.offset,V=0,H=Math.ceil;return typeof g=="number"&&((V=0|g)<0?(j+=R*(A-1),A=H(-A/V)):A=H(A/V),R*=V),typeof y=="number"&&((V=0|y)<0?(j+=U*(C-1),C=H(-C/V)):C=H(C/V),U*=V),typeof k=="number"&&((V=0|k)<0?(j+=B*(L-1),L=H(-L/V)):L=H(L/V),B*=V),typeof h=="number"&&((V=0|h)<0?(j+=G*(O-1),O=H(-O/V)):O=H(O/V),G*=V),typeof M=="number"&&((V=0|M)<0?(j+=N*(I-1),I=H(-I/V)):I=H(I/V),N*=V),new v(this.data,A,C,L,O,I,R,U,B,G,N,j)},x.transpose=function(g,y,k,h,M){g=g===void 0?0:0|g,y=y===void 0?1:0|y,k=k===void 0?2:0|k,h=h===void 0?3:0|h,M=M===void 0?4:0|M;var A=this.shape,C=this.stride;return new v(this.data,A[g],A[y],A[k],A[h],A[M],C[g],C[y],C[k],C[h],C[M],this.offset)},x.pick=function(g,y,k,h,M){var A=[],C=[],L=this.offset;return typeof g=="number"&&g>=0?L=L+this.stride[0]*g|0:(A.push(this.shape[0]),C.push(this.stride[0])),typeof y=="number"&&y>=0?L=L+this.stride[1]*y|0:(A.push(this.shape[1]),C.push(this.stride[1])),typeof k=="number"&&k>=0?L=L+this.stride[2]*k|0:(A.push(this.shape[2]),C.push(this.stride[2])),typeof h=="number"&&h>=0?L=L+this.stride[3]*h|0:(A.push(this.shape[3]),C.push(this.stride[3])),typeof M=="number"&&M>=0?L=L+this.stride[4]*M|0:(A.push(this.shape[4]),C.push(this.stride[4])),(0,b[A.length+1])(this.data,A,C,L)},function(g,y,k,h){return new v(g,y[0],y[1],y[2],y[3],y[4],k[0],k[1],k[2],k[3],k[4],h)}}};function u(c,b){var d=b===-1?"T":String(b),v=a[d];return b===-1?v(c):b===0?v(c,p[c][0]):v(c,p[c],o)}var p={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};f.exports=function(c,b,d,v){if(c===void 0)return(0,p.array[0])([]);typeof c=="number"&&(c=[c]),b===void 0&&(b=[c.length]);var x=b.length;if(d===void 0){d=new Array(x);for(var g=x-1,y=1;g>=0;--g)d[g]=y,y*=b[g]}if(v===void 0)for(v=0,g=0;g>>0;f.exports=function(o,a){if(isNaN(o)||isNaN(a))return NaN;if(o===a)return o;if(o===0)return a<0?-r:r;var u=i.hi(o),p=i.lo(o);return a>o==o>0?p===n?(u+=1,p=0):p+=1:p===0?(p=n,u-=1):p-=1,i.pack(p,u)}},115:function(f,l){l.vertexNormals=function(t,i,r){for(var n=i.length,o=new Array(n),a=r===void 0?1e-6:r,u=0;ua){var L=o[b],O=1/Math.sqrt(h*A);for(C=0;C<3;++C){var I=(C+1)%3,R=(C+2)%3;L[C]+=O*(M[I]*k[R]-M[R]*k[I])}}}for(u=0;ua)for(O=1/Math.sqrt(U),C=0;C<3;++C)L[C]*=O;else for(C=0;C<3;++C)L[C]=0}return o},l.faceNormals=function(t,i,r){for(var n=t.length,o=new Array(n),a=r===void 0?1e-6:r,u=0;ua?1/Math.sqrt(g):0,b=0;b<3;++b)x[b]*=g;o[u]=x}return o}},567:function(f){f.exports=function(l,t,i,r,n,o,a,u,p,c){var b=t+o+c;if(d>0){var d=Math.sqrt(b+1);l[0]=.5*(a-p)/d,l[1]=.5*(u-r)/d,l[2]=.5*(i-o)/d,l[3]=.5*d}else{var v=Math.max(t,o,c);d=Math.sqrt(2*v-b+1),t>=v?(l[0]=.5*d,l[1]=.5*(n+i)/d,l[2]=.5*(u+r)/d,l[3]=.5*(a-p)/d):o>=v?(l[0]=.5*(i+n)/d,l[1]=.5*d,l[2]=.5*(p+a)/d,l[3]=.5*(u-r)/d):(l[0]=.5*(r+u)/d,l[1]=.5*(a+p)/d,l[2]=.5*d,l[3]=.5*(i-n)/d)}return l}},7774:function(f,l,t){f.exports=function(v){var x=(v=v||{}).center||[0,0,0],g=v.rotation||[0,0,0,1],y=v.radius||1;x=[].slice.call(x,0,3),c(g=[].slice.call(g,0,4),g);var k=new b(g,x,Math.log(y));return k.setDistanceLimits(v.zoomMin,v.zoomMax),("eye"in v||"up"in v)&&k.lookAt(0,v.eye,v.center,v.up),k};var i=t(8444),r=t(3012),n=t(5950),o=t(7437),a=t(567);function u(v,x,g){return Math.sqrt(Math.pow(v,2)+Math.pow(x,2)+Math.pow(g,2))}function p(v,x,g,y){return Math.sqrt(Math.pow(v,2)+Math.pow(x,2)+Math.pow(g,2)+Math.pow(y,2))}function c(v,x){var g=x[0],y=x[1],k=x[2],h=x[3],M=p(g,y,k,h);M>1e-6?(v[0]=g/M,v[1]=y/M,v[2]=k/M,v[3]=h/M):(v[0]=v[1]=v[2]=0,v[3]=1)}function b(v,x,g){this.radius=i([g]),this.center=i(x),this.rotation=i(v),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 d=b.prototype;d.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},d.recalcMatrix=function(v){this.radius.curve(v),this.center.curve(v),this.rotation.curve(v);var x=this.computedRotation;c(x,x);var g=this.computedMatrix;n(g,x);var y=this.computedCenter,k=this.computedEye,h=this.computedUp,M=Math.exp(this.computedRadius[0]);k[0]=y[0]+M*g[2],k[1]=y[1]+M*g[6],k[2]=y[2]+M*g[10],h[0]=g[1],h[1]=g[5],h[2]=g[9];for(var A=0;A<3;++A){for(var C=0,L=0;L<3;++L)C+=g[A+4*L]*k[L];g[12+A]=-C}},d.getMatrix=function(v,x){this.recalcMatrix(v);var g=this.computedMatrix;if(x){for(var y=0;y<16;++y)x[y]=g[y];return x}return g},d.idle=function(v){this.center.idle(v),this.radius.idle(v),this.rotation.idle(v)},d.flush=function(v){this.center.flush(v),this.radius.flush(v),this.rotation.flush(v)},d.pan=function(v,x,g,y){x=x||0,g=g||0,y=y||0,this.recalcMatrix(v);var k=this.computedMatrix,h=k[1],M=k[5],A=k[9],C=u(h,M,A);h/=C,M/=C,A/=C;var L=k[0],O=k[4],I=k[8],R=L*h+O*M+I*A,U=u(L-=h*R,O-=M*R,I-=A*R);L/=U,O/=U,I/=U,k[2],k[6],k[10];var B=L*x+h*g,G=O*x+M*g,N=I*x+A*g;this.center.move(v,B,G,N);var j=Math.exp(this.computedRadius[0]);j=Math.max(1e-4,j+y),this.radius.set(v,Math.log(j))},d.rotate=function(v,x,g,y){this.recalcMatrix(v),x=x||0,g=g||0;var k=this.computedMatrix,h=k[0],M=k[4],A=k[8],C=k[1],L=k[5],O=k[9],I=k[2],R=k[6],U=k[10],B=x*h+g*C,G=x*M+g*L,N=x*A+g*O,j=-(R*N-U*G),V=-(U*B-I*N),H=-(I*G-R*B),ee=Math.sqrt(Math.max(0,1-Math.pow(j,2)-Math.pow(V,2)-Math.pow(H,2))),Q=p(j,V,H,ee);Q>1e-6?(j/=Q,V/=Q,H/=Q,ee/=Q):(j=V=H=0,ee=1);var Y=this.computedRotation,X=Y[0],K=Y[1],te=Y[2],ae=Y[3],oe=X*ee+ae*j+K*H-te*V,se=K*ee+ae*V+te*j-X*H,fe=te*ee+ae*H+X*V-K*j,xe=ae*ee-X*j-K*V-te*H;if(y){j=I,V=R,H=U;var he=Math.sin(y)/u(j,V,H);j*=he,V*=he,H*=he,xe=xe*(ee=Math.cos(x))-(oe=oe*ee+xe*j+se*H-fe*V)*j-(se=se*ee+xe*V+fe*j-oe*H)*V-(fe=fe*ee+xe*H+oe*V-se*j)*H}var de=p(oe,se,fe,xe);de>1e-6?(oe/=de,se/=de,fe/=de,xe/=de):(oe=se=fe=0,xe=1),this.rotation.set(v,oe,se,fe,xe)},d.lookAt=function(v,x,g,y){this.recalcMatrix(v),g=g||this.computedCenter,x=x||this.computedEye,y=y||this.computedUp;var k=this.computedMatrix;r(k,x,g,y);var h=this.computedRotation;a(h,k[0],k[1],k[2],k[4],k[5],k[6],k[8],k[9],k[10]),c(h,h),this.rotation.set(v,h[0],h[1],h[2],h[3]);for(var M=0,A=0;A<3;++A)M+=Math.pow(g[A]-x[A],2);this.radius.set(v,.5*Math.log(Math.max(M,1e-6))),this.center.set(v,g[0],g[1],g[2])},d.translate=function(v,x,g,y){this.center.move(v,x||0,g||0,y||0)},d.setMatrix=function(v,x){var g=this.computedRotation;a(g,x[0],x[1],x[2],x[4],x[5],x[6],x[8],x[9],x[10]),c(g,g),this.rotation.set(v,g[0],g[1],g[2],g[3]);var y=this.computedMatrix;o(y,x);var k=y[15];if(Math.abs(k)>1e-6){var h=y[12]/k,M=y[13]/k,A=y[14]/k;this.recalcMatrix(v);var C=Math.exp(this.computedRadius[0]);this.center.set(v,h-y[2]*C,M-y[6]*C,A-y[10]*C),this.radius.idle(v)}else this.center.idle(v),this.radius.idle(v)},d.setDistance=function(v,x){x>0&&this.radius.set(v,Math.log(x))},d.setDistanceLimits=function(v,x){v=v>0?Math.log(v):-1/0,x=x>0?Math.log(x):1/0,x=Math.max(x,v),this.radius.bounds[0][0]=v,this.radius.bounds[1][0]=x},d.getDistanceLimits=function(v){var x=this.radius.bounds;return v?(v[0]=Math.exp(x[0][0]),v[1]=Math.exp(x[1][0]),v):[Math.exp(x[0][0]),Math.exp(x[1][0])]},d.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]}},d.fromJSON=function(v){var x=this.lastT(),g=v.center;g&&this.center.set(x,g[0],g[1],g[2]);var y=v.rotation;y&&this.rotation.set(x,y[0],y[1],y[2],y[3]);var k=v.distance;k&&k>0&&this.radius.set(x,Math.log(k)),this.setDistanceLimits(v.zoomMin,v.zoomMax)}},4930:function(f,l,t){var i=t(6184);f.exports=function(r,n,o){return i(o=o!==void 0?o+"":" ",n)+r}},4405:function(f){f.exports=function(l,t){t||(t=[0,""]),l=String(l);var i=parseFloat(l,10);return t[0]=i,t[1]=l.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t}},4166:function(f,l,t){f.exports=function(r,n){for(var o=0|n.length,a=r.length,u=[new Array(o),new Array(o)],p=0;p0){L=u[R][A][0],I=R;break}O=L[1^I];for(var U=0;U<2;++U)for(var B=u[U][A],G=0;G0&&(L=N,O=j,I=U)}return C||L&&d(L,I),O}function x(M,A){var C=u[A][M][0],L=[M];d(C,A);for(var O=C[1^A];;){for(;O!==M;)L.push(O),O=v(L[L.length-2],O,!1);if(u[0][M].length+u[1][M].length===0)break;var I=L[L.length-1],R=M,U=L[1],B=v(I,R,!0);if(i(n[I],n[R],n[U],n[B])<0)break;L.push(M),O=v(I,R)}return L}function g(M,A){return A[1]===A[A.length-1]}for(p=0;p0;){u[0][p].length;var h=x(p,y);g(0,h)?k.push.apply(k,h):(k.length>0&&b.push(k),k=h)}k.length>0&&b.push(k)}return b};var i=t(9398)},3959:function(f,l,t){f.exports=function(r,n){for(var o=i(r,n.length),a=new Array(n.length),u=new Array(n.length),p=[],c=0;c0;){var d=p.pop();a[d]=!1;var v=o[d];for(c=0;c0})).length,M=new Array(h),A=new Array(h);for(y=0;y0;){var se=ae.pop(),fe=V[se];u(fe,function(Re,we){return Re-we});var xe,he=fe.length,de=oe[se];if(de===0){var pe=k[se];xe=[pe]}for(y=0;y=0||(oe[ye]=1^de,ae.push(ye),de===0&&(te(pe=k[ye])||(pe.reverse(),xe.push(pe))))}de===0&&v.push(xe)}return v};var i=t(8348),r=t(4166),n=t(211),o=t(9660),a=t(9662),u=t(1215),p=t(3959);function c(b,d){for(var v=new Array(b),x=0;x0&&R[B]===U[0]))return 1;G=I[B-1]}for(var N=1;G;){var j=G.key,V=i(U,j[0],j[1]);if(j[0][0]0))return 0;N=-1,G=G.right}else if(V>0)G=G.left;else{if(!(V<0))return 0;N=1,G=G.right}}return N}}(L.slabs,L.coordinates);return v.length===0?O:function(I,R){return function(U){return I(U[0],U[1])?0:R(U)}}(u(v),O)};var i=t(417)[3],r=t(4385),n=t(9014),o=t(5070);function a(){return!0}function u(c){for(var b={},d=0;d=c?(R=1,M=c+2*v+g):M=v*(R=-v/c)+g):(R=0,x>=0?(U=0,M=g):-x>=d?(U=1,M=d+2*x+g):M=x*(U=-x/d)+g);else if(U<0)U=0,v>=0?(R=0,M=g):-v>=c?(R=1,M=c+2*v+g):M=v*(R=-v/c)+g;else{var B=1/I;M=(R*=B)*(c*R+b*(U*=B)+2*v)+U*(b*R+d*U+2*x)+g}else R<0?(C=d+x)>(A=b+v)?(L=C-A)>=(O=c-2*b+d)?(R=1,U=0,M=c+2*v+g):M=(R=L/O)*(c*R+b*(U=1-R)+2*v)+U*(b*R+d*U+2*x)+g:(R=0,C<=0?(U=1,M=d+2*x+g):x>=0?(U=0,M=g):M=x*(U=-x/d)+g):U<0?(C=c+v)>(A=b+x)?(L=C-A)>=(O=c-2*b+d)?(U=1,R=0,M=d+2*x+g):M=(R=1-(U=L/O))*(c*R+b*U+2*v)+U*(b*R+d*U+2*x)+g:(U=0,C<=0?(R=1,M=c+2*v+g):v>=0?(R=0,M=g):M=v*(R=-v/c)+g):(L=d+x-b-v)<=0?(R=0,U=1,M=d+2*x+g):L>=(O=c-2*b+d)?(R=1,U=0,M=c+2*v+g):M=(R=L/O)*(c*R+b*(U=1-R)+2*v)+U*(b*R+d*U+2*x)+g;var G=1-R-U;for(p=0;p0){var d=o[u-1];if(i(c,d)===0&&n(d)!==b){u-=1;continue}}o[u++]=c}}return o.length=u,o}},6184:function(f){var l,t="";f.exports=function(i,r){if(typeof i!="string")throw new TypeError("expected a string");if(r===1)return i;if(r===2)return i+i;var n=i.length*r;if(l!==i||l===void 0)l=i,t="";else if(t.length>=n)return t.substr(0,n);for(;n>t.length&&r>1;)1&r&&(t+=i),r>>=1,i+=i;return t=(t+=i).substr(0,n)}},8161:function(f,l,t){f.exports=t.g.performance&&t.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},402:function(f){f.exports=function(l){for(var t=l.length,i=l[l.length-1],r=t,n=t-2;n>=0;--n){var o=i,a=l[n];(p=a-((i=o+a)-o))&&(l[--r]=i,i=p)}var u=0;for(n=r;n0){if(C<=0)return L;M=A+C}else{if(!(A<0)||C>=0)return L;M=-(A+C)}var O=33306690738754716e-32*M;return L>=O||L<=-O?L:b(y,k,h)},function(y,k,h,M){var A=y[0]-M[0],C=k[0]-M[0],L=h[0]-M[0],O=y[1]-M[1],I=k[1]-M[1],R=h[1]-M[1],U=y[2]-M[2],B=k[2]-M[2],G=h[2]-M[2],N=C*R,j=L*I,V=L*O,H=A*R,ee=A*I,Q=C*O,Y=U*(N-j)+B*(V-H)+G*(ee-Q),X=7771561172376103e-31*((Math.abs(N)+Math.abs(j))*Math.abs(U)+(Math.abs(V)+Math.abs(H))*Math.abs(B)+(Math.abs(ee)+Math.abs(Q))*Math.abs(G));return Y>X||-Y>X?Y:d(y,k,h,M)}];function x(y){var k=v[y.length];return k||(k=v[y.length]=c(y.length)),k.apply(void 0,y)}function g(y,k,h,M,A,C,L){return function(O,I,R,U,B){switch(arguments.length){case 0:case 1:return 0;case 2:return M(O,I);case 3:return A(O,I,R);case 4:return C(O,I,R,U);case 5:return L(O,I,R,U,B)}for(var G=new Array(arguments.length),N=0;N0&&p>0||u<0&&p<0)return!1;var c=i(o,r,n),b=i(a,r,n);return!(c>0&&b>0||c<0&&b<0)&&(u!==0||p!==0||c!==0||b!==0||function(d,v,x,g){for(var y=0;y<2;++y){var k=d[y],h=v[y],M=Math.min(k,h),A=Math.max(k,h),C=x[y],L=g[y],O=Math.min(C,L);if(Math.max(C,L)=r?(n=d,(p+=1)=r?(n=d,(p+=1)>1,d=r[2*b+1];if(d===u)return b;u>1,d=r[2*b+1];if(d===u)return b;u>1,d=r[2*b+1];if(d===u)return b;u0)-(r<0)},l.abs=function(r){var n=r>>31;return(r^n)-n},l.min=function(r,n){return n^(r^n)&-(r65535)<<4,n|=o=((r>>>=n)>255)<<3,n|=o=((r>>>=o)>15)<<2,(n|=o=((r>>>=o)>3)<<1)|(r>>>=o)>>1},l.log10=function(r){return r>=1e9?9:r>=1e8?8:r>=1e7?7:r>=1e6?6:r>=1e5?5:r>=1e4?4:r>=1e3?3:r>=100?2:r>=10?1:0},l.popCount=function(r){return 16843009*((r=(858993459&(r-=r>>>1&1431655765))+(r>>>2&858993459))+(r>>>4)&252645135)>>>24},l.countTrailingZeros=t,l.nextPow2=function(r){return r+=r===0,--r,r|=r>>>1,r|=r>>>2,r|=r>>>4,1+((r|=r>>>8)|r>>>16)},l.prevPow2=function(r){return r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,(r|=r>>>16)-(r>>>1)},l.parity=function(r){return r^=r>>>16,r^=r>>>8,r^=r>>>4,27030>>>(r&=15)&1};var i=new Array(256);(function(r){for(var n=0;n<256;++n){var o=n,a=n,u=7;for(o>>>=1;o;o>>>=1)a<<=1,a|=1&o,--u;r[n]=a<>>8&255]<<16|i[r>>>16&255]<<8|i[r>>>24&255]},l.interleave2=function(r,n){return(r=1431655765&((r=858993459&((r=252645135&((r=16711935&((r&=65535)|r<<8))|r<<4))|r<<2))|r<<1))|(n=1431655765&((n=858993459&((n=252645135&((n=16711935&((n&=65535)|n<<8))|n<<4))|n<<2))|n<<1))<<1},l.deinterleave2=function(r,n){return(r=65535&((r=16711935&((r=252645135&((r=858993459&((r=r>>>n&1431655765)|r>>>1))|r>>>2))|r>>>4))|r>>>16))<<16>>16},l.interleave3=function(r,n,o){return r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2),(r|=(n=1227133513&((n=3272356035&((n=251719695&((n=4278190335&((n&=1023)|n<<16))|n<<8))|n<<4))|n<<2))<<1)|(o=1227133513&((o=3272356035&((o=251719695&((o=4278190335&((o&=1023)|o<<16))|o<<8))|o<<4))|o<<2))<<2},l.deinterleave3=function(r,n){return(r=1023&((r=4278190335&((r=251719695&((r=3272356035&((r=r>>>n&1227133513)|r>>>2))|r>>>4))|r>>>8))|r>>>16))<<22>>22},l.nextCombination=function(r){var n=r|r-1;return n+1|(~n&-~n)-1>>>t(r)+1}},6656:function(f,l,t){var i=t(9392),r=t(9521);function n(d,v){var x=d.length,g=d.length-v.length,y=Math.min;if(g)return g;switch(x){case 0:return 0;case 1:return d[0]-v[0];case 2:return(M=d[0]+d[1]-v[0]-v[1])||y(d[0],d[1])-y(v[0],v[1]);case 3:var k=d[0]+d[1],h=v[0]+v[1];if(M=k+d[2]-(h+v[2]))return M;var M,A=y(d[0],d[1]),C=y(v[0],v[1]);return(M=y(A,d[2])-y(C,v[2]))||y(A+d[2],k)-y(C+v[2],h);default:var L=d.slice(0);L.sort();var O=v.slice(0);O.sort();for(var I=0;I>1,h=n(d[k],v);h<=0?(h===0&&(y=k),x=k+1):h>0&&(g=k-1)}return y}function c(d,v){for(var x=new Array(d.length),g=0,y=x.length;g=d.length||n(d[R],k)!==0););}return x}function b(d,v){if(v<0)return[];for(var x=[],g=(1<>>C&1&&A.push(y[C]);v.push(A)}return a(v)},l.skeleton=b,l.boundary=function(d){for(var v=[],x=0,g=d.length;x>1:(Q>>1)-1}function L(Q){for(var Y=A(Q);;){var X=Y,K=2*Q+1,te=2*(Q+1),ae=Q;if(K0;){var X=C(Q);if(!(X>=0&&Y0){var Q=B[0];return M(0,N-1),N-=1,L(0),Q}return-1}function R(Q,Y){var X=B[Q];return d[X]===Y?Q:(d[X]=-1/0,O(Q),I(),d[X]=Y,O((N+=1)-1))}function U(Q){if(!v[Q]){v[Q]=!0;var Y=c[Q],X=b[Q];c[X]>=0&&(c[X]=Y),b[Y]>=0&&(b[Y]=X),G[Y]>=0&&R(G[Y],h(Y)),G[X]>=0&&R(G[X],h(X))}}var B=[],G=new Array(u);for(x=0;x>1;x>=0;--x)L(x);for(;;){var j=I();if(j<0||d[j]>a)break;U(j)}var V=[];for(x=0;x=0&&X>=0&&Y!==X){var K=G[Y],te=G[X];K!==te&&ee.push([K,te])}}),r.unique(r.normalize(ee)),{positions:V,edges:ee}};var i=t(417),r=t(6656)},6638:function(f,l,t){f.exports=function(n,o){var a,u,p,c;if(o[0][0]o[1][0]))return r(o,n);a=o[1],u=o[0]}if(n[0][0]n[1][0]))return-r(n,o);p=n[1],c=n[0]}var b=i(a,u,c),d=i(a,u,p);if(b<0){if(d<=0)return b}else if(b>0){if(d>=0)return b}else if(d)return d;if(b=i(c,p,u),d=i(c,p,a),b<0){if(d<=0)return b}else if(b>0){if(d>=0)return b}else if(d)return d;return u[0]-c[0]};var i=t(417);function r(n,o){var a,u,p,c;if(o[0][0]o[1][0])){var b=Math.min(n[0][1],n[1][1]),d=Math.max(n[0][1],n[1][1]),v=Math.min(o[0][1],o[1][1]),x=Math.max(o[0][1],o[1][1]);return dx?b-x:d-x}a=o[1],u=o[0]}n[0][1]0)if(v[0]!==k[1][0])x=d,d=d.right;else{if(M=p(d.right,v))return M;d=d.left}else{if(v[0]!==k[1][0])return d;var M;if(M=p(d.right,v))return M;d=d.left}}return x}function c(d,v,x,g){this.y=d,this.index=v,this.start=x,this.closed=g}function b(d,v,x,g){this.x=d,this.segment=v,this.create=x,this.index=g}a.prototype.castUp=function(d){var v=i.le(this.coordinates,d[0]);if(v<0)return-1;this.slabs[v];var x=p(this.slabs[v],d),g=-1;if(x&&(g=x.value),this.coordinates[v]===d[0]){var y=null;if(x&&(y=x.key),v>0){var k=p(this.slabs[v-1],d);k&&(y?o(k.key,y)>0&&(y=k.key,g=k.value):(g=k.value,y=k.key))}var h=this.horizontal[v];if(h.length>0){var M=i.ge(h,d[1],u);if(M=h.length)return g;A=h[M]}}if(A.start)if(y){var C=n(y[0],y[1],[d[0],A.y]);y[0][0]>y[1][0]&&(C=-C),C>0&&(g=A.index)}else g=A.index;else A.y!==d[1]&&(g=A.index)}}}return g}},4670:function(f,l,t){var i=t(9130),r=t(9662);function n(a,u){var p=r(i(a,u),[u[u.length-1]]);return p[p.length-1]}function o(a,u,p,c){var b=-u/(c-u);b<0?b=0:b>1&&(b=1);for(var d=1-b,v=a.length,x=new Array(v),g=0;g0||b>0&&g<0){var y=o(d,g,v,b);p.push(y),c.push(y.slice())}g<0?c.push(v.slice()):g>0?p.push(v.slice()):(p.push(v.slice()),c.push(v.slice())),b=g}return{positive:p,negative:c}},f.exports.positive=function(a,u){for(var p=[],c=n(a[a.length-1],u),b=a[a.length-1],d=a[0],v=0;v0||c>0&&x<0)&&p.push(o(b,x,d,c)),x>=0&&p.push(d.slice()),c=x}return p},f.exports.negative=function(a,u){for(var p=[],c=n(a[a.length-1],u),b=a[a.length-1],d=a[0],v=0;v0||c>0&&x<0)&&p.push(o(b,x,d,c)),x<=0&&p.push(d.slice()),c=x}return p}},8974:function(f,l,t){var i;(function(){var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function n(c){return a(p(c),arguments)}function o(c,b){return n.apply(null,[c].concat(b||[]))}function a(c,b){var d,v,x,g,y,k,h,M,A,C=1,L=c.length,O="";for(v=0;v=0),g.type){case"b":d=parseInt(d,10).toString(2);break;case"c":d=String.fromCharCode(parseInt(d,10));break;case"d":case"i":d=parseInt(d,10);break;case"j":d=JSON.stringify(d,null,g.width?parseInt(g.width):0);break;case"e":d=g.precision?parseFloat(d).toExponential(g.precision):parseFloat(d).toExponential();break;case"f":d=g.precision?parseFloat(d).toFixed(g.precision):parseFloat(d);break;case"g":d=g.precision?String(Number(d.toPrecision(g.precision))):parseFloat(d);break;case"o":d=(parseInt(d,10)>>>0).toString(8);break;case"s":d=String(d),d=g.precision?d.substring(0,g.precision):d;break;case"t":d=String(!!d),d=g.precision?d.substring(0,g.precision):d;break;case"T":d=Object.prototype.toString.call(d).slice(8,-1).toLowerCase(),d=g.precision?d.substring(0,g.precision):d;break;case"u":d=parseInt(d,10)>>>0;break;case"v":d=d.valueOf(),d=g.precision?d.substring(0,g.precision):d;break;case"x":d=(parseInt(d,10)>>>0).toString(16);break;case"X":d=(parseInt(d,10)>>>0).toString(16).toUpperCase()}r.json.test(g.type)?O+=d:(!r.number.test(g.type)||M&&!g.sign?A="":(A=M?"+":"-",d=d.toString().replace(r.sign,"")),k=g.pad_char?g.pad_char==="0"?"0":g.pad_char.charAt(1):" ",h=g.width-(A+d).length,y=g.width&&h>0?k.repeat(h):"",O+=g.align?A+d+y:k==="0"?A+y+d:y+A+d)}return O}var u=Object.create(null);function p(c){if(u[c])return u[c];for(var b,d=c,v=[],x=0;d;){if((b=r.text.exec(d))!==null)v.push(b[0]);else if((b=r.modulo.exec(d))!==null)v.push("%");else{if((b=r.placeholder.exec(d))===null)throw new SyntaxError("[sprintf] unexpected placeholder");if(b[2]){x|=1;var g=[],y=b[2],k=[];if((k=r.key.exec(y))===null)throw new SyntaxError("[sprintf] failed to parse named argument key");for(g.push(k[1]);(y=y.substring(k[0].length))!=="";)if((k=r.key_access.exec(y))!==null)g.push(k[1]);else{if((k=r.index_access.exec(y))===null)throw new SyntaxError("[sprintf] failed to parse named argument key");g.push(k[1])}b[2]=g}else x|=2;if(x===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");v.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]})}d=d.substring(b[0].length)}return u[c]=v}l.sprintf=n,l.vsprintf=o,typeof window<"u"&&(window.sprintf=n,window.vsprintf=o,(i=function(){return{sprintf:n,vsprintf:o}}.call(l,t,l,f))===void 0||(f.exports=i))})()},4162:function(f,l,t){f.exports=function(a,u){if(a.dimension<=0)return{positions:[],cells:[]};if(a.dimension===1)return function(b,d){for(var v=r(b,d),x=v.length,g=new Array(x),y=new Array(x),k=0;kx|0},vertex:function(b,d,v,x,g,y,k,h,M,A,C,L,O){var I=(k<<0)+(h<<1)+(M<<2)+(A<<3)|0;if(I!==0&&I!==15)switch(I){case 0:case 15:C.push([b-.5,d-.5]);break;case 1:C.push([b-.25-.25*(x+v-2*O)/(v-x),d-.25-.25*(g+v-2*O)/(v-g)]);break;case 2:C.push([b-.75-.25*(-x-v+2*O)/(x-v),d-.25-.25*(y+x-2*O)/(x-y)]);break;case 3:C.push([b-.5,d-.5-.5*(g+v+y+x-4*O)/(v-g+x-y)]);break;case 4:C.push([b-.25-.25*(y+g-2*O)/(g-y),d-.75-.25*(-g-v+2*O)/(g-v)]);break;case 5:C.push([b-.5-.5*(x+v+y+g-4*O)/(v-x+g-y),d-.5]);break;case 6:C.push([b-.5-.25*(-x-v+y+g)/(x-v+g-y),d-.5-.25*(-g-v+y+x)/(g-v+x-y)]);break;case 7:C.push([b-.75-.25*(y+g-2*O)/(g-y),d-.75-.25*(y+x-2*O)/(x-y)]);break;case 8:C.push([b-.75-.25*(-y-g+2*O)/(y-g),d-.75-.25*(-y-x+2*O)/(y-x)]);break;case 9:C.push([b-.5-.25*(x+v+-y-g)/(v-x+y-g),d-.5-.25*(g+v+-y-x)/(v-g+y-x)]);break;case 10:C.push([b-.5-.5*(-x-v-y-g+4*O)/(x-v+y-g),d-.5]);break;case 11:C.push([b-.25-.25*(-y-g+2*O)/(y-g),d-.75-.25*(g+v-2*O)/(v-g)]);break;case 12:C.push([b-.5,d-.5-.5*(-g-v-y-x+4*O)/(g-v+y-x)]);break;case 13:C.push([b-.75-.25*(x+v-2*O)/(v-x),d-.25-.25*(-y-x+2*O)/(y-x)]);break;case 14:C.push([b-.25-.25*(-x-v+2*O)/(x-v),d-.25-.25*(-g-v+2*O)/(g-v)])}},cell:function(b,d,v,x,g,y,k,h,M){g?h.push([b,d]):h.push([d,b])}});return function(b,d){var v=[],x=[];return c(b,v,x,d),{positions:v,cells:x}}}},o={}},6946:function(f,l,t){f.exports=function o(a,u,p){p=p||{};var c=n[a];c||(c=n[a]={" ":{data:new Float32Array(0),shape:.2}});var b=c[u];if(!b)if(u.length<=1||!/\d/.test(u))b=c[u]=function(L){for(var O=L.cells,I=L.positions,R=new Float32Array(6*O.length),U=0,B=0,G=0;G0&&(g+=.02);var k=new Float32Array(x),h=0,M=-.5*g;for(y=0;yMath.max(k,h)?M[2]=1:k>Math.max(y,h)?M[0]=1:M[1]=1;for(var A=0,C=0,L=0;L<3;++L)A+=g[L]*g[L],C+=M[L]*g[L];for(L=0;L<3;++L)M[L]-=C/A*g[L];return a(M,M),M}function d(g,y,k,h,M,A,C,L){this.center=i(k),this.up=i(h),this.right=i(M),this.radius=i([A]),this.angle=i([C,L]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(g,y),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 O=0;O<16;++O)this.computedMatrix[O]=.5;this.recalcMatrix(0)}var v=d.prototype;v.setDistanceLimits=function(g,y){g=g>0?Math.log(g):-1/0,y=y>0?Math.log(y):1/0,y=Math.max(y,g),this.radius.bounds[0][0]=g,this.radius.bounds[1][0]=y},v.getDistanceLimits=function(g){var y=this.radius.bounds[0];return g?(g[0]=Math.exp(y[0][0]),g[1]=Math.exp(y[1][0]),g):[Math.exp(y[0][0]),Math.exp(y[1][0])]},v.recalcMatrix=function(g){this.center.curve(g),this.up.curve(g),this.right.curve(g),this.radius.curve(g),this.angle.curve(g);for(var y=this.computedUp,k=this.computedRight,h=0,M=0,A=0;A<3;++A)M+=y[A]*k[A],h+=y[A]*y[A];var C=Math.sqrt(h),L=0;for(A=0;A<3;++A)k[A]-=y[A]*M/h,L+=k[A]*k[A],y[A]/=C;var O=Math.sqrt(L);for(A=0;A<3;++A)k[A]/=O;var I=this.computedToward;o(I,y,k),a(I,I);var R=Math.exp(this.computedRadius[0]),U=this.computedAngle[0],B=this.computedAngle[1],G=Math.cos(U),N=Math.sin(U),j=Math.cos(B),V=Math.sin(B),H=this.computedCenter,ee=G*j,Q=N*j,Y=V,X=-G*V,K=-N*V,te=j,ae=this.computedEye,oe=this.computedMatrix;for(A=0;A<3;++A){var se=ee*k[A]+Q*I[A]+Y*y[A];oe[4*A+1]=X*k[A]+K*I[A]+te*y[A],oe[4*A+2]=se,oe[4*A+3]=0}var fe=oe[1],xe=oe[5],he=oe[9],de=oe[2],pe=oe[6],ye=oe[10],Re=xe*ye-he*pe,we=he*de-fe*ye,Ae=fe*pe-xe*de,Me=p(Re,we,Ae);for(Re/=Me,we/=Me,Ae/=Me,oe[0]=Re,oe[4]=we,oe[8]=Ae,A=0;A<3;++A)ae[A]=H[A]+oe[2+4*A]*R;for(A=0;A<3;++A){L=0;for(var Ce=0;Ce<3;++Ce)L+=oe[A+4*Ce]*ae[Ce];oe[12+A]=-L}oe[15]=1},v.getMatrix=function(g,y){this.recalcMatrix(g);var k=this.computedMatrix;if(y){for(var h=0;h<16;++h)y[h]=k[h];return y}return k};var x=[0,0,0];v.rotate=function(g,y,k,h){if(this.angle.move(g,y,k),h){this.recalcMatrix(g);var M=this.computedMatrix;x[0]=M[2],x[1]=M[6],x[2]=M[10];for(var A=this.computedUp,C=this.computedRight,L=this.computedToward,O=0;O<3;++O)M[4*O]=A[O],M[4*O+1]=C[O],M[4*O+2]=L[O];for(n(M,M,h,x),O=0;O<3;++O)A[O]=M[4*O],C[O]=M[4*O+1];this.up.set(g,A[0],A[1],A[2]),this.right.set(g,C[0],C[1],C[2])}},v.pan=function(g,y,k,h){y=y||0,k=k||0,h=h||0,this.recalcMatrix(g);var M=this.computedMatrix,A=(Math.exp(this.computedRadius[0]),M[1]),C=M[5],L=M[9],O=p(A,C,L);A/=O,C/=O,L/=O;var I=M[0],R=M[4],U=M[8],B=I*A+R*C+U*L,G=p(I-=A*B,R-=C*B,U-=L*B),N=(I/=G)*y+A*k,j=(R/=G)*y+C*k,V=(U/=G)*y+L*k;this.center.move(g,N,j,V);var H=Math.exp(this.computedRadius[0]);H=Math.max(1e-4,H+h),this.radius.set(g,Math.log(H))},v.translate=function(g,y,k,h){this.center.move(g,y||0,k||0,h||0)},v.setMatrix=function(g,y,k,h){var M=1;typeof k=="number"&&(M=0|k),(M<0||M>3)&&(M=1);var A=(M+2)%3;y||(this.recalcMatrix(g),y=this.computedMatrix);var C=y[M],L=y[M+4],O=y[M+8];if(h){var I=Math.abs(C),R=Math.abs(L),U=Math.abs(O),B=Math.max(I,R,U);I===B?(C=C<0?-1:1,L=O=0):U===B?(O=O<0?-1:1,C=L=0):(L=L<0?-1:1,C=O=0)}else{var G=p(C,L,O);C/=G,L/=G,O/=G}var N,j,V=y[A],H=y[A+4],ee=y[A+8],Q=V*C+H*L+ee*O,Y=p(V-=C*Q,H-=L*Q,ee-=O*Q),X=L*(ee/=Y)-O*(H/=Y),K=O*(V/=Y)-C*ee,te=C*H-L*V,ae=p(X,K,te);if(X/=ae,K/=ae,te/=ae,this.center.jump(g,Te,Ee,Ue),this.radius.idle(g),this.up.jump(g,C,L,O),this.right.jump(g,V,H,ee),M===2){var oe=y[1],se=y[5],fe=y[9],xe=oe*V+se*H+fe*ee,he=oe*X+se*K+fe*te;N=Re<0?-Math.PI/2:Math.PI/2,j=Math.atan2(he,xe)}else{var de=y[2],pe=y[6],ye=y[10],Re=de*C+pe*L+ye*O,we=de*V+pe*H+ye*ee,Ae=de*X+pe*K+ye*te;N=Math.asin(c(Re)),j=Math.atan2(Ae,we)}this.angle.jump(g,j,N),this.recalcMatrix(g);var Me=y[2],Ce=y[6],ne=y[10],ue=this.computedMatrix;r(ue,y);var me=ue[15],Te=ue[12]/me,Ee=ue[13]/me,Ue=ue[14]/me,De=Math.exp(this.computedRadius[0]);this.center.jump(g,Te-Me*De,Ee-Ce*De,Ue-ne*De)},v.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},v.idle=function(g){this.center.idle(g),this.up.idle(g),this.right.idle(g),this.radius.idle(g),this.angle.idle(g)},v.flush=function(g){this.center.flush(g),this.up.flush(g),this.right.flush(g),this.radius.flush(g),this.angle.flush(g)},v.setDistance=function(g,y){y>0&&this.radius.set(g,Math.log(y))},v.lookAt=function(g,y,k,h){this.recalcMatrix(g),y=y||this.computedEye,k=k||this.computedCenter;var M=(h=h||this.computedUp)[0],A=h[1],C=h[2],L=p(M,A,C);if(!(L<1e-6)){M/=L,A/=L,C/=L;var O=y[0]-k[0],I=y[1]-k[1],R=y[2]-k[2],U=p(O,I,R);if(!(U<1e-6)){O/=U,I/=U,R/=U;var B=this.computedRight,G=B[0],N=B[1],j=B[2],V=M*G+A*N+C*j,H=p(G-=V*M,N-=V*A,j-=V*C);if(!(H<.01&&(H=p(G=A*R-C*I,N=C*O-M*R,j=M*I-A*O))<1e-6)){G/=H,N/=H,j/=H,this.up.set(g,M,A,C),this.right.set(g,G,N,j),this.center.set(g,k[0],k[1],k[2]),this.radius.set(g,Math.log(U));var ee=A*j-C*N,Q=C*G-M*j,Y=M*N-A*G,X=p(ee,Q,Y),K=M*O+A*I+C*R,te=G*O+N*I+j*R,ae=(ee/=X)*O+(Q/=X)*I+(Y/=X)*R,oe=Math.asin(c(K)),se=Math.atan2(ae,te),fe=this.angle._state,xe=fe[fe.length-1],he=fe[fe.length-2];xe%=2*Math.PI;var de=Math.abs(xe+2*Math.PI-se),pe=Math.abs(xe-se),ye=Math.abs(xe-2*Math.PI-se);de0?N.pop():new ArrayBuffer(B)}function x(B){return new Uint8Array(v(B),0,B)}function g(B){return new Uint16Array(v(2*B),0,B)}function y(B){return new Uint32Array(v(4*B),0,B)}function k(B){return new Int8Array(v(B),0,B)}function h(B){return new Int16Array(v(2*B),0,B)}function M(B){return new Int32Array(v(4*B),0,B)}function A(B){return new Float32Array(v(4*B),0,B)}function C(B){return new Float64Array(v(8*B),0,B)}function L(B){return o?new Uint8ClampedArray(v(B),0,B):x(B)}function O(B){return a?new BigUint64Array(v(8*B),0,B):null}function I(B){return u?new BigInt64Array(v(8*B),0,B):null}function R(B){return new DataView(v(B),0,B)}function U(B){B=i.nextPow2(B);var G=i.log2(B),N=b[G];return N.length>0?N.pop():new n(B)}l.free=function(B){if(n.isBuffer(B))b[i.log2(B.length)].push(B);else{if(Object.prototype.toString.call(B)!=="[object ArrayBuffer]"&&(B=B.buffer),!B)return;var G=B.length||B.byteLength,N=0|i.log2(G);c[N].push(B)}},l.freeUint8=l.freeUint16=l.freeUint32=l.freeBigUint64=l.freeInt8=l.freeInt16=l.freeInt32=l.freeBigInt64=l.freeFloat32=l.freeFloat=l.freeFloat64=l.freeDouble=l.freeUint8Clamped=l.freeDataView=function(B){d(B.buffer)},l.freeArrayBuffer=d,l.freeBuffer=function(B){b[i.log2(B.length)].push(B)},l.malloc=function(B,G){if(G===void 0||G==="arraybuffer")return v(B);switch(G){case"uint8":return x(B);case"uint16":return g(B);case"uint32":return y(B);case"int8":return k(B);case"int16":return h(B);case"int32":return M(B);case"float":case"float32":return A(B);case"double":case"float64":return C(B);case"uint8_clamped":return L(B);case"bigint64":return I(B);case"biguint64":return O(B);case"buffer":return U(B);case"data":case"dataview":return R(B);default:return null}return null},l.mallocArrayBuffer=v,l.mallocUint8=x,l.mallocUint16=g,l.mallocUint32=y,l.mallocInt8=k,l.mallocInt16=h,l.mallocInt32=M,l.mallocFloat32=l.mallocFloat=A,l.mallocFloat64=l.mallocDouble=C,l.mallocUint8Clamped=L,l.mallocBigUint64=O,l.mallocBigInt64=I,l.mallocDataView=R,l.mallocBuffer=U,l.clearCache=function(){for(var B=0;B<32;++B)p.UINT8[B].length=0,p.UINT16[B].length=0,p.UINT32[B].length=0,p.INT8[B].length=0,p.INT16[B].length=0,p.INT32[B].length=0,p.FLOAT[B].length=0,p.DOUBLE[B].length=0,p.BIGUINT64[B].length=0,p.BIGINT64[B].length=0,p.UINT8C[B].length=0,c[B].length=0,b[B].length=0}},1731:function(f){function l(i){this.roots=new Array(i),this.ranks=new Array(i);for(var r=0;r0&&(M=h.size),h.lineSpacing&&h.lineSpacing>0&&(A=h.lineSpacing),h.styletags&&h.styletags.breaklines&&(C.breaklines=!!h.styletags.breaklines),h.styletags&&h.styletags.bolds&&(C.bolds=!!h.styletags.bolds),h.styletags&&h.styletags.italics&&(C.italics=!!h.styletags.italics),h.styletags&&h.styletags.subscripts&&(C.subscripts=!!h.styletags.subscripts),h.styletags&&h.styletags.superscripts&&(C.superscripts=!!h.styletags.superscripts)),k.font=[h.fontStyle,h.fontVariant,h.fontWeight,M+"px",h.font].filter(function(L){return L}).join(" "),k.textAlign="start",k.textBaseline="alphabetic",k.direction="ltr",x(function(L,O,I,R,U,B){I=I.replace(/\n/g,""),I=B.breaklines===!0?I.replace(/\/g,` +`):I.replace(/\/g," ");var G="",N=[];for(ee=0;ee-1?parseInt(ue[1+Ee]):0,je=Ue>-1?parseInt(me[1+Ue]):0;De!==je&&(Te=Te.replace(ye(),"?px "),X*=Math.pow(.75,je-De),Te=Te.replace("?px ",ye())),Y+=.25*ae*(je-De)}if(B.superscripts===!0){var ge=ue.indexOf("+"),be=me.indexOf("+"),Se=ge>-1?parseInt(ue[1+ge]):0,Ne=be>-1?parseInt(me[1+be]):0;Se!==Ne&&(Te=Te.replace(ye(),"?px "),X*=Math.pow(.75,Ne-Se),Te=Te.replace("?px ",ye())),Y-=.25*ae*(Ne-Se)}if(B.bolds===!0){var Ye=ue.indexOf(p)>-1,Ze=me.indexOf(p)>-1;!Ye&&Ze&&(Te=st?Te.replace("italic ","italic bold "):"bold "+Te),Ye&&!Ze&&(Te=Te.replace("bold ",""))}if(B.italics===!0){var st=ue.indexOf(c)>-1,ot=me.indexOf(c)>-1;!st&&ot&&(Te="italic "+Te),st&&!ot&&(Te=Te.replace("italic ",""))}O.font=Te}for(H=0;H",A="",C=M.length,L=A.length,O=y[0]==="+"||y[0]==="-",I=0,R=-L;I>-1&&(I=k.indexOf(M,I))!==-1&&(R=k.indexOf(A,I+C))!==-1&&!(R<=I);){for(var U=I;U=R)h[U]=null,k=k.substr(0,U)+" "+k.substr(U+1);else if(h[U]!==null){var B=h[U].indexOf(y[0]);B===-1?h[U]+=y:O&&(h[U]=h[U].substr(0,B+1)+(1+parseInt(h[U][B+1]))+h[U].substr(B+2))}var G=I+C,N=k.substr(G,R-G).indexOf(M);I=N!==-1?N:R+L}return h}function d(g,y){var k=i(g,128);return y?n(k.cells,k.positions,.25):{edges:k.cells,positions:k.positions}}function v(g,y,k,h){var M=d(g,h),A=function(H,ee,Q){for(var Y=ee.textAlign||"start",X=ee.textBaseline||"alphabetic",K=[1<<30,1<<30],te=[0,0],ae=H.length,oe=0;oe"u"||!ses.ok||ses.ok()){typeof ses<"u"&&(ses.weakMapPermitHostObjects=y);var l=!1;if(typeof WeakMap=="function"){var t=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var i=new t,r=Object.freeze({});if(i.set(r,1),i.get(r)===1)return void(f.exports=WeakMap);l=!0}}var n=Object.getOwnPropertyNames,o=Object.defineProperty,a=Object.isExtensible,u="weakmap:",p="weakmap:ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var c=new ArrayBuffer(25),b=new Uint8Array(c);crypto.getRandomValues(b),p="weakmap:rand:"+Array.prototype.map.call(b,function(C){return(C%36).toString(36)}).join("")+"___"}if(o(Object,"getOwnPropertyNames",{value:function(C){return n(C).filter(k)}}),"getPropertyNames"in Object){var d=Object.getPropertyNames;o(Object,"getPropertyNames",{value:function(C){return d(C).filter(k)}})}(function(){var C=Object.freeze;o(Object,"freeze",{value:function(I){return h(I),C(I)}});var L=Object.seal;o(Object,"seal",{value:function(I){return h(I),L(I)}});var O=Object.preventExtensions;o(Object,"preventExtensions",{value:function(I){return h(I),O(I)}})})();var v=!1,x=0,g=function(){this instanceof g||A();var C=[],L=[],O=x++;return Object.create(g.prototype,{get___:{value:M(function(I,R){var U,B=h(I);return B?O in B?B[O]:R:(U=C.indexOf(I))>=0?L[U]:R})},has___:{value:M(function(I){var R=h(I);return R?O in R:C.indexOf(I)>=0})},set___:{value:M(function(I,R){var U,B=h(I);return B?B[O]=R:(U=C.indexOf(I))>=0?L[U]=R:(U=C.length,L[U]=R,C[U]=I),this})},delete___:{value:M(function(I){var R,U,B=h(I);return B?O in B&&delete B[O]:!((R=C.indexOf(I))<0||(U=C.length-1,C[R]=void 0,L[R]=L[U],C[R]=C[U],C.length=U,L.length=U,0))})}})};g.prototype=Object.create(Object.prototype,{get:{value:function(C,L){return this.get___(C,L)},writable:!0,configurable:!0},has:{value:function(C){return this.has___(C)},writable:!0,configurable:!0},set:{value:function(C,L){return this.set___(C,L)},writable:!0,configurable:!0},delete:{value:function(C){return this.delete___(C)},writable:!0,configurable:!0}}),typeof t=="function"?function(){function C(){this instanceof g||A();var L,O=new t,I=void 0,R=!1;return L=l?function(U,B){return O.set(U,B),O.has(U)||(I||(I=new g),I.set(U,B)),this}:function(U,B){if(R)try{O.set(U,B)}catch{I||(I=new g),I.set___(U,B)}else O.set(U,B);return this},Object.create(g.prototype,{get___:{value:M(function(U,B){return I?O.has(U)?O.get(U):I.get___(U,B):O.get(U,B)})},has___:{value:M(function(U){return O.has(U)||!!I&&I.has___(U)})},set___:{value:M(L)},delete___:{value:M(function(U){var B=!!O.delete(U);return I&&I.delete___(U)||B})},permitHostObjects___:{value:M(function(U){if(U!==y)throw new Error("bogus call to permitHostObjects___");R=!0})}})}l&&typeof Proxy<"u"&&(Proxy=void 0),C.prototype=g.prototype,f.exports=C,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),f.exports=g)}function y(C){C.permitHostObjects___&&C.permitHostObjects___(y)}function k(C){return!(C.substr(0,u.length)==u&&C.substr(C.length-3)==="___")}function h(C){if(C!==Object(C))throw new TypeError("Not an object: "+C);var L=C[p];if(L&&L.key===C)return L;if(a(C)){L={key:C};try{return o(C,p,{value:L,writable:!1,enumerable:!1,configurable:!1}),L}catch{return}}}function M(C){return C.prototype=null,Object.freeze(C)}function A(){v||typeof console>"u"||(v=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}})()},9222:function(f,l,t){var i=t(7178);f.exports=function(){var r={};return function(n){if((typeof n!="object"||n===null)&&typeof n!="function")throw new Error("Weakmap-shim: Key must be object");var o=n.valueOf(r);return o&&o.identity===r?o:i(n,r)}}},7178:function(f){f.exports=function(l,t){var i={identity:t},r=l.valueOf;return Object.defineProperty(l,"valueOf",{value:function(n){return n!==t?r.apply(this,arguments):i},writable:!0}),i}},4037:function(f,l,t){var i=t(9222);f.exports=function(){var r=i();return{get:function(n,o){var a=r(n);return a.hasOwnProperty("value")?a.value:o},set:function(n,o){return r(n).value=o,this},has:function(n){return"value"in r(n)},delete:function(n){return delete r(n).value}}}},6183:function(f){f.exports=function(l){var t={};return function(i,r,n){var o=i.dtype,a=i.order,u=[o,a.join()].join(),p=t[u];return p||(t[u]=p=l([o,a])),p(i.shape.slice(0),i.data,i.stride,0|i.offset,r,n)}}(function(){return function(l,t,i,r,n,o){var a=l[0],u=i[0],p=[0],c=u;r|=0;var b=0,d=u;for(b=0;b=0!=x>=0&&n.push(p[0]+.5+.5*(v+x)/(v-x)),r+=d,++p[0]}}}.bind(void 0,{funcName:"zeroCrossings"}))},9584:function(f,l,t){f.exports=function(r,n){var o=[];return n=+n||0,i(r.hi(r.shape[0]-1),o,n),o};var i=t(6183)},6601:function(){}},T={};function m(f){var l=T[f];if(l!==void 0)return l.exports;var t=T[f]={id:f,loaded:!1,exports:{}};return s[f].call(t.exports,t,t.exports,m),t.loaded=!0,t.exports}return m.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),m.nmd=function(f){return f.paths=[],f.children||(f.children=[]),f},m(7386)}()},D.exports=_()},12856:function(D,E,e){function _(ne,ue){if(!(ne instanceof ue))throw new TypeError("Cannot call a class as a function")}function w(ne,ue){for(var me=0;men)throw new RangeError('The value "'+ne+'" is invalid for option "size"');var ue=new Uint8Array(ne);return Object.setPrototypeOf(ue,a.prototype),ue}function a(ne,ue,me){if(typeof ne=="number"){if(typeof ue=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return c(ne)}return u(ne,ue,me)}function u(ne,ue,me){if(typeof ne=="string")return function(Ue,De){if(typeof De=="string"&&De!==""||(De="utf8"),!a.isEncoding(De))throw new TypeError("Unknown encoding: "+De);var je=0|x(Ue,De),ge=o(je),be=ge.write(Ue,De);return be!==je&&(ge=ge.slice(0,be)),ge}(ne,ue);if(ArrayBuffer.isView(ne))return function(Ue){if(Re(Ue,Uint8Array)){var De=new Uint8Array(Ue);return d(De.buffer,De.byteOffset,De.byteLength)}return b(Ue)}(ne);if(ne==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(ne));if(Re(ne,ArrayBuffer)||ne&&Re(ne.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Re(ne,SharedArrayBuffer)||ne&&Re(ne.buffer,SharedArrayBuffer)))return d(ne,ue,me);if(typeof ne=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Te=ne.valueOf&&ne.valueOf();if(Te!=null&&Te!==ne)return a.from(Te,ue,me);var Ee=function(Ue){if(a.isBuffer(Ue)){var De=0|v(Ue.length),je=o(De);return je.length===0||Ue.copy(je,0,0,De),je}return Ue.length!==void 0?typeof Ue.length!="number"||we(Ue.length)?o(0):b(Ue):Ue.type==="Buffer"&&Array.isArray(Ue.data)?b(Ue.data):void 0}(ne);if(Ee)return Ee;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ne[Symbol.toPrimitive]=="function")return a.from(ne[Symbol.toPrimitive]("string"),ue,me);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(ne))}function p(ne){if(typeof ne!="number")throw new TypeError('"size" argument must be of type number');if(ne<0)throw new RangeError('The value "'+ne+'" is invalid for option "size"')}function c(ne){return p(ne),o(ne<0?0:0|v(ne))}function b(ne){for(var ue=ne.length<0?0:0|v(ne.length),me=o(ue),Te=0;Te=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return 0|ne}function x(ne,ue){if(a.isBuffer(ne))return ne.length;if(ArrayBuffer.isView(ne)||Re(ne,ArrayBuffer))return ne.byteLength;if(typeof ne!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+l(ne));var me=ne.length,Te=arguments.length>2&&arguments[2]===!0;if(!Te&&me===0)return 0;for(var Ee=!1;;)switch(ue){case"ascii":case"latin1":case"binary":return me;case"utf8":case"utf-8":return de(ne).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*me;case"hex":return me>>>1;case"base64":return pe(ne).length;default:if(Ee)return Te?-1:de(ne).length;ue=(""+ue).toLowerCase(),Ee=!0}}function g(ne,ue,me){var Te=!1;if((ue===void 0||ue<0)&&(ue=0),ue>this.length||((me===void 0||me>this.length)&&(me=this.length),me<=0)||(me>>>=0)<=(ue>>>=0))return"";for(ne||(ne="utf8");;)switch(ne){case"hex":return N(this,ue,me);case"utf8":case"utf-8":return R(this,ue,me);case"ascii":return B(this,ue,me);case"latin1":case"binary":return G(this,ue,me);case"base64":return I(this,ue,me);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,ue,me);default:if(Te)throw new TypeError("Unknown encoding: "+ne);ne=(ne+"").toLowerCase(),Te=!0}}function y(ne,ue,me){var Te=ne[ue];ne[ue]=ne[me],ne[me]=Te}function k(ne,ue,me,Te,Ee){if(ne.length===0)return-1;if(typeof me=="string"?(Te=me,me=0):me>2147483647?me=2147483647:me<-2147483648&&(me=-2147483648),we(me=+me)&&(me=Ee?0:ne.length-1),me<0&&(me=ne.length+me),me>=ne.length){if(Ee)return-1;me=ne.length-1}else if(me<0){if(!Ee)return-1;me=0}if(typeof ue=="string"&&(ue=a.from(ue,Te)),a.isBuffer(ue))return ue.length===0?-1:h(ne,ue,me,Te,Ee);if(typeof ue=="number")return ue&=255,typeof Uint8Array.prototype.indexOf=="function"?Ee?Uint8Array.prototype.indexOf.call(ne,ue,me):Uint8Array.prototype.lastIndexOf.call(ne,ue,me):h(ne,[ue],me,Te,Ee);throw new TypeError("val must be string, number or Buffer")}function h(ne,ue,me,Te,Ee){var Ue,De=1,je=ne.length,ge=ue.length;if(Te!==void 0&&((Te=String(Te).toLowerCase())==="ucs2"||Te==="ucs-2"||Te==="utf16le"||Te==="utf-16le")){if(ne.length<2||ue.length<2)return-1;De=2,je/=2,ge/=2,me/=2}function be(Ze,st){return De===1?Ze[st]:Ze.readUInt16BE(st*De)}if(Ee){var Se=-1;for(Ue=me;Ueje&&(me=je-ge),Ue=me;Ue>=0;Ue--){for(var Ne=!0,Ye=0;YeEe&&(Te=Ee):Te=Ee;var Ue,De=ue.length;for(Te>De/2&&(Te=De/2),Ue=0;Ue>8,ge=De%256,be.push(ge),be.push(je);return be}(ue,ne.length-me),ne,me,Te)}function I(ne,ue,me){return ue===0&&me===ne.length?t.fromByteArray(ne):t.fromByteArray(ne.slice(ue,me))}function R(ne,ue,me){me=Math.min(ne.length,me);for(var Te=[],Ee=ue;Ee239?4:Ue>223?3:Ue>191?2:1;if(Ee+je<=me){var ge=void 0,be=void 0,Se=void 0,Ne=void 0;switch(je){case 1:Ue<128&&(De=Ue);break;case 2:(192&(ge=ne[Ee+1]))==128&&(Ne=(31&Ue)<<6|63&ge)>127&&(De=Ne);break;case 3:ge=ne[Ee+1],be=ne[Ee+2],(192&ge)==128&&(192&be)==128&&(Ne=(15&Ue)<<12|(63&ge)<<6|63&be)>2047&&(Ne<55296||Ne>57343)&&(De=Ne);break;case 4:ge=ne[Ee+1],be=ne[Ee+2],Se=ne[Ee+3],(192&ge)==128&&(192&be)==128&&(192&Se)==128&&(Ne=(15&Ue)<<18|(63&ge)<<12|(63&be)<<6|63&Se)>65535&&Ne<1114112&&(De=Ne)}}De===null?(De=65533,je=1):De>65535&&(De-=65536,Te.push(De>>>10&1023|55296),De=56320|1023&De),Te.push(De),Ee+=je}return function(Ye){var Ze=Ye.length;if(Ze<=U)return String.fromCharCode.apply(String,Ye);for(var st="",ot=0;ot"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(ne,ue,me){return u(ne,ue,me)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(ne,ue,me){return function(Te,Ee,Ue){return p(Te),Te<=0?o(Te):Ee!==void 0?typeof Ue=="string"?o(Te).fill(Ee,Ue):o(Te).fill(Ee):o(Te)}(ne,ue,me)},a.allocUnsafe=function(ne){return c(ne)},a.allocUnsafeSlow=function(ne){return c(ne)},a.isBuffer=function(ne){return ne!=null&&ne._isBuffer===!0&&ne!==a.prototype},a.compare=function(ne,ue){if(Re(ne,Uint8Array)&&(ne=a.from(ne,ne.offset,ne.byteLength)),Re(ue,Uint8Array)&&(ue=a.from(ue,ue.offset,ue.byteLength)),!a.isBuffer(ne)||!a.isBuffer(ue))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ne===ue)return 0;for(var me=ne.length,Te=ue.length,Ee=0,Ue=Math.min(me,Te);EeTe.length?(a.isBuffer(Ue)||(Ue=a.from(Ue)),Ue.copy(Te,Ee)):Uint8Array.prototype.set.call(Te,Ue,Ee);else{if(!a.isBuffer(Ue))throw new TypeError('"list" argument must be an Array of Buffers');Ue.copy(Te,Ee)}Ee+=Ue.length}return Te},a.byteLength=x,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var ne=this.length;if(ne%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ue=0;ueue&&(ne+=" ... "),""},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(ne,ue,me,Te,Ee){if(Re(ne,Uint8Array)&&(ne=a.from(ne,ne.offset,ne.byteLength)),!a.isBuffer(ne))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+l(ne));if(ue===void 0&&(ue=0),me===void 0&&(me=ne?ne.length:0),Te===void 0&&(Te=0),Ee===void 0&&(Ee=this.length),ue<0||me>ne.length||Te<0||Ee>this.length)throw new RangeError("out of range index");if(Te>=Ee&&ue>=me)return 0;if(Te>=Ee)return-1;if(ue>=me)return 1;if(this===ne)return 0;for(var Ue=(Ee>>>=0)-(Te>>>=0),De=(me>>>=0)-(ue>>>=0),je=Math.min(Ue,De),ge=this.slice(Te,Ee),be=ne.slice(ue,me),Se=0;Se>>=0,isFinite(me)?(me>>>=0,Te===void 0&&(Te="utf8")):(Te=me,me=void 0)}var Ee=this.length-ue;if((me===void 0||me>Ee)&&(me=Ee),ne.length>0&&(me<0||ue<0)||ue>this.length)throw new RangeError("Attempt to write outside buffer bounds");Te||(Te="utf8");for(var Ue=!1;;)switch(Te){case"hex":return M(this,ne,ue,me);case"utf8":case"utf-8":return A(this,ne,ue,me);case"ascii":case"latin1":case"binary":return C(this,ne,ue,me);case"base64":return L(this,ne,ue,me);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,ne,ue,me);default:if(Ue)throw new TypeError("Unknown encoding: "+Te);Te=(""+Te).toLowerCase(),Ue=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var U=4096;function B(ne,ue,me){var Te="";me=Math.min(ne.length,me);for(var Ee=ue;EeTe)&&(me=Te);for(var Ee="",Ue=ue;Ueme)throw new RangeError("Trying to access beyond buffer length")}function H(ne,ue,me,Te,Ee,Ue){if(!a.isBuffer(ne))throw new TypeError('"buffer" argument must be a Buffer instance');if(ue>Ee||uene.length)throw new RangeError("Index out of range")}function ee(ne,ue,me,Te,Ee){se(ue,Te,Ee,ne,me,7);var Ue=Number(ue&BigInt(4294967295));ne[me++]=Ue,Ue>>=8,ne[me++]=Ue,Ue>>=8,ne[me++]=Ue,Ue>>=8,ne[me++]=Ue;var De=Number(ue>>BigInt(32)&BigInt(4294967295));return ne[me++]=De,De>>=8,ne[me++]=De,De>>=8,ne[me++]=De,De>>=8,ne[me++]=De,me}function Q(ne,ue,me,Te,Ee){se(ue,Te,Ee,ne,me,7);var Ue=Number(ue&BigInt(4294967295));ne[me+7]=Ue,Ue>>=8,ne[me+6]=Ue,Ue>>=8,ne[me+5]=Ue,Ue>>=8,ne[me+4]=Ue;var De=Number(ue>>BigInt(32)&BigInt(4294967295));return ne[me+3]=De,De>>=8,ne[me+2]=De,De>>=8,ne[me+1]=De,De>>=8,ne[me]=De,me+8}function Y(ne,ue,me,Te,Ee,Ue){if(me+Te>ne.length)throw new RangeError("Index out of range");if(me<0)throw new RangeError("Index out of range")}function X(ne,ue,me,Te,Ee){return ue=+ue,me>>>=0,Ee||Y(ne,0,me,4),i.write(ne,ue,me,Te,23,4),me+4}function K(ne,ue,me,Te,Ee){return ue=+ue,me>>>=0,Ee||Y(ne,0,me,8),i.write(ne,ue,me,Te,52,8),me+8}a.prototype.slice=function(ne,ue){var me=this.length;(ne=~~ne)<0?(ne+=me)<0&&(ne=0):ne>me&&(ne=me),(ue=ue===void 0?me:~~ue)<0?(ue+=me)<0&&(ue=0):ue>me&&(ue=me),ue>>=0,ue>>>=0,me||V(ne,ue,this.length);for(var Te=this[ne],Ee=1,Ue=0;++Ue>>=0,ue>>>=0,me||V(ne,ue,this.length);for(var Te=this[ne+--ue],Ee=1;ue>0&&(Ee*=256);)Te+=this[ne+--ue]*Ee;return Te},a.prototype.readUint8=a.prototype.readUInt8=function(ne,ue){return ne>>>=0,ue||V(ne,1,this.length),this[ne]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(ne,ue){return ne>>>=0,ue||V(ne,2,this.length),this[ne]|this[ne+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(ne,ue){return ne>>>=0,ue||V(ne,2,this.length),this[ne]<<8|this[ne+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(ne,ue){return ne>>>=0,ue||V(ne,4,this.length),(this[ne]|this[ne+1]<<8|this[ne+2]<<16)+16777216*this[ne+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(ne,ue){return ne>>>=0,ue||V(ne,4,this.length),16777216*this[ne]+(this[ne+1]<<16|this[ne+2]<<8|this[ne+3])},a.prototype.readBigUInt64LE=Me(function(ne){fe(ne>>>=0,"offset");var ue=this[ne],me=this[ne+7];ue!==void 0&&me!==void 0||xe(ne,this.length-8);var Te=ue+this[++ne]*Math.pow(2,8)+this[++ne]*Math.pow(2,16)+this[++ne]*Math.pow(2,24),Ee=this[++ne]+this[++ne]*Math.pow(2,8)+this[++ne]*Math.pow(2,16)+me*Math.pow(2,24);return BigInt(Te)+(BigInt(Ee)<>>=0,"offset");var ue=this[ne],me=this[ne+7];ue!==void 0&&me!==void 0||xe(ne,this.length-8);var Te=ue*Math.pow(2,24)+this[++ne]*Math.pow(2,16)+this[++ne]*Math.pow(2,8)+this[++ne],Ee=this[++ne]*Math.pow(2,24)+this[++ne]*Math.pow(2,16)+this[++ne]*Math.pow(2,8)+me;return(BigInt(Te)<>>=0,ue>>>=0,me||V(ne,ue,this.length);for(var Te=this[ne],Ee=1,Ue=0;++Ue=(Ee*=128)&&(Te-=Math.pow(2,8*ue)),Te},a.prototype.readIntBE=function(ne,ue,me){ne>>>=0,ue>>>=0,me||V(ne,ue,this.length);for(var Te=ue,Ee=1,Ue=this[ne+--Te];Te>0&&(Ee*=256);)Ue+=this[ne+--Te]*Ee;return Ue>=(Ee*=128)&&(Ue-=Math.pow(2,8*ue)),Ue},a.prototype.readInt8=function(ne,ue){return ne>>>=0,ue||V(ne,1,this.length),128&this[ne]?-1*(255-this[ne]+1):this[ne]},a.prototype.readInt16LE=function(ne,ue){ne>>>=0,ue||V(ne,2,this.length);var me=this[ne]|this[ne+1]<<8;return 32768&me?4294901760|me:me},a.prototype.readInt16BE=function(ne,ue){ne>>>=0,ue||V(ne,2,this.length);var me=this[ne+1]|this[ne]<<8;return 32768&me?4294901760|me:me},a.prototype.readInt32LE=function(ne,ue){return ne>>>=0,ue||V(ne,4,this.length),this[ne]|this[ne+1]<<8|this[ne+2]<<16|this[ne+3]<<24},a.prototype.readInt32BE=function(ne,ue){return ne>>>=0,ue||V(ne,4,this.length),this[ne]<<24|this[ne+1]<<16|this[ne+2]<<8|this[ne+3]},a.prototype.readBigInt64LE=Me(function(ne){fe(ne>>>=0,"offset");var ue=this[ne],me=this[ne+7];ue!==void 0&&me!==void 0||xe(ne,this.length-8);var Te=this[ne+4]+this[ne+5]*Math.pow(2,8)+this[ne+6]*Math.pow(2,16)+(me<<24);return(BigInt(Te)<>>=0,"offset");var ue=this[ne],me=this[ne+7];ue!==void 0&&me!==void 0||xe(ne,this.length-8);var Te=(ue<<24)+this[++ne]*Math.pow(2,16)+this[++ne]*Math.pow(2,8)+this[++ne];return(BigInt(Te)<>>=0,ue||V(ne,4,this.length),i.read(this,ne,!0,23,4)},a.prototype.readFloatBE=function(ne,ue){return ne>>>=0,ue||V(ne,4,this.length),i.read(this,ne,!1,23,4)},a.prototype.readDoubleLE=function(ne,ue){return ne>>>=0,ue||V(ne,8,this.length),i.read(this,ne,!0,52,8)},a.prototype.readDoubleBE=function(ne,ue){return ne>>>=0,ue||V(ne,8,this.length),i.read(this,ne,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(ne,ue,me,Te){ne=+ne,ue>>>=0,me>>>=0,Te||H(this,ne,ue,me,Math.pow(2,8*me)-1,0);var Ee=1,Ue=0;for(this[ue]=255≠++Ue>>=0,me>>>=0,Te||H(this,ne,ue,me,Math.pow(2,8*me)-1,0);var Ee=me-1,Ue=1;for(this[ue+Ee]=255≠--Ee>=0&&(Ue*=256);)this[ue+Ee]=ne/Ue&255;return ue+me},a.prototype.writeUint8=a.prototype.writeUInt8=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,1,255,0),this[ue]=255&ne,ue+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,2,65535,0),this[ue]=255&ne,this[ue+1]=ne>>>8,ue+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,2,65535,0),this[ue]=ne>>>8,this[ue+1]=255&ne,ue+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,4,4294967295,0),this[ue+3]=ne>>>24,this[ue+2]=ne>>>16,this[ue+1]=ne>>>8,this[ue]=255&ne,ue+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,4,4294967295,0),this[ue]=ne>>>24,this[ue+1]=ne>>>16,this[ue+2]=ne>>>8,this[ue+3]=255&ne,ue+4},a.prototype.writeBigUInt64LE=Me(function(ne){var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ee(this,ne,ue,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=Me(function(ne){var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Q(this,ne,ue,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(ne,ue,me,Te){if(ne=+ne,ue>>>=0,!Te){var Ee=Math.pow(2,8*me-1);H(this,ne,ue,me,Ee-1,-Ee)}var Ue=0,De=1,je=0;for(this[ue]=255≠++Ue>0)-je&255;return ue+me},a.prototype.writeIntBE=function(ne,ue,me,Te){if(ne=+ne,ue>>>=0,!Te){var Ee=Math.pow(2,8*me-1);H(this,ne,ue,me,Ee-1,-Ee)}var Ue=me-1,De=1,je=0;for(this[ue+Ue]=255≠--Ue>=0&&(De*=256);)ne<0&&je===0&&this[ue+Ue+1]!==0&&(je=1),this[ue+Ue]=(ne/De>>0)-je&255;return ue+me},a.prototype.writeInt8=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,1,127,-128),ne<0&&(ne=255+ne+1),this[ue]=255&ne,ue+1},a.prototype.writeInt16LE=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,2,32767,-32768),this[ue]=255&ne,this[ue+1]=ne>>>8,ue+2},a.prototype.writeInt16BE=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,2,32767,-32768),this[ue]=ne>>>8,this[ue+1]=255&ne,ue+2},a.prototype.writeInt32LE=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,4,2147483647,-2147483648),this[ue]=255&ne,this[ue+1]=ne>>>8,this[ue+2]=ne>>>16,this[ue+3]=ne>>>24,ue+4},a.prototype.writeInt32BE=function(ne,ue,me){return ne=+ne,ue>>>=0,me||H(this,ne,ue,4,2147483647,-2147483648),ne<0&&(ne=4294967295+ne+1),this[ue]=ne>>>24,this[ue+1]=ne>>>16,this[ue+2]=ne>>>8,this[ue+3]=255&ne,ue+4},a.prototype.writeBigInt64LE=Me(function(ne){var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ee(this,ne,ue,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=Me(function(ne){var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Q(this,ne,ue,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeFloatLE=function(ne,ue,me){return X(this,ne,ue,!0,me)},a.prototype.writeFloatBE=function(ne,ue,me){return X(this,ne,ue,!1,me)},a.prototype.writeDoubleLE=function(ne,ue,me){return K(this,ne,ue,!0,me)},a.prototype.writeDoubleBE=function(ne,ue,me){return K(this,ne,ue,!1,me)},a.prototype.copy=function(ne,ue,me,Te){if(!a.isBuffer(ne))throw new TypeError("argument should be a Buffer");if(me||(me=0),Te||Te===0||(Te=this.length),ue>=ne.length&&(ue=ne.length),ue||(ue=0),Te>0&&Te=this.length)throw new RangeError("Index out of range");if(Te<0)throw new RangeError("sourceEnd out of bounds");Te>this.length&&(Te=this.length),ne.length-ue>>=0,me=me===void 0?this.length:me>>>0,ne||(ne=0),typeof ne=="number")for(Ue=ue;Ue"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var Se,Ne=f(De);if(je){var Ye=f(this).constructor;Se=Reflect.construct(Ne,arguments,Ye)}else Se=Ne.apply(this,arguments);return T(this,Se)});function be(){var Se;return _(this,be),Se=ge.call(this),Object.defineProperty(m(Se),"message",{value:ue.apply(m(Se),arguments),writable:!0,configurable:!0}),Se.name="".concat(Se.name," [").concat(ne,"]"),Se.stack,delete Se.name,Se}return Ee=be,(Ue=[{key:"code",get:function(){return ne},set:function(Se){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Se,writable:!0})}},{key:"toString",value:function(){return"".concat(this.name," [").concat(ne,"]: ").concat(this.message)}}])&&w(Ee.prototype,Ue),Object.defineProperty(Ee,"prototype",{writable:!1}),be}(me)}function oe(ne){for(var ue="",me=ne.length,Te=ne[0]==="-"?1:0;me>=Te+4;me-=3)ue="_".concat(ne.slice(me-3,me)).concat(ue);return"".concat(ne.slice(0,me)).concat(ue)}function se(ne,ue,me,Te,Ee,Ue){if(ne>me||ne3?ue===0||ue===BigInt(0)?">= 0".concat(je," and < 2").concat(je," ** ").concat(8*(Ue+1)).concat(je):">= -(2".concat(je," ** ").concat(8*(Ue+1)-1).concat(je,") and < 2 ** ")+"".concat(8*(Ue+1)-1).concat(je):">= ".concat(ue).concat(je," and <= ").concat(me).concat(je),new te.ERR_OUT_OF_RANGE("value",De,ne)}(function(ge,be,Se){fe(be,"offset"),ge[be]!==void 0&&ge[be+Se]!==void 0||xe(be,ge.length-(Se+1))})(Te,Ee,Ue)}function fe(ne,ue){if(typeof ne!="number")throw new te.ERR_INVALID_ARG_TYPE(ue,"number",ne)}function xe(ne,ue,me){throw Math.floor(ne)!==ne?(fe(ne,me),new te.ERR_OUT_OF_RANGE(me||"offset","an integer",ne)):ue<0?new te.ERR_BUFFER_OUT_OF_BOUNDS:new te.ERR_OUT_OF_RANGE(me||"offset",">= ".concat(me?1:0," and <= ").concat(ue),ne)}ae("ERR_BUFFER_OUT_OF_BOUNDS",function(ne){return ne?"".concat(ne," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),ae("ERR_INVALID_ARG_TYPE",function(ne,ue){return'The "'.concat(ne,'" argument must be of type number. Received type ').concat(l(ue))},TypeError),ae("ERR_OUT_OF_RANGE",function(ne,ue,me){var Te='The value of "'.concat(ne,'" is out of range.'),Ee=me;return Number.isInteger(me)&&Math.abs(me)>Math.pow(2,32)?Ee=oe(String(me)):typeof me=="bigint"&&(Ee=String(me),(me>Math.pow(BigInt(2),BigInt(32))||me<-Math.pow(BigInt(2),BigInt(32)))&&(Ee=oe(Ee)),Ee+="n"),Te+" It must be ".concat(ue,". Received ").concat(Ee)},RangeError);var he=/[^+/0-9A-Za-z-_]/g;function de(ne,ue){var me;ue=ue||1/0;for(var Te=ne.length,Ee=null,Ue=[],De=0;De55295&&me<57344){if(!Ee){if(me>56319){(ue-=3)>-1&&Ue.push(239,191,189);continue}if(De+1===Te){(ue-=3)>-1&&Ue.push(239,191,189);continue}Ee=me;continue}if(me<56320){(ue-=3)>-1&&Ue.push(239,191,189),Ee=me;continue}me=65536+(Ee-55296<<10|me-56320)}else Ee&&(ue-=3)>-1&&Ue.push(239,191,189);if(Ee=null,me<128){if((ue-=1)<0)break;Ue.push(me)}else if(me<2048){if((ue-=2)<0)break;Ue.push(me>>6|192,63&me|128)}else if(me<65536){if((ue-=3)<0)break;Ue.push(me>>12|224,me>>6&63|128,63&me|128)}else{if(!(me<1114112))throw new Error("Invalid code point");if((ue-=4)<0)break;Ue.push(me>>18|240,me>>12&63|128,me>>6&63|128,63&me|128)}}return Ue}function pe(ne){return t.toByteArray(function(ue){if((ue=(ue=ue.split("=")[0]).trim().replace(he,"")).length<2)return"";for(;ue.length%4!=0;)ue+="=";return ue}(ne))}function ye(ne,ue,me,Te){var Ee;for(Ee=0;Ee=ue.length||Ee>=ne.length);++Ee)ue[Ee+me]=ne[Ee];return Ee}function Re(ne,ue){return ne instanceof ue||ne!=null&&ne.constructor!=null&&ne.constructor.name!=null&&ne.constructor.name===ue.name}function we(ne){return ne!=ne}var Ae=function(){for(var ne="0123456789abcdef",ue=new Array(256),me=0;me<16;++me)for(var Te=16*me,Ee=0;Ee<16;++Ee)ue[Te+Ee]=ne[me]+ne[Ee];return ue}();function Me(ne){return typeof BigInt>"u"?Ce:ne}function Ce(){throw new Error("BigInt not supported")}},35791:function(D){D.exports=w,D.exports.isMobile=w,D.exports.default=w;var E=/(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,e=/CrOS/,_=/android|ipad|playbook|silk/i;function w(s){s||(s={});var T=s.ua;if(T||typeof navigator>"u"||(T=navigator.userAgent),T&&T.headers&&typeof T.headers["user-agent"]=="string"&&(T=T.headers["user-agent"]),typeof T!="string")return!1;var m=E.test(T)&&!e.test(T)||!!s.tablet&&_.test(T);return!m&&s.tablet&&s.featureDetect&&navigator&&navigator.maxTouchPoints>1&&T.indexOf("Macintosh")!==-1&&T.indexOf("Safari")!==-1&&(m=!0),m}},86781:function(D,E,e){e.r(E),e.d(E,{sankeyCenter:function(){return r},sankeyCircular:function(){return C},sankeyJustify:function(){return i},sankeyLeft:function(){return l},sankeyRight:function(){return t}});var _=e(33064),w=e(15140),s=e(45879),T=e(2502),m=e.n(T);function f(pe){return pe.target.depth}function l(pe){return pe.depth}function t(pe,ye){return ye-1-pe.height}function i(pe,ye){return pe.sourceLinks.length?pe.depth:ye-1}function r(pe){return pe.targetLinks.length?pe.depth:pe.sourceLinks.length?(0,_.VV)(pe.sourceLinks,f)-1:0}function n(pe){return function(){return pe}}var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(pe){return typeof pe}:function(pe){return pe&&typeof Symbol=="function"&&pe.constructor===Symbol&&pe!==Symbol.prototype?"symbol":typeof pe};function a(pe,ye){return p(pe.source,ye.source)||pe.index-ye.index}function u(pe,ye){return p(pe.target,ye.target)||pe.index-ye.index}function p(pe,ye){return pe.partOfCycle===ye.partOfCycle?pe.y0-ye.y0:pe.circularLinkType==="top"||ye.circularLinkType==="bottom"?-1:1}function c(pe){return pe.value}function b(pe){return(pe.y0+pe.y1)/2}function d(pe){return b(pe.source)}function v(pe){return b(pe.target)}function x(pe){return pe.index}function g(pe){return pe.nodes}function y(pe){return pe.links}function k(pe,ye){var Re=pe.get(ye);if(!Re)throw new Error("missing: "+ye);return Re}function h(pe,ye){return ye(pe)}var M=25,A=10;function C(){var pe,ye,Re=0,we=0,Ae=1,Me=1,Ce=24,ne=x,ue=i,me=g,Te=y,Ee=32,Ue=2,De=null;function je(){var Ze={nodes:me.apply(null,arguments),links:Te.apply(null,arguments)};ge(Ze),L(Ze,0,De),be(Ze),Se(Ze),O(Ze,ne),Ne(Ze,Ee,ne),Ye(Ze);for(var st=4,ot=0;ot0?Ke+M+A:Ke,bottom:Ge=Ge>0?Ge+M+A:Ge,left:ht=ht>0?ht+M+A:ht,right:nt=nt>0?nt+M+A:nt}}(Ze),Nt=function(Je,Ke){var Ge=(0,_.Fp)(Je.nodes,function(Qe){return Qe.column}),nt=Ae-Re,ht=Me-we,Oe=nt/(nt+Ke.right+Ke.left),Be=ht/(ht+Ke.top+Ke.bottom);return Re=Re*Oe+Ke.left,Ae=Ke.right==0?Ae:Ae*Oe,we=we*Be+Ke.top,Me*=Be,Je.nodes.forEach(function(Qe){Qe.x0=Re+Qe.column*((Ae-Re-Ce)/Ge),Qe.x1=Qe.x0+Ce}),Be}(Ze,qt);Ft*=Nt,Ze.links.forEach(function(Je){Je.width=Je.value*Ft}),ft.forEach(function(Je){var Ke=Je.length;Je.forEach(function(Ge,nt){Ge.depth==ft.length-1&&Ke==1||Ge.depth==0&&Ke==1?(Ge.y0=Me/2-Ge.value*Ft,Ge.y1=Ge.y0+Ge.value*Ft):Ge.partOfCycle?R(Ge,Dt)==0?(Ge.y0=Me/2+nt,Ge.y1=Ge.y0+Ge.value*Ft):Ge.circularLinkType=="top"?(Ge.y0=we+nt,Ge.y1=Ge.y0+Ge.value*Ft):(Ge.y0=Me-Ge.value*Ft-nt,Ge.y1=Ge.y0+Ge.value*Ft):qt.top==0||qt.bottom==0?(Ge.y0=(Me-we)/Ke*nt,Ge.y1=Ge.y0+Ge.value*Ft):(Ge.y0=(Me-we)/2-Ke/2+nt,Ge.y1=Ge.y0+Ge.value*Ft)})})})(ot),xt();for(var yt=1,Et=st;Et>0;--Et)Tt(yt*=.99,ot),xt();function Tt(Dt,It){var Ft=ft.length;ft.forEach(function(qt){var Nt=qt.length,Je=qt[0].depth;qt.forEach(function(Ke){var Ge;if((Ke.sourceLinks.length||Ke.targetLinks.length)&&!(Ke.partOfCycle&&R(Ke,It)>0))if(Je==0&&Nt==1)Ge=Ke.y1-Ke.y0,Ke.y0=Me/2-Ge/2,Ke.y1=Me/2+Ge/2;else if(Je==Ft-1&&Nt==1)Ge=Ke.y1-Ke.y0,Ke.y0=Me/2-Ge/2,Ke.y1=Me/2+Ge/2;else{var nt=(0,_.J6)(Ke.sourceLinks,v),ht=(0,_.J6)(Ke.targetLinks,d),Oe=((nt&&ht?(nt+ht)/2:nt||ht)-b(Ke))*Dt;Ke.y0+=Oe,Ke.y1+=Oe}})})}function xt(){ft.forEach(function(Dt){var It,Ft,qt,Nt=we,Je=Dt.length;for(Dt.sort(p),qt=0;qt0&&(It.y0+=Ft,It.y1+=Ft),Nt=It.y1+pe;if((Ft=Nt-pe-Me)>0)for(Nt=It.y0-=Ft,It.y1-=Ft,qt=Je-2;qt>=0;--qt)(Ft=(It=Dt[qt]).y1+pe-Nt)>0&&(It.y0-=Ft,It.y1-=Ft),Nt=It.y0})}}function Ye(Ze){Ze.nodes.forEach(function(st){st.sourceLinks.sort(u),st.targetLinks.sort(a)}),Ze.nodes.forEach(function(st){var ot=st.y0,ft=ot,yt=st.y1,Et=yt;st.sourceLinks.forEach(function(Tt){Tt.circular?(Tt.y0=yt-Tt.width/2,yt-=Tt.width):(Tt.y0=ot+Tt.width/2,ot+=Tt.width)}),st.targetLinks.forEach(function(Tt){Tt.circular?(Tt.y1=Et-Tt.width/2,Et-=Tt.width):(Tt.y1=ft+Tt.width/2,ft+=Tt.width)})})}return je.nodeId=function(Ze){return arguments.length?(ne=typeof Ze=="function"?Ze:n(Ze),je):ne},je.nodeAlign=function(Ze){return arguments.length?(ue=typeof Ze=="function"?Ze:n(Ze),je):ue},je.nodeWidth=function(Ze){return arguments.length?(Ce=+Ze,je):Ce},je.nodePadding=function(Ze){return arguments.length?(pe=+Ze,je):pe},je.nodes=function(Ze){return arguments.length?(me=typeof Ze=="function"?Ze:n(Ze),je):me},je.links=function(Ze){return arguments.length?(Te=typeof Ze=="function"?Ze:n(Ze),je):Te},je.size=function(Ze){return arguments.length?(Re=we=0,Ae=+Ze[0],Me=+Ze[1],je):[Ae-Re,Me-we]},je.extent=function(Ze){return arguments.length?(Re=+Ze[0][0],Ae=+Ze[1][0],we=+Ze[0][1],Me=+Ze[1][1],je):[[Re,we],[Ae,Me]]},je.iterations=function(Ze){return arguments.length?(Ee=+Ze,je):Ee},je.circularLinkGap=function(Ze){return arguments.length?(Ue=+Ze,je):Ue},je.nodePaddingRatio=function(Ze){return arguments.length?(ye=+Ze,je):ye},je.sortNodes=function(Ze){return arguments.length?(De=Ze,je):De},je.update=function(Ze){return O(Ze,ne),Ye(Ze),Ze.links.forEach(function(st){st.circular&&(st.circularLinkType=st.y0+st.y11||Ae>1)}function B(pe,ye,Re){return pe.sort(N),pe.forEach(function(we,Ae){var Me,Ce,ne=0;if(he(we,Re)&&U(we))we.circularPathData.verticalBuffer=ne+we.width/2;else{for(var ue=0;ueCe.source.column)){var me=pe[ue].circularPathData.verticalBuffer+pe[ue].width/2+ye;ne=me>ne?me:ne}we.circularPathData.verticalBuffer=ne+we.width/2}}),pe}function G(pe,ye,Re,we){var Ae=(0,_.VV)(pe.links,function(Me){return Me.source.y0});pe.links.forEach(function(Me){Me.circular&&(Me.circularPathData={})}),B(pe.links.filter(function(Me){return Me.circularLinkType=="top"}),ye,we),B(pe.links.filter(function(Me){return Me.circularLinkType=="bottom"}),ye,we),pe.links.forEach(function(Me){if(Me.circular){if(Me.circularPathData.arcRadius=Me.width+A,Me.circularPathData.leftNodeBuffer=5,Me.circularPathData.rightNodeBuffer=5,Me.circularPathData.sourceWidth=Me.source.x1-Me.source.x0,Me.circularPathData.sourceX=Me.source.x0+Me.circularPathData.sourceWidth,Me.circularPathData.targetX=Me.target.x0,Me.circularPathData.sourceY=Me.y0,Me.circularPathData.targetY=Me.y1,he(Me,we)&&U(Me))Me.circularPathData.leftSmallArcRadius=A+Me.width/2,Me.circularPathData.leftLargeArcRadius=A+Me.width/2,Me.circularPathData.rightSmallArcRadius=A+Me.width/2,Me.circularPathData.rightLargeArcRadius=A+Me.width/2,Me.circularLinkType=="bottom"?(Me.circularPathData.verticalFullExtent=Me.source.y1+M+Me.circularPathData.verticalBuffer,Me.circularPathData.verticalLeftInnerExtent=Me.circularPathData.verticalFullExtent-Me.circularPathData.leftLargeArcRadius,Me.circularPathData.verticalRightInnerExtent=Me.circularPathData.verticalFullExtent-Me.circularPathData.rightLargeArcRadius):(Me.circularPathData.verticalFullExtent=Me.source.y0-M-Me.circularPathData.verticalBuffer,Me.circularPathData.verticalLeftInnerExtent=Me.circularPathData.verticalFullExtent+Me.circularPathData.leftLargeArcRadius,Me.circularPathData.verticalRightInnerExtent=Me.circularPathData.verticalFullExtent+Me.circularPathData.rightLargeArcRadius);else{var Ce=Me.source.column,ne=Me.circularLinkType,ue=pe.links.filter(function(Ee){return Ee.source.column==Ce&&Ee.circularLinkType==ne});Me.circularLinkType=="bottom"?ue.sort(V):ue.sort(j);var me=0;ue.forEach(function(Ee,Ue){Ee.circularLinkID==Me.circularLinkID&&(Me.circularPathData.leftSmallArcRadius=A+Me.width/2+me,Me.circularPathData.leftLargeArcRadius=A+Me.width/2+Ue*ye+me),me+=Ee.width}),Ce=Me.target.column,ue=pe.links.filter(function(Ee){return Ee.target.column==Ce&&Ee.circularLinkType==ne}),Me.circularLinkType=="bottom"?ue.sort(ee):ue.sort(H),me=0,ue.forEach(function(Ee,Ue){Ee.circularLinkID==Me.circularLinkID&&(Me.circularPathData.rightSmallArcRadius=A+Me.width/2+me,Me.circularPathData.rightLargeArcRadius=A+Me.width/2+Ue*ye+me),me+=Ee.width}),Me.circularLinkType=="bottom"?(Me.circularPathData.verticalFullExtent=Math.max(Re,Me.source.y1,Me.target.y1)+M+Me.circularPathData.verticalBuffer,Me.circularPathData.verticalLeftInnerExtent=Me.circularPathData.verticalFullExtent-Me.circularPathData.leftLargeArcRadius,Me.circularPathData.verticalRightInnerExtent=Me.circularPathData.verticalFullExtent-Me.circularPathData.rightLargeArcRadius):(Me.circularPathData.verticalFullExtent=Ae-M-Me.circularPathData.verticalBuffer,Me.circularPathData.verticalLeftInnerExtent=Me.circularPathData.verticalFullExtent+Me.circularPathData.leftLargeArcRadius,Me.circularPathData.verticalRightInnerExtent=Me.circularPathData.verticalFullExtent+Me.circularPathData.rightLargeArcRadius)}Me.circularPathData.leftInnerExtent=Me.circularPathData.sourceX+Me.circularPathData.leftNodeBuffer,Me.circularPathData.rightInnerExtent=Me.circularPathData.targetX-Me.circularPathData.rightNodeBuffer,Me.circularPathData.leftFullExtent=Me.circularPathData.sourceX+Me.circularPathData.leftLargeArcRadius+Me.circularPathData.leftNodeBuffer,Me.circularPathData.rightFullExtent=Me.circularPathData.targetX-Me.circularPathData.rightLargeArcRadius-Me.circularPathData.rightNodeBuffer}if(Me.circular)Me.path=function(Ee){return Ee.circularLinkType=="top"?"M"+Ee.circularPathData.sourceX+" "+Ee.circularPathData.sourceY+" L"+Ee.circularPathData.leftInnerExtent+" "+Ee.circularPathData.sourceY+" A"+Ee.circularPathData.leftLargeArcRadius+" "+Ee.circularPathData.leftSmallArcRadius+" 0 0 0 "+Ee.circularPathData.leftFullExtent+" "+(Ee.circularPathData.sourceY-Ee.circularPathData.leftSmallArcRadius)+" L"+Ee.circularPathData.leftFullExtent+" "+Ee.circularPathData.verticalLeftInnerExtent+" A"+Ee.circularPathData.leftLargeArcRadius+" "+Ee.circularPathData.leftLargeArcRadius+" 0 0 0 "+Ee.circularPathData.leftInnerExtent+" "+Ee.circularPathData.verticalFullExtent+" L"+Ee.circularPathData.rightInnerExtent+" "+Ee.circularPathData.verticalFullExtent+" A"+Ee.circularPathData.rightLargeArcRadius+" "+Ee.circularPathData.rightLargeArcRadius+" 0 0 0 "+Ee.circularPathData.rightFullExtent+" "+Ee.circularPathData.verticalRightInnerExtent+" L"+Ee.circularPathData.rightFullExtent+" "+(Ee.circularPathData.targetY-Ee.circularPathData.rightSmallArcRadius)+" A"+Ee.circularPathData.rightLargeArcRadius+" "+Ee.circularPathData.rightSmallArcRadius+" 0 0 0 "+Ee.circularPathData.rightInnerExtent+" "+Ee.circularPathData.targetY+" L"+Ee.circularPathData.targetX+" "+Ee.circularPathData.targetY:"M"+Ee.circularPathData.sourceX+" "+Ee.circularPathData.sourceY+" L"+Ee.circularPathData.leftInnerExtent+" "+Ee.circularPathData.sourceY+" A"+Ee.circularPathData.leftLargeArcRadius+" "+Ee.circularPathData.leftSmallArcRadius+" 0 0 1 "+Ee.circularPathData.leftFullExtent+" "+(Ee.circularPathData.sourceY+Ee.circularPathData.leftSmallArcRadius)+" L"+Ee.circularPathData.leftFullExtent+" "+Ee.circularPathData.verticalLeftInnerExtent+" A"+Ee.circularPathData.leftLargeArcRadius+" "+Ee.circularPathData.leftLargeArcRadius+" 0 0 1 "+Ee.circularPathData.leftInnerExtent+" "+Ee.circularPathData.verticalFullExtent+" L"+Ee.circularPathData.rightInnerExtent+" "+Ee.circularPathData.verticalFullExtent+" A"+Ee.circularPathData.rightLargeArcRadius+" "+Ee.circularPathData.rightLargeArcRadius+" 0 0 1 "+Ee.circularPathData.rightFullExtent+" "+Ee.circularPathData.verticalRightInnerExtent+" L"+Ee.circularPathData.rightFullExtent+" "+(Ee.circularPathData.targetY+Ee.circularPathData.rightSmallArcRadius)+" A"+Ee.circularPathData.rightLargeArcRadius+" "+Ee.circularPathData.rightSmallArcRadius+" 0 0 1 "+Ee.circularPathData.rightInnerExtent+" "+Ee.circularPathData.targetY+" L"+Ee.circularPathData.targetX+" "+Ee.circularPathData.targetY}(Me);else{var Te=(0,s.h5)().source(function(Ee){return[Ee.source.x0+(Ee.source.x1-Ee.source.x0),Ee.y0]}).target(function(Ee){return[Ee.target.x0,Ee.y1]});Me.path=Te(Me)}})}function N(pe,ye){return Q(pe)==Q(ye)?pe.circularLinkType=="bottom"?V(pe,ye):j(pe,ye):Q(ye)-Q(pe)}function j(pe,ye){return pe.y0-ye.y0}function V(pe,ye){return ye.y0-pe.y0}function H(pe,ye){return pe.y1-ye.y1}function ee(pe,ye){return ye.y1-pe.y1}function Q(pe){return pe.target.column-pe.source.column}function Y(pe){return pe.target.x0-pe.source.x1}function X(pe,ye){var Re=I(pe),we=Y(ye)/Math.tan(Re);return xe(pe)=="up"?pe.y1+we:pe.y1-we}function K(pe,ye){var Re=I(pe),we=Y(ye)/Math.tan(Re);return xe(pe)=="up"?pe.y1-we:pe.y1+we}function te(pe,ye,Re,we){pe.links.forEach(function(Ae){if(!Ae.circular&&Ae.target.column-Ae.source.column>1){var Me=Ae.source.column+1,Ce=Ae.target.column-1,ne=1,ue=Ce-Me+1;for(ne=1;Me<=Ce;Me++,ne++)pe.nodes.forEach(function(me){if(me.column==Me){var Te,Ee=ne/(ue+1),Ue=Math.pow(1-Ee,3),De=3*Ee*Math.pow(1-Ee,2),je=3*Math.pow(Ee,2)*(1-Ee),ge=Math.pow(Ee,3),be=Ue*Ae.y0+De*Ae.y0+je*Ae.y1+ge*Ae.y1,Se=be-Ae.width/2,Ne=be+Ae.width/2;Se>me.y0&&Sest.y0&&Ze.y0st.y0&&Ze.y1st.y1)&&ae(Ye,Te,ye,Re)})):(Ne>me.y0&&Neme.y1)&&(Te=Ne-me.y0+10,me=ae(me,Te,ye,Re),pe.nodes.forEach(function(Ye){h(Ye,we)!=h(me,we)&&Ye.column==me.column&&Ye.y0me.y1&&ae(Ye,Te,ye,Re)}))}})}})}function ae(pe,ye,Re,we){return pe.y0+ye>=Re&&pe.y1+ye<=we&&(pe.y0=pe.y0+ye,pe.y1=pe.y1+ye,pe.targetLinks.forEach(function(Ae){Ae.y1=Ae.y1+ye}),pe.sourceLinks.forEach(function(Ae){Ae.y0=Ae.y0+ye})),pe}function oe(pe,ye,Re,we){pe.nodes.forEach(function(Ae){we&&Ae.y+(Ae.y1-Ae.y0)>ye&&(Ae.y=Ae.y-(Ae.y+(Ae.y1-Ae.y0)-ye));var Me=pe.links.filter(function(ue){return h(ue.source,Re)==h(Ae,Re)}),Ce=Me.length;Ce>1&&Me.sort(function(ue,me){if(!ue.circular&&!me.circular){if(ue.target.column==me.target.column||!fe(ue,me))return ue.y1-me.y1;if(ue.target.column>me.target.column){var Te=K(me,ue);return ue.y1-Te}if(me.target.column>ue.target.column)return K(ue,me)-me.y1}return ue.circular&&!me.circular?ue.circularLinkType=="top"?-1:1:me.circular&&!ue.circular?me.circularLinkType=="top"?1:-1:ue.circular&&me.circular?ue.circularLinkType===me.circularLinkType&&ue.circularLinkType=="top"?ue.target.column===me.target.column?ue.target.y1-me.target.y1:me.target.column-ue.target.column:ue.circularLinkType===me.circularLinkType&&ue.circularLinkType=="bottom"?ue.target.column===me.target.column?me.target.y1-ue.target.y1:ue.target.column-me.target.column:ue.circularLinkType=="top"?-1:1:void 0});var ne=Ae.y0;Me.forEach(function(ue){ue.y0=ne+ue.width/2,ne+=ue.width}),Me.forEach(function(ue,me){if(ue.circularLinkType=="bottom"){for(var Te=me+1,Ee=0;Te1&&Ae.sort(function(ne,ue){if(!ne.circular&&!ue.circular){if(ne.source.column==ue.source.column||!fe(ne,ue))return ne.y0-ue.y0;if(ue.source.column0?"up":"down"}function he(pe,ye){return h(pe.source,ye)==h(pe.target,ye)}function de(pe,ye,Re){var we=pe.nodes,Ae=pe.links,Me=!1,Ce=!1;if(Ae.forEach(function(me){me.circularLinkType=="top"?Me=!0:me.circularLinkType=="bottom"&&(Ce=!0)}),Me==0||Ce==0){var ne=(0,_.VV)(we,function(me){return me.y0}),ue=(Re-ye)/((0,_.Fp)(we,function(me){return me.y1})-ne);we.forEach(function(me){var Te=(me.y1-me.y0)*ue;me.y0=(me.y0-ne)*ue,me.y1=me.y0+Te}),Ae.forEach(function(me){me.y0=(me.y0-ne)*ue,me.y1=(me.y1-ne)*ue,me.width=me.width*ue})}}},30838:function(D,E,e){e.r(E),e.d(E,{sankey:function(){return x},sankeyCenter:function(){return l},sankeyJustify:function(){return f},sankeyLeft:function(){return T},sankeyLinkHorizontal:function(){return h},sankeyRight:function(){return m}});var _=e(33064),w=e(15140);function s(M){return M.target.depth}function T(M){return M.depth}function m(M,A){return A-1-M.height}function f(M,A){return M.sourceLinks.length?M.depth:A-1}function l(M){return M.targetLinks.length?M.depth:M.sourceLinks.length?(0,_.VV)(M.sourceLinks,s)-1:0}function t(M){return function(){return M}}function i(M,A){return n(M.source,A.source)||M.index-A.index}function r(M,A){return n(M.target,A.target)||M.index-A.index}function n(M,A){return M.y0-A.y0}function o(M){return M.value}function a(M){return(M.y0+M.y1)/2}function u(M){return a(M.source)*M.value}function p(M){return a(M.target)*M.value}function c(M){return M.index}function b(M){return M.nodes}function d(M){return M.links}function v(M,A){var C=M.get(A);if(!C)throw new Error("missing: "+A);return C}function x(){var M=0,A=0,C=1,L=1,O=24,I=8,R=c,U=f,B=b,G=d,N=32;function j(){var X={nodes:B.apply(null,arguments),links:G.apply(null,arguments)};return V(X),H(X),ee(X),Q(X),Y(X),X}function V(X){X.nodes.forEach(function(te,ae){te.index=ae,te.sourceLinks=[],te.targetLinks=[]});var K=(0,w.UI)(X.nodes,R);X.links.forEach(function(te,ae){te.index=ae;var oe=te.source,se=te.target;typeof oe!="object"&&(oe=te.source=v(K,oe)),typeof se!="object"&&(se=te.target=v(K,se)),oe.sourceLinks.push(te),se.targetLinks.push(te)})}function H(X){X.nodes.forEach(function(K){K.value=Math.max((0,_.Sm)(K.sourceLinks,o),(0,_.Sm)(K.targetLinks,o))})}function ee(X){var K,te,ae;for(K=X.nodes,te=[],ae=0;K.length;++ae,K=te,te=[])K.forEach(function(se){se.depth=ae,se.sourceLinks.forEach(function(fe){te.indexOf(fe.target)<0&&te.push(fe.target)})});for(K=X.nodes,te=[],ae=0;K.length;++ae,K=te,te=[])K.forEach(function(se){se.height=ae,se.targetLinks.forEach(function(fe){te.indexOf(fe.source)<0&&te.push(fe.source)})});var oe=(C-M-O)/(ae-1);X.nodes.forEach(function(se){se.x1=(se.x0=M+Math.max(0,Math.min(ae-1,Math.floor(U.call(null,se,ae))))*oe)+O})}function Q(X){var K=(0,w.b1)().key(function(xe){return xe.x0}).sortKeys(_.j2).entries(X.nodes).map(function(xe){return xe.values});(function(){var xe=(0,_.Fp)(K,function(pe){return pe.length}),he=.6666666666666666*(L-A)/(xe-1);I>he&&(I=he);var de=(0,_.VV)(K,function(pe){return(L-A-(pe.length-1)*I)/(0,_.Sm)(pe,o)});K.forEach(function(pe){pe.forEach(function(ye,Re){ye.y1=(ye.y0=Re)+ye.value*de})}),X.links.forEach(function(pe){pe.width=pe.value*de})})(),fe();for(var te=1,ae=N;ae>0;--ae)se(te*=.99),fe(),oe(te),fe();function oe(xe){K.forEach(function(he){he.forEach(function(de){if(de.targetLinks.length){var pe=((0,_.Sm)(de.targetLinks,u)/(0,_.Sm)(de.targetLinks,o)-a(de))*xe;de.y0+=pe,de.y1+=pe}})})}function se(xe){K.slice().reverse().forEach(function(he){he.forEach(function(de){if(de.sourceLinks.length){var pe=((0,_.Sm)(de.sourceLinks,p)/(0,_.Sm)(de.sourceLinks,o)-a(de))*xe;de.y0+=pe,de.y1+=pe}})})}function fe(){K.forEach(function(xe){var he,de,pe,ye=A,Re=xe.length;for(xe.sort(n),pe=0;pe0&&(he.y0+=de,he.y1+=de),ye=he.y1+I;if((de=ye-I-L)>0)for(ye=he.y0-=de,he.y1-=de,pe=Re-2;pe>=0;--pe)(de=(he=xe[pe]).y1+I-ye)>0&&(he.y0-=de,he.y1-=de),ye=he.y0})}}function Y(X){X.nodes.forEach(function(K){K.sourceLinks.sort(r),K.targetLinks.sort(i)}),X.nodes.forEach(function(K){var te=K.y0,ae=te;K.sourceLinks.forEach(function(oe){oe.y0=te+oe.width/2,te+=oe.width}),K.targetLinks.forEach(function(oe){oe.y1=ae+oe.width/2,ae+=oe.width})})}return j.update=function(X){return Y(X),X},j.nodeId=function(X){return arguments.length?(R=typeof X=="function"?X:t(X),j):R},j.nodeAlign=function(X){return arguments.length?(U=typeof X=="function"?X:t(X),j):U},j.nodeWidth=function(X){return arguments.length?(O=+X,j):O},j.nodePadding=function(X){return arguments.length?(I=+X,j):I},j.nodes=function(X){return arguments.length?(B=typeof X=="function"?X:t(X),j):B},j.links=function(X){return arguments.length?(G=typeof X=="function"?X:t(X),j):G},j.size=function(X){return arguments.length?(M=A=0,C=+X[0],L=+X[1],j):[C-M,L-A]},j.extent=function(X){return arguments.length?(M=+X[0][0],C=+X[1][0],A=+X[0][1],L=+X[1][1],j):[[M,A],[C,L]]},j.iterations=function(X){return arguments.length?(N=+X,j):N},j}var g=e(45879);function y(M){return[M.source.x1,M.y0]}function k(M){return[M.target.x0,M.y1]}function h(){return(0,g.h5)().source(y).target(k)}},39898:function(D,E,e){var _,w;(function(){var s={version:"3.8.0"},T=[].slice,m=function(re){return T.call(re)},f=self.document;function l(re){return re&&(re.ownerDocument||re.document||re).documentElement}function t(re){return re&&(re.ownerDocument&&re.ownerDocument.defaultView||re.document&&re||re.defaultView)}if(f)try{m(f.documentElement.childNodes)[0].nodeType}catch{m=function(ve){for(var Le=ve.length,Fe=new Array(Le);Le--;)Fe[Le]=ve[Le];return Fe}}if(Date.now||(Date.now=function(){return+new Date}),f)try{f.createElement("DIV").style.setProperty("opacity",0,"")}catch{var i=this.Element.prototype,r=i.setAttribute,n=i.setAttributeNS,o=this.CSSStyleDeclaration.prototype,a=o.setProperty;i.setAttribute=function(ve,Le){r.call(this,ve,Le+"")},i.setAttributeNS=function(ve,Le,Fe){n.call(this,ve,Le,Fe+"")},o.setProperty=function(ve,Le,Fe){a.call(this,ve,Le+"",Fe)}}function u(re,ve){return reve?1:re>=ve?0:NaN}function p(re){return re===null?NaN:+re}function c(re){return!isNaN(re)}function b(re){return{left:function(ve,Le,Fe,Ve){for(arguments.length<3&&(Fe=0),arguments.length<4&&(Ve=ve.length);Fe>>1;re(ve[We],Le)<0?Fe=We+1:Ve=We}return Fe},right:function(ve,Le,Fe,Ve){for(arguments.length<3&&(Fe=0),arguments.length<4&&(Ve=ve.length);Fe>>1;re(ve[We],Le)>0?Ve=We:Fe=We+1}return Fe}}}s.ascending=u,s.descending=function(re,ve){return vere?1:ve>=re?0:NaN},s.min=function(re,ve){var Le,Fe,Ve=-1,We=re.length;if(arguments.length===1){for(;++Ve=Fe){Le=Fe;break}for(;++VeFe&&(Le=Fe)}else{for(;++Ve=Fe){Le=Fe;break}for(;++VeFe&&(Le=Fe)}return Le},s.max=function(re,ve){var Le,Fe,Ve=-1,We=re.length;if(arguments.length===1){for(;++Ve=Fe){Le=Fe;break}for(;++VeLe&&(Le=Fe)}else{for(;++Ve=Fe){Le=Fe;break}for(;++VeLe&&(Le=Fe)}return Le},s.extent=function(re,ve){var Le,Fe,Ve,We=-1,$e=re.length;if(arguments.length===1){for(;++We<$e;)if((Fe=re[We])!=null&&Fe>=Fe){Le=Ve=Fe;break}for(;++We<$e;)(Fe=re[We])!=null&&(Le>Fe&&(Le=Fe),Ve=Fe){Le=Ve=Fe;break}for(;++We<$e;)(Fe=ve.call(re,re[We],We))!=null&&(Le>Fe&&(Le=Fe),Ve1)return $e/(lt-1)},s.deviation=function(){var re=s.variance.apply(this,arguments);return re&&Math.sqrt(re)};var d=b(u);function v(re){return re.length}s.bisectLeft=d.left,s.bisect=s.bisectRight=d.right,s.bisector=function(re){return b(re.length===1?function(ve,Le){return u(re(ve),Le)}:re)},s.shuffle=function(re,ve,Le){(We=arguments.length)<3&&(Le=re.length,We<2&&(ve=0));for(var Fe,Ve,We=Le-ve;We;)Ve=Math.random()*We--|0,Fe=re[We+ve],re[We+ve]=re[Ve+ve],re[Ve+ve]=Fe;return re},s.permute=function(re,ve){for(var Le=ve.length,Fe=new Array(Le);Le--;)Fe[Le]=re[ve[Le]];return Fe},s.pairs=function(re){for(var ve=0,Le=re.length-1,Fe=re[0],Ve=new Array(Le<0?0:Le);ve=0;)for(ve=(Fe=re[Ve]).length;--ve>=0;)Le[--$e]=Fe[ve];return Le};var x=Math.abs;function g(re){for(var ve=1;re*ve%1;)ve*=10;return ve}function y(re,ve){for(var Le in ve)Object.defineProperty(re.prototype,Le,{value:ve[Le],enumerable:!1})}function k(){this._=Object.create(null)}function h(re){return(re+="")=="__proto__"||re[0]==="\0"?"\0"+re:re}function M(re){return(re+="")[0]==="\0"?re.slice(1):re}function A(re){return h(re)in this._}function C(re){return(re=h(re))in this._&&delete this._[re]}function L(){var re=[];for(var ve in this._)re.push(M(ve));return re}function O(){var re=0;for(var ve in this._)++re;return re}function I(){for(var re in this._)return!1;return!0}function R(){this._=Object.create(null)}function U(re){return re}function B(re,ve,Le){return function(){var Fe=Le.apply(ve,arguments);return Fe===ve?re:Fe}}function G(re,ve){if(ve in re)return ve;ve=ve.charAt(0).toUpperCase()+ve.slice(1);for(var Le=0,Fe=N.length;Leve;)Ve.push(Fe/We);else for(;(Fe=re+Le*++$e)=Fe.length)return ve?ve.call(Le,lt):re?lt.sort(re):lt;for(var zt,Ut,Vt,Qt,gn=-1,en=lt.length,sn=Fe[gt++],rn=new k;++gn=Fe.length)return tt;var gt=[],zt=Ve[lt++];return tt.forEach(function(Ut,Vt){gt.push({key:Ut,values:$e(Vt,lt)})}),zt?gt.sort(function(Ut,Vt){return zt(Ut.key,Vt.key)}):gt}return Le.map=function(tt,lt){return We(lt,tt,0)},Le.entries=function(tt){return $e(We(s.map,tt,0),0)},Le.key=function(tt){return Fe.push(tt),Le},Le.sortKeys=function(tt){return Ve[Fe.length-1]=tt,Le},Le.sortValues=function(tt){return re=tt,Le},Le.rollup=function(tt){return ve=tt,Le},Le},s.set=function(re){var ve=new R;if(re)for(var Le=0,Fe=re.length;Le=0&&(Fe=re.slice(Le+1),re=re.slice(0,Le)),re)return arguments.length<2?this[re].on(Fe):this[re].on(Fe,ve);if(arguments.length===2){if(ve==null)for(re in this)this.hasOwnProperty(re)&&this[re].on(Fe,null);return this}},s.event=null,s.requote=function(re){return re.replace(X,"\\$&")};var X=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,K={}.__proto__?function(re,ve){re.__proto__=ve}:function(re,ve){for(var Le in ve)re[Le]=ve[Le]};function te(re){return K(re,fe),re}var ae=function(re,ve){return ve.querySelector(re)},oe=function(re,ve){return ve.querySelectorAll(re)},se=function(re,ve){var Le=re.matches||re[G(re,"matchesSelector")];return se=function(Fe,Ve){return Le.call(Fe,Ve)},se(re,ve)};typeof Sizzle=="function"&&(ae=function(re,ve){return Sizzle(re,ve)[0]||null},oe=Sizzle,se=Sizzle.matchesSelector),s.selection=function(){return s.select(f.documentElement)};var fe=s.selection.prototype=[];function xe(re){return typeof re=="function"?re:function(){return ae(re,this)}}function he(re){return typeof re=="function"?re:function(){return oe(re,this)}}fe.select=function(re){var ve,Le,Fe,Ve,We=[];re=xe(re);for(var $e=-1,tt=this.length;++$e=0&&(Le=re.slice(0,ve))!=="xmlns"&&(re=re.slice(ve+1)),pe.hasOwnProperty(Le)?{space:pe[Le],local:re}:re}},fe.attr=function(re,ve){if(arguments.length<2){if(typeof re=="string"){var Le=this.node();return(re=s.ns.qualify(re)).local?Le.getAttributeNS(re.space,re.local):Le.getAttribute(re)}for(ve in re)this.each(ye(ve,re[ve]));return this}return this.each(ye(re,ve))},fe.classed=function(re,ve){if(arguments.length<2){if(typeof re=="string"){var Le=this.node(),Fe=(re=Ae(re)).length,Ve=-1;if(ve=Le.classList){for(;++Ve=0;)(Le=Fe[Ve])&&(We&&We!==Le.nextSibling&&We.parentNode.insertBefore(Le,We),We=Le);return this},fe.sort=function(re){re=De.apply(this,arguments);for(var ve=-1,Le=this.length;++ve=ve&&(ve=Ve+1);!($e=tt[ve])&&++ve0&&(re=re.slice(0,Ve));var $e=Ye.get(re);function tt(){var lt=this[Fe];lt&&(this.removeEventListener(re,lt,lt.$),delete this[Fe])}return $e&&(re=$e,We=st),Ve?ve?function(){var lt=We(ve,m(arguments));tt.call(this),this.addEventListener(re,this[Fe]=lt,lt.$=Le),lt._=ve}:tt:ve?j:function(){var lt,gt=new RegExp("^__on([^.]+)"+s.requote(re)+"$");for(var zt in this)if(lt=zt.match(gt)){var Ut=this[zt];this.removeEventListener(lt[1],Ut,Ut.$),delete this[zt]}}}s.selection.enter=ge,s.selection.enter.prototype=be,be.append=fe.append,be.empty=fe.empty,be.node=fe.node,be.call=fe.call,be.size=fe.size,be.select=function(re){for(var ve,Le,Fe,Ve,We,$e=[],tt=-1,lt=this.length;++tt1?Nt:re<-1?-Nt:Math.asin(re)}function nt(re){return((re=Math.exp(re))+1/re)/2}var ht=Math.SQRT2;s.interpolateZoom=function(re,ve){var Le,Fe,Ve=re[0],We=re[1],$e=re[2],tt=ve[0],lt=ve[1],gt=ve[2],zt=tt-Ve,Ut=lt-We,Vt=zt*zt+Ut*Ut;if(Vt<1e-12)Fe=Math.log(gt/$e)/ht,Le=function(Mn){return[Ve+Mn*zt,We+Mn*Ut,$e*Math.exp(ht*Mn*Fe)]};else{var Qt=Math.sqrt(Vt),gn=(gt*gt-$e*$e+4*Vt)/(2*$e*2*Qt),en=(gt*gt-$e*$e-4*Vt)/(2*gt*2*Qt),sn=Math.log(Math.sqrt(gn*gn+1)-gn),rn=Math.log(Math.sqrt(en*en+1)-en);Fe=(rn-sn)/ht,Le=function(Mn){var xn,an=Mn*Fe,zn=nt(sn),Vn=$e/(2*Qt)*(zn*(xn=ht*an+sn,((xn=Math.exp(2*xn))-1)/(xn+1))-function(nr){return((nr=Math.exp(nr))-1/nr)/2}(sn));return[Ve+Vn*zt,We+Vn*Ut,$e*zn/nt(ht*an+sn)]}}return Le.duration=1e3*Fe,Le},s.behavior.zoom=function(){var re,ve,Le,Fe,Ve,We,$e,tt,lt,gt={x:0,y:0,k:1},zt=[960,500],Ut=Qe,Vt=250,Qt=0,gn="mousedown.zoom",en="mousemove.zoom",sn="mouseup.zoom",rn="touchstart.zoom",Mn=Y(xn,"zoomstart","zoom","zoomend");function xn(xr){xr.on(gn,wr).on(Be+".zoom",Jr).on("dblclick.zoom",Kr).on(rn,Rr)}function an(xr){return[(xr[0]-gt.x)/gt.k,(xr[1]-gt.y)/gt.k]}function zn(xr){gt.k=Math.max(Ut[0],Math.min(Ut[1],xr))}function Vn(xr,zr){zr=function(Wr){return[Wr[0]*gt.k+gt.x,Wr[1]*gt.k+gt.y]}(zr),gt.x+=xr[0]-zr[0],gt.y+=xr[1]-zr[1]}function nr(xr,zr,Wr,Gr){xr.__chart__={x:gt.x,y:gt.y,k:gt.k},zn(Math.pow(2,Gr)),Vn(ve=zr,Wr),xr=s.select(xr),Vt>0&&(xr=xr.transition().duration(Vt)),xr.call(xn.event)}function rr(){$e&&$e.domain(We.range().map(function(xr){return(xr-gt.x)/gt.k}).map(We.invert)),lt&<.domain(tt.range().map(function(xr){return(xr-gt.y)/gt.k}).map(tt.invert))}function Tr(xr){Qt++||xr({type:"zoomstart"})}function Ar(xr){rr(),xr({type:"zoom",scale:gt.k,translate:[gt.x,gt.y]})}function mr(xr){--Qt||(xr({type:"zoomend"}),ve=null)}function wr(){var xr=this,zr=Mn.of(xr,arguments),Wr=0,Gr=s.select(t(xr)).on(en,ui).on(sn,ki),ii=an(s.mouse(xr)),ti=yt(xr);function ui(){Wr=1,Vn(s.mouse(xr),ii),Ar(zr)}function ki(){Gr.on(en,null).on(sn,null),ti(Wr),mr(zr)}Si.call(xr),Tr(zr)}function Rr(){var xr,zr=this,Wr=Mn.of(zr,arguments),Gr={},ii=0,ti=".zoom-"+s.event.changedTouches[0].identifier,ui="touchmove"+ti,ki="touchend"+ti,Ii=[],Ei=s.select(zr),wi=yt(zr);function Ai(){var ta=s.touches(zr);return xr=gt.k,ta.forEach(function(Yr){Yr.identifier in Gr&&(Gr[Yr.identifier]=an(Yr))}),ta}function Ci(){var ta=s.event.target;s.select(ta).on(ui,qi).on(ki,_s),Ii.push(ta);for(var Yr=s.event.changedTouches,pa=0,wa=Yr.length;pa1){ai=Ui[0];var na=Ui[1],Ba=ai[0]-na[0],Kl=ai[1]-na[1];ii=Ba*Ba+Kl*Kl}}function qi(){var ta,Yr,pa,wa,Ui=s.touches(zr);Si.call(zr);for(var ko=0,ai=Ui.length;ko360?tt-=360:tt<0&&(tt+=360),tt<60?Fe+(Ve-Fe)*tt/60:tt<180?Ve:tt<240?Fe+(Ve-Fe)*(240-tt)/60:Fe}($e))}return re=isNaN(re)?0:(re%=360)<0?re+360:re,ve=isNaN(ve)||ve<0?0:ve>1?1:ve,Fe=2*(Le=Le<0?0:Le>1?1:Le)-(Ve=Le<=.5?Le*(1+ve):Le+ve-Le*ve),new kn(We(re+120),We(re),We(re-120))}function Ct(re,ve,Le){return this instanceof Ct?(this.h=+re,this.c=+ve,void(this.l=+Le)):arguments.length<2?re instanceof Ct?new Ct(re.h,re.c,re.l):Kt(re instanceof _t?re.l:(re=In((re=s.rgb(re)).r,re.g,re.b)).l,re.a,re.b):new Ct(re,ve,Le)}bt.brighter=function(re){return re=Math.pow(.7,arguments.length?re:1),new pt(this.h,this.s,this.l/re)},bt.darker=function(re){return re=Math.pow(.7,arguments.length?re:1),new pt(this.h,this.s,re*this.l)},bt.rgb=function(){return Lt(this.h,this.s,this.l)},s.hcl=Ct;var mt=Ct.prototype=new ut;function Ot(re,ve,Le){return isNaN(re)&&(re=0),isNaN(ve)&&(ve=0),new _t(Le,Math.cos(re*=Je)*ve,Math.sin(re)*ve)}function _t(re,ve,Le){return this instanceof _t?(this.l=+re,this.a=+ve,void(this.b=+Le)):arguments.length<2?re instanceof _t?new _t(re.l,re.a,re.b):re instanceof Ct?Ot(re.h,re.c,re.l):In((re=kn(re)).r,re.g,re.b):new _t(re,ve,Le)}mt.brighter=function(re){return new Ct(this.h,this.c,Math.min(100,this.l+Pt*(arguments.length?re:1)))},mt.darker=function(re){return new Ct(this.h,this.c,Math.max(0,this.l-Pt*(arguments.length?re:1)))},mt.rgb=function(){return Ot(this.h,this.c,this.l).rgb()},s.lab=_t;var Pt=18,Bt=.95047,Wt=1.08883,Gt=_t.prototype=new ut;function Xt(re,ve,Le){var Fe=(re+16)/116,Ve=Fe+ve/500,We=Fe-Le/200;return new kn(ln(3.2404542*(Ve=nn(Ve)*Bt)-1.5371385*(Fe=1*nn(Fe))-.4985314*(We=nn(We)*Wt)),ln(-.969266*Ve+1.8760108*Fe+.041556*We),ln(.0556434*Ve-.2040259*Fe+1.0572252*We))}function Kt(re,ve,Le){return re>0?new Ct(Math.atan2(Le,ve)*Ke,Math.sqrt(ve*ve+Le*Le),re):new Ct(NaN,NaN,re)}function nn(re){return re>.206893034?re*re*re:(re-.13793103448275862)/7.787037}function yn(re){return re>.008856?Math.pow(re,.3333333333333333):7.787037*re+.13793103448275862}function ln(re){return Math.round(255*(re<=.00304?12.92*re:1.055*Math.pow(re,.4166666666666667)-.055))}function kn(re,ve,Le){return this instanceof kn?(this.r=~~re,this.g=~~ve,void(this.b=~~Le)):arguments.length<2?re instanceof kn?new kn(re.r,re.g,re.b):fn(""+re,kn,Lt):new kn(re,ve,Le)}function Wn(re){return new kn(re>>16,re>>8&255,255&re)}function wn(re){return Wn(re)+""}Gt.brighter=function(re){return new _t(Math.min(100,this.l+Pt*(arguments.length?re:1)),this.a,this.b)},Gt.darker=function(re){return new _t(Math.max(0,this.l-Pt*(arguments.length?re:1)),this.a,this.b)},Gt.rgb=function(){return Xt(this.l,this.a,this.b)},s.rgb=kn;var on=kn.prototype=new ut;function _n(re){return re<16?"0"+Math.max(0,re).toString(16):Math.min(255,re).toString(16)}function fn(re,ve,Le){var Fe,Ve,We,$e=0,tt=0,lt=0;if(Fe=/([a-z]+)\((.*)\)/.exec(re=re.toLowerCase()))switch(Ve=Fe[2].split(","),Fe[1]){case"hsl":return Le(parseFloat(Ve[0]),parseFloat(Ve[1])/100,parseFloat(Ve[2])/100);case"rgb":return ve(Nn(Ve[0]),Nn(Ve[1]),Nn(Ve[2]))}return(We=Hn.get(re))?ve(We.r,We.g,We.b):(re==null||re.charAt(0)!=="#"||isNaN(We=parseInt(re.slice(1),16))||(re.length===4?($e=(3840&We)>>4,$e|=$e>>4,tt=240&We,tt|=tt>>4,lt=15&We,lt|=lt<<4):re.length===7&&($e=(16711680&We)>>16,tt=(65280&We)>>8,lt=255&We)),ve($e,tt,lt))}function hn(re,ve,Le){var Fe,Ve,We=Math.min(re/=255,ve/=255,Le/=255),$e=Math.max(re,ve,Le),tt=$e-We,lt=($e+We)/2;return tt?(Ve=lt<.5?tt/($e+We):tt/(2-$e-We),Fe=re==$e?(ve-Le)/tt+(ve0&<<1?0:Fe),new pt(Fe,Ve,lt)}function In(re,ve,Le){var Fe=yn((.4124564*(re=Cn(re))+.3575761*(ve=Cn(ve))+.1804375*(Le=Cn(Le)))/Bt),Ve=yn((.2126729*re+.7151522*ve+.072175*Le)/1);return _t(116*Ve-16,500*(Fe-Ve),200*(Ve-yn((.0193339*re+.119192*ve+.9503041*Le)/Wt)))}function Cn(re){return(re/=255)<=.04045?re/12.92:Math.pow((re+.055)/1.055,2.4)}function Nn(re){var ve=parseFloat(re);return re.charAt(re.length-1)==="%"?Math.round(2.55*ve):ve}on.brighter=function(re){re=Math.pow(.7,arguments.length?re:1);var ve=this.r,Le=this.g,Fe=this.b,Ve=30;return ve||Le||Fe?(ve&&ve=200&&Ut<300||Ut===304){try{zt=Le.call(Ve,tt)}catch(Vt){return void We.error.call(Ve,Vt)}We.load.call(Ve,zt)}else We.error.call(Ve,tt)}return self.XDomainRequest&&!("withCredentials"in tt)&&/^(http(s)?:)?\/\//.test(re)&&(tt=new XDomainRequest),"onload"in tt?tt.onload=tt.onerror=gt:tt.onreadystatechange=function(){tt.readyState>3&>()},tt.onprogress=function(zt){var Ut=s.event;s.event=zt;try{We.progress.call(Ve,tt)}finally{s.event=Ut}},Ve.header=function(zt,Ut){return zt=(zt+"").toLowerCase(),arguments.length<2?$e[zt]:(Ut==null?delete $e[zt]:$e[zt]=Ut+"",Ve)},Ve.mimeType=function(zt){return arguments.length?(ve=zt==null?null:zt+"",Ve):ve},Ve.responseType=function(zt){return arguments.length?(lt=zt,Ve):lt},Ve.response=function(zt){return Le=zt,Ve},["get","post"].forEach(function(zt){Ve[zt]=function(){return Ve.send.apply(Ve,[zt].concat(m(arguments)))}}),Ve.send=function(zt,Ut,Vt){if(arguments.length===2&&typeof Ut=="function"&&(Vt=Ut,Ut=null),tt.open(zt,re,!0),ve==null||"accept"in $e||($e.accept=ve+",*/*"),tt.setRequestHeader)for(var Qt in $e)tt.setRequestHeader(Qt,$e[Qt]);return ve!=null&&tt.overrideMimeType&&tt.overrideMimeType(ve),lt!=null&&(tt.responseType=lt),Vt!=null&&Ve.on("error",Vt).on("load",function(gn){Vt(null,gn)}),We.beforesend.call(Ve,tt),tt.send(Ut??null),Ve},Ve.abort=function(){return tt.abort(),Ve},s.rebind(Ve,We,"on"),Fe==null?Ve:Ve.get(function(zt){return zt.length===1?function(Ut,Vt){zt(Ut==null?Vt:null)}:zt}(Fe))}Hn.forEach(function(re,ve){Hn.set(re,Wn(ve))}),s.functor=qn,s.xhr=or(U),s.dsv=function(re,ve){var Le=new RegExp('["'+re+` ]`),Fe=re.charCodeAt(0);function Ve(gt,zt,Ut){arguments.length<3&&(Ut=zt,zt=null);var Vt=tr(gt,ve,zt==null?We:$e(zt),Ut);return Vt.row=function(Qt){return arguments.length?Vt.response((zt=Qt)==null?We:$e(Qt)):zt},Vt}function We(gt){return Ve.parse(gt.responseText)}function $e(gt){return function(zt){return Ve.parse(zt.responseText,gt)}}function tt(gt){return gt.map(lt).join(re)}function lt(gt){return Le.test(gt)?'"'+gt.replace(/\"/g,'""')+'"':gt}return Ve.parse=function(gt,zt){var Ut;return Ve.parseRows(gt,function(Vt,Qt){if(Ut)return Ut(Vt,Qt-1);var gn=function(en){for(var sn={},rn=Vt.length,Mn=0;Mn=sn)return gn;if(Vt)return Vt=!1,Qt;var zn=rn;if(gt.charCodeAt(zn)===34){for(var Vn=zn;Vn++24?(isFinite(ve)&&(clearTimeout(dr),dr=setTimeout(mn,ve)),ir=0):(ir=1,yr(mn))}function Ln(){for(var re=Date.now(),ve=kr;ve;)re>=ve.t&&ve.c(re-ve.t)&&(ve.c=null),ve=ve.n;return re}function En(){for(var re,ve=kr,Le=1/0;ve;)ve.c?(ve.t1&&(ve=re[We[$e-2]],Le=re[We[$e-1]],Fe=re[tt],(Le[0]-ve[0])*(Fe[1]-ve[1])-(Le[1]-ve[1])*(Fe[0]-ve[0])<=0);)--$e;We[$e++]=tt}return We.slice(0,$e)}function Qn(re,ve){return re[0]-ve[0]||re[1]-ve[1]}s.timer=function(){$t.apply(this,arguments)},s.timer.flush=function(){Ln(),En()},s.round=function(re,ve){return ve?Math.round(re*(ve=Math.pow(10,ve)))/ve:Math.round(re)},s.geom={},s.geom.hull=function(re){var ve=jn,Le=$n;if(arguments.length)return Fe(re);function Fe(Ve){if(Ve.length<3)return[];var We,$e=qn(ve),tt=qn(Le),lt=Ve.length,gt=[],zt=[];for(We=0;We=0;--We)en.push(Ve[gt[Ut[We]][2]]);for(We=+Qt;WeDt)tt=tt.L;else{if(!((Ve=We-Jn(tt,$e))>Dt)){Fe>-Dt?(ve=tt.P,Le=tt):Ve>-Dt?(ve=tt,Le=tt.N):ve=Le=tt;break}if(!tt.R){ve=tt;break}tt=tt.R}var lt=vn(re);if(Rn.insert(ve,lt),ve||Le){if(ve===Le)return vr(ve),Le=vn(ve.site),Rn.insert(lt,Le),lt.edge=Le.edge=Lr(ve.site,lt.site),cr(ve),void cr(Le);if(Le){vr(ve),vr(Le);var gt=ve.site,zt=gt.x,Ut=gt.y,Vt=re.x-zt,Qt=re.y-Ut,gn=Le.site,en=gn.x-zt,sn=gn.y-Ut,rn=2*(Vt*sn-Qt*en),Mn=Vt*Vt+Qt*Qt,xn=en*en+sn*sn,an={x:(sn*Mn-Qt*xn)/rn+zt,y:(Vt*xn-en*Mn)/rn+Ut};pr(Le.edge,gt,gn,an),lt.edge=Lr(gt,re,null,an),Le.edge=Lr(re,gn,null,an),cr(ve),cr(Le)}else lt.edge=Lr(ve.site,lt.site)}}function er(re,ve){var Le=re.site,Fe=Le.x,Ve=Le.y,We=Ve-ve;if(!We)return Fe;var $e=re.P;if(!$e)return-1/0;var tt=(Le=$e.site).x,lt=Le.y,gt=lt-ve;if(!gt)return tt;var zt=tt-Fe,Ut=1/We-1/gt,Vt=zt/gt;return Ut?(-Vt+Math.sqrt(Vt*Vt-2*Ut*(zt*zt/(-2*gt)-lt+gt/2+Ve-We/2)))/Ut+Fe:(Fe+tt)/2}function Jn(re,ve){var Le=re.N;if(Le)return er(Le,ve);var Fe=re.site;return Fe.y===ve?Fe.x:1/0}function lr(re){this.site=re,this.edges=[]}function sr(re,ve){return ve.angle-re.angle}function fr(){ci(this),this.x=this.y=this.arc=this.site=this.cy=null}function cr(re){var ve=re.P,Le=re.N;if(ve&&Le){var Fe=ve.site,Ve=re.site,We=Le.site;if(Fe!==We){var $e=Ve.x,tt=Ve.y,lt=Fe.x-$e,gt=Fe.y-tt,zt=We.x-$e,Ut=2*(lt*(sn=We.y-tt)-gt*zt);if(!(Ut>=-1e-12)){var Vt=lt*lt+gt*gt,Qt=zt*zt+sn*sn,gn=(sn*Vt-gt*Qt)/Ut,en=(lt*Qt-zt*Vt)/Ut,sn=en+tt,rn=bn.pop()||new fr;rn.arc=re,rn.site=Ve,rn.x=gn+$e,rn.y=sn+Math.sqrt(gn*gn+en*en),rn.cy=sn,re.circle=rn;for(var Mn=null,xn=Sn._;xn;)if(rn.y=tt)return;if(Vt>gn){if(We){if(We.y>=gt)return}else We={x:sn,y:lt};Le={x:sn,y:gt}}else{if(We){if(We.y1)if(Vt>gn){if(We){if(We.y>=gt)return}else We={x:(lt-Ve)/Fe,y:lt};Le={x:(gt-Ve)/Fe,y:gt}}else{if(We){if(We.y=tt)return}else We={x:$e,y:Fe*$e+Ve};Le={x:tt,y:Fe*tt+Ve}}else{if(We){if(We.x<$e)return}else We={x:tt,y:Fe*tt+Ve};Le={x:$e,y:Fe*$e+Ve}}return re.a=We,re.b=Le,!0}function Mr(re,ve){this.l=re,this.r=ve,this.a=this.b=null}function Lr(re,ve,Le,Fe){var Ve=new Mr(re,ve);return Jt.push(Ve),Le&&pr(Ve,re,ve,Le),Fe&&pr(Ve,ve,re,Fe),un[re.i].edges.push(new Pr(Ve,re,ve)),un[ve.i].edges.push(new Pr(Ve,ve,re)),Ve}function pr(re,ve,Le,Fe){re.a||re.b?re.l===Le?re.b=Fe:re.a=Fe:(re.a=Fe,re.l=ve,re.r=Le)}function Pr(re,ve,Le){var Fe=re.a,Ve=re.b;this.edge=re,this.site=ve,this.angle=Le?Math.atan2(Le.y-ve.y,Le.x-ve.x):re.l===ve?Math.atan2(Ve.x-Fe.x,Fe.y-Ve.y):Math.atan2(Fe.x-Ve.x,Ve.y-Fe.y)}function Hr(){this._=null}function ci(re){re.U=re.C=re.L=re.R=re.P=re.N=null}function Ti(re,ve){var Le=ve,Fe=ve.R,Ve=Le.U;Ve?Ve.L===Le?Ve.L=Fe:Ve.R=Fe:re._=Fe,Fe.U=Ve,Le.U=Fe,Le.R=Fe.L,Le.R&&(Le.R.U=Le),Fe.L=Le}function Mi(re,ve){var Le=ve,Fe=ve.L,Ve=Le.U;Ve?Ve.L===Le?Ve.L=Fe:Ve.R=Fe:re._=Fe,Fe.U=Ve,Le.U=Fe,Le.L=Fe.R,Le.L&&(Le.L.U=Le),Fe.R=Le}function fa(re){for(;re.L;)re=re.L;return re}function Hi(re,ve){var Le,Fe,Ve,We=re.sort(xi).pop();for(Jt=[],un=new Array(re.length),Rn=new Hr,Sn=new Hr;;)if(Ve=On,We&&(!Ve||We.y0)){if(rn/=rr,rr<0){if(rn0){if(rn>nr)return;rn>Vn&&(Vn=rn)}if(rn=Ut-an,rr||!(rn<0)){if(rn/=rr,rr<0){if(rn>nr)return;rn>Vn&&(Vn=rn)}else if(rr>0){if(rn0)){if(rn/=Tr,Tr<0){if(rn0){if(rn>nr)return;rn>Vn&&(Vn=rn)}if(rn=Vt-zn,Tr||!(rn<0)){if(rn/=Tr,Tr<0){if(rn>nr)return;rn>Vn&&(Vn=rn)}else if(Tr>0){if(rn0&&(sn.a={x:an+Vn*rr,y:zn+Vn*Tr}),nr<1&&(sn.b={x:an+nr*rr,y:zn+nr*Tr}),sn}}}}}),en=Qt.length;en--;)(!Sr(lt=Qt[en],tt)||!gn(lt)||x(lt.a.x-lt.b.x)Dt||x(Ut-gt)>Dt)&&(gn.splice(Qt,0,new Pr((rr=Vt.site,Tr=rn,Ar=x(zt-Mn)Dt?{x:Mn,y:x(lt-Mn)Dt?{x:x(gt-zn)Dt?{x:xn,y:x(lt-xn)Dt?{x:x(gt-an)=zt&&rn.x<=Vt&&rn.y>=Ut&&rn.y<=Qt?[[zt,Qt],[Vt,Qt],[Vt,Ut],[zt,Ut]]:[]).point=lt[en]}),gt}function tt(lt){return lt.map(function(gt,zt){return{x:Math.round(Fe(gt,zt)/Dt)*Dt,y:Math.round(Ve(gt,zt)/Dt)*Dt,i:zt}})}return $e.links=function(lt){return Hi(tt(lt)).edges.filter(function(gt){return gt.l&>.r}).map(function(gt){return{source:lt[gt.l.i],target:lt[gt.r.i]}})},$e.triangles=function(lt){var gt=[];return Hi(tt(lt)).cells.forEach(function(zt,Ut){for(var Vt,Qt,gn,en,sn=zt.site,rn=zt.edges.sort(sr),Mn=-1,xn=rn.length,an=rn[xn-1].edge,zn=an.l===sn?an.r:an.l;++MnWe||Vt>$e||Qt=Vn)<<1|ve>=zn,rr=nr+4;nrWe&&(Ve=ve.slice(We,Ve),tt[$e]?tt[$e]+=Ve:tt[++$e]=Ve),(Le=Le[0])===(Fe=Fe[0])?tt[$e]?tt[$e]+=Fe:tt[++$e]=Fe:(tt[++$e]=null,lt.push({i:$e,x:Qa(Le,Fe)})),We=yl.lastIndex;return Wern&&(rn=zt.x),zt.y>Mn&&(Mn=zt.y),Ut.push(zt.x),Vt.push(zt.y);else for(Qt=0;Qtrn&&(rn=zn),Vn>Mn&&(Mn=Vn),Ut.push(zn),Vt.push(Vn)}var nr=rn-en,rr=Mn-sn;function Tr(wr,Rr,Jr,Kr,xr,zr,Wr,Gr){if(!isNaN(Jr)&&!isNaN(Kr))if(wr.leaf){var ii=wr.x,ti=wr.y;if(ii!=null)if(x(ii-Jr)+x(ti-Kr)<.01)Ar(wr,Rr,Jr,Kr,xr,zr,Wr,Gr);else{var ui=wr.point;wr.x=wr.y=wr.point=null,Ar(wr,ui,ii,ti,xr,zr,Wr,Gr),Ar(wr,Rr,Jr,Kr,xr,zr,Wr,Gr)}else wr.x=Jr,wr.y=Kr,wr.point=Rr}else Ar(wr,Rr,Jr,Kr,xr,zr,Wr,Gr)}function Ar(wr,Rr,Jr,Kr,xr,zr,Wr,Gr){var ii=.5*(xr+Wr),ti=.5*(zr+Gr),ui=Jr>=ii,ki=Kr>=ti,Ii=ki<<1|ui;wr.leaf=!1,ui?xr=ii:Wr=ii,ki?zr=ti:Gr=ti,Tr(wr=wr.nodes[Ii]||(wr.nodes[Ii]={leaf:!0,nodes:[],point:null,x:null,y:null}),Rr,Jr,Kr,xr,zr,Wr,Gr)}nr>rr?Mn=sn+nr:rn=en+rr;var mr={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(wr){Tr(mr,wr,+xn(wr,++Qt),+an(wr,Qt),en,sn,rn,Mn)},visit:function(wr){Xs(wr,mr,en,sn,rn,Mn)},find:function(wr){return Uu(mr,wr[0],wr[1],en,sn,rn,Mn)}};if(Qt=-1,ve==null){for(;++Qt=0&&!(Le=s.interpolators[Fe](re,ve)););return Le}function eo(re,ve){var Le,Fe=[],Ve=[],We=re.length,$e=ve.length,tt=Math.min(re.length,ve.length);for(Le=0;Le=1?1:re(ve)}}function bo(re){return function(ve){return 1-re(1-ve)}}function Ro(re){return function(ve){return .5*(ve<.5?re(2*ve):2-re(2-2*ve))}}function xl(re){return re*re}function Vu(re){return re*re*re}function Xo(re){if(re<=0)return 0;if(re>=1)return 1;var ve=re*re,Le=ve*re;return 4*(re<.5?Le:3*(re-ve)+Le-.75)}function Hu(re){return 1-Math.cos(re*Nt)}function qu(re){return Math.pow(2,10*(re-1))}function Ec(re){return 1-Math.sqrt(1-re*re)}function gu(re){return re<.36363636363636365?7.5625*re*re:re<.7272727272727273?7.5625*(re-=.5454545454545454)*re+.75:re<.9090909090909091?7.5625*(re-=.8181818181818182)*re+.9375:7.5625*(re-=.9545454545454546)*re+.984375}function Gu(re,ve){return ve-=re,function(Le){return Math.round(re+ve*Le)}}function vu(re){var ve,Le,Fe,Ve=[re.a,re.b],We=[re.c,re.d],$e=Jo(Ve),tt=$o(Ve,We),lt=Jo(((ve=We)[0]+=(Fe=-tt)*(Le=Ve)[0],ve[1]+=Fe*Le[1],ve))||0;Ve[0]*We[1]=0?re.slice(0,ve):re,Fe=ve>=0?re.slice(ve+1):"in";return Le=fi.get(Le)||fs,ao((Fe=hs.get(Fe)||U)(Le.apply(null,T.call(arguments,1))))},s.interpolateHcl=function(re,ve){re=s.hcl(re),ve=s.hcl(ve);var Le=re.h,Fe=re.c,Ve=re.l,We=ve.h-Le,$e=ve.c-Fe,tt=ve.l-Ve;return isNaN($e)&&($e=0,Fe=isNaN(Fe)?ve.c:Fe),isNaN(We)?(We=0,Le=isNaN(Le)?ve.h:Le):We>180?We-=360:We<-180&&(We+=360),function(lt){return Ot(Le+We*lt,Fe+$e*lt,Ve+tt*lt)+""}},s.interpolateHsl=function(re,ve){re=s.hsl(re),ve=s.hsl(ve);var Le=re.h,Fe=re.s,Ve=re.l,We=ve.h-Le,$e=ve.s-Fe,tt=ve.l-Ve;return isNaN($e)&&($e=0,Fe=isNaN(Fe)?ve.s:Fe),isNaN(We)?(We=0,Le=isNaN(Le)?ve.h:Le):We>180?We-=360:We<-180&&(We+=360),function(lt){return Lt(Le+We*lt,Fe+$e*lt,Ve+tt*lt)+""}},s.interpolateLab=function(re,ve){re=s.lab(re),ve=s.lab(ve);var Le=re.l,Fe=re.a,Ve=re.b,We=ve.l-Le,$e=ve.a-Fe,tt=ve.b-Ve;return function(lt){return Xt(Le+We*lt,Fe+$e*lt,Ve+tt*lt)+""}},s.interpolateRound=Gu,s.transform=function(re){var ve=f.createElementNS(s.ns.prefix.svg,"g");return(s.transform=function(Le){if(Le!=null){ve.setAttribute("transform",Le);var Fe=ve.transform.baseVal.consolidate()}return new vu(Fe?Fe.matrix:Js)})(re)},vu.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Js={a:1,b:0,c:0,d:1,e:0,f:0};function Ko(re){return re.length?re.pop()+",":""}function mu(re,ve){var Le=[],Fe=[];return re=s.transform(re),ve=s.transform(ve),function(Ve,We,$e,tt){if(Ve[0]!==We[0]||Ve[1]!==We[1]){var lt=$e.push("translate(",null,",",null,")");tt.push({i:lt-4,x:Qa(Ve[0],We[0])},{i:lt-2,x:Qa(Ve[1],We[1])})}else(We[0]||We[1])&&$e.push("translate("+We+")")}(re.translate,ve.translate,Le,Fe),function(Ve,We,$e,tt){Ve!==We?(Ve-We>180?We+=360:We-Ve>180&&(Ve+=360),tt.push({i:$e.push(Ko($e)+"rotate(",null,")")-2,x:Qa(Ve,We)})):We&&$e.push(Ko($e)+"rotate("+We+")")}(re.rotate,ve.rotate,Le,Fe),function(Ve,We,$e,tt){Ve!==We?tt.push({i:$e.push(Ko($e)+"skewX(",null,")")-2,x:Qa(Ve,We)}):We&&$e.push(Ko($e)+"skewX("+We+")")}(re.skew,ve.skew,Le,Fe),function(Ve,We,$e,tt){if(Ve[0]!==We[0]||Ve[1]!==We[1]){var lt=$e.push(Ko($e)+"scale(",null,",",null,")");tt.push({i:lt-4,x:Qa(Ve[0],We[0])},{i:lt-2,x:Qa(Ve[1],We[1])})}else We[0]===1&&We[1]===1||$e.push(Ko($e)+"scale("+We+")")}(re.scale,ve.scale,Le,Fe),re=ve=null,function(Ve){for(var We,$e=-1,tt=Fe.length;++$e0?Le=an:(re.c=null,re.t=NaN,re=null,tt.end({type:"end",alpha:Le=0})):an>0&&(tt.start({type:"start",alpha:Le=an}),re=$t($e.tick)),$e):Le},$e.start=function(){var an,zn,Vn,nr=sn.length,rr=rn.length,Tr=lt[0],Ar=lt[1];for(an=0;an=0;)Le.push(Ve[Fe])}function oo(re,ve){for(var Le=[re],Fe=[];(re=Le.pop())!=null;)if(Fe.push(re),(We=re.children)&&(Ve=We.length))for(var Ve,We,$e=-1;++$e=0;)$e.push(zt=gt[lt]),zt.parent=We,zt.depth=We.depth+1;Le&&(We.value=0),We.children=gt}else Le&&(We.value=+Le.call(Fe,We,We.depth)||0),delete We.children;return oo(Ve,function(Ut){var Vt,Qt;re&&(Vt=Ut.children)&&Vt.sort(re),Le&&(Qt=Ut.parent)&&(Qt.value+=Ut.value)}),tt}return Fe.sort=function(Ve){return arguments.length?(re=Ve,Fe):re},Fe.children=function(Ve){return arguments.length?(ve=Ve,Fe):ve},Fe.value=function(Ve){return arguments.length?(Le=Ve,Fe):Le},Fe.revalue=function(Ve){return Le&&(Qs(Ve,function(We){We.children&&(We.value=0)}),oo(Ve,function(We){var $e;We.children||(We.value=+Le.call(Fe,We,We.depth)||0),($e=We.parent)&&($e.value+=We.value)})),Ve},Fe},s.layout.partition=function(){var re=s.layout.hierarchy(),ve=[1,1];function Le(We,$e,tt,lt){var gt=We.children;if(We.x=$e,We.y=We.depth*lt,We.dx=tt,We.dy=lt,gt&&(zt=gt.length)){var zt,Ut,Vt,Qt=-1;for(tt=We.value?tt/We.value:0;++Qttt&&(tt=Fe),$e.push(Fe)}for(Le=0;LeVe&&(Fe=Le,Ve=ve);return Fe}function gs(re){return re.reduce(ql,0)}function ql(re,ve){return re+ve[1]}function Sl(re,ve){return _u(re,Math.ceil(Math.log(ve.length)/Math.LN2+1))}function _u(re,ve){for(var Le=-1,Fe=+re[0],Ve=(re[1]-Fe)/ve,We=[];++Le<=ve;)We[Le]=Ve*Le+Fe;return We}function El(re){return[s.min(re),s.max(re)]}function nl(re,ve){return re.value-ve.value}function zs(re,ve){var Le=re._pack_next;re._pack_next=ve,ve._pack_prev=re,ve._pack_next=Le,Le._pack_prev=ve}function Ds(re,ve){re._pack_next=ve,ve._pack_prev=re}function bi(re,ve){var Le=ve.x-re.x,Fe=ve.y-re.y,Ve=re.r+ve.r;return .999*Ve*Ve>Le*Le+Fe*Fe}function vs(re){if((ve=re.children)&&(lt=ve.length)){var ve,Le,Fe,Ve,We,$e,tt,lt,gt=1/0,zt=-1/0,Ut=1/0,Vt=-1/0;if(ve.forEach(ms),(Le=ve[0]).x=-Le.r,Le.y=0,xn(Le),lt>1&&((Fe=ve[1]).x=Fe.r,Fe.y=0,xn(Fe),lt>2))for(li(Le,Fe,Ve=ve[2]),xn(Ve),zs(Le,Ve),Le._pack_prev=Ve,zs(Ve,Fe),Fe=Le._pack_next,We=3;We0)for($e=-1;++$e=Ut[0]&<<=Ut[1]&&((tt=gt[s.bisect(Vt,lt,1,gn)-1]).y+=en,tt.push(We[$e]));return gt}return Ve.value=function(We){return arguments.length?(ve=We,Ve):ve},Ve.range=function(We){return arguments.length?(Le=qn(We),Ve):Le},Ve.bins=function(We){return arguments.length?(Fe=typeof We=="number"?function($e){return _u($e,We)}:qn(We),Ve):Fe},Ve.frequency=function(We){return arguments.length?(re=!!We,Ve):re},Ve},s.layout.pack=function(){var re,ve=s.layout.hierarchy().sort(nl),Le=0,Fe=[1,1];function Ve(We,$e){var tt=ve.call(this,We,$e),lt=tt[0],gt=Fe[0],zt=Fe[1],Ut=re==null?Math.sqrt:typeof re=="function"?re:function(){return re};if(lt.x=lt.y=0,oo(lt,function(Qt){Qt.r=+Ut(Qt.value)}),oo(lt,vs),Le){var Vt=Le*(re?1:Math.max(2*lt.r/gt,2*lt.r/zt))/2;oo(lt,function(Qt){Qt.r+=Vt}),oo(lt,vs),oo(lt,function(Qt){Qt.r-=Vt})}return oi(lt,gt/2,zt/2,re?1:1/Math.max(2*lt.r/gt,2*lt.r/zt)),tt}return Ve.size=function(We){return arguments.length?(Fe=We,Ve):Fe},Ve.radius=function(We){return arguments.length?(re=We==null||typeof We=="function"?We:+We,Ve):re},Ve.padding=function(We){return arguments.length?(Le=+We,Ve):Le},Os(Ve,ve)},s.layout.tree=function(){var re=s.layout.hierarchy().sort(null).value(null),ve=es,Le=[1,1],Fe=null;function Ve(lt,gt){var zt=re.call(this,lt,gt),Ut=zt[0],Vt=function(xn){for(var an,zn={A:null,children:[xn]},Vn=[zn];(an=Vn.pop())!=null;)for(var nr,rr=an.children,Tr=0,Ar=rr.length;Trgn.x&&(gn=xn),xn.depth>en.depth&&(en=xn)});var sn=ve(Qt,gn)/2-Qt.x,rn=Le[0]/(gn.x+ve(gn,Qt)/2+sn),Mn=Le[1]/(en.depth||1);Qs(Ut,function(xn){xn.x=(xn.x+sn)*rn,xn.y=xn.depth*Mn})}return zt}function We(lt){var gt=lt.children,zt=lt.parent.children,Ut=lt.i?zt[lt.i-1]:null;if(gt.length){(function(Qt){for(var gn,en=0,sn=0,rn=Qt.children,Mn=rn.length;--Mn>=0;)(gn=rn[Mn]).z+=en,gn.m+=en,en+=gn.s+(sn+=gn.c)})(lt);var Vt=(gt[0].z+gt[gt.length-1].z)/2;Ut?(lt.z=Ut.z+ve(lt._,Ut._),lt.m=lt.z-Vt):lt.z=Vt}else Ut&&(lt.z=Ut.z+ve(lt._,Ut._));lt.parent.A=function(Qt,gn,en){if(gn){for(var sn,rn=Qt,Mn=Qt,xn=gn,an=rn.parent.children[0],zn=rn.m,Vn=Mn.m,nr=xn.m,rr=an.m;xn=Gl(xn),rn=zo(rn),xn&&rn;)an=zo(an),(Mn=Gl(Mn)).a=Qt,(sn=xn.z+nr-rn.z-zn+ve(xn._,rn._))>0&&(wu(Fs(xn,Qt,en),Qt,sn),zn+=sn,Vn+=sn),nr+=xn.m,zn+=rn.m,rr+=an.m,Vn+=Mn.m;xn&&!Gl(Mn)&&(Mn.t=xn,Mn.m+=nr-Vn),rn&&!zo(an)&&(an.t=rn,an.m+=zn-rr,en=Qt)}return en}(lt,Ut,lt.parent.A||zt[0])}function $e(lt){lt._.x=lt.z+lt.parent.m,lt.m+=lt.parent.m}function tt(lt){lt.x*=Le[0],lt.y=lt.depth*Le[1]}return Ve.separation=function(lt){return arguments.length?(ve=lt,Ve):ve},Ve.size=function(lt){return arguments.length?(Fe=(Le=lt)==null?tt:null,Ve):Fe?null:Le},Ve.nodeSize=function(lt){return arguments.length?(Fe=(Le=lt)==null?null:tt,Ve):Fe?Le:null},Os(Ve,re)},s.layout.cluster=function(){var re=s.layout.hierarchy().sort(null).value(null),ve=es,Le=[1,1],Fe=!1;function Ve(We,$e){var tt,lt=re.call(this,We,$e),gt=lt[0],zt=0;oo(gt,function(en){var sn=en.children;sn&&sn.length?(en.x=function(rn){return rn.reduce(function(Mn,xn){return Mn+xn.x},0)/rn.length}(sn),en.y=function(rn){return 1+s.max(rn,function(Mn){return Mn.y})}(sn)):(en.x=tt?zt+=ve(en,tt):0,en.y=0,tt=en)});var Ut=Tu(gt),Vt=Bs(gt),Qt=Ut.x-ve(Ut,Vt)/2,gn=Vt.x+ve(Vt,Ut)/2;return oo(gt,Fe?function(en){en.x=(en.x-gt.x)*Le[0],en.y=(gt.y-en.y)*Le[1]}:function(en){en.x=(en.x-Qt)/(gn-Qt)*Le[0],en.y=(1-(gt.y?en.y/gt.y:1))*Le[1]}),lt}return Ve.separation=function(We){return arguments.length?(ve=We,Ve):ve},Ve.size=function(We){return arguments.length?(Fe=(Le=We)==null,Ve):Fe?null:Le},Ve.nodeSize=function(We){return arguments.length?(Fe=(Le=We)!=null,Ve):Fe?Le:null},Os(Ve,re)},s.layout.treemap=function(){var re,ve=s.layout.hierarchy(),Le=Math.round,Fe=[1,1],Ve=null,We=ts,$e=!1,tt="squarify",lt=.5*(1+Math.sqrt(5));function gt(en,sn){for(var rn,Mn,xn=-1,an=en.length;++xn0;)zn.push(rn=Vn[xn-1]),zn.area+=rn.area,tt!=="squarify"||(Mn=Vt(zn,rr))<=nr?(Vn.pop(),nr=Mn):(zn.area-=zn.pop().area,Qt(zn,rr,an,!1),rr=Math.min(an.dx,an.dy),zn.length=zn.area=0,nr=1/0);zn.length&&(Qt(zn,rr,an,!0),zn.length=zn.area=0),sn.forEach(zt)}}function Ut(en){var sn=en.children;if(sn&&sn.length){var rn,Mn=We(en),xn=sn.slice(),an=[];for(gt(xn,Mn.dx*Mn.dy/en.value),an.area=0;rn=xn.pop();)an.push(rn),an.area+=rn.area,rn.z!=null&&(Qt(an,rn.z?Mn.dx:Mn.dy,Mn,!xn.length),an.length=an.area=0);sn.forEach(Ut)}}function Vt(en,sn){for(var rn,Mn=en.area,xn=0,an=1/0,zn=-1,Vn=en.length;++znxn&&(xn=rn));return sn*=sn,(Mn*=Mn)?Math.max(sn*xn*lt/Mn,Mn/(sn*an*lt)):1/0}function Qt(en,sn,rn,Mn){var xn,an=-1,zn=en.length,Vn=rn.x,nr=rn.y,rr=sn?Le(en.area/sn):0;if(sn==rn.dx){for((Mn||rr>rn.dy)&&(rr=rn.dy);++anrn.dx)&&(rr=rn.dx);++an1);return re+ve*Fe*Math.sqrt(-2*Math.log(We)/We)}},logNormal:function(){var re=s.random.normal.apply(s,arguments);return function(){return Math.exp(re())}},bates:function(re){var ve=s.random.irwinHall(re);return function(){return ve()/re}},irwinHall:function(re){return function(){for(var ve=0,Le=0;Le2?ha:js,gt=Fe?Ls:yu;return Ve=lt(re,ve,gt,Le),We=lt(ve,re,gt,qa),tt}function tt(lt){return Ve(lt)}return tt.invert=function(lt){return We(lt)},tt.domain=function(lt){return arguments.length?(re=lt.map(Number),$e()):re},tt.range=function(lt){return arguments.length?(ve=lt,$e()):ve},tt.rangeRound=function(lt){return tt.range(lt).interpolate(Gu)},tt.clamp=function(lt){return arguments.length?(Fe=lt,$e()):Fe},tt.interpolate=function(lt){return arguments.length?(Le=lt,$e()):Le},tt.ticks=function(lt){return Ga(re,lt)},tt.tickFormat=function(lt,gt){return d3_scale_linearTickFormat(re,lt,gt)},tt.nice=function(lt){return lo(re,lt),$e()},tt.copy=function(){return Ia(re,ve,Le,Fe)},$e()}function ys(re,ve){return s.rebind(re,ve,"range","rangeRound","interpolate","clamp")}function lo(re,ve){return $i(re,va(ea(re,ve)[2])),$i(re,va(ea(re,ve)[2])),re}function ea(re,ve){ve==null&&(ve=10);var Le=Oi(re),Fe=Le[1]-Le[0],Ve=Math.pow(10,Math.floor(Math.log(Fe/ve)/Math.LN10)),We=ve/Fe*Ve;return We<=.15?Ve*=10:We<=.35?Ve*=5:We<=.75&&(Ve*=2),Le[0]=Math.ceil(Le[0]/Ve)*Ve,Le[1]=Math.floor(Le[1]/Ve)*Ve+.5*Ve,Le[2]=Ve,Le}function Ga(re,ve){return s.range.apply(s,ea(re,ve))}function Wl(re,ve,Le,Fe){function Ve(tt){return(Le?Math.log(tt<0?0:tt):-Math.log(tt>0?0:-tt))/Math.log(ve)}function We(tt){return Le?Math.pow(ve,tt):-Math.pow(ve,-tt)}function $e(tt){return re(Ve(tt))}return $e.invert=function(tt){return We(re.invert(tt))},$e.domain=function(tt){return arguments.length?(Le=tt[0]>=0,re.domain((Fe=tt.map(Number)).map(Ve)),$e):Fe},$e.base=function(tt){return arguments.length?(ve=+tt,re.domain(Fe.map(Ve)),$e):ve},$e.nice=function(){var tt=$i(Fe.map(Ve),Le?Math:Zl);return re.domain(tt),Fe=tt.map(We),$e},$e.ticks=function(){var tt=Oi(Fe),lt=[],gt=tt[0],zt=tt[1],Ut=Math.floor(Ve(gt)),Vt=Math.ceil(Ve(zt)),Qt=ve%1?2:ve;if(isFinite(Vt-Ut)){if(Le){for(;Ut0;gn--)lt.push(We(Ut)*gn);for(Ut=0;lt[Ut]zt;Vt--);lt=lt.slice(Ut,Vt)}return lt},$e.copy=function(){return Wl(re.copy(),ve,Le,Fe)},ys($e,re)}s.scale.linear=function(){return Ia([0,1],[0,1],qa,!1)},s.scale.log=function(){return Wl(s.scale.linear().domain([0,1]),10,!0,[1,10])};var Zl={floor:function(re){return-Math.ceil(-re)},ceil:function(re){return-Math.floor(-re)}};function Sa(re,ve,Le){var Fe=Cr(ve),Ve=Cr(1/ve);function We($e){return re(Fe($e))}return We.invert=function($e){return Ve(re.invert($e))},We.domain=function($e){return arguments.length?(re.domain((Le=$e.map(Number)).map(Fe)),We):Le},We.ticks=function($e){return Ga(Le,$e)},We.tickFormat=function($e,tt){return d3_scale_linearTickFormat(Le,$e,tt)},We.nice=function($e){return We.domain(lo(Le,$e))},We.exponent=function($e){return arguments.length?(Fe=Cr(ve=$e),Ve=Cr(1/ve),re.domain(Le.map(Fe)),We):ve},We.copy=function(){return Sa(re.copy(),ve,Le)},ys(We,re)}function Cr(re){return function(ve){return ve<0?-Math.pow(-ve,re):Math.pow(ve,re)}}function Us(re,ve){var Le,Fe,Ve;function We(tt){return Fe[((Le.get(tt)||(ve.t==="range"?Le.set(tt,re.push(tt)):NaN))-1)%Fe.length]}function $e(tt,lt){return s.range(re.length).map(function(gt){return tt+lt*gt})}return We.domain=function(tt){if(!arguments.length)return re;re=[],Le=new k;for(var lt,gt=-1,zt=tt.length;++gt0?Le[We-1]:re[0],WeVt?0:1;if(zt=qt)return lt(zt,gn)+(gt?lt(gt,1-gn):"")+"Z";var en,sn,rn,Mn,xn,an,zn,Vn,nr,rr,Tr,Ar,mr=0,wr=0,Rr=[];if((Mn=(+$e.apply(this,arguments)||0)/2)&&(rn=Fe===Cl?Math.sqrt(gt*gt+zt*zt):+Fe.apply(this,arguments),gn||(wr*=-1),zt&&(wr=Ge(rn/zt*Math.sin(Mn))),gt&&(mr=Ge(rn/gt*Math.sin(Mn)))),zt){xn=zt*Math.cos(Ut+wr),an=zt*Math.sin(Ut+wr),zn=zt*Math.cos(Vt-wr),Vn=zt*Math.sin(Vt-wr);var Jr=Math.abs(Vt-Ut-2*wr)<=It?0:1;if(wr&&_o(xn,an,zn,Vn)===gn^Jr){var Kr=(Ut+Vt)/2;xn=zt*Math.cos(Kr),an=zt*Math.sin(Kr),zn=Vn=null}}else xn=an=0;if(gt){nr=gt*Math.cos(Vt-mr),rr=gt*Math.sin(Vt-mr),Tr=gt*Math.cos(Ut+mr),Ar=gt*Math.sin(Ut+mr);var xr=Math.abs(Ut-Vt+2*mr)<=It?0:1;if(mr&&_o(nr,rr,Tr,Ar)===1-gn^xr){var zr=(Ut+Vt)/2;nr=gt*Math.cos(zr),rr=gt*Math.sin(zr),Tr=Ar=null}}else nr=rr=0;if(Qt>Dt&&(en=Math.min(Math.abs(zt-gt)/2,+Le.apply(this,arguments)))>.001){sn=gt0?0:1}function co(re,ve,Le,Fe,Ve){var We=re[0]-ve[0],$e=re[1]-ve[1],tt=(Ve?Fe:-Fe)/Math.sqrt(We*We+$e*$e),lt=tt*$e,gt=-tt*We,zt=re[0]+lt,Ut=re[1]+gt,Vt=ve[0]+lt,Qt=ve[1]+gt,gn=(zt+Vt)/2,en=(Ut+Qt)/2,sn=Vt-zt,rn=Qt-Ut,Mn=sn*sn+rn*rn,xn=Le-Fe,an=zt*Qt-Vt*Ut,zn=(rn<0?-1:1)*Math.sqrt(Math.max(0,xn*xn*Mn-an*an)),Vn=(an*rn-sn*zn)/Mn,nr=(-an*sn-rn*zn)/Mn,rr=(an*rn+sn*zn)/Mn,Tr=(-an*sn+rn*zn)/Mn,Ar=Vn-gn,mr=nr-en,wr=rr-gn,Rr=Tr-en;return Ar*Ar+mr*mr>wr*wr+Rr*Rr&&(Vn=rr,nr=Tr),[[Vn-lt,nr-gt],[Vn*Le/xn,nr*Le/xn]]}function Hs(){return!0}function xa(re){var ve=jn,Le=$n,Fe=Hs,Ve=vi,We=Ve.key,$e=.7;function tt(lt){var gt,zt=[],Ut=[],Vt=-1,Qt=lt.length,gn=qn(ve),en=qn(Le);function sn(){zt.push("M",Ve(re(Ut),$e))}for(;++Vt1&&Ve.push("H",Fe[0]),Ve.join("")},"step-before":to,"step-after":ho,basis:di,"basis-open":function(re){if(re.length<4)return vi(re);for(var ve,Le=[],Fe=-1,Ve=re.length,We=[0],$e=[0];++Fe<3;)ve=re[Fe],We.push(ve[0]),$e.push(ve[1]);for(Le.push(oa(Bo,We)+","+oa(Bo,$e)),--Fe;++Fe9&&(We=3*Le/Math.sqrt(We),tt[lt]=We*Fe,tt[lt+1]=We*Ve);for(lt=-1;++lt<=gt;)We=(ve[Math.min(gt,lt+1)][0]-ve[Math.max(0,lt-1)][0])/(6*(1+tt[lt]*tt[lt])),$e.push([We||0,tt[lt]*We||0]);return $e}(re))}});function vi(re){return re.length>1?re.join("L"):re+"Z"}function Ll(re){return re.join("L")+"Z"}function to(re){for(var ve=0,Le=re.length,Fe=re[0],Ve=[Fe[0],",",Fe[1]];++ve1){tt=ve[1],We=re[lt],lt++,Fe+="C"+(Ve[0]+$e[0])+","+(Ve[1]+$e[1])+","+(We[0]-tt[0])+","+(We[1]-tt[1])+","+We[0]+","+We[1];for(var gt=2;gtIt)+",1 "+zt}function lt(gt,zt,Ut,Vt){return"Q 0,0 "+Vt}return We.radius=function(gt){return arguments.length?(Le=qn(gt),We):Le},We.source=function(gt){return arguments.length?(re=qn(gt),We):re},We.target=function(gt){return arguments.length?(ve=qn(gt),We):ve},We.startAngle=function(gt){return arguments.length?(Fe=qn(gt),We):Fe},We.endAngle=function(gt){return arguments.length?(Ve=qn(gt),We):Ve},We},s.svg.diagonal=function(){var re=Fr,ve=Ur,Le=is;function Fe(Ve,We){var $e=re.call(this,Ve,We),tt=ve.call(this,Ve,We),lt=($e.y+tt.y)/2,gt=[$e,{x:$e.x,y:lt},{x:tt.x,y:lt},tt];return"M"+(gt=gt.map(Le))[0]+"C"+gt[1]+" "+gt[2]+" "+gt[3]}return Fe.source=function(Ve){return arguments.length?(re=qn(Ve),Fe):re},Fe.target=function(Ve){return arguments.length?(ve=qn(Ve),Fe):ve},Fe.projection=function(Ve){return arguments.length?(Le=Ve,Fe):Le},Fe},s.svg.diagonal.radial=function(){var re=s.svg.diagonal(),ve=is,Le=re.projection;return re.projection=function(Fe){return arguments.length?Le(To(ve=Fe)):ve},re},s.svg.symbol=function(){var re=$l,ve=_a;function Le(Fe,Ve){return(ll.get(re.call(this,Fe,Ve))||Fa)(ve.call(this,Fe,Ve))}return Le.type=function(Fe){return arguments.length?(re=qn(Fe),Le):re},Le.size=function(Fe){return arguments.length?(ve=qn(Fe),Le):ve},Le};var ll=s.map({circle:Fa,cross:function(re){var ve=Math.sqrt(re/5)/2;return"M"+-3*ve+","+-ve+"H"+-ve+"V"+-3*ve+"H"+ve+"V"+-ve+"H"+3*ve+"V"+ve+"H"+ve+"V"+3*ve+"H"+-ve+"V"+ve+"H"+-3*ve+"Z"},diamond:function(re){var ve=Math.sqrt(re/(2*_i)),Le=ve*_i;return"M0,"+-ve+"L"+Le+",0 0,"+ve+" "+-Le+",0Z"},square:function(re){var ve=Math.sqrt(re)/2;return"M"+-ve+","+-ve+"L"+ve+","+-ve+" "+ve+","+ve+" "+-ve+","+ve+"Z"},"triangle-down":function(re){var ve=Math.sqrt(re/as),Le=ve*as/2;return"M0,"+Le+"L"+ve+","+-Le+" "+-ve+","+-Le+"Z"},"triangle-up":function(re){var ve=Math.sqrt(re/as),Le=ve*as/2;return"M0,"+-Le+"L"+ve+","+Le+" "+-ve+","+Le+"Z"}});s.svg.symbolTypes=ll.keys();var as=Math.sqrt(3),_i=Math.tan(30*Je);fe.transition=function(re){for(var ve,Le,Fe=rt||++Mt,Ve=$(re),We=[],$e=ct||{time:Date.now(),ease:Xo,delay:0,duration:250},tt=-1,lt=this.length;++tt0;)gt[--rn].call(re,sn);if(en>=1)return Ut.event&&Ut.event.end.call(re,re.__data__,ve),--zt.count?delete zt[Fe]:delete re[Le],1}Ut||(We=Ve.time,$e=$t(function(gn){var en=Ut.delay;if($e.t=en+We,en<=gn)return Vt(gn-en);$e.c=Vt},0,We),Ut=zt[Fe]={tween:new k,time:We,timer:$e,delay:Ve.delay,duration:Ve.duration,ease:Ve.ease,index:ve},Ve=null,++zt.count)}vt.call=fe.call,vt.empty=fe.empty,vt.node=fe.node,vt.size=fe.size,s.transition=function(re,ve){return re&&re.transition?rt?re.transition(ve):re:s.selection().transition(re)},s.transition.prototype=vt,vt.select=function(re){var ve,Le,Fe,Ve=this.id,We=this.namespace,$e=[];re=ye(re);for(var tt=-1,lt=this.length;++ttrect,.s>rect").attr("width",We[1]-We[0])}function Qt(en){en.select(".extent").attr("y",$e[0]),en.selectAll(".extent,.e>rect,.w>rect").attr("height",$e[1]-$e[0])}function gn(){var en,sn,rn=this,Mn=s.select(s.event.target),xn=Le.of(rn,arguments),an=s.select(rn),zn=Mn.datum(),Vn=!/^(n|s)$/.test(zn)&&Fe,nr=!/^(e|w)$/.test(zn)&&Ve,rr=Mn.classed("extent"),Tr=yt(rn),Ar=s.mouse(rn),mr=s.select(t(rn)).on("keydown.brush",Jr).on("keyup.brush",Kr);if(s.event.changedTouches?mr.on("touchmove.brush",xr).on("touchend.brush",Wr):mr.on("mousemove.brush",xr).on("mouseup.brush",Wr),an.interrupt().selectAll("*").interrupt(),rr)Ar[0]=We[0]-Ar[0],Ar[1]=$e[0]-Ar[1];else if(zn){var wr=+/w$/.test(zn),Rr=+/^n/.test(zn);sn=[We[1-wr]-Ar[0],$e[1-Rr]-Ar[1]],Ar[0]=We[wr],Ar[1]=$e[Rr]}else s.event.altKey&&(en=Ar.slice());function Jr(){s.event.keyCode==32&&(rr||(en=null,Ar[0]-=We[1],Ar[1]-=$e[1],rr=2),ee())}function Kr(){s.event.keyCode==32&&rr==2&&(Ar[0]+=We[1],Ar[1]+=$e[1],rr=0,ee())}function xr(){var Gr=s.mouse(rn),ii=!1;sn&&(Gr[0]+=sn[0],Gr[1]+=sn[1]),rr||(s.event.altKey?(en||(en=[(We[0]+We[1])/2,($e[0]+$e[1])/2]),Ar[0]=We[+(Gr[0]>>1;a.dtype||(a.dtype="array"),typeof a.dtype=="string"?c=new(i(a.dtype))(d):a.dtype&&(c=a.dtype,Array.isArray(c)&&(c.length=d));for(var v=0;vu||H>1073741824){for(var K=0;Khe+Re||ae>xe+Re||oe=fe||Ae===Me)){var Ce=x[we];Me===void 0&&(Me=Ce.length);for(var ne=Ae;ne=ee&&me<=X&&Te>=Q&&Te<=Y&&ye.push(ue)}var Ee=g[we],Ue=Ee[4*Ae+0],De=Ee[4*Ae+1],je=Ee[4*Ae+2],ge=Ee[4*Ae+3],be=de(Ee,Ae+1),Se=.5*Re,Ne=we+1;pe(he,xe,Se,Ne,Ue,De||je||ge||be),pe(he,xe+Se,Se,Ne,De,je||ge||be),pe(he+Se,xe,Se,Ne,je,ge||be),pe(he+Se,xe+Se,Se,Ne,ge,be)}}function de(he,xe){for(var Re=null,we=0;Re===null;)if(Re=he[4*xe+we],++we>he.length)return null;return Re}return pe(0,0,1,0,0,1),ye},c;function I(U,B,G,N,j){for(var V=[],H=0;H0){l+=Math.abs(T(f[0]));for(var t=1;t2){for(o=0;o=0))throw new Error("precision must be a positive number");var u=Math.pow(10,a||0);return Math.round(o*u)/u},E.radiansToLength=t,E.lengthToRadians=i,E.lengthToDegrees=function(o,a){return r(i(o,a))},E.bearingToAzimuth=function(o){var a=o%360;return a<0&&(a+=360),a},E.radiansToDegrees=r,E.degreesToRadians=function(o){return o%360*Math.PI/180},E.convertLength=function(o,a,u){if(a===void 0&&(a="kilometers"),u===void 0&&(u="kilometers"),!(o>=0))throw new Error("length must be a positive number");return t(i(o,a),u)},E.convertArea=function(o,a,u){if(a===void 0&&(a="meters"),u===void 0&&(u="kilometers"),!(o>=0))throw new Error("area must be a positive number");var p=E.areaFactors[a];if(!p)throw new Error("invalid original units");var c=E.areaFactors[u];if(!c)throw new Error("invalid final units");return o/p*c},E.isNumber=n,E.isObject=function(o){return!!o&&o.constructor===Object},E.validateBBox=function(o){if(!o)throw new Error("bbox is required");if(!Array.isArray(o))throw new Error("bbox must be an Array");if(o.length!==4&&o.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");o.forEach(function(a){if(!n(a))throw new Error("bbox must only contain numbers")})},E.validateId=function(o){if(!o)throw new Error("id is required");if(["string","number"].indexOf(typeof o)===-1)throw new Error("id must be a number or a string")}},60302:function(D,E,e){Object.defineProperty(E,"__esModule",{value:!0});var _=e(23132);function w(i,r,n){if(i!==null)for(var o,a,u,p,c,b,d,v,x=0,g=0,m=i.type,k=m==="FeatureCollection",h=m==="Feature",M=k?i.features.length:1,A=0;Ab||k>d||h>v)return c=x,b=o,d=k,v=h,void(u=0);var M=_.lineString([c,x],n.properties);if(r(M,o,a,h,u)===!1)return!1;u++,c=x})!==!1&&void 0}}})}function t(i,r){if(!i)throw new Error("geojson is required");f(i,function(n,o,a){if(n.geometry!==null){var u=n.geometry.type,p=n.geometry.coordinates;switch(u){case"LineString":if(r(n,o,a,0,0)===!1)return!1;break;case"Polygon":for(var c=0;cy[0]&&(T[0]=y[0]),T[1]>y[1]&&(T[1]=y[1]),T[2]=0))throw new Error("precision must be a positive number");var u=Math.pow(10,a||0);return Math.round(o*u)/u},E.radiansToLength=t,E.lengthToRadians=i,E.lengthToDegrees=function(o,a){return r(i(o,a))},E.bearingToAzimuth=function(o){var a=o%360;return a<0&&(a+=360),a},E.radiansToDegrees=r,E.degreesToRadians=function(o){return o%360*Math.PI/180},E.convertLength=function(o,a,u){if(a===void 0&&(a="kilometers"),u===void 0&&(u="kilometers"),!(o>=0))throw new Error("length must be a positive number");return t(i(o,a),u)},E.convertArea=function(o,a,u){if(a===void 0&&(a="meters"),u===void 0&&(u="kilometers"),!(o>=0))throw new Error("area must be a positive number");var p=E.areaFactors[a];if(!p)throw new Error("invalid original units");var c=E.areaFactors[u];if(!c)throw new Error("invalid final units");return o/p*c},E.isNumber=n,E.isObject=function(o){return!!o&&o.constructor===Object},E.validateBBox=function(o){if(!o)throw new Error("bbox is required");if(!Array.isArray(o))throw new Error("bbox must be an Array");if(o.length!==4&&o.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");o.forEach(function(a){if(!n(a))throw new Error("bbox must only contain numbers")})},E.validateId=function(o){if(!o)throw new Error("id is required");if(["string","number"].indexOf(typeof o)===-1)throw new Error("id must be a number or a string")}},27138:function(D,E,e){Object.defineProperty(E,"__esModule",{value:!0});var _=e(94228);function w(i,r,n){if(i!==null)for(var o,a,u,p,c,b,d,v,x=0,g=0,m=i.type,k=m==="FeatureCollection",h=m==="Feature",M=k?i.features.length:1,A=0;Ab||k>d||h>v)return c=x,b=o,d=k,v=h,void(u=0);var M=_.lineString([c,x],n.properties);if(r(M,o,a,h,u)===!1)return!1;u++,c=x})!==!1&&void 0}}})}function t(i,r){if(!i)throw new Error("geojson is required");f(i,function(n,o,a){if(n.geometry!==null){var u=n.geometry.type,p=n.geometry.coordinates;switch(u){case"LineString":if(r(n,o,a,0,0)===!1)return!1;break;case"Polygon":for(var c=0;c=0))throw new Error("precision must be a positive number");var u=Math.pow(10,a||0);return Math.round(o*u)/u},E.radiansToLength=t,E.lengthToRadians=i,E.lengthToDegrees=function(o,a){return r(i(o,a))},E.bearingToAzimuth=function(o){var a=o%360;return a<0&&(a+=360),a},E.radiansToDegrees=r,E.degreesToRadians=function(o){return o%360*Math.PI/180},E.convertLength=function(o,a,u){if(a===void 0&&(a="kilometers"),u===void 0&&(u="kilometers"),!(o>=0))throw new Error("length must be a positive number");return t(i(o,a),u)},E.convertArea=function(o,a,u){if(a===void 0&&(a="meters"),u===void 0&&(u="kilometers"),!(o>=0))throw new Error("area must be a positive number");var p=E.areaFactors[a];if(!p)throw new Error("invalid original units");var c=E.areaFactors[u];if(!c)throw new Error("invalid final units");return o/p*c},E.isNumber=n,E.isObject=function(o){return!!o&&o.constructor===Object},E.validateBBox=function(o){if(!o)throw new Error("bbox is required");if(!Array.isArray(o))throw new Error("bbox must be an Array");if(o.length!==4&&o.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");o.forEach(function(a){if(!n(a))throw new Error("bbox must only contain numbers")})},E.validateId=function(o){if(!o)throw new Error("id is required");if(["string","number"].indexOf(typeof o)===-1)throw new Error("id must be a number or a string")},E.radians2degrees=function(){throw new Error("method has been renamed to `radiansToDegrees`")},E.degrees2radians=function(){throw new Error("method has been renamed to `degreesToRadians`")},E.distanceToDegrees=function(){throw new Error("method has been renamed to `lengthToDegrees`")},E.distanceToRadians=function(){throw new Error("method has been renamed to `lengthToRadians`")},E.radiansToDistance=function(){throw new Error("method has been renamed to `radiansToLength`")},E.bearingToAngle=function(){throw new Error("method has been renamed to `bearingToAzimuth`")},E.convertDistance=function(){throw new Error("method has been renamed to `convertLength`")}},88553:function(D,E,e){Object.defineProperty(E,"__esModule",{value:!0});var _=e(64182);function w(i,r,n){if(i!==null)for(var o,a,u,p,c,b,d,v,x=0,g=0,m=i.type,k=m==="FeatureCollection",h=m==="Feature",M=k?i.features.length:1,A=0;Ab||k>d||h>v)return c=x,b=o,d=k,v=h,void(u=0);var M=_.lineString([c,x],n.properties);if(r(M,o,a,h,u)===!1)return!1;u++,c=x})!==!1&&void 0}}})}function t(i,r){if(!i)throw new Error("geojson is required");f(i,function(n,o,a){if(n.geometry!==null){var u=n.geometry.type,p=n.geometry.coordinates;switch(u){case"LineString":if(r(n,o,a,0,0)===!1)return!1;break;case"Polygon":for(var c=0;cs&&(s=E[y]),E[y]24?(isFinite(ve)&&(clearTimeout(dr),dr=setTimeout(mn,ve)),ir=0):(ir=1,yr(mn))}function Ln(){for(var re=Date.now(),ve=kr;ve;)re>=ve.t&&ve.c(re-ve.t)&&(ve.c=null),ve=ve.n;return re}function En(){for(var re,ve=kr,Le=1/0;ve;)ve.c?(ve.t1&&(ve=re[We[$e-2]],Le=re[We[$e-1]],Fe=re[tt],(Le[0]-ve[0])*(Fe[1]-ve[1])-(Le[1]-ve[1])*(Fe[0]-ve[0])<=0);)--$e;We[$e++]=tt}return We.slice(0,$e)}function Qn(re,ve){return re[0]-ve[0]||re[1]-ve[1]}s.timer=function(){$t.apply(this,arguments)},s.timer.flush=function(){Ln(),En()},s.round=function(re,ve){return ve?Math.round(re*(ve=Math.pow(10,ve)))/ve:Math.round(re)},s.geom={},s.geom.hull=function(re){var ve=jn,Le=$n;if(arguments.length)return Fe(re);function Fe(Ve){if(Ve.length<3)return[];var We,$e=qn(ve),tt=qn(Le),lt=Ve.length,gt=[],zt=[];for(We=0;We=0;--We)en.push(Ve[gt[Ut[We]][2]]);for(We=+Qt;WeDt)tt=tt.L;else{if(!((Ve=We-Jn(tt,$e))>Dt)){Fe>-Dt?(ve=tt.P,Le=tt):Ve>-Dt?(ve=tt,Le=tt.N):ve=Le=tt;break}if(!tt.R){ve=tt;break}tt=tt.R}var lt=vn(re);if(Rn.insert(ve,lt),ve||Le){if(ve===Le)return vr(ve),Le=vn(ve.site),Rn.insert(lt,Le),lt.edge=Le.edge=Lr(ve.site,lt.site),cr(ve),void cr(Le);if(Le){vr(ve),vr(Le);var gt=ve.site,zt=gt.x,Ut=gt.y,Vt=re.x-zt,Qt=re.y-Ut,gn=Le.site,en=gn.x-zt,sn=gn.y-Ut,rn=2*(Vt*sn-Qt*en),Mn=Vt*Vt+Qt*Qt,xn=en*en+sn*sn,an={x:(sn*Mn-Qt*xn)/rn+zt,y:(Vt*xn-en*Mn)/rn+Ut};pr(Le.edge,gt,gn,an),lt.edge=Lr(gt,re,null,an),Le.edge=Lr(re,gn,null,an),cr(ve),cr(Le)}else lt.edge=Lr(ve.site,lt.site)}}function er(re,ve){var Le=re.site,Fe=Le.x,Ve=Le.y,We=Ve-ve;if(!We)return Fe;var $e=re.P;if(!$e)return-1/0;var tt=(Le=$e.site).x,lt=Le.y,gt=lt-ve;if(!gt)return tt;var zt=tt-Fe,Ut=1/We-1/gt,Vt=zt/gt;return Ut?(-Vt+Math.sqrt(Vt*Vt-2*Ut*(zt*zt/(-2*gt)-lt+gt/2+Ve-We/2)))/Ut+Fe:(Fe+tt)/2}function Jn(re,ve){var Le=re.N;if(Le)return er(Le,ve);var Fe=re.site;return Fe.y===ve?Fe.x:1/0}function lr(re){this.site=re,this.edges=[]}function sr(re,ve){return ve.angle-re.angle}function fr(){ci(this),this.x=this.y=this.arc=this.site=this.cy=null}function cr(re){var ve=re.P,Le=re.N;if(ve&&Le){var Fe=ve.site,Ve=re.site,We=Le.site;if(Fe!==We){var $e=Ve.x,tt=Ve.y,lt=Fe.x-$e,gt=Fe.y-tt,zt=We.x-$e,Ut=2*(lt*(sn=We.y-tt)-gt*zt);if(!(Ut>=-1e-12)){var Vt=lt*lt+gt*gt,Qt=zt*zt+sn*sn,gn=(sn*Vt-gt*Qt)/Ut,en=(lt*Qt-zt*Vt)/Ut,sn=en+tt,rn=bn.pop()||new fr;rn.arc=re,rn.site=Ve,rn.x=gn+$e,rn.y=sn+Math.sqrt(gn*gn+en*en),rn.cy=sn,re.circle=rn;for(var Mn=null,xn=Sn._;xn;)if(rn.y=tt)return;if(Vt>gn){if(We){if(We.y>=gt)return}else We={x:sn,y:lt};Le={x:sn,y:gt}}else{if(We){if(We.y1)if(Vt>gn){if(We){if(We.y>=gt)return}else We={x:(lt-Ve)/Fe,y:lt};Le={x:(gt-Ve)/Fe,y:gt}}else{if(We){if(We.y=tt)return}else We={x:$e,y:Fe*$e+Ve};Le={x:tt,y:Fe*tt+Ve}}else{if(We){if(We.x<$e)return}else We={x:tt,y:Fe*tt+Ve};Le={x:$e,y:Fe*$e+Ve}}return re.a=We,re.b=Le,!0}function Mr(re,ve){this.l=re,this.r=ve,this.a=this.b=null}function Lr(re,ve,Le,Fe){var Ve=new Mr(re,ve);return Jt.push(Ve),Le&&pr(Ve,re,ve,Le),Fe&&pr(Ve,ve,re,Fe),un[re.i].edges.push(new Pr(Ve,re,ve)),un[ve.i].edges.push(new Pr(Ve,ve,re)),Ve}function pr(re,ve,Le,Fe){re.a||re.b?re.l===Le?re.b=Fe:re.a=Fe:(re.a=Fe,re.l=ve,re.r=Le)}function Pr(re,ve,Le){var Fe=re.a,Ve=re.b;this.edge=re,this.site=ve,this.angle=Le?Math.atan2(Le.y-ve.y,Le.x-ve.x):re.l===ve?Math.atan2(Ve.x-Fe.x,Fe.y-Ve.y):Math.atan2(Fe.x-Ve.x,Ve.y-Fe.y)}function Hr(){this._=null}function ci(re){re.U=re.C=re.L=re.R=re.P=re.N=null}function Ti(re,ve){var Le=ve,Fe=ve.R,Ve=Le.U;Ve?Ve.L===Le?Ve.L=Fe:Ve.R=Fe:re._=Fe,Fe.U=Ve,Le.U=Fe,Le.R=Fe.L,Le.R&&(Le.R.U=Le),Fe.L=Le}function Mi(re,ve){var Le=ve,Fe=ve.L,Ve=Le.U;Ve?Ve.L===Le?Ve.L=Fe:Ve.R=Fe:re._=Fe,Fe.U=Ve,Le.U=Fe,Le.L=Fe.R,Le.L&&(Le.L.U=Le),Fe.R=Le}function fa(re){for(;re.L;)re=re.L;return re}function Hi(re,ve){var Le,Fe,Ve,We=re.sort(xi).pop();for(Jt=[],un=new Array(re.length),Rn=new Hr,Sn=new Hr;;)if(Ve=On,We&&(!Ve||We.y0)){if(rn/=rr,rr<0){if(rn0){if(rn>nr)return;rn>Vn&&(Vn=rn)}if(rn=Ut-an,rr||!(rn<0)){if(rn/=rr,rr<0){if(rn>nr)return;rn>Vn&&(Vn=rn)}else if(rr>0){if(rn0)){if(rn/=Tr,Tr<0){if(rn0){if(rn>nr)return;rn>Vn&&(Vn=rn)}if(rn=Vt-zn,Tr||!(rn<0)){if(rn/=Tr,Tr<0){if(rn>nr)return;rn>Vn&&(Vn=rn)}else if(Tr>0){if(rn0&&(sn.a={x:an+Vn*rr,y:zn+Vn*Tr}),nr<1&&(sn.b={x:an+nr*rr,y:zn+nr*Tr}),sn}}}}}),en=Qt.length;en--;)(!Sr(lt=Qt[en],tt)||!gn(lt)||x(lt.a.x-lt.b.x)Dt||x(Ut-gt)>Dt)&&(gn.splice(Qt,0,new Pr((rr=Vt.site,Tr=rn,Ar=x(zt-Mn)Dt?{x:Mn,y:x(lt-Mn)Dt?{x:x(gt-zn)Dt?{x:xn,y:x(lt-xn)Dt?{x:x(gt-an)=zt&&rn.x<=Vt&&rn.y>=Ut&&rn.y<=Qt?[[zt,Qt],[Vt,Qt],[Vt,Ut],[zt,Ut]]:[]).point=lt[en]}),gt}function tt(lt){return lt.map(function(gt,zt){return{x:Math.round(Fe(gt,zt)/Dt)*Dt,y:Math.round(Ve(gt,zt)/Dt)*Dt,i:zt}})}return $e.links=function(lt){return Hi(tt(lt)).edges.filter(function(gt){return gt.l&>.r}).map(function(gt){return{source:lt[gt.l.i],target:lt[gt.r.i]}})},$e.triangles=function(lt){var gt=[];return Hi(tt(lt)).cells.forEach(function(zt,Ut){for(var Vt,Qt,gn,en,sn=zt.site,rn=zt.edges.sort(sr),Mn=-1,xn=rn.length,an=rn[xn-1].edge,zn=an.l===sn?an.r:an.l;++MnWe||Vt>$e||Qt=Vn)<<1|ve>=zn,rr=nr+4;nrWe&&(Ve=ve.slice(We,Ve),tt[$e]?tt[$e]+=Ve:tt[++$e]=Ve),(Le=Le[0])===(Fe=Fe[0])?tt[$e]?tt[$e]+=Fe:tt[++$e]=Fe:(tt[++$e]=null,lt.push({i:$e,x:Qa(Le,Fe)})),We=yl.lastIndex;return Wern&&(rn=zt.x),zt.y>Mn&&(Mn=zt.y),Ut.push(zt.x),Vt.push(zt.y);else for(Qt=0;Qtrn&&(rn=zn),Vn>Mn&&(Mn=Vn),Ut.push(zn),Vt.push(Vn)}var nr=rn-en,rr=Mn-sn;function Tr(wr,Rr,Jr,Kr,xr,zr,Wr,Gr){if(!isNaN(Jr)&&!isNaN(Kr))if(wr.leaf){var ii=wr.x,ti=wr.y;if(ii!=null)if(x(ii-Jr)+x(ti-Kr)<.01)Ar(wr,Rr,Jr,Kr,xr,zr,Wr,Gr);else{var ui=wr.point;wr.x=wr.y=wr.point=null,Ar(wr,ui,ii,ti,xr,zr,Wr,Gr),Ar(wr,Rr,Jr,Kr,xr,zr,Wr,Gr)}else wr.x=Jr,wr.y=Kr,wr.point=Rr}else Ar(wr,Rr,Jr,Kr,xr,zr,Wr,Gr)}function Ar(wr,Rr,Jr,Kr,xr,zr,Wr,Gr){var ii=.5*(xr+Wr),ti=.5*(zr+Gr),ui=Jr>=ii,ki=Kr>=ti,Ii=ki<<1|ui;wr.leaf=!1,ui?xr=ii:Wr=ii,ki?zr=ti:Gr=ti,Tr(wr=wr.nodes[Ii]||(wr.nodes[Ii]={leaf:!0,nodes:[],point:null,x:null,y:null}),Rr,Jr,Kr,xr,zr,Wr,Gr)}nr>rr?Mn=sn+nr:rn=en+rr;var mr={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(wr){Tr(mr,wr,+xn(wr,++Qt),+an(wr,Qt),en,sn,rn,Mn)},visit:function(wr){Xs(wr,mr,en,sn,rn,Mn)},find:function(wr){return Uu(mr,wr[0],wr[1],en,sn,rn,Mn)}};if(Qt=-1,ve==null){for(;++Qt=0&&!(Le=s.interpolators[Fe](re,ve)););return Le}function eo(re,ve){var Le,Fe=[],Ve=[],We=re.length,$e=ve.length,tt=Math.min(re.length,ve.length);for(Le=0;Le=1?1:re(ve)}}function bo(re){return function(ve){return 1-re(1-ve)}}function Ro(re){return function(ve){return .5*(ve<.5?re(2*ve):2-re(2-2*ve))}}function xl(re){return re*re}function Vu(re){return re*re*re}function Xo(re){if(re<=0)return 0;if(re>=1)return 1;var ve=re*re,Le=ve*re;return 4*(re<.5?Le:3*(re-ve)+Le-.75)}function Hu(re){return 1-Math.cos(re*Nt)}function qu(re){return Math.pow(2,10*(re-1))}function Ec(re){return 1-Math.sqrt(1-re*re)}function gu(re){return re<.36363636363636365?7.5625*re*re:re<.7272727272727273?7.5625*(re-=.5454545454545454)*re+.75:re<.9090909090909091?7.5625*(re-=.8181818181818182)*re+.9375:7.5625*(re-=.9545454545454546)*re+.984375}function Gu(re,ve){return ve-=re,function(Le){return Math.round(re+ve*Le)}}function vu(re){var ve,Le,Fe,Ve=[re.a,re.b],We=[re.c,re.d],$e=Jo(Ve),tt=$o(Ve,We),lt=Jo(((ve=We)[0]+=(Fe=-tt)*(Le=Ve)[0],ve[1]+=Fe*Le[1],ve))||0;Ve[0]*We[1]=0?re.slice(0,ve):re,Fe=ve>=0?re.slice(ve+1):"in";return Le=fi.get(Le)||fs,ao((Fe=hs.get(Fe)||U)(Le.apply(null,T.call(arguments,1))))},s.interpolateHcl=function(re,ve){re=s.hcl(re),ve=s.hcl(ve);var Le=re.h,Fe=re.c,Ve=re.l,We=ve.h-Le,$e=ve.c-Fe,tt=ve.l-Ve;return isNaN($e)&&($e=0,Fe=isNaN(Fe)?ve.c:Fe),isNaN(We)?(We=0,Le=isNaN(Le)?ve.h:Le):We>180?We-=360:We<-180&&(We+=360),function(lt){return Ot(Le+We*lt,Fe+$e*lt,Ve+tt*lt)+""}},s.interpolateHsl=function(re,ve){re=s.hsl(re),ve=s.hsl(ve);var Le=re.h,Fe=re.s,Ve=re.l,We=ve.h-Le,$e=ve.s-Fe,tt=ve.l-Ve;return isNaN($e)&&($e=0,Fe=isNaN(Fe)?ve.s:Fe),isNaN(We)?(We=0,Le=isNaN(Le)?ve.h:Le):We>180?We-=360:We<-180&&(We+=360),function(lt){return Lt(Le+We*lt,Fe+$e*lt,Ve+tt*lt)+""}},s.interpolateLab=function(re,ve){re=s.lab(re),ve=s.lab(ve);var Le=re.l,Fe=re.a,Ve=re.b,We=ve.l-Le,$e=ve.a-Fe,tt=ve.b-Ve;return function(lt){return Xt(Le+We*lt,Fe+$e*lt,Ve+tt*lt)+""}},s.interpolateRound=Gu,s.transform=function(re){var ve=f.createElementNS(s.ns.prefix.svg,"g");return(s.transform=function(Le){if(Le!=null){ve.setAttribute("transform",Le);var Fe=ve.transform.baseVal.consolidate()}return new vu(Fe?Fe.matrix:Js)})(re)},vu.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Js={a:1,b:0,c:0,d:1,e:0,f:0};function Ko(re){return re.length?re.pop()+",":""}function mu(re,ve){var Le=[],Fe=[];return re=s.transform(re),ve=s.transform(ve),function(Ve,We,$e,tt){if(Ve[0]!==We[0]||Ve[1]!==We[1]){var lt=$e.push("translate(",null,",",null,")");tt.push({i:lt-4,x:Qa(Ve[0],We[0])},{i:lt-2,x:Qa(Ve[1],We[1])})}else(We[0]||We[1])&&$e.push("translate("+We+")")}(re.translate,ve.translate,Le,Fe),function(Ve,We,$e,tt){Ve!==We?(Ve-We>180?We+=360:We-Ve>180&&(Ve+=360),tt.push({i:$e.push(Ko($e)+"rotate(",null,")")-2,x:Qa(Ve,We)})):We&&$e.push(Ko($e)+"rotate("+We+")")}(re.rotate,ve.rotate,Le,Fe),function(Ve,We,$e,tt){Ve!==We?tt.push({i:$e.push(Ko($e)+"skewX(",null,")")-2,x:Qa(Ve,We)}):We&&$e.push(Ko($e)+"skewX("+We+")")}(re.skew,ve.skew,Le,Fe),function(Ve,We,$e,tt){if(Ve[0]!==We[0]||Ve[1]!==We[1]){var lt=$e.push(Ko($e)+"scale(",null,",",null,")");tt.push({i:lt-4,x:Qa(Ve[0],We[0])},{i:lt-2,x:Qa(Ve[1],We[1])})}else We[0]===1&&We[1]===1||$e.push(Ko($e)+"scale("+We+")")}(re.scale,ve.scale,Le,Fe),re=ve=null,function(Ve){for(var We,$e=-1,tt=Fe.length;++$e0?Le=an:(re.c=null,re.t=NaN,re=null,tt.end({type:"end",alpha:Le=0})):an>0&&(tt.start({type:"start",alpha:Le=an}),re=$t($e.tick)),$e):Le},$e.start=function(){var an,zn,Vn,nr=sn.length,rr=rn.length,Tr=lt[0],Ar=lt[1];for(an=0;an=0;)Le.push(Ve[Fe])}function oo(re,ve){for(var Le=[re],Fe=[];(re=Le.pop())!=null;)if(Fe.push(re),(We=re.children)&&(Ve=We.length))for(var Ve,We,$e=-1;++$e=0;)$e.push(zt=gt[lt]),zt.parent=We,zt.depth=We.depth+1;Le&&(We.value=0),We.children=gt}else Le&&(We.value=+Le.call(Fe,We,We.depth)||0),delete We.children;return oo(Ve,function(Ut){var Vt,Qt;re&&(Vt=Ut.children)&&Vt.sort(re),Le&&(Qt=Ut.parent)&&(Qt.value+=Ut.value)}),tt}return Fe.sort=function(Ve){return arguments.length?(re=Ve,Fe):re},Fe.children=function(Ve){return arguments.length?(ve=Ve,Fe):ve},Fe.value=function(Ve){return arguments.length?(Le=Ve,Fe):Le},Fe.revalue=function(Ve){return Le&&(Qs(Ve,function(We){We.children&&(We.value=0)}),oo(Ve,function(We){var $e;We.children||(We.value=+Le.call(Fe,We,We.depth)||0),($e=We.parent)&&($e.value+=We.value)})),Ve},Fe},s.layout.partition=function(){var re=s.layout.hierarchy(),ve=[1,1];function Le(We,$e,tt,lt){var gt=We.children;if(We.x=$e,We.y=We.depth*lt,We.dx=tt,We.dy=lt,gt&&(zt=gt.length)){var zt,Ut,Vt,Qt=-1;for(tt=We.value?tt/We.value:0;++Qttt&&(tt=Fe),$e.push(Fe)}for(Le=0;LeVe&&(Fe=Le,Ve=ve);return Fe}function gs(re){return re.reduce(ql,0)}function ql(re,ve){return re+ve[1]}function Sl(re,ve){return _u(re,Math.ceil(Math.log(ve.length)/Math.LN2+1))}function _u(re,ve){for(var Le=-1,Fe=+re[0],Ve=(re[1]-Fe)/ve,We=[];++Le<=ve;)We[Le]=Ve*Le+Fe;return We}function El(re){return[s.min(re),s.max(re)]}function nl(re,ve){return re.value-ve.value}function zs(re,ve){var Le=re._pack_next;re._pack_next=ve,ve._pack_prev=re,ve._pack_next=Le,Le._pack_prev=ve}function Ds(re,ve){re._pack_next=ve,ve._pack_prev=re}function bi(re,ve){var Le=ve.x-re.x,Fe=ve.y-re.y,Ve=re.r+ve.r;return .999*Ve*Ve>Le*Le+Fe*Fe}function vs(re){if((ve=re.children)&&(lt=ve.length)){var ve,Le,Fe,Ve,We,$e,tt,lt,gt=1/0,zt=-1/0,Ut=1/0,Vt=-1/0;if(ve.forEach(ms),(Le=ve[0]).x=-Le.r,Le.y=0,xn(Le),lt>1&&((Fe=ve[1]).x=Fe.r,Fe.y=0,xn(Fe),lt>2))for(li(Le,Fe,Ve=ve[2]),xn(Ve),zs(Le,Ve),Le._pack_prev=Ve,zs(Ve,Fe),Fe=Le._pack_next,We=3;We0)for($e=-1;++$e=Ut[0]&<<=Ut[1]&&((tt=gt[s.bisect(Vt,lt,1,gn)-1]).y+=en,tt.push(We[$e]));return gt}return Ve.value=function(We){return arguments.length?(ve=We,Ve):ve},Ve.range=function(We){return arguments.length?(Le=qn(We),Ve):Le},Ve.bins=function(We){return arguments.length?(Fe=typeof We=="number"?function($e){return _u($e,We)}:qn(We),Ve):Fe},Ve.frequency=function(We){return arguments.length?(re=!!We,Ve):re},Ve},s.layout.pack=function(){var re,ve=s.layout.hierarchy().sort(nl),Le=0,Fe=[1,1];function Ve(We,$e){var tt=ve.call(this,We,$e),lt=tt[0],gt=Fe[0],zt=Fe[1],Ut=re==null?Math.sqrt:typeof re=="function"?re:function(){return re};if(lt.x=lt.y=0,oo(lt,function(Qt){Qt.r=+Ut(Qt.value)}),oo(lt,vs),Le){var Vt=Le*(re?1:Math.max(2*lt.r/gt,2*lt.r/zt))/2;oo(lt,function(Qt){Qt.r+=Vt}),oo(lt,vs),oo(lt,function(Qt){Qt.r-=Vt})}return oi(lt,gt/2,zt/2,re?1:1/Math.max(2*lt.r/gt,2*lt.r/zt)),tt}return Ve.size=function(We){return arguments.length?(Fe=We,Ve):Fe},Ve.radius=function(We){return arguments.length?(re=We==null||typeof We=="function"?We:+We,Ve):re},Ve.padding=function(We){return arguments.length?(Le=+We,Ve):Le},Os(Ve,ve)},s.layout.tree=function(){var re=s.layout.hierarchy().sort(null).value(null),ve=es,Le=[1,1],Fe=null;function Ve(lt,gt){var zt=re.call(this,lt,gt),Ut=zt[0],Vt=function(xn){for(var an,zn={A:null,children:[xn]},Vn=[zn];(an=Vn.pop())!=null;)for(var nr,rr=an.children,Tr=0,Ar=rr.length;Trgn.x&&(gn=xn),xn.depth>en.depth&&(en=xn)});var sn=ve(Qt,gn)/2-Qt.x,rn=Le[0]/(gn.x+ve(gn,Qt)/2+sn),Mn=Le[1]/(en.depth||1);Qs(Ut,function(xn){xn.x=(xn.x+sn)*rn,xn.y=xn.depth*Mn})}return zt}function We(lt){var gt=lt.children,zt=lt.parent.children,Ut=lt.i?zt[lt.i-1]:null;if(gt.length){(function(Qt){for(var gn,en=0,sn=0,rn=Qt.children,Mn=rn.length;--Mn>=0;)(gn=rn[Mn]).z+=en,gn.m+=en,en+=gn.s+(sn+=gn.c)})(lt);var Vt=(gt[0].z+gt[gt.length-1].z)/2;Ut?(lt.z=Ut.z+ve(lt._,Ut._),lt.m=lt.z-Vt):lt.z=Vt}else Ut&&(lt.z=Ut.z+ve(lt._,Ut._));lt.parent.A=function(Qt,gn,en){if(gn){for(var sn,rn=Qt,Mn=Qt,xn=gn,an=rn.parent.children[0],zn=rn.m,Vn=Mn.m,nr=xn.m,rr=an.m;xn=Gl(xn),rn=zo(rn),xn&&rn;)an=zo(an),(Mn=Gl(Mn)).a=Qt,(sn=xn.z+nr-rn.z-zn+ve(xn._,rn._))>0&&(wu(Fs(xn,Qt,en),Qt,sn),zn+=sn,Vn+=sn),nr+=xn.m,zn+=rn.m,rr+=an.m,Vn+=Mn.m;xn&&!Gl(Mn)&&(Mn.t=xn,Mn.m+=nr-Vn),rn&&!zo(an)&&(an.t=rn,an.m+=zn-rr,en=Qt)}return en}(lt,Ut,lt.parent.A||zt[0])}function $e(lt){lt._.x=lt.z+lt.parent.m,lt.m+=lt.parent.m}function tt(lt){lt.x*=Le[0],lt.y=lt.depth*Le[1]}return Ve.separation=function(lt){return arguments.length?(ve=lt,Ve):ve},Ve.size=function(lt){return arguments.length?(Fe=(Le=lt)==null?tt:null,Ve):Fe?null:Le},Ve.nodeSize=function(lt){return arguments.length?(Fe=(Le=lt)==null?null:tt,Ve):Fe?Le:null},Os(Ve,re)},s.layout.cluster=function(){var re=s.layout.hierarchy().sort(null).value(null),ve=es,Le=[1,1],Fe=!1;function Ve(We,$e){var tt,lt=re.call(this,We,$e),gt=lt[0],zt=0;oo(gt,function(en){var sn=en.children;sn&&sn.length?(en.x=function(rn){return rn.reduce(function(Mn,xn){return Mn+xn.x},0)/rn.length}(sn),en.y=function(rn){return 1+s.max(rn,function(Mn){return Mn.y})}(sn)):(en.x=tt?zt+=ve(en,tt):0,en.y=0,tt=en)});var Ut=Tu(gt),Vt=Bs(gt),Qt=Ut.x-ve(Ut,Vt)/2,gn=Vt.x+ve(Vt,Ut)/2;return oo(gt,Fe?function(en){en.x=(en.x-gt.x)*Le[0],en.y=(gt.y-en.y)*Le[1]}:function(en){en.x=(en.x-Qt)/(gn-Qt)*Le[0],en.y=(1-(gt.y?en.y/gt.y:1))*Le[1]}),lt}return Ve.separation=function(We){return arguments.length?(ve=We,Ve):ve},Ve.size=function(We){return arguments.length?(Fe=(Le=We)==null,Ve):Fe?null:Le},Ve.nodeSize=function(We){return arguments.length?(Fe=(Le=We)!=null,Ve):Fe?Le:null},Os(Ve,re)},s.layout.treemap=function(){var re,ve=s.layout.hierarchy(),Le=Math.round,Fe=[1,1],Ve=null,We=ts,$e=!1,tt="squarify",lt=.5*(1+Math.sqrt(5));function gt(en,sn){for(var rn,Mn,xn=-1,an=en.length;++xn0;)zn.push(rn=Vn[xn-1]),zn.area+=rn.area,tt!=="squarify"||(Mn=Vt(zn,rr))<=nr?(Vn.pop(),nr=Mn):(zn.area-=zn.pop().area,Qt(zn,rr,an,!1),rr=Math.min(an.dx,an.dy),zn.length=zn.area=0,nr=1/0);zn.length&&(Qt(zn,rr,an,!0),zn.length=zn.area=0),sn.forEach(zt)}}function Ut(en){var sn=en.children;if(sn&&sn.length){var rn,Mn=We(en),xn=sn.slice(),an=[];for(gt(xn,Mn.dx*Mn.dy/en.value),an.area=0;rn=xn.pop();)an.push(rn),an.area+=rn.area,rn.z!=null&&(Qt(an,rn.z?Mn.dx:Mn.dy,Mn,!xn.length),an.length=an.area=0);sn.forEach(Ut)}}function Vt(en,sn){for(var rn,Mn=en.area,xn=0,an=1/0,zn=-1,Vn=en.length;++znxn&&(xn=rn));return sn*=sn,(Mn*=Mn)?Math.max(sn*xn*lt/Mn,Mn/(sn*an*lt)):1/0}function Qt(en,sn,rn,Mn){var xn,an=-1,zn=en.length,Vn=rn.x,nr=rn.y,rr=sn?Le(en.area/sn):0;if(sn==rn.dx){for((Mn||rr>rn.dy)&&(rr=rn.dy);++anrn.dx)&&(rr=rn.dx);++an1);return re+ve*Fe*Math.sqrt(-2*Math.log(We)/We)}},logNormal:function(){var re=s.random.normal.apply(s,arguments);return function(){return Math.exp(re())}},bates:function(re){var ve=s.random.irwinHall(re);return function(){return ve()/re}},irwinHall:function(re){return function(){for(var ve=0,Le=0;Le2?ha:js,gt=Fe?Ls:yu;return Ve=lt(re,ve,gt,Le),We=lt(ve,re,gt,qa),tt}function tt(lt){return Ve(lt)}return tt.invert=function(lt){return We(lt)},tt.domain=function(lt){return arguments.length?(re=lt.map(Number),$e()):re},tt.range=function(lt){return arguments.length?(ve=lt,$e()):ve},tt.rangeRound=function(lt){return tt.range(lt).interpolate(Gu)},tt.clamp=function(lt){return arguments.length?(Fe=lt,$e()):Fe},tt.interpolate=function(lt){return arguments.length?(Le=lt,$e()):Le},tt.ticks=function(lt){return Ga(re,lt)},tt.tickFormat=function(lt,gt){return d3_scale_linearTickFormat(re,lt,gt)},tt.nice=function(lt){return lo(re,lt),$e()},tt.copy=function(){return Ia(re,ve,Le,Fe)},$e()}function ys(re,ve){return s.rebind(re,ve,"range","rangeRound","interpolate","clamp")}function lo(re,ve){return $i(re,va(ea(re,ve)[2])),$i(re,va(ea(re,ve)[2])),re}function ea(re,ve){ve==null&&(ve=10);var Le=Oi(re),Fe=Le[1]-Le[0],Ve=Math.pow(10,Math.floor(Math.log(Fe/ve)/Math.LN10)),We=ve/Fe*Ve;return We<=.15?Ve*=10:We<=.35?Ve*=5:We<=.75&&(Ve*=2),Le[0]=Math.ceil(Le[0]/Ve)*Ve,Le[1]=Math.floor(Le[1]/Ve)*Ve+.5*Ve,Le[2]=Ve,Le}function Ga(re,ve){return s.range.apply(s,ea(re,ve))}function Wl(re,ve,Le,Fe){function Ve(tt){return(Le?Math.log(tt<0?0:tt):-Math.log(tt>0?0:-tt))/Math.log(ve)}function We(tt){return Le?Math.pow(ve,tt):-Math.pow(ve,-tt)}function $e(tt){return re(Ve(tt))}return $e.invert=function(tt){return We(re.invert(tt))},$e.domain=function(tt){return arguments.length?(Le=tt[0]>=0,re.domain((Fe=tt.map(Number)).map(Ve)),$e):Fe},$e.base=function(tt){return arguments.length?(ve=+tt,re.domain(Fe.map(Ve)),$e):ve},$e.nice=function(){var tt=$i(Fe.map(Ve),Le?Math:Zl);return re.domain(tt),Fe=tt.map(We),$e},$e.ticks=function(){var tt=Oi(Fe),lt=[],gt=tt[0],zt=tt[1],Ut=Math.floor(Ve(gt)),Vt=Math.ceil(Ve(zt)),Qt=ve%1?2:ve;if(isFinite(Vt-Ut)){if(Le){for(;Ut0;gn--)lt.push(We(Ut)*gn);for(Ut=0;lt[Ut]zt;Vt--);lt=lt.slice(Ut,Vt)}return lt},$e.copy=function(){return Wl(re.copy(),ve,Le,Fe)},ys($e,re)}s.scale.linear=function(){return Ia([0,1],[0,1],qa,!1)},s.scale.log=function(){return Wl(s.scale.linear().domain([0,1]),10,!0,[1,10])};var Zl={floor:function(re){return-Math.ceil(-re)},ceil:function(re){return-Math.floor(-re)}};function Sa(re,ve,Le){var Fe=Cr(ve),Ve=Cr(1/ve);function We($e){return re(Fe($e))}return We.invert=function($e){return Ve(re.invert($e))},We.domain=function($e){return arguments.length?(re.domain((Le=$e.map(Number)).map(Fe)),We):Le},We.ticks=function($e){return Ga(Le,$e)},We.tickFormat=function($e,tt){return d3_scale_linearTickFormat(Le,$e,tt)},We.nice=function($e){return We.domain(lo(Le,$e))},We.exponent=function($e){return arguments.length?(Fe=Cr(ve=$e),Ve=Cr(1/ve),re.domain(Le.map(Fe)),We):ve},We.copy=function(){return Sa(re.copy(),ve,Le)},ys(We,re)}function Cr(re){return function(ve){return ve<0?-Math.pow(-ve,re):Math.pow(ve,re)}}function Us(re,ve){var Le,Fe,Ve;function We(tt){return Fe[((Le.get(tt)||(ve.t==="range"?Le.set(tt,re.push(tt)):NaN))-1)%Fe.length]}function $e(tt,lt){return s.range(re.length).map(function(gt){return tt+lt*gt})}return We.domain=function(tt){if(!arguments.length)return re;re=[],Le=new k;for(var lt,gt=-1,zt=tt.length;++gt0?Le[We-1]:re[0],WeVt?0:1;if(zt=qt)return lt(zt,gn)+(gt?lt(gt,1-gn):"")+"Z";var en,sn,rn,Mn,xn,an,zn,Vn,nr,rr,Tr,Ar,mr=0,wr=0,Rr=[];if((Mn=(+$e.apply(this,arguments)||0)/2)&&(rn=Fe===Cl?Math.sqrt(gt*gt+zt*zt):+Fe.apply(this,arguments),gn||(wr*=-1),zt&&(wr=Ge(rn/zt*Math.sin(Mn))),gt&&(mr=Ge(rn/gt*Math.sin(Mn)))),zt){xn=zt*Math.cos(Ut+wr),an=zt*Math.sin(Ut+wr),zn=zt*Math.cos(Vt-wr),Vn=zt*Math.sin(Vt-wr);var Jr=Math.abs(Vt-Ut-2*wr)<=It?0:1;if(wr&&_o(xn,an,zn,Vn)===gn^Jr){var Kr=(Ut+Vt)/2;xn=zt*Math.cos(Kr),an=zt*Math.sin(Kr),zn=Vn=null}}else xn=an=0;if(gt){nr=gt*Math.cos(Vt-mr),rr=gt*Math.sin(Vt-mr),Tr=gt*Math.cos(Ut+mr),Ar=gt*Math.sin(Ut+mr);var xr=Math.abs(Ut-Vt+2*mr)<=It?0:1;if(mr&&_o(nr,rr,Tr,Ar)===1-gn^xr){var zr=(Ut+Vt)/2;nr=gt*Math.cos(zr),rr=gt*Math.sin(zr),Tr=Ar=null}}else nr=rr=0;if(Qt>Dt&&(en=Math.min(Math.abs(zt-gt)/2,+Le.apply(this,arguments)))>.001){sn=gt0?0:1}function co(re,ve,Le,Fe,Ve){var We=re[0]-ve[0],$e=re[1]-ve[1],tt=(Ve?Fe:-Fe)/Math.sqrt(We*We+$e*$e),lt=tt*$e,gt=-tt*We,zt=re[0]+lt,Ut=re[1]+gt,Vt=ve[0]+lt,Qt=ve[1]+gt,gn=(zt+Vt)/2,en=(Ut+Qt)/2,sn=Vt-zt,rn=Qt-Ut,Mn=sn*sn+rn*rn,xn=Le-Fe,an=zt*Qt-Vt*Ut,zn=(rn<0?-1:1)*Math.sqrt(Math.max(0,xn*xn*Mn-an*an)),Vn=(an*rn-sn*zn)/Mn,nr=(-an*sn-rn*zn)/Mn,rr=(an*rn+sn*zn)/Mn,Tr=(-an*sn+rn*zn)/Mn,Ar=Vn-gn,mr=nr-en,wr=rr-gn,Rr=Tr-en;return Ar*Ar+mr*mr>wr*wr+Rr*Rr&&(Vn=rr,nr=Tr),[[Vn-lt,nr-gt],[Vn*Le/xn,nr*Le/xn]]}function Hs(){return!0}function xa(re){var ve=jn,Le=$n,Fe=Hs,Ve=vi,We=Ve.key,$e=.7;function tt(lt){var gt,zt=[],Ut=[],Vt=-1,Qt=lt.length,gn=qn(ve),en=qn(Le);function sn(){zt.push("M",Ve(re(Ut),$e))}for(;++Vt1&&Ve.push("H",Fe[0]),Ve.join("")},"step-before":to,"step-after":ho,basis:di,"basis-open":function(re){if(re.length<4)return vi(re);for(var ve,Le=[],Fe=-1,Ve=re.length,We=[0],$e=[0];++Fe<3;)ve=re[Fe],We.push(ve[0]),$e.push(ve[1]);for(Le.push(oa(Bo,We)+","+oa(Bo,$e)),--Fe;++Fe9&&(We=3*Le/Math.sqrt(We),tt[lt]=We*Fe,tt[lt+1]=We*Ve);for(lt=-1;++lt<=gt;)We=(ve[Math.min(gt,lt+1)][0]-ve[Math.max(0,lt-1)][0])/(6*(1+tt[lt]*tt[lt])),$e.push([We||0,tt[lt]*We||0]);return $e}(re))}});function vi(re){return re.length>1?re.join("L"):re+"Z"}function Ll(re){return re.join("L")+"Z"}function to(re){for(var ve=0,Le=re.length,Fe=re[0],Ve=[Fe[0],",",Fe[1]];++ve1){tt=ve[1],We=re[lt],lt++,Fe+="C"+(Ve[0]+$e[0])+","+(Ve[1]+$e[1])+","+(We[0]-tt[0])+","+(We[1]-tt[1])+","+We[0]+","+We[1];for(var gt=2;gtIt)+",1 "+zt}function lt(gt,zt,Ut,Vt){return"Q 0,0 "+Vt}return We.radius=function(gt){return arguments.length?(Le=qn(gt),We):Le},We.source=function(gt){return arguments.length?(re=qn(gt),We):re},We.target=function(gt){return arguments.length?(ve=qn(gt),We):ve},We.startAngle=function(gt){return arguments.length?(Fe=qn(gt),We):Fe},We.endAngle=function(gt){return arguments.length?(Ve=qn(gt),We):Ve},We},s.svg.diagonal=function(){var re=Fr,ve=Ur,Le=is;function Fe(Ve,We){var $e=re.call(this,Ve,We),tt=ve.call(this,Ve,We),lt=($e.y+tt.y)/2,gt=[$e,{x:$e.x,y:lt},{x:tt.x,y:lt},tt];return"M"+(gt=gt.map(Le))[0]+"C"+gt[1]+" "+gt[2]+" "+gt[3]}return Fe.source=function(Ve){return arguments.length?(re=qn(Ve),Fe):re},Fe.target=function(Ve){return arguments.length?(ve=qn(Ve),Fe):ve},Fe.projection=function(Ve){return arguments.length?(Le=Ve,Fe):Le},Fe},s.svg.diagonal.radial=function(){var re=s.svg.diagonal(),ve=is,Le=re.projection;return re.projection=function(Fe){return arguments.length?Le(To(ve=Fe)):ve},re},s.svg.symbol=function(){var re=$l,ve=_a;function Le(Fe,Ve){return(ll.get(re.call(this,Fe,Ve))||Fa)(ve.call(this,Fe,Ve))}return Le.type=function(Fe){return arguments.length?(re=qn(Fe),Le):re},Le.size=function(Fe){return arguments.length?(ve=qn(Fe),Le):ve},Le};var ll=s.map({circle:Fa,cross:function(re){var ve=Math.sqrt(re/5)/2;return"M"+-3*ve+","+-ve+"H"+-ve+"V"+-3*ve+"H"+ve+"V"+-ve+"H"+3*ve+"V"+ve+"H"+ve+"V"+3*ve+"H"+-ve+"V"+ve+"H"+-3*ve+"Z"},diamond:function(re){var ve=Math.sqrt(re/(2*_i)),Le=ve*_i;return"M0,"+-ve+"L"+Le+",0 0,"+ve+" "+-Le+",0Z"},square:function(re){var ve=Math.sqrt(re)/2;return"M"+-ve+","+-ve+"L"+ve+","+-ve+" "+ve+","+ve+" "+-ve+","+ve+"Z"},"triangle-down":function(re){var ve=Math.sqrt(re/as),Le=ve*as/2;return"M0,"+Le+"L"+ve+","+-Le+" "+-ve+","+-Le+"Z"},"triangle-up":function(re){var ve=Math.sqrt(re/as),Le=ve*as/2;return"M0,"+-Le+"L"+ve+","+Le+" "+-ve+","+Le+"Z"}});s.svg.symbolTypes=ll.keys();var as=Math.sqrt(3),_i=Math.tan(30*Je);fe.transition=function(re){for(var ve,Le,Fe=rt||++Mt,Ve=$(re),We=[],$e=ct||{time:Date.now(),ease:Xo,delay:0,duration:250},tt=-1,lt=this.length;++tt0;)gt[--rn].call(re,sn);if(en>=1)return Ut.event&&Ut.event.end.call(re,re.__data__,ve),--zt.count?delete zt[Fe]:delete re[Le],1}Ut||(We=Ve.time,$e=$t(function(gn){var en=Ut.delay;if($e.t=en+We,en<=gn)return Vt(gn-en);$e.c=Vt},0,We),Ut=zt[Fe]={tween:new k,time:We,timer:$e,delay:Ve.delay,duration:Ve.duration,ease:Ve.ease,index:ve},Ve=null,++zt.count)}vt.call=fe.call,vt.empty=fe.empty,vt.node=fe.node,vt.size=fe.size,s.transition=function(re,ve){return re&&re.transition?rt?re.transition(ve):re:s.selection().transition(re)},s.transition.prototype=vt,vt.select=function(re){var ve,Le,Fe,Ve=this.id,We=this.namespace,$e=[];re=xe(re);for(var tt=-1,lt=this.length;++ttrect,.s>rect").attr("width",We[1]-We[0])}function Qt(en){en.select(".extent").attr("y",$e[0]),en.selectAll(".extent,.e>rect,.w>rect").attr("height",$e[1]-$e[0])}function gn(){var en,sn,rn=this,Mn=s.select(s.event.target),xn=Le.of(rn,arguments),an=s.select(rn),zn=Mn.datum(),Vn=!/^(n|s)$/.test(zn)&&Fe,nr=!/^(e|w)$/.test(zn)&&Ve,rr=Mn.classed("extent"),Tr=yt(rn),Ar=s.mouse(rn),mr=s.select(t(rn)).on("keydown.brush",Jr).on("keyup.brush",Kr);if(s.event.changedTouches?mr.on("touchmove.brush",xr).on("touchend.brush",Wr):mr.on("mousemove.brush",xr).on("mouseup.brush",Wr),an.interrupt().selectAll("*").interrupt(),rr)Ar[0]=We[0]-Ar[0],Ar[1]=$e[0]-Ar[1];else if(zn){var wr=+/w$/.test(zn),Rr=+/^n/.test(zn);sn=[We[1-wr]-Ar[0],$e[1-Rr]-Ar[1]],Ar[0]=We[wr],Ar[1]=$e[Rr]}else s.event.altKey&&(en=Ar.slice());function Jr(){s.event.keyCode==32&&(rr||(en=null,Ar[0]-=We[1],Ar[1]-=$e[1],rr=2),ee())}function Kr(){s.event.keyCode==32&&rr==2&&(Ar[0]+=We[1],Ar[1]+=$e[1],rr=0,ee())}function xr(){var Gr=s.mouse(rn),ii=!1;sn&&(Gr[0]+=sn[0],Gr[1]+=sn[1]),rr||(s.event.altKey?(en||(en=[(We[0]+We[1])/2,($e[0]+$e[1])/2]),Ar[0]=We[+(Gr[0]>>1;a.dtype||(a.dtype="array"),typeof a.dtype=="string"?c=new(i(a.dtype))(d):a.dtype&&(c=a.dtype,Array.isArray(c)&&(c.length=d));for(var v=0;vu||H>1073741824){for(var K=0;Kpe+Re||ae>ye+Re||oe=fe||Ae===Me)){var Ce=x[we];Me===void 0&&(Me=Ce.length);for(var ne=Ae;ne=ee&&me<=Y&&Te>=Q&&Te<=X&&xe.push(ue)}var Ee=g[we],Ue=Ee[4*Ae+0],De=Ee[4*Ae+1],je=Ee[4*Ae+2],ge=Ee[4*Ae+3],be=de(Ee,Ae+1),Se=.5*Re,Ne=we+1;he(pe,ye,Se,Ne,Ue,De||je||ge||be),he(pe,ye+Se,Se,Ne,De,je||ge||be),he(pe+Se,ye,Se,Ne,je,ge||be),he(pe+Se,ye+Se,Se,Ne,ge,be)}}function de(pe,ye){for(var Re=null,we=0;Re===null;)if(Re=pe[4*ye+we],++we>pe.length)return null;return Re}return he(0,0,1,0,0,1),xe},c;function I(U,B,G,N,j){for(var V=[],H=0;H0){l+=Math.abs(T(f[0]));for(var t=1;t2){for(o=0;o=0))throw new Error("precision must be a positive number");var u=Math.pow(10,a||0);return Math.round(o*u)/u},E.radiansToLength=t,E.lengthToRadians=i,E.lengthToDegrees=function(o,a){return r(i(o,a))},E.bearingToAzimuth=function(o){var a=o%360;return a<0&&(a+=360),a},E.radiansToDegrees=r,E.degreesToRadians=function(o){return o%360*Math.PI/180},E.convertLength=function(o,a,u){if(a===void 0&&(a="kilometers"),u===void 0&&(u="kilometers"),!(o>=0))throw new Error("length must be a positive number");return t(i(o,a),u)},E.convertArea=function(o,a,u){if(a===void 0&&(a="meters"),u===void 0&&(u="kilometers"),!(o>=0))throw new Error("area must be a positive number");var p=E.areaFactors[a];if(!p)throw new Error("invalid original units");var c=E.areaFactors[u];if(!c)throw new Error("invalid final units");return o/p*c},E.isNumber=n,E.isObject=function(o){return!!o&&o.constructor===Object},E.validateBBox=function(o){if(!o)throw new Error("bbox is required");if(!Array.isArray(o))throw new Error("bbox must be an Array");if(o.length!==4&&o.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");o.forEach(function(a){if(!n(a))throw new Error("bbox must only contain numbers")})},E.validateId=function(o){if(!o)throw new Error("id is required");if(["string","number"].indexOf(typeof o)===-1)throw new Error("id must be a number or a string")}},60302:function(D,E,e){Object.defineProperty(E,"__esModule",{value:!0});var _=e(23132);function w(i,r,n){if(i!==null)for(var o,a,u,p,c,b,d,v,x=0,g=0,y=i.type,k=y==="FeatureCollection",h=y==="Feature",M=k?i.features.length:1,A=0;Ab||k>d||h>v)return c=x,b=o,d=k,v=h,void(u=0);var M=_.lineString([c,x],n.properties);if(r(M,o,a,h,u)===!1)return!1;u++,c=x})!==!1&&void 0}}})}function t(i,r){if(!i)throw new Error("geojson is required");f(i,function(n,o,a){if(n.geometry!==null){var u=n.geometry.type,p=n.geometry.coordinates;switch(u){case"LineString":if(r(n,o,a,0,0)===!1)return!1;break;case"Polygon":for(var c=0;cm[0]&&(T[0]=m[0]),T[1]>m[1]&&(T[1]=m[1]),T[2]=0))throw new Error("precision must be a positive number");var u=Math.pow(10,a||0);return Math.round(o*u)/u},E.radiansToLength=t,E.lengthToRadians=i,E.lengthToDegrees=function(o,a){return r(i(o,a))},E.bearingToAzimuth=function(o){var a=o%360;return a<0&&(a+=360),a},E.radiansToDegrees=r,E.degreesToRadians=function(o){return o%360*Math.PI/180},E.convertLength=function(o,a,u){if(a===void 0&&(a="kilometers"),u===void 0&&(u="kilometers"),!(o>=0))throw new Error("length must be a positive number");return t(i(o,a),u)},E.convertArea=function(o,a,u){if(a===void 0&&(a="meters"),u===void 0&&(u="kilometers"),!(o>=0))throw new Error("area must be a positive number");var p=E.areaFactors[a];if(!p)throw new Error("invalid original units");var c=E.areaFactors[u];if(!c)throw new Error("invalid final units");return o/p*c},E.isNumber=n,E.isObject=function(o){return!!o&&o.constructor===Object},E.validateBBox=function(o){if(!o)throw new Error("bbox is required");if(!Array.isArray(o))throw new Error("bbox must be an Array");if(o.length!==4&&o.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");o.forEach(function(a){if(!n(a))throw new Error("bbox must only contain numbers")})},E.validateId=function(o){if(!o)throw new Error("id is required");if(["string","number"].indexOf(typeof o)===-1)throw new Error("id must be a number or a string")}},27138:function(D,E,e){Object.defineProperty(E,"__esModule",{value:!0});var _=e(94228);function w(i,r,n){if(i!==null)for(var o,a,u,p,c,b,d,v,x=0,g=0,y=i.type,k=y==="FeatureCollection",h=y==="Feature",M=k?i.features.length:1,A=0;Ab||k>d||h>v)return c=x,b=o,d=k,v=h,void(u=0);var M=_.lineString([c,x],n.properties);if(r(M,o,a,h,u)===!1)return!1;u++,c=x})!==!1&&void 0}}})}function t(i,r){if(!i)throw new Error("geojson is required");f(i,function(n,o,a){if(n.geometry!==null){var u=n.geometry.type,p=n.geometry.coordinates;switch(u){case"LineString":if(r(n,o,a,0,0)===!1)return!1;break;case"Polygon":for(var c=0;c=0))throw new Error("precision must be a positive number");var u=Math.pow(10,a||0);return Math.round(o*u)/u},E.radiansToLength=t,E.lengthToRadians=i,E.lengthToDegrees=function(o,a){return r(i(o,a))},E.bearingToAzimuth=function(o){var a=o%360;return a<0&&(a+=360),a},E.radiansToDegrees=r,E.degreesToRadians=function(o){return o%360*Math.PI/180},E.convertLength=function(o,a,u){if(a===void 0&&(a="kilometers"),u===void 0&&(u="kilometers"),!(o>=0))throw new Error("length must be a positive number");return t(i(o,a),u)},E.convertArea=function(o,a,u){if(a===void 0&&(a="meters"),u===void 0&&(u="kilometers"),!(o>=0))throw new Error("area must be a positive number");var p=E.areaFactors[a];if(!p)throw new Error("invalid original units");var c=E.areaFactors[u];if(!c)throw new Error("invalid final units");return o/p*c},E.isNumber=n,E.isObject=function(o){return!!o&&o.constructor===Object},E.validateBBox=function(o){if(!o)throw new Error("bbox is required");if(!Array.isArray(o))throw new Error("bbox must be an Array");if(o.length!==4&&o.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");o.forEach(function(a){if(!n(a))throw new Error("bbox must only contain numbers")})},E.validateId=function(o){if(!o)throw new Error("id is required");if(["string","number"].indexOf(typeof o)===-1)throw new Error("id must be a number or a string")},E.radians2degrees=function(){throw new Error("method has been renamed to `radiansToDegrees`")},E.degrees2radians=function(){throw new Error("method has been renamed to `degreesToRadians`")},E.distanceToDegrees=function(){throw new Error("method has been renamed to `lengthToDegrees`")},E.distanceToRadians=function(){throw new Error("method has been renamed to `lengthToRadians`")},E.radiansToDistance=function(){throw new Error("method has been renamed to `radiansToLength`")},E.bearingToAngle=function(){throw new Error("method has been renamed to `bearingToAzimuth`")},E.convertDistance=function(){throw new Error("method has been renamed to `convertLength`")}},88553:function(D,E,e){Object.defineProperty(E,"__esModule",{value:!0});var _=e(64182);function w(i,r,n){if(i!==null)for(var o,a,u,p,c,b,d,v,x=0,g=0,y=i.type,k=y==="FeatureCollection",h=y==="Feature",M=k?i.features.length:1,A=0;Ab||k>d||h>v)return c=x,b=o,d=k,v=h,void(u=0);var M=_.lineString([c,x],n.properties);if(r(M,o,a,h,u)===!1)return!1;u++,c=x})!==!1&&void 0}}})}function t(i,r){if(!i)throw new Error("geojson is required");f(i,function(n,o,a){if(n.geometry!==null){var u=n.geometry.type,p=n.geometry.coordinates;switch(u){case"LineString":if(r(n,o,a,0,0)===!1)return!1;break;case"Polygon":for(var c=0;cs&&(s=E[m]),E[m]1?j-1:0),H=1;H1?j-1:0),H=1;H1?j-1:0),H=1;H1?j-1:0),H=1;H"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function t(k,h,M){return t=l()?Reflect.construct:function(A,C,L){var O=[null];O.push.apply(O,C);var I=new(Function.bind.apply(A,O));return L&&i(I,L.prototype),I},t.apply(null,arguments)}function i(k,h){return i=Object.setPrototypeOf||function(M,A){return M.__proto__=A,M},i(k,h)}function r(k){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(h){return h.__proto__||Object.getPrototypeOf(h)},r(k)}function n(k){return n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},n(k)}var o=e(43827).inspect,a=e(79616).codes.ERR_INVALID_ARG_TYPE;function u(k,h,M){return(M===void 0||M>k.length)&&(M=k.length),k.substring(M-h.length,M)===h}var p="",c="",b="",d="",v={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function x(k){var h=Object.keys(k),M=Object.create(Object.getPrototypeOf(k));return h.forEach(function(A){M[A]=k[A]}),Object.defineProperty(M,"message",{value:k.message}),M}function g(k){return o(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var m=function(k){function h(C){var L;if(function(Q,X){if(!(Q instanceof X))throw new TypeError("Cannot call a class as a function")}(this,h),n(C)!=="object"||C===null)throw new a("options","Object",C);var O=C.message,I=C.operator,R=C.stackStartFn,U=C.actual,B=C.expected,G=Error.stackTraceLimit;if(Error.stackTraceLimit=0,O!=null)L=T(this,r(h).call(this,String(O)));else if(_.stderr&&_.stderr.isTTY&&(_.stderr&&_.stderr.getColorDepth&&_.stderr.getColorDepth()!==1?(p="\x1B[34m",c="\x1B[32m",d="\x1B[39m",b="\x1B[31m"):(p="",c="",d="",b="")),n(U)==="object"&&U!==null&&n(B)==="object"&&B!==null&&"stack"in U&&U instanceof Error&&"stack"in B&&B instanceof Error&&(U=x(U),B=x(B)),I==="deepStrictEqual"||I==="strictEqual")L=T(this,r(h).call(this,function(Q,X,Y){var K="",te="",ae=0,oe="",se=!1,fe=g(Q),ye=fe.split(` -`),pe=g(X).split(` -`),de=0,he="";if(Y==="strictEqual"&&n(Q)==="object"&&n(X)==="object"&&Q!==null&&X!==null&&(Y="strictEqualObject"),ye.length===1&&pe.length===1&&ye[0]!==pe[0]){var xe=ye[0].length+pe[0].length;if(xe<=10){if(!(n(Q)==="object"&&Q!==null||n(X)==="object"&&X!==null||Q===0&&X===0))return"".concat(v[Y],` - -`)+"".concat(ye[0]," !== ").concat(pe[0],` -`)}else if(Y!=="strictEqualObject"&&xe<(_.stderr&&_.stderr.isTTY?_.stderr.columns:80)){for(;ye[0][de]===pe[0][de];)de++;de>2&&(he=` - `.concat(function(De,je){if(je=Math.floor(je),De.length==0||je==0)return"";var ge=De.length*je;for(je=Math.floor(Math.log(je)/Math.log(2));je;)De+=De,je--;return De+De.substring(0,ge-De.length)}(" ",de),"^"),de=0)}}for(var Re=ye[ye.length-1],we=pe[pe.length-1];Re===we&&(de++<2?oe=` - `.concat(Re).concat(oe):K=Re,ye.pop(),pe.pop(),ye.length!==0&&pe.length!==0);)Re=ye[ye.length-1],we=pe[pe.length-1];var Ae=Math.max(ye.length,pe.length);if(Ae===0){var Me=fe.split(` +`))}throw V}},x.strict=c(B,x,{equal:x.strictEqual,deepEqual:x.deepStrictEqual,notEqual:x.notStrictEqual,notDeepEqual:x.notDeepStrictEqual}),x.strict.strict=x.strict},73894:function(D,E,e){var _=e(90386);function w(k,h,M){return h in k?Object.defineProperty(k,h,{value:M,enumerable:!0,configurable:!0,writable:!0}):k[h]=M,k}function s(k,h){for(var M=0;M"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function t(k,h,M){return t=l()?Reflect.construct:function(A,C,L){var O=[null];O.push.apply(O,C);var I=new(Function.bind.apply(A,O));return L&&i(I,L.prototype),I},t.apply(null,arguments)}function i(k,h){return i=Object.setPrototypeOf||function(M,A){return M.__proto__=A,M},i(k,h)}function r(k){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(h){return h.__proto__||Object.getPrototypeOf(h)},r(k)}function n(k){return n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},n(k)}var o=e(43827).inspect,a=e(79616).codes.ERR_INVALID_ARG_TYPE;function u(k,h,M){return(M===void 0||M>k.length)&&(M=k.length),k.substring(M-h.length,M)===h}var p="",c="",b="",d="",v={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function x(k){var h=Object.keys(k),M=Object.create(Object.getPrototypeOf(k));return h.forEach(function(A){M[A]=k[A]}),Object.defineProperty(M,"message",{value:k.message}),M}function g(k){return o(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var y=function(k){function h(C){var L;if(function(Q,Y){if(!(Q instanceof Y))throw new TypeError("Cannot call a class as a function")}(this,h),n(C)!=="object"||C===null)throw new a("options","Object",C);var O=C.message,I=C.operator,R=C.stackStartFn,U=C.actual,B=C.expected,G=Error.stackTraceLimit;if(Error.stackTraceLimit=0,O!=null)L=T(this,r(h).call(this,String(O)));else if(_.stderr&&_.stderr.isTTY&&(_.stderr&&_.stderr.getColorDepth&&_.stderr.getColorDepth()!==1?(p="\x1B[34m",c="\x1B[32m",d="\x1B[39m",b="\x1B[31m"):(p="",c="",d="",b="")),n(U)==="object"&&U!==null&&n(B)==="object"&&B!==null&&"stack"in U&&U instanceof Error&&"stack"in B&&B instanceof Error&&(U=x(U),B=x(B)),I==="deepStrictEqual"||I==="strictEqual")L=T(this,r(h).call(this,function(Q,Y,X){var K="",te="",ae=0,oe="",se=!1,fe=g(Q),xe=fe.split(` +`),he=g(Y).split(` +`),de=0,pe="";if(X==="strictEqual"&&n(Q)==="object"&&n(Y)==="object"&&Q!==null&&Y!==null&&(X="strictEqualObject"),xe.length===1&&he.length===1&&xe[0]!==he[0]){var ye=xe[0].length+he[0].length;if(ye<=10){if(!(n(Q)==="object"&&Q!==null||n(Y)==="object"&&Y!==null||Q===0&&Y===0))return"".concat(v[X],` + +`)+"".concat(xe[0]," !== ").concat(he[0],` +`)}else if(X!=="strictEqualObject"&&ye<(_.stderr&&_.stderr.isTTY?_.stderr.columns:80)){for(;xe[0][de]===he[0][de];)de++;de>2&&(pe=` + `.concat(function(De,je){if(je=Math.floor(je),De.length==0||je==0)return"";var ge=De.length*je;for(je=Math.floor(Math.log(je)/Math.log(2));je;)De+=De,je--;return De+De.substring(0,ge-De.length)}(" ",de),"^"),de=0)}}for(var Re=xe[xe.length-1],we=he[he.length-1];Re===we&&(de++<2?oe=` + `.concat(Re).concat(oe):K=Re,xe.pop(),he.pop(),xe.length!==0&&he.length!==0);)Re=xe[xe.length-1],we=he[he.length-1];var Ae=Math.max(xe.length,he.length);if(Ae===0){var Me=fe.split(` `);if(Me.length>30)for(Me[26]="".concat(p,"...").concat(d);Me.length>27;)Me.pop();return"".concat(v.notIdentical,` `).concat(Me.join(` `),` `)}de>3&&(oe=` `.concat(p,"...").concat(d).concat(oe),se=!0),K!==""&&(oe=` - `.concat(K).concat(oe),K="");var Ce=0,ne=v[Y]+` -`.concat(c,"+ actual").concat(d," ").concat(b,"- expected").concat(d),ue=" ".concat(p,"...").concat(d," Lines skipped");for(de=0;de1&&de>2&&(me>4?(te+=` + `.concat(K).concat(oe),K="");var Ce=0,ne=v[X]+` +`.concat(c,"+ actual").concat(d," ").concat(b,"- expected").concat(d),ue=" ".concat(p,"...").concat(d," Lines skipped");for(de=0;de1&&de>2&&(me>4?(te+=` `.concat(p,"...").concat(d),se=!0):me>3&&(te+=` - `.concat(pe[de-2]),Ce++),te+=` - `.concat(pe[de-1]),Ce++),ae=de,K+=` -`.concat(b,"-").concat(d," ").concat(pe[de]),Ce++;else if(pe.length1&&de>2&&(me>4?(te+=` + `.concat(he[de-2]),Ce++),te+=` + `.concat(he[de-1]),Ce++),ae=de,K+=` +`.concat(b,"-").concat(d," ").concat(he[de]),Ce++;else if(he.length1&&de>2&&(me>4?(te+=` `.concat(p,"...").concat(d),se=!0):me>3&&(te+=` - `.concat(ye[de-2]),Ce++),te+=` - `.concat(ye[de-1]),Ce++),ae=de,te+=` -`.concat(c,"+").concat(d," ").concat(ye[de]),Ce++;else{var Te=pe[de],Ee=ye[de],Ue=Ee!==Te&&(!u(Ee,",")||Ee.slice(0,-1)!==Te);Ue&&u(Te,",")&&Te.slice(0,-1)===Ee&&(Ue=!1,Ee+=","),Ue?(me>1&&de>2&&(me>4?(te+=` + `.concat(xe[de-2]),Ce++),te+=` + `.concat(xe[de-1]),Ce++),ae=de,te+=` +`.concat(c,"+").concat(d," ").concat(xe[de]),Ce++;else{var Te=he[de],Ee=xe[de],Ue=Ee!==Te&&(!u(Ee,",")||Ee.slice(0,-1)!==Te);Ue&&u(Te,",")&&Te.slice(0,-1)===Ee&&(Ue=!1,Ee+=","),Ue?(me>1&&de>2&&(me>4?(te+=` `.concat(p,"...").concat(d),se=!0):me>3&&(te+=` - `.concat(ye[de-2]),Ce++),te+=` - `.concat(ye[de-1]),Ce++),ae=de,te+=` + `.concat(xe[de-2]),Ce++),te+=` + `.concat(xe[de-1]),Ce++),ae=de,te+=` `.concat(c,"+").concat(d," ").concat(Ee),K+=` `.concat(b,"-").concat(d," ").concat(Te),Ce+=2):(te+=K,K="",me!==1&&de!==0||(te+=` `.concat(Ee),Ce++))}if(Ce>20&&de30)for(j[26]="".concat(p,"...").concat(d);j.length>27;)j.pop();L=j.length===1?T(this,r(h).call(this,"".concat(N," ").concat(j[0]))):T(this,r(h).call(this,"".concat(N,` `).concat(j.join(` @@ -2443,7 +2443,7 @@ should equal -`):H=" ".concat(I," ").concat(H)),L=T(this,r(h).call(this,"".concat(V).concat(H)))}return Error.stackTraceLimit=G,L.generatedMessage=!O,Object.defineProperty(y(L),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),L.code="ERR_ASSERTION",L.actual=U,L.expected=B,L.operator=I,Error.captureStackTrace&&Error.captureStackTrace(y(L),R),L.stack,L.name="AssertionError",T(L)}var M,A;return function(C,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function");C.prototype=Object.create(L&&L.prototype,{constructor:{value:C,writable:!0,configurable:!0}}),L&&i(C,L)}(h,k),M=h,A=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:o.custom,value:function(C,L){return o(this,function(O){for(var I=1;I2?"one of ".concat(r," ").concat(i.slice(0,n-1).join(", "),", or ")+i[n-1]:n===2?"one of ".concat(r," ").concat(i[0]," or ").concat(i[1]):"of ".concat(r," ").concat(i[0])}return"of ".concat(r," ").concat(String(i))}l("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),l("ERR_INVALID_ARG_TYPE",function(i,r,n){var o,a,u,p,c;if(T===void 0&&(T=e(32791)),T(typeof i=="string","'name' must be a string"),typeof r=="string"&&(a="not ",r.substr(0,a.length)===a)?(o="must not be",r=r.replace(/^not /,"")):o="must be",function(d,v,x){return(x===void 0||x>d.length)&&(x=d.length),d.substring(x-v.length,x)===v}(i," argument"))u="The ".concat(i," ").concat(o," ").concat(t(r,"type"));else{var b=(typeof c!="number"&&(c=0),c+1>(p=i).length||p.indexOf(".",c)===-1?"argument":"property");u='The "'.concat(i,'" ').concat(b," ").concat(o," ").concat(t(r,"type"))}return u+". Received type ".concat(_(n))},TypeError),l("ERR_INVALID_ARG_VALUE",function(i,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";y===void 0&&(y=e(43827));var o=y.inspect(r);return o.length>128&&(o="".concat(o.slice(0,128),"...")),"The argument '".concat(i,"' ").concat(n,". Received ").concat(o)},TypeError),l("ERR_INVALID_RETURN_VALUE",function(i,r,n){var o;return o=n&&n.constructor&&n.constructor.name?"instance of ".concat(n.constructor.name):"type ".concat(_(n)),"Expected ".concat(i,' to be returned from the "').concat(r,'"')+" function but got ".concat(o,".")},TypeError),l("ERR_MISSING_ARGS",function(){for(var i=arguments.length,r=new Array(i),n=0;n0,"At least one arg needs to be specified");var o="The ",a=r.length;switch(r=r.map(function(u){return'"'.concat(u,'"')}),a){case 1:o+="".concat(r[0]," argument");break;case 2:o+="".concat(r[0]," and ").concat(r[1]," arguments");break;default:o+=r.slice(0,a-1).join(", "),o+=", and ".concat(r[a-1]," arguments")}return"".concat(o," must be specified")},TypeError),D.exports.codes=f},74061:function(D,E,e){function _(X,Y){return function(K){if(Array.isArray(K))return K}(X)||function(K,te){var ae=[],oe=!0,se=!1,fe=void 0;try{for(var ye,pe=K[Symbol.iterator]();!(oe=(ye=pe.next()).done)&&(ae.push(ye.value),!te||ae.length!==te);oe=!0);}catch(de){se=!0,fe=de}finally{try{oe||pe.return==null||pe.return()}finally{if(se)throw fe}}return ae}(X,Y)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function w(X){return w=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Y){return typeof Y}:function(Y){return Y&&typeof Symbol=="function"&&Y.constructor===Symbol&&Y!==Symbol.prototype?"symbol":typeof Y},w(X)}var s=/a/g.flags!==void 0,T=function(X){var Y=[];return X.forEach(function(K){return Y.push(K)}),Y},y=function(X){var Y=[];return X.forEach(function(K,te){return Y.push([te,K])}),Y},f=Object.is?Object.is:e(64003),l=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},t=Number.isNaN?Number.isNaN:e(15567);function i(X){return X.call.bind(X)}var r=i(Object.prototype.hasOwnProperty),n=i(Object.prototype.propertyIsEnumerable),o=i(Object.prototype.toString),a=e(43827).types,u=a.isAnyArrayBuffer,p=a.isArrayBufferView,c=a.isDate,b=a.isMap,d=a.isRegExp,v=a.isSet,x=a.isNativeError,g=a.isBoxedPrimitive,m=a.isNumberObject,k=a.isStringObject,h=a.isBooleanObject,M=a.isBigIntObject,A=a.isSymbolObject,C=a.isFloat32Array,L=a.isFloat64Array;function O(X){if(X.length===0||X.length>10)return!0;for(var Y=0;Y57)return!0}return X.length===10&&X>=Math.pow(2,32)}function I(X){return Object.keys(X).filter(O).concat(l(X).filter(Object.prototype.propertyIsEnumerable.bind(X)))}function R(X,Y){if(X===Y)return 0;for(var K=X.length,te=Y.length,ae=0,oe=Math.min(K,te);ae0?o-4:o;for(r=0;r>16&255,u[p++]=i>>8&255,u[p++]=255&i;return a===2&&(i=_[t.charCodeAt(r)]<<2|_[t.charCodeAt(r+1)]>>4,u[p++]=255&i),a===1&&(i=_[t.charCodeAt(r)]<<10|_[t.charCodeAt(r+1)]<<4|_[t.charCodeAt(r+2)]>>2,u[p++]=i>>8&255,u[p++]=255&i),u},E.fromByteArray=function(t){for(var i,r=t.length,n=r%3,o=[],a=16383,u=0,p=r-n;up?p:u+a));return n===1?(i=t[r-1],o.push(e[i>>2]+e[i<<4&63]+"==")):n===2&&(i=(t[r-2]<<8)+t[r-1],o.push(e[i>>10]+e[i>>4&63]+e[i<<2&63]+"=")),o.join("")};for(var e=[],_=[],w=typeof Uint8Array<"u"?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T=0,y=s.length;T0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return r===-1&&(r=i),[r,r===i?0:4-r%4]}function l(t,i,r){for(var n,o,a=[],u=i;u>18&63]+e[o>>12&63]+e[o>>6&63]+e[63&o]);return a.join("")}_["-".charCodeAt(0)]=62,_["_".charCodeAt(0)]=63},91358:function(D){function E(y,f,l,t,i){for(var r=i+1;t<=i;){var n=t+i>>>1,o=y[n];(l!==void 0?l(o,f):o-f)>=0?(r=n,i=n-1):t=n+1}return r}function e(y,f,l,t,i){for(var r=i+1;t<=i;){var n=t+i>>>1,o=y[n];(l!==void 0?l(o,f):o-f)>0?(r=n,i=n-1):t=n+1}return r}function _(y,f,l,t,i){for(var r=t-1;t<=i;){var n=t+i>>>1,o=y[n];(l!==void 0?l(o,f):o-f)<0?(r=n,t=n+1):i=n-1}return r}function w(y,f,l,t,i){for(var r=t-1;t<=i;){var n=t+i>>>1,o=y[n];(l!==void 0?l(o,f):o-f)<=0?(r=n,t=n+1):i=n-1}return r}function s(y,f,l,t,i){for(;t<=i;){var r=t+i>>>1,n=y[r],o=l!==void 0?l(n,f):n-f;if(o===0)return r;o<=0?t=r+1:i=r-1}return-1}function T(y,f,l,t,i,r){return typeof l=="function"?r(y,f,l,t===void 0?0:0|t,i===void 0?y.length-1:0|i):r(y,f,void 0,l===void 0?0:0|l,t===void 0?y.length-1:0|t)}D.exports={ge:function(y,f,l,t,i){return T(y,f,l,t,i,E)},gt:function(y,f,l,t,i){return T(y,f,l,t,i,e)},lt:function(y,f,l,t,i){return T(y,f,l,t,i,_)},le:function(y,f,l,t,i){return T(y,f,l,t,i,w)},eq:function(y,f,l,t,i){return T(y,f,l,t,i,s)}}},13547:function(D,E){function e(w){var s=32;return(w&=-w)&&s--,65535&w&&(s-=16),16711935&w&&(s-=8),252645135&w&&(s-=4),858993459&w&&(s-=2),1431655765&w&&(s-=1),s}E.INT_BITS=32,E.INT_MAX=2147483647,E.INT_MIN=-2147483648,E.sign=function(w){return(w>0)-(w<0)},E.abs=function(w){var s=w>>31;return(w^s)-s},E.min=function(w,s){return s^(w^s)&-(w65535)<<4,s|=T=((w>>>=s)>255)<<3,s|=T=((w>>>=T)>15)<<2,(s|=T=((w>>>=T)>3)<<1)|(w>>>=T)>>1},E.log10=function(w){return w>=1e9?9:w>=1e8?8:w>=1e7?7:w>=1e6?6:w>=1e5?5:w>=1e4?4:w>=1e3?3:w>=100?2:w>=10?1:0},E.popCount=function(w){return 16843009*((w=(858993459&(w-=w>>>1&1431655765))+(w>>>2&858993459))+(w>>>4)&252645135)>>>24},E.countTrailingZeros=e,E.nextPow2=function(w){return w+=w===0,--w,w|=w>>>1,w|=w>>>2,w|=w>>>4,w|=w>>>8,1+(w|=w>>>16)},E.prevPow2=function(w){return w|=w>>>1,w|=w>>>2,w|=w>>>4,w|=w>>>8,(w|=w>>>16)-(w>>>1)},E.parity=function(w){return w^=w>>>16,w^=w>>>8,w^=w>>>4,27030>>>(w&=15)&1};var _=new Array(256);(function(w){for(var s=0;s<256;++s){var T=s,y=s,f=7;for(T>>>=1;T;T>>>=1)y<<=1,y|=1&T,--f;w[s]=y<>>8&255]<<16|_[w>>>16&255]<<8|_[w>>>24&255]},E.interleave2=function(w,s){return(w=1431655765&((w=858993459&((w=252645135&((w=16711935&((w&=65535)|w<<8))|w<<4))|w<<2))|w<<1))|(s=1431655765&((s=858993459&((s=252645135&((s=16711935&((s&=65535)|s<<8))|s<<4))|s<<2))|s<<1))<<1},E.deinterleave2=function(w,s){return(w=65535&((w=16711935&((w=252645135&((w=858993459&((w=w>>>s&1431655765)|w>>>1))|w>>>2))|w>>>4))|w>>>16))<<16>>16},E.interleave3=function(w,s,T){return w=1227133513&((w=3272356035&((w=251719695&((w=4278190335&((w&=1023)|w<<16))|w<<8))|w<<4))|w<<2),(w|=(s=1227133513&((s=3272356035&((s=251719695&((s=4278190335&((s&=1023)|s<<16))|s<<8))|s<<4))|s<<2))<<1)|(T=1227133513&((T=3272356035&((T=251719695&((T=4278190335&((T&=1023)|T<<16))|T<<8))|T<<4))|T<<2))<<2},E.deinterleave3=function(w,s){return(w=1023&((w=4278190335&((w=251719695&((w=3272356035&((w=w>>>s&1227133513)|w>>>2))|w>>>4))|w>>>8))|w>>>16))<<22>>22},E.nextCombination=function(w){var s=w|w-1;return s+1|(~s&-~s)-1>>>e(w)+1}},44781:function(D,E,e){var _=e(53435);D.exports=function(y,f){f||(f={});var l,t,i,r,n,o,a,u,p,c,b,d=f.cutoff==null?.25:f.cutoff,v=f.radius==null?8:f.radius,x=f.channel||0;if(ArrayBuffer.isView(y)||Array.isArray(y)){if(!f.width||!f.height)throw Error("For raw data width and height should be provided by options");l=f.width,t=f.height,r=y,o=f.stride?f.stride:Math.floor(y.length/l/t)}else window.HTMLCanvasElement&&y instanceof window.HTMLCanvasElement?(a=(u=y).getContext("2d"),l=u.width,t=u.height,r=(p=a.getImageData(0,0,l,t)).data,o=4):window.CanvasRenderingContext2D&&y instanceof window.CanvasRenderingContext2D?(a=y,l=(u=y.canvas).width,t=u.height,r=(p=a.getImageData(0,0,l,t)).data,o=4):window.ImageData&&y instanceof window.ImageData&&(p=y,l=y.width,t=y.height,r=p.data,o=4);if(i=Math.max(l,t),window.Uint8ClampedArray&&r instanceof window.Uint8ClampedArray||window.Uint8Array&&r instanceof window.Uint8Array)for(n=r,r=Array(l*t),c=0,b=n.length;c-1?w(f):f}},68222:function(D,E,e){var _=e(77575),w=e(68318),s=w("%Function.prototype.apply%"),T=w("%Function.prototype.call%"),y=w("%Reflect.apply%",!0)||_.call(T,s),f=w("%Object.getOwnPropertyDescriptor%",!0),l=w("%Object.defineProperty%",!0),t=w("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}D.exports=function(r){var n=y(_,T,arguments);if(f&&l){var o=f(n,"length");o.configurable&&l(n,"length",{value:1+t(0,r.length-(arguments.length-1))})}return n};var i=function(){return y(_,s,arguments)};l?l(D.exports,"apply",{value:i}):D.exports.apply=i},53435:function(D){D.exports=function(E,e,_){return e<_?E_?_:E:E<_?_:E>e?e:E}},6475:function(D,E,e){var _=e(53435);function w(s,T){T==null&&(T=!0);var y=s[0],f=s[1],l=s[2],t=s[3];return t==null&&(t=T?1:255),T&&(y*=255,f*=255,l*=255,t*=255),16777216*(y=255&_(y,0,255))+((f=255&_(f,0,255))<<16)+((l=255&_(l,0,255))<<8)+(255&_(t,0,255))}D.exports=w,D.exports.to=w,D.exports.from=function(s,T){var y=(s=+s)>>>24,f=(16711680&s)>>>16,l=(65280&s)>>>8,t=255&s;return T===!1?[y,f,l,t]:[y/255,f/255,l/255,t/255]}},76857:function(D){D.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]}},25075:function(D,E,e){var _=e(36652),w=e(53435),s=e(90660);D.exports=function(T,y){y!=="float"&&y||(y="array"),y==="uint"&&(y="uint8"),y==="uint_clamped"&&(y="uint8_clamped");var f=new(s(y))(4),l=y!=="uint8"&&y!=="uint8_clamped";return T.length&&typeof T!="string"||((T=_(T))[0]/=255,T[1]/=255,T[2]/=255),function(t){return t instanceof Uint8Array||t instanceof Uint8ClampedArray||!!(Array.isArray(t)&&(t[0]>1||t[0]===0)&&(t[1]>1||t[1]===0)&&(t[2]>1||t[2]===0)&&(!t[3]||t[3]>1))}(T)?(f[0]=T[0],f[1]=T[1],f[2]=T[2],f[3]=T[3]!=null?T[3]:255,l&&(f[0]/=255,f[1]/=255,f[2]/=255,f[3]/=255),f):(l?(f[0]=T[0],f[1]=T[1],f[2]=T[2],f[3]=T[3]!=null?T[3]:1):(f[0]=w(Math.floor(255*T[0]),0,255),f[1]=w(Math.floor(255*T[1]),0,255),f[2]=w(Math.floor(255*T[2]),0,255),f[3]=T[3]==null?255:w(Math.floor(255*T[3]),0,255)),f)}},90736:function(D,E,e){var _=e(76857),w=e(10973),s=e(46775);D.exports=function(y){var f,l,t=[],i=1;if(typeof y=="string")if(_[y])t=_[y].slice(),l="rgb";else if(y==="transparent")i=0,l="rgb",t=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(y)){var r=(a=y.slice(1)).length;i=1,r<=4?(t=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],r===4&&(i=parseInt(a[3]+a[3],16)/255)):(t=[parseInt(a[0]+a[1],16),parseInt(a[2]+a[3],16),parseInt(a[4]+a[5],16)],r===8&&(i=parseInt(a[6]+a[7],16)/255)),t[0]||(t[0]=0),t[1]||(t[1]=0),t[2]||(t[2]=0),l="rgb"}else if(f=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(y)){var n=f[1],o=n==="rgb",a=n.replace(/a$/,"");l=a,r=a==="cmyk"?4:a==="gray"?1:3,t=f[2].trim().split(/\s*,\s*/).map(function(p,c){if(/%$/.test(p))return c===r?parseFloat(p)/100:a==="rgb"?255*parseFloat(p)/100:parseFloat(p);if(a[c]==="h"){if(/deg$/.test(p))return parseFloat(p);if(T[p]!==void 0)return T[p]}return parseFloat(p)}),n===a&&t.push(1),i=o||t[r]===void 0?1:t[r],t=t.slice(0,r)}else y.length>10&&/[0-9](?:\s|\/)/.test(y)&&(t=y.match(/([0-9]+)/g).map(function(p){return parseFloat(p)}),l=y.match(/([a-z])/gi).join("").toLowerCase());else if(isNaN(y))if(w(y)){var u=s(y.r,y.red,y.R,null);u!==null?(l="rgb",t=[u,s(y.g,y.green,y.G),s(y.b,y.blue,y.B)]):(l="hsl",t=[s(y.h,y.hue,y.H),s(y.s,y.saturation,y.S),s(y.l,y.lightness,y.L,y.b,y.brightness)]),i=s(y.a,y.alpha,y.opacity,1),y.opacity!=null&&(i/=100)}else(Array.isArray(y)||e.g.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(y))&&(t=[y[0],y[1],y[2]],l="rgb",i=y.length===4?y[3]:1);else l="rgb",t=[y>>>16,(65280&y)>>>8,255&y];return{space:l,values:t,alpha:i}};var T={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}},36652:function(D,E,e){var _=e(90736),w=e(80009),s=e(53435);D.exports=function(T){var y,f=_(T);return f.space?((y=Array(3))[0]=s(f.values[0],0,255),y[1]=s(f.values[1],0,255),y[2]=s(f.values[2],0,255),f.space[0]==="h"&&(y=w.rgb(y)),y.push(s(f.alpha,0,1)),y):[]}},80009:function(D,E,e){var _=e(6866);D.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(w){var s,T,y,f,l,t=w[0]/360,i=w[1]/100,r=w[2]/100;if(i===0)return[l=255*r,l,l];s=2*r-(T=r<.5?r*(1+i):r+i-r*i),f=[0,0,0];for(var n=0;n<3;n++)(y=t+.3333333333333333*-(n-1))<0?y++:y>1&&y--,l=6*y<1?s+6*(T-s)*y:2*y<1?T:3*y<2?s+(T-s)*(.6666666666666666-y)*6:s,f[n]=255*l;return f}},_.hsl=function(w){var s,T,y=w[0]/255,f=w[1]/255,l=w[2]/255,t=Math.min(y,f,l),i=Math.max(y,f,l),r=i-t;return i===t?s=0:y===i?s=(f-l)/r:f===i?s=2+(l-y)/r:l===i&&(s=4+(y-f)/r),(s=Math.min(60*s,360))<0&&(s+=360),T=(t+i)/2,[s,100*(i===t?0:T<=.5?r/(i+t):r/(2-i-t)),100*T]}},6866:function(D){D.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},24138:function(D){D.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|ç)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|é)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|é)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|ã)o.?tom(e|é)",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"}},72791:function(D,E,e){D.exports={parse:e(41004),stringify:e(53313)}},63625:function(D,E,e){var _=e(40402);D.exports={isSize:function(w){return/^[\d\.]/.test(w)||w.indexOf("/")!==-1||_.indexOf(w)!==-1}}},41004:function(D,E,e){var _=e(90448),w=e(38732),s=e(41901),T=e(15659),y=e(96209),f=e(83794),l=e(99011),t=e(63625).isSize;D.exports=r;var i=r.cache={};function r(o){if(typeof o!="string")throw new Error("Font argument must be a string.");if(i[o])return i[o];if(o==="")throw new Error("Cannot parse an empty string.");if(s.indexOf(o)!==-1)return i[o]={system:o};for(var a,u={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},p=l(o,/\s+/);a=p.shift();){if(w.indexOf(a)!==-1)return["style","variant","weight","stretch"].forEach(function(b){u[b]=a}),i[o]=u;if(y.indexOf(a)===-1)if(a!=="normal"&&a!=="small-caps")if(f.indexOf(a)===-1){if(T.indexOf(a)===-1){if(t(a)){var c=l(a,"/");if(u.size=c[0],c[1]!=null?u.lineHeight=n(c[1]):p[0]==="/"&&(p.shift(),u.lineHeight=n(p.shift())),!p.length)throw new Error("Missing required font-family.");return u.family=l(p.join(" "),/\s*,\s*/).map(_),i[o]=u}throw new Error("Unknown or unsupported font token: "+a)}u.weight=a}else u.stretch=a;else u.variant=a;else u.style=a}throw new Error("Missing required font-size.")}function n(o){var a=parseFloat(o);return a.toString()===o?a:o}},53313:function(D,E,e){var _=e(71299),w=e(63625).isSize,s=o(e(38732)),T=o(e(41901)),y=o(e(15659)),f=o(e(96209)),l=o(e(83794)),t={normal:1,"small-caps":1},i={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},r="serif";function n(a,u){if(a&&!u[a]&&!s[a])throw Error("Unknown keyword `"+a+"`");return a}function o(a){for(var u={},p=0;po?1:n>=o?0:NaN}e.d(E,{j2:function(){return _},Fp:function(){return T},J6:function(){return f},TS:function(){return l},VV:function(){return t},w6:function(){return i},Sm:function(){return r}}),(w=_).length===1&&(s=w,w=function(n,o){return _(s(n),o)});var w,s;function T(n,o){var a,u,p=n.length,c=-1;if(o==null){for(;++c=a)for(u=a;++cu&&(u=a)}else for(;++c=a)for(u=a;++cu&&(u=a);return u}function y(n){return n===null?NaN:+n}function f(n,o){var a,u=n.length,p=u,c=-1,b=0;if(o==null)for(;++c=0;)for(o=(u=n[p]).length;--o>=0;)a[--b]=u[o];return a}function t(n,o){var a,u,p=n.length,c=-1;if(o==null){for(;++c=a)for(u=a;++ca&&(u=a)}else for(;++c=a)for(u=a;++ca&&(u=a);return u}function i(n,o,a){n=+n,o=+o,a=(p=arguments.length)<2?(o=n,n=0,1):p<3?1:+a;for(var u=-1,p=0|Math.max(0,Math.ceil((o-n)/a)),c=new Array(p);++u=p.length)return o!=null&&v.sort(o),a!=null?a(v):v;for(var k,h,M,A=-1,C=v.length,L=p[x++],O=T(),I=g();++Ap.length)return v;var g,m=c[x-1];return a!=null&&x>=p.length?g=v.entries():(g=[],v.each(function(k,h){g.push({key:h,values:d(k,x)})})),m!=null?g.sort(function(k,h){return m(k.key,h.key)}):g}return u={object:function(v){return b(v,0,f,l)},map:function(v){return b(v,0,t,i)},entries:function(v){return d(b(v,0,t,i),0)},key:function(v){return p.push(v),u},sortKeys:function(v){return c[p.length-1]=v,u},sortValues:function(v){return o=v,u},rollup:function(v){return a=v,u}}}function f(){return{}}function l(o,a,u){o[a]=u}function t(){return T()}function i(o,a,u){o.set(a,u)}function r(){}var n=T.prototype;r.prototype={constructor:r,has:n.has,add:function(o){return this[_+(o+="")]=o,this},remove:n.remove,clear:n.clear,values:n.keys,size:n.size,empty:n.empty,each:n.each}},49887:function(D,E,e){function _(de,he){var xe;function Re(){var we,Ae,Me=xe.length,Ce=0,ne=0;for(we=0;we=(Ae=(je+be)/2))?je=Ae:be=Ae,(me=xe>=(Me=(ge+Se)/2))?ge=Me:Se=Me,we=Ue,!(Ue=Ue[Te=me<<1|ue]))return we[Te]=De,de;if(Ce=+de._x.call(null,Ue.data),ne=+de._y.call(null,Ue.data),he===Ce&&xe===ne)return De.next=Ue,we?we[Te]=De:de._root=De,de;do we=we?we[Te]=new Array(4):de._root=new Array(4),(ue=he>=(Ae=(je+be)/2))?je=Ae:be=Ae,(me=xe>=(Me=(ge+Se)/2))?ge=Me:Se=Me;while((Te=me<<1|ue)==(Ee=(ne>=Me)<<1|Ce>=Ae));return we[Ee]=Ue,we[Te]=De,de}function y(de,he,xe,Re,we){this.node=de,this.x0=he,this.y0=xe,this.x1=Re,this.y1=we}function f(de){return de[0]}function l(de){return de[1]}function t(de,he,xe){var Re=new i(he??f,xe??l,NaN,NaN,NaN,NaN);return de==null?Re:Re.addAll(de)}function i(de,he,xe,Re,we,Ae){this._x=de,this._y=he,this._x0=xe,this._y0=Re,this._x1=we,this._y1=Ae,this._root=void 0}function r(de){for(var he={data:de.data},xe=he;de=de.next;)xe=xe.next={data:de.data};return he}e.r(E),e.d(E,{forceCenter:function(){return _},forceCollide:function(){return u},forceLink:function(){return d},forceManyBody:function(){return se},forceRadial:function(){return fe},forceSimulation:function(){return oe},forceX:function(){return ye},forceY:function(){return pe}});var n=t.prototype=i.prototype;function o(de){return de.x+de.vx}function a(de){return de.y+de.vy}function u(de){var he,xe,Re=1,we=1;function Ae(){for(var ne,ue,me,Te,Ee,Ue,De,je=he.length,ge=0;geTe+yt||ZeEe+yt||stme.index){var Et=Te-ot.x-ot.vx,Tt=Ee-ot.y-ot.vy,xt=Et*Et+Tt*Tt;xtne.r&&(ne.r=ne[ue].r)}function Ce(){if(he){var ne,ue,me=he.length;for(xe=new Array(me),ne=0;neme&&(me=Re),weTe&&(Te=we));if(ne>me||ue>Te)return this;for(this.cover(ne,ue).cover(me,Te),xe=0;xede||de>=we||Re>he||he>=Ae;)switch(Ce=(heEe||(Ae=ne.y0)>Ue||(Me=ne.x1)=be)<<1|de>=ge)&&(ne=De[De.length-1],De[De.length-1]=De[De.length-1-ue],De[De.length-1-ue]=ne)}else{var Se=de-+this._x.call(null,je.data),Ne=he-+this._y.call(null,je.data),Ye=Se*Se+Ne*Ne;if(Ye=(Ce=(De+ge)/2))?De=Ce:ge=Ce,(me=Me>=(ne=(je+be)/2))?je=ne:be=ne,he=Ue,!(Ue=Ue[Te=me<<1|ue]))return this;if(!Ue.length)break;(he[Te+1&3]||he[Te+2&3]||he[Te+3&3])&&(xe=he,Ee=Te)}for(;Ue.data!==de;)if(Re=Ue,!(Ue=Ue.next))return this;return(we=Ue.next)&&delete Ue.next,Re?(we?Re.next=we:delete Re.next,this):he?(we?he[Te]=we:delete he[Te],(Ue=he[0]||he[1]||he[2]||he[3])&&Ue===(he[3]||he[2]||he[1]||he[0])&&!Ue.length&&(xe?xe[Ee]=Ue:this._root=Ue),this):(this._root=we,this)},n.removeAll=function(de){for(var he=0,xe=de.length;he=0&&(Re=xe.slice(we+1),xe=xe.slice(0,we)),xe&&!he.hasOwnProperty(xe))throw new Error("unknown type: "+xe);return{type:xe,name:Re}})}function k(de,he){for(var xe,Re=0,we=de.length;Re0)for(var xe,Re,we=new Array(xe),Ae=0;Ae=0&&he._call.call(null,de),he=he._next;--L})()}finally{L=0,function(){for(var de,he,xe=M,Re=1/0;xe;)xe._call?(Re>xe._time&&(Re=xe._time),de=xe,xe=xe._next):(he=xe._next,xe._next=null,xe=de?de._next=he:M=he);A=de,Y(Re)}(),U=0}}function X(){var de=G.now(),he=de-R;he>1e3&&(B-=he,R=de)}function Y(de){L||(O&&(O=clearTimeout(O)),de-U>24?(de<1/0&&(O=setTimeout(Q,de-G.now()-B)),I&&(I=clearInterval(I))):(I||(R=G.now(),I=setInterval(X,1e3)),L=1,N(Q)))}function K(de){return de.x}function te(de){return de.y}H.prototype=ee.prototype={constructor:H,restart:function(de,he,xe){if(typeof de!="function")throw new TypeError("callback is not a function");xe=(xe==null?j():+xe)+(he==null?0:+he),this._next||A===this||(A?A._next=this:M=this,A=this),this._call=de,this._time=xe,Y()},stop:function(){this._call&&(this._call=null,this._time=1/0,Y())}};var ae=Math.PI*(3-Math.sqrt(5));function oe(de){var he,xe=1,Re=.001,we=1-Math.pow(Re,1/300),Ae=0,Me=.6,Ce=(0,p.UI)(),ne=ee(me),ue=C("tick","end");function me(){Te(),ue.call("tick",he),xe1?(je==null?Ce.remove(De):Ce.set(De,Ue(je)),he):Ce.get(De)},find:function(De,je,ge){var be,Se,Ne,Ye,Ze,st=0,ot=de.length;for(ge==null?ge=1/0:ge*=ge,st=0;st1?(ue.on(De,je),he):ue.on(De)}}}function se(){var de,he,xe,Re,we=w(-30),Ae=1,Me=1/0,Ce=.81;function ne(Ee){var Ue,De=de.length,je=t(de,K,te).visitAfter(me);for(xe=Ee,Ue=0;Ue=Me)){(Ee.data!==he||Ee.next)&&(ge===0&&(Ne+=(ge=s())*ge),be===0&&(Ne+=(be=s())*be),Ne1?b[0]+b.slice(2):b,+u.slice(c+1)]}e.d(E,{WU:function(){return r},FF:function(){return a}});var w,s=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function T(u){if(!(p=s.exec(u)))throw new Error("invalid format: "+u);var p;return new y({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]})}function y(u){this.fill=u.fill===void 0?" ":u.fill+"",this.align=u.align===void 0?">":u.align+"",this.sign=u.sign===void 0?"-":u.sign+"",this.symbol=u.symbol===void 0?"":u.symbol+"",this.zero=!!u.zero,this.width=u.width===void 0?void 0:+u.width,this.comma=!!u.comma,this.precision=u.precision===void 0?void 0:+u.precision,this.trim=!!u.trim,this.type=u.type===void 0?"":u.type+""}function f(u,p){var c=_(u,p);if(!c)return u+"";var b=c[0],d=c[1];return d<0?"0."+new Array(-d).join("0")+b:b.length>d+1?b.slice(0,d+1)+"."+b.slice(d+1):b+new Array(d-b.length+2).join("0")}T.prototype=y.prototype,y.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,0|this.width))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var l={"%":function(u,p){return(100*u).toFixed(p)},b:function(u){return Math.round(u).toString(2)},c:function(u){return u+""},d:function(u){return Math.abs(u=Math.round(u))>=1e21?u.toLocaleString("en").replace(/,/g,""):u.toString(10)},e:function(u,p){return u.toExponential(p)},f:function(u,p){return u.toFixed(p)},g:function(u,p){return u.toPrecision(p)},o:function(u){return Math.round(u).toString(8)},p:function(u,p){return f(100*u,p)},r:f,s:function(u,p){var c=_(u,p);if(!c)return u+"";var b=c[0],d=c[1],v=d-(w=3*Math.max(-8,Math.min(8,Math.floor(d/3))))+1,x=b.length;return v===x?b:v>x?b+new Array(v-x+1).join("0"):v>0?b.slice(0,v)+"."+b.slice(v):"0."+new Array(1-v).join("0")+_(u,Math.max(0,p+v-1))[0]},X:function(u){return Math.round(u).toString(16).toUpperCase()},x:function(u){return Math.round(u).toString(16)}};function t(u){return u}var i,r,n=Array.prototype.map,o=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function a(u){var p,c,b=u.grouping===void 0||u.thousands===void 0?t:(p=n.call(u.grouping,Number),c=u.thousands+"",function(A,C){for(var L=A.length,O=[],I=0,R=p[0],U=0;L>0&&R>0&&(U+R+1>C&&(R=Math.max(1,C-U)),O.push(A.substring(L-=R,L+R)),!((U+=R+1)>C));)R=p[I=(I+1)%p.length];return O.reverse().join(c)}),d=u.currency===void 0?"":u.currency[0]+"",v=u.currency===void 0?"":u.currency[1]+"",x=u.decimal===void 0?".":u.decimal+"",g=u.numerals===void 0?t:function(A){return function(C){return C.replace(/[0-9]/g,function(L){return A[+L]})}}(n.call(u.numerals,String)),m=u.percent===void 0?"%":u.percent+"",k=u.minus===void 0?"-":u.minus+"",h=u.nan===void 0?"NaN":u.nan+"";function M(A){var C=(A=T(A)).fill,L=A.align,O=A.sign,I=A.symbol,R=A.zero,U=A.width,B=A.comma,G=A.precision,N=A.trim,j=A.type;j==="n"?(B=!0,j="g"):l[j]||(G===void 0&&(G=12),N=!0,j="g"),(R||C==="0"&&L==="=")&&(R=!0,C="0",L="=");var V=I==="$"?d:I==="#"&&/[boxX]/.test(j)?"0"+j.toLowerCase():"",H=I==="$"?v:/[%p]/.test(j)?m:"",ee=l[j],Q=/[defgprs%]/.test(j);function X(Y){var K,te,ae,oe=V,se=H;if(j==="c")se=ee(Y)+se,Y="";else{var fe=(Y=+Y)<0||1/Y<0;if(Y=isNaN(Y)?h:ee(Math.abs(Y),G),N&&(Y=function(de){e:for(var he,xe=de.length,Re=1,we=-1;Re0&&(we=0)}return we>0?de.slice(0,we)+de.slice(he+1):de}(Y)),fe&&+Y==0&&O!=="+"&&(fe=!1),oe=(fe?O==="("?O:k:O==="-"||O==="("?"":O)+oe,se=(j==="s"?o[8+w/3]:"")+se+(fe&&O==="("?")":""),Q){for(K=-1,te=Y.length;++K(ae=Y.charCodeAt(K))||ae>57){se=(ae===46?x+Y.slice(K+1):Y.slice(K))+se,Y=Y.slice(0,K);break}}}B&&!R&&(Y=b(Y,1/0));var ye=oe.length+Y.length+se.length,pe=ye>1)+oe+Y+se+pe.slice(ye);break;default:Y=pe+oe+Y+se}return g(Y)}return G=G===void 0?6:/[gprs]/.test(j)?Math.max(1,Math.min(21,G)):Math.max(0,Math.min(20,G)),X.toString=function(){return A+""},X}return{format:M,formatPrefix:function(A,C){var L,O=M(((A=T(A)).type="f",A)),I=3*Math.max(-8,Math.min(8,Math.floor((L=C,((L=_(Math.abs(L)))?L[1]:NaN)/3)))),R=Math.pow(10,-I),U=o[8+I/3];return function(B){return O(R*B)+U}}}}i=a({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),r=i.format,i.formatPrefix},65704:function(D,E,e){e.r(E),e.d(E,{geoAiry:function(){return B},geoAiryRaw:function(){return U},geoAitoff:function(){return N},geoAitoffRaw:function(){return G},geoArmadillo:function(){return V},geoArmadilloRaw:function(){return j},geoAugust:function(){return ee},geoAugustRaw:function(){return H},geoBaker:function(){return K},geoBakerRaw:function(){return Y},geoBerghaus:function(){return oe},geoBerghausRaw:function(){return ae},geoBertin1953:function(){return Re},geoBertin1953Raw:function(){return xe},geoBoggs:function(){return Te},geoBoggsRaw:function(){return me},geoBonne:function(){return ge},geoBonneRaw:function(){return je},geoBottomley:function(){return Se},geoBottomleyRaw:function(){return be},geoBromley:function(){return Ye},geoBromleyRaw:function(){return Ne},geoChamberlin:function(){return Dt},geoChamberlinAfrica:function(){return xt},geoChamberlinRaw:function(){return Et},geoCollignon:function(){return Ft},geoCollignonRaw:function(){return It},geoCraig:function(){return Nt},geoCraigRaw:function(){return qt},geoCraster:function(){return Ge},geoCrasterRaw:function(){return Ke},geoCylindricalEqualArea:function(){return ht},geoCylindricalEqualAreaRaw:function(){return nt},geoCylindricalStereographic:function(){return Be},geoCylindricalStereographicRaw:function(){return Oe},geoEckert1:function(){return ut},geoEckert1Raw:function(){return Qe},geoEckert2:function(){return bt},geoEckert2Raw:function(){return pt},geoEckert3:function(){return Ct},geoEckert3Raw:function(){return Lt},geoEckert4:function(){return Ot},geoEckert4Raw:function(){return mt},geoEckert5:function(){return Pt},geoEckert5Raw:function(){return _t},geoEckert6:function(){return Wt},geoEckert6Raw:function(){return Bt},geoEisenlohr:function(){return Kt},geoEisenlohrRaw:function(){return Xt},geoFahey:function(){return ln},geoFaheyRaw:function(){return yn},geoFoucaut:function(){return Wn},geoFoucautRaw:function(){return kn},geoFoucautSinusoidal:function(){return on},geoFoucautSinusoidalRaw:function(){return wn},geoGilbert:function(){return Cn},geoGingery:function(){return or},geoGingeryRaw:function(){return Nn},geoGinzburg4:function(){return gr},geoGinzburg4Raw:function(){return kr},geoGinzburg5:function(){return dr},geoGinzburg5Raw:function(){return ir},geoGinzburg6:function(){return $t},geoGinzburg6Raw:function(){return yr},geoGinzburg8:function(){return Ln},geoGinzburg8Raw:function(){return mn},geoGinzburg9:function(){return jn},geoGinzburg9Raw:function(){return En},geoGringorten:function(){return Qn},geoGringortenQuincuncial:function(){return Wl},geoGringortenRaw:function(){return Zn},geoGuyou:function(){return jt},geoGuyouRaw:function(){return Pn},geoHammer:function(){return pe},geoHammerRaw:function(){return fe},geoHammerRetroazimuthal:function(){return On},geoHammerRetroazimuthalRaw:function(){return un},geoHealpix:function(){return er},geoHealpixRaw:function(){return vn},geoHill:function(){return lr},geoHillRaw:function(){return Jn},geoHomolosine:function(){return Mr},geoHomolosineRaw:function(){return Sr},geoHufnagel:function(){return pr},geoHufnagelRaw:function(){return Lr},geoHyperelliptical:function(){return Ti},geoHyperellipticalRaw:function(){return ci},geoInterrupt:function(){return xi},geoInterruptedBoggs:function(){return Ka},geoInterruptedHomolosine:function(){return Xs},geoInterruptedMollweide:function(){return pu},geoInterruptedMollweideHemispheres:function(){return Qa},geoInterruptedQuarticAuthalic:function(){return Rs},geoInterruptedSinuMollweide:function(){return Qi},geoInterruptedSinusoidal:function(){return qa},geoKavrayskiy7:function(){return fs},geoKavrayskiy7Raw:function(){return eo},geoLagrange:function(){return hs},geoLagrangeRaw:function(){return fi},geoLarrivee:function(){return Ro},geoLarriveeRaw:function(){return bo},geoLaskowski:function(){return Vu},geoLaskowskiRaw:function(){return xl},geoLittrow:function(){return Hu},geoLittrowRaw:function(){return Xo},geoLoximuthal:function(){return Ec},geoLoximuthalRaw:function(){return qu},geoMiller:function(){return Gu},geoMillerRaw:function(){return gu},geoModifiedStereographic:function(){return Ps},geoModifiedStereographicAlaska:function(){return yu},geoModifiedStereographicGs48:function(){return Ls},geoModifiedStereographicGs50:function(){return Vl},geoModifiedStereographicLee:function(){return Ks},geoModifiedStereographicMiller:function(){return ps},geoModifiedStereographicRaw:function(){return vu},geoMollweide:function(){return Ce},geoMollweideRaw:function(){return Me},geoMtFlatPolarParabolic:function(){return Cc},geoMtFlatPolarParabolicRaw:function(){return ds},geoMtFlatPolarQuartic:function(){return bl},geoMtFlatPolarQuarticRaw:function(){return Hl},geoMtFlatPolarSinusoidal:function(){return Qs},geoMtFlatPolarSinusoidalRaw:function(){return Os},geoNaturalEarth:function(){return oo.Z},geoNaturalEarth2:function(){return _l},geoNaturalEarth2Raw:function(){return xu},geoNaturalEarthRaw:function(){return oo.K},geoNellHammer:function(){return wl},geoNellHammerRaw:function(){return el},geoNicolosi:function(){return Tl},geoNicolosiRaw:function(){return tl},geoPatterson:function(){return ql},geoPattersonRaw:function(){return gs},geoPeirceQuincuncial:function(){return Zl},geoPierceQuincuncial:function(){return Zl},geoPolyconic:function(){return _u},geoPolyconicRaw:function(){return Sl},geoPolyhedral:function(){return vs},geoPolyhedralButterfly:function(){return Gl},geoPolyhedralCollignon:function(){return Tu},geoPolyhedralWaterman:function(){return Bs},geoProject:function(){return js},geoQuantize:function(){return Sa},geoQuincuncial:function(){return Ga},geoRectangularPolyconic:function(){return Us},geoRectangularPolyconicRaw:function(){return Cr},geoRobinson:function(){return rl},geoRobinsonRaw:function(){return Yl},geoSatellite:function(){return al},geoSatelliteRaw:function(){return il},geoSinuMollweide:function(){return vr},geoSinuMollweideRaw:function(){return cr},geoSinusoidal:function(){return De},geoSinusoidalRaw:function(){return Ue},geoStitch:function(){return Hs},geoTimes:function(){return fo},geoTimesRaw:function(){return xa},geoTwoPointAzimuthal:function(){return ho},geoTwoPointAzimuthalRaw:function(){return Ll},geoTwoPointAzimuthalUsa:function(){return to},geoTwoPointEquidistant:function(){return di},geoTwoPointEquidistantRaw:function(){return Fo},geoTwoPointEquidistantUsa:function(){return za},geoVanDerGrinten:function(){return wo},geoVanDerGrinten2:function(){return Bo},geoVanDerGrinten2Raw:function(){return Da},geoVanDerGrinten3:function(){return rs},geoVanDerGrinten3Raw:function(){return bs},geoVanDerGrinten4:function(){return po},geoVanDerGrinten4Raw:function(){return ba},geoVanDerGrintenRaw:function(){return oa},geoWagner:function(){return Ur},geoWagner4:function(){return $l},geoWagner4Raw:function(){return _a},geoWagner6:function(){return ll},geoWagner6Raw:function(){return Fa},geoWagner7:function(){return sl},geoWagnerRaw:function(){return Fr},geoWiechel:function(){return _i},geoWiechelRaw:function(){return as},geoWinkel3:function(){return Jl},geoWinkel3Raw:function(){return Si}});var _=e(15002),w=Math.abs,s=Math.atan,T=Math.atan2,y=Math.cos,f=Math.exp,l=Math.floor,t=Math.log,i=Math.max,r=Math.min,n=Math.pow,o=Math.round,a=Math.sign||function(et){return et>0?1:et<0?-1:0},u=Math.sin,p=Math.tan,c=1e-6,b=1e-12,d=Math.PI,v=d/2,x=d/4,g=Math.SQRT1_2,m=O(2),k=O(d),h=2*d,M=180/d,A=d/180;function C(et){return et>1?v:et<-1?-v:Math.asin(et)}function L(et){return et>1?0:et<-1?d:Math.acos(et)}function O(et){return et>0?Math.sqrt(et):0}function I(et){return(f(et)-f(-et))/2}function R(et){return(f(et)+f(-et))/2}function U(et){var rt=p(et/2),ct=2*t(y(et/2))/(rt*rt);function vt(Mt,kt){var q=y(Mt),$=y(kt),W=u(kt),ie=$*q,_e=-((1-ie?t((1+ie)/2)/(1-ie):-.5)+ct/(1+ie));return[_e*$*u(Mt),_e*W]}return vt.invert=function(Mt,kt){var q,$=O(Mt*Mt+kt*kt),W=-et/2,ie=50;if(!$)return[0,0];do{var _e=W/2,ze=y(_e),He=u(_e),Xe=He/ze,at=-t(w(ze));W-=q=(2/Xe*at-ct*Xe-$)/(-at/(He*He)+1-ct/(2*ze*ze))*(ze<0?.7:1)}while(w(q)>c&&--ie>0);var wt=u(W);return[T(Mt*wt,$*y(W)),C(kt*wt/$)]},vt}function B(){var et=v,rt=(0,_.r)(U),ct=rt(et);return ct.radius=function(vt){return arguments.length?rt(et=vt*A):et*M},ct.scale(179.976).clipAngle(147)}function G(et,rt){var ct=y(rt),vt=function(Mt){return Mt?Mt/Math.sin(Mt):1}(L(ct*y(et/=2)));return[2*ct*u(et)*vt,u(rt)*vt]}function N(){return(0,_.Z)(G).scale(152.63)}function j(et){var rt=u(et),ct=y(et),vt=et>=0?1:-1,Mt=p(vt*et),kt=(1+rt-ct)/2;function q($,W){var ie=y(W),_e=y($/=2);return[(1+ie)*u($),(vt*W>-T(_e,Mt)-.001?0:10*-vt)+kt+u(W)*ct-(1+ie)*rt*_e]}return q.invert=function($,W){var ie=0,_e=0,ze=50;do{var He=y(ie),Xe=u(ie),at=y(_e),wt=u(_e),At=1+at,re=At*Xe-$,ve=kt+wt*ct-At*rt*He-W,Le=At*He/2,Fe=-Xe*wt,Ve=rt*At*Xe/2,We=ct*at+rt*He*wt,$e=Fe*Ve-We*Le,tt=(ve*Fe-re*We)/$e/2,lt=(re*Ve-ve*Le)/$e;w(lt)>2&&(lt/=2),ie-=tt,_e-=lt}while((w(tt)>c||w(lt)>c)&&--ze>0);return vt*_e>-T(y(ie),Mt)-.001?[2*ie,_e]:null},q}function V(){var et=20*A,rt=et>=0?1:-1,ct=p(rt*et),vt=(0,_.r)(j),Mt=vt(et),kt=Mt.stream;return Mt.parallel=function(q){return arguments.length?(ct=p((rt=(et=q*A)>=0?1:-1)*et),vt(et)):et*M},Mt.stream=function(q){var $=Mt.rotate(),W=kt(q),ie=(Mt.rotate([0,0]),kt(q)),_e=Mt.precision();return Mt.rotate($),W.sphere=function(){ie.polygonStart(),ie.lineStart();for(var ze=-180*rt;rt*ze<180;ze+=90*rt)ie.point(ze,90*rt);if(et)for(;rt*(ze-=3*rt*_e)>=-180;)ie.point(ze,rt*-T(y(ze*A/2),ct)*M);ie.lineEnd(),ie.polygonEnd()},W},Mt.scale(218.695).center([0,28.0974])}function H(et,rt){var ct=p(rt/2),vt=O(1-ct*ct),Mt=1+vt*y(et/=2),kt=u(et)*vt/Mt,q=ct/Mt,$=kt*kt,W=q*q;return[1.3333333333333333*kt*(3+$-3*W),1.3333333333333333*q*(3+3*$-W)]}function ee(){return(0,_.Z)(H).scale(66.1603)}G.invert=function(et,rt){if(!(et*et+4*rt*rt>d*d+c)){var ct=et,vt=rt,Mt=25;do{var kt,q=u(ct),$=u(ct/2),W=y(ct/2),ie=u(vt),_e=y(vt),ze=u(2*vt),He=ie*ie,Xe=_e*_e,at=$*$,wt=1-Xe*W*W,At=wt?L(_e*W)*O(kt=1/wt):kt=0,re=2*At*_e*$-et,ve=At*ie-rt,Le=kt*(Xe*at+At*_e*W*He),Fe=kt*(.5*q*ze-2*At*ie*$),Ve=.25*kt*(ze*$-At*ie*Xe*q),We=kt*(He*W+At*at*_e),$e=Fe*Ve-We*Le;if(!$e)break;var tt=(ve*Fe-re*We)/$e,lt=(re*Ve-ve*Le)/$e;ct-=tt,vt-=lt}while((w(tt)>c||w(lt)>c)&&--Mt>0);return[ct,vt]}},H.invert=function(et,rt){if(rt*=.375,!(et*=.375)&&w(rt)>1)return null;var ct=1+et*et+rt*rt,vt=O((ct-O(ct*ct-4*rt*rt))/2),Mt=C(vt)/3,kt=vt?function(ie){return t(ie+O(ie*ie-1))}(w(rt/vt))/3:function(ie){return t(ie+O(ie*ie+1))}(w(et))/3,q=y(Mt),$=R(kt),W=$*$-q*q;return[2*a(et)*T(I(kt)*q,.25-W),2*a(rt)*T($*u(Mt),.25+W)]};var Q=O(8),X=t(1+m);function Y(et,rt){var ct=w(rt);return ctb&&--kt>0);return[et/(y(Mt)*(Q-1/u(Mt))),a(rt)*Mt]};var te=e(17889);function ae(et){var rt=2*d/et;function ct(vt,Mt){var kt=(0,te.N)(vt,Mt);if(w(vt)>v){var q=T(kt[1],kt[0]),$=O(kt[0]*kt[0]+kt[1]*kt[1]),W=rt*o((q-v)/rt)+v,ie=T(u(q-=W),2-y(q));q=W+C(d/$*u(ie))-ie,kt[0]=$*y(q),kt[1]=$*u(q)}return kt}return ct.invert=function(vt,Mt){var kt=O(vt*vt+Mt*Mt);if(kt>v){var q=T(Mt,vt),$=rt*o((q-v)/rt)+v,W=q>$?-1:1,ie=kt*y($-q),_e=1/p(W*L((ie-d)/O(d*(d-2*ie)+kt*kt)));q=$+2*s((_e+W*O(_e*_e-3))/3),vt=kt*y(q),Mt=kt*u(q)}return te.N.invert(vt,Mt)},ct}function oe(){var et=5,rt=(0,_.r)(ae),ct=rt(et),vt=ct.stream,Mt=.01,kt=-y(Mt*A),q=u(Mt*A);return ct.lobes=function($){return arguments.length?rt(et=+$):et},ct.stream=function($){var W=ct.rotate(),ie=vt($),_e=(ct.rotate([0,0]),vt($));return ct.rotate(W),ie.sphere=function(){_e.polygonStart(),_e.lineStart();for(var ze=0,He=360/et,Xe=2*d/et,at=90-180/et,wt=v;ze0&&w(vt)>c);return q<0?NaN:ct}function he(et,rt,ct){return rt===void 0&&(rt=40),ct===void 0&&(ct=b),function(vt,Mt,kt,q){var $,W,ie;kt=kt===void 0?0:+kt,q=q===void 0?0:+q;for(var _e=0;_e$)kt-=W/=2,q-=ie/=2;else{$=at;var wt=(kt>0?-1:1)*ct,At=(q>0?-1:1)*ct,re=et(kt+wt,q),ve=et(kt,q+At),Le=(re[0]-ze[0])/wt,Fe=(re[1]-ze[1])/wt,Ve=(ve[0]-ze[0])/At,We=(ve[1]-ze[1])/At,$e=We*Le-Fe*Ve,tt=(w($e)<.5?.5:1)/$e;if(kt+=W=(Xe*Ve-He*We)*tt,q+=ie=(He*Fe-Xe*Le)*tt,w(W)0&&(kt[1]*=1+q/1.5*kt[0]*kt[0]),kt}return rt.invert=he(rt),rt}function Re(){return(0,_.Z)(xe()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function we(et,rt){var ct,vt=et*u(rt),Mt=30;do rt-=ct=(rt+u(rt)-vt)/(1+y(rt));while(w(ct)>c&&--Mt>0);return rt/2}function Ae(et,rt,ct){function vt(Mt,kt){return[et*Mt*y(kt=we(ct,kt)),rt*u(kt)]}return vt.invert=function(Mt,kt){return kt=C(kt/rt),[Mt/(et*y(kt)),C((2*kt+u(2*kt))/ct)]},vt}ye.invert=function(et,rt){var ct=2*C(rt/2);return[et*y(ct/2)/y(ct),ct]};var Me=Ae(m/v,m,d);function Ce(){return(0,_.Z)(Me).scale(169.529)}var ne=2.00276,ue=1.11072;function me(et,rt){var ct=we(d,rt);return[ne*et/(1/y(rt)+ue/y(ct)),(rt+m*u(ct))/ne]}function Te(){return(0,_.Z)(me).scale(160.857)}function Ee(et){var rt=0,ct=(0,_.r)(et),vt=ct(rt);return vt.parallel=function(Mt){return arguments.length?ct(rt=Mt*A):rt*M},vt}function Ue(et,rt){return[et*y(rt),rt]}function De(){return(0,_.Z)(Ue).scale(152.63)}function je(et){if(!et)return Ue;var rt=1/p(et);function ct(vt,Mt){var kt=rt+et-Mt,q=kt&&vt*y(Mt)/kt;return[kt*u(q),rt-kt*y(q)]}return ct.invert=function(vt,Mt){var kt=O(vt*vt+(Mt=rt-Mt)*Mt),q=rt+et-kt;return[kt/y(q)*T(vt,Mt),q]},ct}function ge(){return Ee(je).scale(123.082).center([0,26.1441]).parallel(45)}function be(et){function rt(ct,vt){var Mt=v-vt,kt=Mt&&ct*et*u(Mt)/Mt;return[Mt*u(kt)/et,v-Mt*y(kt)]}return rt.invert=function(ct,vt){var Mt=ct*et,kt=v-vt,q=O(Mt*Mt+kt*kt),$=T(Mt,kt);return[(q?q/u(q):1)*$/et,v-q]},rt}function Se(){var et=.5,rt=(0,_.r)(be),ct=rt(et);return ct.fraction=function(vt){return arguments.length?rt(et=+vt):et},ct.scale(158.837)}me.invert=function(et,rt){var ct,vt,Mt=ne*rt,kt=rt<0?-x:x,q=25;do vt=Mt-m*u(kt),kt-=ct=(u(2*kt)+2*kt-d*u(vt))/(2*y(2*kt)+2+d*y(vt)*m*y(kt));while(w(ct)>c&&--q>0);return vt=Mt-m*u(kt),[et*(1/y(vt)+ue/y(kt))/ne,vt]},Ue.invert=function(et,rt){return[et/y(rt),rt]};var Ne=Ae(1,4/d,d);function Ye(){return(0,_.Z)(Ne).scale(152.63)}var Ze=e(66624),st=e(49386);function ot(et,rt,ct,vt,Mt,kt){var q,$=y(kt);if(w(et)>1||w(kt)>1)q=L(ct*Mt+rt*vt*$);else{var W=u(et/2),ie=u(kt/2);q=2*C(O(W*W+rt*vt*ie*ie))}return w(q)>c?[q,T(vt*u(kt),rt*Mt-ct*vt*$)]:[0,0]}function ft(et,rt,ct){return L((et*et+rt*rt-ct*ct)/(2*et*rt))}function yt(et){return et-2*d*l((et+d)/(2*d))}function Et(et,rt,ct){for(var vt,Mt=[[et[0],et[1],u(et[1]),y(et[1])],[rt[0],rt[1],u(rt[1]),y(rt[1])],[ct[0],ct[1],u(ct[1]),y(ct[1])]],kt=Mt[2],q=0;q<3;++q,kt=vt)vt=Mt[q],kt.v=ot(vt[1]-kt[1],kt[3],kt[2],vt[3],vt[2],vt[0]-kt[0]),kt.point=[0,0];var $=ft(Mt[0].v[0],Mt[2].v[0],Mt[1].v[0]),W=ft(Mt[0].v[0],Mt[1].v[0],Mt[2].v[0]),ie=d-$;Mt[2].point[1]=0,Mt[0].point[0]=-(Mt[1].point[0]=Mt[0].v[0]/2);var _e=[Mt[2].point[0]=Mt[0].point[0]+Mt[2].v[0]*y($),2*(Mt[0].point[1]=Mt[1].point[1]=Mt[2].v[0]*u($))];return function(ze,He){var Xe,at=u(He),wt=y(He),At=new Array(3);for(Xe=0;Xe<3;++Xe){var re=Mt[Xe];if(At[Xe]=ot(He-re[1],re[3],re[2],wt,at,ze-re[0]),!At[Xe][0])return re.point;At[Xe][1]=yt(At[Xe][1]-re.v[1])}var ve=_e.slice();for(Xe=0;Xe<3;++Xe){var Le=Xe==2?0:Xe+1,Fe=ft(Mt[Xe].v[0],At[Xe][0],At[Le][0]);At[Xe][1]<0&&(Fe=-Fe),Xe?Xe==1?(Fe=W-Fe,ve[0]-=At[Xe][0]*y(Fe),ve[1]-=At[Xe][0]*u(Fe)):(Fe=ie-Fe,ve[0]+=At[Xe][0]*y(Fe),ve[1]+=At[Xe][0]*u(Fe)):(ve[0]+=At[Xe][0]*y(Fe),ve[1]-=At[Xe][0]*u(Fe))}return ve[0]/=3,ve[1]/=3,ve}}function Tt(et){return et[0]*=A,et[1]*=A,et}function xt(){return Dt([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Dt(et,rt,ct){var vt=(0,Ze.Z)({type:"MultiPoint",coordinates:[et,rt,ct]}),Mt=[-vt[0],-vt[1]],kt=(0,st.Z)(Mt),q=Et(Tt(kt(et)),Tt(kt(rt)),Tt(kt(ct)));q.invert=he(q);var $=(0,_.Z)(q).rotate(Mt),W=$.center;return delete $.rotate,$.center=function(ie){return arguments.length?W(kt(ie)):kt.invert(W())},$.clipAngle(90)}function It(et,rt){var ct=O(1-u(rt));return[2/k*et*ct,k*(1-ct)]}function Ft(){return(0,_.Z)(It).scale(95.6464).center([0,30])}function qt(et){var rt=p(et);function ct(vt,Mt){return[vt,(vt?vt/u(vt):1)*(u(Mt)*y(vt)-rt*y(Mt))]}return ct.invert=rt?function(vt,Mt){vt&&(Mt*=u(vt)/vt);var kt=y(vt);return[vt,2*T(O(kt*kt+rt*rt-Mt*Mt)-kt,rt-Mt)]}:function(vt,Mt){return[vt,C(vt?Mt*p(vt)/vt:Mt)]},ct}function Nt(){return Ee(qt).scale(249.828).clipAngle(90)}It.invert=function(et,rt){var ct=(ct=rt/k-1)*ct;return[ct>0?et*O(d/ct)/2:0,C(1-ct)]};var Je=O(3);function Ke(et,rt){return[Je*et*(2*y(2*rt/3)-1)/k,Je*k*u(rt/3)]}function Ge(){return(0,_.Z)(Ke).scale(156.19)}function nt(et){var rt=y(et);function ct(vt,Mt){return[vt*rt,u(Mt)/rt]}return ct.invert=function(vt,Mt){return[vt/rt,C(Mt*rt)]},ct}function ht(){return Ee(nt).parallel(38.58).scale(195.044)}function Oe(et){var rt=y(et);function ct(vt,Mt){return[vt*rt,(1+rt)*p(Mt/2)]}return ct.invert=function(vt,Mt){return[vt/rt,2*s(Mt/(1+rt))]},ct}function Be(){return Ee(Oe).scale(124.75)}function Qe(et,rt){var ct=O(8/(3*d));return[ct*et*(1-w(rt)/d),ct*rt]}function ut(){return(0,_.Z)(Qe).scale(165.664)}function pt(et,rt){var ct=O(4-3*u(w(rt)));return[2/O(6*d)*et*ct,a(rt)*O(2*d/3)*(2-ct)]}function bt(){return(0,_.Z)(pt).scale(165.664)}function Lt(et,rt){var ct=O(d*(4+d));return[2/ct*et*(1+O(1-4*rt*rt/(d*d))),4/ct*rt]}function Ct(){return(0,_.Z)(Lt).scale(180.739)}function mt(et,rt){var ct=(2+v)*u(rt);rt/=2;for(var vt=0,Mt=1/0;vt<10&&w(Mt)>c;vt++){var kt=y(rt);rt-=Mt=(rt+u(rt)*(kt+2)-ct)/(2*kt*(1+kt))}return[2/O(d*(4+d))*et*(1+y(rt)),2*O(d/(4+d))*u(rt)]}function Ot(){return(0,_.Z)(mt).scale(180.739)}function _t(et,rt){return[et*(1+y(rt))/O(2+d),2*rt/O(2+d)]}function Pt(){return(0,_.Z)(_t).scale(173.044)}function Bt(et,rt){for(var ct=(1+v)*u(rt),vt=0,Mt=1/0;vt<10&&w(Mt)>c;vt++)rt-=Mt=(rt+u(rt)-ct)/(1+y(rt));return ct=O(2+d),[et*(1+y(rt))/ct,2*rt/ct]}function Wt(){return(0,_.Z)(Bt).scale(173.044)}Ke.invert=function(et,rt){var ct=3*C(rt/(Je*k));return[k*et/(Je*(2*y(2*ct/3)-1)),ct]},Qe.invert=function(et,rt){var ct=O(8/(3*d)),vt=rt/ct;return[et/(ct*(1-w(vt)/d)),vt]},pt.invert=function(et,rt){var ct=2-w(rt)/O(2*d/3);return[et*O(6*d)/(2*ct),a(rt)*C((4-ct*ct)/3)]},Lt.invert=function(et,rt){var ct=O(d*(4+d))/2;return[et*ct/(1+O(1-rt*rt*(4+d)/(4*d))),rt*ct/2]},mt.invert=function(et,rt){var ct=rt*O((4+d)/d)/2,vt=C(ct),Mt=y(vt);return[et/(2/O(d*(4+d))*(1+Mt)),C((vt+ct*(Mt+2))/(2+v))]},_t.invert=function(et,rt){var ct=O(2+d),vt=rt*ct/2;return[ct*et/(1+y(vt)),vt]},Bt.invert=function(et,rt){var ct=1+v,vt=O(ct/2);return[2*et*vt/(1+y(rt*=vt)),C((rt+u(rt))/ct)]};var Gt=3+2*m;function Xt(et,rt){var ct=u(et/=2),vt=y(et),Mt=O(y(rt)),kt=y(rt/=2),q=u(rt)/(kt+m*vt*Mt),$=O(2/(1+q*q)),W=O((m*kt+(vt+ct)*Mt)/(m*kt+(vt-ct)*Mt));return[Gt*($*(W-1/W)-2*t(W)),Gt*($*q*(W+1/W)-2*s(q))]}function Kt(){return(0,_.Z)(Xt).scale(62.5271)}Xt.invert=function(et,rt){if(!(ct=H.invert(et/1.2,1.065*rt)))return null;var ct,vt=ct[0],Mt=ct[1],kt=20;et/=Gt,rt/=Gt;do{var q=vt/2,$=Mt/2,W=u(q),ie=y(q),_e=u($),ze=y($),He=y(Mt),Xe=O(He),at=_e/(ze+m*ie*Xe),wt=at*at,At=O(2/(1+wt)),re=(m*ze+(ie+W)*Xe)/(m*ze+(ie-W)*Xe),ve=O(re),Le=ve-1/ve,Fe=ve+1/ve,Ve=At*Le-2*t(ve)-et,We=At*at*Fe-2*s(at)-rt,$e=_e&&g*Xe*W*wt/_e,tt=(m*ie*ze+Xe)/(2*(ze+m*ie*Xe)*(ze+m*ie*Xe)*Xe),lt=-.5*at*At*At*At,gt=lt*$e,zt=lt*tt,Ut=(Ut=2*ze+m*Xe*(ie-W))*Ut*ve,Vt=(m*ie*ze*Xe+He)/Ut,Qt=-m*W*_e/(Xe*Ut),gn=Le*gt-2*Vt/ve+At*(Vt+Vt/re),en=Le*zt-2*Qt/ve+At*(Qt+Qt/re),sn=at*Fe*gt-2*$e/(1+wt)+At*Fe*$e+At*at*(Vt-Vt/re),rn=at*Fe*zt-2*tt/(1+wt)+At*Fe*tt+At*at*(Qt-Qt/re),Mn=en*sn-rn*gn;if(!Mn)break;var xn=(We*en-Ve*rn)/Mn,an=(Ve*sn-We*gn)/Mn;vt-=xn,Mt=i(-v,r(v,Mt-an))}while((w(xn)>c||w(an)>c)&&--kt>0);return w(w(Mt)-v)vt){var ze=O(_e),He=T(ie,W),Xe=ct*o(He/ct),at=He-Xe,wt=et*y(at),At=(et*u(at)-at*u(wt))/(v-wt),re=Hn(at,At),ve=(d-et)/qn(re,wt,d);W=ze;var Le,Fe=50;do W-=Le=(et+qn(re,wt,W)*ve-ze)/(re(W)*ve);while(w(Le)>c&&--Fe>0);ie=at*u(W),Wvt){var W=O($),ie=T(q,kt),_e=ct*o(ie/ct),ze=ie-_e;kt=W*y(ze),q=W*u(ze);for(var He=kt-v,Xe=u(kt),at=q/Xe,wt=ktc||w(He)>c)&&--wt>0);return[Xe,at]},W}var kr=tr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function gr(){return(0,_.Z)(kr).scale(149.995)}var ir=tr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function dr(){return(0,_.Z)(ir).scale(153.93)}var yr=tr(5/6*d,-.62636,-.0344,0,1.3493,-.05524,0,.045);function $t(){return(0,_.Z)(yr).scale(130.945)}function mn(et,rt){var ct=et*et,vt=rt*rt;return[et*(1-.162388*vt)*(.87-952426e-9*ct*ct),rt*(1+vt/12)]}function Ln(){return(0,_.Z)(mn).scale(131.747)}mn.invert=function(et,rt){var ct,vt=et,Mt=rt,kt=50;do{var q=Mt*Mt;Mt-=ct=(Mt*(1+q/12)-rt)/(1+q/4)}while(w(ct)>c&&--kt>0);kt=50,et/=1-.162388*q;do{var $=($=vt*vt)*$;vt-=ct=(vt*(.87-952426e-9*$)-et)/(.87-.00476213*$)}while(w(ct)>c&&--kt>0);return[vt,Mt]};var En=tr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function jn(){return(0,_.Z)(En).scale(131.087)}function $n(et){var rt=et(v,0)[0]-et(-v,0)[0];function ct(vt,Mt){var kt=vt>0?-.5:.5,q=et(vt+kt*d,Mt);return q[0]-=kt*rt,q}return et.invert&&(ct.invert=function(vt,Mt){var kt=vt>0?-.5:.5,q=et.invert(vt+kt*rt,Mt),$=q[0]-kt*d;return $<-d?$+=2*d:$>d&&($-=2*d),q[0]=$,q}),ct}function Zn(et,rt){var ct=a(et),vt=a(rt),Mt=y(rt),kt=y(et)*Mt,q=u(et)*Mt,$=u(vt*rt);et=w(T(q,$)),rt=C(kt),w(et-v)>c&&(et%=v);var W=function(ie,_e){if(_e===v)return[0,0];var ze,He,Xe=u(_e),at=Xe*Xe,wt=at*at,At=1+wt,re=1+3*wt,ve=1-wt,Le=C(1/O(At)),Fe=ve+at*At*Le,Ve=(1-Xe)/Fe,We=O(Ve),$e=Ve*At,tt=O($e),lt=We*ve;if(ie===0)return[0,-(lt+at*tt)];var gt,zt=y(_e),Ut=1/zt,Vt=2*Xe*zt,Qt=(-Fe*zt-(-3*at+Le*re)*Vt*(1-Xe))/(Fe*Fe),gn=-Ut*Vt,en=-Ut*(at*At*Qt+Ve*re*Vt),sn=-2*Ut*(ve*(.5*Qt/We)-2*at*We*Vt),rn=4*ie/d;if(ie>.222*d||_e.175*d){if(ze=(lt+at*O($e*(1+wt)-lt*lt))/(1+wt),ie>d/4)return[ze,ze];var Mn=ze,xn=.5*ze;ze=.5*(xn+Mn),He=50;do{var an=ze*(sn+gn*O($e-ze*ze))+en*C(ze/tt)-rn;if(!an)break;an<0?xn=ze:Mn=ze,ze=.5*(xn+Mn)}while(w(Mn-xn)>c&&--He>0)}else{ze=c,He=25;do{var zn=ze*ze,Vn=O($e-zn),nr=sn+gn*Vn,rr=ze*nr+en*C(ze/tt)-rn;ze-=gt=Vn?rr/(nr+(en-gn*zn)/Vn):0}while(w(gt)>c&&--He>0)}return[ze,-lt-at*O($e-ze*ze)]}(et>d/4?v-et:et,rt);return et>d/4&&($=W[0],W[0]=-W[1],W[1]=-$),W[0]*=ct,W[1]*=-vt,W}function Qn(){return(0,_.Z)($n(Zn)).scale(239.75)}function hr(et,rt){var ct,vt,Mt,kt,q,$;if(rt=.999999)return ct=(1-rt)/4,Mt=1/(vt=R(et)),[(kt=(($=f(2*($=et)))-1)/($+1))+ct*((q=vt*I(et))-et)/(vt*vt),Mt-ct*kt*Mt*(q-et),Mt+ct*kt*Mt*(q+et),2*s(f(et))-v+ct*(q-et)/vt];var W=[1,0,0,0,0,0,0,0,0],ie=[O(rt),0,0,0,0,0,0,0,0],_e=0;for(vt=O(1-rt),q=1;w(ie[_e]/W[_e])>c&&_e<8;)ct=W[_e++],ie[_e]=(ct-vt)/2,W[_e]=(ct+vt)/2,vt=O(ct*vt),q*=2;Mt=q*W[_e]*et;do Mt=(C(kt=ie[_e]*u(vt=Mt)/W[_e])+Mt)/2;while(--_e);return[u(Mt),kt=y(Mt),kt/y(Mt-vt),Mt]}function tn(et,rt){if(!rt)return et;if(rt===1)return t(p(et/2+x));for(var ct=1,vt=O(1-rt),Mt=O(rt),kt=0;w(Mt)>c;kt++){if(et%d){var q=s(vt*p(et)/ct);q<0&&(q+=d),et+=q+~~(et/d)*d}else et+=et;Mt=(ct+vt)/2,vt=O(ct*vt),Mt=((ct=Mt)-vt)/2}return et/(n(2,kt)*ct)}function Pn(et,rt){var ct=(m-1)/(m+1),vt=O(1-ct*ct),Mt=tn(v,vt*vt),kt=t(p(d/4+w(rt)/2)),q=f(-1*kt)/O(ct),$=function(ie,_e){var ze=ie*ie,He=_e+1,Xe=1-ze-_e*_e;return[.5*((ie>=0?v:-v)-T(Xe,2*ie)),-.25*t(Xe*Xe+4*ze)+.5*t(He*He+ze)]}(q*y(-1*et),q*u(-1*et)),W=function(ie,_e,ze){var He=w(ie),Xe=I(w(_e));if(He){var at=1/u(He),wt=1/(p(He)*p(He)),At=-(wt+ze*(Xe*Xe*at*at)-1+ze),re=(-At+O(At*At-(ze-1)*wt*4))/2;return[tn(s(1/O(re)),ze)*a(ie),tn(s(O((re/wt-1)/ze)),1-ze)*a(_e)]}return[0,tn(s(Xe),1-ze)*a(_e)]}($[0],$[1],vt*vt);return[-W[1],(rt>=0?1:-1)*(.5*Mt-W[0])]}function jt(){return(0,_.Z)($n(Pn)).scale(151.496)}Zn.invert=function(et,rt){w(et)>1&&(et=2*a(et)-et),w(rt)>1&&(rt=2*a(rt)-rt);var ct=a(et),vt=a(rt),Mt=-ct*et,kt=-vt*rt,q=kt/Mt<1,$=function(ze,He){for(var Xe=0,at=1,wt=.5,At=50;;){var re=wt*wt,ve=O(wt),Le=C(1/O(1+re)),Fe=1-re+wt*(1+re)*Le,Ve=(1-ve)/Fe,We=O(Ve),$e=Ve*(1+re),tt=We*(1-re),lt=O($e-ze*ze),gt=He+tt+wt*lt;if(w(at-Xe)0?Xe=wt:at=wt,wt=.5*(Xe+at)}if(!At)return null;var zt=C(ve),Ut=y(zt),Vt=1/Ut,Qt=2*ve*Ut,gn=(-Fe*Ut-(-3*wt+Le*(1+3*re))*Qt*(1-ve))/(Fe*Fe);return[d/4*(ze*(-2*Vt*(.5*gn/We*(1-re)-2*wt*We*Qt)+-Vt*Qt*lt)+-Vt*(wt*(1+re)*gn+Ve*(1+3*re)*Qt)*C(ze/O($e))),zt]}(q?kt:Mt,q?Mt:kt),W=$[0],ie=$[1],_e=y(ie);return q&&(W=-v-W),[ct*(T(u(W)*_e,-u(ie))+d),vt*C(y(W)*_e)]},Pn.invert=function(et,rt){var ct,vt,Mt,kt,q,$,W=(m-1)/(m+1),ie=O(1-W*W),_e=(vt=-et,Mt=ie*ie,(ct=.5*tn(v,ie*ie)-rt)?(kt=hr(ct,Mt),vt?($=(q=hr(vt,1-Mt))[1]*q[1]+Mt*kt[0]*kt[0]*q[0]*q[0],[[kt[0]*q[2]/$,kt[1]*kt[2]*q[0]*q[1]/$],[kt[1]*q[1]/$,-kt[0]*kt[2]*q[0]*q[2]/$],[kt[2]*q[1]*q[2]/$,-Mt*kt[0]*kt[1]*q[0]/$]]):[[kt[0],0],[kt[1],0],[kt[2],0]]):[[0,(q=hr(vt,1-Mt))[0]/q[1]],[1/q[1],0],[q[2]/q[1],0]]),ze=function(He,Xe){var at=Xe[0]*Xe[0]+Xe[1]*Xe[1];return[(He[0]*Xe[0]+He[1]*Xe[1])/at,(He[1]*Xe[0]-He[0]*Xe[1])/at]}(_e[0],_e[1]);return[T(ze[1],ze[0])/-1,2*s(f(-.5*t(W*ze[0]*ze[0]+W*ze[1]*ze[1])))-v]};var Jt=e(7613);function un(et){var rt=u(et),ct=y(et),vt=Rn(et);function Mt(kt,q){var $=vt(kt,q);kt=$[0],q=$[1];var W=u(q),ie=y(q),_e=y(kt),ze=L(rt*W+ct*ie*_e),He=u(ze),Xe=w(He)>c?ze/He:1;return[Xe*ct*u(kt),(w(kt)>v?Xe:-Xe)*(rt*ie-ct*W*_e)]}return vt.invert=Rn(-et),Mt.invert=function(kt,q){var $=O(kt*kt+q*q),W=-u($),ie=y($),_e=$*ie,ze=-q*W,He=$*rt,Xe=O(_e*_e+ze*ze-He*He),at=T(_e*He+ze*Xe,ze*He-_e*Xe),wt=($>v?-1:1)*T(kt*W,$*y(at)*ie+q*u(at)*W);return vt.invert(wt,at)},Mt}function Rn(et){var rt=u(et),ct=y(et);return function(vt,Mt){var kt=y(Mt),q=y(vt)*kt,$=u(vt)*kt,W=u(Mt);return[T($,q*ct-W*rt),C(W*ct+q*rt)]}}function On(){var et=0,rt=(0,_.r)(un),ct=rt(et),vt=ct.rotate,Mt=ct.stream,kt=(0,Jt.Z)();return ct.parallel=function(q){if(!arguments.length)return et*M;var $=ct.rotate();return rt(et=q*A).rotate($)},ct.rotate=function(q){return arguments.length?(vt.call(ct,[q[0],q[1]-et*M]),kt.center([-q[0],-q[1]]),ct):((q=vt.call(ct))[1]+=et*M,q)},ct.stream=function(q){return(q=Mt(q)).sphere=function(){q.polygonStart();var $,W=kt.radius(89.99)().coordinates[0],ie=W.length-1,_e=-1;for(q.lineStart();++_e=0;)q.point(($=W[_e])[0],$[1]);q.lineEnd(),q.polygonEnd()},q},ct.scale(79.4187).parallel(45).clipAngle(179.999)}var Sn=e(33064),pn=e(72736),bn=C(1-1/3)*M,dn=nt(0);function vn(et){var rt=bn*A,ct=It(d,rt)[0]-It(-d,rt)[0],vt=dn(0,rt)[1],Mt=It(0,rt)[1],kt=k-Mt,q=h/et,$=4/h,W=vt+kt*kt*4/h;function ie(_e,ze){var He,Xe=w(ze);if(Xe>rt){var at=r(et-1,i(0,l((_e+d)/q)));(He=It(_e+=d*(et-1)/et-at*q,Xe))[0]=He[0]*h/ct-h*(et-1)/(2*et)+at*h/et,He[1]=vt+4*(He[1]-Mt)*kt/h,ze<0&&(He[1]=-He[1])}else He=dn(_e,ze);return He[0]*=$,He[1]/=W,He}return ie.invert=function(_e,ze){_e/=$;var He=w(ze*=W);if(He>vt){var Xe=r(et-1,i(0,l((_e+d)/q)));_e=(_e+d*(et-1)/et-Xe*q)*ct/h;var at=It.invert(_e,.25*(He-vt)*h/kt+Mt);return at[0]-=d*(et-1)/et-Xe*q,ze<0&&(at[1]=-at[1]),at}return dn.invert(_e,ze)},ie}function An(et,rt){return[et,1&rt?89.999999:bn]}function Bn(et,rt){return[et,1&rt?-89.999999:-bn]}function Xn(et){return[.999999*et[0],et[1]]}function er(){var et=4,rt=(0,_.r)(vn),ct=rt(et),vt=ct.stream;return ct.lobes=function(Mt){return arguments.length?rt(et=+Mt):et},ct.stream=function(Mt){var kt=ct.rotate(),q=vt(Mt),$=(ct.rotate([0,0]),vt(Mt));return ct.rotate(kt),q.sphere=function(){var W,ie;(0,pn.Z)((W=180/et,ie=[].concat((0,Sn.w6)(-180,180+W/2,W).map(An),(0,Sn.w6)(180,-180-W/2,-W).map(Bn)),{type:"Polygon",coordinates:[W===180?ie.map(Xn):ie]}),$)},q},ct.scale(239.75)}function Jn(et){var rt,ct=1+et,vt=C(u(1/ct)),Mt=2*O(d/(rt=d+4*vt*ct)),kt=.5*Mt*(ct+O(et*(2+et))),q=et*et,$=ct*ct;function W(ie,_e){var ze,He,Xe=1-u(_e);if(Xe&&Xe<2){var at,wt=v-_e,At=25;do{var re=u(wt),ve=y(wt),Le=vt+T(re,ct-ve),Fe=1+$-2*ct*ve;wt-=at=(wt-q*vt-ct*re+Fe*Le-.5*Xe*rt)/(2*ct*re*Le)}while(w(at)>b&&--At>0);ze=Mt*O(Fe),He=ie*Le/d}else ze=Mt*(et+Xe),He=ie*vt/d;return[ze*u(He),kt-ze*y(He)]}return W.invert=function(ie,_e){var ze=ie*ie+(_e-=kt)*_e,He=(1+$-ze/(Mt*Mt))/(2*ct),Xe=L(He),at=u(Xe),wt=vt+T(at,ct-He);return[C(ie/O(ze))*d/wt,C(1-2*(Xe-q*vt-ct*at+(1+$-2*ct*He)*wt)/rt)]},W}function lr(){var et=1,rt=(0,_.r)(Jn),ct=rt(et);return ct.ratio=function(vt){return arguments.length?rt(et=+vt):et},ct.scale(167.774).center([0,18.67])}var sr=.7109889596207567,fr=.0528035274542;function cr(et,rt){return rt>-sr?((et=Me(et,rt))[1]+=fr,et):Ue(et,rt)}function vr(){return(0,_.Z)(cr).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Sr(et,rt){return w(rt)>sr?((et=Me(et,rt))[1]-=rt>0?fr:-fr,et):Ue(et,rt)}function Mr(){return(0,_.Z)(Sr).scale(152.63)}function Lr(et,rt,ct,vt){var Mt=O(4*d/(2*ct+(1+et-rt/2)*u(2*ct)+(et+rt)/2*u(4*ct)+rt/2*u(6*ct))),kt=O(vt*u(ct)*O((1+et*y(2*ct)+rt*y(4*ct))/(1+et+rt))),q=ct*W(1);function $(ze){return O(1+et*y(2*ze)+rt*y(4*ze))}function W(ze){var He=ze*ct;return(2*He+(1+et-rt/2)*u(2*He)+(et+rt)/2*u(4*He)+rt/2*u(6*He))/ct}function ie(ze){return $(ze)*u(ze)}var _e=function(ze,He){var Xe=ct*de(W,q*u(He)/ct,He/d);isNaN(Xe)&&(Xe=ct*a(He));var at=Mt*$(Xe);return[at*kt*ze/d*y(Xe),at/kt*u(Xe)]};return _e.invert=function(ze,He){var Xe=de(ie,He*kt/Mt);return[ze*d/(y(Xe)*Mt*kt*$(Xe)),C(ct*W(Xe/ct)/q)]},ct===0&&(Mt=O(vt/d),(_e=function(ze,He){return[ze*Mt,u(He)/Mt]}).invert=function(ze,He){return[ze/Mt,C(He*Mt)]}),_e}function pr(){var et=1,rt=0,ct=45*A,vt=2,Mt=(0,_.r)(Lr),kt=Mt(et,rt,ct,vt);return kt.a=function(q){return arguments.length?Mt(et=+q,rt,ct,vt):et},kt.b=function(q){return arguments.length?Mt(et,rt=+q,ct,vt):rt},kt.psiMax=function(q){return arguments.length?Mt(et,rt,ct=+q*A,vt):ct*M},kt.ratio=function(q){return arguments.length?Mt(et,rt,ct,vt=+q):vt},kt.scale(180.739)}function Pr(et,rt,ct,vt,Mt,kt,q,$,W,ie,_e){if(_e.nanEncountered)return NaN;var ze,He,Xe,at,wt,At,re,ve,Le,Fe;if(He=et(rt+.25*(ze=ct-rt)),Xe=et(ct-.25*ze),isNaN(He))_e.nanEncountered=!0;else{if(!isNaN(Xe))return Fe=((At=(at=ze*(vt+4*He+Mt)/12)+(wt=ze*(Mt+4*Xe+kt)/12))-q)/15,ie>W?(_e.maxDepthCount++,At+Fe):Math.abs(Fe)<$?At+Fe:(ve=Pr(et,rt,re=rt+.5*ze,vt,He,Mt,at,.5*$,W,ie+1,_e),isNaN(ve)?(_e.nanEncountered=!0,NaN):(Le=Pr(et,re,ct,Mt,Xe,kt,wt,.5*$,W,ie+1,_e),isNaN(Le)?(_e.nanEncountered=!0,NaN):ve+Le));_e.nanEncountered=!0}}function Hr(et,rt,ct,vt,Mt){vt===void 0&&(vt=1e-8),Mt===void 0&&(Mt=20);var kt=et(rt),q=et(.5*(rt+ct)),$=et(ct);return Pr(et,rt,ct,kt,q,$,(kt+4*q+$)*(ct-rt)/6,vt,Mt,1,{maxDepthCount:0,nanEncountered:!1})}function ci(et,rt,ct){function vt(Xe){return et+(1-et)*n(1-n(Xe,rt),1/rt)}function Mt(Xe){return Hr(vt,0,Xe,1e-4)}for(var kt=1/Mt(1),q=1e3,$=1.00000001*kt,W=[],ie=0;ie<=q;ie++)W.push(Mt(ie/q)*$);function _e(Xe){var at=0,wt=q,At=500;do W[At]>Xe?wt=At:at=At,At=at+wt>>1;while(At>at);var re=W[At+1]-W[At];return re&&(re=(Xe-W[At+1])/re),(At+1+re)/q}var ze=2*_e(1)/d*kt/ct,He=function(Xe,at){var wt=_e(w(u(at))),At=vt(wt)*Xe;return wt/=ze,[At,at>=0?wt:-wt]};return He.invert=function(Xe,at){var wt;return w(at*=ze)<1&&(wt=a(at)*C(Mt(w(at))*kt)),[Xe/vt(w(at)),wt]},He}function Ti(){var et=0,rt=2.5,ct=1.183136,vt=(0,_.r)(ci),Mt=vt(et,rt,ct);return Mt.alpha=function(kt){return arguments.length?vt(et=+kt,rt,ct):et},Mt.k=function(kt){return arguments.length?vt(et,rt=+kt,ct):rt},Mt.gamma=function(kt){return arguments.length?vt(et,rt,ct=+kt):ct},Mt.scale(152.63)}function Mi(et,rt){return w(et[0]-rt[0])=0;--$)ct=(rt=et[1][$])[0][0],vt=rt[0][1],Mt=rt[1][1],kt=rt[2][0],q=rt[2][1],W.push(fa([[kt-c,q-c],[kt-c,Mt+c],[ct+c,Mt+c],[ct+c,vt-c]],30));return{type:"Polygon",coordinates:[(0,Sn.TS)(W)]}}function xi(et,rt,ct){var vt,Mt;function kt(W,ie){for(var _e=ie<0?-1:1,ze=rt[+(ie<0)],He=0,Xe=ze.length-1;Heze[He][2][0];++He);var at=et(W-ze[He][1][0],ie);return at[0]+=et(ze[He][1][0],_e*ie>_e*ze[He][0][1]?ze[He][0][1]:ie)[0],at}ct?kt.invert=ct(kt):et.invert&&(kt.invert=function(W,ie){for(var _e=Mt[+(ie<0)],ze=rt[+(ie<0)],He=0,Xe=_e.length;Hewt&&(ze=at,at=wt,wt=ze),[[He,at],[Xe,wt]]})}),q):rt.map(function(ie){return ie.map(function(_e){return[[_e[0][0]*M,_e[0][1]*M],[_e[1][0]*M,_e[1][1]*M],[_e[2][0]*M,_e[2][1]*M]]})})},rt!=null&&q.lobes(rt),q}cr.invert=function(et,rt){return rt>-sr?Me.invert(et,rt-fr):Ue.invert(et,rt)},Sr.invert=function(et,rt){return w(rt)>sr?Me.invert(et,rt+(rt>0?fr:-fr)):Ue.invert(et,rt)};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 Ka(){return xi(me,Oa).scale(160.857)}var Yo=[[[[-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 Xs(){return xi(Sr,Yo).scale(152.63)}var Uu=[[[[-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 pu(){return xi(Me,Uu).scale(169.529)}var $s=[[[[-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 Qa(){return xi(Me,$s).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 Qi(){return xi(cr,du,he).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var yl=[[[[-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 qa(){return xi(Ue,yl).scale(152.63).rotate([-20,0])}function eo(et,rt){return[3/h*et*O(d*d/3-rt*rt),rt]}function fs(){return(0,_.Z)(eo).scale(158.837)}function fi(et){function rt(ct,vt){if(w(w(vt)-v)2)return null;var kt=(ct/=2)*ct,q=(vt/=2)*vt,$=2*vt/(1+kt+q);return $=n((1+$)/(1-$),1/et),[T(2*ct,1-kt-q)/et,C(($-1)/($+1))]},rt}function hs(){var et=.5,rt=(0,_.r)(fi),ct=rt(et);return ct.spacing=function(vt){return arguments.length?rt(et=+vt):et},ct.scale(124.75)}eo.invert=function(et,rt){return[h/3*et/O(d*d/3-rt*rt),rt]};var ao=d/m;function bo(et,rt){return[et*(1+O(y(rt)))/2,rt/(y(rt/2)*y(et/6))]}function Ro(){return(0,_.Z)(bo).scale(97.2672)}function xl(et,rt){var ct=et*et,vt=rt*rt;return[et*(.975534+vt*(-.0143059*ct-.119161+-.0547009*vt)),rt*(1.00384+ct*(.0802894+-.02855*vt+199025e-9*ct)+vt*(.0998909+-.0491032*vt))]}function Vu(){return(0,_.Z)(xl).scale(139.98)}function Xo(et,rt){return[u(et)/y(rt),p(rt)*y(et)]}function Hu(){return(0,_.Z)(Xo).scale(144.049).clipAngle(89.999)}function qu(et){var rt=y(et),ct=p(x+et/2);function vt(Mt,kt){var q=kt-et,$=w(q)=0;)He=(ze=et[_e])[0]+W*(kt=He)-ie*Xe,Xe=ze[1]+W*Xe+ie*kt;return[He=W*(kt=He)-ie*Xe,Xe=W*Xe+ie*kt]}return ct.invert=function(vt,Mt){var kt=20,q=vt,$=Mt;do{for(var W,ie=rt,_e=et[ie],ze=_e[0],He=_e[1],Xe=0,at=0;--ie>=0;)Xe=ze+q*(W=Xe)-$*at,at=He+q*at+$*W,ze=(_e=et[ie])[0]+q*(W=ze)-$*He,He=_e[1]+q*He+$*W;var wt,At,re=(Xe=ze+q*(W=Xe)-$*at)*Xe+(at=He+q*at+$*W)*at;q-=wt=((ze=q*(W=ze)-$*He-vt)*Xe+(He=q*He+$*W-Mt)*at)/re,$-=At=(He*Xe-ze*at)/re}while(w(wt)+w(At)>1e-12&&--kt>0);if(kt){var ve=O(q*q+$*$),Le=2*s(.5*ve),Fe=u(Le);return[T(q*Fe,ve*y(Le)),ve?C($*Fe/ve):0]}},ct}bo.invert=function(et,rt){var ct=w(et),vt=w(rt),Mt=c,kt=v;vtc||w(At)>c)&&--Mt>0);return Mt&&[ct,vt]},Xo.invert=function(et,rt){var ct=et*et,vt=rt*rt+1,Mt=ct+vt,kt=et?g*O((Mt-O(Mt*Mt-4*ct))/ct):1/O(vt);return[C(et*kt),a(rt)*L(kt)]},gu.invert=function(et,rt){return[et,2.5*s(f(.8*rt))-.625*d]};var $o=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Jo=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Js=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Ko=[[.9245,0],[0,0],[.01943,0]],mu=[[.721316,0],[0,0],[-.00881625,-.00617325]];function yu(){return Ps($o,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function Ls(){return Ps(Jo,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Vl(){return Ps(Js,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function ps(){return Ps(Ko,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function Ks(){return Ps(mu,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Ps(et,rt){var ct=(0,_.Z)(vu(et)).rotate(rt).clipAngle(90),vt=(0,st.Z)(rt),Mt=ct.center;return delete ct.rotate,ct.center=function(kt){return arguments.length?Mt(vt(kt)):vt.invert(Mt())},ct}var Qo=O(6),hi=O(7);function ds(et,rt){var ct=C(7*u(rt)/(3*Qo));return[Qo*et*(2*y(2*ct/3)-1)/hi,9*u(ct/3)/hi]}function Cc(){return(0,_.Z)(ds).scale(164.859)}function Hl(et,rt){for(var ct,vt=(1+g)*u(rt),Mt=rt,kt=0;kt<25&&(Mt-=ct=(u(Mt/2)+u(Mt)-vt)/(.5*y(Mt/2)+y(Mt)),!(w(ct)b&&--$>0);return[et/(.84719-.13063*(vt=q*q)+(kt=vt*(Mt=vt*vt))*kt*(.05494*vt-.04515-.02326*Mt+.00331*kt)),q]},el.invert=function(et,rt){for(var ct=rt/2,vt=0,Mt=1/0;vt<10&&w(Mt)>c;++vt){var kt=y(rt/2);rt-=Mt=(rt-p(rt/2)-ct)/(1-.5/(kt*kt))}return[2*et/(1+y(rt)),rt]};var Is=[[[[-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 Rs(){return xi(fe(1/0),Is).rotate([20,0]).scale(152.63)}function tl(et,rt){var ct=u(rt),vt=y(rt),Mt=a(et);if(et===0||w(rt)===v)return[0,rt];if(rt===0)return[et,0];if(w(et)===v)return[et*vt,v*ct];var kt=d/(2*et)-2*et/d,q=2*rt/d,$=(1-q*q)/(ct-q),W=kt*kt,ie=$*$,_e=1+W/ie,ze=1+ie/W,He=(kt*ct/$-kt/2)/_e,Xe=(ie*ct/W+$/2)/ze,at=Xe*Xe-(ie*ct*ct/W+$*ct-1)/ze;return[v*(He+O(He*He+vt*vt/_e)*Mt),v*(Xe+O(at<0?0:at)*a(-rt*kt)*Mt)]}function Tl(){return(0,_.Z)(tl).scale(127.267)}tl.invert=function(et,rt){var ct=(et/=v)*et,vt=ct+(rt/=v)*rt,Mt=d*d;return[et?(vt-1+O((1-vt)*(1-vt)+4*ct))/(2*et)*v:0,de(function(kt){return vt*(d*u(kt)-2*kt)*d+4*kt*kt*(rt-u(kt))+2*d*kt-Mt*rt},0)]};var kl=1.0148,so=.23185,Al=-.14499,Ml=.02406,bu=1.790857183;function gs(et,rt){var ct=rt*rt;return[et,rt*(kl+ct*ct*(so+ct*(Al+Ml*ct)))]}function ql(){return(0,_.Z)(gs).scale(139.319)}function Sl(et,rt){if(w(rt)bu?rt=bu:rt<-1.790857183&&(rt=-1.790857183);var ct,vt=rt;do{var Mt=vt*vt;vt-=ct=(vt*(kl+Mt*Mt*(so+Mt*(Al+Ml*Mt)))-rt)/(1.0148+Mt*Mt*(1.1592500000000001+Mt*(.21654*Mt-1.01493)))}while(w(ct)>c);return[et,vt]},Sl.invert=function(et,rt){if(w(rt)c&&--kt>0);return q=p(Mt),[(w(rt)=0;)if(tt=We[Ut],$e[0]===tt[0]&&$e[1]===tt[1]){if(gt)return[gt,$e];gt=$e}}}(W.face,ie.face),ze=(wt=_e.map(ie.project),At=_e.map(W.project),re=Ds(wt[1],wt[0]),ve=Ds(At[1],At[0]),Le=function(Ve,We){return T(Ve[0]*We[1]-Ve[1]*We[0],Ve[0]*We[0]+Ve[1]*We[1])}(re,ve),Fe=bi(re)/bi(ve),zs([1,0,wt[0][0],0,1,wt[0][1]],zs([Fe,0,0,0,Fe,0],zs([y(Le),u(Le),0,-u(Le),y(Le),0],[1,0,-At[0][0],0,1,-At[0][1]]))));W.transform=ie.transform?zs(ie.transform,ze):ze;for(var He=ie.edges,Xe=0,at=He.length;Xe0?[-vt[0],0]:[180-vt[0],180])};var rt=zo.map(function(ct){return{face:ct,project:et(ct)}});return[-1,0,0,1,0,1,4,5].forEach(function(ct,vt){var Mt=rt[ct];Mt&&(Mt.children||(Mt.children=[])).push(rt[vt])}),vs(rt[0],function(ct,vt){return rt[ct<-d/2?vt<0?6:4:ct<0?vt<0?2:0:ctW^ve>W&&$<(re-at)*(W-wt)/(ve-wt)+at&&(ie=!ie)}return ie}(Mt[0],vt))return Mt.push(ct),!0})||et.push([ct])}),Ia=[],et.length?et.length>1?{type:"MultiPolygon",coordinates:et}:{type:"Polygon",coordinates:et[0]}:null}};function Ga(et){var rt=et(v,0)[0]-et(-v,0)[0];function ct(vt,Mt){var kt=w(vt)0?vt-d:vt+d,Mt),$=(q[0]-q[1])*g,W=(q[0]+q[1])*g;if(kt)return[$,W];var ie=rt*g,_e=$>0^W>0?-1:1;return[_e*$-a(W)*ie,_e*W-a($)*ie]}return et.invert&&(ct.invert=function(vt,Mt){var kt=(vt+Mt)*g,q=(Mt-vt)*g,$=w(kt)<.5*rt&&w(q)<.5*rt;if(!$){var W=rt*g,ie=kt>0^q>0?-1:1,_e=-ie*vt+(q>0?1:-1)*W,ze=-ie*Mt+(kt>0?1:-1)*W;kt=(-_e-ze)*g,q=(_e-ze)*g}var He=et.invert(kt,q);return $||(He[0]+=kt>0?d:-d),He}),(0,_.Z)(ct).rotate([-90,-90,45]).clipAngle(179.999)}function Wl(){return Ga(Zn).scale(176.423)}function Zl(){return Ga(Pn).scale(111.48)}function Sa(et,rt){if(!(0<=(rt=+rt)&&rt<=20))throw new Error("invalid digits");function ct(ie){var _e=ie.length,ze=2,He=new Array(_e);for(He[0]=+ie[0].toFixed(rt),He[1]=+ie[1].toFixed(rt);ze<_e;)He[ze]=ie[ze],++ze;return He}function vt(ie){return ie.map(ct)}function Mt(ie){for(var _e=ct(ie[0]),ze=[_e],He=1;He2||Xe[0]!=_e[0]||Xe[1]!=_e[1])&&(ze.push(Xe),_e=Xe)}return ze.length===1&&ie.length>1&&ze.push(ct(ie[ie.length-1])),ze}function kt(ie){return ie.map(Mt)}function q(ie){if(ie==null)return ie;var _e;switch(ie.type){case"GeometryCollection":_e={type:"GeometryCollection",geometries:ie.geometries.map(q)};break;case"Point":_e={type:"Point",coordinates:ct(ie.coordinates)};break;case"MultiPoint":_e={type:ie.type,coordinates:vt(ie.coordinates)};break;case"LineString":_e={type:ie.type,coordinates:Mt(ie.coordinates)};break;case"MultiLineString":case"Polygon":_e={type:ie.type,coordinates:kt(ie.coordinates)};break;case"MultiPolygon":_e={type:"MultiPolygon",coordinates:ie.coordinates.map(kt)};break;default:return ie}return ie.bbox!=null&&(_e.bbox=ie.bbox),_e}function $(ie){var _e={type:"Feature",properties:ie.properties,geometry:q(ie.geometry)};return ie.id!=null&&(_e.id=ie.id),ie.bbox!=null&&(_e.bbox=ie.bbox),_e}if(et!=null)switch(et.type){case"Feature":return $(et);case"FeatureCollection":var W={type:"FeatureCollection",features:et.features.map($)};return et.bbox!=null&&(W.bbox=et.bbox),W;default:return q(et)}return et}function Cr(et){var rt=u(et);function ct(vt,Mt){var kt=rt?p(vt*rt/2)/rt:vt/2;if(!Mt)return[2*kt,-et];var q=2*s(kt*u(Mt)),$=1/p(Mt);return[u(q)*$,Mt+(1-y(q))*$-et]}return ct.invert=function(vt,Mt){if(w(Mt+=et)c&&--W>0);var He=vt*(ie=p($)),Xe=p(w(Mt)0?v:-v)*(ie+kt*(ze-$)/2+kt*kt*(ze-2*ie+$)/2)]}function rl(){return(0,_.Z)(Yl).scale(152.63)}function il(et,rt){var ct=function(q){function $(W,ie){var _e=y(ie),ze=(q-1)/(q-_e*y(W));return[ze*_e*u(W),ze*u(ie)]}return $.invert=function(W,ie){var _e=W*W+ie*ie,ze=O(_e),He=(q-O(1-_e*(q+1)/(q-1)))/((q-1)/ze+ze/(q-1));return[T(W*He,ze*O(1-He*He)),ze?C(ie*He/ze):0]},$}(et);if(!rt)return ct;var vt=y(rt),Mt=u(rt);function kt(q,$){var W=ct(q,$),ie=W[1],_e=ie*Mt/(et-1)+vt;return[W[0]*vt/_e,ie/_e]}return kt.invert=function(q,$){var W=(et-1)/(et-1-$*Mt);return ct.invert(W*q,W*$*vt)},kt}function al(){var et=2,rt=0,ct=(0,_.r)(il),vt=ct(et,rt);return vt.distance=function(Mt){return arguments.length?ct(et=+Mt,rt):et},vt.tilt=function(Mt){return arguments.length?ct(et,rt=Mt*A):rt*M},vt.scale(432.147).clipAngle(L(1/et)*M-1e-6)}Ra.forEach(function(et){et[1]*=1.0144}),Yl.invert=function(et,rt){var ct=rt/v,vt=90*ct,Mt=r(18,w(vt/5)),kt=i(0,l(Mt));do{var q=Ra[kt][1],$=Ra[kt+1][1],W=Ra[r(19,kt+2)][1],ie=W-q,_e=W-2*$+q,ze=2*(w(ct)-$)/ie,He=_e/ie,Xe=ze*(1-He*ze*(1-2*He*ze));if(Xe>=0||kt===1){vt=(rt>=0?5:-5)*(Xe+Mt);var at,wt=50;do Xe=(Mt=r(18,w(vt)/5))-(kt=l(Mt)),q=Ra[kt][1],$=Ra[kt+1][1],W=Ra[r(19,kt+2)][1],vt-=(at=(rt>=0?v:-v)*($+Xe*(W-q)/2+Xe*Xe*(W-2*$+q)/2)-rt)*M;while(w(at)>b&&--wt>0);break}}while(--kt>=0);var At=Ra[kt][0],re=Ra[kt+1][0],ve=Ra[r(19,kt+2)][0];return[et/(re+Xe*(ve-At)/2+Xe*Xe*(ve-2*re+At)/2),vt*A]};var Or=-179.9999,ol=179.9999,uo=-89.9999,Xl=89.9999;function Cl(et){return et.length>0}function ya(et){return et===-90||et===90?[0,et]:[-180,(rt=et,Math.floor(1e4*rt)/1e4)];var rt}function Vs(et){var rt=et[0],ct=et[1],vt=!1;return rt<=Or?(rt=-180,vt=!0):rt>=ol&&(rt=180,vt=!0),ct<=uo?(ct=-90,vt=!0):ct>=Xl&&(ct=90,vt=!0),vt?[rt,ct]:et}function ns(et){return et.map(Vs)}function Wa(et,rt,ct){for(var vt=0,Mt=et.length;vt=ol||_e<=uo||_e>=Xl){kt[q]=Vs(W);for(var ze=q+1;ze<$;++ze){var He=kt[ze],Xe=He[0],at=He[1];if(Xe>Or&&Xeuo&&at=$)break;ct.push({index:-1,polygon:rt,ring:kt=kt.slice(ze-1)}),kt[0]=ya(kt[0][1]),q=-1,$=kt.length}}}}function xs(et){var rt,ct,vt,Mt,kt,q,$=et.length,W={},ie={};for(rt=0;rt<$;++rt)vt=(ct=et[rt]).ring[0],kt=ct.ring[ct.ring.length-1],vt[0]!==kt[0]||vt[1]!==kt[1]?(ct.index=rt,W[vt]=ie[kt]=ct):(ct.polygon.push(ct.ring),et[rt]=null);for(rt=0;rt<$;++rt)if(ct=et[rt]){if(vt=ct.ring[0],kt=ct.ring[ct.ring.length-1],Mt=ie[vt],q=W[kt],delete W[vt],delete ie[kt],vt[0]===kt[0]&&vt[1]===kt[1]){ct.polygon.push(ct.ring);continue}Mt?(delete ie[vt],delete W[Mt.ring[0]],Mt.ring.pop(),et[Mt.index]=null,ct={index:-1,polygon:Mt.polygon,ring:Mt.ring.concat(ct.ring)},Mt===q?ct.polygon.push(ct.ring):(ct.index=$++,et.push(W[ct.ring[0]]=ie[ct.ring[ct.ring.length-1]]=ct))):q?(delete W[kt],delete ie[q.ring[q.ring.length-1]],ct.ring.pop(),ct={index:$++,polygon:q.polygon,ring:ct.ring.concat(q.ring)},et[q.index]=null,et.push(W[ct.ring[0]]=ie[ct.ring[ct.ring.length-1]]=ct)):(ct.ring.push(ct.ring[0]),ct.polygon.push(ct.ring))}}function _o(et){var rt={type:"Feature",geometry:co(et.geometry)};return et.id!=null&&(rt.id=et.id),et.bbox!=null&&(rt.bbox=et.bbox),et.properties!=null&&(rt.properties=et.properties),rt}function co(et){if(et==null)return et;var rt,ct,vt,Mt;switch(et.type){case"GeometryCollection":rt={type:"GeometryCollection",geometries:et.geometries.map(co)};break;case"Point":rt={type:"Point",coordinates:Vs(et.coordinates)};break;case"MultiPoint":case"LineString":rt={type:et.type,coordinates:ns(et.coordinates)};break;case"MultiLineString":rt={type:"MultiLineString",coordinates:et.coordinates.map(ns)};break;case"Polygon":var kt=[];Wa(et.coordinates,kt,ct=[]),xs(ct),rt={type:"Polygon",coordinates:kt};break;case"MultiPolygon":ct=[],vt=-1,Mt=et.coordinates.length;for(var q=new Array(Mt);++vt0?d-$:$)*M],ie=(0,_.Z)(et(q)).rotate(W),_e=(0,st.Z)(W),ze=ie.center;return delete ie.rotate,ie.center=function(He){return arguments.length?ze(_e(He)):_e.invert(ze())},ie.clipAngle(90)}function Ll(et){var rt=y(et);function ct(vt,Mt){var kt=(0,li.M)(vt,Mt);return kt[0]*=rt,kt}return ct.invert=function(vt,Mt){return li.M.invert(vt/rt,Mt)},ct}function to(){return ho([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function ho(et,rt){return vi(Ll,et,rt)}function Fo(et){if(!(et*=2))return te.N;var rt=-et/2,ct=-rt,vt=et*et,Mt=p(ct),kt=.5/u(ct);function q($,W){var ie=L(y(W)*y($-rt)),_e=L(y(W)*y($-ct));return[((ie*=ie)-(_e*=_e))/(2*et),(W<0?-1:1)*O(4*vt*_e-(vt-ie+_e)*(vt-ie+_e))/(2*et)]}return q.invert=function($,W){var ie,_e,ze=W*W,He=y(O(ze+(ie=$+rt)*ie)),Xe=y(O(ze+(ie=$+ct)*ie));return[T(_e=He-Xe,ie=(He+Xe)*Mt),(W<0?-1:1)*L(O(ie*ie+_e*_e)*kt)]},q}function za(){return di([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function di(et,rt){return vi(Fo,et,rt)}function oa(et,rt){if(w(rt)c&&--$>0);return[a(et)*(O(Mt*Mt+4)+Mt)*d/4,v*q]};var is=4*d+3*O(3),To=2*O(2*d*O(3)/is),_a=Ae(To*O(3)/d,To,is/6);function $l(){return(0,_.Z)(_a).scale(176.84)}function Fa(et,rt){return[et*O(1-3*rt*rt/(d*d)),rt]}function ll(){return(0,_.Z)(Fa).scale(152.63)}function as(et,rt){var ct=y(rt),vt=y(et)*ct,Mt=1-vt,kt=y(et=T(u(et)*ct,-u(rt))),q=u(et);return[q*(ct=O(1-vt*vt))-kt*Mt,-kt*ct-q*Mt]}function _i(){return(0,_.Z)(as).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)}function Si(et,rt){var ct=G(et,rt);return[(ct[0]+et/v)/2,(ct[1]+rt)/2]}function Jl(){return(0,_.Z)(Si).scale(158.837)}Fa.invert=function(et,rt){return[et/O(1-3*rt*rt/(d*d)),rt]},as.invert=function(et,rt){var ct=(et*et+rt*rt)/-2,vt=O(-ct*(2+ct)),Mt=rt*ct+et*vt,kt=et*ct-rt*vt,q=O(kt*kt+Mt*Mt);return[T(vt*Mt,q*(1+ct)),q?-C(vt*kt/q):0]},Si.invert=function(et,rt){var ct=et,vt=rt,Mt=25;do{var kt,q=y(vt),$=u(vt),W=u(2*vt),ie=$*$,_e=q*q,ze=u(ct),He=y(ct/2),Xe=u(ct/2),at=Xe*Xe,wt=1-_e*He*He,At=wt?L(q*He)*O(kt=1/wt):kt=0,re=.5*(2*At*q*Xe+ct/v)-et,ve=.5*(At*$+vt)-rt,Le=.5*kt*(_e*at+At*q*He*ie)+.5/v,Fe=kt*(ze*W/4-At*$*Xe),Ve=.125*kt*(W*Xe-At*$*_e*ze),We=.5*kt*(ie*He+At*at*q)+.5,$e=Fe*Ve-We*Le,tt=(ve*Fe-re*We)/$e,lt=(re*Ve-ve*Le)/$e;ct-=tt,vt-=lt}while((w(tt)>c||w(lt)>c)&&--Mt>0);return[ct,vt]}},33940:function(D,E,e){function _(){return new w}function w(){this.reset()}e.d(E,{Z:function(){return _}}),w.prototype={constructor:w,reset:function(){this.s=this.t=0},add:function(y){T(s,y,this.t),T(this,s.s,this.s),this.s?this.t+=s.t:this.s=s.t},valueOf:function(){return this.s}};var s=new w;function T(y,f,l){var t=y.s=f+l,i=t-f,r=t-i;y.t=f-r+(l-i)}},97860:function(D,E,e){e.d(E,{L9:function(){return r},ZP:function(){return b},gL:function(){return o}});var _,w,s,T,y,f=e(33940),l=e(39695),t=e(73182),i=e(72736),r=(0,f.Z)(),n=(0,f.Z)(),o={point:t.Z,lineStart:t.Z,lineEnd:t.Z,polygonStart:function(){r.reset(),o.lineStart=a,o.lineEnd=u},polygonEnd:function(){var d=+r;n.add(d<0?l.BZ+d:d),this.lineStart=this.lineEnd=this.point=t.Z},sphere:function(){n.add(l.BZ)}};function a(){o.point=p}function u(){c(_,w)}function p(d,v){o.point=c,_=d,w=v,d*=l.uR,v*=l.uR,s=d,T=(0,l.mC)(v=v/2+l.pu),y=(0,l.O$)(v)}function c(d,v){d*=l.uR,v=(v*=l.uR)/2+l.pu;var x=d-s,g=x>=0?1:-1,m=g*x,k=(0,l.mC)(v),h=(0,l.O$)(v),M=y*h,A=T*k+M*(0,l.mC)(m),C=M*g*(0,l.O$)(m);r.add((0,l.fv)(C,A)),s=d,T=k,y=h}function b(d){return n.reset(),(0,i.Z)(d,o),2*n}},77338:function(D,E,e){e.d(E,{Z:function(){return L}});var _,w,s,T,y,f,l,t,i,r,n=e(33940),o=e(97860),a=e(7620),u=e(39695),p=e(72736),c=(0,n.Z)(),b={point:d,lineStart:x,lineEnd:g,polygonStart:function(){b.point=m,b.lineStart=k,b.lineEnd=h,c.reset(),o.gL.polygonStart()},polygonEnd:function(){o.gL.polygonEnd(),b.point=d,b.lineStart=x,b.lineEnd=g,o.L9<0?(_=-(s=180),w=-(T=90)):c>u.Ho?T=90:c<-u.Ho&&(w=-90),r[0]=_,r[1]=s},sphere:function(){_=-(s=180),w=-(T=90)}};function d(O,I){i.push(r=[_=O,s=O]),IT&&(T=I)}function v(O,I){var R=(0,a.Og)([O*u.uR,I*u.uR]);if(t){var U=(0,a.T5)(t,R),B=[U[1],-U[0],0],G=(0,a.T5)(B,U);(0,a.iJ)(G),G=(0,a.Y1)(G);var N,j=O-y,V=j>0?1:-1,H=G[0]*u.RW*V,ee=(0,u.Wn)(j)>180;ee^(V*yT&&(T=N):ee^(V*y<(H=(H+360)%360-180)&&HT&&(T=I)),ee?OM(_,s)&&(s=O):M(O,s)>M(_,s)&&(_=O):s>=_?(O<_&&(_=O),O>s&&(s=O)):O>y?M(_,O)>M(_,s)&&(s=O):M(O,s)>M(_,s)&&(_=O)}else i.push(r=[_=O,s=O]);IT&&(T=I),t=R,y=O}function x(){b.point=v}function g(){r[0]=_,r[1]=s,b.point=d,t=null}function m(O,I){if(t){var R=O-y;c.add((0,u.Wn)(R)>180?R+(R>0?360:-360):R)}else f=O,l=I;o.gL.point(O,I),v(O,I)}function k(){o.gL.lineStart()}function h(){m(f,l),o.gL.lineEnd(),(0,u.Wn)(c)>u.Ho&&(_=-(s=180)),r[0]=_,r[1]=s,t=null}function M(O,I){return(I-=O)<0?I+360:I}function A(O,I){return O[0]-I[0]}function C(O,I){return O[0]<=O[1]?O[0]<=I&&I<=O[1]:IM(U[0],U[1])&&(U[1]=B[1]),M(B[0],U[1])>M(U[0],U[1])&&(U[0]=B[0])):G.push(U=B);for(N=-1/0,I=0,U=G[R=G.length-1];I<=R;U=B,++I)B=G[I],(j=M(U[1],B[0]))>N&&(N=j,_=B[0],s=U[1])}return i=r=null,_===1/0||w===1/0?[[NaN,NaN],[NaN,NaN]]:[[_,w],[s,T]]}},7620:function(D,E,e){e.d(E,{Og:function(){return s},T:function(){return l},T5:function(){return y},Y1:function(){return w},iJ:function(){return t},j9:function(){return T},s0:function(){return f}});var _=e(39695);function w(i){return[(0,_.fv)(i[1],i[0]),(0,_.ZR)(i[2])]}function s(i){var r=i[0],n=i[1],o=(0,_.mC)(n);return[o*(0,_.mC)(r),o*(0,_.O$)(r),(0,_.O$)(n)]}function T(i,r){return i[0]*r[0]+i[1]*r[1]+i[2]*r[2]}function y(i,r){return[i[1]*r[2]-i[2]*r[1],i[2]*r[0]-i[0]*r[2],i[0]*r[1]-i[1]*r[0]]}function f(i,r){i[0]+=r[0],i[1]+=r[1],i[2]+=r[2]}function l(i,r){return[i[0]*r,i[1]*r,i[2]*r]}function t(i){var r=(0,_._b)(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]);i[0]/=r,i[1]/=r,i[2]/=r}},66624:function(D,E,e){e.d(E,{Z:function(){return R}});var _,w,s,T,y,f,l,t,i,r,n,o,a,u,p,c,b=e(39695),d=e(73182),v=e(72736),x={sphere:d.Z,point:g,lineStart:k,lineEnd:A,polygonStart:function(){x.lineStart=C,x.lineEnd=L},polygonEnd:function(){x.lineStart=k,x.lineEnd=A}};function g(U,B){U*=b.uR,B*=b.uR;var G=(0,b.mC)(B);m(G*(0,b.mC)(U),G*(0,b.O$)(U),(0,b.O$)(B))}function m(U,B,G){++_,s+=(U-s)/_,T+=(B-T)/_,y+=(G-y)/_}function k(){x.point=h}function h(U,B){U*=b.uR,B*=b.uR;var G=(0,b.mC)(B);u=G*(0,b.mC)(U),p=G*(0,b.O$)(U),c=(0,b.O$)(B),x.point=M,m(u,p,c)}function M(U,B){U*=b.uR,B*=b.uR;var G=(0,b.mC)(B),N=G*(0,b.mC)(U),j=G*(0,b.O$)(U),V=(0,b.O$)(B),H=(0,b.fv)((0,b._b)((H=p*V-c*j)*H+(H=c*N-u*V)*H+(H=u*j-p*N)*H),u*N+p*j+c*V);w+=H,f+=H*(u+(u=N)),l+=H*(p+(p=j)),t+=H*(c+(c=V)),m(u,p,c)}function A(){x.point=g}function C(){x.point=O}function L(){I(o,a),x.point=g}function O(U,B){o=U,a=B,U*=b.uR,B*=b.uR,x.point=I;var G=(0,b.mC)(B);u=G*(0,b.mC)(U),p=G*(0,b.O$)(U),c=(0,b.O$)(B),m(u,p,c)}function I(U,B){U*=b.uR,B*=b.uR;var G=(0,b.mC)(B),N=G*(0,b.mC)(U),j=G*(0,b.O$)(U),V=(0,b.O$)(B),H=p*V-c*j,ee=c*N-u*V,Q=u*j-p*N,X=(0,b._b)(H*H+ee*ee+Q*Q),Y=(0,b.ZR)(X),K=X&&-Y/X;i+=K*H,r+=K*ee,n+=K*Q,w+=Y,f+=Y*(u+(u=N)),l+=Y*(p+(p=j)),t+=Y*(c+(c=V)),m(u,p,c)}function R(U){_=w=s=T=y=f=l=t=i=r=n=0,(0,v.Z)(U,x);var B=i,G=r,N=n,j=B*B+G*G+N*N;return j0?oa)&&(o+=n*s.BZ));for(var b,d=o;n>0?d>a:d0?w.pi:-w.pi,n=(0,w.Wn)(t-y);(0,w.Wn)(n-w.pi)0?w.ou:-w.ou),s.point(l,f),s.lineEnd(),s.lineStart(),s.point(r,f),s.point(t,f),T=0):l!==r&&n>=w.pi&&((0,w.Wn)(y-l)w.Ho?(0,w.z4)(((0,w.O$)(a)*(b=(0,w.mC)(p))*(0,w.O$)(u)-(0,w.O$)(p)*(c=(0,w.mC)(a))*(0,w.O$)(o))/(c*b*d)):(a+p)/2}(y,f,t,i),s.point(l,f),s.lineEnd(),s.lineStart(),s.point(r,f),T=0),s.point(y=t,f=i),l=r},lineEnd:function(){s.lineEnd(),y=f=NaN},clean:function(){return 2-T}}},function(s,T,y,f){var l;if(s==null)l=y*w.ou,f.point(-w.pi,l),f.point(0,l),f.point(w.pi,l),f.point(w.pi,0),f.point(w.pi,-l),f.point(0,-l),f.point(-w.pi,-l),f.point(-w.pi,0),f.point(-w.pi,l);else if((0,w.Wn)(s[0]-T[0])>w.Ho){var t=s[0]1&&T.push(T.pop().concat(T.shift()))},result:function(){var y=T;return T=[],s=null,y}}}},1457:function(D,E,e){e.d(E,{Z:function(){return f}});var _=e(7620),w=e(7613),s=e(39695),T=e(67108),y=e(97023);function f(l){var t=(0,s.mC)(l),i=6*s.uR,r=t>0,n=(0,s.Wn)(t)>s.Ho;function o(p,c){return(0,s.mC)(p)*(0,s.mC)(c)>t}function a(p,c,b){var d=(0,_.Og)(p),v=(0,_.Og)(c),x=[1,0,0],g=(0,_.T5)(d,v),m=(0,_.j9)(g,g),k=g[0],h=m-k*k;if(!h)return!b&&p;var M=t*m/h,A=-t*k/h,C=(0,_.T5)(x,g),L=(0,_.T)(x,M),O=(0,_.T)(g,A);(0,_.s0)(L,O);var I=C,R=(0,_.j9)(L,I),U=(0,_.j9)(I,I),B=R*R-U*((0,_.j9)(L,L)-1);if(!(B<0)){var G=(0,s._b)(B),N=(0,_.T)(I,(-R-G)/U);if((0,_.s0)(N,L),N=(0,_.Y1)(N),!b)return N;var j,V=p[0],H=c[0],ee=p[1],Q=c[1];H0^N[1]<((0,s.Wn)(N[0]-V)s.pi^(V<=N[0]&&N[0]<=H)){var K=(0,_.T)(I,(-R+G)/U);return(0,_.s0)(K,L),[N,(0,_.Y1)(K)]}}}function u(p,c){var b=r?l:s.pi-l,d=0;return p<-b?d|=1:p>b&&(d|=2),c<-b?d|=4:c>b&&(d|=8),d}return(0,y.Z)(o,function(p){var c,b,d,v,x;return{lineStart:function(){v=d=!1,x=1},point:function(g,m){var k,h=[g,m],M=o(g,m),A=r?M?0:u(g,m):M?u(g+(g<0?s.pi:-s.pi),m):0;if(!c&&(v=d=M)&&p.lineStart(),M!==d&&(!(k=a(c,h))||(0,T.Z)(c,k)||(0,T.Z)(h,k))&&(h[2]=1),M!==d)x=0,M?(p.lineStart(),k=a(h,c),p.point(k[0],k[1])):(k=a(c,h),p.point(k[0],k[1],2),p.lineEnd()),c=k;else if(n&&c&&r^M){var C;A&b||!(C=a(h,c,!0))||(x=0,r?(p.lineStart(),p.point(C[0][0],C[0][1]),p.point(C[1][0],C[1][1]),p.lineEnd()):(p.point(C[1][0],C[1][1]),p.lineEnd(),p.lineStart(),p.point(C[0][0],C[0][1],3)))}!M||c&&(0,T.Z)(c,h)||p.point(h[0],h[1]),c=h,d=M,b=A},lineEnd:function(){d&&p.lineEnd(),c=null},clean:function(){return x|(v&&d)<<1}}},function(p,c,b,d){(0,w.m)(d,l,i,b,p,c)},r?[0,-l]:[-s.pi,l-s.pi])}},97023:function(D,E,e){e.d(E,{Z:function(){return f}});var _=e(85272),w=e(46225),s=e(39695),T=e(23071),y=e(33064);function f(i,r,n,o){return function(a){var u,p,c,b=r(a),d=(0,_.Z)(),v=r(d),x=!1,g={point:m,lineStart:h,lineEnd:M,polygonStart:function(){g.point=A,g.lineStart=C,g.lineEnd=L,p=[],u=[]},polygonEnd:function(){g.point=m,g.lineStart=h,g.lineEnd=M,p=(0,y.TS)(p);var O=(0,T.Z)(u,o);p.length?(x||(a.polygonStart(),x=!0),(0,w.Z)(p,t,O,n,a)):O&&(x||(a.polygonStart(),x=!0),a.lineStart(),n(null,null,1,a),a.lineEnd()),x&&(a.polygonEnd(),x=!1),p=u=null},sphere:function(){a.polygonStart(),a.lineStart(),n(null,null,1,a),a.lineEnd(),a.polygonEnd()}};function m(O,I){i(O,I)&&a.point(O,I)}function k(O,I){b.point(O,I)}function h(){g.point=k,b.lineStart()}function M(){g.point=m,b.lineEnd()}function A(O,I){c.push([O,I]),v.point(O,I)}function C(){v.lineStart(),c=[]}function L(){A(c[0][0],c[0][1]),v.lineEnd();var O,I,R,U,B=v.clean(),G=d.result(),N=G.length;if(c.pop(),u.push(c),c=null,N)if(1&B){if((I=(R=G[0]).length-1)>0){for(x||(a.polygonStart(),x=!0),a.lineStart(),O=0;O1&&2&B&&G.push(G.pop().concat(G.shift())),p.push(G.filter(l))}return g}}function l(i){return i.length>1}function t(i,r){return((i=i.x)[0]<0?i[1]-s.ou-s.Ho:s.ou-i[1])-((r=r.x)[0]<0?r[1]-s.ou-s.Ho:s.ou-r[1])}},87605:function(D,E,e){e.d(E,{Z:function(){return l}});var _=e(39695),w=e(85272),s=e(46225),T=e(33064),y=1e9,f=-y;function l(t,i,r,n){function o(b,d){return t<=b&&b<=r&&i<=d&&d<=n}function a(b,d,v,x){var g=0,m=0;if(b==null||(g=u(b,v))!==(m=u(d,v))||c(b,d)<0^v>0)do x.point(g===0||g===3?t:r,g>1?n:i);while((g=(g+v+4)%4)!==m);else x.point(d[0],d[1])}function u(b,d){return(0,_.Wn)(b[0]-t)<_.Ho?d>0?0:3:(0,_.Wn)(b[0]-r)<_.Ho?d>0?2:1:(0,_.Wn)(b[1]-i)<_.Ho?d>0?1:0:d>0?3:2}function p(b,d){return c(b.x,d.x)}function c(b,d){var v=u(b,1),x=u(d,1);return v!==x?v-x:v===0?d[1]-b[1]:v===1?b[0]-d[0]:v===2?b[1]-d[1]:d[0]-b[0]}return function(b){var d,v,x,g,m,k,h,M,A,C,L,O=b,I=(0,w.Z)(),R={point:U,lineStart:function(){R.point=B,v&&v.push(x=[]),C=!0,A=!1,h=M=NaN},lineEnd:function(){d&&(B(g,m),k&&A&&I.rejoin(),d.push(I.result())),R.point=U,A&&O.lineEnd()},polygonStart:function(){O=I,d=[],v=[],L=!0},polygonEnd:function(){var G=function(){for(var V=0,H=0,ee=v.length;Hn&&(oe-Q)*(n-X)>(se-X)*(t-Q)&&++V:se<=n&&(oe-Q)*(n-X)<(se-X)*(t-Q)&&--V;return V}(),N=L&&G,j=(d=(0,T.TS)(d)).length;(N||j)&&(b.polygonStart(),N&&(b.lineStart(),a(null,null,1,b),b.lineEnd()),j&&(0,s.Z)(d,p,G,a,b),b.polygonEnd()),O=b,d=v=x=null}};function U(G,N){o(G,N)&&O.point(G,N)}function B(G,N){var j=o(G,N);if(v&&x.push([G,N]),C)g=G,m=N,k=j,C=!1,j&&(O.lineStart(),O.point(G,N));else if(j&&A)O.point(G,N);else{var V=[h=Math.max(f,Math.min(y,h)),M=Math.max(f,Math.min(y,M))],H=[G=Math.max(f,Math.min(y,G)),N=Math.max(f,Math.min(y,N))];(function(ee,Q,X,Y,K,te){var ae,oe=ee[0],se=ee[1],fe=0,ye=1,pe=Q[0]-oe,de=Q[1]-se;if(ae=X-oe,pe||!(ae>0)){if(ae/=pe,pe<0){if(ae0){if(ae>ye)return;ae>fe&&(fe=ae)}if(ae=K-oe,pe||!(ae<0)){if(ae/=pe,pe<0){if(ae>ye)return;ae>fe&&(fe=ae)}else if(pe>0){if(ae0)){if(ae/=de,de<0){if(ae0){if(ae>ye)return;ae>fe&&(fe=ae)}if(ae=te-se,de||!(ae<0)){if(ae/=de,de<0){if(ae>ye)return;ae>fe&&(fe=ae)}else if(de>0){if(ae0&&(ee[0]=oe+fe*pe,ee[1]=se+fe*de),ye<1&&(Q[0]=oe+ye*pe,Q[1]=se+ye*de),!0}}}}})(V,H,t,i,r,n)?(A||(O.lineStart(),O.point(V[0],V[1])),O.point(H[0],H[1]),j||O.lineEnd(),L=!1):j&&(O.lineStart(),O.point(G,N),L=!1)}h=G,M=N,A=j}return R}}},46225:function(D,E,e){e.d(E,{Z:function(){return T}});var _=e(67108),w=e(39695);function s(f,l,t,i){this.x=f,this.z=l,this.o=t,this.e=i,this.v=!1,this.n=this.p=null}function T(f,l,t,i,r){var n,o,a=[],u=[];if(f.forEach(function(x){if(!((g=x.length-1)<=0)){var g,m,k=x[0],h=x[g];if((0,_.Z)(k,h)){if(!k[2]&&!h[2]){for(r.lineStart(),n=0;n=0;--n)r.point((c=p[n])[0],c[1]);else i(d.x,d.p.x,-1,r);d=d.p}p=(d=d.o).z,v=!v}while(!d.v);r.lineEnd()}}}function y(f){if(l=f.length){for(var l,t,i=0,r=f[0];++i0&&(jn=M($t[$n],$t[$n-1]))>0&&Ln<=jn&&En<=jn&&(Ln+En-jn)*(1-Math.pow((Ln-En)/jn,2))u.Ho}).map(hr)).concat((0,N.w6)((0,u.mD)($n/un)*un,jn,un).filter(function(dn){return(0,u.Wn)(dn%On)>u.Ho}).map(tn))}return pn.lines=function(){return bn().map(function(dn){return{type:"LineString",coordinates:dn}})},pn.outline=function(){return{type:"Polygon",coordinates:[Pn(En).concat(jt(Zn).slice(1),Pn(Ln).reverse().slice(1),jt(Qn).reverse().slice(1))]}},pn.extent=function(dn){return arguments.length?pn.extentMajor(dn).extentMinor(dn):pn.extentMinor()},pn.extentMajor=function(dn){return arguments.length?(En=+dn[0][0],Ln=+dn[1][0],Qn=+dn[0][1],Zn=+dn[1][1],En>Ln&&(dn=En,En=Ln,Ln=dn),Qn>Zn&&(dn=Qn,Qn=Zn,Zn=dn),pn.precision(Sn)):[[En,Qn],[Ln,Zn]]},pn.extentMinor=function(dn){return arguments.length?(mn=+dn[0][0],$t=+dn[1][0],$n=+dn[0][1],jn=+dn[1][1],mn>$t&&(dn=mn,mn=$t,$t=dn),$n>jn&&(dn=$n,$n=jn,jn=dn),pn.precision(Sn)):[[mn,$n],[$t,jn]]},pn.step=function(dn){return arguments.length?pn.stepMajor(dn).stepMinor(dn):pn.stepMinor()},pn.stepMajor=function(dn){return arguments.length?(Rn=+dn[0],On=+dn[1],pn):[Rn,On]},pn.stepMinor=function(dn){return arguments.length?(Jt=+dn[0],un=+dn[1],pn):[Jt,un]},pn.precision=function(dn){return arguments.length?(Sn=+dn,hr=j($n,jn,90),tn=V(mn,$t,Sn),Pn=j(Qn,Zn,90),jt=V(En,Ln,Sn),pn):Sn},pn.extentMajor([[-180,-90+u.Ho],[180,90-u.Ho]]).extentMinor([[-180,-80-u.Ho],[180,80+u.Ho]])}function ee(){return H()()}var Q,X,Y,K,te=e(83074),ae=e(8593),oe=(0,a.Z)(),se=(0,a.Z)(),fe={point:p.Z,lineStart:p.Z,lineEnd:p.Z,polygonStart:function(){fe.lineStart=ye,fe.lineEnd=he},polygonEnd:function(){fe.lineStart=fe.lineEnd=fe.point=p.Z,oe.add((0,u.Wn)(se)),se.reset()},result:function(){var $t=oe/2;return oe.reset(),$t}};function ye(){fe.point=pe}function pe($t,mn){fe.point=de,Q=Y=$t,X=K=mn}function de($t,mn){se.add(K*$t-Y*mn),Y=$t,K=mn}function he(){de(Q,X)}var xe,Re,we,Ae,Me=fe,Ce=e(3559),ne=0,ue=0,me=0,Te=0,Ee=0,Ue=0,De=0,je=0,ge=0,be={point:Se,lineStart:Ne,lineEnd:st,polygonStart:function(){be.lineStart=ot,be.lineEnd=ft},polygonEnd:function(){be.point=Se,be.lineStart=Ne,be.lineEnd=st},result:function(){var $t=ge?[De/ge,je/ge]:Ue?[Te/Ue,Ee/Ue]:me?[ne/me,ue/me]:[NaN,NaN];return ne=ue=me=Te=Ee=Ue=De=je=ge=0,$t}};function Se($t,mn){ne+=$t,ue+=mn,++me}function Ne(){be.point=Ye}function Ye($t,mn){be.point=Ze,Se(we=$t,Ae=mn)}function Ze($t,mn){var Ln=$t-we,En=mn-Ae,jn=(0,u._b)(Ln*Ln+En*En);Te+=jn*(we+$t)/2,Ee+=jn*(Ae+mn)/2,Ue+=jn,Se(we=$t,Ae=mn)}function st(){be.point=Se}function ot(){be.point=yt}function ft(){Et(xe,Re)}function yt($t,mn){be.point=Et,Se(xe=we=$t,Re=Ae=mn)}function Et($t,mn){var Ln=$t-we,En=mn-Ae,jn=(0,u._b)(Ln*Ln+En*En);Te+=jn*(we+$t)/2,Ee+=jn*(Ae+mn)/2,Ue+=jn,De+=(jn=Ae*$t-we*mn)*(we+$t),je+=jn*(Ae+mn),ge+=3*jn,Se(we=$t,Ae=mn)}var Tt=be;function xt($t){this._context=$t}xt.prototype={_radius:4.5,pointRadius:function($t){return this._radius=$t,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($t,mn){switch(this._point){case 0:this._context.moveTo($t,mn),this._point=1;break;case 1:this._context.lineTo($t,mn);break;default:this._context.moveTo($t+this._radius,mn),this._context.arc($t,mn,this._radius,0,u.BZ)}},result:p.Z};var Dt,It,Ft,qt,Nt,Je=(0,a.Z)(),Ke={point:p.Z,lineStart:function(){Ke.point=Ge},lineEnd:function(){Dt&&nt(It,Ft),Ke.point=p.Z},polygonStart:function(){Dt=!0},polygonEnd:function(){Dt=null},result:function(){var $t=+Je;return Je.reset(),$t}};function Ge($t,mn){Ke.point=nt,It=qt=$t,Ft=Nt=mn}function nt($t,mn){qt-=$t,Nt-=mn,Je.add((0,u._b)(qt*qt+Nt*Nt)),qt=$t,Nt=mn}var ht=Ke;function Oe(){this._string=[]}function Be($t){return"m0,"+$t+"a"+$t+","+$t+" 0 1,1 0,"+-2*$t+"a"+$t+","+$t+" 0 1,1 0,"+2*$t+"z"}function Qe($t,mn){var Ln,En,jn=4.5;function $n(Zn){return Zn&&(typeof jn=="function"&&En.pointRadius(+jn.apply(this,arguments)),(0,c.Z)(Zn,Ln(En))),En.result()}return $n.area=function(Zn){return(0,c.Z)(Zn,Ln(Me)),Me.result()},$n.measure=function(Zn){return(0,c.Z)(Zn,Ln(ht)),ht.result()},$n.bounds=function(Zn){return(0,c.Z)(Zn,Ln(Ce.Z)),Ce.Z.result()},$n.centroid=function(Zn){return(0,c.Z)(Zn,Ln(Tt)),Tt.result()},$n.projection=function(Zn){return arguments.length?(Ln=Zn==null?($t=null,ae.Z):($t=Zn).stream,$n):$t},$n.context=function(Zn){return arguments.length?(En=Zn==null?(mn=null,new Oe):new xt(mn=Zn),typeof jn!="function"&&En.pointRadius(jn),$n):mn},$n.pointRadius=function(Zn){return arguments.length?(jn=typeof Zn=="function"?Zn:(En.pointRadius(+Zn),+Zn),$n):jn},$n.projection($t).context(mn)}Oe.prototype={_radius:4.5,_circle:Be(4.5),pointRadius:function($t){return($t=+$t)!==this._radius&&(this._radius=$t,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($t,mn){switch(this._point){case 0:this._string.push("M",$t,",",mn),this._point=1;break;case 1:this._string.push("L",$t,",",mn);break;default:this._circle==null&&(this._circle=Be(this._radius)),this._string.push("M",$t,",",mn,this._circle)}},result:function(){if(this._string.length){var $t=this._string.join("");return this._string=[],$t}return null}};var ut=e(15002);function pt($t){var mn=0,Ln=u.pi/3,En=(0,ut.r)($t),jn=En(mn,Ln);return jn.parallels=function($n){return arguments.length?En(mn=$n[0]*u.uR,Ln=$n[1]*u.uR):[mn*u.RW,Ln*u.RW]},jn}function bt($t,mn){var Ln=(0,u.O$)($t),En=(Ln+(0,u.O$)(mn))/2;if((0,u.Wn)(En)=.12&&Sn<.234&&On>=-.425&&On<-.214?Qn:Sn>=.166&&Sn<.234&&On>=-.214&&On<-.115?hr:Zn).invert(Jt)},Pn.stream=function(Jt){return $t&&mn===Jt?$t:(un=[Zn.stream(mn=Jt),Qn.stream(Jt),hr.stream(Jt)],Rn=un.length,$t={point:function(On,Sn){for(var pn=-1;++pn0?Qn<-u.ou+u.Ho&&(Qn=-u.ou+u.Ho):Qn>u.ou-u.Ho&&(Qn=u.ou-u.Ho);var hr=jn/(0,u.sQ)(Kt(Qn),En);return[hr*(0,u.O$)(En*Zn),jn-hr*(0,u.mC)(En*Zn)]}return $n.invert=function(Zn,Qn){var hr=jn-Qn,tn=(0,u.Xx)(En)*(0,u._b)(Zn*Zn+hr*hr),Pn=(0,u.fv)(Zn,(0,u.Wn)(hr))*(0,u.Xx)(hr);return hr*En<0&&(Pn-=u.pi*(0,u.Xx)(Zn)*(0,u.Xx)(hr)),[Pn/En,2*(0,u.z4)((0,u.sQ)(jn/tn,1/En))-u.ou]},$n}function yn(){return pt(nn).scale(109.5).parallels([30,30])}Wt.invert=function($t,mn){return[$t,2*(0,u.z4)((0,u.Qq)(mn))-u.ou]};var ln=e(97492);function kn($t,mn){var Ln=(0,u.mC)($t),En=$t===mn?(0,u.O$)($t):(Ln-(0,u.mC)(mn))/(mn-$t),jn=Ln/En+$t;if((0,u.Wn)(En)2?En[2]+90:90]):[(En=Ln())[0],En[1],En[2]-90]},Ln([0,0,90]).scale(159.155)}gr.invert=(0,kr.O)(function($t){return 2*(0,u.z4)($t)}),dr.invert=function($t,mn){return[-mn,2*(0,u.z4)((0,u.Qq)($t))-u.ou]}},83074:function(D,E,e){e.d(E,{Z:function(){return w}});var _=e(39695);function w(s,T){var y=s[0]*_.uR,f=s[1]*_.uR,l=T[0]*_.uR,t=T[1]*_.uR,i=(0,_.mC)(f),r=(0,_.O$)(f),n=(0,_.mC)(t),o=(0,_.O$)(t),a=i*(0,_.mC)(y),u=i*(0,_.O$)(y),p=n*(0,_.mC)(l),c=n*(0,_.O$)(l),b=2*(0,_.ZR)((0,_._b)((0,_.Jy)(t-f)+i*n*(0,_.Jy)(l-y))),d=(0,_.O$)(b),v=b?function(x){var g=(0,_.O$)(x*=b)/d,m=(0,_.O$)(b-x)/d,k=m*a+g*p,h=m*u+g*c,M=m*r+g*o;return[(0,_.fv)(h,k)*_.RW,(0,_.fv)(M,(0,_._b)(k*k+h*h))*_.RW]}:function(){return[y*_.RW,f*_.RW]};return v.distance=b,v}},39695:function(D,E,e){e.d(E,{BZ:function(){return f},Ho:function(){return _},Jy:function(){return k},Kh:function(){return g},O$:function(){return b},OR:function(){return x},Qq:function(){return u},RW:function(){return l},Wn:function(){return i},Xx:function(){return d},ZR:function(){return m},_b:function(){return v},aW:function(){return w},cM:function(){return p},fv:function(){return n},mC:function(){return o},mD:function(){return a},ou:function(){return T},pi:function(){return s},pu:function(){return y},sQ:function(){return c},uR:function(){return t},z4:function(){return r}});var _=1e-6,w=1e-12,s=Math.PI,T=s/2,y=s/4,f=2*s,l=180/s,t=s/180,i=Math.abs,r=Math.atan,n=Math.atan2,o=Math.cos,a=Math.ceil,u=Math.exp,p=Math.log,c=Math.pow,b=Math.sin,d=Math.sign||function(h){return h>0?1:h<0?-1:0},v=Math.sqrt,x=Math.tan;function g(h){return h>1?0:h<-1?s:Math.acos(h)}function m(h){return h>1?T:h<-1?-T:Math.asin(h)}function k(h){return(h=b(h/2))*h}},73182:function(D,E,e){function _(){}e.d(E,{Z:function(){return _}})},3559:function(D,E,e){var _=e(73182),w=1/0,s=w,T=-w,y=T,f={point:function(l,t){lT&&(T=l),ty&&(y=t)},lineStart:_.Z,lineEnd:_.Z,polygonStart:_.Z,polygonEnd:_.Z,result:function(){var l=[[w,s],[T,y]];return T=y=-(s=w=1/0),l}};E.Z=f},67108:function(D,E,e){e.d(E,{Z:function(){return w}});var _=e(39695);function w(s,T){return(0,_.Wn)(s[0]-T[0])<_.Ho&&(0,_.Wn)(s[1]-T[1])<_.Ho}},23071:function(D,E,e){e.d(E,{Z:function(){return f}});var _=e(33940),w=e(7620),s=e(39695),T=(0,_.Z)();function y(l){return(0,s.Wn)(l[0])<=s.pi?l[0]:(0,s.Xx)(l[0])*(((0,s.Wn)(l[0])+s.pi)%s.BZ-s.pi)}function f(l,t){var i=y(t),r=t[1],n=(0,s.O$)(r),o=[(0,s.O$)(i),-(0,s.mC)(i),0],a=0,u=0;T.reset(),n===1?r=s.ou+s.Ho:n===-1&&(r=-s.ou-s.Ho);for(var p=0,c=l.length;p=0?1:-1,U=R*I,B=U>s.pi,G=m*L;if(T.add((0,s.fv)(G*R*(0,s.O$)(U),k*O+G*(0,s.mC)(U))),a+=B?I+R*s.BZ:I,B^x>=i^A>=i){var N=(0,w.T5)((0,w.Og)(v),(0,w.Og)(M));(0,w.iJ)(N);var j=(0,w.T5)(o,N);(0,w.iJ)(j);var V=(B^I>=0?-1:1)*(0,s.ZR)(j[2]);(r>V||r===V&&(N[0]||N[1]))&&(u+=B^I>=0?1:-1)}}return(a<-s.Ho||a4*g&&N--){var Q=A+U,X=C+B,Y=L+G,K=(0,f._b)(Q*Q+X*X+Y*Y),te=(0,f.ZR)(Y/=K),ae=(0,f.Wn)((0,f.Wn)(Y)-1)g||(0,f.Wn)((V*ye+H*pe)/ee-.5)>.3||A*U+C*B+L*G2?ye[2]%360*f.uR:0,se()):[G*f.RW,N*f.RW,j*f.RW]},ae.angle=function(ye){return arguments.length?(V=ye%360*f.uR,se()):V*f.RW},ae.reflectX=function(ye){return arguments.length?(H=ye?-1:1,se()):H<0},ae.reflectY=function(ye){return arguments.length?(ee=ye?-1:1,se()):ee<0},ae.precision=function(ye){return arguments.length?(h=o(M,te=ye*ye),fe()):(0,f._b)(te)},ae.fitExtent=function(ye,pe){return(0,i.qg)(ae,ye,pe)},ae.fitSize=function(ye,pe){return(0,i.mF)(ae,ye,pe)},ae.fitWidth=function(ye,pe){return(0,i.V6)(ae,ye,pe)},ae.fitHeight=function(ye,pe){return(0,i.rf)(ae,ye,pe)},function(){return v=d.apply(this,arguments),ae.invert=v.invert&&oe,se()}}},26867:function(D,E,e){e.d(E,{K:function(){return s},Z:function(){return T}});var _=e(15002),w=e(39695);function s(y,f){var l=f*f,t=l*l;return[y*(.8707-.131979*l+t*(t*(.003971*l-.001529*t)-.013791)),f*(1.007226+l*(.015085+t*(.028874*l-.044475-.005916*t)))]}function T(){return(0,_.Z)(s).scale(175.295)}s.invert=function(y,f){var l,t=f,i=25;do{var r=t*t,n=r*r;t-=l=(t*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))-f)/(1.007226+r*(.045255+n*(.259866*r-.311325-.06507600000000001*n)))}while((0,w.Wn)(l)>w.Ho&&--i>0);return[y/(.8707+(r=t*t)*(r*(r*r*r*(.003971-.001529*r)-.013791)-.131979)),t]}},57962:function(D,E,e){e.d(E,{I:function(){return T},Z:function(){return y}});var _=e(39695),w=e(25382),s=e(15002);function T(f,l){return[(0,_.mC)(l)*(0,_.O$)(f),(0,_.O$)(l)]}function y(){return(0,s.Z)(T).scale(249.5).clipAngle(90+_.Ho)}T.invert=(0,w.O)(_.ZR)},49386:function(D,E,e){e.d(E,{I:function(){return T},Z:function(){return t}});var _=e(96059),w=e(39695);function s(i,r){return[(0,w.Wn)(i)>w.pi?i+Math.round(-i/w.BZ)*w.BZ:i,r]}function T(i,r,n){return(i%=w.BZ)?r||n?(0,_.Z)(f(i),l(r,n)):f(i):r||n?l(r,n):s}function y(i){return function(r,n){return[(r+=i)>w.pi?r-w.BZ:r<-w.pi?r+w.BZ:r,n]}}function f(i){var r=y(i);return r.invert=y(-i),r}function l(i,r){var n=(0,w.mC)(i),o=(0,w.O$)(i),a=(0,w.mC)(r),u=(0,w.O$)(r);function p(c,b){var d=(0,w.mC)(b),v=(0,w.mC)(c)*d,x=(0,w.O$)(c)*d,g=(0,w.O$)(b),m=g*n+v*o;return[(0,w.fv)(x*a-m*u,v*n-g*o),(0,w.ZR)(m*a+x*u)]}return p.invert=function(c,b){var d=(0,w.mC)(b),v=(0,w.mC)(c)*d,x=(0,w.O$)(c)*d,g=(0,w.O$)(b),m=g*a-x*u;return[(0,w.fv)(x*a+g*u,v*n+m*o),(0,w.ZR)(m*n-v*o)]},p}function t(i){function r(n){return(n=i(n[0]*w.uR,n[1]*w.uR))[0]*=w.RW,n[1]*=w.RW,n}return i=T(i[0]*w.uR,i[1]*w.uR,i.length>2?i[2]*w.uR:0),r.invert=function(n){return(n=i.invert(n[0]*w.uR,n[1]*w.uR))[0]*=w.RW,n[1]*=w.RW,n},r}s.invert=s},72736:function(D,E,e){function _(l,t){l&&s.hasOwnProperty(l.type)&&s[l.type](l,t)}e.d(E,{Z:function(){return f}});var w={Feature:function(l,t){_(l.geometry,t)},FeatureCollection:function(l,t){for(var i=l.features,r=-1,n=i.length;++r=0;)ne+=ue[me].value;else ne=1;Ce.value=ne}function f(Ce,ne){var ue,me,Te,Ee,Ue,De=new r(Ce),je=+Ce.value&&(De.value=Ce.value),ge=[De];for(ne==null&&(ne=l);ue=ge.pop();)if(je&&(ue.value=+ue.data.value),(Te=ne(ue.data))&&(Ue=Te.length))for(ue.children=new Array(Ue),Ee=Ue-1;Ee>=0;--Ee)ge.push(me=ue.children[Ee]=new r(Te[Ee])),me.parent=ue,me.depth=ue.depth+1;return De.eachBefore(i)}function l(Ce){return Ce.children}function t(Ce){Ce.data=Ce.data.data}function i(Ce){var ne=0;do Ce.height=ne;while((Ce=Ce.parent)&&Ce.height<++ne)}function r(Ce){this.data=Ce,this.depth=this.height=0,this.parent=null}e.r(E),e.d(E,{cluster:function(){return T},hierarchy:function(){return f},pack:function(){return R},packEnclose:function(){return o},packSiblings:function(){return M},partition:function(){return V},stratify:function(){return Y},tree:function(){return ye},treemap:function(){return Re},treemapBinary:function(){return we},treemapDice:function(){return j},treemapResquarify:function(){return Me},treemapSlice:function(){return pe},treemapSliceDice:function(){return Ae},treemapSquarify:function(){return xe}}),r.prototype=f.prototype={constructor:r,count:function(){return this.eachAfter(y)},each:function(Ce){var ne,ue,me,Te,Ee=this,Ue=[Ee];do for(ne=Ue.reverse(),Ue=[];Ee=ne.pop();)if(Ce(Ee),ue=Ee.children)for(me=0,Te=ue.length;me=0;--ue)Te.push(ne[ue]);return this},sum:function(Ce){return this.eachAfter(function(ne){for(var ue=+Ce(ne.data)||0,me=ne.children,Te=me&&me.length;--Te>=0;)ue+=me[Te].value;ne.value=ue})},sort:function(Ce){return this.eachBefore(function(ne){ne.children&&ne.children.sort(Ce)})},path:function(Ce){for(var ne=this,ue=function(Ee,Ue){if(Ee===Ue)return Ee;var De=Ee.ancestors(),je=Ue.ancestors(),ge=null;for(Ee=De.pop(),Ue=je.pop();Ee===Ue;)ge=Ee,Ee=De.pop(),Ue=je.pop();return ge}(ne,Ce),me=[ne];ne!==ue;)ne=ne.parent,me.push(ne);for(var Te=me.length;Ce!==ue;)me.splice(Te,0,Ce),Ce=Ce.parent;return me},ancestors:function(){for(var Ce=this,ne=[Ce];Ce=Ce.parent;)ne.push(Ce);return ne},descendants:function(){var Ce=[];return this.each(function(ne){Ce.push(ne)}),Ce},leaves:function(){var Ce=[];return this.eachBefore(function(ne){ne.children||Ce.push(ne)}),Ce},links:function(){var Ce=this,ne=[];return Ce.each(function(ue){ue!==Ce&&ne.push({source:ue.parent,target:ue})}),ne},copy:function(){return f(this).eachBefore(t)}};var n=Array.prototype.slice;function o(Ce){for(var ne,ue,me=0,Te=(Ce=function(Ue){for(var De,je,ge=Ue.length;ge;)je=Math.random()*ge--|0,De=Ue[ge],Ue[ge]=Ue[je],Ue[je]=De;return Ue}(n.call(Ce))).length,Ee=[];me0&&ue*ue>me*me+Te*Te}function c(Ce,ne){for(var ue=0;ue(Ue*=Ue)?(me=(ge+Ue-Te)/(2*ge),Ee=Math.sqrt(Math.max(0,Ue/ge-me*me)),ue.x=Ce.x-me*De-Ee*je,ue.y=Ce.y-me*je+Ee*De):(me=(ge+Te-Ue)/(2*ge),Ee=Math.sqrt(Math.max(0,Te/ge-me*me)),ue.x=ne.x+me*De-Ee*je,ue.y=ne.y+me*je+Ee*De)):(ue.x=ne.x+ue.r,ue.y=ne.y)}function g(Ce,ne){var ue=Ce.r+ne.r-1e-6,me=ne.x-Ce.x,Te=ne.y-Ce.y;return ue>0&&ue*ue>me*me+Te*Te}function m(Ce){var ne=Ce._,ue=Ce.next._,me=ne.r+ue.r,Te=(ne.x*ue.r+ue.x*ne.r)/me,Ee=(ne.y*ue.r+ue.y*ne.r)/me;return Te*Te+Ee*Ee}function k(Ce){this._=Ce,this.next=null,this.previous=null}function h(Ce){if(!(Te=Ce.length))return 0;var ne,ue,me,Te,Ee,Ue,De,je,ge,be,Se;if((ne=Ce[0]).x=0,ne.y=0,!(Te>1))return ne.r;if(ue=Ce[1],ne.x=-ue.r,ue.x=ne.r,ue.y=0,!(Te>2))return ne.r+ue.r;x(ue,ne,me=Ce[2]),ne=new k(ne),ue=new k(ue),me=new k(me),ne.next=me.previous=ue,ue.next=ne.previous=me,me.next=ue.previous=ne;e:for(De=3;De0)throw new Error("cycle");return Ue}return ue.id=function(me){return arguments.length?(Ce=C(me),ue):Ce},ue.parentId=function(me){return arguments.length?(ne=C(me),ue):ne},ue}function K(Ce,ne){return Ce.parent===ne.parent?1:2}function te(Ce){var ne=Ce.children;return ne?ne[0]:Ce.t}function ae(Ce){var ne=Ce.children;return ne?ne[ne.length-1]:Ce.t}function oe(Ce,ne,ue){var me=ue/(ne.i-Ce.i);ne.c-=me,ne.s+=ue,Ce.c+=me,ne.z+=ue,ne.m+=ue}function se(Ce,ne,ue){return Ce.a.parent===ne.parent?Ce.a:ue}function fe(Ce,ne){this._=Ce,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=ne}function ye(){var Ce=K,ne=1,ue=1,me=null;function Te(je){var ge=function(ft){for(var yt,Et,Tt,xt,Dt,It=new fe(ft,0),Ft=[It];yt=Ft.pop();)if(Tt=yt._.children)for(yt.children=new Array(Dt=Tt.length),xt=Dt-1;xt>=0;--xt)Ft.push(Et=yt.children[xt]=new fe(Tt[xt],xt)),Et.parent=yt;return(It.parent=new fe(null,0)).children=[It],It}(je);if(ge.eachAfter(Ee),ge.parent.m=-ge.z,ge.eachBefore(Ue),me)je.eachBefore(De);else{var be=je,Se=je,Ne=je;je.eachBefore(function(ft){ft.xSe.x&&(Se=ft),ft.depth>Ne.depth&&(Ne=ft)});var Ye=be===Se?1:Ce(be,Se)/2,Ze=Ye-be.x,st=ne/(Se.x+Ye+Ze),ot=ue/(Ne.depth||1);je.eachBefore(function(ft){ft.x=(ft.x+Ze)*st,ft.y=ft.depth*ot})}return je}function Ee(je){var ge=je.children,be=je.parent.children,Se=je.i?be[je.i-1]:null;if(ge){(function(Ye){for(var Ze,st=0,ot=0,ft=Ye.children,yt=ft.length;--yt>=0;)(Ze=ft[yt]).z+=st,Ze.m+=st,st+=Ze.s+(ot+=Ze.c)})(je);var Ne=(ge[0].z+ge[ge.length-1].z)/2;Se?(je.z=Se.z+Ce(je._,Se._),je.m=je.z-Ne):je.z=Ne}else Se&&(je.z=Se.z+Ce(je._,Se._));je.parent.A=function(Ye,Ze,st){if(Ze){for(var ot,ft=Ye,yt=Ye,Et=Ze,Tt=ft.parent.children[0],xt=ft.m,Dt=yt.m,It=Et.m,Ft=Tt.m;Et=ae(Et),ft=te(ft),Et&&ft;)Tt=te(Tt),(yt=ae(yt)).a=Ye,(ot=Et.z+It-ft.z-xt+Ce(Et._,ft._))>0&&(oe(se(Et,Ye,st),Ye,ot),xt+=ot,Dt+=ot),It+=Et.m,xt+=ft.m,Ft+=Tt.m,Dt+=yt.m;Et&&!ae(yt)&&(yt.t=Et,yt.m+=It-Dt),ft&&!te(Tt)&&(Tt.t=ft,Tt.m+=xt-Ft,st=Ye)}return st}(je,Se,je.parent.A||be[0])}function Ue(je){je._.x=je.z+je.parent.m,je.m+=je.parent.m}function De(je){je.x*=ne,je.y=je.depth*ue}return Te.separation=function(je){return arguments.length?(Ce=je,Te):Ce},Te.size=function(je){return arguments.length?(me=!1,ne=+je[0],ue=+je[1],Te):me?null:[ne,ue]},Te.nodeSize=function(je){return arguments.length?(me=!0,ne=+je[0],ue=+je[1],Te):me?[ne,ue]:null},Te}function pe(Ce,ne,ue,me,Te){for(var Ee,Ue=Ce.children,De=-1,je=Ue.length,ge=Ce.value&&(Te-ue)/Ce.value;++DeNe&&(Ne=De),ot=be*be*st,(Ye=Math.max(Ne/ot,ot/Se))>Ze){be-=De;break}Ze=Ye}ft.push(Ue={value:be,dice:je1?me:1)},ue}(de);function Re(){var Ce=xe,ne=!1,ue=1,me=1,Te=[0],Ee=L,Ue=L,De=L,je=L,ge=L;function be(Ne){return Ne.x0=Ne.y0=0,Ne.x1=ue,Ne.y1=me,Ne.eachBefore(Se),Te=[0],ne&&Ne.eachBefore(N),Ne}function Se(Ne){var Ye=Te[Ne.depth],Ze=Ne.x0+Ye,st=Ne.y0+Ye,ot=Ne.x1-Ye,ft=Ne.y1-Ye;ot=Ne-1){var yt=De[Se];return yt.x0=Ze,yt.y0=st,yt.x1=ot,void(yt.y1=ft)}for(var Et=ge[Se],Tt=Ye/2+Et,xt=Se+1,Dt=Ne-1;xt>>1;ge[It]ft-st){var Nt=(Ze*qt+ot*Ft)/Ye;be(Se,xt,Ft,Ze,st,Nt,ft),be(xt,Ne,qt,Nt,st,ot,ft)}else{var Je=(st*qt+ft*Ft)/Ye;be(Se,xt,Ft,Ze,st,ot,Je),be(xt,Ne,qt,Ze,Je,ot,ft)}})(0,je,Ce.value,ne,ue,me,Te)}function Ae(Ce,ne,ue,me,Te){(1&Ce.depth?pe:j)(Ce,ne,ue,me,Te)}var Me=function Ce(ne){function ue(me,Te,Ee,Ue,De){if((je=me._squarify)&&je.ratio===ne)for(var je,ge,be,Se,Ne,Ye=-1,Ze=je.length,st=me.value;++Ye1?me:1)},ue}(de)},45879:function(D,E,e){e.d(E,{h5:function(){return p}});var _=Math.PI,w=2*_,s=1e-6,T=w-s;function y(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function f(){return new y}y.prototype=f.prototype={constructor:y,moveTo:function(c,b){this._+="M"+(this._x0=this._x1=+c)+","+(this._y0=this._y1=+b)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(c,b){this._+="L"+(this._x1=+c)+","+(this._y1=+b)},quadraticCurveTo:function(c,b,d,v){this._+="Q"+ +c+","+ +b+","+(this._x1=+d)+","+(this._y1=+v)},bezierCurveTo:function(c,b,d,v,x,g){this._+="C"+ +c+","+ +b+","+ +d+","+ +v+","+(this._x1=+x)+","+(this._y1=+g)},arcTo:function(c,b,d,v,x){c=+c,b=+b,d=+d,v=+v,x=+x;var g=this._x1,m=this._y1,k=d-c,h=v-b,M=g-c,A=m-b,C=M*M+A*A;if(x<0)throw new Error("negative radius: "+x);if(this._x1===null)this._+="M"+(this._x1=c)+","+(this._y1=b);else if(C>s)if(Math.abs(A*k-h*M)>s&&x){var L=d-g,O=v-m,I=k*k+h*h,R=L*L+O*O,U=Math.sqrt(I),B=Math.sqrt(C),G=x*Math.tan((_-Math.acos((I+C-R)/(2*U*B)))/2),N=G/B,j=G/U;Math.abs(N-1)>s&&(this._+="L"+(c+N*M)+","+(b+N*A)),this._+="A"+x+","+x+",0,0,"+ +(A*L>M*O)+","+(this._x1=c+j*k)+","+(this._y1=b+j*h)}else this._+="L"+(this._x1=c)+","+(this._y1=b)},arc:function(c,b,d,v,x,g){c=+c,b=+b,g=!!g;var m=(d=+d)*Math.cos(v),k=d*Math.sin(v),h=c+m,M=b+k,A=1^g,C=g?v-x:x-v;if(d<0)throw new Error("negative radius: "+d);this._x1===null?this._+="M"+h+","+M:(Math.abs(this._x1-h)>s||Math.abs(this._y1-M)>s)&&(this._+="L"+h+","+M),d&&(C<0&&(C=C%w+w),C>T?this._+="A"+d+","+d+",0,1,"+A+","+(c-m)+","+(b-k)+"A"+d+","+d+",0,1,"+A+","+(this._x1=h)+","+(this._y1=M):C>s&&(this._+="A"+d+","+d+",0,"+ +(C>=_)+","+A+","+(this._x1=c+d*Math.cos(x))+","+(this._y1=b+d*Math.sin(x))))},rect:function(c,b,d,v){this._+="M"+(this._x0=this._x1=+c)+","+(this._y0=this._y1=+b)+"h"+ +d+"v"+ +v+"h"+-d+"Z"},toString:function(){return this._}};var l=f,t=Array.prototype.slice;function i(c){return function(){return c}}function r(c){return c[0]}function n(c){return c[1]}function o(c){return c.source}function a(c){return c.target}function u(c,b,d,v,x){c.moveTo(b,d),c.bezierCurveTo(b=(b+v)/2,d,b,x,v,x)}function p(){return function(c){var b=o,d=a,v=r,x=n,g=null;function m(){var k,h=t.call(arguments),M=b.apply(this,h),A=d.apply(this,h);if(g||(g=k=l()),c(g,+v.apply(this,(h[0]=M,h)),+x.apply(this,h),+v.apply(this,(h[0]=A,h)),+x.apply(this,h)),k)return g=null,k+""||null}return m.source=function(k){return arguments.length?(b=k,m):b},m.target=function(k){return arguments.length?(d=k,m):d},m.x=function(k){return arguments.length?(v=typeof k=="function"?k:i(+k),m):v},m.y=function(k){return arguments.length?(x=typeof k=="function"?k:i(+k),m):x},m.context=function(k){return arguments.length?(g=k??null,m):g},m}(u)}},84096:function(D,E,e){e.d(E,{i$:function(){return o},Dq:function(){return r},g0:function(){return a}});var _=e(58176),w=e(48480),s=e(59879),T=e(82301),y=e(34823),f=e(79791);function l(xt){if(0<=xt.y&&xt.y<100){var Dt=new Date(-1,xt.m,xt.d,xt.H,xt.M,xt.S,xt.L);return Dt.setFullYear(xt.y),Dt}return new Date(xt.y,xt.m,xt.d,xt.H,xt.M,xt.S,xt.L)}function t(xt){if(0<=xt.y&&xt.y<100){var Dt=new Date(Date.UTC(-1,xt.m,xt.d,xt.H,xt.M,xt.S,xt.L));return Dt.setUTCFullYear(xt.y),Dt}return new Date(Date.UTC(xt.y,xt.m,xt.d,xt.H,xt.M,xt.S,xt.L))}function i(xt,Dt,It){return{y:xt,m:Dt,d:It,H:0,M:0,S:0,L:0}}function r(xt){var Dt=xt.dateTime,It=xt.date,Ft=xt.time,qt=xt.periods,Nt=xt.days,Je=xt.shortDays,Ke=xt.months,Ge=xt.shortMonths,nt=x(qt),ht=g(qt),Oe=x(Nt),Be=g(Nt),Qe=x(Je),ut=g(Je),pt=x(Ke),bt=g(Ke),Lt=x(Ge),Ct=g(Ge),mt={a:function(Gt){return Je[Gt.getDay()]},A:function(Gt){return Nt[Gt.getDay()]},b:function(Gt){return Ge[Gt.getMonth()]},B:function(Gt){return Ke[Gt.getMonth()]},c:null,d:Y,e:Y,f:se,H:K,I:te,j:ae,L:oe,m:fe,M:ye,p:function(Gt){return qt[+(Gt.getHours()>=12)]},q:function(Gt){return 1+~~(Gt.getMonth()/3)},Q:Et,s:Tt,S:pe,u:de,U:he,V:xe,w:Re,W:we,x:null,X:null,y:Ae,Y:Me,Z:Ce,"%":yt},Ot={a:function(Gt){return Je[Gt.getUTCDay()]},A:function(Gt){return Nt[Gt.getUTCDay()]},b:function(Gt){return Ge[Gt.getUTCMonth()]},B:function(Gt){return Ke[Gt.getUTCMonth()]},c:null,d:ne,e:ne,f:Ue,H:ue,I:me,j:Te,L:Ee,m:De,M:je,p:function(Gt){return qt[+(Gt.getUTCHours()>=12)]},q:function(Gt){return 1+~~(Gt.getUTCMonth()/3)},Q:Et,s:Tt,S:ge,u:be,U:Se,V:Ne,w:Ye,W:Ze,x:null,X:null,y:st,Y:ot,Z:ft,"%":yt},_t={a:function(Gt,Xt,Kt){var nn=Qe.exec(Xt.slice(Kt));return nn?(Gt.w=ut[nn[0].toLowerCase()],Kt+nn[0].length):-1},A:function(Gt,Xt,Kt){var nn=Oe.exec(Xt.slice(Kt));return nn?(Gt.w=Be[nn[0].toLowerCase()],Kt+nn[0].length):-1},b:function(Gt,Xt,Kt){var nn=Lt.exec(Xt.slice(Kt));return nn?(Gt.m=Ct[nn[0].toLowerCase()],Kt+nn[0].length):-1},B:function(Gt,Xt,Kt){var nn=pt.exec(Xt.slice(Kt));return nn?(Gt.m=bt[nn[0].toLowerCase()],Kt+nn[0].length):-1},c:function(Gt,Xt,Kt){return Wt(Gt,Dt,Xt,Kt)},d:U,e:U,f:H,H:G,I:G,j:B,L:V,m:R,M:N,p:function(Gt,Xt,Kt){var nn=nt.exec(Xt.slice(Kt));return nn?(Gt.p=ht[nn[0].toLowerCase()],Kt+nn[0].length):-1},q:I,Q,s:X,S:j,u:k,U:h,V:M,w:m,W:A,x:function(Gt,Xt,Kt){return Wt(Gt,It,Xt,Kt)},X:function(Gt,Xt,Kt){return Wt(Gt,Ft,Xt,Kt)},y:L,Y:C,Z:O,"%":ee};function Pt(Gt,Xt){return function(Kt){var nn,yn,ln,kn=[],Wn=-1,wn=0,on=Gt.length;for(Kt instanceof Date||(Kt=new Date(+Kt));++Wn53)return null;"w"in ln||(ln.w=1),"Z"in ln?(yn=(nn=t(i(ln.y,0,1))).getUTCDay(),nn=yn>4||yn===0?_.l6.ceil(nn):(0,_.l6)(nn),nn=w.Z.offset(nn,7*(ln.V-1)),ln.y=nn.getUTCFullYear(),ln.m=nn.getUTCMonth(),ln.d=nn.getUTCDate()+(ln.w+6)%7):(yn=(nn=l(i(ln.y,0,1))).getDay(),nn=yn>4||yn===0?s.wA.ceil(nn):(0,s.wA)(nn),nn=T.Z.offset(nn,7*(ln.V-1)),ln.y=nn.getFullYear(),ln.m=nn.getMonth(),ln.d=nn.getDate()+(ln.w+6)%7)}else("W"in ln||"U"in ln)&&("w"in ln||(ln.w="u"in ln?ln.u%7:"W"in ln?1:0),yn="Z"in ln?t(i(ln.y,0,1)).getUTCDay():l(i(ln.y,0,1)).getDay(),ln.m=0,ln.d="W"in ln?(ln.w+6)%7+7*ln.W-(yn+5)%7:ln.w+7*ln.U-(yn+6)%7);return"Z"in ln?(ln.H+=ln.Z/100|0,ln.M+=ln.Z%100,t(ln)):l(ln)}}function Wt(Gt,Xt,Kt,nn){for(var yn,ln,kn=0,Wn=Xt.length,wn=Kt.length;kn=wn)return-1;if((yn=Xt.charCodeAt(kn++))===37){if(yn=Xt.charAt(kn++),!(ln=_t[yn in u?Xt.charAt(kn++):yn])||(nn=ln(Gt,Kt,nn))<0)return-1}else if(yn!=Kt.charCodeAt(nn++))return-1}return nn}return mt.x=Pt(It,mt),mt.X=Pt(Ft,mt),mt.c=Pt(Dt,mt),Ot.x=Pt(It,Ot),Ot.X=Pt(Ft,Ot),Ot.c=Pt(Dt,Ot),{format:function(Gt){var Xt=Pt(Gt+="",mt);return Xt.toString=function(){return Gt},Xt},parse:function(Gt){var Xt=Bt(Gt+="",!1);return Xt.toString=function(){return Gt},Xt},utcFormat:function(Gt){var Xt=Pt(Gt+="",Ot);return Xt.toString=function(){return Gt},Xt},utcParse:function(Gt){var Xt=Bt(Gt+="",!0);return Xt.toString=function(){return Gt},Xt}}}var n,o,a,u={"-":"",_:" ",0:"0"},p=/^\s*\d+/,c=/^%/,b=/[\\^$*+?|[\]().{}]/g;function d(xt,Dt,It){var Ft=xt<0?"-":"",qt=(Ft?-xt:xt)+"",Nt=qt.length;return Ft+(Nt68?1900:2e3),It+Ft[0].length):-1}function O(xt,Dt,It){var Ft=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Dt.slice(It,It+6));return Ft?(xt.Z=Ft[1]?0:-(Ft[2]+(Ft[3]||"00")),It+Ft[0].length):-1}function I(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+1));return Ft?(xt.q=3*Ft[0]-3,It+Ft[0].length):-1}function R(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+2));return Ft?(xt.m=Ft[0]-1,It+Ft[0].length):-1}function U(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+2));return Ft?(xt.d=+Ft[0],It+Ft[0].length):-1}function B(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+3));return Ft?(xt.m=0,xt.d=+Ft[0],It+Ft[0].length):-1}function G(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+2));return Ft?(xt.H=+Ft[0],It+Ft[0].length):-1}function N(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+2));return Ft?(xt.M=+Ft[0],It+Ft[0].length):-1}function j(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+2));return Ft?(xt.S=+Ft[0],It+Ft[0].length):-1}function V(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+3));return Ft?(xt.L=+Ft[0],It+Ft[0].length):-1}function H(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+6));return Ft?(xt.L=Math.floor(Ft[0]/1e3),It+Ft[0].length):-1}function ee(xt,Dt,It){var Ft=c.exec(Dt.slice(It,It+1));return Ft?It+Ft[0].length:-1}function Q(xt,Dt,It){var Ft=p.exec(Dt.slice(It));return Ft?(xt.Q=+Ft[0],It+Ft[0].length):-1}function X(xt,Dt,It){var Ft=p.exec(Dt.slice(It));return Ft?(xt.s=+Ft[0],It+Ft[0].length):-1}function Y(xt,Dt){return d(xt.getDate(),Dt,2)}function K(xt,Dt){return d(xt.getHours(),Dt,2)}function te(xt,Dt){return d(xt.getHours()%12||12,Dt,2)}function ae(xt,Dt){return d(1+T.Z.count((0,y.Z)(xt),xt),Dt,3)}function oe(xt,Dt){return d(xt.getMilliseconds(),Dt,3)}function se(xt,Dt){return oe(xt,Dt)+"000"}function fe(xt,Dt){return d(xt.getMonth()+1,Dt,2)}function ye(xt,Dt){return d(xt.getMinutes(),Dt,2)}function pe(xt,Dt){return d(xt.getSeconds(),Dt,2)}function de(xt){var Dt=xt.getDay();return Dt===0?7:Dt}function he(xt,Dt){return d(s.OM.count((0,y.Z)(xt)-1,xt),Dt,2)}function xe(xt,Dt){var It=xt.getDay();return xt=It>=4||It===0?(0,s.bL)(xt):s.bL.ceil(xt),d(s.bL.count((0,y.Z)(xt),xt)+((0,y.Z)(xt).getDay()===4),Dt,2)}function Re(xt){return xt.getDay()}function we(xt,Dt){return d(s.wA.count((0,y.Z)(xt)-1,xt),Dt,2)}function Ae(xt,Dt){return d(xt.getFullYear()%100,Dt,2)}function Me(xt,Dt){return d(xt.getFullYear()%1e4,Dt,4)}function Ce(xt){var Dt=xt.getTimezoneOffset();return(Dt>0?"-":(Dt*=-1,"+"))+d(Dt/60|0,"0",2)+d(Dt%60,"0",2)}function ne(xt,Dt){return d(xt.getUTCDate(),Dt,2)}function ue(xt,Dt){return d(xt.getUTCHours(),Dt,2)}function me(xt,Dt){return d(xt.getUTCHours()%12||12,Dt,2)}function Te(xt,Dt){return d(1+w.Z.count((0,f.Z)(xt),xt),Dt,3)}function Ee(xt,Dt){return d(xt.getUTCMilliseconds(),Dt,3)}function Ue(xt,Dt){return Ee(xt,Dt)+"000"}function De(xt,Dt){return d(xt.getUTCMonth()+1,Dt,2)}function je(xt,Dt){return d(xt.getUTCMinutes(),Dt,2)}function ge(xt,Dt){return d(xt.getUTCSeconds(),Dt,2)}function be(xt){var Dt=xt.getUTCDay();return Dt===0?7:Dt}function Se(xt,Dt){return d(_.Ox.count((0,f.Z)(xt)-1,xt),Dt,2)}function Ne(xt,Dt){var It=xt.getUTCDay();return xt=It>=4||It===0?(0,_.hB)(xt):_.hB.ceil(xt),d(_.hB.count((0,f.Z)(xt),xt)+((0,f.Z)(xt).getUTCDay()===4),Dt,2)}function Ye(xt){return xt.getUTCDay()}function Ze(xt,Dt){return d(_.l6.count((0,f.Z)(xt)-1,xt),Dt,2)}function st(xt,Dt){return d(xt.getUTCFullYear()%100,Dt,2)}function ot(xt,Dt){return d(xt.getUTCFullYear()%1e4,Dt,4)}function ft(){return"+0000"}function yt(){return"%"}function Et(xt){return+xt}function Tt(xt){return Math.floor(+xt/1e3)}n=r({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"]}),o=n.format,n.parse,a=n.utcFormat,n.utcParse},82301:function(D,E,e){e.d(E,{a:function(){return T}});var _=e(30052),w=e(54263),s=(0,_.Z)(function(y){y.setHours(0,0,0,0)},function(y,f){y.setDate(y.getDate()+f)},function(y,f){return(f-y-(f.getTimezoneOffset()-y.getTimezoneOffset())*w.yB)/w.UD},function(y){return y.getDate()-1});E.Z=s;var T=s.range},54263:function(D,E,e){e.d(E,{UD:function(){return T},Y2:function(){return s},Ym:function(){return _},iM:function(){return y},yB:function(){return w}});var _=1e3,w=6e4,s=36e5,T=864e5,y=6048e5},81041:function(D,E,e){e.r(E),e.d(E,{timeDay:function(){return p.Z},timeDays:function(){return p.a},timeFriday:function(){return c.mC},timeFridays:function(){return c.b$},timeHour:function(){return a},timeHours:function(){return u},timeInterval:function(){return _.Z},timeMillisecond:function(){return s},timeMilliseconds:function(){return T},timeMinute:function(){return r},timeMinutes:function(){return n},timeMonday:function(){return c.wA},timeMondays:function(){return c.bJ},timeMonth:function(){return d},timeMonths:function(){return v},timeSaturday:function(){return c.EY},timeSaturdays:function(){return c.Ff},timeSecond:function(){return l},timeSeconds:function(){return t},timeSunday:function(){return c.OM},timeSundays:function(){return c.vm},timeThursday:function(){return c.bL},timeThursdays:function(){return c.$t},timeTuesday:function(){return c.sy},timeTuesdays:function(){return c.aU},timeWednesday:function(){return c.zg},timeWednesdays:function(){return c.Ld},timeWeek:function(){return c.OM},timeWeeks:function(){return c.vm},timeYear:function(){return x.Z},timeYears:function(){return x.g},utcDay:function(){return C.Z},utcDays:function(){return C.y},utcFriday:function(){return L.QQ},utcFridays:function(){return L.fz},utcHour:function(){return M},utcHours:function(){return A},utcMillisecond:function(){return s},utcMilliseconds:function(){return T},utcMinute:function(){return m},utcMinutes:function(){return k},utcMonday:function(){return L.l6},utcMondays:function(){return L.$3},utcMonth:function(){return I},utcMonths:function(){return R},utcSaturday:function(){return L.g4},utcSaturdays:function(){return L.Q_},utcSecond:function(){return l},utcSeconds:function(){return t},utcSunday:function(){return L.Ox},utcSundays:function(){return L.SU},utcThursday:function(){return L.hB},utcThursdays:function(){return L.xj},utcTuesday:function(){return L.J1},utcTuesdays:function(){return L.DK},utcWednesday:function(){return L.b3},utcWednesdays:function(){return L.uy},utcWeek:function(){return L.Ox},utcWeeks:function(){return L.SU},utcYear:function(){return U.Z},utcYears:function(){return U.D}});var _=e(30052),w=(0,_.Z)(function(){},function(B,G){B.setTime(+B+G)},function(B,G){return G-B});w.every=function(B){return B=Math.floor(B),isFinite(B)&&B>0?B>1?(0,_.Z)(function(G){G.setTime(Math.floor(G/B)*B)},function(G,N){G.setTime(+G+N*B)},function(G,N){return(N-G)/B}):w:null};var s=w,T=w.range,y=e(54263),f=(0,_.Z)(function(B){B.setTime(B-B.getMilliseconds())},function(B,G){B.setTime(+B+G*y.Ym)},function(B,G){return(G-B)/y.Ym},function(B){return B.getUTCSeconds()}),l=f,t=f.range,i=(0,_.Z)(function(B){B.setTime(B-B.getMilliseconds()-B.getSeconds()*y.Ym)},function(B,G){B.setTime(+B+G*y.yB)},function(B,G){return(G-B)/y.yB},function(B){return B.getMinutes()}),r=i,n=i.range,o=(0,_.Z)(function(B){B.setTime(B-B.getMilliseconds()-B.getSeconds()*y.Ym-B.getMinutes()*y.yB)},function(B,G){B.setTime(+B+G*y.Y2)},function(B,G){return(G-B)/y.Y2},function(B){return B.getHours()}),a=o,u=o.range,p=e(82301),c=e(59879),b=(0,_.Z)(function(B){B.setDate(1),B.setHours(0,0,0,0)},function(B,G){B.setMonth(B.getMonth()+G)},function(B,G){return G.getMonth()-B.getMonth()+12*(G.getFullYear()-B.getFullYear())},function(B){return B.getMonth()}),d=b,v=b.range,x=e(34823),g=(0,_.Z)(function(B){B.setUTCSeconds(0,0)},function(B,G){B.setTime(+B+G*y.yB)},function(B,G){return(G-B)/y.yB},function(B){return B.getUTCMinutes()}),m=g,k=g.range,h=(0,_.Z)(function(B){B.setUTCMinutes(0,0,0)},function(B,G){B.setTime(+B+G*y.Y2)},function(B,G){return(G-B)/y.Y2},function(B){return B.getUTCHours()}),M=h,A=h.range,C=e(48480),L=e(58176),O=(0,_.Z)(function(B){B.setUTCDate(1),B.setUTCHours(0,0,0,0)},function(B,G){B.setUTCMonth(B.getUTCMonth()+G)},function(B,G){return G.getUTCMonth()-B.getUTCMonth()+12*(G.getUTCFullYear()-B.getUTCFullYear())},function(B){return B.getUTCMonth()}),I=O,R=O.range,U=e(79791)},30052:function(D,E,e){e.d(E,{Z:function(){return s}});var _=new Date,w=new Date;function s(T,y,f,l){function t(i){return T(i=arguments.length===0?new Date:new Date(+i)),i}return t.floor=function(i){return T(i=new Date(+i)),i},t.ceil=function(i){return T(i=new Date(i-1)),y(i,1),T(i),i},t.round=function(i){var r=t(i),n=t.ceil(i);return i-r0))return a;do a.push(o=new Date(+i)),y(i,n),T(i);while(o=r)for(;T(r),!i(r);)r.setTime(r-1)},function(r,n){if(r>=r)if(n<0)for(;++n<=0;)for(;y(r,-1),!i(r););else for(;--n>=0;)for(;y(r,1),!i(r););})},f&&(t.count=function(i,r){return _.setTime(+i),w.setTime(+r),T(_),T(w),Math.floor(f(_,w))},t.every=function(i){return i=Math.floor(i),isFinite(i)&&i>0?i>1?t.filter(l?function(r){return l(r)%i==0}:function(r){return t.count(0,r)%i==0}):t:null}),t}},48480:function(D,E,e){e.d(E,{y:function(){return T}});var _=e(30052),w=e(54263),s=(0,_.Z)(function(y){y.setUTCHours(0,0,0,0)},function(y,f){y.setUTCDate(y.getUTCDate()+f)},function(y,f){return(f-y)/w.UD},function(y){return y.getUTCDate()-1});E.Z=s;var T=s.range},58176:function(D,E,e){e.d(E,{$3:function(){return o},DK:function(){return a},J1:function(){return f},Ox:function(){return T},QQ:function(){return i},Q_:function(){return b},SU:function(){return n},b3:function(){return l},fz:function(){return c},g4:function(){return r},hB:function(){return t},l6:function(){return y},uy:function(){return u},xj:function(){return p}});var _=e(30052),w=e(54263);function s(d){return(0,_.Z)(function(v){v.setUTCDate(v.getUTCDate()-(v.getUTCDay()+7-d)%7),v.setUTCHours(0,0,0,0)},function(v,x){v.setUTCDate(v.getUTCDate()+7*x)},function(v,x){return(x-v)/w.iM})}var T=s(0),y=s(1),f=s(2),l=s(3),t=s(4),i=s(5),r=s(6),n=T.range,o=y.range,a=f.range,u=l.range,p=t.range,c=i.range,b=r.range},79791:function(D,E,e){e.d(E,{D:function(){return s}});var _=e(30052),w=(0,_.Z)(function(T){T.setUTCMonth(0,1),T.setUTCHours(0,0,0,0)},function(T,y){T.setUTCFullYear(T.getUTCFullYear()+y)},function(T,y){return y.getUTCFullYear()-T.getUTCFullYear()},function(T){return T.getUTCFullYear()});w.every=function(T){return isFinite(T=Math.floor(T))&&T>0?(0,_.Z)(function(y){y.setUTCFullYear(Math.floor(y.getUTCFullYear()/T)*T),y.setUTCMonth(0,1),y.setUTCHours(0,0,0,0)},function(y,f){y.setUTCFullYear(y.getUTCFullYear()+f*T)}):null},E.Z=w;var s=w.range},59879:function(D,E,e){e.d(E,{$t:function(){return p},EY:function(){return r},Ff:function(){return b},Ld:function(){return u},OM:function(){return T},aU:function(){return a},b$:function(){return c},bJ:function(){return o},bL:function(){return t},mC:function(){return i},sy:function(){return f},vm:function(){return n},wA:function(){return y},zg:function(){return l}});var _=e(30052),w=e(54263);function s(d){return(0,_.Z)(function(v){v.setDate(v.getDate()-(v.getDay()+7-d)%7),v.setHours(0,0,0,0)},function(v,x){v.setDate(v.getDate()+7*x)},function(v,x){return(x-v-(x.getTimezoneOffset()-v.getTimezoneOffset())*w.yB)/w.iM})}var T=s(0),y=s(1),f=s(2),l=s(3),t=s(4),i=s(5),r=s(6),n=T.range,o=y.range,a=f.range,u=l.range,p=t.range,c=i.range,b=r.range},34823:function(D,E,e){e.d(E,{g:function(){return s}});var _=e(30052),w=(0,_.Z)(function(T){T.setMonth(0,1),T.setHours(0,0,0,0)},function(T,y){T.setFullYear(T.getFullYear()+y)},function(T,y){return y.getFullYear()-T.getFullYear()},function(T){return T.getFullYear()});w.every=function(T){return isFinite(T=Math.floor(T))&&T>0?(0,_.Z)(function(y){y.setFullYear(Math.floor(y.getFullYear()/T)*T),y.setMonth(0,1),y.setHours(0,0,0,0)},function(y,f){y.setFullYear(y.getFullYear()+f*T)}):null},E.Z=w;var s=w.range},17045:function(D,E,e){var _=e(8709),w=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",s=Object.prototype.toString,T=Array.prototype.concat,y=Object.defineProperty,f=e(55622)(),l=y&&f,t=function(r,n,o,a){if(n in r){if(a===!0){if(r[n]===o)return}else if(typeof(u=a)!="function"||s.call(u)!=="[object Function]"||!a())return}var u;l?y(r,n,{configurable:!0,enumerable:!1,value:o,writable:!0}):r[n]=o},i=function(r,n){var o=arguments.length>2?arguments[2]:{},a=_(n);w&&(a=T.call(a,Object.getOwnPropertySymbols(n)));for(var u=0;ul*t){var a=(o-n)/l;f[r]=1e3*a}}return f}function w(s){for(var T=[],y=s[0];y<=s[1];y++)for(var f=String.fromCharCode(y),l=s[0];l0)return function(w,s){var T,y;for(T=new Array(w),y=0;y80*C){L=I=M[0],O=R=M[1];for(var ee=C;eeI&&(I=U),B>R&&(R=B);G=(G=Math.max(I-L,R-O))!==0?1/G:0}return w(V,H,C,L,O,G),H}function e(M,A,C,L,O){var I,R;if(O===h(M,A,C,L)>0)for(I=A;I=A;I-=L)R=g(I,M[I],M[I+1],R);return R&&p(R,R.next)&&(m(R),R=R.next),R}function _(M,A){if(!M)return M;A||(A=M);var C,L=M;do if(C=!1,L.steiner||!p(L,L.next)&&u(L.prev,L,L.next)!==0)L=L.next;else{if(m(L),(L=A=L.prev)===L.next)break;C=!0}while(C||L!==A);return A}function w(M,A,C,L,O,I,R){if(M){!R&&I&&function(N,j,V,H){var ee=N;do ee.z===null&&(ee.z=r(ee.x,ee.y,j,V,H)),ee.prevZ=ee.prev,ee.nextZ=ee.next,ee=ee.next;while(ee!==N);ee.prevZ.nextZ=null,ee.prevZ=null,function(Q){var X,Y,K,te,ae,oe,se,fe,ye=1;do{for(Y=Q,Q=null,ae=null,oe=0;Y;){for(oe++,K=Y,se=0,X=0;X0||fe>0&&K;)se!==0&&(fe===0||!K||Y.z<=K.z)?(te=Y,Y=Y.nextZ,se--):(te=K,K=K.nextZ,fe--),ae?ae.nextZ=te:Q=te,te.prevZ=ae,ae=te;Y=K}ae.nextZ=null,ye*=2}while(oe>1)}(ee)}(M,L,O,I);for(var U,B,G=M;M.prev!==M.next;)if(U=M.prev,B=M.next,I?T(M,L,O,I):s(M))A.push(U.i/C),A.push(M.i/C),A.push(B.i/C),m(M),M=B.next,G=B.next;else if((M=B)===G){R?R===1?w(M=y(_(M),A,C),A,C,L,O,I,2):R===2&&f(M,A,C,L,O,I):w(_(M),A,C,L,O,I,1);break}}}function s(M){var A=M.prev,C=M,L=M.next;if(u(A,C,L)>=0)return!1;for(var O=M.next.next;O!==M.prev;){if(o(A.x,A.y,C.x,C.y,L.x,L.y,O.x,O.y)&&u(O.prev,O,O.next)>=0)return!1;O=O.next}return!0}function T(M,A,C,L){var O=M.prev,I=M,R=M.next;if(u(O,I,R)>=0)return!1;for(var U=O.xI.x?O.x>R.x?O.x:R.x:I.x>R.x?I.x:R.x,N=O.y>I.y?O.y>R.y?O.y:R.y:I.y>R.y?I.y:R.y,j=r(U,B,A,C,L),V=r(G,N,A,C,L),H=M.prevZ,ee=M.nextZ;H&&H.z>=j&&ee&&ee.z<=V;){if(H!==M.prev&&H!==M.next&&o(O.x,O.y,I.x,I.y,R.x,R.y,H.x,H.y)&&u(H.prev,H,H.next)>=0||(H=H.prevZ,ee!==M.prev&&ee!==M.next&&o(O.x,O.y,I.x,I.y,R.x,R.y,ee.x,ee.y)&&u(ee.prev,ee,ee.next)>=0))return!1;ee=ee.nextZ}for(;H&&H.z>=j;){if(H!==M.prev&&H!==M.next&&o(O.x,O.y,I.x,I.y,R.x,R.y,H.x,H.y)&&u(H.prev,H,H.next)>=0)return!1;H=H.prevZ}for(;ee&&ee.z<=V;){if(ee!==M.prev&&ee!==M.next&&o(O.x,O.y,I.x,I.y,R.x,R.y,ee.x,ee.y)&&u(ee.prev,ee,ee.next)>=0)return!1;ee=ee.nextZ}return!0}function y(M,A,C){var L=M;do{var O=L.prev,I=L.next.next;!p(O,I)&&c(O,L,L.next,I)&&v(O,I)&&v(I,O)&&(A.push(O.i/C),A.push(L.i/C),A.push(I.i/C),m(L),m(L.next),L=M=I),L=L.next}while(L!==M);return _(L)}function f(M,A,C,L,O,I){var R=M;do{for(var U=R.next.next;U!==R.prev;){if(R.i!==U.i&&a(R,U)){var B=x(R,U);return R=_(R,R.next),B=_(B,B.next),w(R,A,C,L,O,I),void w(B,A,C,L,O,I)}U=U.next}R=R.next}while(R!==M)}function l(M,A){return M.x-A.x}function t(M,A){if(A=function(L,O){var I,R=O,U=L.x,B=L.y,G=-1/0;do{if(B<=R.y&&B>=R.next.y&&R.next.y!==R.y){var N=R.x+(B-R.y)*(R.next.x-R.x)/(R.next.y-R.y);if(N<=U&&N>G){if(G=N,N===U){if(B===R.y)return R;if(B===R.next.y)return R.next}I=R.x=R.x&&R.x>=H&&U!==R.x&&o(BI.x||R.x===I.x&&i(I,R)))&&(I=R,Q=j)),R=R.next;while(R!==V);return I}(M,A),A){var C=x(A,M);_(A,A.next),_(C,C.next)}}function i(M,A){return u(M.prev,M,A.prev)<0&&u(A.next,M,M.next)<0}function r(M,A,C,L,O){return(M=1431655765&((M=858993459&((M=252645135&((M=16711935&((M=32767*(M-C)*O)|M<<8))|M<<4))|M<<2))|M<<1))|(A=1431655765&((A=858993459&((A=252645135&((A=16711935&((A=32767*(A-L)*O)|A<<8))|A<<4))|A<<2))|A<<1))<<1}function n(M){var A=M,C=M;do(A.x=0&&(M-R)*(L-U)-(C-R)*(A-U)>=0&&(C-R)*(I-U)-(O-R)*(L-U)>=0}function a(M,A){return M.next.i!==A.i&&M.prev.i!==A.i&&!function(C,L){var O=C;do{if(O.i!==C.i&&O.next.i!==C.i&&O.i!==L.i&&O.next.i!==L.i&&c(O,O.next,C,L))return!0;O=O.next}while(O!==C);return!1}(M,A)&&(v(M,A)&&v(A,M)&&function(C,L){var O=C,I=!1,R=(C.x+L.x)/2,U=(C.y+L.y)/2;do O.y>U!=O.next.y>U&&O.next.y!==O.y&&R<(O.next.x-O.x)*(U-O.y)/(O.next.y-O.y)+O.x&&(I=!I),O=O.next;while(O!==C);return I}(M,A)&&(u(M.prev,M,A.prev)||u(M,A.prev,A))||p(M,A)&&u(M.prev,M,M.next)>0&&u(A.prev,A,A.next)>0)}function u(M,A,C){return(A.y-M.y)*(C.x-A.x)-(A.x-M.x)*(C.y-A.y)}function p(M,A){return M.x===A.x&&M.y===A.y}function c(M,A,C,L){var O=d(u(M,A,C)),I=d(u(M,A,L)),R=d(u(C,L,M)),U=d(u(C,L,A));return O!==I&&R!==U||!(O!==0||!b(M,C,A))||!(I!==0||!b(M,L,A))||!(R!==0||!b(C,M,L))||!(U!==0||!b(C,A,L))}function b(M,A,C){return A.x<=Math.max(M.x,C.x)&&A.x>=Math.min(M.x,C.x)&&A.y<=Math.max(M.y,C.y)&&A.y>=Math.min(M.y,C.y)}function d(M){return M>0?1:M<0?-1:0}function v(M,A){return u(M.prev,M,M.next)<0?u(M,A,M.next)>=0&&u(M,M.prev,A)>=0:u(M,A,M.prev)<0||u(M,M.next,A)<0}function x(M,A){var C=new k(M.i,M.x,M.y),L=new k(A.i,A.x,A.y),O=M.next,I=A.prev;return M.next=A,A.prev=M,C.next=O,O.prev=C,L.next=C,C.prev=L,I.next=L,L.prev=I,L}function g(M,A,C,L){var O=new k(M,A,C);return L?(O.next=L.next,O.prev=L,L.next.prev=O,L.next=O):(O.prev=O,O.next=O),O}function m(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 k(M,A,C){this.i=M,this.x=A,this.y=C,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function h(M,A,C,L){for(var O=0,I=A,R=C-L;I0&&(L+=M[O-1].length,C.holes.push(L))}return C}},2502:function(D,E,e){var _=e(68664);D.exports=function(w,s){var T,y=[],f=[],l=[],t={},i=[];function r(v){l[v]=!1,t.hasOwnProperty(v)&&Object.keys(t[v]).forEach(function(x){delete t[v][x],l[x]&&r(x)})}function n(v){var x,g,m=!1;for(f.push(v),l[v]=!0,x=0;x=C})})(v);for(var x,g=_(w).components.filter(function(C){return C.length>1}),m=1/0,k=0;k=55296&&v<=56319&&(k+=a[++p]),k=h?r.call(h,M,k,c):k,u?(n.value=k,o(b,c,n)):b[c]=k,++c;d=c}}if(d===void 0)for(d=T(a.length),u&&(b=new u(d)),p=0;p0?1:-1}},56247:function(D,E,e){var _=e(9953),w=Math.abs,s=Math.floor;D.exports=function(T){return isNaN(T)?0:(T=Number(T))!==0&&isFinite(T)?_(T)*s(w(T)):T}},35976:function(D,E,e){var _=e(56247),w=Math.max;D.exports=function(s){return w(0,_(s))}},67260:function(D,E,e){var _=e(78513),w=e(36672),s=Function.prototype.bind,T=Function.prototype.call,y=Object.keys,f=Object.prototype.propertyIsEnumerable;D.exports=function(l,t){return function(i,r){var n,o=arguments[2],a=arguments[3];return i=Object(w(i)),_(r),n=y(i),a&&n.sort(typeof a=="function"?s.call(a,i):void 0),typeof l!="function"&&(l=n[l]),T.call(l,n,function(u,p){return f.call(i,u)?T.call(r,o,i[u],u,i,p):t})}}},95879:function(D,E,e){D.exports=e(73583)()?Object.assign:e(34205)},73583:function(D){D.exports=function(){var E,e=Object.assign;return typeof e=="function"&&(e(E={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),E.foo+E.bar+E.trzy==="razdwatrzy")}},34205:function(D,E,e){var _=e(68700),w=e(36672),s=Math.max;D.exports=function(T,y){var f,l,t,i=s(arguments.length,2);for(T=Object(w(T)),t=function(r){try{T[r]=y[r]}catch(n){f||(f=n)}},l=1;l-1}},87963:function(D){var E=Object.prototype.toString,e=E.call("");D.exports=function(_){return typeof _=="string"||_&&typeof _=="object"&&(_ instanceof String||E.call(_)===e)||!1}},43043:function(D){var E=Object.create(null),e=Math.random;D.exports=function(){var _;do _=e().toString(36).slice(2);while(E[_]);return _}},32411:function(D,E,e){var _,w=e(1496),s=e(66741),T=e(62072),y=e(8260),f=e(95426),l=Object.defineProperty;_=D.exports=function(t,i){if(!(this instanceof _))throw new TypeError("Constructor requires 'new'");f.call(this,t),i=i?s.call(i,"key+value")?"key+value":s.call(i,"key")?"key":"value":"value",l(this,"__kind__",T("",i))},w&&w(_,f),delete _.prototype.constructor,_.prototype=Object.create(f.prototype,{_resolve:T(function(t){return this.__kind__==="value"?this.__list__[t]:this.__kind__==="key+value"?[t,this.__list__[t]]:t})}),l(_.prototype,y.toStringTag,T("c","Array Iterator"))},27515:function(D,E,e){var _=e(73051),w=e(78513),s=e(87963),T=e(66661),y=Array.isArray,f=Function.prototype.call,l=Array.prototype.some;D.exports=function(t,i){var r,n,o,a,u,p,c,b,d=arguments[2];if(y(t)||_(t)?r="array":s(t)?r="string":t=T(t),w(i),o=function(){a=!0},r!=="array")if(r!=="string")for(n=t.next();!n.done;){if(f.call(i,d,n.value,o),a)return;n=t.next()}else for(p=t.length,u=0;u=55296&&b<=56319&&(c+=t[++u]),f.call(i,d,c,o),!a);++u);else l.call(t,function(v){return f.call(i,d,v,o),a})}},66661:function(D,E,e){var _=e(73051),w=e(87963),s=e(32411),T=e(259),y=e(58095),f=e(8260).iterator;D.exports=function(l){return typeof y(l)[f]=="function"?l[f]():_(l)?new s(l):w(l)?new T(l):new s(l)}},95426:function(D,E,e){var _,w=e(16134),s=e(95879),T=e(78513),y=e(36672),f=e(62072),l=e(55174),t=e(8260),i=Object.defineProperty,r=Object.defineProperties;D.exports=_=function(n,o){if(!(this instanceof _))throw new TypeError("Constructor requires 'new'");r(this,{__list__:f("w",y(n)),__context__:f("w",o),__nextIndex__:f("w",0)}),o&&(T(o.on),o.on("_add",this._onAdd),o.on("_delete",this._onDelete),o.on("_clear",this._onClear))},delete _.prototype.constructor,r(_.prototype,s({_next:f(function(){var n;if(this.__list__)return this.__redo__&&(n=this.__redo__.shift())!==void 0?n:this.__nextIndex__=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach(function(o,a){o>=n&&(this.__redo__[a]=++o)},this),this.__redo__.push(n)):i(this,"__redo__",f("c",[n])))}),_onDelete:f(function(n){var o;n>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&((o=this.__redo__.indexOf(n))!==-1&&this.__redo__.splice(o,1),this.__redo__.forEach(function(a,u){a>n&&(this.__redo__[u]=--a)},this)))}),_onClear:f(function(){this.__redo__&&w.call(this.__redo__),this.__nextIndex__=0})}))),i(_.prototype,t.iterator,f(function(){return this}))},35940:function(D,E,e){var _=e(73051),w=e(95296),s=e(87963),T=e(8260).iterator,y=Array.isArray;D.exports=function(f){return!(!w(f)||!y(f)&&!s(f)&&!_(f)&&typeof f[T]!="function")}},259:function(D,E,e){var _,w=e(1496),s=e(62072),T=e(8260),y=e(95426),f=Object.defineProperty;_=D.exports=function(l){if(!(this instanceof _))throw new TypeError("Constructor requires 'new'");l=String(l),y.call(this,l),f(this,"__length__",s("",l.length))},w&&w(_,y),delete _.prototype.constructor,_.prototype=Object.create(y.prototype,{_next:s(function(){if(this.__list__)return this.__nextIndex__=55296&&t<=56319?i+this.__list__[this.__nextIndex__++]:i})}),f(_.prototype,T.toStringTag,s("c","String Iterator"))},58095:function(D,E,e){var _=e(35940);D.exports=function(w){if(!_(w))throw new TypeError(w+" is not iterable");return w}},73523:function(D){function E(e,_){if(e==null)throw new TypeError("Cannot convert first argument to object");for(var w=Object(e),s=1;s0&&x.length>d&&!x.warned){x.warned=!0;var m=new Error("Possible EventEmitter memory leak detected. "+x.length+" "+String(p)+" listeners added. Use emitter.setMaxListeners() to increase limit");m.name="MaxListenersExceededWarning",m.emitter=u,m.type=p,m.count=x.length,g=m,console&&console.warn&&console.warn(g)}return u}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 i(u,p,c){var b={fired:!1,wrapFn:void 0,target:u,type:p,listener:c},d=t.bind(b);return d.listener=c,b.wrapFn=d,d}function r(u,p,c){var b=u._events;if(b===void 0)return[];var d=b[p];return d===void 0?[]:typeof d=="function"?c?[d.listener||d]:[d]:c?function(v){for(var x=new Array(v.length),g=0;g0&&(v=p[0]),v instanceof Error)throw v;var x=new Error("Unhandled error."+(v?" ("+v.message+")":""));throw x.context=v,x}var g=d[u];if(g===void 0)return!1;if(typeof g=="function")_(g,this,p);else{var m=g.length,k=o(g,m);for(c=0;c=0;v--)if(c[v]===p||c[v].listener===p){x=c[v].listener,d=v;break}if(d<0)return this;d===0?c.shift():function(g,m){for(;m+1=0;b--)this.removeListener(u,p[b]);return this},s.prototype.listeners=function(u){return r(this,u,!0)},s.prototype.rawListeners=function(u){return r(this,u,!1)},s.listenerCount=function(u,p){return typeof u.listenerCount=="function"?u.listenerCount(p):n.call(u,p)},s.prototype.listenerCount=n,s.prototype.eventNames=function(){return this._eventsCount>0?E(this._events):[]}},60774:function(D){var E=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};D.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return E()}try{return __global__||E()}finally{delete Object.prototype.__global__}}()},94908:function(D,E,e){D.exports=e(51152)()?globalThis:e(60774)},51152:function(D){D.exports=function(){return typeof globalThis=="object"&&!!globalThis&&globalThis.Array===Array}},92770:function(D,E,e){var _=e(18546);D.exports=function(w){var s=typeof w;if(s==="string"){var T=w;if((w=+w)==0&&_(T))return!1}else if(s!=="number")return!1;return w-w<1}},30120:function(D,E,e){var _=e(90660);D.exports=function(w,s,T){if(!w)throw new TypeError("must specify data as first parameter");if(T=0|+(T||0),Array.isArray(w)&&w[0]&&typeof w[0][0]=="number"){var y,f,l,t,i=w[0].length,r=w.length*i;s&&typeof s!="string"||(s=new(_(s||"float32"))(r+T));var n=s.length-T;if(r!==n)throw new Error("source length "+r+" ("+i+"x"+w.length+") does not match destination length "+n);for(y=0,l=T;yT[0]-l[0]/2&&(a=l[0]/2,u+=l[1]);return y}},32879:function(D){function E(s,T){T||(T={}),(typeof s=="string"||Array.isArray(s))&&(T.family=s);var y=Array.isArray(T.family)?T.family.join(", "):T.family;if(!y)throw Error("`family` must be defined");var f=T.size||T.fontSize||T.em||48,l=T.weight||T.fontWeight||"",t=(s=[T.style||T.fontStyle||"",l,f].join(" ")+"px "+y,T.origin||"top");if(E.cache[y]&&f<=E.cache[y].em)return e(E.cache[y],t);var i=T.canvas||E.canvas,r=i.getContext("2d"),n={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"},o=Math.ceil(1.5*f);i.height=o,i.width=.5*o,r.font=s;var a="H",u={top:0};r.clearRect(0,0,o,o),r.textBaseline="top",r.fillStyle="black",r.fillText(a,0,0);var p=_(r.getImageData(0,0,o,o));r.clearRect(0,0,o,o),r.textBaseline="bottom",r.fillText(a,0,o);var c=_(r.getImageData(0,0,o,o));u.lineHeight=u.bottom=o-c+p,r.clearRect(0,0,o,o),r.textBaseline="alphabetic",r.fillText(a,0,o);var b=o-_(r.getImageData(0,0,o,o))-1+p;u.baseline=u.alphabetic=b,r.clearRect(0,0,o,o),r.textBaseline="middle",r.fillText(a,0,.5*o);var d=_(r.getImageData(0,0,o,o));u.median=u.middle=o-d-1+p-.5*o,r.clearRect(0,0,o,o),r.textBaseline="hanging",r.fillText(a,0,.5*o);var v=_(r.getImageData(0,0,o,o));u.hanging=o-v-1+p-.5*o,r.clearRect(0,0,o,o),r.textBaseline="ideographic",r.fillText(a,0,o);var x=_(r.getImageData(0,0,o,o));if(u.ideographic=o-x-1+p,n.upper&&(r.clearRect(0,0,o,o),r.textBaseline="top",r.fillText(n.upper,0,0),u.upper=_(r.getImageData(0,0,o,o)),u.capHeight=u.baseline-u.upper),n.lower&&(r.clearRect(0,0,o,o),r.textBaseline="top",r.fillText(n.lower,0,0),u.lower=_(r.getImageData(0,0,o,o)),u.xHeight=u.baseline-u.lower),n.tittle&&(r.clearRect(0,0,o,o),r.textBaseline="top",r.fillText(n.tittle,0,0),u.tittle=_(r.getImageData(0,0,o,o))),n.ascent&&(r.clearRect(0,0,o,o),r.textBaseline="top",r.fillText(n.ascent,0,0),u.ascent=_(r.getImageData(0,0,o,o))),n.descent&&(r.clearRect(0,0,o,o),r.textBaseline="top",r.fillText(n.descent,0,0),u.descent=w(r.getImageData(0,0,o,o))),n.overshoot){r.clearRect(0,0,o,o),r.textBaseline="top",r.fillText(n.overshoot,0,0);var g=w(r.getImageData(0,0,o,o));u.overshoot=g-b}for(var m in u)u[m]/=f;return u.em=f,E.cache[y]=u,e(u,t)}function e(s,T){var y={};for(var f in typeof T=="string"&&(T=s[T]),s)f!=="em"&&(y[f]=s[f]-T);return y}function _(s){for(var T=s.height,y=s.data,f=3;f0;f-=4)if(y[f]!==0)return Math.floor(.25*(f-3)/T)}D.exports=E,E.canvas=document.createElement("canvas"),E.cache={}},31353:function(D,E,e){var _=e(85395),w=Object.prototype.toString,s=Object.prototype.hasOwnProperty,T=function(l,t,i){for(var r=0,n=l.length;r=3&&(r=i),w.call(l)==="[object Array]"?T(l,t,r):typeof l=="string"?y(l,t,r):f(l,t,r)}},73047:function(D){var E="Function.prototype.bind called on incompatible ",e=Array.prototype.slice,_=Object.prototype.toString,w="[object Function]";D.exports=function(s){var T=this;if(typeof T!="function"||_.call(T)!==w)throw new TypeError(E+T);for(var y,f=e.call(arguments,1),l=function(){if(this instanceof y){var o=T.apply(this,f.concat(e.call(arguments)));return Object(o)===o?o:this}return T.apply(s,f.concat(e.call(arguments)))},t=Math.max(0,T.length-f.length),i=[],r=0;r"u"&&!e.canvas)return null;var _=e.canvas||document.createElement("canvas");typeof e.width=="number"&&(_.width=e.width),typeof e.height=="number"&&(_.height=e.height);var w,s=e;try{var T=[E];E.indexOf("webgl")===0&&T.push("experimental-"+E);for(var y=0;y"u"?_:r(Uint8Array),a={"%AggregateError%":typeof AggregateError>"u"?_:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?_:ArrayBuffer,"%ArrayIteratorPrototype%":i?r([][Symbol.iterator]()):_,"%AsyncFromSyncIteratorPrototype%":_,"%AsyncFunction%":n,"%AsyncGenerator%":n,"%AsyncGeneratorFunction%":n,"%AsyncIteratorPrototype%":n,"%Atomics%":typeof Atomics>"u"?_:Atomics,"%BigInt%":typeof BigInt>"u"?_:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?_:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?_:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?_:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?_:Float32Array,"%Float64Array%":typeof Float64Array>"u"?_:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?_:FinalizationRegistry,"%Function%":s,"%GeneratorFunction%":n,"%Int8Array%":typeof Int8Array>"u"?_:Int8Array,"%Int16Array%":typeof Int16Array>"u"?_:Int16Array,"%Int32Array%":typeof Int32Array>"u"?_:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":i?r(r([][Symbol.iterator]())):_,"%JSON%":typeof JSON=="object"?JSON:_,"%Map%":typeof Map>"u"?_:Map,"%MapIteratorPrototype%":typeof Map<"u"&&i?r(new Map()[Symbol.iterator]()):_,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?_:Promise,"%Proxy%":typeof Proxy>"u"?_:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?_:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?_:Set,"%SetIteratorPrototype%":typeof Set<"u"&&i?r(new Set()[Symbol.iterator]()):_,"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?_:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":i?r(""[Symbol.iterator]()):_,"%Symbol%":i?Symbol:_,"%SyntaxError%":w,"%ThrowTypeError%":t,"%TypedArray%":o,"%TypeError%":T,"%Uint8Array%":typeof Uint8Array>"u"?_:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?_:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?_:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?_:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?_:WeakMap,"%WeakRef%":typeof WeakRef>"u"?_:WeakRef,"%WeakSet%":typeof WeakSet>"u"?_:WeakSet};try{null.error}catch(L){var u=r(r(L));a["%Error.prototype%"]=u}var p=function L(O){var I;if(O==="%AsyncFunction%")I=y("async function () {}");else if(O==="%GeneratorFunction%")I=y("function* () {}");else if(O==="%AsyncGeneratorFunction%")I=y("async function* () {}");else if(O==="%AsyncGenerator%"){var R=L("%AsyncGeneratorFunction%");R&&(I=R.prototype)}else if(O==="%AsyncIteratorPrototype%"){var U=L("%AsyncGenerator%");U&&(I=r(U.prototype))}return a[O]=I,I},c={"%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"]},b=e(77575),d=e(35065),v=b.call(Function.call,Array.prototype.concat),x=b.call(Function.apply,Array.prototype.splice),g=b.call(Function.call,String.prototype.replace),m=b.call(Function.call,String.prototype.slice),k=b.call(Function.call,RegExp.prototype.exec),h=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,M=/\\(\\)?/g,A=function(L){var O=m(L,0,1),I=m(L,-1);if(O==="%"&&I!=="%")throw new w("invalid intrinsic syntax, expected closing `%`");if(I==="%"&&O!=="%")throw new w("invalid intrinsic syntax, expected opening `%`");var R=[];return g(L,h,function(U,B,G,N){R[R.length]=G?g(N,M,"$1"):B||U}),R},C=function(L,O){var I,R=L;if(d(c,R)&&(R="%"+(I=c[R])[0]+"%"),d(a,R)){var U=a[R];if(U===n&&(U=p(R)),U===void 0&&!O)throw new T("intrinsic "+L+" exists, but is not available. Please file an issue!");return{alias:I,name:R,value:U}}throw new w("intrinsic "+L+" does not exist!")};D.exports=function(L,O){if(typeof L!="string"||L.length===0)throw new T("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof O!="boolean")throw new T('"allowMissing" argument must be a boolean');if(k(/^%?[^%]*%?$/,L)===null)throw new w("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var I=A(L),R=I.length>0?I[0]:"",U=C("%"+R+"%",O),B=U.name,G=U.value,N=!1,j=U.alias;j&&(R=j[0],x(I,v([0,1],j)));for(var V=1,H=!0;V=I.length){var Y=f(G,ee);G=(H=!!Y)&&"get"in Y&&!("originalValue"in Y.get)?Y.get:G[ee]}else H=d(G,ee),G=G[ee];H&&!N&&(a[B]=G)}}return G}},85400:function(D){D.exports=function(E,e){var _=e[0],w=e[1],s=e[2],T=e[3],y=e[4],f=e[5],l=e[6],t=e[7],i=e[8],r=e[9],n=e[10],o=e[11],a=e[12],u=e[13],p=e[14],c=e[15];return E[0]=f*(n*c-o*p)-r*(l*c-t*p)+u*(l*o-t*n),E[1]=-(w*(n*c-o*p)-r*(s*c-T*p)+u*(s*o-T*n)),E[2]=w*(l*c-t*p)-f*(s*c-T*p)+u*(s*t-T*l),E[3]=-(w*(l*o-t*n)-f*(s*o-T*n)+r*(s*t-T*l)),E[4]=-(y*(n*c-o*p)-i*(l*c-t*p)+a*(l*o-t*n)),E[5]=_*(n*c-o*p)-i*(s*c-T*p)+a*(s*o-T*n),E[6]=-(_*(l*c-t*p)-y*(s*c-T*p)+a*(s*t-T*l)),E[7]=_*(l*o-t*n)-y*(s*o-T*n)+i*(s*t-T*l),E[8]=y*(r*c-o*u)-i*(f*c-t*u)+a*(f*o-t*r),E[9]=-(_*(r*c-o*u)-i*(w*c-T*u)+a*(w*o-T*r)),E[10]=_*(f*c-t*u)-y*(w*c-T*u)+a*(w*t-T*f),E[11]=-(_*(f*o-t*r)-y*(w*o-T*r)+i*(w*t-T*f)),E[12]=-(y*(r*p-n*u)-i*(f*p-l*u)+a*(f*n-l*r)),E[13]=_*(r*p-n*u)-i*(w*p-s*u)+a*(w*n-s*r),E[14]=-(_*(f*p-l*u)-y*(w*p-s*u)+a*(w*l-s*f)),E[15]=_*(f*n-l*r)-y*(w*n-s*r)+i*(w*l-s*f),E}},42331:function(D){D.exports=function(E){var e=new Float32Array(16);return e[0]=E[0],e[1]=E[1],e[2]=E[2],e[3]=E[3],e[4]=E[4],e[5]=E[5],e[6]=E[6],e[7]=E[7],e[8]=E[8],e[9]=E[9],e[10]=E[10],e[11]=E[11],e[12]=E[12],e[13]=E[13],e[14]=E[14],e[15]=E[15],e}},31042:function(D){D.exports=function(E,e){return E[0]=e[0],E[1]=e[1],E[2]=e[2],E[3]=e[3],E[4]=e[4],E[5]=e[5],E[6]=e[6],E[7]=e[7],E[8]=e[8],E[9]=e[9],E[10]=e[10],E[11]=e[11],E[12]=e[12],E[13]=e[13],E[14]=e[14],E[15]=e[15],E}},11902:function(D){D.exports=function(){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}},89887:function(D){D.exports=function(E){var e=E[0],_=E[1],w=E[2],s=E[3],T=E[4],y=E[5],f=E[6],l=E[7],t=E[8],i=E[9],r=E[10],n=E[11],o=E[12],a=E[13],u=E[14],p=E[15];return(e*y-_*T)*(r*p-n*u)-(e*f-w*T)*(i*p-n*a)+(e*l-s*T)*(i*u-r*a)+(_*f-w*y)*(t*p-n*o)-(_*l-s*y)*(t*u-r*o)+(w*l-s*f)*(t*a-i*o)}},27812:function(D){D.exports=function(E,e){var _=e[0],w=e[1],s=e[2],T=e[3],y=_+_,f=w+w,l=s+s,t=_*y,i=w*y,r=w*f,n=s*y,o=s*f,a=s*l,u=T*y,p=T*f,c=T*l;return E[0]=1-r-a,E[1]=i+c,E[2]=n-p,E[3]=0,E[4]=i-c,E[5]=1-t-a,E[6]=o+u,E[7]=0,E[8]=n+p,E[9]=o-u,E[10]=1-t-r,E[11]=0,E[12]=0,E[13]=0,E[14]=0,E[15]=1,E}},34045:function(D){D.exports=function(E,e,_){var w,s,T,y=_[0],f=_[1],l=_[2],t=Math.sqrt(y*y+f*f+l*l);return Math.abs(t)<1e-6?null:(y*=t=1/t,f*=t,l*=t,w=Math.sin(e),T=1-(s=Math.cos(e)),E[0]=y*y*T+s,E[1]=f*y*T+l*w,E[2]=l*y*T-f*w,E[3]=0,E[4]=y*f*T-l*w,E[5]=f*f*T+s,E[6]=l*f*T+y*w,E[7]=0,E[8]=y*l*T+f*w,E[9]=f*l*T-y*w,E[10]=l*l*T+s,E[11]=0,E[12]=0,E[13]=0,E[14]=0,E[15]=1,E)}},45973:function(D){D.exports=function(E,e,_){var w=e[0],s=e[1],T=e[2],y=e[3],f=w+w,l=s+s,t=T+T,i=w*f,r=w*l,n=w*t,o=s*l,a=s*t,u=T*t,p=y*f,c=y*l,b=y*t;return E[0]=1-(o+u),E[1]=r+b,E[2]=n-c,E[3]=0,E[4]=r-b,E[5]=1-(i+u),E[6]=a+p,E[7]=0,E[8]=n+c,E[9]=a-p,E[10]=1-(i+o),E[11]=0,E[12]=_[0],E[13]=_[1],E[14]=_[2],E[15]=1,E}},81472:function(D){D.exports=function(E,e){return E[0]=e[0],E[1]=0,E[2]=0,E[3]=0,E[4]=0,E[5]=e[1],E[6]=0,E[7]=0,E[8]=0,E[9]=0,E[10]=e[2],E[11]=0,E[12]=0,E[13]=0,E[14]=0,E[15]=1,E}},14669:function(D){D.exports=function(E,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]=e[0],E[13]=e[1],E[14]=e[2],E[15]=1,E}},75262:function(D){D.exports=function(E,e){var _=Math.sin(e),w=Math.cos(e);return E[0]=1,E[1]=0,E[2]=0,E[3]=0,E[4]=0,E[5]=w,E[6]=_,E[7]=0,E[8]=0,E[9]=-_,E[10]=w,E[11]=0,E[12]=0,E[13]=0,E[14]=0,E[15]=1,E}},331:function(D){D.exports=function(E,e){var _=Math.sin(e),w=Math.cos(e);return E[0]=w,E[1]=0,E[2]=-_,E[3]=0,E[4]=0,E[5]=1,E[6]=0,E[7]=0,E[8]=_,E[9]=0,E[10]=w,E[11]=0,E[12]=0,E[13]=0,E[14]=0,E[15]=1,E}},11049:function(D){D.exports=function(E,e){var _=Math.sin(e),w=Math.cos(e);return E[0]=w,E[1]=_,E[2]=0,E[3]=0,E[4]=-_,E[5]=w,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}},75195:function(D){D.exports=function(E,e,_,w,s,T,y){var f=1/(_-e),l=1/(s-w),t=1/(T-y);return E[0]=2*T*f,E[1]=0,E[2]=0,E[3]=0,E[4]=0,E[5]=2*T*l,E[6]=0,E[7]=0,E[8]=(_+e)*f,E[9]=(s+w)*l,E[10]=(y+T)*t,E[11]=-1,E[12]=0,E[13]=0,E[14]=y*T*2*t,E[15]=0,E}},71551:function(D){D.exports=function(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}},79576:function(D,E,e){D.exports={create:e(11902),clone:e(42331),copy:e(31042),identity:e(71551),transpose:e(88654),invert:e(95874),adjoint:e(85400),determinant:e(89887),multiply:e(91362),translate:e(31283),scale:e(10789),rotate:e(65074),rotateX:e(35545),rotateY:e(94918),rotateZ:e(15692),fromRotation:e(34045),fromRotationTranslation:e(45973),fromScaling:e(81472),fromTranslation:e(14669),fromXRotation:e(75262),fromYRotation:e(331),fromZRotation:e(11049),fromQuat:e(27812),frustum:e(75195),perspective:e(7864),perspectiveFromFieldOfView:e(35279),ortho:e(60378),lookAt:e(65551),str:e(6726)}},95874:function(D){D.exports=function(E,e){var _=e[0],w=e[1],s=e[2],T=e[3],y=e[4],f=e[5],l=e[6],t=e[7],i=e[8],r=e[9],n=e[10],o=e[11],a=e[12],u=e[13],p=e[14],c=e[15],b=_*f-w*y,d=_*l-s*y,v=_*t-T*y,x=w*l-s*f,g=w*t-T*f,m=s*t-T*l,k=i*u-r*a,h=i*p-n*a,M=i*c-o*a,A=r*p-n*u,C=r*c-o*u,L=n*c-o*p,O=b*L-d*C+v*A+x*M-g*h+m*k;return O?(O=1/O,E[0]=(f*L-l*C+t*A)*O,E[1]=(s*C-w*L-T*A)*O,E[2]=(u*m-p*g+c*x)*O,E[3]=(n*g-r*m-o*x)*O,E[4]=(l*M-y*L-t*h)*O,E[5]=(_*L-s*M+T*h)*O,E[6]=(p*v-a*m-c*d)*O,E[7]=(i*m-n*v+o*d)*O,E[8]=(y*C-f*M+t*k)*O,E[9]=(w*M-_*C-T*k)*O,E[10]=(a*g-u*v+c*b)*O,E[11]=(r*v-i*g-o*b)*O,E[12]=(f*h-y*A-l*k)*O,E[13]=(_*A-w*h+s*k)*O,E[14]=(u*d-a*x-p*b)*O,E[15]=(i*x-r*d+n*b)*O,E):null}},65551:function(D,E,e){var _=e(71551);D.exports=function(w,s,T,y){var f,l,t,i,r,n,o,a,u,p,c=s[0],b=s[1],d=s[2],v=y[0],x=y[1],g=y[2],m=T[0],k=T[1],h=T[2];return Math.abs(c-m)<1e-6&&Math.abs(b-k)<1e-6&&Math.abs(d-h)<1e-6?_(w):(o=c-m,a=b-k,u=d-h,f=x*(u*=p=1/Math.sqrt(o*o+a*a+u*u))-g*(a*=p),l=g*(o*=p)-v*u,t=v*a-x*o,(p=Math.sqrt(f*f+l*l+t*t))?(f*=p=1/p,l*=p,t*=p):(f=0,l=0,t=0),i=a*t-u*l,r=u*f-o*t,n=o*l-a*f,(p=Math.sqrt(i*i+r*r+n*n))?(i*=p=1/p,r*=p,n*=p):(i=0,r=0,n=0),w[0]=f,w[1]=i,w[2]=o,w[3]=0,w[4]=l,w[5]=r,w[6]=a,w[7]=0,w[8]=t,w[9]=n,w[10]=u,w[11]=0,w[12]=-(f*c+l*b+t*d),w[13]=-(i*c+r*b+n*d),w[14]=-(o*c+a*b+u*d),w[15]=1,w)}},91362:function(D){D.exports=function(E,e,_){var w=e[0],s=e[1],T=e[2],y=e[3],f=e[4],l=e[5],t=e[6],i=e[7],r=e[8],n=e[9],o=e[10],a=e[11],u=e[12],p=e[13],c=e[14],b=e[15],d=_[0],v=_[1],x=_[2],g=_[3];return E[0]=d*w+v*f+x*r+g*u,E[1]=d*s+v*l+x*n+g*p,E[2]=d*T+v*t+x*o+g*c,E[3]=d*y+v*i+x*a+g*b,d=_[4],v=_[5],x=_[6],g=_[7],E[4]=d*w+v*f+x*r+g*u,E[5]=d*s+v*l+x*n+g*p,E[6]=d*T+v*t+x*o+g*c,E[7]=d*y+v*i+x*a+g*b,d=_[8],v=_[9],x=_[10],g=_[11],E[8]=d*w+v*f+x*r+g*u,E[9]=d*s+v*l+x*n+g*p,E[10]=d*T+v*t+x*o+g*c,E[11]=d*y+v*i+x*a+g*b,d=_[12],v=_[13],x=_[14],g=_[15],E[12]=d*w+v*f+x*r+g*u,E[13]=d*s+v*l+x*n+g*p,E[14]=d*T+v*t+x*o+g*c,E[15]=d*y+v*i+x*a+g*b,E}},60378:function(D){D.exports=function(E,e,_,w,s,T,y){var f=1/(e-_),l=1/(w-s),t=1/(T-y);return E[0]=-2*f,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*t,E[11]=0,E[12]=(e+_)*f,E[13]=(s+w)*l,E[14]=(y+T)*t,E[15]=1,E}},7864:function(D){D.exports=function(E,e,_,w,s){var T=1/Math.tan(e/2),y=1/(w-s);return E[0]=T/_,E[1]=0,E[2]=0,E[3]=0,E[4]=0,E[5]=T,E[6]=0,E[7]=0,E[8]=0,E[9]=0,E[10]=(s+w)*y,E[11]=-1,E[12]=0,E[13]=0,E[14]=2*s*w*y,E[15]=0,E}},35279:function(D){D.exports=function(E,e,_,w){var s=Math.tan(e.upDegrees*Math.PI/180),T=Math.tan(e.downDegrees*Math.PI/180),y=Math.tan(e.leftDegrees*Math.PI/180),f=Math.tan(e.rightDegrees*Math.PI/180),l=2/(y+f),t=2/(s+T);return E[0]=l,E[1]=0,E[2]=0,E[3]=0,E[4]=0,E[5]=t,E[6]=0,E[7]=0,E[8]=-(y-f)*l*.5,E[9]=(s-T)*t*.5,E[10]=w/(_-w),E[11]=-1,E[12]=0,E[13]=0,E[14]=w*_/(_-w),E[15]=0,E}},65074:function(D){D.exports=function(E,e,_,w){var s,T,y,f,l,t,i,r,n,o,a,u,p,c,b,d,v,x,g,m,k,h,M,A,C=w[0],L=w[1],O=w[2],I=Math.sqrt(C*C+L*L+O*O);return Math.abs(I)<1e-6?null:(C*=I=1/I,L*=I,O*=I,s=Math.sin(_),y=1-(T=Math.cos(_)),f=e[0],l=e[1],t=e[2],i=e[3],r=e[4],n=e[5],o=e[6],a=e[7],u=e[8],p=e[9],c=e[10],b=e[11],d=C*C*y+T,v=L*C*y+O*s,x=O*C*y-L*s,g=C*L*y-O*s,m=L*L*y+T,k=O*L*y+C*s,h=C*O*y+L*s,M=L*O*y-C*s,A=O*O*y+T,E[0]=f*d+r*v+u*x,E[1]=l*d+n*v+p*x,E[2]=t*d+o*v+c*x,E[3]=i*d+a*v+b*x,E[4]=f*g+r*m+u*k,E[5]=l*g+n*m+p*k,E[6]=t*g+o*m+c*k,E[7]=i*g+a*m+b*k,E[8]=f*h+r*M+u*A,E[9]=l*h+n*M+p*A,E[10]=t*h+o*M+c*A,E[11]=i*h+a*M+b*A,e!==E&&(E[12]=e[12],E[13]=e[13],E[14]=e[14],E[15]=e[15]),E)}},35545:function(D){D.exports=function(E,e,_){var w=Math.sin(_),s=Math.cos(_),T=e[4],y=e[5],f=e[6],l=e[7],t=e[8],i=e[9],r=e[10],n=e[11];return e!==E&&(E[0]=e[0],E[1]=e[1],E[2]=e[2],E[3]=e[3],E[12]=e[12],E[13]=e[13],E[14]=e[14],E[15]=e[15]),E[4]=T*s+t*w,E[5]=y*s+i*w,E[6]=f*s+r*w,E[7]=l*s+n*w,E[8]=t*s-T*w,E[9]=i*s-y*w,E[10]=r*s-f*w,E[11]=n*s-l*w,E}},94918:function(D){D.exports=function(E,e,_){var w=Math.sin(_),s=Math.cos(_),T=e[0],y=e[1],f=e[2],l=e[3],t=e[8],i=e[9],r=e[10],n=e[11];return e!==E&&(E[4]=e[4],E[5]=e[5],E[6]=e[6],E[7]=e[7],E[12]=e[12],E[13]=e[13],E[14]=e[14],E[15]=e[15]),E[0]=T*s-t*w,E[1]=y*s-i*w,E[2]=f*s-r*w,E[3]=l*s-n*w,E[8]=T*w+t*s,E[9]=y*w+i*s,E[10]=f*w+r*s,E[11]=l*w+n*s,E}},15692:function(D){D.exports=function(E,e,_){var w=Math.sin(_),s=Math.cos(_),T=e[0],y=e[1],f=e[2],l=e[3],t=e[4],i=e[5],r=e[6],n=e[7];return e!==E&&(E[8]=e[8],E[9]=e[9],E[10]=e[10],E[11]=e[11],E[12]=e[12],E[13]=e[13],E[14]=e[14],E[15]=e[15]),E[0]=T*s+t*w,E[1]=y*s+i*w,E[2]=f*s+r*w,E[3]=l*s+n*w,E[4]=t*s-T*w,E[5]=i*s-y*w,E[6]=r*s-f*w,E[7]=n*s-l*w,E}},10789:function(D){D.exports=function(E,e,_){var w=_[0],s=_[1],T=_[2];return E[0]=e[0]*w,E[1]=e[1]*w,E[2]=e[2]*w,E[3]=e[3]*w,E[4]=e[4]*s,E[5]=e[5]*s,E[6]=e[6]*s,E[7]=e[7]*s,E[8]=e[8]*T,E[9]=e[9]*T,E[10]=e[10]*T,E[11]=e[11]*T,E[12]=e[12],E[13]=e[13],E[14]=e[14],E[15]=e[15],E}},6726:function(D){D.exports=function(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]+")"}},31283:function(D){D.exports=function(E,e,_){var w,s,T,y,f,l,t,i,r,n,o,a,u=_[0],p=_[1],c=_[2];return e===E?(E[12]=e[0]*u+e[4]*p+e[8]*c+e[12],E[13]=e[1]*u+e[5]*p+e[9]*c+e[13],E[14]=e[2]*u+e[6]*p+e[10]*c+e[14],E[15]=e[3]*u+e[7]*p+e[11]*c+e[15]):(w=e[0],s=e[1],T=e[2],y=e[3],f=e[4],l=e[5],t=e[6],i=e[7],r=e[8],n=e[9],o=e[10],a=e[11],E[0]=w,E[1]=s,E[2]=T,E[3]=y,E[4]=f,E[5]=l,E[6]=t,E[7]=i,E[8]=r,E[9]=n,E[10]=o,E[11]=a,E[12]=w*u+f*p+r*c+e[12],E[13]=s*u+l*p+n*c+e[13],E[14]=T*u+t*p+o*c+e[14],E[15]=y*u+i*p+a*c+e[15]),E}},88654:function(D){D.exports=function(E,e){if(E===e){var _=e[1],w=e[2],s=e[3],T=e[6],y=e[7],f=e[11];E[1]=e[4],E[2]=e[8],E[3]=e[12],E[4]=_,E[6]=e[9],E[7]=e[13],E[8]=w,E[9]=T,E[11]=e[14],E[12]=s,E[13]=y,E[14]=f}else E[0]=e[0],E[1]=e[4],E[2]=e[8],E[3]=e[12],E[4]=e[1],E[5]=e[5],E[6]=e[9],E[7]=e[13],E[8]=e[2],E[9]=e[6],E[10]=e[10],E[11]=e[14],E[12]=e[3],E[13]=e[7],E[14]=e[11],E[15]=e[15];return E}},42505:function(D,E,e){var _=e(72791),w=e(71299),s=e(98580),T=e(12018),y=e(83522),f=e(25075),l=e(68016),t=e(58404),i=e(18863),r=e(10973),n=e(25677),o=e(75686),a=e(53545),u=e(56131),p=e(32879),c=e(30120),b=e(13547).nextPow2,d=new y,v=!1;if(document.body){var x=document.body.appendChild(document.createElement("div"));x.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(x).fontStretch&&(v=!0),document.body.removeChild(x)}var g=function(m){(function(k){return typeof k=="function"&&k._gl&&k.prop&&k.texture&&k.buffer})(m)?(m={regl:m},this.gl=m.regl._gl):this.gl=T(m),this.shader=d.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=m.regl||s({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),d.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(r(m)?m:{})};g.prototype.createShader=function(){var m=this.regl,k=m({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:m.prop("count"),offset:m.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:m.this("sizeBuffer")},width:{offset:0,stride:8,buffer:m.this("sizeBuffer")},char:m.this("charBuffer"),position:m.this("position")},uniforms:{atlasSize:function(h,M){return[M.atlas.width,M.atlas.height]},atlasDim:function(h,M){return[M.atlas.cols,M.atlas.rows]},atlas:function(h,M){return M.atlas.texture},charStep:function(h,M){return M.atlas.step},em:function(h,M){return M.atlas.em},color:m.prop("color"),opacity:m.prop("opacity"),viewport:m.this("viewportArray"),scale:m.this("scale"),align:m.prop("align"),baseline:m.prop("baseline"),translate:m.this("translate"),positionOffset:m.prop("positionOffset")},primitive:"points",viewport:m.this("viewport"),vert:` +`):H=" ".concat(I," ").concat(H)),L=T(this,r(h).call(this,"".concat(V).concat(H)))}return Error.stackTraceLimit=G,L.generatedMessage=!O,Object.defineProperty(m(L),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),L.code="ERR_ASSERTION",L.actual=U,L.expected=B,L.operator=I,Error.captureStackTrace&&Error.captureStackTrace(m(L),R),L.stack,L.name="AssertionError",T(L)}var M,A;return function(C,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function");C.prototype=Object.create(L&&L.prototype,{constructor:{value:C,writable:!0,configurable:!0}}),L&&i(C,L)}(h,k),M=h,A=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:o.custom,value:function(C,L){return o(this,function(O){for(var I=1;I2?"one of ".concat(r," ").concat(i.slice(0,n-1).join(", "),", or ")+i[n-1]:n===2?"one of ".concat(r," ").concat(i[0]," or ").concat(i[1]):"of ".concat(r," ").concat(i[0])}return"of ".concat(r," ").concat(String(i))}l("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),l("ERR_INVALID_ARG_TYPE",function(i,r,n){var o,a,u,p,c;if(T===void 0&&(T=e(32791)),T(typeof i=="string","'name' must be a string"),typeof r=="string"&&(a="not ",r.substr(0,a.length)===a)?(o="must not be",r=r.replace(/^not /,"")):o="must be",function(d,v,x){return(x===void 0||x>d.length)&&(x=d.length),d.substring(x-v.length,x)===v}(i," argument"))u="The ".concat(i," ").concat(o," ").concat(t(r,"type"));else{var b=(typeof c!="number"&&(c=0),c+1>(p=i).length||p.indexOf(".",c)===-1?"argument":"property");u='The "'.concat(i,'" ').concat(b," ").concat(o," ").concat(t(r,"type"))}return u+". Received type ".concat(_(n))},TypeError),l("ERR_INVALID_ARG_VALUE",function(i,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";m===void 0&&(m=e(43827));var o=m.inspect(r);return o.length>128&&(o="".concat(o.slice(0,128),"...")),"The argument '".concat(i,"' ").concat(n,". Received ").concat(o)},TypeError),l("ERR_INVALID_RETURN_VALUE",function(i,r,n){var o;return o=n&&n.constructor&&n.constructor.name?"instance of ".concat(n.constructor.name):"type ".concat(_(n)),"Expected ".concat(i,' to be returned from the "').concat(r,'"')+" function but got ".concat(o,".")},TypeError),l("ERR_MISSING_ARGS",function(){for(var i=arguments.length,r=new Array(i),n=0;n0,"At least one arg needs to be specified");var o="The ",a=r.length;switch(r=r.map(function(u){return'"'.concat(u,'"')}),a){case 1:o+="".concat(r[0]," argument");break;case 2:o+="".concat(r[0]," and ").concat(r[1]," arguments");break;default:o+=r.slice(0,a-1).join(", "),o+=", and ".concat(r[a-1]," arguments")}return"".concat(o," must be specified")},TypeError),D.exports.codes=f},74061:function(D,E,e){function _(Y,X){return function(K){if(Array.isArray(K))return K}(Y)||function(K,te){var ae=[],oe=!0,se=!1,fe=void 0;try{for(var xe,he=K[Symbol.iterator]();!(oe=(xe=he.next()).done)&&(ae.push(xe.value),!te||ae.length!==te);oe=!0);}catch(de){se=!0,fe=de}finally{try{oe||he.return==null||he.return()}finally{if(se)throw fe}}return ae}(Y,X)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function w(Y){return w=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(X){return typeof X}:function(X){return X&&typeof Symbol=="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":typeof X},w(Y)}var s=/a/g.flags!==void 0,T=function(Y){var X=[];return Y.forEach(function(K){return X.push(K)}),X},m=function(Y){var X=[];return Y.forEach(function(K,te){return X.push([te,K])}),X},f=Object.is?Object.is:e(64003),l=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},t=Number.isNaN?Number.isNaN:e(15567);function i(Y){return Y.call.bind(Y)}var r=i(Object.prototype.hasOwnProperty),n=i(Object.prototype.propertyIsEnumerable),o=i(Object.prototype.toString),a=e(43827).types,u=a.isAnyArrayBuffer,p=a.isArrayBufferView,c=a.isDate,b=a.isMap,d=a.isRegExp,v=a.isSet,x=a.isNativeError,g=a.isBoxedPrimitive,y=a.isNumberObject,k=a.isStringObject,h=a.isBooleanObject,M=a.isBigIntObject,A=a.isSymbolObject,C=a.isFloat32Array,L=a.isFloat64Array;function O(Y){if(Y.length===0||Y.length>10)return!0;for(var X=0;X57)return!0}return Y.length===10&&Y>=Math.pow(2,32)}function I(Y){return Object.keys(Y).filter(O).concat(l(Y).filter(Object.prototype.propertyIsEnumerable.bind(Y)))}function R(Y,X){if(Y===X)return 0;for(var K=Y.length,te=X.length,ae=0,oe=Math.min(K,te);ae0?o-4:o;for(r=0;r>16&255,u[p++]=i>>8&255,u[p++]=255&i;return a===2&&(i=_[t.charCodeAt(r)]<<2|_[t.charCodeAt(r+1)]>>4,u[p++]=255&i),a===1&&(i=_[t.charCodeAt(r)]<<10|_[t.charCodeAt(r+1)]<<4|_[t.charCodeAt(r+2)]>>2,u[p++]=i>>8&255,u[p++]=255&i),u},E.fromByteArray=function(t){for(var i,r=t.length,n=r%3,o=[],a=16383,u=0,p=r-n;up?p:u+a));return n===1?(i=t[r-1],o.push(e[i>>2]+e[i<<4&63]+"==")):n===2&&(i=(t[r-2]<<8)+t[r-1],o.push(e[i>>10]+e[i>>4&63]+e[i<<2&63]+"=")),o.join("")};for(var e=[],_=[],w=typeof Uint8Array<"u"?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T=0,m=s.length;T0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return r===-1&&(r=i),[r,r===i?0:4-r%4]}function l(t,i,r){for(var n,o,a=[],u=i;u>18&63]+e[o>>12&63]+e[o>>6&63]+e[63&o]);return a.join("")}_["-".charCodeAt(0)]=62,_["_".charCodeAt(0)]=63},91358:function(D){function E(m,f,l,t,i){for(var r=i+1;t<=i;){var n=t+i>>>1,o=m[n];(l!==void 0?l(o,f):o-f)>=0?(r=n,i=n-1):t=n+1}return r}function e(m,f,l,t,i){for(var r=i+1;t<=i;){var n=t+i>>>1,o=m[n];(l!==void 0?l(o,f):o-f)>0?(r=n,i=n-1):t=n+1}return r}function _(m,f,l,t,i){for(var r=t-1;t<=i;){var n=t+i>>>1,o=m[n];(l!==void 0?l(o,f):o-f)<0?(r=n,t=n+1):i=n-1}return r}function w(m,f,l,t,i){for(var r=t-1;t<=i;){var n=t+i>>>1,o=m[n];(l!==void 0?l(o,f):o-f)<=0?(r=n,t=n+1):i=n-1}return r}function s(m,f,l,t,i){for(;t<=i;){var r=t+i>>>1,n=m[r],o=l!==void 0?l(n,f):n-f;if(o===0)return r;o<=0?t=r+1:i=r-1}return-1}function T(m,f,l,t,i,r){return typeof l=="function"?r(m,f,l,t===void 0?0:0|t,i===void 0?m.length-1:0|i):r(m,f,void 0,l===void 0?0:0|l,t===void 0?m.length-1:0|t)}D.exports={ge:function(m,f,l,t,i){return T(m,f,l,t,i,E)},gt:function(m,f,l,t,i){return T(m,f,l,t,i,e)},lt:function(m,f,l,t,i){return T(m,f,l,t,i,_)},le:function(m,f,l,t,i){return T(m,f,l,t,i,w)},eq:function(m,f,l,t,i){return T(m,f,l,t,i,s)}}},13547:function(D,E){function e(w){var s=32;return(w&=-w)&&s--,65535&w&&(s-=16),16711935&w&&(s-=8),252645135&w&&(s-=4),858993459&w&&(s-=2),1431655765&w&&(s-=1),s}E.INT_BITS=32,E.INT_MAX=2147483647,E.INT_MIN=-2147483648,E.sign=function(w){return(w>0)-(w<0)},E.abs=function(w){var s=w>>31;return(w^s)-s},E.min=function(w,s){return s^(w^s)&-(w65535)<<4,s|=T=((w>>>=s)>255)<<3,s|=T=((w>>>=T)>15)<<2,(s|=T=((w>>>=T)>3)<<1)|(w>>>=T)>>1},E.log10=function(w){return w>=1e9?9:w>=1e8?8:w>=1e7?7:w>=1e6?6:w>=1e5?5:w>=1e4?4:w>=1e3?3:w>=100?2:w>=10?1:0},E.popCount=function(w){return 16843009*((w=(858993459&(w-=w>>>1&1431655765))+(w>>>2&858993459))+(w>>>4)&252645135)>>>24},E.countTrailingZeros=e,E.nextPow2=function(w){return w+=w===0,--w,w|=w>>>1,w|=w>>>2,w|=w>>>4,w|=w>>>8,1+(w|=w>>>16)},E.prevPow2=function(w){return w|=w>>>1,w|=w>>>2,w|=w>>>4,w|=w>>>8,(w|=w>>>16)-(w>>>1)},E.parity=function(w){return w^=w>>>16,w^=w>>>8,w^=w>>>4,27030>>>(w&=15)&1};var _=new Array(256);(function(w){for(var s=0;s<256;++s){var T=s,m=s,f=7;for(T>>>=1;T;T>>>=1)m<<=1,m|=1&T,--f;w[s]=m<>>8&255]<<16|_[w>>>16&255]<<8|_[w>>>24&255]},E.interleave2=function(w,s){return(w=1431655765&((w=858993459&((w=252645135&((w=16711935&((w&=65535)|w<<8))|w<<4))|w<<2))|w<<1))|(s=1431655765&((s=858993459&((s=252645135&((s=16711935&((s&=65535)|s<<8))|s<<4))|s<<2))|s<<1))<<1},E.deinterleave2=function(w,s){return(w=65535&((w=16711935&((w=252645135&((w=858993459&((w=w>>>s&1431655765)|w>>>1))|w>>>2))|w>>>4))|w>>>16))<<16>>16},E.interleave3=function(w,s,T){return w=1227133513&((w=3272356035&((w=251719695&((w=4278190335&((w&=1023)|w<<16))|w<<8))|w<<4))|w<<2),(w|=(s=1227133513&((s=3272356035&((s=251719695&((s=4278190335&((s&=1023)|s<<16))|s<<8))|s<<4))|s<<2))<<1)|(T=1227133513&((T=3272356035&((T=251719695&((T=4278190335&((T&=1023)|T<<16))|T<<8))|T<<4))|T<<2))<<2},E.deinterleave3=function(w,s){return(w=1023&((w=4278190335&((w=251719695&((w=3272356035&((w=w>>>s&1227133513)|w>>>2))|w>>>4))|w>>>8))|w>>>16))<<22>>22},E.nextCombination=function(w){var s=w|w-1;return s+1|(~s&-~s)-1>>>e(w)+1}},44781:function(D,E,e){var _=e(53435);D.exports=function(m,f){f||(f={});var l,t,i,r,n,o,a,u,p,c,b,d=f.cutoff==null?.25:f.cutoff,v=f.radius==null?8:f.radius,x=f.channel||0;if(ArrayBuffer.isView(m)||Array.isArray(m)){if(!f.width||!f.height)throw Error("For raw data width and height should be provided by options");l=f.width,t=f.height,r=m,o=f.stride?f.stride:Math.floor(m.length/l/t)}else window.HTMLCanvasElement&&m instanceof window.HTMLCanvasElement?(a=(u=m).getContext("2d"),l=u.width,t=u.height,r=(p=a.getImageData(0,0,l,t)).data,o=4):window.CanvasRenderingContext2D&&m instanceof window.CanvasRenderingContext2D?(a=m,l=(u=m.canvas).width,t=u.height,r=(p=a.getImageData(0,0,l,t)).data,o=4):window.ImageData&&m instanceof window.ImageData&&(p=m,l=m.width,t=m.height,r=p.data,o=4);if(i=Math.max(l,t),window.Uint8ClampedArray&&r instanceof window.Uint8ClampedArray||window.Uint8Array&&r instanceof window.Uint8Array)for(n=r,r=Array(l*t),c=0,b=n.length;c-1?w(f):f}},68222:function(D,E,e){var _=e(77575),w=e(68318),s=w("%Function.prototype.apply%"),T=w("%Function.prototype.call%"),m=w("%Reflect.apply%",!0)||_.call(T,s),f=w("%Object.getOwnPropertyDescriptor%",!0),l=w("%Object.defineProperty%",!0),t=w("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}D.exports=function(r){var n=m(_,T,arguments);if(f&&l){var o=f(n,"length");o.configurable&&l(n,"length",{value:1+t(0,r.length-(arguments.length-1))})}return n};var i=function(){return m(_,s,arguments)};l?l(D.exports,"apply",{value:i}):D.exports.apply=i},53435:function(D){D.exports=function(E,e,_){return e<_?E_?_:E:E<_?_:E>e?e:E}},6475:function(D,E,e){var _=e(53435);function w(s,T){T==null&&(T=!0);var m=s[0],f=s[1],l=s[2],t=s[3];return t==null&&(t=T?1:255),T&&(m*=255,f*=255,l*=255,t*=255),16777216*(m=255&_(m,0,255))+((f=255&_(f,0,255))<<16)+((l=255&_(l,0,255))<<8)+(255&_(t,0,255))}D.exports=w,D.exports.to=w,D.exports.from=function(s,T){var m=(s=+s)>>>24,f=(16711680&s)>>>16,l=(65280&s)>>>8,t=255&s;return T===!1?[m,f,l,t]:[m/255,f/255,l/255,t/255]}},76857:function(D){D.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]}},25075:function(D,E,e){var _=e(36652),w=e(53435),s=e(90660);D.exports=function(T,m){m!=="float"&&m||(m="array"),m==="uint"&&(m="uint8"),m==="uint_clamped"&&(m="uint8_clamped");var f=new(s(m))(4),l=m!=="uint8"&&m!=="uint8_clamped";return T.length&&typeof T!="string"||((T=_(T))[0]/=255,T[1]/=255,T[2]/=255),function(t){return t instanceof Uint8Array||t instanceof Uint8ClampedArray||!!(Array.isArray(t)&&(t[0]>1||t[0]===0)&&(t[1]>1||t[1]===0)&&(t[2]>1||t[2]===0)&&(!t[3]||t[3]>1))}(T)?(f[0]=T[0],f[1]=T[1],f[2]=T[2],f[3]=T[3]!=null?T[3]:255,l&&(f[0]/=255,f[1]/=255,f[2]/=255,f[3]/=255),f):(l?(f[0]=T[0],f[1]=T[1],f[2]=T[2],f[3]=T[3]!=null?T[3]:1):(f[0]=w(Math.floor(255*T[0]),0,255),f[1]=w(Math.floor(255*T[1]),0,255),f[2]=w(Math.floor(255*T[2]),0,255),f[3]=T[3]==null?255:w(Math.floor(255*T[3]),0,255)),f)}},90736:function(D,E,e){var _=e(76857),w=e(10973),s=e(46775);D.exports=function(m){var f,l,t=[],i=1;if(typeof m=="string")if(_[m])t=_[m].slice(),l="rgb";else if(m==="transparent")i=0,l="rgb",t=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(m)){var r=(a=m.slice(1)).length;i=1,r<=4?(t=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],r===4&&(i=parseInt(a[3]+a[3],16)/255)):(t=[parseInt(a[0]+a[1],16),parseInt(a[2]+a[3],16),parseInt(a[4]+a[5],16)],r===8&&(i=parseInt(a[6]+a[7],16)/255)),t[0]||(t[0]=0),t[1]||(t[1]=0),t[2]||(t[2]=0),l="rgb"}else if(f=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(m)){var n=f[1],o=n==="rgb",a=n.replace(/a$/,"");l=a,r=a==="cmyk"?4:a==="gray"?1:3,t=f[2].trim().split(/\s*,\s*/).map(function(p,c){if(/%$/.test(p))return c===r?parseFloat(p)/100:a==="rgb"?255*parseFloat(p)/100:parseFloat(p);if(a[c]==="h"){if(/deg$/.test(p))return parseFloat(p);if(T[p]!==void 0)return T[p]}return parseFloat(p)}),n===a&&t.push(1),i=o||t[r]===void 0?1:t[r],t=t.slice(0,r)}else m.length>10&&/[0-9](?:\s|\/)/.test(m)&&(t=m.match(/([0-9]+)/g).map(function(p){return parseFloat(p)}),l=m.match(/([a-z])/gi).join("").toLowerCase());else if(isNaN(m))if(w(m)){var u=s(m.r,m.red,m.R,null);u!==null?(l="rgb",t=[u,s(m.g,m.green,m.G),s(m.b,m.blue,m.B)]):(l="hsl",t=[s(m.h,m.hue,m.H),s(m.s,m.saturation,m.S),s(m.l,m.lightness,m.L,m.b,m.brightness)]),i=s(m.a,m.alpha,m.opacity,1),m.opacity!=null&&(i/=100)}else(Array.isArray(m)||e.g.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(m))&&(t=[m[0],m[1],m[2]],l="rgb",i=m.length===4?m[3]:1);else l="rgb",t=[m>>>16,(65280&m)>>>8,255&m];return{space:l,values:t,alpha:i}};var T={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}},36652:function(D,E,e){var _=e(90736),w=e(80009),s=e(53435);D.exports=function(T){var m,f=_(T);return f.space?((m=Array(3))[0]=s(f.values[0],0,255),m[1]=s(f.values[1],0,255),m[2]=s(f.values[2],0,255),f.space[0]==="h"&&(m=w.rgb(m)),m.push(s(f.alpha,0,1)),m):[]}},80009:function(D,E,e){var _=e(6866);D.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(w){var s,T,m,f,l,t=w[0]/360,i=w[1]/100,r=w[2]/100;if(i===0)return[l=255*r,l,l];s=2*r-(T=r<.5?r*(1+i):r+i-r*i),f=[0,0,0];for(var n=0;n<3;n++)(m=t+.3333333333333333*-(n-1))<0?m++:m>1&&m--,l=6*m<1?s+6*(T-s)*m:2*m<1?T:3*m<2?s+(T-s)*(.6666666666666666-m)*6:s,f[n]=255*l;return f}},_.hsl=function(w){var s,T,m=w[0]/255,f=w[1]/255,l=w[2]/255,t=Math.min(m,f,l),i=Math.max(m,f,l),r=i-t;return i===t?s=0:m===i?s=(f-l)/r:f===i?s=2+(l-m)/r:l===i&&(s=4+(m-f)/r),(s=Math.min(60*s,360))<0&&(s+=360),T=(t+i)/2,[s,100*(i===t?0:T<=.5?r/(i+t):r/(2-i-t)),100*T]}},6866:function(D){D.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},24138:function(D){D.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|ç)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|é)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|é)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|ã)o.?tom(e|é)",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"}},72791:function(D,E,e){D.exports={parse:e(41004),stringify:e(53313)}},63625:function(D,E,e){var _=e(40402);D.exports={isSize:function(w){return/^[\d\.]/.test(w)||w.indexOf("/")!==-1||_.indexOf(w)!==-1}}},41004:function(D,E,e){var _=e(90448),w=e(38732),s=e(41901),T=e(15659),m=e(96209),f=e(83794),l=e(99011),t=e(63625).isSize;D.exports=r;var i=r.cache={};function r(o){if(typeof o!="string")throw new Error("Font argument must be a string.");if(i[o])return i[o];if(o==="")throw new Error("Cannot parse an empty string.");if(s.indexOf(o)!==-1)return i[o]={system:o};for(var a,u={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},p=l(o,/\s+/);a=p.shift();){if(w.indexOf(a)!==-1)return["style","variant","weight","stretch"].forEach(function(b){u[b]=a}),i[o]=u;if(m.indexOf(a)===-1)if(a!=="normal"&&a!=="small-caps")if(f.indexOf(a)===-1){if(T.indexOf(a)===-1){if(t(a)){var c=l(a,"/");if(u.size=c[0],c[1]!=null?u.lineHeight=n(c[1]):p[0]==="/"&&(p.shift(),u.lineHeight=n(p.shift())),!p.length)throw new Error("Missing required font-family.");return u.family=l(p.join(" "),/\s*,\s*/).map(_),i[o]=u}throw new Error("Unknown or unsupported font token: "+a)}u.weight=a}else u.stretch=a;else u.variant=a;else u.style=a}throw new Error("Missing required font-size.")}function n(o){var a=parseFloat(o);return a.toString()===o?a:o}},53313:function(D,E,e){var _=e(71299),w=e(63625).isSize,s=o(e(38732)),T=o(e(41901)),m=o(e(15659)),f=o(e(96209)),l=o(e(83794)),t={normal:1,"small-caps":1},i={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},r="serif";function n(a,u){if(a&&!u[a]&&!s[a])throw Error("Unknown keyword `"+a+"`");return a}function o(a){for(var u={},p=0;po?1:n>=o?0:NaN}e.d(E,{j2:function(){return _},Fp:function(){return T},J6:function(){return f},TS:function(){return l},VV:function(){return t},w6:function(){return i},Sm:function(){return r}}),(w=_).length===1&&(s=w,w=function(n,o){return _(s(n),o)});var w,s;function T(n,o){var a,u,p=n.length,c=-1;if(o==null){for(;++c=a)for(u=a;++cu&&(u=a)}else for(;++c=a)for(u=a;++cu&&(u=a);return u}function m(n){return n===null?NaN:+n}function f(n,o){var a,u=n.length,p=u,c=-1,b=0;if(o==null)for(;++c=0;)for(o=(u=n[p]).length;--o>=0;)a[--b]=u[o];return a}function t(n,o){var a,u,p=n.length,c=-1;if(o==null){for(;++c=a)for(u=a;++ca&&(u=a)}else for(;++c=a)for(u=a;++ca&&(u=a);return u}function i(n,o,a){n=+n,o=+o,a=(p=arguments.length)<2?(o=n,n=0,1):p<3?1:+a;for(var u=-1,p=0|Math.max(0,Math.ceil((o-n)/a)),c=new Array(p);++u=p.length)return o!=null&&v.sort(o),a!=null?a(v):v;for(var k,h,M,A=-1,C=v.length,L=p[x++],O=T(),I=g();++Ap.length)return v;var g,y=c[x-1];return a!=null&&x>=p.length?g=v.entries():(g=[],v.each(function(k,h){g.push({key:h,values:d(k,x)})})),y!=null?g.sort(function(k,h){return y(k.key,h.key)}):g}return u={object:function(v){return b(v,0,f,l)},map:function(v){return b(v,0,t,i)},entries:function(v){return d(b(v,0,t,i),0)},key:function(v){return p.push(v),u},sortKeys:function(v){return c[p.length-1]=v,u},sortValues:function(v){return o=v,u},rollup:function(v){return a=v,u}}}function f(){return{}}function l(o,a,u){o[a]=u}function t(){return T()}function i(o,a,u){o.set(a,u)}function r(){}var n=T.prototype;r.prototype={constructor:r,has:n.has,add:function(o){return this[_+(o+="")]=o,this},remove:n.remove,clear:n.clear,values:n.keys,size:n.size,empty:n.empty,each:n.each}},49887:function(D,E,e){function _(de,pe){var ye;function Re(){var we,Ae,Me=ye.length,Ce=0,ne=0;for(we=0;we=(Ae=(je+be)/2))?je=Ae:be=Ae,(me=ye>=(Me=(ge+Se)/2))?ge=Me:Se=Me,we=Ue,!(Ue=Ue[Te=me<<1|ue]))return we[Te]=De,de;if(Ce=+de._x.call(null,Ue.data),ne=+de._y.call(null,Ue.data),pe===Ce&&ye===ne)return De.next=Ue,we?we[Te]=De:de._root=De,de;do we=we?we[Te]=new Array(4):de._root=new Array(4),(ue=pe>=(Ae=(je+be)/2))?je=Ae:be=Ae,(me=ye>=(Me=(ge+Se)/2))?ge=Me:Se=Me;while((Te=me<<1|ue)==(Ee=(ne>=Me)<<1|Ce>=Ae));return we[Ee]=Ue,we[Te]=De,de}function m(de,pe,ye,Re,we){this.node=de,this.x0=pe,this.y0=ye,this.x1=Re,this.y1=we}function f(de){return de[0]}function l(de){return de[1]}function t(de,pe,ye){var Re=new i(pe??f,ye??l,NaN,NaN,NaN,NaN);return de==null?Re:Re.addAll(de)}function i(de,pe,ye,Re,we,Ae){this._x=de,this._y=pe,this._x0=ye,this._y0=Re,this._x1=we,this._y1=Ae,this._root=void 0}function r(de){for(var pe={data:de.data},ye=pe;de=de.next;)ye=ye.next={data:de.data};return pe}e.r(E),e.d(E,{forceCenter:function(){return _},forceCollide:function(){return u},forceLink:function(){return d},forceManyBody:function(){return se},forceRadial:function(){return fe},forceSimulation:function(){return oe},forceX:function(){return xe},forceY:function(){return he}});var n=t.prototype=i.prototype;function o(de){return de.x+de.vx}function a(de){return de.y+de.vy}function u(de){var pe,ye,Re=1,we=1;function Ae(){for(var ne,ue,me,Te,Ee,Ue,De,je=pe.length,ge=0;geTe+yt||ZeEe+yt||stme.index){var Et=Te-ot.x-ot.vx,Tt=Ee-ot.y-ot.vy,xt=Et*Et+Tt*Tt;xtne.r&&(ne.r=ne[ue].r)}function Ce(){if(pe){var ne,ue,me=pe.length;for(ye=new Array(me),ne=0;neme&&(me=Re),weTe&&(Te=we));if(ne>me||ue>Te)return this;for(this.cover(ne,ue).cover(me,Te),ye=0;yede||de>=we||Re>pe||pe>=Ae;)switch(Ce=(peEe||(Ae=ne.y0)>Ue||(Me=ne.x1)=be)<<1|de>=ge)&&(ne=De[De.length-1],De[De.length-1]=De[De.length-1-ue],De[De.length-1-ue]=ne)}else{var Se=de-+this._x.call(null,je.data),Ne=pe-+this._y.call(null,je.data),Ye=Se*Se+Ne*Ne;if(Ye=(Ce=(De+ge)/2))?De=Ce:ge=Ce,(me=Me>=(ne=(je+be)/2))?je=ne:be=ne,pe=Ue,!(Ue=Ue[Te=me<<1|ue]))return this;if(!Ue.length)break;(pe[Te+1&3]||pe[Te+2&3]||pe[Te+3&3])&&(ye=pe,Ee=Te)}for(;Ue.data!==de;)if(Re=Ue,!(Ue=Ue.next))return this;return(we=Ue.next)&&delete Ue.next,Re?(we?Re.next=we:delete Re.next,this):pe?(we?pe[Te]=we:delete pe[Te],(Ue=pe[0]||pe[1]||pe[2]||pe[3])&&Ue===(pe[3]||pe[2]||pe[1]||pe[0])&&!Ue.length&&(ye?ye[Ee]=Ue:this._root=Ue),this):(this._root=we,this)},n.removeAll=function(de){for(var pe=0,ye=de.length;pe=0&&(Re=ye.slice(we+1),ye=ye.slice(0,we)),ye&&!pe.hasOwnProperty(ye))throw new Error("unknown type: "+ye);return{type:ye,name:Re}})}function k(de,pe){for(var ye,Re=0,we=de.length;Re0)for(var ye,Re,we=new Array(ye),Ae=0;Ae=0&&pe._call.call(null,de),pe=pe._next;--L})()}finally{L=0,function(){for(var de,pe,ye=M,Re=1/0;ye;)ye._call?(Re>ye._time&&(Re=ye._time),de=ye,ye=ye._next):(pe=ye._next,ye._next=null,ye=de?de._next=pe:M=pe);A=de,X(Re)}(),U=0}}function Y(){var de=G.now(),pe=de-R;pe>1e3&&(B-=pe,R=de)}function X(de){L||(O&&(O=clearTimeout(O)),de-U>24?(de<1/0&&(O=setTimeout(Q,de-G.now()-B)),I&&(I=clearInterval(I))):(I||(R=G.now(),I=setInterval(Y,1e3)),L=1,N(Q)))}function K(de){return de.x}function te(de){return de.y}H.prototype=ee.prototype={constructor:H,restart:function(de,pe,ye){if(typeof de!="function")throw new TypeError("callback is not a function");ye=(ye==null?j():+ye)+(pe==null?0:+pe),this._next||A===this||(A?A._next=this:M=this,A=this),this._call=de,this._time=ye,X()},stop:function(){this._call&&(this._call=null,this._time=1/0,X())}};var ae=Math.PI*(3-Math.sqrt(5));function oe(de){var pe,ye=1,Re=.001,we=1-Math.pow(Re,1/300),Ae=0,Me=.6,Ce=(0,p.UI)(),ne=ee(me),ue=C("tick","end");function me(){Te(),ue.call("tick",pe),ye1?(je==null?Ce.remove(De):Ce.set(De,Ue(je)),pe):Ce.get(De)},find:function(De,je,ge){var be,Se,Ne,Ye,Ze,st=0,ot=de.length;for(ge==null?ge=1/0:ge*=ge,st=0;st1?(ue.on(De,je),pe):ue.on(De)}}}function se(){var de,pe,ye,Re,we=w(-30),Ae=1,Me=1/0,Ce=.81;function ne(Ee){var Ue,De=de.length,je=t(de,K,te).visitAfter(me);for(ye=Ee,Ue=0;Ue=Me)){(Ee.data!==pe||Ee.next)&&(ge===0&&(Ne+=(ge=s())*ge),be===0&&(Ne+=(be=s())*be),Ne1?b[0]+b.slice(2):b,+u.slice(c+1)]}e.d(E,{WU:function(){return r},FF:function(){return a}});var w,s=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function T(u){if(!(p=s.exec(u)))throw new Error("invalid format: "+u);var p;return new m({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]})}function m(u){this.fill=u.fill===void 0?" ":u.fill+"",this.align=u.align===void 0?">":u.align+"",this.sign=u.sign===void 0?"-":u.sign+"",this.symbol=u.symbol===void 0?"":u.symbol+"",this.zero=!!u.zero,this.width=u.width===void 0?void 0:+u.width,this.comma=!!u.comma,this.precision=u.precision===void 0?void 0:+u.precision,this.trim=!!u.trim,this.type=u.type===void 0?"":u.type+""}function f(u,p){var c=_(u,p);if(!c)return u+"";var b=c[0],d=c[1];return d<0?"0."+new Array(-d).join("0")+b:b.length>d+1?b.slice(0,d+1)+"."+b.slice(d+1):b+new Array(d-b.length+2).join("0")}T.prototype=m.prototype,m.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,0|this.width))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var l={"%":function(u,p){return(100*u).toFixed(p)},b:function(u){return Math.round(u).toString(2)},c:function(u){return u+""},d:function(u){return Math.abs(u=Math.round(u))>=1e21?u.toLocaleString("en").replace(/,/g,""):u.toString(10)},e:function(u,p){return u.toExponential(p)},f:function(u,p){return u.toFixed(p)},g:function(u,p){return u.toPrecision(p)},o:function(u){return Math.round(u).toString(8)},p:function(u,p){return f(100*u,p)},r:f,s:function(u,p){var c=_(u,p);if(!c)return u+"";var b=c[0],d=c[1],v=d-(w=3*Math.max(-8,Math.min(8,Math.floor(d/3))))+1,x=b.length;return v===x?b:v>x?b+new Array(v-x+1).join("0"):v>0?b.slice(0,v)+"."+b.slice(v):"0."+new Array(1-v).join("0")+_(u,Math.max(0,p+v-1))[0]},X:function(u){return Math.round(u).toString(16).toUpperCase()},x:function(u){return Math.round(u).toString(16)}};function t(u){return u}var i,r,n=Array.prototype.map,o=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function a(u){var p,c,b=u.grouping===void 0||u.thousands===void 0?t:(p=n.call(u.grouping,Number),c=u.thousands+"",function(A,C){for(var L=A.length,O=[],I=0,R=p[0],U=0;L>0&&R>0&&(U+R+1>C&&(R=Math.max(1,C-U)),O.push(A.substring(L-=R,L+R)),!((U+=R+1)>C));)R=p[I=(I+1)%p.length];return O.reverse().join(c)}),d=u.currency===void 0?"":u.currency[0]+"",v=u.currency===void 0?"":u.currency[1]+"",x=u.decimal===void 0?".":u.decimal+"",g=u.numerals===void 0?t:function(A){return function(C){return C.replace(/[0-9]/g,function(L){return A[+L]})}}(n.call(u.numerals,String)),y=u.percent===void 0?"%":u.percent+"",k=u.minus===void 0?"-":u.minus+"",h=u.nan===void 0?"NaN":u.nan+"";function M(A){var C=(A=T(A)).fill,L=A.align,O=A.sign,I=A.symbol,R=A.zero,U=A.width,B=A.comma,G=A.precision,N=A.trim,j=A.type;j==="n"?(B=!0,j="g"):l[j]||(G===void 0&&(G=12),N=!0,j="g"),(R||C==="0"&&L==="=")&&(R=!0,C="0",L="=");var V=I==="$"?d:I==="#"&&/[boxX]/.test(j)?"0"+j.toLowerCase():"",H=I==="$"?v:/[%p]/.test(j)?y:"",ee=l[j],Q=/[defgprs%]/.test(j);function Y(X){var K,te,ae,oe=V,se=H;if(j==="c")se=ee(X)+se,X="";else{var fe=(X=+X)<0||1/X<0;if(X=isNaN(X)?h:ee(Math.abs(X),G),N&&(X=function(de){e:for(var pe,ye=de.length,Re=1,we=-1;Re0&&(we=0)}return we>0?de.slice(0,we)+de.slice(pe+1):de}(X)),fe&&+X==0&&O!=="+"&&(fe=!1),oe=(fe?O==="("?O:k:O==="-"||O==="("?"":O)+oe,se=(j==="s"?o[8+w/3]:"")+se+(fe&&O==="("?")":""),Q){for(K=-1,te=X.length;++K(ae=X.charCodeAt(K))||ae>57){se=(ae===46?x+X.slice(K+1):X.slice(K))+se,X=X.slice(0,K);break}}}B&&!R&&(X=b(X,1/0));var xe=oe.length+X.length+se.length,he=xe>1)+oe+X+se+he.slice(xe);break;default:X=he+oe+X+se}return g(X)}return G=G===void 0?6:/[gprs]/.test(j)?Math.max(1,Math.min(21,G)):Math.max(0,Math.min(20,G)),Y.toString=function(){return A+""},Y}return{format:M,formatPrefix:function(A,C){var L,O=M(((A=T(A)).type="f",A)),I=3*Math.max(-8,Math.min(8,Math.floor((L=C,((L=_(Math.abs(L)))?L[1]:NaN)/3)))),R=Math.pow(10,-I),U=o[8+I/3];return function(B){return O(R*B)+U}}}}i=a({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),r=i.format,i.formatPrefix},65704:function(D,E,e){e.r(E),e.d(E,{geoAiry:function(){return B},geoAiryRaw:function(){return U},geoAitoff:function(){return N},geoAitoffRaw:function(){return G},geoArmadillo:function(){return V},geoArmadilloRaw:function(){return j},geoAugust:function(){return ee},geoAugustRaw:function(){return H},geoBaker:function(){return K},geoBakerRaw:function(){return X},geoBerghaus:function(){return oe},geoBerghausRaw:function(){return ae},geoBertin1953:function(){return Re},geoBertin1953Raw:function(){return ye},geoBoggs:function(){return Te},geoBoggsRaw:function(){return me},geoBonne:function(){return ge},geoBonneRaw:function(){return je},geoBottomley:function(){return Se},geoBottomleyRaw:function(){return be},geoBromley:function(){return Ye},geoBromleyRaw:function(){return Ne},geoChamberlin:function(){return Dt},geoChamberlinAfrica:function(){return xt},geoChamberlinRaw:function(){return Et},geoCollignon:function(){return Ft},geoCollignonRaw:function(){return It},geoCraig:function(){return Nt},geoCraigRaw:function(){return qt},geoCraster:function(){return Ge},geoCrasterRaw:function(){return Ke},geoCylindricalEqualArea:function(){return ht},geoCylindricalEqualAreaRaw:function(){return nt},geoCylindricalStereographic:function(){return Be},geoCylindricalStereographicRaw:function(){return Oe},geoEckert1:function(){return ut},geoEckert1Raw:function(){return Qe},geoEckert2:function(){return bt},geoEckert2Raw:function(){return pt},geoEckert3:function(){return Ct},geoEckert3Raw:function(){return Lt},geoEckert4:function(){return Ot},geoEckert4Raw:function(){return mt},geoEckert5:function(){return Pt},geoEckert5Raw:function(){return _t},geoEckert6:function(){return Wt},geoEckert6Raw:function(){return Bt},geoEisenlohr:function(){return Kt},geoEisenlohrRaw:function(){return Xt},geoFahey:function(){return ln},geoFaheyRaw:function(){return yn},geoFoucaut:function(){return Wn},geoFoucautRaw:function(){return kn},geoFoucautSinusoidal:function(){return on},geoFoucautSinusoidalRaw:function(){return wn},geoGilbert:function(){return Cn},geoGingery:function(){return or},geoGingeryRaw:function(){return Nn},geoGinzburg4:function(){return gr},geoGinzburg4Raw:function(){return kr},geoGinzburg5:function(){return dr},geoGinzburg5Raw:function(){return ir},geoGinzburg6:function(){return $t},geoGinzburg6Raw:function(){return yr},geoGinzburg8:function(){return Ln},geoGinzburg8Raw:function(){return mn},geoGinzburg9:function(){return jn},geoGinzburg9Raw:function(){return En},geoGringorten:function(){return Qn},geoGringortenQuincuncial:function(){return Wl},geoGringortenRaw:function(){return Zn},geoGuyou:function(){return jt},geoGuyouRaw:function(){return Pn},geoHammer:function(){return he},geoHammerRaw:function(){return fe},geoHammerRetroazimuthal:function(){return On},geoHammerRetroazimuthalRaw:function(){return un},geoHealpix:function(){return er},geoHealpixRaw:function(){return vn},geoHill:function(){return lr},geoHillRaw:function(){return Jn},geoHomolosine:function(){return Mr},geoHomolosineRaw:function(){return Sr},geoHufnagel:function(){return pr},geoHufnagelRaw:function(){return Lr},geoHyperelliptical:function(){return Ti},geoHyperellipticalRaw:function(){return ci},geoInterrupt:function(){return xi},geoInterruptedBoggs:function(){return Ka},geoInterruptedHomolosine:function(){return Xs},geoInterruptedMollweide:function(){return pu},geoInterruptedMollweideHemispheres:function(){return Qa},geoInterruptedQuarticAuthalic:function(){return Rs},geoInterruptedSinuMollweide:function(){return Qi},geoInterruptedSinusoidal:function(){return qa},geoKavrayskiy7:function(){return fs},geoKavrayskiy7Raw:function(){return eo},geoLagrange:function(){return hs},geoLagrangeRaw:function(){return fi},geoLarrivee:function(){return Ro},geoLarriveeRaw:function(){return bo},geoLaskowski:function(){return Vu},geoLaskowskiRaw:function(){return xl},geoLittrow:function(){return Hu},geoLittrowRaw:function(){return Xo},geoLoximuthal:function(){return Ec},geoLoximuthalRaw:function(){return qu},geoMiller:function(){return Gu},geoMillerRaw:function(){return gu},geoModifiedStereographic:function(){return Ps},geoModifiedStereographicAlaska:function(){return yu},geoModifiedStereographicGs48:function(){return Ls},geoModifiedStereographicGs50:function(){return Vl},geoModifiedStereographicLee:function(){return Ks},geoModifiedStereographicMiller:function(){return ps},geoModifiedStereographicRaw:function(){return vu},geoMollweide:function(){return Ce},geoMollweideRaw:function(){return Me},geoMtFlatPolarParabolic:function(){return Cc},geoMtFlatPolarParabolicRaw:function(){return ds},geoMtFlatPolarQuartic:function(){return bl},geoMtFlatPolarQuarticRaw:function(){return Hl},geoMtFlatPolarSinusoidal:function(){return Qs},geoMtFlatPolarSinusoidalRaw:function(){return Os},geoNaturalEarth:function(){return oo.Z},geoNaturalEarth2:function(){return _l},geoNaturalEarth2Raw:function(){return xu},geoNaturalEarthRaw:function(){return oo.K},geoNellHammer:function(){return wl},geoNellHammerRaw:function(){return el},geoNicolosi:function(){return Tl},geoNicolosiRaw:function(){return tl},geoPatterson:function(){return ql},geoPattersonRaw:function(){return gs},geoPeirceQuincuncial:function(){return Zl},geoPierceQuincuncial:function(){return Zl},geoPolyconic:function(){return _u},geoPolyconicRaw:function(){return Sl},geoPolyhedral:function(){return vs},geoPolyhedralButterfly:function(){return Gl},geoPolyhedralCollignon:function(){return Tu},geoPolyhedralWaterman:function(){return Bs},geoProject:function(){return js},geoQuantize:function(){return Sa},geoQuincuncial:function(){return Ga},geoRectangularPolyconic:function(){return Us},geoRectangularPolyconicRaw:function(){return Cr},geoRobinson:function(){return rl},geoRobinsonRaw:function(){return Yl},geoSatellite:function(){return al},geoSatelliteRaw:function(){return il},geoSinuMollweide:function(){return vr},geoSinuMollweideRaw:function(){return cr},geoSinusoidal:function(){return De},geoSinusoidalRaw:function(){return Ue},geoStitch:function(){return Hs},geoTimes:function(){return fo},geoTimesRaw:function(){return xa},geoTwoPointAzimuthal:function(){return ho},geoTwoPointAzimuthalRaw:function(){return Ll},geoTwoPointAzimuthalUsa:function(){return to},geoTwoPointEquidistant:function(){return di},geoTwoPointEquidistantRaw:function(){return Fo},geoTwoPointEquidistantUsa:function(){return za},geoVanDerGrinten:function(){return wo},geoVanDerGrinten2:function(){return Bo},geoVanDerGrinten2Raw:function(){return Da},geoVanDerGrinten3:function(){return rs},geoVanDerGrinten3Raw:function(){return bs},geoVanDerGrinten4:function(){return po},geoVanDerGrinten4Raw:function(){return ba},geoVanDerGrintenRaw:function(){return oa},geoWagner:function(){return Ur},geoWagner4:function(){return $l},geoWagner4Raw:function(){return _a},geoWagner6:function(){return ll},geoWagner6Raw:function(){return Fa},geoWagner7:function(){return sl},geoWagnerRaw:function(){return Fr},geoWiechel:function(){return _i},geoWiechelRaw:function(){return as},geoWinkel3:function(){return Jl},geoWinkel3Raw:function(){return Si}});var _=e(15002),w=Math.abs,s=Math.atan,T=Math.atan2,m=Math.cos,f=Math.exp,l=Math.floor,t=Math.log,i=Math.max,r=Math.min,n=Math.pow,o=Math.round,a=Math.sign||function(et){return et>0?1:et<0?-1:0},u=Math.sin,p=Math.tan,c=1e-6,b=1e-12,d=Math.PI,v=d/2,x=d/4,g=Math.SQRT1_2,y=O(2),k=O(d),h=2*d,M=180/d,A=d/180;function C(et){return et>1?v:et<-1?-v:Math.asin(et)}function L(et){return et>1?0:et<-1?d:Math.acos(et)}function O(et){return et>0?Math.sqrt(et):0}function I(et){return(f(et)-f(-et))/2}function R(et){return(f(et)+f(-et))/2}function U(et){var rt=p(et/2),ct=2*t(m(et/2))/(rt*rt);function vt(Mt,kt){var q=m(Mt),$=m(kt),W=u(kt),ie=$*q,_e=-((1-ie?t((1+ie)/2)/(1-ie):-.5)+ct/(1+ie));return[_e*$*u(Mt),_e*W]}return vt.invert=function(Mt,kt){var q,$=O(Mt*Mt+kt*kt),W=-et/2,ie=50;if(!$)return[0,0];do{var _e=W/2,ze=m(_e),He=u(_e),Xe=He/ze,at=-t(w(ze));W-=q=(2/Xe*at-ct*Xe-$)/(-at/(He*He)+1-ct/(2*ze*ze))*(ze<0?.7:1)}while(w(q)>c&&--ie>0);var wt=u(W);return[T(Mt*wt,$*m(W)),C(kt*wt/$)]},vt}function B(){var et=v,rt=(0,_.r)(U),ct=rt(et);return ct.radius=function(vt){return arguments.length?rt(et=vt*A):et*M},ct.scale(179.976).clipAngle(147)}function G(et,rt){var ct=m(rt),vt=function(Mt){return Mt?Mt/Math.sin(Mt):1}(L(ct*m(et/=2)));return[2*ct*u(et)*vt,u(rt)*vt]}function N(){return(0,_.Z)(G).scale(152.63)}function j(et){var rt=u(et),ct=m(et),vt=et>=0?1:-1,Mt=p(vt*et),kt=(1+rt-ct)/2;function q($,W){var ie=m(W),_e=m($/=2);return[(1+ie)*u($),(vt*W>-T(_e,Mt)-.001?0:10*-vt)+kt+u(W)*ct-(1+ie)*rt*_e]}return q.invert=function($,W){var ie=0,_e=0,ze=50;do{var He=m(ie),Xe=u(ie),at=m(_e),wt=u(_e),At=1+at,re=At*Xe-$,ve=kt+wt*ct-At*rt*He-W,Le=At*He/2,Fe=-Xe*wt,Ve=rt*At*Xe/2,We=ct*at+rt*He*wt,$e=Fe*Ve-We*Le,tt=(ve*Fe-re*We)/$e/2,lt=(re*Ve-ve*Le)/$e;w(lt)>2&&(lt/=2),ie-=tt,_e-=lt}while((w(tt)>c||w(lt)>c)&&--ze>0);return vt*_e>-T(m(ie),Mt)-.001?[2*ie,_e]:null},q}function V(){var et=20*A,rt=et>=0?1:-1,ct=p(rt*et),vt=(0,_.r)(j),Mt=vt(et),kt=Mt.stream;return Mt.parallel=function(q){return arguments.length?(ct=p((rt=(et=q*A)>=0?1:-1)*et),vt(et)):et*M},Mt.stream=function(q){var $=Mt.rotate(),W=kt(q),ie=(Mt.rotate([0,0]),kt(q)),_e=Mt.precision();return Mt.rotate($),W.sphere=function(){ie.polygonStart(),ie.lineStart();for(var ze=-180*rt;rt*ze<180;ze+=90*rt)ie.point(ze,90*rt);if(et)for(;rt*(ze-=3*rt*_e)>=-180;)ie.point(ze,rt*-T(m(ze*A/2),ct)*M);ie.lineEnd(),ie.polygonEnd()},W},Mt.scale(218.695).center([0,28.0974])}function H(et,rt){var ct=p(rt/2),vt=O(1-ct*ct),Mt=1+vt*m(et/=2),kt=u(et)*vt/Mt,q=ct/Mt,$=kt*kt,W=q*q;return[1.3333333333333333*kt*(3+$-3*W),1.3333333333333333*q*(3+3*$-W)]}function ee(){return(0,_.Z)(H).scale(66.1603)}G.invert=function(et,rt){if(!(et*et+4*rt*rt>d*d+c)){var ct=et,vt=rt,Mt=25;do{var kt,q=u(ct),$=u(ct/2),W=m(ct/2),ie=u(vt),_e=m(vt),ze=u(2*vt),He=ie*ie,Xe=_e*_e,at=$*$,wt=1-Xe*W*W,At=wt?L(_e*W)*O(kt=1/wt):kt=0,re=2*At*_e*$-et,ve=At*ie-rt,Le=kt*(Xe*at+At*_e*W*He),Fe=kt*(.5*q*ze-2*At*ie*$),Ve=.25*kt*(ze*$-At*ie*Xe*q),We=kt*(He*W+At*at*_e),$e=Fe*Ve-We*Le;if(!$e)break;var tt=(ve*Fe-re*We)/$e,lt=(re*Ve-ve*Le)/$e;ct-=tt,vt-=lt}while((w(tt)>c||w(lt)>c)&&--Mt>0);return[ct,vt]}},H.invert=function(et,rt){if(rt*=.375,!(et*=.375)&&w(rt)>1)return null;var ct=1+et*et+rt*rt,vt=O((ct-O(ct*ct-4*rt*rt))/2),Mt=C(vt)/3,kt=vt?function(ie){return t(ie+O(ie*ie-1))}(w(rt/vt))/3:function(ie){return t(ie+O(ie*ie+1))}(w(et))/3,q=m(Mt),$=R(kt),W=$*$-q*q;return[2*a(et)*T(I(kt)*q,.25-W),2*a(rt)*T($*u(Mt),.25+W)]};var Q=O(8),Y=t(1+y);function X(et,rt){var ct=w(rt);return ctb&&--kt>0);return[et/(m(Mt)*(Q-1/u(Mt))),a(rt)*Mt]};var te=e(17889);function ae(et){var rt=2*d/et;function ct(vt,Mt){var kt=(0,te.N)(vt,Mt);if(w(vt)>v){var q=T(kt[1],kt[0]),$=O(kt[0]*kt[0]+kt[1]*kt[1]),W=rt*o((q-v)/rt)+v,ie=T(u(q-=W),2-m(q));q=W+C(d/$*u(ie))-ie,kt[0]=$*m(q),kt[1]=$*u(q)}return kt}return ct.invert=function(vt,Mt){var kt=O(vt*vt+Mt*Mt);if(kt>v){var q=T(Mt,vt),$=rt*o((q-v)/rt)+v,W=q>$?-1:1,ie=kt*m($-q),_e=1/p(W*L((ie-d)/O(d*(d-2*ie)+kt*kt)));q=$+2*s((_e+W*O(_e*_e-3))/3),vt=kt*m(q),Mt=kt*u(q)}return te.N.invert(vt,Mt)},ct}function oe(){var et=5,rt=(0,_.r)(ae),ct=rt(et),vt=ct.stream,Mt=.01,kt=-m(Mt*A),q=u(Mt*A);return ct.lobes=function($){return arguments.length?rt(et=+$):et},ct.stream=function($){var W=ct.rotate(),ie=vt($),_e=(ct.rotate([0,0]),vt($));return ct.rotate(W),ie.sphere=function(){_e.polygonStart(),_e.lineStart();for(var ze=0,He=360/et,Xe=2*d/et,at=90-180/et,wt=v;ze0&&w(vt)>c);return q<0?NaN:ct}function pe(et,rt,ct){return rt===void 0&&(rt=40),ct===void 0&&(ct=b),function(vt,Mt,kt,q){var $,W,ie;kt=kt===void 0?0:+kt,q=q===void 0?0:+q;for(var _e=0;_e$)kt-=W/=2,q-=ie/=2;else{$=at;var wt=(kt>0?-1:1)*ct,At=(q>0?-1:1)*ct,re=et(kt+wt,q),ve=et(kt,q+At),Le=(re[0]-ze[0])/wt,Fe=(re[1]-ze[1])/wt,Ve=(ve[0]-ze[0])/At,We=(ve[1]-ze[1])/At,$e=We*Le-Fe*Ve,tt=(w($e)<.5?.5:1)/$e;if(kt+=W=(Xe*Ve-He*We)*tt,q+=ie=(He*Fe-Xe*Le)*tt,w(W)0&&(kt[1]*=1+q/1.5*kt[0]*kt[0]),kt}return rt.invert=pe(rt),rt}function Re(){return(0,_.Z)(ye()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function we(et,rt){var ct,vt=et*u(rt),Mt=30;do rt-=ct=(rt+u(rt)-vt)/(1+m(rt));while(w(ct)>c&&--Mt>0);return rt/2}function Ae(et,rt,ct){function vt(Mt,kt){return[et*Mt*m(kt=we(ct,kt)),rt*u(kt)]}return vt.invert=function(Mt,kt){return kt=C(kt/rt),[Mt/(et*m(kt)),C((2*kt+u(2*kt))/ct)]},vt}xe.invert=function(et,rt){var ct=2*C(rt/2);return[et*m(ct/2)/m(ct),ct]};var Me=Ae(y/v,y,d);function Ce(){return(0,_.Z)(Me).scale(169.529)}var ne=2.00276,ue=1.11072;function me(et,rt){var ct=we(d,rt);return[ne*et/(1/m(rt)+ue/m(ct)),(rt+y*u(ct))/ne]}function Te(){return(0,_.Z)(me).scale(160.857)}function Ee(et){var rt=0,ct=(0,_.r)(et),vt=ct(rt);return vt.parallel=function(Mt){return arguments.length?ct(rt=Mt*A):rt*M},vt}function Ue(et,rt){return[et*m(rt),rt]}function De(){return(0,_.Z)(Ue).scale(152.63)}function je(et){if(!et)return Ue;var rt=1/p(et);function ct(vt,Mt){var kt=rt+et-Mt,q=kt&&vt*m(Mt)/kt;return[kt*u(q),rt-kt*m(q)]}return ct.invert=function(vt,Mt){var kt=O(vt*vt+(Mt=rt-Mt)*Mt),q=rt+et-kt;return[kt/m(q)*T(vt,Mt),q]},ct}function ge(){return Ee(je).scale(123.082).center([0,26.1441]).parallel(45)}function be(et){function rt(ct,vt){var Mt=v-vt,kt=Mt&&ct*et*u(Mt)/Mt;return[Mt*u(kt)/et,v-Mt*m(kt)]}return rt.invert=function(ct,vt){var Mt=ct*et,kt=v-vt,q=O(Mt*Mt+kt*kt),$=T(Mt,kt);return[(q?q/u(q):1)*$/et,v-q]},rt}function Se(){var et=.5,rt=(0,_.r)(be),ct=rt(et);return ct.fraction=function(vt){return arguments.length?rt(et=+vt):et},ct.scale(158.837)}me.invert=function(et,rt){var ct,vt,Mt=ne*rt,kt=rt<0?-x:x,q=25;do vt=Mt-y*u(kt),kt-=ct=(u(2*kt)+2*kt-d*u(vt))/(2*m(2*kt)+2+d*m(vt)*y*m(kt));while(w(ct)>c&&--q>0);return vt=Mt-y*u(kt),[et*(1/m(vt)+ue/m(kt))/ne,vt]},Ue.invert=function(et,rt){return[et/m(rt),rt]};var Ne=Ae(1,4/d,d);function Ye(){return(0,_.Z)(Ne).scale(152.63)}var Ze=e(66624),st=e(49386);function ot(et,rt,ct,vt,Mt,kt){var q,$=m(kt);if(w(et)>1||w(kt)>1)q=L(ct*Mt+rt*vt*$);else{var W=u(et/2),ie=u(kt/2);q=2*C(O(W*W+rt*vt*ie*ie))}return w(q)>c?[q,T(vt*u(kt),rt*Mt-ct*vt*$)]:[0,0]}function ft(et,rt,ct){return L((et*et+rt*rt-ct*ct)/(2*et*rt))}function yt(et){return et-2*d*l((et+d)/(2*d))}function Et(et,rt,ct){for(var vt,Mt=[[et[0],et[1],u(et[1]),m(et[1])],[rt[0],rt[1],u(rt[1]),m(rt[1])],[ct[0],ct[1],u(ct[1]),m(ct[1])]],kt=Mt[2],q=0;q<3;++q,kt=vt)vt=Mt[q],kt.v=ot(vt[1]-kt[1],kt[3],kt[2],vt[3],vt[2],vt[0]-kt[0]),kt.point=[0,0];var $=ft(Mt[0].v[0],Mt[2].v[0],Mt[1].v[0]),W=ft(Mt[0].v[0],Mt[1].v[0],Mt[2].v[0]),ie=d-$;Mt[2].point[1]=0,Mt[0].point[0]=-(Mt[1].point[0]=Mt[0].v[0]/2);var _e=[Mt[2].point[0]=Mt[0].point[0]+Mt[2].v[0]*m($),2*(Mt[0].point[1]=Mt[1].point[1]=Mt[2].v[0]*u($))];return function(ze,He){var Xe,at=u(He),wt=m(He),At=new Array(3);for(Xe=0;Xe<3;++Xe){var re=Mt[Xe];if(At[Xe]=ot(He-re[1],re[3],re[2],wt,at,ze-re[0]),!At[Xe][0])return re.point;At[Xe][1]=yt(At[Xe][1]-re.v[1])}var ve=_e.slice();for(Xe=0;Xe<3;++Xe){var Le=Xe==2?0:Xe+1,Fe=ft(Mt[Xe].v[0],At[Xe][0],At[Le][0]);At[Xe][1]<0&&(Fe=-Fe),Xe?Xe==1?(Fe=W-Fe,ve[0]-=At[Xe][0]*m(Fe),ve[1]-=At[Xe][0]*u(Fe)):(Fe=ie-Fe,ve[0]+=At[Xe][0]*m(Fe),ve[1]+=At[Xe][0]*u(Fe)):(ve[0]+=At[Xe][0]*m(Fe),ve[1]-=At[Xe][0]*u(Fe))}return ve[0]/=3,ve[1]/=3,ve}}function Tt(et){return et[0]*=A,et[1]*=A,et}function xt(){return Dt([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Dt(et,rt,ct){var vt=(0,Ze.Z)({type:"MultiPoint",coordinates:[et,rt,ct]}),Mt=[-vt[0],-vt[1]],kt=(0,st.Z)(Mt),q=Et(Tt(kt(et)),Tt(kt(rt)),Tt(kt(ct)));q.invert=pe(q);var $=(0,_.Z)(q).rotate(Mt),W=$.center;return delete $.rotate,$.center=function(ie){return arguments.length?W(kt(ie)):kt.invert(W())},$.clipAngle(90)}function It(et,rt){var ct=O(1-u(rt));return[2/k*et*ct,k*(1-ct)]}function Ft(){return(0,_.Z)(It).scale(95.6464).center([0,30])}function qt(et){var rt=p(et);function ct(vt,Mt){return[vt,(vt?vt/u(vt):1)*(u(Mt)*m(vt)-rt*m(Mt))]}return ct.invert=rt?function(vt,Mt){vt&&(Mt*=u(vt)/vt);var kt=m(vt);return[vt,2*T(O(kt*kt+rt*rt-Mt*Mt)-kt,rt-Mt)]}:function(vt,Mt){return[vt,C(vt?Mt*p(vt)/vt:Mt)]},ct}function Nt(){return Ee(qt).scale(249.828).clipAngle(90)}It.invert=function(et,rt){var ct=(ct=rt/k-1)*ct;return[ct>0?et*O(d/ct)/2:0,C(1-ct)]};var Je=O(3);function Ke(et,rt){return[Je*et*(2*m(2*rt/3)-1)/k,Je*k*u(rt/3)]}function Ge(){return(0,_.Z)(Ke).scale(156.19)}function nt(et){var rt=m(et);function ct(vt,Mt){return[vt*rt,u(Mt)/rt]}return ct.invert=function(vt,Mt){return[vt/rt,C(Mt*rt)]},ct}function ht(){return Ee(nt).parallel(38.58).scale(195.044)}function Oe(et){var rt=m(et);function ct(vt,Mt){return[vt*rt,(1+rt)*p(Mt/2)]}return ct.invert=function(vt,Mt){return[vt/rt,2*s(Mt/(1+rt))]},ct}function Be(){return Ee(Oe).scale(124.75)}function Qe(et,rt){var ct=O(8/(3*d));return[ct*et*(1-w(rt)/d),ct*rt]}function ut(){return(0,_.Z)(Qe).scale(165.664)}function pt(et,rt){var ct=O(4-3*u(w(rt)));return[2/O(6*d)*et*ct,a(rt)*O(2*d/3)*(2-ct)]}function bt(){return(0,_.Z)(pt).scale(165.664)}function Lt(et,rt){var ct=O(d*(4+d));return[2/ct*et*(1+O(1-4*rt*rt/(d*d))),4/ct*rt]}function Ct(){return(0,_.Z)(Lt).scale(180.739)}function mt(et,rt){var ct=(2+v)*u(rt);rt/=2;for(var vt=0,Mt=1/0;vt<10&&w(Mt)>c;vt++){var kt=m(rt);rt-=Mt=(rt+u(rt)*(kt+2)-ct)/(2*kt*(1+kt))}return[2/O(d*(4+d))*et*(1+m(rt)),2*O(d/(4+d))*u(rt)]}function Ot(){return(0,_.Z)(mt).scale(180.739)}function _t(et,rt){return[et*(1+m(rt))/O(2+d),2*rt/O(2+d)]}function Pt(){return(0,_.Z)(_t).scale(173.044)}function Bt(et,rt){for(var ct=(1+v)*u(rt),vt=0,Mt=1/0;vt<10&&w(Mt)>c;vt++)rt-=Mt=(rt+u(rt)-ct)/(1+m(rt));return ct=O(2+d),[et*(1+m(rt))/ct,2*rt/ct]}function Wt(){return(0,_.Z)(Bt).scale(173.044)}Ke.invert=function(et,rt){var ct=3*C(rt/(Je*k));return[k*et/(Je*(2*m(2*ct/3)-1)),ct]},Qe.invert=function(et,rt){var ct=O(8/(3*d)),vt=rt/ct;return[et/(ct*(1-w(vt)/d)),vt]},pt.invert=function(et,rt){var ct=2-w(rt)/O(2*d/3);return[et*O(6*d)/(2*ct),a(rt)*C((4-ct*ct)/3)]},Lt.invert=function(et,rt){var ct=O(d*(4+d))/2;return[et*ct/(1+O(1-rt*rt*(4+d)/(4*d))),rt*ct/2]},mt.invert=function(et,rt){var ct=rt*O((4+d)/d)/2,vt=C(ct),Mt=m(vt);return[et/(2/O(d*(4+d))*(1+Mt)),C((vt+ct*(Mt+2))/(2+v))]},_t.invert=function(et,rt){var ct=O(2+d),vt=rt*ct/2;return[ct*et/(1+m(vt)),vt]},Bt.invert=function(et,rt){var ct=1+v,vt=O(ct/2);return[2*et*vt/(1+m(rt*=vt)),C((rt+u(rt))/ct)]};var Gt=3+2*y;function Xt(et,rt){var ct=u(et/=2),vt=m(et),Mt=O(m(rt)),kt=m(rt/=2),q=u(rt)/(kt+y*vt*Mt),$=O(2/(1+q*q)),W=O((y*kt+(vt+ct)*Mt)/(y*kt+(vt-ct)*Mt));return[Gt*($*(W-1/W)-2*t(W)),Gt*($*q*(W+1/W)-2*s(q))]}function Kt(){return(0,_.Z)(Xt).scale(62.5271)}Xt.invert=function(et,rt){if(!(ct=H.invert(et/1.2,1.065*rt)))return null;var ct,vt=ct[0],Mt=ct[1],kt=20;et/=Gt,rt/=Gt;do{var q=vt/2,$=Mt/2,W=u(q),ie=m(q),_e=u($),ze=m($),He=m(Mt),Xe=O(He),at=_e/(ze+y*ie*Xe),wt=at*at,At=O(2/(1+wt)),re=(y*ze+(ie+W)*Xe)/(y*ze+(ie-W)*Xe),ve=O(re),Le=ve-1/ve,Fe=ve+1/ve,Ve=At*Le-2*t(ve)-et,We=At*at*Fe-2*s(at)-rt,$e=_e&&g*Xe*W*wt/_e,tt=(y*ie*ze+Xe)/(2*(ze+y*ie*Xe)*(ze+y*ie*Xe)*Xe),lt=-.5*at*At*At*At,gt=lt*$e,zt=lt*tt,Ut=(Ut=2*ze+y*Xe*(ie-W))*Ut*ve,Vt=(y*ie*ze*Xe+He)/Ut,Qt=-y*W*_e/(Xe*Ut),gn=Le*gt-2*Vt/ve+At*(Vt+Vt/re),en=Le*zt-2*Qt/ve+At*(Qt+Qt/re),sn=at*Fe*gt-2*$e/(1+wt)+At*Fe*$e+At*at*(Vt-Vt/re),rn=at*Fe*zt-2*tt/(1+wt)+At*Fe*tt+At*at*(Qt-Qt/re),Mn=en*sn-rn*gn;if(!Mn)break;var xn=(We*en-Ve*rn)/Mn,an=(Ve*sn-We*gn)/Mn;vt-=xn,Mt=i(-v,r(v,Mt-an))}while((w(xn)>c||w(an)>c)&&--kt>0);return w(w(Mt)-v)vt){var ze=O(_e),He=T(ie,W),Xe=ct*o(He/ct),at=He-Xe,wt=et*m(at),At=(et*u(at)-at*u(wt))/(v-wt),re=Hn(at,At),ve=(d-et)/qn(re,wt,d);W=ze;var Le,Fe=50;do W-=Le=(et+qn(re,wt,W)*ve-ze)/(re(W)*ve);while(w(Le)>c&&--Fe>0);ie=at*u(W),Wvt){var W=O($),ie=T(q,kt),_e=ct*o(ie/ct),ze=ie-_e;kt=W*m(ze),q=W*u(ze);for(var He=kt-v,Xe=u(kt),at=q/Xe,wt=ktc||w(He)>c)&&--wt>0);return[Xe,at]},W}var kr=tr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function gr(){return(0,_.Z)(kr).scale(149.995)}var ir=tr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function dr(){return(0,_.Z)(ir).scale(153.93)}var yr=tr(5/6*d,-.62636,-.0344,0,1.3493,-.05524,0,.045);function $t(){return(0,_.Z)(yr).scale(130.945)}function mn(et,rt){var ct=et*et,vt=rt*rt;return[et*(1-.162388*vt)*(.87-952426e-9*ct*ct),rt*(1+vt/12)]}function Ln(){return(0,_.Z)(mn).scale(131.747)}mn.invert=function(et,rt){var ct,vt=et,Mt=rt,kt=50;do{var q=Mt*Mt;Mt-=ct=(Mt*(1+q/12)-rt)/(1+q/4)}while(w(ct)>c&&--kt>0);kt=50,et/=1-.162388*q;do{var $=($=vt*vt)*$;vt-=ct=(vt*(.87-952426e-9*$)-et)/(.87-.00476213*$)}while(w(ct)>c&&--kt>0);return[vt,Mt]};var En=tr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function jn(){return(0,_.Z)(En).scale(131.087)}function $n(et){var rt=et(v,0)[0]-et(-v,0)[0];function ct(vt,Mt){var kt=vt>0?-.5:.5,q=et(vt+kt*d,Mt);return q[0]-=kt*rt,q}return et.invert&&(ct.invert=function(vt,Mt){var kt=vt>0?-.5:.5,q=et.invert(vt+kt*rt,Mt),$=q[0]-kt*d;return $<-d?$+=2*d:$>d&&($-=2*d),q[0]=$,q}),ct}function Zn(et,rt){var ct=a(et),vt=a(rt),Mt=m(rt),kt=m(et)*Mt,q=u(et)*Mt,$=u(vt*rt);et=w(T(q,$)),rt=C(kt),w(et-v)>c&&(et%=v);var W=function(ie,_e){if(_e===v)return[0,0];var ze,He,Xe=u(_e),at=Xe*Xe,wt=at*at,At=1+wt,re=1+3*wt,ve=1-wt,Le=C(1/O(At)),Fe=ve+at*At*Le,Ve=(1-Xe)/Fe,We=O(Ve),$e=Ve*At,tt=O($e),lt=We*ve;if(ie===0)return[0,-(lt+at*tt)];var gt,zt=m(_e),Ut=1/zt,Vt=2*Xe*zt,Qt=(-Fe*zt-(-3*at+Le*re)*Vt*(1-Xe))/(Fe*Fe),gn=-Ut*Vt,en=-Ut*(at*At*Qt+Ve*re*Vt),sn=-2*Ut*(ve*(.5*Qt/We)-2*at*We*Vt),rn=4*ie/d;if(ie>.222*d||_e.175*d){if(ze=(lt+at*O($e*(1+wt)-lt*lt))/(1+wt),ie>d/4)return[ze,ze];var Mn=ze,xn=.5*ze;ze=.5*(xn+Mn),He=50;do{var an=ze*(sn+gn*O($e-ze*ze))+en*C(ze/tt)-rn;if(!an)break;an<0?xn=ze:Mn=ze,ze=.5*(xn+Mn)}while(w(Mn-xn)>c&&--He>0)}else{ze=c,He=25;do{var zn=ze*ze,Vn=O($e-zn),nr=sn+gn*Vn,rr=ze*nr+en*C(ze/tt)-rn;ze-=gt=Vn?rr/(nr+(en-gn*zn)/Vn):0}while(w(gt)>c&&--He>0)}return[ze,-lt-at*O($e-ze*ze)]}(et>d/4?v-et:et,rt);return et>d/4&&($=W[0],W[0]=-W[1],W[1]=-$),W[0]*=ct,W[1]*=-vt,W}function Qn(){return(0,_.Z)($n(Zn)).scale(239.75)}function hr(et,rt){var ct,vt,Mt,kt,q,$;if(rt=.999999)return ct=(1-rt)/4,Mt=1/(vt=R(et)),[(kt=(($=f(2*($=et)))-1)/($+1))+ct*((q=vt*I(et))-et)/(vt*vt),Mt-ct*kt*Mt*(q-et),Mt+ct*kt*Mt*(q+et),2*s(f(et))-v+ct*(q-et)/vt];var W=[1,0,0,0,0,0,0,0,0],ie=[O(rt),0,0,0,0,0,0,0,0],_e=0;for(vt=O(1-rt),q=1;w(ie[_e]/W[_e])>c&&_e<8;)ct=W[_e++],ie[_e]=(ct-vt)/2,W[_e]=(ct+vt)/2,vt=O(ct*vt),q*=2;Mt=q*W[_e]*et;do Mt=(C(kt=ie[_e]*u(vt=Mt)/W[_e])+Mt)/2;while(--_e);return[u(Mt),kt=m(Mt),kt/m(Mt-vt),Mt]}function tn(et,rt){if(!rt)return et;if(rt===1)return t(p(et/2+x));for(var ct=1,vt=O(1-rt),Mt=O(rt),kt=0;w(Mt)>c;kt++){if(et%d){var q=s(vt*p(et)/ct);q<0&&(q+=d),et+=q+~~(et/d)*d}else et+=et;Mt=(ct+vt)/2,vt=O(ct*vt),Mt=((ct=Mt)-vt)/2}return et/(n(2,kt)*ct)}function Pn(et,rt){var ct=(y-1)/(y+1),vt=O(1-ct*ct),Mt=tn(v,vt*vt),kt=t(p(d/4+w(rt)/2)),q=f(-1*kt)/O(ct),$=function(ie,_e){var ze=ie*ie,He=_e+1,Xe=1-ze-_e*_e;return[.5*((ie>=0?v:-v)-T(Xe,2*ie)),-.25*t(Xe*Xe+4*ze)+.5*t(He*He+ze)]}(q*m(-1*et),q*u(-1*et)),W=function(ie,_e,ze){var He=w(ie),Xe=I(w(_e));if(He){var at=1/u(He),wt=1/(p(He)*p(He)),At=-(wt+ze*(Xe*Xe*at*at)-1+ze),re=(-At+O(At*At-(ze-1)*wt*4))/2;return[tn(s(1/O(re)),ze)*a(ie),tn(s(O((re/wt-1)/ze)),1-ze)*a(_e)]}return[0,tn(s(Xe),1-ze)*a(_e)]}($[0],$[1],vt*vt);return[-W[1],(rt>=0?1:-1)*(.5*Mt-W[0])]}function jt(){return(0,_.Z)($n(Pn)).scale(151.496)}Zn.invert=function(et,rt){w(et)>1&&(et=2*a(et)-et),w(rt)>1&&(rt=2*a(rt)-rt);var ct=a(et),vt=a(rt),Mt=-ct*et,kt=-vt*rt,q=kt/Mt<1,$=function(ze,He){for(var Xe=0,at=1,wt=.5,At=50;;){var re=wt*wt,ve=O(wt),Le=C(1/O(1+re)),Fe=1-re+wt*(1+re)*Le,Ve=(1-ve)/Fe,We=O(Ve),$e=Ve*(1+re),tt=We*(1-re),lt=O($e-ze*ze),gt=He+tt+wt*lt;if(w(at-Xe)0?Xe=wt:at=wt,wt=.5*(Xe+at)}if(!At)return null;var zt=C(ve),Ut=m(zt),Vt=1/Ut,Qt=2*ve*Ut,gn=(-Fe*Ut-(-3*wt+Le*(1+3*re))*Qt*(1-ve))/(Fe*Fe);return[d/4*(ze*(-2*Vt*(.5*gn/We*(1-re)-2*wt*We*Qt)+-Vt*Qt*lt)+-Vt*(wt*(1+re)*gn+Ve*(1+3*re)*Qt)*C(ze/O($e))),zt]}(q?kt:Mt,q?Mt:kt),W=$[0],ie=$[1],_e=m(ie);return q&&(W=-v-W),[ct*(T(u(W)*_e,-u(ie))+d),vt*C(m(W)*_e)]},Pn.invert=function(et,rt){var ct,vt,Mt,kt,q,$,W=(y-1)/(y+1),ie=O(1-W*W),_e=(vt=-et,Mt=ie*ie,(ct=.5*tn(v,ie*ie)-rt)?(kt=hr(ct,Mt),vt?($=(q=hr(vt,1-Mt))[1]*q[1]+Mt*kt[0]*kt[0]*q[0]*q[0],[[kt[0]*q[2]/$,kt[1]*kt[2]*q[0]*q[1]/$],[kt[1]*q[1]/$,-kt[0]*kt[2]*q[0]*q[2]/$],[kt[2]*q[1]*q[2]/$,-Mt*kt[0]*kt[1]*q[0]/$]]):[[kt[0],0],[kt[1],0],[kt[2],0]]):[[0,(q=hr(vt,1-Mt))[0]/q[1]],[1/q[1],0],[q[2]/q[1],0]]),ze=function(He,Xe){var at=Xe[0]*Xe[0]+Xe[1]*Xe[1];return[(He[0]*Xe[0]+He[1]*Xe[1])/at,(He[1]*Xe[0]-He[0]*Xe[1])/at]}(_e[0],_e[1]);return[T(ze[1],ze[0])/-1,2*s(f(-.5*t(W*ze[0]*ze[0]+W*ze[1]*ze[1])))-v]};var Jt=e(7613);function un(et){var rt=u(et),ct=m(et),vt=Rn(et);function Mt(kt,q){var $=vt(kt,q);kt=$[0],q=$[1];var W=u(q),ie=m(q),_e=m(kt),ze=L(rt*W+ct*ie*_e),He=u(ze),Xe=w(He)>c?ze/He:1;return[Xe*ct*u(kt),(w(kt)>v?Xe:-Xe)*(rt*ie-ct*W*_e)]}return vt.invert=Rn(-et),Mt.invert=function(kt,q){var $=O(kt*kt+q*q),W=-u($),ie=m($),_e=$*ie,ze=-q*W,He=$*rt,Xe=O(_e*_e+ze*ze-He*He),at=T(_e*He+ze*Xe,ze*He-_e*Xe),wt=($>v?-1:1)*T(kt*W,$*m(at)*ie+q*u(at)*W);return vt.invert(wt,at)},Mt}function Rn(et){var rt=u(et),ct=m(et);return function(vt,Mt){var kt=m(Mt),q=m(vt)*kt,$=u(vt)*kt,W=u(Mt);return[T($,q*ct-W*rt),C(W*ct+q*rt)]}}function On(){var et=0,rt=(0,_.r)(un),ct=rt(et),vt=ct.rotate,Mt=ct.stream,kt=(0,Jt.Z)();return ct.parallel=function(q){if(!arguments.length)return et*M;var $=ct.rotate();return rt(et=q*A).rotate($)},ct.rotate=function(q){return arguments.length?(vt.call(ct,[q[0],q[1]-et*M]),kt.center([-q[0],-q[1]]),ct):((q=vt.call(ct))[1]+=et*M,q)},ct.stream=function(q){return(q=Mt(q)).sphere=function(){q.polygonStart();var $,W=kt.radius(89.99)().coordinates[0],ie=W.length-1,_e=-1;for(q.lineStart();++_e=0;)q.point(($=W[_e])[0],$[1]);q.lineEnd(),q.polygonEnd()},q},ct.scale(79.4187).parallel(45).clipAngle(179.999)}var Sn=e(33064),pn=e(72736),bn=C(1-1/3)*M,dn=nt(0);function vn(et){var rt=bn*A,ct=It(d,rt)[0]-It(-d,rt)[0],vt=dn(0,rt)[1],Mt=It(0,rt)[1],kt=k-Mt,q=h/et,$=4/h,W=vt+kt*kt*4/h;function ie(_e,ze){var He,Xe=w(ze);if(Xe>rt){var at=r(et-1,i(0,l((_e+d)/q)));(He=It(_e+=d*(et-1)/et-at*q,Xe))[0]=He[0]*h/ct-h*(et-1)/(2*et)+at*h/et,He[1]=vt+4*(He[1]-Mt)*kt/h,ze<0&&(He[1]=-He[1])}else He=dn(_e,ze);return He[0]*=$,He[1]/=W,He}return ie.invert=function(_e,ze){_e/=$;var He=w(ze*=W);if(He>vt){var Xe=r(et-1,i(0,l((_e+d)/q)));_e=(_e+d*(et-1)/et-Xe*q)*ct/h;var at=It.invert(_e,.25*(He-vt)*h/kt+Mt);return at[0]-=d*(et-1)/et-Xe*q,ze<0&&(at[1]=-at[1]),at}return dn.invert(_e,ze)},ie}function An(et,rt){return[et,1&rt?89.999999:bn]}function Bn(et,rt){return[et,1&rt?-89.999999:-bn]}function Xn(et){return[.999999*et[0],et[1]]}function er(){var et=4,rt=(0,_.r)(vn),ct=rt(et),vt=ct.stream;return ct.lobes=function(Mt){return arguments.length?rt(et=+Mt):et},ct.stream=function(Mt){var kt=ct.rotate(),q=vt(Mt),$=(ct.rotate([0,0]),vt(Mt));return ct.rotate(kt),q.sphere=function(){var W,ie;(0,pn.Z)((W=180/et,ie=[].concat((0,Sn.w6)(-180,180+W/2,W).map(An),(0,Sn.w6)(180,-180-W/2,-W).map(Bn)),{type:"Polygon",coordinates:[W===180?ie.map(Xn):ie]}),$)},q},ct.scale(239.75)}function Jn(et){var rt,ct=1+et,vt=C(u(1/ct)),Mt=2*O(d/(rt=d+4*vt*ct)),kt=.5*Mt*(ct+O(et*(2+et))),q=et*et,$=ct*ct;function W(ie,_e){var ze,He,Xe=1-u(_e);if(Xe&&Xe<2){var at,wt=v-_e,At=25;do{var re=u(wt),ve=m(wt),Le=vt+T(re,ct-ve),Fe=1+$-2*ct*ve;wt-=at=(wt-q*vt-ct*re+Fe*Le-.5*Xe*rt)/(2*ct*re*Le)}while(w(at)>b&&--At>0);ze=Mt*O(Fe),He=ie*Le/d}else ze=Mt*(et+Xe),He=ie*vt/d;return[ze*u(He),kt-ze*m(He)]}return W.invert=function(ie,_e){var ze=ie*ie+(_e-=kt)*_e,He=(1+$-ze/(Mt*Mt))/(2*ct),Xe=L(He),at=u(Xe),wt=vt+T(at,ct-He);return[C(ie/O(ze))*d/wt,C(1-2*(Xe-q*vt-ct*at+(1+$-2*ct*He)*wt)/rt)]},W}function lr(){var et=1,rt=(0,_.r)(Jn),ct=rt(et);return ct.ratio=function(vt){return arguments.length?rt(et=+vt):et},ct.scale(167.774).center([0,18.67])}var sr=.7109889596207567,fr=.0528035274542;function cr(et,rt){return rt>-sr?((et=Me(et,rt))[1]+=fr,et):Ue(et,rt)}function vr(){return(0,_.Z)(cr).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Sr(et,rt){return w(rt)>sr?((et=Me(et,rt))[1]-=rt>0?fr:-fr,et):Ue(et,rt)}function Mr(){return(0,_.Z)(Sr).scale(152.63)}function Lr(et,rt,ct,vt){var Mt=O(4*d/(2*ct+(1+et-rt/2)*u(2*ct)+(et+rt)/2*u(4*ct)+rt/2*u(6*ct))),kt=O(vt*u(ct)*O((1+et*m(2*ct)+rt*m(4*ct))/(1+et+rt))),q=ct*W(1);function $(ze){return O(1+et*m(2*ze)+rt*m(4*ze))}function W(ze){var He=ze*ct;return(2*He+(1+et-rt/2)*u(2*He)+(et+rt)/2*u(4*He)+rt/2*u(6*He))/ct}function ie(ze){return $(ze)*u(ze)}var _e=function(ze,He){var Xe=ct*de(W,q*u(He)/ct,He/d);isNaN(Xe)&&(Xe=ct*a(He));var at=Mt*$(Xe);return[at*kt*ze/d*m(Xe),at/kt*u(Xe)]};return _e.invert=function(ze,He){var Xe=de(ie,He*kt/Mt);return[ze*d/(m(Xe)*Mt*kt*$(Xe)),C(ct*W(Xe/ct)/q)]},ct===0&&(Mt=O(vt/d),(_e=function(ze,He){return[ze*Mt,u(He)/Mt]}).invert=function(ze,He){return[ze/Mt,C(He*Mt)]}),_e}function pr(){var et=1,rt=0,ct=45*A,vt=2,Mt=(0,_.r)(Lr),kt=Mt(et,rt,ct,vt);return kt.a=function(q){return arguments.length?Mt(et=+q,rt,ct,vt):et},kt.b=function(q){return arguments.length?Mt(et,rt=+q,ct,vt):rt},kt.psiMax=function(q){return arguments.length?Mt(et,rt,ct=+q*A,vt):ct*M},kt.ratio=function(q){return arguments.length?Mt(et,rt,ct,vt=+q):vt},kt.scale(180.739)}function Pr(et,rt,ct,vt,Mt,kt,q,$,W,ie,_e){if(_e.nanEncountered)return NaN;var ze,He,Xe,at,wt,At,re,ve,Le,Fe;if(He=et(rt+.25*(ze=ct-rt)),Xe=et(ct-.25*ze),isNaN(He))_e.nanEncountered=!0;else{if(!isNaN(Xe))return Fe=((At=(at=ze*(vt+4*He+Mt)/12)+(wt=ze*(Mt+4*Xe+kt)/12))-q)/15,ie>W?(_e.maxDepthCount++,At+Fe):Math.abs(Fe)<$?At+Fe:(ve=Pr(et,rt,re=rt+.5*ze,vt,He,Mt,at,.5*$,W,ie+1,_e),isNaN(ve)?(_e.nanEncountered=!0,NaN):(Le=Pr(et,re,ct,Mt,Xe,kt,wt,.5*$,W,ie+1,_e),isNaN(Le)?(_e.nanEncountered=!0,NaN):ve+Le));_e.nanEncountered=!0}}function Hr(et,rt,ct,vt,Mt){vt===void 0&&(vt=1e-8),Mt===void 0&&(Mt=20);var kt=et(rt),q=et(.5*(rt+ct)),$=et(ct);return Pr(et,rt,ct,kt,q,$,(kt+4*q+$)*(ct-rt)/6,vt,Mt,1,{maxDepthCount:0,nanEncountered:!1})}function ci(et,rt,ct){function vt(Xe){return et+(1-et)*n(1-n(Xe,rt),1/rt)}function Mt(Xe){return Hr(vt,0,Xe,1e-4)}for(var kt=1/Mt(1),q=1e3,$=1.00000001*kt,W=[],ie=0;ie<=q;ie++)W.push(Mt(ie/q)*$);function _e(Xe){var at=0,wt=q,At=500;do W[At]>Xe?wt=At:at=At,At=at+wt>>1;while(At>at);var re=W[At+1]-W[At];return re&&(re=(Xe-W[At+1])/re),(At+1+re)/q}var ze=2*_e(1)/d*kt/ct,He=function(Xe,at){var wt=_e(w(u(at))),At=vt(wt)*Xe;return wt/=ze,[At,at>=0?wt:-wt]};return He.invert=function(Xe,at){var wt;return w(at*=ze)<1&&(wt=a(at)*C(Mt(w(at))*kt)),[Xe/vt(w(at)),wt]},He}function Ti(){var et=0,rt=2.5,ct=1.183136,vt=(0,_.r)(ci),Mt=vt(et,rt,ct);return Mt.alpha=function(kt){return arguments.length?vt(et=+kt,rt,ct):et},Mt.k=function(kt){return arguments.length?vt(et,rt=+kt,ct):rt},Mt.gamma=function(kt){return arguments.length?vt(et,rt,ct=+kt):ct},Mt.scale(152.63)}function Mi(et,rt){return w(et[0]-rt[0])=0;--$)ct=(rt=et[1][$])[0][0],vt=rt[0][1],Mt=rt[1][1],kt=rt[2][0],q=rt[2][1],W.push(fa([[kt-c,q-c],[kt-c,Mt+c],[ct+c,Mt+c],[ct+c,vt-c]],30));return{type:"Polygon",coordinates:[(0,Sn.TS)(W)]}}function xi(et,rt,ct){var vt,Mt;function kt(W,ie){for(var _e=ie<0?-1:1,ze=rt[+(ie<0)],He=0,Xe=ze.length-1;Heze[He][2][0];++He);var at=et(W-ze[He][1][0],ie);return at[0]+=et(ze[He][1][0],_e*ie>_e*ze[He][0][1]?ze[He][0][1]:ie)[0],at}ct?kt.invert=ct(kt):et.invert&&(kt.invert=function(W,ie){for(var _e=Mt[+(ie<0)],ze=rt[+(ie<0)],He=0,Xe=_e.length;Hewt&&(ze=at,at=wt,wt=ze),[[He,at],[Xe,wt]]})}),q):rt.map(function(ie){return ie.map(function(_e){return[[_e[0][0]*M,_e[0][1]*M],[_e[1][0]*M,_e[1][1]*M],[_e[2][0]*M,_e[2][1]*M]]})})},rt!=null&&q.lobes(rt),q}cr.invert=function(et,rt){return rt>-sr?Me.invert(et,rt-fr):Ue.invert(et,rt)},Sr.invert=function(et,rt){return w(rt)>sr?Me.invert(et,rt+(rt>0?fr:-fr)):Ue.invert(et,rt)};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 Ka(){return xi(me,Oa).scale(160.857)}var Yo=[[[[-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 Xs(){return xi(Sr,Yo).scale(152.63)}var Uu=[[[[-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 pu(){return xi(Me,Uu).scale(169.529)}var $s=[[[[-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 Qa(){return xi(Me,$s).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 Qi(){return xi(cr,du,pe).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var yl=[[[[-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 qa(){return xi(Ue,yl).scale(152.63).rotate([-20,0])}function eo(et,rt){return[3/h*et*O(d*d/3-rt*rt),rt]}function fs(){return(0,_.Z)(eo).scale(158.837)}function fi(et){function rt(ct,vt){if(w(w(vt)-v)2)return null;var kt=(ct/=2)*ct,q=(vt/=2)*vt,$=2*vt/(1+kt+q);return $=n((1+$)/(1-$),1/et),[T(2*ct,1-kt-q)/et,C(($-1)/($+1))]},rt}function hs(){var et=.5,rt=(0,_.r)(fi),ct=rt(et);return ct.spacing=function(vt){return arguments.length?rt(et=+vt):et},ct.scale(124.75)}eo.invert=function(et,rt){return[h/3*et/O(d*d/3-rt*rt),rt]};var ao=d/y;function bo(et,rt){return[et*(1+O(m(rt)))/2,rt/(m(rt/2)*m(et/6))]}function Ro(){return(0,_.Z)(bo).scale(97.2672)}function xl(et,rt){var ct=et*et,vt=rt*rt;return[et*(.975534+vt*(-.0143059*ct-.119161+-.0547009*vt)),rt*(1.00384+ct*(.0802894+-.02855*vt+199025e-9*ct)+vt*(.0998909+-.0491032*vt))]}function Vu(){return(0,_.Z)(xl).scale(139.98)}function Xo(et,rt){return[u(et)/m(rt),p(rt)*m(et)]}function Hu(){return(0,_.Z)(Xo).scale(144.049).clipAngle(89.999)}function qu(et){var rt=m(et),ct=p(x+et/2);function vt(Mt,kt){var q=kt-et,$=w(q)=0;)He=(ze=et[_e])[0]+W*(kt=He)-ie*Xe,Xe=ze[1]+W*Xe+ie*kt;return[He=W*(kt=He)-ie*Xe,Xe=W*Xe+ie*kt]}return ct.invert=function(vt,Mt){var kt=20,q=vt,$=Mt;do{for(var W,ie=rt,_e=et[ie],ze=_e[0],He=_e[1],Xe=0,at=0;--ie>=0;)Xe=ze+q*(W=Xe)-$*at,at=He+q*at+$*W,ze=(_e=et[ie])[0]+q*(W=ze)-$*He,He=_e[1]+q*He+$*W;var wt,At,re=(Xe=ze+q*(W=Xe)-$*at)*Xe+(at=He+q*at+$*W)*at;q-=wt=((ze=q*(W=ze)-$*He-vt)*Xe+(He=q*He+$*W-Mt)*at)/re,$-=At=(He*Xe-ze*at)/re}while(w(wt)+w(At)>1e-12&&--kt>0);if(kt){var ve=O(q*q+$*$),Le=2*s(.5*ve),Fe=u(Le);return[T(q*Fe,ve*m(Le)),ve?C($*Fe/ve):0]}},ct}bo.invert=function(et,rt){var ct=w(et),vt=w(rt),Mt=c,kt=v;vtc||w(At)>c)&&--Mt>0);return Mt&&[ct,vt]},Xo.invert=function(et,rt){var ct=et*et,vt=rt*rt+1,Mt=ct+vt,kt=et?g*O((Mt-O(Mt*Mt-4*ct))/ct):1/O(vt);return[C(et*kt),a(rt)*L(kt)]},gu.invert=function(et,rt){return[et,2.5*s(f(.8*rt))-.625*d]};var $o=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Jo=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Js=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Ko=[[.9245,0],[0,0],[.01943,0]],mu=[[.721316,0],[0,0],[-.00881625,-.00617325]];function yu(){return Ps($o,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function Ls(){return Ps(Jo,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Vl(){return Ps(Js,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function ps(){return Ps(Ko,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function Ks(){return Ps(mu,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Ps(et,rt){var ct=(0,_.Z)(vu(et)).rotate(rt).clipAngle(90),vt=(0,st.Z)(rt),Mt=ct.center;return delete ct.rotate,ct.center=function(kt){return arguments.length?Mt(vt(kt)):vt.invert(Mt())},ct}var Qo=O(6),hi=O(7);function ds(et,rt){var ct=C(7*u(rt)/(3*Qo));return[Qo*et*(2*m(2*ct/3)-1)/hi,9*u(ct/3)/hi]}function Cc(){return(0,_.Z)(ds).scale(164.859)}function Hl(et,rt){for(var ct,vt=(1+g)*u(rt),Mt=rt,kt=0;kt<25&&(Mt-=ct=(u(Mt/2)+u(Mt)-vt)/(.5*m(Mt/2)+m(Mt)),!(w(ct)b&&--$>0);return[et/(.84719-.13063*(vt=q*q)+(kt=vt*(Mt=vt*vt))*kt*(.05494*vt-.04515-.02326*Mt+.00331*kt)),q]},el.invert=function(et,rt){for(var ct=rt/2,vt=0,Mt=1/0;vt<10&&w(Mt)>c;++vt){var kt=m(rt/2);rt-=Mt=(rt-p(rt/2)-ct)/(1-.5/(kt*kt))}return[2*et/(1+m(rt)),rt]};var Is=[[[[-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 Rs(){return xi(fe(1/0),Is).rotate([20,0]).scale(152.63)}function tl(et,rt){var ct=u(rt),vt=m(rt),Mt=a(et);if(et===0||w(rt)===v)return[0,rt];if(rt===0)return[et,0];if(w(et)===v)return[et*vt,v*ct];var kt=d/(2*et)-2*et/d,q=2*rt/d,$=(1-q*q)/(ct-q),W=kt*kt,ie=$*$,_e=1+W/ie,ze=1+ie/W,He=(kt*ct/$-kt/2)/_e,Xe=(ie*ct/W+$/2)/ze,at=Xe*Xe-(ie*ct*ct/W+$*ct-1)/ze;return[v*(He+O(He*He+vt*vt/_e)*Mt),v*(Xe+O(at<0?0:at)*a(-rt*kt)*Mt)]}function Tl(){return(0,_.Z)(tl).scale(127.267)}tl.invert=function(et,rt){var ct=(et/=v)*et,vt=ct+(rt/=v)*rt,Mt=d*d;return[et?(vt-1+O((1-vt)*(1-vt)+4*ct))/(2*et)*v:0,de(function(kt){return vt*(d*u(kt)-2*kt)*d+4*kt*kt*(rt-u(kt))+2*d*kt-Mt*rt},0)]};var kl=1.0148,so=.23185,Al=-.14499,Ml=.02406,bu=1.790857183;function gs(et,rt){var ct=rt*rt;return[et,rt*(kl+ct*ct*(so+ct*(Al+Ml*ct)))]}function ql(){return(0,_.Z)(gs).scale(139.319)}function Sl(et,rt){if(w(rt)bu?rt=bu:rt<-1.790857183&&(rt=-1.790857183);var ct,vt=rt;do{var Mt=vt*vt;vt-=ct=(vt*(kl+Mt*Mt*(so+Mt*(Al+Ml*Mt)))-rt)/(1.0148+Mt*Mt*(1.1592500000000001+Mt*(.21654*Mt-1.01493)))}while(w(ct)>c);return[et,vt]},Sl.invert=function(et,rt){if(w(rt)c&&--kt>0);return q=p(Mt),[(w(rt)=0;)if(tt=We[Ut],$e[0]===tt[0]&&$e[1]===tt[1]){if(gt)return[gt,$e];gt=$e}}}(W.face,ie.face),ze=(wt=_e.map(ie.project),At=_e.map(W.project),re=Ds(wt[1],wt[0]),ve=Ds(At[1],At[0]),Le=function(Ve,We){return T(Ve[0]*We[1]-Ve[1]*We[0],Ve[0]*We[0]+Ve[1]*We[1])}(re,ve),Fe=bi(re)/bi(ve),zs([1,0,wt[0][0],0,1,wt[0][1]],zs([Fe,0,0,0,Fe,0],zs([m(Le),u(Le),0,-u(Le),m(Le),0],[1,0,-At[0][0],0,1,-At[0][1]]))));W.transform=ie.transform?zs(ie.transform,ze):ze;for(var He=ie.edges,Xe=0,at=He.length;Xe0?[-vt[0],0]:[180-vt[0],180])};var rt=zo.map(function(ct){return{face:ct,project:et(ct)}});return[-1,0,0,1,0,1,4,5].forEach(function(ct,vt){var Mt=rt[ct];Mt&&(Mt.children||(Mt.children=[])).push(rt[vt])}),vs(rt[0],function(ct,vt){return rt[ct<-d/2?vt<0?6:4:ct<0?vt<0?2:0:ctW^ve>W&&$<(re-at)*(W-wt)/(ve-wt)+at&&(ie=!ie)}return ie}(Mt[0],vt))return Mt.push(ct),!0})||et.push([ct])}),Ia=[],et.length?et.length>1?{type:"MultiPolygon",coordinates:et}:{type:"Polygon",coordinates:et[0]}:null}};function Ga(et){var rt=et(v,0)[0]-et(-v,0)[0];function ct(vt,Mt){var kt=w(vt)0?vt-d:vt+d,Mt),$=(q[0]-q[1])*g,W=(q[0]+q[1])*g;if(kt)return[$,W];var ie=rt*g,_e=$>0^W>0?-1:1;return[_e*$-a(W)*ie,_e*W-a($)*ie]}return et.invert&&(ct.invert=function(vt,Mt){var kt=(vt+Mt)*g,q=(Mt-vt)*g,$=w(kt)<.5*rt&&w(q)<.5*rt;if(!$){var W=rt*g,ie=kt>0^q>0?-1:1,_e=-ie*vt+(q>0?1:-1)*W,ze=-ie*Mt+(kt>0?1:-1)*W;kt=(-_e-ze)*g,q=(_e-ze)*g}var He=et.invert(kt,q);return $||(He[0]+=kt>0?d:-d),He}),(0,_.Z)(ct).rotate([-90,-90,45]).clipAngle(179.999)}function Wl(){return Ga(Zn).scale(176.423)}function Zl(){return Ga(Pn).scale(111.48)}function Sa(et,rt){if(!(0<=(rt=+rt)&&rt<=20))throw new Error("invalid digits");function ct(ie){var _e=ie.length,ze=2,He=new Array(_e);for(He[0]=+ie[0].toFixed(rt),He[1]=+ie[1].toFixed(rt);ze<_e;)He[ze]=ie[ze],++ze;return He}function vt(ie){return ie.map(ct)}function Mt(ie){for(var _e=ct(ie[0]),ze=[_e],He=1;He2||Xe[0]!=_e[0]||Xe[1]!=_e[1])&&(ze.push(Xe),_e=Xe)}return ze.length===1&&ie.length>1&&ze.push(ct(ie[ie.length-1])),ze}function kt(ie){return ie.map(Mt)}function q(ie){if(ie==null)return ie;var _e;switch(ie.type){case"GeometryCollection":_e={type:"GeometryCollection",geometries:ie.geometries.map(q)};break;case"Point":_e={type:"Point",coordinates:ct(ie.coordinates)};break;case"MultiPoint":_e={type:ie.type,coordinates:vt(ie.coordinates)};break;case"LineString":_e={type:ie.type,coordinates:Mt(ie.coordinates)};break;case"MultiLineString":case"Polygon":_e={type:ie.type,coordinates:kt(ie.coordinates)};break;case"MultiPolygon":_e={type:"MultiPolygon",coordinates:ie.coordinates.map(kt)};break;default:return ie}return ie.bbox!=null&&(_e.bbox=ie.bbox),_e}function $(ie){var _e={type:"Feature",properties:ie.properties,geometry:q(ie.geometry)};return ie.id!=null&&(_e.id=ie.id),ie.bbox!=null&&(_e.bbox=ie.bbox),_e}if(et!=null)switch(et.type){case"Feature":return $(et);case"FeatureCollection":var W={type:"FeatureCollection",features:et.features.map($)};return et.bbox!=null&&(W.bbox=et.bbox),W;default:return q(et)}return et}function Cr(et){var rt=u(et);function ct(vt,Mt){var kt=rt?p(vt*rt/2)/rt:vt/2;if(!Mt)return[2*kt,-et];var q=2*s(kt*u(Mt)),$=1/p(Mt);return[u(q)*$,Mt+(1-m(q))*$-et]}return ct.invert=function(vt,Mt){if(w(Mt+=et)c&&--W>0);var He=vt*(ie=p($)),Xe=p(w(Mt)0?v:-v)*(ie+kt*(ze-$)/2+kt*kt*(ze-2*ie+$)/2)]}function rl(){return(0,_.Z)(Yl).scale(152.63)}function il(et,rt){var ct=function(q){function $(W,ie){var _e=m(ie),ze=(q-1)/(q-_e*m(W));return[ze*_e*u(W),ze*u(ie)]}return $.invert=function(W,ie){var _e=W*W+ie*ie,ze=O(_e),He=(q-O(1-_e*(q+1)/(q-1)))/((q-1)/ze+ze/(q-1));return[T(W*He,ze*O(1-He*He)),ze?C(ie*He/ze):0]},$}(et);if(!rt)return ct;var vt=m(rt),Mt=u(rt);function kt(q,$){var W=ct(q,$),ie=W[1],_e=ie*Mt/(et-1)+vt;return[W[0]*vt/_e,ie/_e]}return kt.invert=function(q,$){var W=(et-1)/(et-1-$*Mt);return ct.invert(W*q,W*$*vt)},kt}function al(){var et=2,rt=0,ct=(0,_.r)(il),vt=ct(et,rt);return vt.distance=function(Mt){return arguments.length?ct(et=+Mt,rt):et},vt.tilt=function(Mt){return arguments.length?ct(et,rt=Mt*A):rt*M},vt.scale(432.147).clipAngle(L(1/et)*M-1e-6)}Ra.forEach(function(et){et[1]*=1.0144}),Yl.invert=function(et,rt){var ct=rt/v,vt=90*ct,Mt=r(18,w(vt/5)),kt=i(0,l(Mt));do{var q=Ra[kt][1],$=Ra[kt+1][1],W=Ra[r(19,kt+2)][1],ie=W-q,_e=W-2*$+q,ze=2*(w(ct)-$)/ie,He=_e/ie,Xe=ze*(1-He*ze*(1-2*He*ze));if(Xe>=0||kt===1){vt=(rt>=0?5:-5)*(Xe+Mt);var at,wt=50;do Xe=(Mt=r(18,w(vt)/5))-(kt=l(Mt)),q=Ra[kt][1],$=Ra[kt+1][1],W=Ra[r(19,kt+2)][1],vt-=(at=(rt>=0?v:-v)*($+Xe*(W-q)/2+Xe*Xe*(W-2*$+q)/2)-rt)*M;while(w(at)>b&&--wt>0);break}}while(--kt>=0);var At=Ra[kt][0],re=Ra[kt+1][0],ve=Ra[r(19,kt+2)][0];return[et/(re+Xe*(ve-At)/2+Xe*Xe*(ve-2*re+At)/2),vt*A]};var Or=-179.9999,ol=179.9999,uo=-89.9999,Xl=89.9999;function Cl(et){return et.length>0}function ya(et){return et===-90||et===90?[0,et]:[-180,(rt=et,Math.floor(1e4*rt)/1e4)];var rt}function Vs(et){var rt=et[0],ct=et[1],vt=!1;return rt<=Or?(rt=-180,vt=!0):rt>=ol&&(rt=180,vt=!0),ct<=uo?(ct=-90,vt=!0):ct>=Xl&&(ct=90,vt=!0),vt?[rt,ct]:et}function ns(et){return et.map(Vs)}function Wa(et,rt,ct){for(var vt=0,Mt=et.length;vt=ol||_e<=uo||_e>=Xl){kt[q]=Vs(W);for(var ze=q+1;ze<$;++ze){var He=kt[ze],Xe=He[0],at=He[1];if(Xe>Or&&Xeuo&&at=$)break;ct.push({index:-1,polygon:rt,ring:kt=kt.slice(ze-1)}),kt[0]=ya(kt[0][1]),q=-1,$=kt.length}}}}function xs(et){var rt,ct,vt,Mt,kt,q,$=et.length,W={},ie={};for(rt=0;rt<$;++rt)vt=(ct=et[rt]).ring[0],kt=ct.ring[ct.ring.length-1],vt[0]!==kt[0]||vt[1]!==kt[1]?(ct.index=rt,W[vt]=ie[kt]=ct):(ct.polygon.push(ct.ring),et[rt]=null);for(rt=0;rt<$;++rt)if(ct=et[rt]){if(vt=ct.ring[0],kt=ct.ring[ct.ring.length-1],Mt=ie[vt],q=W[kt],delete W[vt],delete ie[kt],vt[0]===kt[0]&&vt[1]===kt[1]){ct.polygon.push(ct.ring);continue}Mt?(delete ie[vt],delete W[Mt.ring[0]],Mt.ring.pop(),et[Mt.index]=null,ct={index:-1,polygon:Mt.polygon,ring:Mt.ring.concat(ct.ring)},Mt===q?ct.polygon.push(ct.ring):(ct.index=$++,et.push(W[ct.ring[0]]=ie[ct.ring[ct.ring.length-1]]=ct))):q?(delete W[kt],delete ie[q.ring[q.ring.length-1]],ct.ring.pop(),ct={index:$++,polygon:q.polygon,ring:ct.ring.concat(q.ring)},et[q.index]=null,et.push(W[ct.ring[0]]=ie[ct.ring[ct.ring.length-1]]=ct)):(ct.ring.push(ct.ring[0]),ct.polygon.push(ct.ring))}}function _o(et){var rt={type:"Feature",geometry:co(et.geometry)};return et.id!=null&&(rt.id=et.id),et.bbox!=null&&(rt.bbox=et.bbox),et.properties!=null&&(rt.properties=et.properties),rt}function co(et){if(et==null)return et;var rt,ct,vt,Mt;switch(et.type){case"GeometryCollection":rt={type:"GeometryCollection",geometries:et.geometries.map(co)};break;case"Point":rt={type:"Point",coordinates:Vs(et.coordinates)};break;case"MultiPoint":case"LineString":rt={type:et.type,coordinates:ns(et.coordinates)};break;case"MultiLineString":rt={type:"MultiLineString",coordinates:et.coordinates.map(ns)};break;case"Polygon":var kt=[];Wa(et.coordinates,kt,ct=[]),xs(ct),rt={type:"Polygon",coordinates:kt};break;case"MultiPolygon":ct=[],vt=-1,Mt=et.coordinates.length;for(var q=new Array(Mt);++vt0?d-$:$)*M],ie=(0,_.Z)(et(q)).rotate(W),_e=(0,st.Z)(W),ze=ie.center;return delete ie.rotate,ie.center=function(He){return arguments.length?ze(_e(He)):_e.invert(ze())},ie.clipAngle(90)}function Ll(et){var rt=m(et);function ct(vt,Mt){var kt=(0,li.M)(vt,Mt);return kt[0]*=rt,kt}return ct.invert=function(vt,Mt){return li.M.invert(vt/rt,Mt)},ct}function to(){return ho([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function ho(et,rt){return vi(Ll,et,rt)}function Fo(et){if(!(et*=2))return te.N;var rt=-et/2,ct=-rt,vt=et*et,Mt=p(ct),kt=.5/u(ct);function q($,W){var ie=L(m(W)*m($-rt)),_e=L(m(W)*m($-ct));return[((ie*=ie)-(_e*=_e))/(2*et),(W<0?-1:1)*O(4*vt*_e-(vt-ie+_e)*(vt-ie+_e))/(2*et)]}return q.invert=function($,W){var ie,_e,ze=W*W,He=m(O(ze+(ie=$+rt)*ie)),Xe=m(O(ze+(ie=$+ct)*ie));return[T(_e=He-Xe,ie=(He+Xe)*Mt),(W<0?-1:1)*L(O(ie*ie+_e*_e)*kt)]},q}function za(){return di([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function di(et,rt){return vi(Fo,et,rt)}function oa(et,rt){if(w(rt)c&&--$>0);return[a(et)*(O(Mt*Mt+4)+Mt)*d/4,v*q]};var is=4*d+3*O(3),To=2*O(2*d*O(3)/is),_a=Ae(To*O(3)/d,To,is/6);function $l(){return(0,_.Z)(_a).scale(176.84)}function Fa(et,rt){return[et*O(1-3*rt*rt/(d*d)),rt]}function ll(){return(0,_.Z)(Fa).scale(152.63)}function as(et,rt){var ct=m(rt),vt=m(et)*ct,Mt=1-vt,kt=m(et=T(u(et)*ct,-u(rt))),q=u(et);return[q*(ct=O(1-vt*vt))-kt*Mt,-kt*ct-q*Mt]}function _i(){return(0,_.Z)(as).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)}function Si(et,rt){var ct=G(et,rt);return[(ct[0]+et/v)/2,(ct[1]+rt)/2]}function Jl(){return(0,_.Z)(Si).scale(158.837)}Fa.invert=function(et,rt){return[et/O(1-3*rt*rt/(d*d)),rt]},as.invert=function(et,rt){var ct=(et*et+rt*rt)/-2,vt=O(-ct*(2+ct)),Mt=rt*ct+et*vt,kt=et*ct-rt*vt,q=O(kt*kt+Mt*Mt);return[T(vt*Mt,q*(1+ct)),q?-C(vt*kt/q):0]},Si.invert=function(et,rt){var ct=et,vt=rt,Mt=25;do{var kt,q=m(vt),$=u(vt),W=u(2*vt),ie=$*$,_e=q*q,ze=u(ct),He=m(ct/2),Xe=u(ct/2),at=Xe*Xe,wt=1-_e*He*He,At=wt?L(q*He)*O(kt=1/wt):kt=0,re=.5*(2*At*q*Xe+ct/v)-et,ve=.5*(At*$+vt)-rt,Le=.5*kt*(_e*at+At*q*He*ie)+.5/v,Fe=kt*(ze*W/4-At*$*Xe),Ve=.125*kt*(W*Xe-At*$*_e*ze),We=.5*kt*(ie*He+At*at*q)+.5,$e=Fe*Ve-We*Le,tt=(ve*Fe-re*We)/$e,lt=(re*Ve-ve*Le)/$e;ct-=tt,vt-=lt}while((w(tt)>c||w(lt)>c)&&--Mt>0);return[ct,vt]}},33940:function(D,E,e){function _(){return new w}function w(){this.reset()}e.d(E,{Z:function(){return _}}),w.prototype={constructor:w,reset:function(){this.s=this.t=0},add:function(m){T(s,m,this.t),T(this,s.s,this.s),this.s?this.t+=s.t:this.s=s.t},valueOf:function(){return this.s}};var s=new w;function T(m,f,l){var t=m.s=f+l,i=t-f,r=t-i;m.t=f-r+(l-i)}},97860:function(D,E,e){e.d(E,{L9:function(){return r},ZP:function(){return b},gL:function(){return o}});var _,w,s,T,m,f=e(33940),l=e(39695),t=e(73182),i=e(72736),r=(0,f.Z)(),n=(0,f.Z)(),o={point:t.Z,lineStart:t.Z,lineEnd:t.Z,polygonStart:function(){r.reset(),o.lineStart=a,o.lineEnd=u},polygonEnd:function(){var d=+r;n.add(d<0?l.BZ+d:d),this.lineStart=this.lineEnd=this.point=t.Z},sphere:function(){n.add(l.BZ)}};function a(){o.point=p}function u(){c(_,w)}function p(d,v){o.point=c,_=d,w=v,d*=l.uR,v*=l.uR,s=d,T=(0,l.mC)(v=v/2+l.pu),m=(0,l.O$)(v)}function c(d,v){d*=l.uR,v=(v*=l.uR)/2+l.pu;var x=d-s,g=x>=0?1:-1,y=g*x,k=(0,l.mC)(v),h=(0,l.O$)(v),M=m*h,A=T*k+M*(0,l.mC)(y),C=M*g*(0,l.O$)(y);r.add((0,l.fv)(C,A)),s=d,T=k,m=h}function b(d){return n.reset(),(0,i.Z)(d,o),2*n}},77338:function(D,E,e){e.d(E,{Z:function(){return L}});var _,w,s,T,m,f,l,t,i,r,n=e(33940),o=e(97860),a=e(7620),u=e(39695),p=e(72736),c=(0,n.Z)(),b={point:d,lineStart:x,lineEnd:g,polygonStart:function(){b.point=y,b.lineStart=k,b.lineEnd=h,c.reset(),o.gL.polygonStart()},polygonEnd:function(){o.gL.polygonEnd(),b.point=d,b.lineStart=x,b.lineEnd=g,o.L9<0?(_=-(s=180),w=-(T=90)):c>u.Ho?T=90:c<-u.Ho&&(w=-90),r[0]=_,r[1]=s},sphere:function(){_=-(s=180),w=-(T=90)}};function d(O,I){i.push(r=[_=O,s=O]),IT&&(T=I)}function v(O,I){var R=(0,a.Og)([O*u.uR,I*u.uR]);if(t){var U=(0,a.T5)(t,R),B=[U[1],-U[0],0],G=(0,a.T5)(B,U);(0,a.iJ)(G),G=(0,a.Y1)(G);var N,j=O-m,V=j>0?1:-1,H=G[0]*u.RW*V,ee=(0,u.Wn)(j)>180;ee^(V*mT&&(T=N):ee^(V*m<(H=(H+360)%360-180)&&HT&&(T=I)),ee?OM(_,s)&&(s=O):M(O,s)>M(_,s)&&(_=O):s>=_?(O<_&&(_=O),O>s&&(s=O)):O>m?M(_,O)>M(_,s)&&(s=O):M(O,s)>M(_,s)&&(_=O)}else i.push(r=[_=O,s=O]);IT&&(T=I),t=R,m=O}function x(){b.point=v}function g(){r[0]=_,r[1]=s,b.point=d,t=null}function y(O,I){if(t){var R=O-m;c.add((0,u.Wn)(R)>180?R+(R>0?360:-360):R)}else f=O,l=I;o.gL.point(O,I),v(O,I)}function k(){o.gL.lineStart()}function h(){y(f,l),o.gL.lineEnd(),(0,u.Wn)(c)>u.Ho&&(_=-(s=180)),r[0]=_,r[1]=s,t=null}function M(O,I){return(I-=O)<0?I+360:I}function A(O,I){return O[0]-I[0]}function C(O,I){return O[0]<=O[1]?O[0]<=I&&I<=O[1]:IM(U[0],U[1])&&(U[1]=B[1]),M(B[0],U[1])>M(U[0],U[1])&&(U[0]=B[0])):G.push(U=B);for(N=-1/0,I=0,U=G[R=G.length-1];I<=R;U=B,++I)B=G[I],(j=M(U[1],B[0]))>N&&(N=j,_=B[0],s=U[1])}return i=r=null,_===1/0||w===1/0?[[NaN,NaN],[NaN,NaN]]:[[_,w],[s,T]]}},7620:function(D,E,e){e.d(E,{Og:function(){return s},T:function(){return l},T5:function(){return m},Y1:function(){return w},iJ:function(){return t},j9:function(){return T},s0:function(){return f}});var _=e(39695);function w(i){return[(0,_.fv)(i[1],i[0]),(0,_.ZR)(i[2])]}function s(i){var r=i[0],n=i[1],o=(0,_.mC)(n);return[o*(0,_.mC)(r),o*(0,_.O$)(r),(0,_.O$)(n)]}function T(i,r){return i[0]*r[0]+i[1]*r[1]+i[2]*r[2]}function m(i,r){return[i[1]*r[2]-i[2]*r[1],i[2]*r[0]-i[0]*r[2],i[0]*r[1]-i[1]*r[0]]}function f(i,r){i[0]+=r[0],i[1]+=r[1],i[2]+=r[2]}function l(i,r){return[i[0]*r,i[1]*r,i[2]*r]}function t(i){var r=(0,_._b)(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]);i[0]/=r,i[1]/=r,i[2]/=r}},66624:function(D,E,e){e.d(E,{Z:function(){return R}});var _,w,s,T,m,f,l,t,i,r,n,o,a,u,p,c,b=e(39695),d=e(73182),v=e(72736),x={sphere:d.Z,point:g,lineStart:k,lineEnd:A,polygonStart:function(){x.lineStart=C,x.lineEnd=L},polygonEnd:function(){x.lineStart=k,x.lineEnd=A}};function g(U,B){U*=b.uR,B*=b.uR;var G=(0,b.mC)(B);y(G*(0,b.mC)(U),G*(0,b.O$)(U),(0,b.O$)(B))}function y(U,B,G){++_,s+=(U-s)/_,T+=(B-T)/_,m+=(G-m)/_}function k(){x.point=h}function h(U,B){U*=b.uR,B*=b.uR;var G=(0,b.mC)(B);u=G*(0,b.mC)(U),p=G*(0,b.O$)(U),c=(0,b.O$)(B),x.point=M,y(u,p,c)}function M(U,B){U*=b.uR,B*=b.uR;var G=(0,b.mC)(B),N=G*(0,b.mC)(U),j=G*(0,b.O$)(U),V=(0,b.O$)(B),H=(0,b.fv)((0,b._b)((H=p*V-c*j)*H+(H=c*N-u*V)*H+(H=u*j-p*N)*H),u*N+p*j+c*V);w+=H,f+=H*(u+(u=N)),l+=H*(p+(p=j)),t+=H*(c+(c=V)),y(u,p,c)}function A(){x.point=g}function C(){x.point=O}function L(){I(o,a),x.point=g}function O(U,B){o=U,a=B,U*=b.uR,B*=b.uR,x.point=I;var G=(0,b.mC)(B);u=G*(0,b.mC)(U),p=G*(0,b.O$)(U),c=(0,b.O$)(B),y(u,p,c)}function I(U,B){U*=b.uR,B*=b.uR;var G=(0,b.mC)(B),N=G*(0,b.mC)(U),j=G*(0,b.O$)(U),V=(0,b.O$)(B),H=p*V-c*j,ee=c*N-u*V,Q=u*j-p*N,Y=(0,b._b)(H*H+ee*ee+Q*Q),X=(0,b.ZR)(Y),K=Y&&-X/Y;i+=K*H,r+=K*ee,n+=K*Q,w+=X,f+=X*(u+(u=N)),l+=X*(p+(p=j)),t+=X*(c+(c=V)),y(u,p,c)}function R(U){_=w=s=T=m=f=l=t=i=r=n=0,(0,v.Z)(U,x);var B=i,G=r,N=n,j=B*B+G*G+N*N;return j0?oa)&&(o+=n*s.BZ));for(var b,d=o;n>0?d>a:d0?w.pi:-w.pi,n=(0,w.Wn)(t-m);(0,w.Wn)(n-w.pi)0?w.ou:-w.ou),s.point(l,f),s.lineEnd(),s.lineStart(),s.point(r,f),s.point(t,f),T=0):l!==r&&n>=w.pi&&((0,w.Wn)(m-l)w.Ho?(0,w.z4)(((0,w.O$)(a)*(b=(0,w.mC)(p))*(0,w.O$)(u)-(0,w.O$)(p)*(c=(0,w.mC)(a))*(0,w.O$)(o))/(c*b*d)):(a+p)/2}(m,f,t,i),s.point(l,f),s.lineEnd(),s.lineStart(),s.point(r,f),T=0),s.point(m=t,f=i),l=r},lineEnd:function(){s.lineEnd(),m=f=NaN},clean:function(){return 2-T}}},function(s,T,m,f){var l;if(s==null)l=m*w.ou,f.point(-w.pi,l),f.point(0,l),f.point(w.pi,l),f.point(w.pi,0),f.point(w.pi,-l),f.point(0,-l),f.point(-w.pi,-l),f.point(-w.pi,0),f.point(-w.pi,l);else if((0,w.Wn)(s[0]-T[0])>w.Ho){var t=s[0]1&&T.push(T.pop().concat(T.shift()))},result:function(){var m=T;return T=[],s=null,m}}}},1457:function(D,E,e){e.d(E,{Z:function(){return f}});var _=e(7620),w=e(7613),s=e(39695),T=e(67108),m=e(97023);function f(l){var t=(0,s.mC)(l),i=6*s.uR,r=t>0,n=(0,s.Wn)(t)>s.Ho;function o(p,c){return(0,s.mC)(p)*(0,s.mC)(c)>t}function a(p,c,b){var d=(0,_.Og)(p),v=(0,_.Og)(c),x=[1,0,0],g=(0,_.T5)(d,v),y=(0,_.j9)(g,g),k=g[0],h=y-k*k;if(!h)return!b&&p;var M=t*y/h,A=-t*k/h,C=(0,_.T5)(x,g),L=(0,_.T)(x,M),O=(0,_.T)(g,A);(0,_.s0)(L,O);var I=C,R=(0,_.j9)(L,I),U=(0,_.j9)(I,I),B=R*R-U*((0,_.j9)(L,L)-1);if(!(B<0)){var G=(0,s._b)(B),N=(0,_.T)(I,(-R-G)/U);if((0,_.s0)(N,L),N=(0,_.Y1)(N),!b)return N;var j,V=p[0],H=c[0],ee=p[1],Q=c[1];H0^N[1]<((0,s.Wn)(N[0]-V)s.pi^(V<=N[0]&&N[0]<=H)){var K=(0,_.T)(I,(-R+G)/U);return(0,_.s0)(K,L),[N,(0,_.Y1)(K)]}}}function u(p,c){var b=r?l:s.pi-l,d=0;return p<-b?d|=1:p>b&&(d|=2),c<-b?d|=4:c>b&&(d|=8),d}return(0,m.Z)(o,function(p){var c,b,d,v,x;return{lineStart:function(){v=d=!1,x=1},point:function(g,y){var k,h=[g,y],M=o(g,y),A=r?M?0:u(g,y):M?u(g+(g<0?s.pi:-s.pi),y):0;if(!c&&(v=d=M)&&p.lineStart(),M!==d&&(!(k=a(c,h))||(0,T.Z)(c,k)||(0,T.Z)(h,k))&&(h[2]=1),M!==d)x=0,M?(p.lineStart(),k=a(h,c),p.point(k[0],k[1])):(k=a(c,h),p.point(k[0],k[1],2),p.lineEnd()),c=k;else if(n&&c&&r^M){var C;A&b||!(C=a(h,c,!0))||(x=0,r?(p.lineStart(),p.point(C[0][0],C[0][1]),p.point(C[1][0],C[1][1]),p.lineEnd()):(p.point(C[1][0],C[1][1]),p.lineEnd(),p.lineStart(),p.point(C[0][0],C[0][1],3)))}!M||c&&(0,T.Z)(c,h)||p.point(h[0],h[1]),c=h,d=M,b=A},lineEnd:function(){d&&p.lineEnd(),c=null},clean:function(){return x|(v&&d)<<1}}},function(p,c,b,d){(0,w.m)(d,l,i,b,p,c)},r?[0,-l]:[-s.pi,l-s.pi])}},97023:function(D,E,e){e.d(E,{Z:function(){return f}});var _=e(85272),w=e(46225),s=e(39695),T=e(23071),m=e(33064);function f(i,r,n,o){return function(a){var u,p,c,b=r(a),d=(0,_.Z)(),v=r(d),x=!1,g={point:y,lineStart:h,lineEnd:M,polygonStart:function(){g.point=A,g.lineStart=C,g.lineEnd=L,p=[],u=[]},polygonEnd:function(){g.point=y,g.lineStart=h,g.lineEnd=M,p=(0,m.TS)(p);var O=(0,T.Z)(u,o);p.length?(x||(a.polygonStart(),x=!0),(0,w.Z)(p,t,O,n,a)):O&&(x||(a.polygonStart(),x=!0),a.lineStart(),n(null,null,1,a),a.lineEnd()),x&&(a.polygonEnd(),x=!1),p=u=null},sphere:function(){a.polygonStart(),a.lineStart(),n(null,null,1,a),a.lineEnd(),a.polygonEnd()}};function y(O,I){i(O,I)&&a.point(O,I)}function k(O,I){b.point(O,I)}function h(){g.point=k,b.lineStart()}function M(){g.point=y,b.lineEnd()}function A(O,I){c.push([O,I]),v.point(O,I)}function C(){v.lineStart(),c=[]}function L(){A(c[0][0],c[0][1]),v.lineEnd();var O,I,R,U,B=v.clean(),G=d.result(),N=G.length;if(c.pop(),u.push(c),c=null,N)if(1&B){if((I=(R=G[0]).length-1)>0){for(x||(a.polygonStart(),x=!0),a.lineStart(),O=0;O1&&2&B&&G.push(G.pop().concat(G.shift())),p.push(G.filter(l))}return g}}function l(i){return i.length>1}function t(i,r){return((i=i.x)[0]<0?i[1]-s.ou-s.Ho:s.ou-i[1])-((r=r.x)[0]<0?r[1]-s.ou-s.Ho:s.ou-r[1])}},87605:function(D,E,e){e.d(E,{Z:function(){return l}});var _=e(39695),w=e(85272),s=e(46225),T=e(33064),m=1e9,f=-m;function l(t,i,r,n){function o(b,d){return t<=b&&b<=r&&i<=d&&d<=n}function a(b,d,v,x){var g=0,y=0;if(b==null||(g=u(b,v))!==(y=u(d,v))||c(b,d)<0^v>0)do x.point(g===0||g===3?t:r,g>1?n:i);while((g=(g+v+4)%4)!==y);else x.point(d[0],d[1])}function u(b,d){return(0,_.Wn)(b[0]-t)<_.Ho?d>0?0:3:(0,_.Wn)(b[0]-r)<_.Ho?d>0?2:1:(0,_.Wn)(b[1]-i)<_.Ho?d>0?1:0:d>0?3:2}function p(b,d){return c(b.x,d.x)}function c(b,d){var v=u(b,1),x=u(d,1);return v!==x?v-x:v===0?d[1]-b[1]:v===1?b[0]-d[0]:v===2?b[1]-d[1]:d[0]-b[0]}return function(b){var d,v,x,g,y,k,h,M,A,C,L,O=b,I=(0,w.Z)(),R={point:U,lineStart:function(){R.point=B,v&&v.push(x=[]),C=!0,A=!1,h=M=NaN},lineEnd:function(){d&&(B(g,y),k&&A&&I.rejoin(),d.push(I.result())),R.point=U,A&&O.lineEnd()},polygonStart:function(){O=I,d=[],v=[],L=!0},polygonEnd:function(){var G=function(){for(var V=0,H=0,ee=v.length;Hn&&(oe-Q)*(n-Y)>(se-Y)*(t-Q)&&++V:se<=n&&(oe-Q)*(n-Y)<(se-Y)*(t-Q)&&--V;return V}(),N=L&&G,j=(d=(0,T.TS)(d)).length;(N||j)&&(b.polygonStart(),N&&(b.lineStart(),a(null,null,1,b),b.lineEnd()),j&&(0,s.Z)(d,p,G,a,b),b.polygonEnd()),O=b,d=v=x=null}};function U(G,N){o(G,N)&&O.point(G,N)}function B(G,N){var j=o(G,N);if(v&&x.push([G,N]),C)g=G,y=N,k=j,C=!1,j&&(O.lineStart(),O.point(G,N));else if(j&&A)O.point(G,N);else{var V=[h=Math.max(f,Math.min(m,h)),M=Math.max(f,Math.min(m,M))],H=[G=Math.max(f,Math.min(m,G)),N=Math.max(f,Math.min(m,N))];(function(ee,Q,Y,X,K,te){var ae,oe=ee[0],se=ee[1],fe=0,xe=1,he=Q[0]-oe,de=Q[1]-se;if(ae=Y-oe,he||!(ae>0)){if(ae/=he,he<0){if(ae0){if(ae>xe)return;ae>fe&&(fe=ae)}if(ae=K-oe,he||!(ae<0)){if(ae/=he,he<0){if(ae>xe)return;ae>fe&&(fe=ae)}else if(he>0){if(ae0)){if(ae/=de,de<0){if(ae0){if(ae>xe)return;ae>fe&&(fe=ae)}if(ae=te-se,de||!(ae<0)){if(ae/=de,de<0){if(ae>xe)return;ae>fe&&(fe=ae)}else if(de>0){if(ae0&&(ee[0]=oe+fe*he,ee[1]=se+fe*de),xe<1&&(Q[0]=oe+xe*he,Q[1]=se+xe*de),!0}}}}})(V,H,t,i,r,n)?(A||(O.lineStart(),O.point(V[0],V[1])),O.point(H[0],H[1]),j||O.lineEnd(),L=!1):j&&(O.lineStart(),O.point(G,N),L=!1)}h=G,M=N,A=j}return R}}},46225:function(D,E,e){e.d(E,{Z:function(){return T}});var _=e(67108),w=e(39695);function s(f,l,t,i){this.x=f,this.z=l,this.o=t,this.e=i,this.v=!1,this.n=this.p=null}function T(f,l,t,i,r){var n,o,a=[],u=[];if(f.forEach(function(x){if(!((g=x.length-1)<=0)){var g,y,k=x[0],h=x[g];if((0,_.Z)(k,h)){if(!k[2]&&!h[2]){for(r.lineStart(),n=0;n=0;--n)r.point((c=p[n])[0],c[1]);else i(d.x,d.p.x,-1,r);d=d.p}p=(d=d.o).z,v=!v}while(!d.v);r.lineEnd()}}}function m(f){if(l=f.length){for(var l,t,i=0,r=f[0];++i0&&(jn=M($t[$n],$t[$n-1]))>0&&Ln<=jn&&En<=jn&&(Ln+En-jn)*(1-Math.pow((Ln-En)/jn,2))u.Ho}).map(hr)).concat((0,N.w6)((0,u.mD)($n/un)*un,jn,un).filter(function(dn){return(0,u.Wn)(dn%On)>u.Ho}).map(tn))}return pn.lines=function(){return bn().map(function(dn){return{type:"LineString",coordinates:dn}})},pn.outline=function(){return{type:"Polygon",coordinates:[Pn(En).concat(jt(Zn).slice(1),Pn(Ln).reverse().slice(1),jt(Qn).reverse().slice(1))]}},pn.extent=function(dn){return arguments.length?pn.extentMajor(dn).extentMinor(dn):pn.extentMinor()},pn.extentMajor=function(dn){return arguments.length?(En=+dn[0][0],Ln=+dn[1][0],Qn=+dn[0][1],Zn=+dn[1][1],En>Ln&&(dn=En,En=Ln,Ln=dn),Qn>Zn&&(dn=Qn,Qn=Zn,Zn=dn),pn.precision(Sn)):[[En,Qn],[Ln,Zn]]},pn.extentMinor=function(dn){return arguments.length?(mn=+dn[0][0],$t=+dn[1][0],$n=+dn[0][1],jn=+dn[1][1],mn>$t&&(dn=mn,mn=$t,$t=dn),$n>jn&&(dn=$n,$n=jn,jn=dn),pn.precision(Sn)):[[mn,$n],[$t,jn]]},pn.step=function(dn){return arguments.length?pn.stepMajor(dn).stepMinor(dn):pn.stepMinor()},pn.stepMajor=function(dn){return arguments.length?(Rn=+dn[0],On=+dn[1],pn):[Rn,On]},pn.stepMinor=function(dn){return arguments.length?(Jt=+dn[0],un=+dn[1],pn):[Jt,un]},pn.precision=function(dn){return arguments.length?(Sn=+dn,hr=j($n,jn,90),tn=V(mn,$t,Sn),Pn=j(Qn,Zn,90),jt=V(En,Ln,Sn),pn):Sn},pn.extentMajor([[-180,-90+u.Ho],[180,90-u.Ho]]).extentMinor([[-180,-80-u.Ho],[180,80+u.Ho]])}function ee(){return H()()}var Q,Y,X,K,te=e(83074),ae=e(8593),oe=(0,a.Z)(),se=(0,a.Z)(),fe={point:p.Z,lineStart:p.Z,lineEnd:p.Z,polygonStart:function(){fe.lineStart=xe,fe.lineEnd=pe},polygonEnd:function(){fe.lineStart=fe.lineEnd=fe.point=p.Z,oe.add((0,u.Wn)(se)),se.reset()},result:function(){var $t=oe/2;return oe.reset(),$t}};function xe(){fe.point=he}function he($t,mn){fe.point=de,Q=X=$t,Y=K=mn}function de($t,mn){se.add(K*$t-X*mn),X=$t,K=mn}function pe(){de(Q,Y)}var ye,Re,we,Ae,Me=fe,Ce=e(3559),ne=0,ue=0,me=0,Te=0,Ee=0,Ue=0,De=0,je=0,ge=0,be={point:Se,lineStart:Ne,lineEnd:st,polygonStart:function(){be.lineStart=ot,be.lineEnd=ft},polygonEnd:function(){be.point=Se,be.lineStart=Ne,be.lineEnd=st},result:function(){var $t=ge?[De/ge,je/ge]:Ue?[Te/Ue,Ee/Ue]:me?[ne/me,ue/me]:[NaN,NaN];return ne=ue=me=Te=Ee=Ue=De=je=ge=0,$t}};function Se($t,mn){ne+=$t,ue+=mn,++me}function Ne(){be.point=Ye}function Ye($t,mn){be.point=Ze,Se(we=$t,Ae=mn)}function Ze($t,mn){var Ln=$t-we,En=mn-Ae,jn=(0,u._b)(Ln*Ln+En*En);Te+=jn*(we+$t)/2,Ee+=jn*(Ae+mn)/2,Ue+=jn,Se(we=$t,Ae=mn)}function st(){be.point=Se}function ot(){be.point=yt}function ft(){Et(ye,Re)}function yt($t,mn){be.point=Et,Se(ye=we=$t,Re=Ae=mn)}function Et($t,mn){var Ln=$t-we,En=mn-Ae,jn=(0,u._b)(Ln*Ln+En*En);Te+=jn*(we+$t)/2,Ee+=jn*(Ae+mn)/2,Ue+=jn,De+=(jn=Ae*$t-we*mn)*(we+$t),je+=jn*(Ae+mn),ge+=3*jn,Se(we=$t,Ae=mn)}var Tt=be;function xt($t){this._context=$t}xt.prototype={_radius:4.5,pointRadius:function($t){return this._radius=$t,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($t,mn){switch(this._point){case 0:this._context.moveTo($t,mn),this._point=1;break;case 1:this._context.lineTo($t,mn);break;default:this._context.moveTo($t+this._radius,mn),this._context.arc($t,mn,this._radius,0,u.BZ)}},result:p.Z};var Dt,It,Ft,qt,Nt,Je=(0,a.Z)(),Ke={point:p.Z,lineStart:function(){Ke.point=Ge},lineEnd:function(){Dt&&nt(It,Ft),Ke.point=p.Z},polygonStart:function(){Dt=!0},polygonEnd:function(){Dt=null},result:function(){var $t=+Je;return Je.reset(),$t}};function Ge($t,mn){Ke.point=nt,It=qt=$t,Ft=Nt=mn}function nt($t,mn){qt-=$t,Nt-=mn,Je.add((0,u._b)(qt*qt+Nt*Nt)),qt=$t,Nt=mn}var ht=Ke;function Oe(){this._string=[]}function Be($t){return"m0,"+$t+"a"+$t+","+$t+" 0 1,1 0,"+-2*$t+"a"+$t+","+$t+" 0 1,1 0,"+2*$t+"z"}function Qe($t,mn){var Ln,En,jn=4.5;function $n(Zn){return Zn&&(typeof jn=="function"&&En.pointRadius(+jn.apply(this,arguments)),(0,c.Z)(Zn,Ln(En))),En.result()}return $n.area=function(Zn){return(0,c.Z)(Zn,Ln(Me)),Me.result()},$n.measure=function(Zn){return(0,c.Z)(Zn,Ln(ht)),ht.result()},$n.bounds=function(Zn){return(0,c.Z)(Zn,Ln(Ce.Z)),Ce.Z.result()},$n.centroid=function(Zn){return(0,c.Z)(Zn,Ln(Tt)),Tt.result()},$n.projection=function(Zn){return arguments.length?(Ln=Zn==null?($t=null,ae.Z):($t=Zn).stream,$n):$t},$n.context=function(Zn){return arguments.length?(En=Zn==null?(mn=null,new Oe):new xt(mn=Zn),typeof jn!="function"&&En.pointRadius(jn),$n):mn},$n.pointRadius=function(Zn){return arguments.length?(jn=typeof Zn=="function"?Zn:(En.pointRadius(+Zn),+Zn),$n):jn},$n.projection($t).context(mn)}Oe.prototype={_radius:4.5,_circle:Be(4.5),pointRadius:function($t){return($t=+$t)!==this._radius&&(this._radius=$t,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($t,mn){switch(this._point){case 0:this._string.push("M",$t,",",mn),this._point=1;break;case 1:this._string.push("L",$t,",",mn);break;default:this._circle==null&&(this._circle=Be(this._radius)),this._string.push("M",$t,",",mn,this._circle)}},result:function(){if(this._string.length){var $t=this._string.join("");return this._string=[],$t}return null}};var ut=e(15002);function pt($t){var mn=0,Ln=u.pi/3,En=(0,ut.r)($t),jn=En(mn,Ln);return jn.parallels=function($n){return arguments.length?En(mn=$n[0]*u.uR,Ln=$n[1]*u.uR):[mn*u.RW,Ln*u.RW]},jn}function bt($t,mn){var Ln=(0,u.O$)($t),En=(Ln+(0,u.O$)(mn))/2;if((0,u.Wn)(En)=.12&&Sn<.234&&On>=-.425&&On<-.214?Qn:Sn>=.166&&Sn<.234&&On>=-.214&&On<-.115?hr:Zn).invert(Jt)},Pn.stream=function(Jt){return $t&&mn===Jt?$t:(un=[Zn.stream(mn=Jt),Qn.stream(Jt),hr.stream(Jt)],Rn=un.length,$t={point:function(On,Sn){for(var pn=-1;++pn0?Qn<-u.ou+u.Ho&&(Qn=-u.ou+u.Ho):Qn>u.ou-u.Ho&&(Qn=u.ou-u.Ho);var hr=jn/(0,u.sQ)(Kt(Qn),En);return[hr*(0,u.O$)(En*Zn),jn-hr*(0,u.mC)(En*Zn)]}return $n.invert=function(Zn,Qn){var hr=jn-Qn,tn=(0,u.Xx)(En)*(0,u._b)(Zn*Zn+hr*hr),Pn=(0,u.fv)(Zn,(0,u.Wn)(hr))*(0,u.Xx)(hr);return hr*En<0&&(Pn-=u.pi*(0,u.Xx)(Zn)*(0,u.Xx)(hr)),[Pn/En,2*(0,u.z4)((0,u.sQ)(jn/tn,1/En))-u.ou]},$n}function yn(){return pt(nn).scale(109.5).parallels([30,30])}Wt.invert=function($t,mn){return[$t,2*(0,u.z4)((0,u.Qq)(mn))-u.ou]};var ln=e(97492);function kn($t,mn){var Ln=(0,u.mC)($t),En=$t===mn?(0,u.O$)($t):(Ln-(0,u.mC)(mn))/(mn-$t),jn=Ln/En+$t;if((0,u.Wn)(En)2?En[2]+90:90]):[(En=Ln())[0],En[1],En[2]-90]},Ln([0,0,90]).scale(159.155)}gr.invert=(0,kr.O)(function($t){return 2*(0,u.z4)($t)}),dr.invert=function($t,mn){return[-mn,2*(0,u.z4)((0,u.Qq)($t))-u.ou]}},83074:function(D,E,e){e.d(E,{Z:function(){return w}});var _=e(39695);function w(s,T){var m=s[0]*_.uR,f=s[1]*_.uR,l=T[0]*_.uR,t=T[1]*_.uR,i=(0,_.mC)(f),r=(0,_.O$)(f),n=(0,_.mC)(t),o=(0,_.O$)(t),a=i*(0,_.mC)(m),u=i*(0,_.O$)(m),p=n*(0,_.mC)(l),c=n*(0,_.O$)(l),b=2*(0,_.ZR)((0,_._b)((0,_.Jy)(t-f)+i*n*(0,_.Jy)(l-m))),d=(0,_.O$)(b),v=b?function(x){var g=(0,_.O$)(x*=b)/d,y=(0,_.O$)(b-x)/d,k=y*a+g*p,h=y*u+g*c,M=y*r+g*o;return[(0,_.fv)(h,k)*_.RW,(0,_.fv)(M,(0,_._b)(k*k+h*h))*_.RW]}:function(){return[m*_.RW,f*_.RW]};return v.distance=b,v}},39695:function(D,E,e){e.d(E,{BZ:function(){return f},Ho:function(){return _},Jy:function(){return k},Kh:function(){return g},O$:function(){return b},OR:function(){return x},Qq:function(){return u},RW:function(){return l},Wn:function(){return i},Xx:function(){return d},ZR:function(){return y},_b:function(){return v},aW:function(){return w},cM:function(){return p},fv:function(){return n},mC:function(){return o},mD:function(){return a},ou:function(){return T},pi:function(){return s},pu:function(){return m},sQ:function(){return c},uR:function(){return t},z4:function(){return r}});var _=1e-6,w=1e-12,s=Math.PI,T=s/2,m=s/4,f=2*s,l=180/s,t=s/180,i=Math.abs,r=Math.atan,n=Math.atan2,o=Math.cos,a=Math.ceil,u=Math.exp,p=Math.log,c=Math.pow,b=Math.sin,d=Math.sign||function(h){return h>0?1:h<0?-1:0},v=Math.sqrt,x=Math.tan;function g(h){return h>1?0:h<-1?s:Math.acos(h)}function y(h){return h>1?T:h<-1?-T:Math.asin(h)}function k(h){return(h=b(h/2))*h}},73182:function(D,E,e){function _(){}e.d(E,{Z:function(){return _}})},3559:function(D,E,e){var _=e(73182),w=1/0,s=w,T=-w,m=T,f={point:function(l,t){lT&&(T=l),tm&&(m=t)},lineStart:_.Z,lineEnd:_.Z,polygonStart:_.Z,polygonEnd:_.Z,result:function(){var l=[[w,s],[T,m]];return T=m=-(s=w=1/0),l}};E.Z=f},67108:function(D,E,e){e.d(E,{Z:function(){return w}});var _=e(39695);function w(s,T){return(0,_.Wn)(s[0]-T[0])<_.Ho&&(0,_.Wn)(s[1]-T[1])<_.Ho}},23071:function(D,E,e){e.d(E,{Z:function(){return f}});var _=e(33940),w=e(7620),s=e(39695),T=(0,_.Z)();function m(l){return(0,s.Wn)(l[0])<=s.pi?l[0]:(0,s.Xx)(l[0])*(((0,s.Wn)(l[0])+s.pi)%s.BZ-s.pi)}function f(l,t){var i=m(t),r=t[1],n=(0,s.O$)(r),o=[(0,s.O$)(i),-(0,s.mC)(i),0],a=0,u=0;T.reset(),n===1?r=s.ou+s.Ho:n===-1&&(r=-s.ou-s.Ho);for(var p=0,c=l.length;p=0?1:-1,U=R*I,B=U>s.pi,G=y*L;if(T.add((0,s.fv)(G*R*(0,s.O$)(U),k*O+G*(0,s.mC)(U))),a+=B?I+R*s.BZ:I,B^x>=i^A>=i){var N=(0,w.T5)((0,w.Og)(v),(0,w.Og)(M));(0,w.iJ)(N);var j=(0,w.T5)(o,N);(0,w.iJ)(j);var V=(B^I>=0?-1:1)*(0,s.ZR)(j[2]);(r>V||r===V&&(N[0]||N[1]))&&(u+=B^I>=0?1:-1)}}return(a<-s.Ho||a4*g&&N--){var Q=A+U,Y=C+B,X=L+G,K=(0,f._b)(Q*Q+Y*Y+X*X),te=(0,f.ZR)(X/=K),ae=(0,f.Wn)((0,f.Wn)(X)-1)g||(0,f.Wn)((V*xe+H*he)/ee-.5)>.3||A*U+C*B+L*G2?xe[2]%360*f.uR:0,se()):[G*f.RW,N*f.RW,j*f.RW]},ae.angle=function(xe){return arguments.length?(V=xe%360*f.uR,se()):V*f.RW},ae.reflectX=function(xe){return arguments.length?(H=xe?-1:1,se()):H<0},ae.reflectY=function(xe){return arguments.length?(ee=xe?-1:1,se()):ee<0},ae.precision=function(xe){return arguments.length?(h=o(M,te=xe*xe),fe()):(0,f._b)(te)},ae.fitExtent=function(xe,he){return(0,i.qg)(ae,xe,he)},ae.fitSize=function(xe,he){return(0,i.mF)(ae,xe,he)},ae.fitWidth=function(xe,he){return(0,i.V6)(ae,xe,he)},ae.fitHeight=function(xe,he){return(0,i.rf)(ae,xe,he)},function(){return v=d.apply(this,arguments),ae.invert=v.invert&&oe,se()}}},26867:function(D,E,e){e.d(E,{K:function(){return s},Z:function(){return T}});var _=e(15002),w=e(39695);function s(m,f){var l=f*f,t=l*l;return[m*(.8707-.131979*l+t*(t*(.003971*l-.001529*t)-.013791)),f*(1.007226+l*(.015085+t*(.028874*l-.044475-.005916*t)))]}function T(){return(0,_.Z)(s).scale(175.295)}s.invert=function(m,f){var l,t=f,i=25;do{var r=t*t,n=r*r;t-=l=(t*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))-f)/(1.007226+r*(.045255+n*(.259866*r-.311325-.06507600000000001*n)))}while((0,w.Wn)(l)>w.Ho&&--i>0);return[m/(.8707+(r=t*t)*(r*(r*r*r*(.003971-.001529*r)-.013791)-.131979)),t]}},57962:function(D,E,e){e.d(E,{I:function(){return T},Z:function(){return m}});var _=e(39695),w=e(25382),s=e(15002);function T(f,l){return[(0,_.mC)(l)*(0,_.O$)(f),(0,_.O$)(l)]}function m(){return(0,s.Z)(T).scale(249.5).clipAngle(90+_.Ho)}T.invert=(0,w.O)(_.ZR)},49386:function(D,E,e){e.d(E,{I:function(){return T},Z:function(){return t}});var _=e(96059),w=e(39695);function s(i,r){return[(0,w.Wn)(i)>w.pi?i+Math.round(-i/w.BZ)*w.BZ:i,r]}function T(i,r,n){return(i%=w.BZ)?r||n?(0,_.Z)(f(i),l(r,n)):f(i):r||n?l(r,n):s}function m(i){return function(r,n){return[(r+=i)>w.pi?r-w.BZ:r<-w.pi?r+w.BZ:r,n]}}function f(i){var r=m(i);return r.invert=m(-i),r}function l(i,r){var n=(0,w.mC)(i),o=(0,w.O$)(i),a=(0,w.mC)(r),u=(0,w.O$)(r);function p(c,b){var d=(0,w.mC)(b),v=(0,w.mC)(c)*d,x=(0,w.O$)(c)*d,g=(0,w.O$)(b),y=g*n+v*o;return[(0,w.fv)(x*a-y*u,v*n-g*o),(0,w.ZR)(y*a+x*u)]}return p.invert=function(c,b){var d=(0,w.mC)(b),v=(0,w.mC)(c)*d,x=(0,w.O$)(c)*d,g=(0,w.O$)(b),y=g*a-x*u;return[(0,w.fv)(x*a+g*u,v*n+y*o),(0,w.ZR)(y*n-v*o)]},p}function t(i){function r(n){return(n=i(n[0]*w.uR,n[1]*w.uR))[0]*=w.RW,n[1]*=w.RW,n}return i=T(i[0]*w.uR,i[1]*w.uR,i.length>2?i[2]*w.uR:0),r.invert=function(n){return(n=i.invert(n[0]*w.uR,n[1]*w.uR))[0]*=w.RW,n[1]*=w.RW,n},r}s.invert=s},72736:function(D,E,e){function _(l,t){l&&s.hasOwnProperty(l.type)&&s[l.type](l,t)}e.d(E,{Z:function(){return f}});var w={Feature:function(l,t){_(l.geometry,t)},FeatureCollection:function(l,t){for(var i=l.features,r=-1,n=i.length;++r=0;)ne+=ue[me].value;else ne=1;Ce.value=ne}function f(Ce,ne){var ue,me,Te,Ee,Ue,De=new r(Ce),je=+Ce.value&&(De.value=Ce.value),ge=[De];for(ne==null&&(ne=l);ue=ge.pop();)if(je&&(ue.value=+ue.data.value),(Te=ne(ue.data))&&(Ue=Te.length))for(ue.children=new Array(Ue),Ee=Ue-1;Ee>=0;--Ee)ge.push(me=ue.children[Ee]=new r(Te[Ee])),me.parent=ue,me.depth=ue.depth+1;return De.eachBefore(i)}function l(Ce){return Ce.children}function t(Ce){Ce.data=Ce.data.data}function i(Ce){var ne=0;do Ce.height=ne;while((Ce=Ce.parent)&&Ce.height<++ne)}function r(Ce){this.data=Ce,this.depth=this.height=0,this.parent=null}e.r(E),e.d(E,{cluster:function(){return T},hierarchy:function(){return f},pack:function(){return R},packEnclose:function(){return o},packSiblings:function(){return M},partition:function(){return V},stratify:function(){return X},tree:function(){return xe},treemap:function(){return Re},treemapBinary:function(){return we},treemapDice:function(){return j},treemapResquarify:function(){return Me},treemapSlice:function(){return he},treemapSliceDice:function(){return Ae},treemapSquarify:function(){return ye}}),r.prototype=f.prototype={constructor:r,count:function(){return this.eachAfter(m)},each:function(Ce){var ne,ue,me,Te,Ee=this,Ue=[Ee];do for(ne=Ue.reverse(),Ue=[];Ee=ne.pop();)if(Ce(Ee),ue=Ee.children)for(me=0,Te=ue.length;me=0;--ue)Te.push(ne[ue]);return this},sum:function(Ce){return this.eachAfter(function(ne){for(var ue=+Ce(ne.data)||0,me=ne.children,Te=me&&me.length;--Te>=0;)ue+=me[Te].value;ne.value=ue})},sort:function(Ce){return this.eachBefore(function(ne){ne.children&&ne.children.sort(Ce)})},path:function(Ce){for(var ne=this,ue=function(Ee,Ue){if(Ee===Ue)return Ee;var De=Ee.ancestors(),je=Ue.ancestors(),ge=null;for(Ee=De.pop(),Ue=je.pop();Ee===Ue;)ge=Ee,Ee=De.pop(),Ue=je.pop();return ge}(ne,Ce),me=[ne];ne!==ue;)ne=ne.parent,me.push(ne);for(var Te=me.length;Ce!==ue;)me.splice(Te,0,Ce),Ce=Ce.parent;return me},ancestors:function(){for(var Ce=this,ne=[Ce];Ce=Ce.parent;)ne.push(Ce);return ne},descendants:function(){var Ce=[];return this.each(function(ne){Ce.push(ne)}),Ce},leaves:function(){var Ce=[];return this.eachBefore(function(ne){ne.children||Ce.push(ne)}),Ce},links:function(){var Ce=this,ne=[];return Ce.each(function(ue){ue!==Ce&&ne.push({source:ue.parent,target:ue})}),ne},copy:function(){return f(this).eachBefore(t)}};var n=Array.prototype.slice;function o(Ce){for(var ne,ue,me=0,Te=(Ce=function(Ue){for(var De,je,ge=Ue.length;ge;)je=Math.random()*ge--|0,De=Ue[ge],Ue[ge]=Ue[je],Ue[je]=De;return Ue}(n.call(Ce))).length,Ee=[];me0&&ue*ue>me*me+Te*Te}function c(Ce,ne){for(var ue=0;ue(Ue*=Ue)?(me=(ge+Ue-Te)/(2*ge),Ee=Math.sqrt(Math.max(0,Ue/ge-me*me)),ue.x=Ce.x-me*De-Ee*je,ue.y=Ce.y-me*je+Ee*De):(me=(ge+Te-Ue)/(2*ge),Ee=Math.sqrt(Math.max(0,Te/ge-me*me)),ue.x=ne.x+me*De-Ee*je,ue.y=ne.y+me*je+Ee*De)):(ue.x=ne.x+ue.r,ue.y=ne.y)}function g(Ce,ne){var ue=Ce.r+ne.r-1e-6,me=ne.x-Ce.x,Te=ne.y-Ce.y;return ue>0&&ue*ue>me*me+Te*Te}function y(Ce){var ne=Ce._,ue=Ce.next._,me=ne.r+ue.r,Te=(ne.x*ue.r+ue.x*ne.r)/me,Ee=(ne.y*ue.r+ue.y*ne.r)/me;return Te*Te+Ee*Ee}function k(Ce){this._=Ce,this.next=null,this.previous=null}function h(Ce){if(!(Te=Ce.length))return 0;var ne,ue,me,Te,Ee,Ue,De,je,ge,be,Se;if((ne=Ce[0]).x=0,ne.y=0,!(Te>1))return ne.r;if(ue=Ce[1],ne.x=-ue.r,ue.x=ne.r,ue.y=0,!(Te>2))return ne.r+ue.r;x(ue,ne,me=Ce[2]),ne=new k(ne),ue=new k(ue),me=new k(me),ne.next=me.previous=ue,ue.next=ne.previous=me,me.next=ue.previous=ne;e:for(De=3;De0)throw new Error("cycle");return Ue}return ue.id=function(me){return arguments.length?(Ce=C(me),ue):Ce},ue.parentId=function(me){return arguments.length?(ne=C(me),ue):ne},ue}function K(Ce,ne){return Ce.parent===ne.parent?1:2}function te(Ce){var ne=Ce.children;return ne?ne[0]:Ce.t}function ae(Ce){var ne=Ce.children;return ne?ne[ne.length-1]:Ce.t}function oe(Ce,ne,ue){var me=ue/(ne.i-Ce.i);ne.c-=me,ne.s+=ue,Ce.c+=me,ne.z+=ue,ne.m+=ue}function se(Ce,ne,ue){return Ce.a.parent===ne.parent?Ce.a:ue}function fe(Ce,ne){this._=Ce,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=ne}function xe(){var Ce=K,ne=1,ue=1,me=null;function Te(je){var ge=function(ft){for(var yt,Et,Tt,xt,Dt,It=new fe(ft,0),Ft=[It];yt=Ft.pop();)if(Tt=yt._.children)for(yt.children=new Array(Dt=Tt.length),xt=Dt-1;xt>=0;--xt)Ft.push(Et=yt.children[xt]=new fe(Tt[xt],xt)),Et.parent=yt;return(It.parent=new fe(null,0)).children=[It],It}(je);if(ge.eachAfter(Ee),ge.parent.m=-ge.z,ge.eachBefore(Ue),me)je.eachBefore(De);else{var be=je,Se=je,Ne=je;je.eachBefore(function(ft){ft.xSe.x&&(Se=ft),ft.depth>Ne.depth&&(Ne=ft)});var Ye=be===Se?1:Ce(be,Se)/2,Ze=Ye-be.x,st=ne/(Se.x+Ye+Ze),ot=ue/(Ne.depth||1);je.eachBefore(function(ft){ft.x=(ft.x+Ze)*st,ft.y=ft.depth*ot})}return je}function Ee(je){var ge=je.children,be=je.parent.children,Se=je.i?be[je.i-1]:null;if(ge){(function(Ye){for(var Ze,st=0,ot=0,ft=Ye.children,yt=ft.length;--yt>=0;)(Ze=ft[yt]).z+=st,Ze.m+=st,st+=Ze.s+(ot+=Ze.c)})(je);var Ne=(ge[0].z+ge[ge.length-1].z)/2;Se?(je.z=Se.z+Ce(je._,Se._),je.m=je.z-Ne):je.z=Ne}else Se&&(je.z=Se.z+Ce(je._,Se._));je.parent.A=function(Ye,Ze,st){if(Ze){for(var ot,ft=Ye,yt=Ye,Et=Ze,Tt=ft.parent.children[0],xt=ft.m,Dt=yt.m,It=Et.m,Ft=Tt.m;Et=ae(Et),ft=te(ft),Et&&ft;)Tt=te(Tt),(yt=ae(yt)).a=Ye,(ot=Et.z+It-ft.z-xt+Ce(Et._,ft._))>0&&(oe(se(Et,Ye,st),Ye,ot),xt+=ot,Dt+=ot),It+=Et.m,xt+=ft.m,Ft+=Tt.m,Dt+=yt.m;Et&&!ae(yt)&&(yt.t=Et,yt.m+=It-Dt),ft&&!te(Tt)&&(Tt.t=ft,Tt.m+=xt-Ft,st=Ye)}return st}(je,Se,je.parent.A||be[0])}function Ue(je){je._.x=je.z+je.parent.m,je.m+=je.parent.m}function De(je){je.x*=ne,je.y=je.depth*ue}return Te.separation=function(je){return arguments.length?(Ce=je,Te):Ce},Te.size=function(je){return arguments.length?(me=!1,ne=+je[0],ue=+je[1],Te):me?null:[ne,ue]},Te.nodeSize=function(je){return arguments.length?(me=!0,ne=+je[0],ue=+je[1],Te):me?[ne,ue]:null},Te}function he(Ce,ne,ue,me,Te){for(var Ee,Ue=Ce.children,De=-1,je=Ue.length,ge=Ce.value&&(Te-ue)/Ce.value;++DeNe&&(Ne=De),ot=be*be*st,(Ye=Math.max(Ne/ot,ot/Se))>Ze){be-=De;break}Ze=Ye}ft.push(Ue={value:be,dice:je1?me:1)},ue}(de);function Re(){var Ce=ye,ne=!1,ue=1,me=1,Te=[0],Ee=L,Ue=L,De=L,je=L,ge=L;function be(Ne){return Ne.x0=Ne.y0=0,Ne.x1=ue,Ne.y1=me,Ne.eachBefore(Se),Te=[0],ne&&Ne.eachBefore(N),Ne}function Se(Ne){var Ye=Te[Ne.depth],Ze=Ne.x0+Ye,st=Ne.y0+Ye,ot=Ne.x1-Ye,ft=Ne.y1-Ye;ot=Ne-1){var yt=De[Se];return yt.x0=Ze,yt.y0=st,yt.x1=ot,void(yt.y1=ft)}for(var Et=ge[Se],Tt=Ye/2+Et,xt=Se+1,Dt=Ne-1;xt>>1;ge[It]ft-st){var Nt=(Ze*qt+ot*Ft)/Ye;be(Se,xt,Ft,Ze,st,Nt,ft),be(xt,Ne,qt,Nt,st,ot,ft)}else{var Je=(st*qt+ft*Ft)/Ye;be(Se,xt,Ft,Ze,st,ot,Je),be(xt,Ne,qt,Ze,Je,ot,ft)}})(0,je,Ce.value,ne,ue,me,Te)}function Ae(Ce,ne,ue,me,Te){(1&Ce.depth?he:j)(Ce,ne,ue,me,Te)}var Me=function Ce(ne){function ue(me,Te,Ee,Ue,De){if((je=me._squarify)&&je.ratio===ne)for(var je,ge,be,Se,Ne,Ye=-1,Ze=je.length,st=me.value;++Ye1?me:1)},ue}(de)},45879:function(D,E,e){e.d(E,{h5:function(){return p}});var _=Math.PI,w=2*_,s=1e-6,T=w-s;function m(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function f(){return new m}m.prototype=f.prototype={constructor:m,moveTo:function(c,b){this._+="M"+(this._x0=this._x1=+c)+","+(this._y0=this._y1=+b)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(c,b){this._+="L"+(this._x1=+c)+","+(this._y1=+b)},quadraticCurveTo:function(c,b,d,v){this._+="Q"+ +c+","+ +b+","+(this._x1=+d)+","+(this._y1=+v)},bezierCurveTo:function(c,b,d,v,x,g){this._+="C"+ +c+","+ +b+","+ +d+","+ +v+","+(this._x1=+x)+","+(this._y1=+g)},arcTo:function(c,b,d,v,x){c=+c,b=+b,d=+d,v=+v,x=+x;var g=this._x1,y=this._y1,k=d-c,h=v-b,M=g-c,A=y-b,C=M*M+A*A;if(x<0)throw new Error("negative radius: "+x);if(this._x1===null)this._+="M"+(this._x1=c)+","+(this._y1=b);else if(C>s)if(Math.abs(A*k-h*M)>s&&x){var L=d-g,O=v-y,I=k*k+h*h,R=L*L+O*O,U=Math.sqrt(I),B=Math.sqrt(C),G=x*Math.tan((_-Math.acos((I+C-R)/(2*U*B)))/2),N=G/B,j=G/U;Math.abs(N-1)>s&&(this._+="L"+(c+N*M)+","+(b+N*A)),this._+="A"+x+","+x+",0,0,"+ +(A*L>M*O)+","+(this._x1=c+j*k)+","+(this._y1=b+j*h)}else this._+="L"+(this._x1=c)+","+(this._y1=b)},arc:function(c,b,d,v,x,g){c=+c,b=+b,g=!!g;var y=(d=+d)*Math.cos(v),k=d*Math.sin(v),h=c+y,M=b+k,A=1^g,C=g?v-x:x-v;if(d<0)throw new Error("negative radius: "+d);this._x1===null?this._+="M"+h+","+M:(Math.abs(this._x1-h)>s||Math.abs(this._y1-M)>s)&&(this._+="L"+h+","+M),d&&(C<0&&(C=C%w+w),C>T?this._+="A"+d+","+d+",0,1,"+A+","+(c-y)+","+(b-k)+"A"+d+","+d+",0,1,"+A+","+(this._x1=h)+","+(this._y1=M):C>s&&(this._+="A"+d+","+d+",0,"+ +(C>=_)+","+A+","+(this._x1=c+d*Math.cos(x))+","+(this._y1=b+d*Math.sin(x))))},rect:function(c,b,d,v){this._+="M"+(this._x0=this._x1=+c)+","+(this._y0=this._y1=+b)+"h"+ +d+"v"+ +v+"h"+-d+"Z"},toString:function(){return this._}};var l=f,t=Array.prototype.slice;function i(c){return function(){return c}}function r(c){return c[0]}function n(c){return c[1]}function o(c){return c.source}function a(c){return c.target}function u(c,b,d,v,x){c.moveTo(b,d),c.bezierCurveTo(b=(b+v)/2,d,b,x,v,x)}function p(){return function(c){var b=o,d=a,v=r,x=n,g=null;function y(){var k,h=t.call(arguments),M=b.apply(this,h),A=d.apply(this,h);if(g||(g=k=l()),c(g,+v.apply(this,(h[0]=M,h)),+x.apply(this,h),+v.apply(this,(h[0]=A,h)),+x.apply(this,h)),k)return g=null,k+""||null}return y.source=function(k){return arguments.length?(b=k,y):b},y.target=function(k){return arguments.length?(d=k,y):d},y.x=function(k){return arguments.length?(v=typeof k=="function"?k:i(+k),y):v},y.y=function(k){return arguments.length?(x=typeof k=="function"?k:i(+k),y):x},y.context=function(k){return arguments.length?(g=k??null,y):g},y}(u)}},84096:function(D,E,e){e.d(E,{i$:function(){return o},Dq:function(){return r},g0:function(){return a}});var _=e(58176),w=e(48480),s=e(59879),T=e(82301),m=e(34823),f=e(79791);function l(xt){if(0<=xt.y&&xt.y<100){var Dt=new Date(-1,xt.m,xt.d,xt.H,xt.M,xt.S,xt.L);return Dt.setFullYear(xt.y),Dt}return new Date(xt.y,xt.m,xt.d,xt.H,xt.M,xt.S,xt.L)}function t(xt){if(0<=xt.y&&xt.y<100){var Dt=new Date(Date.UTC(-1,xt.m,xt.d,xt.H,xt.M,xt.S,xt.L));return Dt.setUTCFullYear(xt.y),Dt}return new Date(Date.UTC(xt.y,xt.m,xt.d,xt.H,xt.M,xt.S,xt.L))}function i(xt,Dt,It){return{y:xt,m:Dt,d:It,H:0,M:0,S:0,L:0}}function r(xt){var Dt=xt.dateTime,It=xt.date,Ft=xt.time,qt=xt.periods,Nt=xt.days,Je=xt.shortDays,Ke=xt.months,Ge=xt.shortMonths,nt=x(qt),ht=g(qt),Oe=x(Nt),Be=g(Nt),Qe=x(Je),ut=g(Je),pt=x(Ke),bt=g(Ke),Lt=x(Ge),Ct=g(Ge),mt={a:function(Gt){return Je[Gt.getDay()]},A:function(Gt){return Nt[Gt.getDay()]},b:function(Gt){return Ge[Gt.getMonth()]},B:function(Gt){return Ke[Gt.getMonth()]},c:null,d:X,e:X,f:se,H:K,I:te,j:ae,L:oe,m:fe,M:xe,p:function(Gt){return qt[+(Gt.getHours()>=12)]},q:function(Gt){return 1+~~(Gt.getMonth()/3)},Q:Et,s:Tt,S:he,u:de,U:pe,V:ye,w:Re,W:we,x:null,X:null,y:Ae,Y:Me,Z:Ce,"%":yt},Ot={a:function(Gt){return Je[Gt.getUTCDay()]},A:function(Gt){return Nt[Gt.getUTCDay()]},b:function(Gt){return Ge[Gt.getUTCMonth()]},B:function(Gt){return Ke[Gt.getUTCMonth()]},c:null,d:ne,e:ne,f:Ue,H:ue,I:me,j:Te,L:Ee,m:De,M:je,p:function(Gt){return qt[+(Gt.getUTCHours()>=12)]},q:function(Gt){return 1+~~(Gt.getUTCMonth()/3)},Q:Et,s:Tt,S:ge,u:be,U:Se,V:Ne,w:Ye,W:Ze,x:null,X:null,y:st,Y:ot,Z:ft,"%":yt},_t={a:function(Gt,Xt,Kt){var nn=Qe.exec(Xt.slice(Kt));return nn?(Gt.w=ut[nn[0].toLowerCase()],Kt+nn[0].length):-1},A:function(Gt,Xt,Kt){var nn=Oe.exec(Xt.slice(Kt));return nn?(Gt.w=Be[nn[0].toLowerCase()],Kt+nn[0].length):-1},b:function(Gt,Xt,Kt){var nn=Lt.exec(Xt.slice(Kt));return nn?(Gt.m=Ct[nn[0].toLowerCase()],Kt+nn[0].length):-1},B:function(Gt,Xt,Kt){var nn=pt.exec(Xt.slice(Kt));return nn?(Gt.m=bt[nn[0].toLowerCase()],Kt+nn[0].length):-1},c:function(Gt,Xt,Kt){return Wt(Gt,Dt,Xt,Kt)},d:U,e:U,f:H,H:G,I:G,j:B,L:V,m:R,M:N,p:function(Gt,Xt,Kt){var nn=nt.exec(Xt.slice(Kt));return nn?(Gt.p=ht[nn[0].toLowerCase()],Kt+nn[0].length):-1},q:I,Q,s:Y,S:j,u:k,U:h,V:M,w:y,W:A,x:function(Gt,Xt,Kt){return Wt(Gt,It,Xt,Kt)},X:function(Gt,Xt,Kt){return Wt(Gt,Ft,Xt,Kt)},y:L,Y:C,Z:O,"%":ee};function Pt(Gt,Xt){return function(Kt){var nn,yn,ln,kn=[],Wn=-1,wn=0,on=Gt.length;for(Kt instanceof Date||(Kt=new Date(+Kt));++Wn53)return null;"w"in ln||(ln.w=1),"Z"in ln?(yn=(nn=t(i(ln.y,0,1))).getUTCDay(),nn=yn>4||yn===0?_.l6.ceil(nn):(0,_.l6)(nn),nn=w.Z.offset(nn,7*(ln.V-1)),ln.y=nn.getUTCFullYear(),ln.m=nn.getUTCMonth(),ln.d=nn.getUTCDate()+(ln.w+6)%7):(yn=(nn=l(i(ln.y,0,1))).getDay(),nn=yn>4||yn===0?s.wA.ceil(nn):(0,s.wA)(nn),nn=T.Z.offset(nn,7*(ln.V-1)),ln.y=nn.getFullYear(),ln.m=nn.getMonth(),ln.d=nn.getDate()+(ln.w+6)%7)}else("W"in ln||"U"in ln)&&("w"in ln||(ln.w="u"in ln?ln.u%7:"W"in ln?1:0),yn="Z"in ln?t(i(ln.y,0,1)).getUTCDay():l(i(ln.y,0,1)).getDay(),ln.m=0,ln.d="W"in ln?(ln.w+6)%7+7*ln.W-(yn+5)%7:ln.w+7*ln.U-(yn+6)%7);return"Z"in ln?(ln.H+=ln.Z/100|0,ln.M+=ln.Z%100,t(ln)):l(ln)}}function Wt(Gt,Xt,Kt,nn){for(var yn,ln,kn=0,Wn=Xt.length,wn=Kt.length;kn=wn)return-1;if((yn=Xt.charCodeAt(kn++))===37){if(yn=Xt.charAt(kn++),!(ln=_t[yn in u?Xt.charAt(kn++):yn])||(nn=ln(Gt,Kt,nn))<0)return-1}else if(yn!=Kt.charCodeAt(nn++))return-1}return nn}return mt.x=Pt(It,mt),mt.X=Pt(Ft,mt),mt.c=Pt(Dt,mt),Ot.x=Pt(It,Ot),Ot.X=Pt(Ft,Ot),Ot.c=Pt(Dt,Ot),{format:function(Gt){var Xt=Pt(Gt+="",mt);return Xt.toString=function(){return Gt},Xt},parse:function(Gt){var Xt=Bt(Gt+="",!1);return Xt.toString=function(){return Gt},Xt},utcFormat:function(Gt){var Xt=Pt(Gt+="",Ot);return Xt.toString=function(){return Gt},Xt},utcParse:function(Gt){var Xt=Bt(Gt+="",!0);return Xt.toString=function(){return Gt},Xt}}}var n,o,a,u={"-":"",_:" ",0:"0"},p=/^\s*\d+/,c=/^%/,b=/[\\^$*+?|[\]().{}]/g;function d(xt,Dt,It){var Ft=xt<0?"-":"",qt=(Ft?-xt:xt)+"",Nt=qt.length;return Ft+(Nt68?1900:2e3),It+Ft[0].length):-1}function O(xt,Dt,It){var Ft=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Dt.slice(It,It+6));return Ft?(xt.Z=Ft[1]?0:-(Ft[2]+(Ft[3]||"00")),It+Ft[0].length):-1}function I(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+1));return Ft?(xt.q=3*Ft[0]-3,It+Ft[0].length):-1}function R(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+2));return Ft?(xt.m=Ft[0]-1,It+Ft[0].length):-1}function U(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+2));return Ft?(xt.d=+Ft[0],It+Ft[0].length):-1}function B(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+3));return Ft?(xt.m=0,xt.d=+Ft[0],It+Ft[0].length):-1}function G(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+2));return Ft?(xt.H=+Ft[0],It+Ft[0].length):-1}function N(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+2));return Ft?(xt.M=+Ft[0],It+Ft[0].length):-1}function j(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+2));return Ft?(xt.S=+Ft[0],It+Ft[0].length):-1}function V(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+3));return Ft?(xt.L=+Ft[0],It+Ft[0].length):-1}function H(xt,Dt,It){var Ft=p.exec(Dt.slice(It,It+6));return Ft?(xt.L=Math.floor(Ft[0]/1e3),It+Ft[0].length):-1}function ee(xt,Dt,It){var Ft=c.exec(Dt.slice(It,It+1));return Ft?It+Ft[0].length:-1}function Q(xt,Dt,It){var Ft=p.exec(Dt.slice(It));return Ft?(xt.Q=+Ft[0],It+Ft[0].length):-1}function Y(xt,Dt,It){var Ft=p.exec(Dt.slice(It));return Ft?(xt.s=+Ft[0],It+Ft[0].length):-1}function X(xt,Dt){return d(xt.getDate(),Dt,2)}function K(xt,Dt){return d(xt.getHours(),Dt,2)}function te(xt,Dt){return d(xt.getHours()%12||12,Dt,2)}function ae(xt,Dt){return d(1+T.Z.count((0,m.Z)(xt),xt),Dt,3)}function oe(xt,Dt){return d(xt.getMilliseconds(),Dt,3)}function se(xt,Dt){return oe(xt,Dt)+"000"}function fe(xt,Dt){return d(xt.getMonth()+1,Dt,2)}function xe(xt,Dt){return d(xt.getMinutes(),Dt,2)}function he(xt,Dt){return d(xt.getSeconds(),Dt,2)}function de(xt){var Dt=xt.getDay();return Dt===0?7:Dt}function pe(xt,Dt){return d(s.OM.count((0,m.Z)(xt)-1,xt),Dt,2)}function ye(xt,Dt){var It=xt.getDay();return xt=It>=4||It===0?(0,s.bL)(xt):s.bL.ceil(xt),d(s.bL.count((0,m.Z)(xt),xt)+((0,m.Z)(xt).getDay()===4),Dt,2)}function Re(xt){return xt.getDay()}function we(xt,Dt){return d(s.wA.count((0,m.Z)(xt)-1,xt),Dt,2)}function Ae(xt,Dt){return d(xt.getFullYear()%100,Dt,2)}function Me(xt,Dt){return d(xt.getFullYear()%1e4,Dt,4)}function Ce(xt){var Dt=xt.getTimezoneOffset();return(Dt>0?"-":(Dt*=-1,"+"))+d(Dt/60|0,"0",2)+d(Dt%60,"0",2)}function ne(xt,Dt){return d(xt.getUTCDate(),Dt,2)}function ue(xt,Dt){return d(xt.getUTCHours(),Dt,2)}function me(xt,Dt){return d(xt.getUTCHours()%12||12,Dt,2)}function Te(xt,Dt){return d(1+w.Z.count((0,f.Z)(xt),xt),Dt,3)}function Ee(xt,Dt){return d(xt.getUTCMilliseconds(),Dt,3)}function Ue(xt,Dt){return Ee(xt,Dt)+"000"}function De(xt,Dt){return d(xt.getUTCMonth()+1,Dt,2)}function je(xt,Dt){return d(xt.getUTCMinutes(),Dt,2)}function ge(xt,Dt){return d(xt.getUTCSeconds(),Dt,2)}function be(xt){var Dt=xt.getUTCDay();return Dt===0?7:Dt}function Se(xt,Dt){return d(_.Ox.count((0,f.Z)(xt)-1,xt),Dt,2)}function Ne(xt,Dt){var It=xt.getUTCDay();return xt=It>=4||It===0?(0,_.hB)(xt):_.hB.ceil(xt),d(_.hB.count((0,f.Z)(xt),xt)+((0,f.Z)(xt).getUTCDay()===4),Dt,2)}function Ye(xt){return xt.getUTCDay()}function Ze(xt,Dt){return d(_.l6.count((0,f.Z)(xt)-1,xt),Dt,2)}function st(xt,Dt){return d(xt.getUTCFullYear()%100,Dt,2)}function ot(xt,Dt){return d(xt.getUTCFullYear()%1e4,Dt,4)}function ft(){return"+0000"}function yt(){return"%"}function Et(xt){return+xt}function Tt(xt){return Math.floor(+xt/1e3)}n=r({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"]}),o=n.format,n.parse,a=n.utcFormat,n.utcParse},82301:function(D,E,e){e.d(E,{a:function(){return T}});var _=e(30052),w=e(54263),s=(0,_.Z)(function(m){m.setHours(0,0,0,0)},function(m,f){m.setDate(m.getDate()+f)},function(m,f){return(f-m-(f.getTimezoneOffset()-m.getTimezoneOffset())*w.yB)/w.UD},function(m){return m.getDate()-1});E.Z=s;var T=s.range},54263:function(D,E,e){e.d(E,{UD:function(){return T},Y2:function(){return s},Ym:function(){return _},iM:function(){return m},yB:function(){return w}});var _=1e3,w=6e4,s=36e5,T=864e5,m=6048e5},81041:function(D,E,e){e.r(E),e.d(E,{timeDay:function(){return p.Z},timeDays:function(){return p.a},timeFriday:function(){return c.mC},timeFridays:function(){return c.b$},timeHour:function(){return a},timeHours:function(){return u},timeInterval:function(){return _.Z},timeMillisecond:function(){return s},timeMilliseconds:function(){return T},timeMinute:function(){return r},timeMinutes:function(){return n},timeMonday:function(){return c.wA},timeMondays:function(){return c.bJ},timeMonth:function(){return d},timeMonths:function(){return v},timeSaturday:function(){return c.EY},timeSaturdays:function(){return c.Ff},timeSecond:function(){return l},timeSeconds:function(){return t},timeSunday:function(){return c.OM},timeSundays:function(){return c.vm},timeThursday:function(){return c.bL},timeThursdays:function(){return c.$t},timeTuesday:function(){return c.sy},timeTuesdays:function(){return c.aU},timeWednesday:function(){return c.zg},timeWednesdays:function(){return c.Ld},timeWeek:function(){return c.OM},timeWeeks:function(){return c.vm},timeYear:function(){return x.Z},timeYears:function(){return x.g},utcDay:function(){return C.Z},utcDays:function(){return C.y},utcFriday:function(){return L.QQ},utcFridays:function(){return L.fz},utcHour:function(){return M},utcHours:function(){return A},utcMillisecond:function(){return s},utcMilliseconds:function(){return T},utcMinute:function(){return y},utcMinutes:function(){return k},utcMonday:function(){return L.l6},utcMondays:function(){return L.$3},utcMonth:function(){return I},utcMonths:function(){return R},utcSaturday:function(){return L.g4},utcSaturdays:function(){return L.Q_},utcSecond:function(){return l},utcSeconds:function(){return t},utcSunday:function(){return L.Ox},utcSundays:function(){return L.SU},utcThursday:function(){return L.hB},utcThursdays:function(){return L.xj},utcTuesday:function(){return L.J1},utcTuesdays:function(){return L.DK},utcWednesday:function(){return L.b3},utcWednesdays:function(){return L.uy},utcWeek:function(){return L.Ox},utcWeeks:function(){return L.SU},utcYear:function(){return U.Z},utcYears:function(){return U.D}});var _=e(30052),w=(0,_.Z)(function(){},function(B,G){B.setTime(+B+G)},function(B,G){return G-B});w.every=function(B){return B=Math.floor(B),isFinite(B)&&B>0?B>1?(0,_.Z)(function(G){G.setTime(Math.floor(G/B)*B)},function(G,N){G.setTime(+G+N*B)},function(G,N){return(N-G)/B}):w:null};var s=w,T=w.range,m=e(54263),f=(0,_.Z)(function(B){B.setTime(B-B.getMilliseconds())},function(B,G){B.setTime(+B+G*m.Ym)},function(B,G){return(G-B)/m.Ym},function(B){return B.getUTCSeconds()}),l=f,t=f.range,i=(0,_.Z)(function(B){B.setTime(B-B.getMilliseconds()-B.getSeconds()*m.Ym)},function(B,G){B.setTime(+B+G*m.yB)},function(B,G){return(G-B)/m.yB},function(B){return B.getMinutes()}),r=i,n=i.range,o=(0,_.Z)(function(B){B.setTime(B-B.getMilliseconds()-B.getSeconds()*m.Ym-B.getMinutes()*m.yB)},function(B,G){B.setTime(+B+G*m.Y2)},function(B,G){return(G-B)/m.Y2},function(B){return B.getHours()}),a=o,u=o.range,p=e(82301),c=e(59879),b=(0,_.Z)(function(B){B.setDate(1),B.setHours(0,0,0,0)},function(B,G){B.setMonth(B.getMonth()+G)},function(B,G){return G.getMonth()-B.getMonth()+12*(G.getFullYear()-B.getFullYear())},function(B){return B.getMonth()}),d=b,v=b.range,x=e(34823),g=(0,_.Z)(function(B){B.setUTCSeconds(0,0)},function(B,G){B.setTime(+B+G*m.yB)},function(B,G){return(G-B)/m.yB},function(B){return B.getUTCMinutes()}),y=g,k=g.range,h=(0,_.Z)(function(B){B.setUTCMinutes(0,0,0)},function(B,G){B.setTime(+B+G*m.Y2)},function(B,G){return(G-B)/m.Y2},function(B){return B.getUTCHours()}),M=h,A=h.range,C=e(48480),L=e(58176),O=(0,_.Z)(function(B){B.setUTCDate(1),B.setUTCHours(0,0,0,0)},function(B,G){B.setUTCMonth(B.getUTCMonth()+G)},function(B,G){return G.getUTCMonth()-B.getUTCMonth()+12*(G.getUTCFullYear()-B.getUTCFullYear())},function(B){return B.getUTCMonth()}),I=O,R=O.range,U=e(79791)},30052:function(D,E,e){e.d(E,{Z:function(){return s}});var _=new Date,w=new Date;function s(T,m,f,l){function t(i){return T(i=arguments.length===0?new Date:new Date(+i)),i}return t.floor=function(i){return T(i=new Date(+i)),i},t.ceil=function(i){return T(i=new Date(i-1)),m(i,1),T(i),i},t.round=function(i){var r=t(i),n=t.ceil(i);return i-r0))return a;do a.push(o=new Date(+i)),m(i,n),T(i);while(o=r)for(;T(r),!i(r);)r.setTime(r-1)},function(r,n){if(r>=r)if(n<0)for(;++n<=0;)for(;m(r,-1),!i(r););else for(;--n>=0;)for(;m(r,1),!i(r););})},f&&(t.count=function(i,r){return _.setTime(+i),w.setTime(+r),T(_),T(w),Math.floor(f(_,w))},t.every=function(i){return i=Math.floor(i),isFinite(i)&&i>0?i>1?t.filter(l?function(r){return l(r)%i==0}:function(r){return t.count(0,r)%i==0}):t:null}),t}},48480:function(D,E,e){e.d(E,{y:function(){return T}});var _=e(30052),w=e(54263),s=(0,_.Z)(function(m){m.setUTCHours(0,0,0,0)},function(m,f){m.setUTCDate(m.getUTCDate()+f)},function(m,f){return(f-m)/w.UD},function(m){return m.getUTCDate()-1});E.Z=s;var T=s.range},58176:function(D,E,e){e.d(E,{$3:function(){return o},DK:function(){return a},J1:function(){return f},Ox:function(){return T},QQ:function(){return i},Q_:function(){return b},SU:function(){return n},b3:function(){return l},fz:function(){return c},g4:function(){return r},hB:function(){return t},l6:function(){return m},uy:function(){return u},xj:function(){return p}});var _=e(30052),w=e(54263);function s(d){return(0,_.Z)(function(v){v.setUTCDate(v.getUTCDate()-(v.getUTCDay()+7-d)%7),v.setUTCHours(0,0,0,0)},function(v,x){v.setUTCDate(v.getUTCDate()+7*x)},function(v,x){return(x-v)/w.iM})}var T=s(0),m=s(1),f=s(2),l=s(3),t=s(4),i=s(5),r=s(6),n=T.range,o=m.range,a=f.range,u=l.range,p=t.range,c=i.range,b=r.range},79791:function(D,E,e){e.d(E,{D:function(){return s}});var _=e(30052),w=(0,_.Z)(function(T){T.setUTCMonth(0,1),T.setUTCHours(0,0,0,0)},function(T,m){T.setUTCFullYear(T.getUTCFullYear()+m)},function(T,m){return m.getUTCFullYear()-T.getUTCFullYear()},function(T){return T.getUTCFullYear()});w.every=function(T){return isFinite(T=Math.floor(T))&&T>0?(0,_.Z)(function(m){m.setUTCFullYear(Math.floor(m.getUTCFullYear()/T)*T),m.setUTCMonth(0,1),m.setUTCHours(0,0,0,0)},function(m,f){m.setUTCFullYear(m.getUTCFullYear()+f*T)}):null},E.Z=w;var s=w.range},59879:function(D,E,e){e.d(E,{$t:function(){return p},EY:function(){return r},Ff:function(){return b},Ld:function(){return u},OM:function(){return T},aU:function(){return a},b$:function(){return c},bJ:function(){return o},bL:function(){return t},mC:function(){return i},sy:function(){return f},vm:function(){return n},wA:function(){return m},zg:function(){return l}});var _=e(30052),w=e(54263);function s(d){return(0,_.Z)(function(v){v.setDate(v.getDate()-(v.getDay()+7-d)%7),v.setHours(0,0,0,0)},function(v,x){v.setDate(v.getDate()+7*x)},function(v,x){return(x-v-(x.getTimezoneOffset()-v.getTimezoneOffset())*w.yB)/w.iM})}var T=s(0),m=s(1),f=s(2),l=s(3),t=s(4),i=s(5),r=s(6),n=T.range,o=m.range,a=f.range,u=l.range,p=t.range,c=i.range,b=r.range},34823:function(D,E,e){e.d(E,{g:function(){return s}});var _=e(30052),w=(0,_.Z)(function(T){T.setMonth(0,1),T.setHours(0,0,0,0)},function(T,m){T.setFullYear(T.getFullYear()+m)},function(T,m){return m.getFullYear()-T.getFullYear()},function(T){return T.getFullYear()});w.every=function(T){return isFinite(T=Math.floor(T))&&T>0?(0,_.Z)(function(m){m.setFullYear(Math.floor(m.getFullYear()/T)*T),m.setMonth(0,1),m.setHours(0,0,0,0)},function(m,f){m.setFullYear(m.getFullYear()+f*T)}):null},E.Z=w;var s=w.range},17045:function(D,E,e){var _=e(8709),w=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",s=Object.prototype.toString,T=Array.prototype.concat,m=Object.defineProperty,f=e(55622)(),l=m&&f,t=function(r,n,o,a){if(n in r){if(a===!0){if(r[n]===o)return}else if(typeof(u=a)!="function"||s.call(u)!=="[object Function]"||!a())return}var u;l?m(r,n,{configurable:!0,enumerable:!1,value:o,writable:!0}):r[n]=o},i=function(r,n){var o=arguments.length>2?arguments[2]:{},a=_(n);w&&(a=T.call(a,Object.getOwnPropertySymbols(n)));for(var u=0;ul*t){var a=(o-n)/l;f[r]=1e3*a}}return f}function w(s){for(var T=[],m=s[0];m<=s[1];m++)for(var f=String.fromCharCode(m),l=s[0];l0)return function(w,s){var T,m;for(T=new Array(w),m=0;m80*C){L=I=M[0],O=R=M[1];for(var ee=C;eeI&&(I=U),B>R&&(R=B);G=(G=Math.max(I-L,R-O))!==0?1/G:0}return w(V,H,C,L,O,G),H}function e(M,A,C,L,O){var I,R;if(O===h(M,A,C,L)>0)for(I=A;I=A;I-=L)R=g(I,M[I],M[I+1],R);return R&&p(R,R.next)&&(y(R),R=R.next),R}function _(M,A){if(!M)return M;A||(A=M);var C,L=M;do if(C=!1,L.steiner||!p(L,L.next)&&u(L.prev,L,L.next)!==0)L=L.next;else{if(y(L),(L=A=L.prev)===L.next)break;C=!0}while(C||L!==A);return A}function w(M,A,C,L,O,I,R){if(M){!R&&I&&function(N,j,V,H){var ee=N;do ee.z===null&&(ee.z=r(ee.x,ee.y,j,V,H)),ee.prevZ=ee.prev,ee.nextZ=ee.next,ee=ee.next;while(ee!==N);ee.prevZ.nextZ=null,ee.prevZ=null,function(Q){var Y,X,K,te,ae,oe,se,fe,xe=1;do{for(X=Q,Q=null,ae=null,oe=0;X;){for(oe++,K=X,se=0,Y=0;Y0||fe>0&&K;)se!==0&&(fe===0||!K||X.z<=K.z)?(te=X,X=X.nextZ,se--):(te=K,K=K.nextZ,fe--),ae?ae.nextZ=te:Q=te,te.prevZ=ae,ae=te;X=K}ae.nextZ=null,xe*=2}while(oe>1)}(ee)}(M,L,O,I);for(var U,B,G=M;M.prev!==M.next;)if(U=M.prev,B=M.next,I?T(M,L,O,I):s(M))A.push(U.i/C),A.push(M.i/C),A.push(B.i/C),y(M),M=B.next,G=B.next;else if((M=B)===G){R?R===1?w(M=m(_(M),A,C),A,C,L,O,I,2):R===2&&f(M,A,C,L,O,I):w(_(M),A,C,L,O,I,1);break}}}function s(M){var A=M.prev,C=M,L=M.next;if(u(A,C,L)>=0)return!1;for(var O=M.next.next;O!==M.prev;){if(o(A.x,A.y,C.x,C.y,L.x,L.y,O.x,O.y)&&u(O.prev,O,O.next)>=0)return!1;O=O.next}return!0}function T(M,A,C,L){var O=M.prev,I=M,R=M.next;if(u(O,I,R)>=0)return!1;for(var U=O.xI.x?O.x>R.x?O.x:R.x:I.x>R.x?I.x:R.x,N=O.y>I.y?O.y>R.y?O.y:R.y:I.y>R.y?I.y:R.y,j=r(U,B,A,C,L),V=r(G,N,A,C,L),H=M.prevZ,ee=M.nextZ;H&&H.z>=j&&ee&&ee.z<=V;){if(H!==M.prev&&H!==M.next&&o(O.x,O.y,I.x,I.y,R.x,R.y,H.x,H.y)&&u(H.prev,H,H.next)>=0||(H=H.prevZ,ee!==M.prev&&ee!==M.next&&o(O.x,O.y,I.x,I.y,R.x,R.y,ee.x,ee.y)&&u(ee.prev,ee,ee.next)>=0))return!1;ee=ee.nextZ}for(;H&&H.z>=j;){if(H!==M.prev&&H!==M.next&&o(O.x,O.y,I.x,I.y,R.x,R.y,H.x,H.y)&&u(H.prev,H,H.next)>=0)return!1;H=H.prevZ}for(;ee&&ee.z<=V;){if(ee!==M.prev&&ee!==M.next&&o(O.x,O.y,I.x,I.y,R.x,R.y,ee.x,ee.y)&&u(ee.prev,ee,ee.next)>=0)return!1;ee=ee.nextZ}return!0}function m(M,A,C){var L=M;do{var O=L.prev,I=L.next.next;!p(O,I)&&c(O,L,L.next,I)&&v(O,I)&&v(I,O)&&(A.push(O.i/C),A.push(L.i/C),A.push(I.i/C),y(L),y(L.next),L=M=I),L=L.next}while(L!==M);return _(L)}function f(M,A,C,L,O,I){var R=M;do{for(var U=R.next.next;U!==R.prev;){if(R.i!==U.i&&a(R,U)){var B=x(R,U);return R=_(R,R.next),B=_(B,B.next),w(R,A,C,L,O,I),void w(B,A,C,L,O,I)}U=U.next}R=R.next}while(R!==M)}function l(M,A){return M.x-A.x}function t(M,A){if(A=function(L,O){var I,R=O,U=L.x,B=L.y,G=-1/0;do{if(B<=R.y&&B>=R.next.y&&R.next.y!==R.y){var N=R.x+(B-R.y)*(R.next.x-R.x)/(R.next.y-R.y);if(N<=U&&N>G){if(G=N,N===U){if(B===R.y)return R;if(B===R.next.y)return R.next}I=R.x=R.x&&R.x>=H&&U!==R.x&&o(BI.x||R.x===I.x&&i(I,R)))&&(I=R,Q=j)),R=R.next;while(R!==V);return I}(M,A),A){var C=x(A,M);_(A,A.next),_(C,C.next)}}function i(M,A){return u(M.prev,M,A.prev)<0&&u(A.next,M,M.next)<0}function r(M,A,C,L,O){return(M=1431655765&((M=858993459&((M=252645135&((M=16711935&((M=32767*(M-C)*O)|M<<8))|M<<4))|M<<2))|M<<1))|(A=1431655765&((A=858993459&((A=252645135&((A=16711935&((A=32767*(A-L)*O)|A<<8))|A<<4))|A<<2))|A<<1))<<1}function n(M){var A=M,C=M;do(A.x=0&&(M-R)*(L-U)-(C-R)*(A-U)>=0&&(C-R)*(I-U)-(O-R)*(L-U)>=0}function a(M,A){return M.next.i!==A.i&&M.prev.i!==A.i&&!function(C,L){var O=C;do{if(O.i!==C.i&&O.next.i!==C.i&&O.i!==L.i&&O.next.i!==L.i&&c(O,O.next,C,L))return!0;O=O.next}while(O!==C);return!1}(M,A)&&(v(M,A)&&v(A,M)&&function(C,L){var O=C,I=!1,R=(C.x+L.x)/2,U=(C.y+L.y)/2;do O.y>U!=O.next.y>U&&O.next.y!==O.y&&R<(O.next.x-O.x)*(U-O.y)/(O.next.y-O.y)+O.x&&(I=!I),O=O.next;while(O!==C);return I}(M,A)&&(u(M.prev,M,A.prev)||u(M,A.prev,A))||p(M,A)&&u(M.prev,M,M.next)>0&&u(A.prev,A,A.next)>0)}function u(M,A,C){return(A.y-M.y)*(C.x-A.x)-(A.x-M.x)*(C.y-A.y)}function p(M,A){return M.x===A.x&&M.y===A.y}function c(M,A,C,L){var O=d(u(M,A,C)),I=d(u(M,A,L)),R=d(u(C,L,M)),U=d(u(C,L,A));return O!==I&&R!==U||!(O!==0||!b(M,C,A))||!(I!==0||!b(M,L,A))||!(R!==0||!b(C,M,L))||!(U!==0||!b(C,A,L))}function b(M,A,C){return A.x<=Math.max(M.x,C.x)&&A.x>=Math.min(M.x,C.x)&&A.y<=Math.max(M.y,C.y)&&A.y>=Math.min(M.y,C.y)}function d(M){return M>0?1:M<0?-1:0}function v(M,A){return u(M.prev,M,M.next)<0?u(M,A,M.next)>=0&&u(M,M.prev,A)>=0:u(M,A,M.prev)<0||u(M,M.next,A)<0}function x(M,A){var C=new k(M.i,M.x,M.y),L=new k(A.i,A.x,A.y),O=M.next,I=A.prev;return M.next=A,A.prev=M,C.next=O,O.prev=C,L.next=C,C.prev=L,I.next=L,L.prev=I,L}function g(M,A,C,L){var O=new k(M,A,C);return L?(O.next=L.next,O.prev=L,L.next.prev=O,L.next=O):(O.prev=O,O.next=O),O}function y(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 k(M,A,C){this.i=M,this.x=A,this.y=C,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function h(M,A,C,L){for(var O=0,I=A,R=C-L;I0&&(L+=M[O-1].length,C.holes.push(L))}return C}},2502:function(D,E,e){var _=e(68664);D.exports=function(w,s){var T,m=[],f=[],l=[],t={},i=[];function r(v){l[v]=!1,t.hasOwnProperty(v)&&Object.keys(t[v]).forEach(function(x){delete t[v][x],l[x]&&r(x)})}function n(v){var x,g,y=!1;for(f.push(v),l[v]=!0,x=0;x=C})})(v);for(var x,g=_(w).components.filter(function(C){return C.length>1}),y=1/0,k=0;k=55296&&v<=56319&&(k+=a[++p]),k=h?r.call(h,M,k,c):k,u?(n.value=k,o(b,c,n)):b[c]=k,++c;d=c}}if(d===void 0)for(d=T(a.length),u&&(b=new u(d)),p=0;p0?1:-1}},56247:function(D,E,e){var _=e(9953),w=Math.abs,s=Math.floor;D.exports=function(T){return isNaN(T)?0:(T=Number(T))!==0&&isFinite(T)?_(T)*s(w(T)):T}},35976:function(D,E,e){var _=e(56247),w=Math.max;D.exports=function(s){return w(0,_(s))}},67260:function(D,E,e){var _=e(78513),w=e(36672),s=Function.prototype.bind,T=Function.prototype.call,m=Object.keys,f=Object.prototype.propertyIsEnumerable;D.exports=function(l,t){return function(i,r){var n,o=arguments[2],a=arguments[3];return i=Object(w(i)),_(r),n=m(i),a&&n.sort(typeof a=="function"?s.call(a,i):void 0),typeof l!="function"&&(l=n[l]),T.call(l,n,function(u,p){return f.call(i,u)?T.call(r,o,i[u],u,i,p):t})}}},95879:function(D,E,e){D.exports=e(73583)()?Object.assign:e(34205)},73583:function(D){D.exports=function(){var E,e=Object.assign;return typeof e=="function"&&(e(E={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),E.foo+E.bar+E.trzy==="razdwatrzy")}},34205:function(D,E,e){var _=e(68700),w=e(36672),s=Math.max;D.exports=function(T,m){var f,l,t,i=s(arguments.length,2);for(T=Object(w(T)),t=function(r){try{T[r]=m[r]}catch(n){f||(f=n)}},l=1;l-1}},87963:function(D){var E=Object.prototype.toString,e=E.call("");D.exports=function(_){return typeof _=="string"||_&&typeof _=="object"&&(_ instanceof String||E.call(_)===e)||!1}},43043:function(D){var E=Object.create(null),e=Math.random;D.exports=function(){var _;do _=e().toString(36).slice(2);while(E[_]);return _}},32411:function(D,E,e){var _,w=e(1496),s=e(66741),T=e(62072),m=e(8260),f=e(95426),l=Object.defineProperty;_=D.exports=function(t,i){if(!(this instanceof _))throw new TypeError("Constructor requires 'new'");f.call(this,t),i=i?s.call(i,"key+value")?"key+value":s.call(i,"key")?"key":"value":"value",l(this,"__kind__",T("",i))},w&&w(_,f),delete _.prototype.constructor,_.prototype=Object.create(f.prototype,{_resolve:T(function(t){return this.__kind__==="value"?this.__list__[t]:this.__kind__==="key+value"?[t,this.__list__[t]]:t})}),l(_.prototype,m.toStringTag,T("c","Array Iterator"))},27515:function(D,E,e){var _=e(73051),w=e(78513),s=e(87963),T=e(66661),m=Array.isArray,f=Function.prototype.call,l=Array.prototype.some;D.exports=function(t,i){var r,n,o,a,u,p,c,b,d=arguments[2];if(m(t)||_(t)?r="array":s(t)?r="string":t=T(t),w(i),o=function(){a=!0},r!=="array")if(r!=="string")for(n=t.next();!n.done;){if(f.call(i,d,n.value,o),a)return;n=t.next()}else for(p=t.length,u=0;u=55296&&b<=56319&&(c+=t[++u]),f.call(i,d,c,o),!a);++u);else l.call(t,function(v){return f.call(i,d,v,o),a})}},66661:function(D,E,e){var _=e(73051),w=e(87963),s=e(32411),T=e(259),m=e(58095),f=e(8260).iterator;D.exports=function(l){return typeof m(l)[f]=="function"?l[f]():_(l)?new s(l):w(l)?new T(l):new s(l)}},95426:function(D,E,e){var _,w=e(16134),s=e(95879),T=e(78513),m=e(36672),f=e(62072),l=e(55174),t=e(8260),i=Object.defineProperty,r=Object.defineProperties;D.exports=_=function(n,o){if(!(this instanceof _))throw new TypeError("Constructor requires 'new'");r(this,{__list__:f("w",m(n)),__context__:f("w",o),__nextIndex__:f("w",0)}),o&&(T(o.on),o.on("_add",this._onAdd),o.on("_delete",this._onDelete),o.on("_clear",this._onClear))},delete _.prototype.constructor,r(_.prototype,s({_next:f(function(){var n;if(this.__list__)return this.__redo__&&(n=this.__redo__.shift())!==void 0?n:this.__nextIndex__=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach(function(o,a){o>=n&&(this.__redo__[a]=++o)},this),this.__redo__.push(n)):i(this,"__redo__",f("c",[n])))}),_onDelete:f(function(n){var o;n>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&((o=this.__redo__.indexOf(n))!==-1&&this.__redo__.splice(o,1),this.__redo__.forEach(function(a,u){a>n&&(this.__redo__[u]=--a)},this)))}),_onClear:f(function(){this.__redo__&&w.call(this.__redo__),this.__nextIndex__=0})}))),i(_.prototype,t.iterator,f(function(){return this}))},35940:function(D,E,e){var _=e(73051),w=e(95296),s=e(87963),T=e(8260).iterator,m=Array.isArray;D.exports=function(f){return!(!w(f)||!m(f)&&!s(f)&&!_(f)&&typeof f[T]!="function")}},259:function(D,E,e){var _,w=e(1496),s=e(62072),T=e(8260),m=e(95426),f=Object.defineProperty;_=D.exports=function(l){if(!(this instanceof _))throw new TypeError("Constructor requires 'new'");l=String(l),m.call(this,l),f(this,"__length__",s("",l.length))},w&&w(_,m),delete _.prototype.constructor,_.prototype=Object.create(m.prototype,{_next:s(function(){if(this.__list__)return this.__nextIndex__=55296&&t<=56319?i+this.__list__[this.__nextIndex__++]:i})}),f(_.prototype,T.toStringTag,s("c","String Iterator"))},58095:function(D,E,e){var _=e(35940);D.exports=function(w){if(!_(w))throw new TypeError(w+" is not iterable");return w}},73523:function(D){function E(e,_){if(e==null)throw new TypeError("Cannot convert first argument to object");for(var w=Object(e),s=1;s0&&x.length>d&&!x.warned){x.warned=!0;var y=new Error("Possible EventEmitter memory leak detected. "+x.length+" "+String(p)+" listeners added. Use emitter.setMaxListeners() to increase limit");y.name="MaxListenersExceededWarning",y.emitter=u,y.type=p,y.count=x.length,g=y,console&&console.warn&&console.warn(g)}return u}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 i(u,p,c){var b={fired:!1,wrapFn:void 0,target:u,type:p,listener:c},d=t.bind(b);return d.listener=c,b.wrapFn=d,d}function r(u,p,c){var b=u._events;if(b===void 0)return[];var d=b[p];return d===void 0?[]:typeof d=="function"?c?[d.listener||d]:[d]:c?function(v){for(var x=new Array(v.length),g=0;g0&&(v=p[0]),v instanceof Error)throw v;var x=new Error("Unhandled error."+(v?" ("+v.message+")":""));throw x.context=v,x}var g=d[u];if(g===void 0)return!1;if(typeof g=="function")_(g,this,p);else{var y=g.length,k=o(g,y);for(c=0;c=0;v--)if(c[v]===p||c[v].listener===p){x=c[v].listener,d=v;break}if(d<0)return this;d===0?c.shift():function(g,y){for(;y+1=0;b--)this.removeListener(u,p[b]);return this},s.prototype.listeners=function(u){return r(this,u,!0)},s.prototype.rawListeners=function(u){return r(this,u,!1)},s.listenerCount=function(u,p){return typeof u.listenerCount=="function"?u.listenerCount(p):n.call(u,p)},s.prototype.listenerCount=n,s.prototype.eventNames=function(){return this._eventsCount>0?E(this._events):[]}},60774:function(D){var E=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};D.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return E()}try{return __global__||E()}finally{delete Object.prototype.__global__}}()},94908:function(D,E,e){D.exports=e(51152)()?globalThis:e(60774)},51152:function(D){D.exports=function(){return typeof globalThis=="object"&&!!globalThis&&globalThis.Array===Array}},92770:function(D,E,e){var _=e(18546);D.exports=function(w){var s=typeof w;if(s==="string"){var T=w;if((w=+w)==0&&_(T))return!1}else if(s!=="number")return!1;return w-w<1}},30120:function(D,E,e){var _=e(90660);D.exports=function(w,s,T){if(!w)throw new TypeError("must specify data as first parameter");if(T=0|+(T||0),Array.isArray(w)&&w[0]&&typeof w[0][0]=="number"){var m,f,l,t,i=w[0].length,r=w.length*i;s&&typeof s!="string"||(s=new(_(s||"float32"))(r+T));var n=s.length-T;if(r!==n)throw new Error("source length "+r+" ("+i+"x"+w.length+") does not match destination length "+n);for(m=0,l=T;mT[0]-l[0]/2&&(a=l[0]/2,u+=l[1]);return m}},32879:function(D){function E(s,T){T||(T={}),(typeof s=="string"||Array.isArray(s))&&(T.family=s);var m=Array.isArray(T.family)?T.family.join(", "):T.family;if(!m)throw Error("`family` must be defined");var f=T.size||T.fontSize||T.em||48,l=T.weight||T.fontWeight||"",t=(s=[T.style||T.fontStyle||"",l,f].join(" ")+"px "+m,T.origin||"top");if(E.cache[m]&&f<=E.cache[m].em)return e(E.cache[m],t);var i=T.canvas||E.canvas,r=i.getContext("2d"),n={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"},o=Math.ceil(1.5*f);i.height=o,i.width=.5*o,r.font=s;var a="H",u={top:0};r.clearRect(0,0,o,o),r.textBaseline="top",r.fillStyle="black",r.fillText(a,0,0);var p=_(r.getImageData(0,0,o,o));r.clearRect(0,0,o,o),r.textBaseline="bottom",r.fillText(a,0,o);var c=_(r.getImageData(0,0,o,o));u.lineHeight=u.bottom=o-c+p,r.clearRect(0,0,o,o),r.textBaseline="alphabetic",r.fillText(a,0,o);var b=o-_(r.getImageData(0,0,o,o))-1+p;u.baseline=u.alphabetic=b,r.clearRect(0,0,o,o),r.textBaseline="middle",r.fillText(a,0,.5*o);var d=_(r.getImageData(0,0,o,o));u.median=u.middle=o-d-1+p-.5*o,r.clearRect(0,0,o,o),r.textBaseline="hanging",r.fillText(a,0,.5*o);var v=_(r.getImageData(0,0,o,o));u.hanging=o-v-1+p-.5*o,r.clearRect(0,0,o,o),r.textBaseline="ideographic",r.fillText(a,0,o);var x=_(r.getImageData(0,0,o,o));if(u.ideographic=o-x-1+p,n.upper&&(r.clearRect(0,0,o,o),r.textBaseline="top",r.fillText(n.upper,0,0),u.upper=_(r.getImageData(0,0,o,o)),u.capHeight=u.baseline-u.upper),n.lower&&(r.clearRect(0,0,o,o),r.textBaseline="top",r.fillText(n.lower,0,0),u.lower=_(r.getImageData(0,0,o,o)),u.xHeight=u.baseline-u.lower),n.tittle&&(r.clearRect(0,0,o,o),r.textBaseline="top",r.fillText(n.tittle,0,0),u.tittle=_(r.getImageData(0,0,o,o))),n.ascent&&(r.clearRect(0,0,o,o),r.textBaseline="top",r.fillText(n.ascent,0,0),u.ascent=_(r.getImageData(0,0,o,o))),n.descent&&(r.clearRect(0,0,o,o),r.textBaseline="top",r.fillText(n.descent,0,0),u.descent=w(r.getImageData(0,0,o,o))),n.overshoot){r.clearRect(0,0,o,o),r.textBaseline="top",r.fillText(n.overshoot,0,0);var g=w(r.getImageData(0,0,o,o));u.overshoot=g-b}for(var y in u)u[y]/=f;return u.em=f,E.cache[m]=u,e(u,t)}function e(s,T){var m={};for(var f in typeof T=="string"&&(T=s[T]),s)f!=="em"&&(m[f]=s[f]-T);return m}function _(s){for(var T=s.height,m=s.data,f=3;f0;f-=4)if(m[f]!==0)return Math.floor(.25*(f-3)/T)}D.exports=E,E.canvas=document.createElement("canvas"),E.cache={}},31353:function(D,E,e){var _=e(85395),w=Object.prototype.toString,s=Object.prototype.hasOwnProperty,T=function(l,t,i){for(var r=0,n=l.length;r=3&&(r=i),w.call(l)==="[object Array]"?T(l,t,r):typeof l=="string"?m(l,t,r):f(l,t,r)}},73047:function(D){var E="Function.prototype.bind called on incompatible ",e=Array.prototype.slice,_=Object.prototype.toString,w="[object Function]";D.exports=function(s){var T=this;if(typeof T!="function"||_.call(T)!==w)throw new TypeError(E+T);for(var m,f=e.call(arguments,1),l=function(){if(this instanceof m){var o=T.apply(this,f.concat(e.call(arguments)));return Object(o)===o?o:this}return T.apply(s,f.concat(e.call(arguments)))},t=Math.max(0,T.length-f.length),i=[],r=0;r"u"&&!e.canvas)return null;var _=e.canvas||document.createElement("canvas");typeof e.width=="number"&&(_.width=e.width),typeof e.height=="number"&&(_.height=e.height);var w,s=e;try{var T=[E];E.indexOf("webgl")===0&&T.push("experimental-"+E);for(var m=0;m"u"?_:r(Uint8Array),a={"%AggregateError%":typeof AggregateError>"u"?_:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?_:ArrayBuffer,"%ArrayIteratorPrototype%":i?r([][Symbol.iterator]()):_,"%AsyncFromSyncIteratorPrototype%":_,"%AsyncFunction%":n,"%AsyncGenerator%":n,"%AsyncGeneratorFunction%":n,"%AsyncIteratorPrototype%":n,"%Atomics%":typeof Atomics>"u"?_:Atomics,"%BigInt%":typeof BigInt>"u"?_:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?_:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?_:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?_:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?_:Float32Array,"%Float64Array%":typeof Float64Array>"u"?_:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?_:FinalizationRegistry,"%Function%":s,"%GeneratorFunction%":n,"%Int8Array%":typeof Int8Array>"u"?_:Int8Array,"%Int16Array%":typeof Int16Array>"u"?_:Int16Array,"%Int32Array%":typeof Int32Array>"u"?_:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":i?r(r([][Symbol.iterator]())):_,"%JSON%":typeof JSON=="object"?JSON:_,"%Map%":typeof Map>"u"?_:Map,"%MapIteratorPrototype%":typeof Map<"u"&&i?r(new Map()[Symbol.iterator]()):_,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?_:Promise,"%Proxy%":typeof Proxy>"u"?_:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?_:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?_:Set,"%SetIteratorPrototype%":typeof Set<"u"&&i?r(new Set()[Symbol.iterator]()):_,"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?_:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":i?r(""[Symbol.iterator]()):_,"%Symbol%":i?Symbol:_,"%SyntaxError%":w,"%ThrowTypeError%":t,"%TypedArray%":o,"%TypeError%":T,"%Uint8Array%":typeof Uint8Array>"u"?_:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?_:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?_:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?_:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?_:WeakMap,"%WeakRef%":typeof WeakRef>"u"?_:WeakRef,"%WeakSet%":typeof WeakSet>"u"?_:WeakSet};try{null.error}catch(L){var u=r(r(L));a["%Error.prototype%"]=u}var p=function L(O){var I;if(O==="%AsyncFunction%")I=m("async function () {}");else if(O==="%GeneratorFunction%")I=m("function* () {}");else if(O==="%AsyncGeneratorFunction%")I=m("async function* () {}");else if(O==="%AsyncGenerator%"){var R=L("%AsyncGeneratorFunction%");R&&(I=R.prototype)}else if(O==="%AsyncIteratorPrototype%"){var U=L("%AsyncGenerator%");U&&(I=r(U.prototype))}return a[O]=I,I},c={"%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"]},b=e(77575),d=e(35065),v=b.call(Function.call,Array.prototype.concat),x=b.call(Function.apply,Array.prototype.splice),g=b.call(Function.call,String.prototype.replace),y=b.call(Function.call,String.prototype.slice),k=b.call(Function.call,RegExp.prototype.exec),h=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,M=/\\(\\)?/g,A=function(L){var O=y(L,0,1),I=y(L,-1);if(O==="%"&&I!=="%")throw new w("invalid intrinsic syntax, expected closing `%`");if(I==="%"&&O!=="%")throw new w("invalid intrinsic syntax, expected opening `%`");var R=[];return g(L,h,function(U,B,G,N){R[R.length]=G?g(N,M,"$1"):B||U}),R},C=function(L,O){var I,R=L;if(d(c,R)&&(R="%"+(I=c[R])[0]+"%"),d(a,R)){var U=a[R];if(U===n&&(U=p(R)),U===void 0&&!O)throw new T("intrinsic "+L+" exists, but is not available. Please file an issue!");return{alias:I,name:R,value:U}}throw new w("intrinsic "+L+" does not exist!")};D.exports=function(L,O){if(typeof L!="string"||L.length===0)throw new T("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof O!="boolean")throw new T('"allowMissing" argument must be a boolean');if(k(/^%?[^%]*%?$/,L)===null)throw new w("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var I=A(L),R=I.length>0?I[0]:"",U=C("%"+R+"%",O),B=U.name,G=U.value,N=!1,j=U.alias;j&&(R=j[0],x(I,v([0,1],j)));for(var V=1,H=!0;V=I.length){var X=f(G,ee);G=(H=!!X)&&"get"in X&&!("originalValue"in X.get)?X.get:G[ee]}else H=d(G,ee),G=G[ee];H&&!N&&(a[B]=G)}}return G}},85400:function(D){D.exports=function(E,e){var _=e[0],w=e[1],s=e[2],T=e[3],m=e[4],f=e[5],l=e[6],t=e[7],i=e[8],r=e[9],n=e[10],o=e[11],a=e[12],u=e[13],p=e[14],c=e[15];return E[0]=f*(n*c-o*p)-r*(l*c-t*p)+u*(l*o-t*n),E[1]=-(w*(n*c-o*p)-r*(s*c-T*p)+u*(s*o-T*n)),E[2]=w*(l*c-t*p)-f*(s*c-T*p)+u*(s*t-T*l),E[3]=-(w*(l*o-t*n)-f*(s*o-T*n)+r*(s*t-T*l)),E[4]=-(m*(n*c-o*p)-i*(l*c-t*p)+a*(l*o-t*n)),E[5]=_*(n*c-o*p)-i*(s*c-T*p)+a*(s*o-T*n),E[6]=-(_*(l*c-t*p)-m*(s*c-T*p)+a*(s*t-T*l)),E[7]=_*(l*o-t*n)-m*(s*o-T*n)+i*(s*t-T*l),E[8]=m*(r*c-o*u)-i*(f*c-t*u)+a*(f*o-t*r),E[9]=-(_*(r*c-o*u)-i*(w*c-T*u)+a*(w*o-T*r)),E[10]=_*(f*c-t*u)-m*(w*c-T*u)+a*(w*t-T*f),E[11]=-(_*(f*o-t*r)-m*(w*o-T*r)+i*(w*t-T*f)),E[12]=-(m*(r*p-n*u)-i*(f*p-l*u)+a*(f*n-l*r)),E[13]=_*(r*p-n*u)-i*(w*p-s*u)+a*(w*n-s*r),E[14]=-(_*(f*p-l*u)-m*(w*p-s*u)+a*(w*l-s*f)),E[15]=_*(f*n-l*r)-m*(w*n-s*r)+i*(w*l-s*f),E}},42331:function(D){D.exports=function(E){var e=new Float32Array(16);return e[0]=E[0],e[1]=E[1],e[2]=E[2],e[3]=E[3],e[4]=E[4],e[5]=E[5],e[6]=E[6],e[7]=E[7],e[8]=E[8],e[9]=E[9],e[10]=E[10],e[11]=E[11],e[12]=E[12],e[13]=E[13],e[14]=E[14],e[15]=E[15],e}},31042:function(D){D.exports=function(E,e){return E[0]=e[0],E[1]=e[1],E[2]=e[2],E[3]=e[3],E[4]=e[4],E[5]=e[5],E[6]=e[6],E[7]=e[7],E[8]=e[8],E[9]=e[9],E[10]=e[10],E[11]=e[11],E[12]=e[12],E[13]=e[13],E[14]=e[14],E[15]=e[15],E}},11902:function(D){D.exports=function(){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}},89887:function(D){D.exports=function(E){var e=E[0],_=E[1],w=E[2],s=E[3],T=E[4],m=E[5],f=E[6],l=E[7],t=E[8],i=E[9],r=E[10],n=E[11],o=E[12],a=E[13],u=E[14],p=E[15];return(e*m-_*T)*(r*p-n*u)-(e*f-w*T)*(i*p-n*a)+(e*l-s*T)*(i*u-r*a)+(_*f-w*m)*(t*p-n*o)-(_*l-s*m)*(t*u-r*o)+(w*l-s*f)*(t*a-i*o)}},27812:function(D){D.exports=function(E,e){var _=e[0],w=e[1],s=e[2],T=e[3],m=_+_,f=w+w,l=s+s,t=_*m,i=w*m,r=w*f,n=s*m,o=s*f,a=s*l,u=T*m,p=T*f,c=T*l;return E[0]=1-r-a,E[1]=i+c,E[2]=n-p,E[3]=0,E[4]=i-c,E[5]=1-t-a,E[6]=o+u,E[7]=0,E[8]=n+p,E[9]=o-u,E[10]=1-t-r,E[11]=0,E[12]=0,E[13]=0,E[14]=0,E[15]=1,E}},34045:function(D){D.exports=function(E,e,_){var w,s,T,m=_[0],f=_[1],l=_[2],t=Math.sqrt(m*m+f*f+l*l);return Math.abs(t)<1e-6?null:(m*=t=1/t,f*=t,l*=t,w=Math.sin(e),T=1-(s=Math.cos(e)),E[0]=m*m*T+s,E[1]=f*m*T+l*w,E[2]=l*m*T-f*w,E[3]=0,E[4]=m*f*T-l*w,E[5]=f*f*T+s,E[6]=l*f*T+m*w,E[7]=0,E[8]=m*l*T+f*w,E[9]=f*l*T-m*w,E[10]=l*l*T+s,E[11]=0,E[12]=0,E[13]=0,E[14]=0,E[15]=1,E)}},45973:function(D){D.exports=function(E,e,_){var w=e[0],s=e[1],T=e[2],m=e[3],f=w+w,l=s+s,t=T+T,i=w*f,r=w*l,n=w*t,o=s*l,a=s*t,u=T*t,p=m*f,c=m*l,b=m*t;return E[0]=1-(o+u),E[1]=r+b,E[2]=n-c,E[3]=0,E[4]=r-b,E[5]=1-(i+u),E[6]=a+p,E[7]=0,E[8]=n+c,E[9]=a-p,E[10]=1-(i+o),E[11]=0,E[12]=_[0],E[13]=_[1],E[14]=_[2],E[15]=1,E}},81472:function(D){D.exports=function(E,e){return E[0]=e[0],E[1]=0,E[2]=0,E[3]=0,E[4]=0,E[5]=e[1],E[6]=0,E[7]=0,E[8]=0,E[9]=0,E[10]=e[2],E[11]=0,E[12]=0,E[13]=0,E[14]=0,E[15]=1,E}},14669:function(D){D.exports=function(E,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]=e[0],E[13]=e[1],E[14]=e[2],E[15]=1,E}},75262:function(D){D.exports=function(E,e){var _=Math.sin(e),w=Math.cos(e);return E[0]=1,E[1]=0,E[2]=0,E[3]=0,E[4]=0,E[5]=w,E[6]=_,E[7]=0,E[8]=0,E[9]=-_,E[10]=w,E[11]=0,E[12]=0,E[13]=0,E[14]=0,E[15]=1,E}},331:function(D){D.exports=function(E,e){var _=Math.sin(e),w=Math.cos(e);return E[0]=w,E[1]=0,E[2]=-_,E[3]=0,E[4]=0,E[5]=1,E[6]=0,E[7]=0,E[8]=_,E[9]=0,E[10]=w,E[11]=0,E[12]=0,E[13]=0,E[14]=0,E[15]=1,E}},11049:function(D){D.exports=function(E,e){var _=Math.sin(e),w=Math.cos(e);return E[0]=w,E[1]=_,E[2]=0,E[3]=0,E[4]=-_,E[5]=w,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}},75195:function(D){D.exports=function(E,e,_,w,s,T,m){var f=1/(_-e),l=1/(s-w),t=1/(T-m);return E[0]=2*T*f,E[1]=0,E[2]=0,E[3]=0,E[4]=0,E[5]=2*T*l,E[6]=0,E[7]=0,E[8]=(_+e)*f,E[9]=(s+w)*l,E[10]=(m+T)*t,E[11]=-1,E[12]=0,E[13]=0,E[14]=m*T*2*t,E[15]=0,E}},71551:function(D){D.exports=function(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}},79576:function(D,E,e){D.exports={create:e(11902),clone:e(42331),copy:e(31042),identity:e(71551),transpose:e(88654),invert:e(95874),adjoint:e(85400),determinant:e(89887),multiply:e(91362),translate:e(31283),scale:e(10789),rotate:e(65074),rotateX:e(35545),rotateY:e(94918),rotateZ:e(15692),fromRotation:e(34045),fromRotationTranslation:e(45973),fromScaling:e(81472),fromTranslation:e(14669),fromXRotation:e(75262),fromYRotation:e(331),fromZRotation:e(11049),fromQuat:e(27812),frustum:e(75195),perspective:e(7864),perspectiveFromFieldOfView:e(35279),ortho:e(60378),lookAt:e(65551),str:e(6726)}},95874:function(D){D.exports=function(E,e){var _=e[0],w=e[1],s=e[2],T=e[3],m=e[4],f=e[5],l=e[6],t=e[7],i=e[8],r=e[9],n=e[10],o=e[11],a=e[12],u=e[13],p=e[14],c=e[15],b=_*f-w*m,d=_*l-s*m,v=_*t-T*m,x=w*l-s*f,g=w*t-T*f,y=s*t-T*l,k=i*u-r*a,h=i*p-n*a,M=i*c-o*a,A=r*p-n*u,C=r*c-o*u,L=n*c-o*p,O=b*L-d*C+v*A+x*M-g*h+y*k;return O?(O=1/O,E[0]=(f*L-l*C+t*A)*O,E[1]=(s*C-w*L-T*A)*O,E[2]=(u*y-p*g+c*x)*O,E[3]=(n*g-r*y-o*x)*O,E[4]=(l*M-m*L-t*h)*O,E[5]=(_*L-s*M+T*h)*O,E[6]=(p*v-a*y-c*d)*O,E[7]=(i*y-n*v+o*d)*O,E[8]=(m*C-f*M+t*k)*O,E[9]=(w*M-_*C-T*k)*O,E[10]=(a*g-u*v+c*b)*O,E[11]=(r*v-i*g-o*b)*O,E[12]=(f*h-m*A-l*k)*O,E[13]=(_*A-w*h+s*k)*O,E[14]=(u*d-a*x-p*b)*O,E[15]=(i*x-r*d+n*b)*O,E):null}},65551:function(D,E,e){var _=e(71551);D.exports=function(w,s,T,m){var f,l,t,i,r,n,o,a,u,p,c=s[0],b=s[1],d=s[2],v=m[0],x=m[1],g=m[2],y=T[0],k=T[1],h=T[2];return Math.abs(c-y)<1e-6&&Math.abs(b-k)<1e-6&&Math.abs(d-h)<1e-6?_(w):(o=c-y,a=b-k,u=d-h,f=x*(u*=p=1/Math.sqrt(o*o+a*a+u*u))-g*(a*=p),l=g*(o*=p)-v*u,t=v*a-x*o,(p=Math.sqrt(f*f+l*l+t*t))?(f*=p=1/p,l*=p,t*=p):(f=0,l=0,t=0),i=a*t-u*l,r=u*f-o*t,n=o*l-a*f,(p=Math.sqrt(i*i+r*r+n*n))?(i*=p=1/p,r*=p,n*=p):(i=0,r=0,n=0),w[0]=f,w[1]=i,w[2]=o,w[3]=0,w[4]=l,w[5]=r,w[6]=a,w[7]=0,w[8]=t,w[9]=n,w[10]=u,w[11]=0,w[12]=-(f*c+l*b+t*d),w[13]=-(i*c+r*b+n*d),w[14]=-(o*c+a*b+u*d),w[15]=1,w)}},91362:function(D){D.exports=function(E,e,_){var w=e[0],s=e[1],T=e[2],m=e[3],f=e[4],l=e[5],t=e[6],i=e[7],r=e[8],n=e[9],o=e[10],a=e[11],u=e[12],p=e[13],c=e[14],b=e[15],d=_[0],v=_[1],x=_[2],g=_[3];return E[0]=d*w+v*f+x*r+g*u,E[1]=d*s+v*l+x*n+g*p,E[2]=d*T+v*t+x*o+g*c,E[3]=d*m+v*i+x*a+g*b,d=_[4],v=_[5],x=_[6],g=_[7],E[4]=d*w+v*f+x*r+g*u,E[5]=d*s+v*l+x*n+g*p,E[6]=d*T+v*t+x*o+g*c,E[7]=d*m+v*i+x*a+g*b,d=_[8],v=_[9],x=_[10],g=_[11],E[8]=d*w+v*f+x*r+g*u,E[9]=d*s+v*l+x*n+g*p,E[10]=d*T+v*t+x*o+g*c,E[11]=d*m+v*i+x*a+g*b,d=_[12],v=_[13],x=_[14],g=_[15],E[12]=d*w+v*f+x*r+g*u,E[13]=d*s+v*l+x*n+g*p,E[14]=d*T+v*t+x*o+g*c,E[15]=d*m+v*i+x*a+g*b,E}},60378:function(D){D.exports=function(E,e,_,w,s,T,m){var f=1/(e-_),l=1/(w-s),t=1/(T-m);return E[0]=-2*f,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*t,E[11]=0,E[12]=(e+_)*f,E[13]=(s+w)*l,E[14]=(m+T)*t,E[15]=1,E}},7864:function(D){D.exports=function(E,e,_,w,s){var T=1/Math.tan(e/2),m=1/(w-s);return E[0]=T/_,E[1]=0,E[2]=0,E[3]=0,E[4]=0,E[5]=T,E[6]=0,E[7]=0,E[8]=0,E[9]=0,E[10]=(s+w)*m,E[11]=-1,E[12]=0,E[13]=0,E[14]=2*s*w*m,E[15]=0,E}},35279:function(D){D.exports=function(E,e,_,w){var s=Math.tan(e.upDegrees*Math.PI/180),T=Math.tan(e.downDegrees*Math.PI/180),m=Math.tan(e.leftDegrees*Math.PI/180),f=Math.tan(e.rightDegrees*Math.PI/180),l=2/(m+f),t=2/(s+T);return E[0]=l,E[1]=0,E[2]=0,E[3]=0,E[4]=0,E[5]=t,E[6]=0,E[7]=0,E[8]=-(m-f)*l*.5,E[9]=(s-T)*t*.5,E[10]=w/(_-w),E[11]=-1,E[12]=0,E[13]=0,E[14]=w*_/(_-w),E[15]=0,E}},65074:function(D){D.exports=function(E,e,_,w){var s,T,m,f,l,t,i,r,n,o,a,u,p,c,b,d,v,x,g,y,k,h,M,A,C=w[0],L=w[1],O=w[2],I=Math.sqrt(C*C+L*L+O*O);return Math.abs(I)<1e-6?null:(C*=I=1/I,L*=I,O*=I,s=Math.sin(_),m=1-(T=Math.cos(_)),f=e[0],l=e[1],t=e[2],i=e[3],r=e[4],n=e[5],o=e[6],a=e[7],u=e[8],p=e[9],c=e[10],b=e[11],d=C*C*m+T,v=L*C*m+O*s,x=O*C*m-L*s,g=C*L*m-O*s,y=L*L*m+T,k=O*L*m+C*s,h=C*O*m+L*s,M=L*O*m-C*s,A=O*O*m+T,E[0]=f*d+r*v+u*x,E[1]=l*d+n*v+p*x,E[2]=t*d+o*v+c*x,E[3]=i*d+a*v+b*x,E[4]=f*g+r*y+u*k,E[5]=l*g+n*y+p*k,E[6]=t*g+o*y+c*k,E[7]=i*g+a*y+b*k,E[8]=f*h+r*M+u*A,E[9]=l*h+n*M+p*A,E[10]=t*h+o*M+c*A,E[11]=i*h+a*M+b*A,e!==E&&(E[12]=e[12],E[13]=e[13],E[14]=e[14],E[15]=e[15]),E)}},35545:function(D){D.exports=function(E,e,_){var w=Math.sin(_),s=Math.cos(_),T=e[4],m=e[5],f=e[6],l=e[7],t=e[8],i=e[9],r=e[10],n=e[11];return e!==E&&(E[0]=e[0],E[1]=e[1],E[2]=e[2],E[3]=e[3],E[12]=e[12],E[13]=e[13],E[14]=e[14],E[15]=e[15]),E[4]=T*s+t*w,E[5]=m*s+i*w,E[6]=f*s+r*w,E[7]=l*s+n*w,E[8]=t*s-T*w,E[9]=i*s-m*w,E[10]=r*s-f*w,E[11]=n*s-l*w,E}},94918:function(D){D.exports=function(E,e,_){var w=Math.sin(_),s=Math.cos(_),T=e[0],m=e[1],f=e[2],l=e[3],t=e[8],i=e[9],r=e[10],n=e[11];return e!==E&&(E[4]=e[4],E[5]=e[5],E[6]=e[6],E[7]=e[7],E[12]=e[12],E[13]=e[13],E[14]=e[14],E[15]=e[15]),E[0]=T*s-t*w,E[1]=m*s-i*w,E[2]=f*s-r*w,E[3]=l*s-n*w,E[8]=T*w+t*s,E[9]=m*w+i*s,E[10]=f*w+r*s,E[11]=l*w+n*s,E}},15692:function(D){D.exports=function(E,e,_){var w=Math.sin(_),s=Math.cos(_),T=e[0],m=e[1],f=e[2],l=e[3],t=e[4],i=e[5],r=e[6],n=e[7];return e!==E&&(E[8]=e[8],E[9]=e[9],E[10]=e[10],E[11]=e[11],E[12]=e[12],E[13]=e[13],E[14]=e[14],E[15]=e[15]),E[0]=T*s+t*w,E[1]=m*s+i*w,E[2]=f*s+r*w,E[3]=l*s+n*w,E[4]=t*s-T*w,E[5]=i*s-m*w,E[6]=r*s-f*w,E[7]=n*s-l*w,E}},10789:function(D){D.exports=function(E,e,_){var w=_[0],s=_[1],T=_[2];return E[0]=e[0]*w,E[1]=e[1]*w,E[2]=e[2]*w,E[3]=e[3]*w,E[4]=e[4]*s,E[5]=e[5]*s,E[6]=e[6]*s,E[7]=e[7]*s,E[8]=e[8]*T,E[9]=e[9]*T,E[10]=e[10]*T,E[11]=e[11]*T,E[12]=e[12],E[13]=e[13],E[14]=e[14],E[15]=e[15],E}},6726:function(D){D.exports=function(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]+")"}},31283:function(D){D.exports=function(E,e,_){var w,s,T,m,f,l,t,i,r,n,o,a,u=_[0],p=_[1],c=_[2];return e===E?(E[12]=e[0]*u+e[4]*p+e[8]*c+e[12],E[13]=e[1]*u+e[5]*p+e[9]*c+e[13],E[14]=e[2]*u+e[6]*p+e[10]*c+e[14],E[15]=e[3]*u+e[7]*p+e[11]*c+e[15]):(w=e[0],s=e[1],T=e[2],m=e[3],f=e[4],l=e[5],t=e[6],i=e[7],r=e[8],n=e[9],o=e[10],a=e[11],E[0]=w,E[1]=s,E[2]=T,E[3]=m,E[4]=f,E[5]=l,E[6]=t,E[7]=i,E[8]=r,E[9]=n,E[10]=o,E[11]=a,E[12]=w*u+f*p+r*c+e[12],E[13]=s*u+l*p+n*c+e[13],E[14]=T*u+t*p+o*c+e[14],E[15]=m*u+i*p+a*c+e[15]),E}},88654:function(D){D.exports=function(E,e){if(E===e){var _=e[1],w=e[2],s=e[3],T=e[6],m=e[7],f=e[11];E[1]=e[4],E[2]=e[8],E[3]=e[12],E[4]=_,E[6]=e[9],E[7]=e[13],E[8]=w,E[9]=T,E[11]=e[14],E[12]=s,E[13]=m,E[14]=f}else E[0]=e[0],E[1]=e[4],E[2]=e[8],E[3]=e[12],E[4]=e[1],E[5]=e[5],E[6]=e[9],E[7]=e[13],E[8]=e[2],E[9]=e[6],E[10]=e[10],E[11]=e[14],E[12]=e[3],E[13]=e[7],E[14]=e[11],E[15]=e[15];return E}},42505:function(D,E,e){var _=e(72791),w=e(71299),s=e(98580),T=e(12018),m=e(83522),f=e(25075),l=e(68016),t=e(58404),i=e(18863),r=e(10973),n=e(25677),o=e(75686),a=e(53545),u=e(56131),p=e(32879),c=e(30120),b=e(13547).nextPow2,d=new m,v=!1;if(document.body){var x=document.body.appendChild(document.createElement("div"));x.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(x).fontStretch&&(v=!0),document.body.removeChild(x)}var g=function(y){(function(k){return typeof k=="function"&&k._gl&&k.prop&&k.texture&&k.buffer})(y)?(y={regl:y},this.gl=y.regl._gl):this.gl=T(y),this.shader=d.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=y.regl||s({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),d.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(r(y)?y:{})};g.prototype.createShader=function(){var y=this.regl,k=y({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:y.prop("count"),offset:y.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:y.this("sizeBuffer")},width:{offset:0,stride:8,buffer:y.this("sizeBuffer")},char:y.this("charBuffer"),position:y.this("position")},uniforms:{atlasSize:function(h,M){return[M.atlas.width,M.atlas.height]},atlasDim:function(h,M){return[M.atlas.cols,M.atlas.rows]},atlas:function(h,M){return M.atlas.texture},charStep:function(h,M){return M.atlas.step},em:function(h,M){return M.atlas.em},color:y.prop("color"),opacity:y.prop("opacity"),viewport:y.this("viewportArray"),scale:y.this("scale"),align:y.prop("align"),baseline:y.prop("baseline"),translate:y.this("translate"),positionOffset:y.prop("positionOffset")},primitive:"points",viewport:y.this("viewport"),vert:` precision highp float; attribute float width, charOffset, char; attribute vec2 position; @@ -2517,7 +2517,7 @@ // color.rgb += (1. - color.rgb) * (1. - mask.rgb); gl_FragColor = color; - }`});return{regl:m,draw:k,atlas:{}}},g.prototype.update=function(m){var k=this;if(typeof m=="string")m={text:m};else if(!m)return;(m=w(m,{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)).opacity!=null&&(Array.isArray(m.opacity)?this.opacity=m.opacity.map(function(ne){return parseFloat(ne)}):this.opacity=parseFloat(m.opacity)),m.viewport!=null&&(this.viewport=i(m.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]),m.kerning!=null&&(this.kerning=m.kerning),m.offset!=null&&(typeof m.offset=="number"&&(m.offset=[m.offset,0]),this.positionOffset=c(m.offset)),m.direction&&(this.direction=m.direction),m.range&&(this.range=m.range,this.scale=[1/(m.range[2]-m.range[0]),1/(m.range[3]-m.range[1])],this.translate=[-m.range[0],-m.range[1]]),m.scale&&(this.scale=m.scale),m.translate&&(this.translate=m.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||m.font||(m.font=g.baseFontSize+"px sans-serif");var h,M=!1,A=!1;if(m.font&&(Array.isArray(m.font)?m.font:[m.font]).forEach(function(ne,ue){if(typeof ne=="string")try{ne=_.parse(ne)}catch{ne=_.parse(g.baseFontSize+"px "+ne)}else ne=_.parse(_.stringify(ne));var me=_.stringify({size:g.baseFontSize,family:ne.family,stretch:v?ne.stretch:void 0,variant:ne.variant,weight:ne.weight,style:ne.style}),Te=n(ne.size),Ee=Math.round(Te[0]*o(Te[1]));if(Ee!==k.fontSize[ue]&&(A=!0,k.fontSize[ue]=Ee),!(k.font[ue]&&me==k.font[ue].baseString||(M=!0,k.font[ue]=g.fonts[me],k.font[ue]))){var Ue=ne.family.join(", "),De=[ne.style];ne.style!=ne.variant&&De.push(ne.variant),ne.variant!=ne.weight&&De.push(ne.weight),v&&ne.weight!=ne.stretch&&De.push(ne.stretch),k.font[ue]={baseString:me,family:Ue,weight:ne.weight,stretch:ne.stretch,style:ne.style,variant:ne.variant,width:{},kerning:{},metrics:p(Ue,{origin:"top",fontSize:g.baseFontSize,fontStyle:De.join(" ")})},g.fonts[me]=k.font[ue]}}),(M||A)&&this.font.forEach(function(ne,ue){var me=_.stringify({size:k.fontSize[ue],family:ne.family,stretch:v?ne.stretch:void 0,variant:ne.variant,weight:ne.weight,style:ne.style});if(k.fontAtlas[ue]=k.shader.atlas[me],!k.fontAtlas[ue]){var Te=ne.metrics;k.shader.atlas[me]=k.fontAtlas[ue]={fontString:me,step:2*Math.ceil(k.fontSize[ue]*Te.bottom*.5),em:k.fontSize[ue],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:k.regl.texture()}}m.text==null&&(m.text=k.text)}),typeof m.text=="string"&&m.position&&m.position.length>2){for(var C=Array(.5*m.position.length),L=0;L2){for(var I=!m.position[0].length,R=t.mallocFloat(2*this.count),U=0,B=0;U1?k.align[ue]:k.align[0]:k.align;if(typeof me=="number")return me;switch(me){case"right":case"end":return-ne;case"center":case"centre":case"middle":return .5*-ne}return 0})),this.baseline==null&&m.baseline==null&&(m.baseline=0),m.baseline!=null&&(this.baseline=m.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(ne,ue){var me=(k.font[ue]||k.font[0]).metrics,Te=0;return Te+=.5*me.bottom,-1*(Te+=typeof ne=="number"?ne-me.baseline:-me[ne])})),m.color!=null)if(m.color||(m.color="transparent"),typeof m.color!="string"&&isNaN(m.color)){var de;if(typeof m.color[0]=="number"&&m.color.length>this.counts.length){var he=m.color.length;de=t.mallocUint8(he);for(var xe=(m.color.subarray||m.color.slice).bind(m.color),Re=0;Re4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var Me=Math.max(.5*this.position.length||0,.25*this.color.length||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,.5*this.positionOffset.length||0);this.batch=Array(Me);for(var Ce=0;Ce1?this.counts[Ce]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[Ce]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*Ce,4*Ce+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[Ce]:this.opacity,baseline:this.baselineOffset[Ce]!=null?this.baselineOffset[Ce]:this.baselineOffset[0],align:this.align?this.alignOffset[Ce]!=null?this.alignOffset[Ce]:this.alignOffset[0]:0,atlas:this.fontAtlas[Ce]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*Ce,2*Ce+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=[]},g.prototype.destroy=function(){},g.prototype.kerning=!0,g.prototype.position={constant:new Float32Array(2)},g.prototype.translate=null,g.prototype.scale=null,g.prototype.font=null,g.prototype.text="",g.prototype.positionOffset=[0,0],g.prototype.opacity=1,g.prototype.color=new Uint8Array([0,0,0,255]),g.prototype.alignOffset=[0,0],g.maxAtlasSize=1024,g.atlasCanvas=document.createElement("canvas"),g.atlasContext=g.atlasCanvas.getContext("2d",{alpha:!1}),g.baseFontSize=64,g.fonts={},D.exports=g},12018:function(D,E,e){var _=e(71299);function w(y){if(y.container)if(y.container==document.body)document.body.style.width||(y.canvas.width=y.width||y.pixelRatio*e.g.innerWidth),document.body.style.height||(y.canvas.height=y.height||y.pixelRatio*e.g.innerHeight);else{var f=y.container.getBoundingClientRect();y.canvas.width=y.width||f.right-f.left,y.canvas.height=y.height||f.bottom-f.top}}function s(y){return typeof y.getContext=="function"&&"width"in y&&"height"in y}function T(){var y=document.createElement("canvas");return y.style.position="absolute",y.style.top=0,y.style.left=0,y}D.exports=function(y){var f;if(y?typeof y=="string"&&(y={container:y}):y={},(y=s(y)||typeof(f=y).nodeName=="string"&&typeof f.appendChild=="function"&&typeof f.getBoundingClientRect=="function"?{container:y}:function(t){return typeof t.drawArrays=="function"||typeof t.drawElements=="function"}(y)?{gl:y}:_(y,{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)).pixelRatio||(y.pixelRatio=e.g.pixelRatio||1),y.gl)return y.gl;if(y.canvas&&(y.container=y.canvas.parentNode),y.container){if(typeof y.container=="string"){var l=document.querySelector(y.container);if(!l)throw Error("Element "+y.container+" is not found");y.container=l}s(y.container)?(y.canvas=y.container,y.container=y.canvas.parentNode):y.canvas||(y.canvas=T(),y.container.appendChild(y.canvas),w(y))}else if(!y.canvas){if(typeof document>"u")throw Error("Not DOM environment. Use headless-gl.");y.container=document.body||document.documentElement,y.canvas=T(),y.container.appendChild(y.canvas),w(y)}return y.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(t){try{y.gl=y.canvas.getContext(t,y.attrs)}catch{}return y.gl}),y.gl}},56068:function(D){D.exports=function(E){typeof E=="string"&&(E=[E]);for(var e=[].slice.call(arguments,1),_=[],w=0;w>1,r=-7,n=w?T-1:0,o=w?-1:1,a=e[_+n];for(n+=o,y=a&(1<<-r)-1,a>>=-r,r+=l;r>0;y=256*y+e[_+n],n+=o,r-=8);for(f=y&(1<<-r)-1,y>>=-r,r+=s;r>0;f=256*f+e[_+n],n+=o,r-=8);if(y===0)y=1-i;else{if(y===t)return f?NaN:1/0*(a?-1:1);f+=Math.pow(2,s),y-=i}return(a?-1:1)*f*Math.pow(2,y-s)},E.write=function(e,_,w,s,T,y){var f,l,t,i=8*y-T-1,r=(1<>1,o=T===23?Math.pow(2,-24)-Math.pow(2,-77):0,a=s?0:y-1,u=s?1:-1,p=_<0||_===0&&1/_<0?1:0;for(_=Math.abs(_),isNaN(_)||_===1/0?(l=isNaN(_)?1:0,f=r):(f=Math.floor(Math.log(_)/Math.LN2),_*(t=Math.pow(2,-f))<1&&(f--,t*=2),(_+=f+n>=1?o/t:o*Math.pow(2,1-n))*t>=2&&(f++,t/=2),f+n>=r?(l=0,f=r):f+n>=1?(l=(_*t-1)*Math.pow(2,T),f+=n):(l=_*Math.pow(2,n-1)*Math.pow(2,T),f=0));T>=8;e[w+a]=255&l,a+=u,l/=256,T-=8);for(f=f<0;e[w+a]=255&f,a+=u,f/=256,i-=8);e[w+a-u]|=128*p}},42018:function(D){typeof Object.create=="function"?D.exports=function(E,e){e&&(E.super_=e,E.prototype=Object.create(e.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}))}:D.exports=function(E,e){if(e){E.super_=e;var _=function(){};_.prototype=e.prototype,E.prototype=new _,E.prototype.constructor=E}}},47216:function(D,E,e){var _=e(84543)(),w=e(6614)("Object.prototype.toString"),s=function(f){return!(_&&f&&typeof f=="object"&&Symbol.toStringTag in f)&&w(f)==="[object Arguments]"},T=function(f){return!!s(f)||f!==null&&typeof f=="object"&&typeof f.length=="number"&&f.length>=0&&w(f)!=="[object Array]"&&w(f.callee)==="[object Function]"},y=function(){return s(arguments)}();s.isLegacyArguments=T,D.exports=y?s:T},54404:function(D){D.exports=!0},85395:function(D){var E,e,_=Function.prototype.toString,w=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply;if(typeof w=="function"&&typeof Object.defineProperty=="function")try{E=Object.defineProperty({},"length",{get:function(){throw e}}),e={},w(function(){throw 42},null,E)}catch(n){n!==e&&(w=null)}else w=null;var s=/^\s*class\b/,T=function(n){try{var o=_.call(n);return s.test(o)}catch{return!1}},y=function(n){try{return!T(n)&&(_.call(n),!0)}catch{return!1}},f=Object.prototype.toString,l=typeof Symbol=="function"&&!!Symbol.toStringTag,t=!(0 in[,]),i=function(){return!1};if(typeof document=="object"){var r=document.all;f.call(r)===f.call(document.all)&&(i=function(n){if((t||!n)&&(n===void 0||typeof n=="object"))try{var o=f.call(n);return(o==="[object HTMLAllCollection]"||o==="[object HTML document.all class]"||o==="[object HTMLCollection]"||o==="[object Object]")&&n("")==null}catch{}return!1})}D.exports=w?function(n){if(i(n))return!0;if(!n||typeof n!="function"&&typeof n!="object")return!1;try{w(n,null,E)}catch(o){if(o!==e)return!1}return!T(n)&&y(n)}:function(n){if(i(n))return!0;if(!n||typeof n!="function"&&typeof n!="object")return!1;if(l)return y(n);if(T(n))return!1;var o=f.call(n);return!(o!=="[object Function]"&&o!=="[object GeneratorFunction]"&&!/^\[object HTML/.test(o))&&y(n)}},65481:function(D,E,e){var _,w=Object.prototype.toString,s=Function.prototype.toString,T=/^\s*(?:function)?\*/,y=e(84543)(),f=Object.getPrototypeOf;D.exports=function(l){if(typeof l!="function")return!1;if(T.test(s.call(l)))return!0;if(!y)return w.call(l)==="[object GeneratorFunction]";if(!f)return!1;if(_===void 0){var t=function(){if(!y)return!1;try{return Function("return function*() {}")()}catch{}}();_=!!t&&f(t)}return f(l)===_}},62683:function(D){D.exports=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},64274:function(D){D.exports=function(E){return E!=E}},15567:function(D,E,e){var _=e(68222),w=e(17045),s=e(64274),T=e(14922),y=e(22442),f=_(T(),Number);w(f,{getPolyfill:T,implementation:s,shim:y}),D.exports=f},14922:function(D,E,e){var _=e(64274);D.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:_}},22442:function(D,E,e){var _=e(17045),w=e(14922);D.exports=function(){var s=w();return _(Number,{isNaN:s},{isNaN:function(){return Number.isNaN!==s}}),s}},64941:function(D){D.exports=function(E){var e=typeof E;return E!==null&&(e==="object"||e==="function")}},10973:function(D){var E=Object.prototype.toString;D.exports=function(e){var _;return E.call(e)==="[object Object]"&&((_=Object.getPrototypeOf(e))===null||_===Object.getPrototypeOf({}))}},18546:function(D){D.exports=function(E){for(var e,_=E.length,w=0;w<_;w++)if(((e=E.charCodeAt(w))<9||e>13)&&e!==32&&e!==133&&e!==160&&e!==5760&&e!==6158&&(e<8192||e>8205)&&e!==8232&&e!==8233&&e!==8239&&e!==8287&&e!==8288&&e!==12288&&e!==65279)return!1;return!0}},89546:function(D){D.exports=function(E){return typeof E=="string"&&(E=E.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(E)&&/[\dz]$/i.test(E)&&E.length>4))}},9187:function(D,E,e){var _=e(31353),w=e(72077),s=e(6614),T=s("Object.prototype.toString"),y=e(84543)(),f=e(40383),l=typeof globalThis>"u"?e.g:globalThis,t=w(),i=s("Array.prototype.indexOf",!0)||function(a,u){for(var p=0;p-1}return!!f&&function(p){var c=!1;return _(n,function(b,d){if(!c)try{c=b.call(p)===d}catch{}}),c}(a)}},44517:function(D){D.exports=function(){var E,e,_;function w(s,T){if(E)if(e){var y="var sharedChunk = {}; ("+E+")(sharedChunk); ("+e+")(sharedChunk);",f={};E(f),(_=T(f)).workerUrl=window.URL.createObjectURL(new Blob([y],{type:"text/javascript"}))}else e=T;else E=T}return w(0,function(s){function T(S,z){return S(z={exports:{}},z.exports),z.exports}var y="1.10.1",f=l;function l(S,z,Z,le){this.cx=3*S,this.bx=3*(Z-S)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*z,this.by=3*(le-z)-this.cy,this.ay=1-this.cy-this.by,this.p1x=S,this.p1y=le,this.p2x=Z,this.p2y=le}l.prototype.sampleCurveX=function(S){return((this.ax*S+this.bx)*S+this.cx)*S},l.prototype.sampleCurveY=function(S){return((this.ay*S+this.by)*S+this.cy)*S},l.prototype.sampleCurveDerivativeX=function(S){return(3*this.ax*S+2*this.bx)*S+this.cx},l.prototype.solveCurveX=function(S,z){var Z,le,ke,Ie,qe;for(z===void 0&&(z=1e-6),ke=S,qe=0;qe<8;qe++){if(Ie=this.sampleCurveX(ke)-S,Math.abs(Ie)(le=1))return le;for(;ZIe?Z=ke:le=ke,ke=.5*(le-Z)+Z}return ke},l.prototype.solve=function(S,z){return this.sampleCurveY(this.solveCurveX(S,z))};var t=i;function i(S,z){this.x=S,this.y=z}function r(S,z,Z,le){var ke=new f(S,z,Z,le);return function(Ie){return ke.solve(Ie)}}i.prototype={clone:function(){return new i(this.x,this.y)},add:function(S){return this.clone()._add(S)},sub:function(S){return this.clone()._sub(S)},multByPoint:function(S){return this.clone()._multByPoint(S)},divByPoint:function(S){return this.clone()._divByPoint(S)},mult:function(S){return this.clone()._mult(S)},div:function(S){return this.clone()._div(S)},rotate:function(S){return this.clone()._rotate(S)},rotateAround:function(S,z){return this.clone()._rotateAround(S,z)},matMult:function(S){return this.clone()._matMult(S)},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(S){return this.x===S.x&&this.y===S.y},dist:function(S){return Math.sqrt(this.distSqr(S))},distSqr:function(S){var z=S.x-this.x,Z=S.y-this.y;return z*z+Z*Z},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(S){return Math.atan2(this.y-S.y,this.x-S.x)},angleWith:function(S){return this.angleWithSep(S.x,S.y)},angleWithSep:function(S,z){return Math.atan2(this.x*z-this.y*S,this.x*S+this.y*z)},_matMult:function(S){var z=S[0]*this.x+S[1]*this.y,Z=S[2]*this.x+S[3]*this.y;return this.x=z,this.y=Z,this},_add:function(S){return this.x+=S.x,this.y+=S.y,this},_sub:function(S){return this.x-=S.x,this.y-=S.y,this},_mult:function(S){return this.x*=S,this.y*=S,this},_div:function(S){return this.x/=S,this.y/=S,this},_multByPoint:function(S){return this.x*=S.x,this.y*=S.y,this},_divByPoint:function(S){return this.x/=S.x,this.y/=S.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var S=this.y;return this.y=this.x,this.x=-S,this},_rotate:function(S){var z=Math.cos(S),Z=Math.sin(S),le=z*this.x-Z*this.y,ke=Z*this.x+z*this.y;return this.x=le,this.y=ke,this},_rotateAround:function(S,z){var Z=Math.cos(S),le=Math.sin(S),ke=z.x+Z*(this.x-z.x)-le*(this.y-z.y),Ie=z.y+le*(this.x-z.x)+Z*(this.y-z.y);return this.x=ke,this.y=Ie,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},i.convert=function(S){return S instanceof i?S:Array.isArray(S)?new i(S[0],S[1]):S};var n=r(.25,.1,.25,1);function o(S,z,Z){return Math.min(Z,Math.max(z,S))}function a(S,z,Z){var le=Z-z,ke=((S-z)%le+le)%le+z;return ke===z?Z:ke}function u(S){for(var z=[],Z=arguments.length-1;Z-- >0;)z[Z]=arguments[Z+1];for(var le=0,ke=z;le>z/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,S)}()}function d(S){return!!S&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(S)}function v(S,z){S.forEach(function(Z){z[Z]&&(z[Z]=z[Z].bind(z))})}function x(S,z){return S.indexOf(z,S.length-z.length)!==-1}function g(S,z,Z){var le={};for(var ke in S)le[ke]=z.call(Z||this,S[ke],ke,S);return le}function m(S,z,Z){var le={};for(var ke in S)z.call(Z||this,S[ke],ke,S)&&(le[ke]=S[ke]);return le}function k(S){return Array.isArray(S)?S.map(k):typeof S=="object"&&S?g(S,k):S}var h={};function M(S){h[S]||(typeof console<"u"&&console.warn(S),h[S]=!0)}function A(S,z,Z){return(Z.y-S.y)*(z.x-S.x)>(z.y-S.y)*(Z.x-S.x)}function C(S){for(var z=0,Z=0,le=S.length,ke=le-1,Ie=void 0,qe=void 0;Z@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,function(le,ke,Ie,qe){var it=Ie||qe;return z[ke]=!it||it.toLowerCase(),""}),z["max-age"]){var Z=parseInt(z["max-age"],10);isNaN(Z)?delete z["max-age"]:z["max-age"]=Z}return z}var I=null;function R(S){if(I==null){var z=S.navigator?S.navigator.userAgent:null;I=!!S.safari||!(!z||!(/\b(iPad|iPhone|iPod)\b/.test(z)||z.match("Safari")&&!z.match("Chrome")))}return I}function U(S){try{var z=self[S];return z.setItem("_mapbox_test_",1),z.removeItem("_mapbox_test_"),!0}catch{return!1}}var B,G,N,j,V=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),H=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,ee=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,Q={now:V,frame:function(S){var z=H(S);return{cancel:function(){return ee(z)}}},getImageData:function(S,z){z===void 0&&(z=0);var Z=self.document.createElement("canvas"),le=Z.getContext("2d");if(!le)throw new Error("failed to create canvas 2d context");return Z.width=S.width,Z.height=S.height,le.drawImage(S,0,0,S.width,S.height),le.getImageData(-z,-z,S.width+2*z,S.height+2*z)},resolveURL:function(S){return B||(B=self.document.createElement("a")),B.href=S,B.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return!!self.matchMedia&&(G==null&&(G=self.matchMedia("(prefers-reduced-motion: reduce)")),G.matches)}},X={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},Y={supported:!1,testSupport:function(S){!K&&j&&(te?ae(S):N=S)}},K=!1,te=!1;function ae(S){var z=S.createTexture();S.bindTexture(S.TEXTURE_2D,z);try{if(S.texImage2D(S.TEXTURE_2D,0,S.RGBA,S.RGBA,S.UNSIGNED_BYTE,j),S.isContextLost())return;Y.supported=!0}catch{}S.deleteTexture(z),K=!0}self.document&&((j=self.document.createElement("img")).onload=function(){N&&ae(N),N=null,te=!0},j.onerror=function(){K=!0,N=null},j.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var oe="01",se=function(S,z){this._transformRequestFn=S,this._customAccessToken=z,this._createSkuToken()};function fe(S){return S.indexOf("mapbox:")===0}se.prototype._createSkuToken=function(){var S=function(){for(var z="",Z=0;Z<10;Z++)z+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",oe,z].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=S.token,this._skuTokenExpiresAt=S.tokenExpiresAt},se.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},se.prototype.transformRequest=function(S,z){return this._transformRequestFn&&this._transformRequestFn(S,z)||{url:S}},se.prototype.normalizeStyleURL=function(S,z){if(!fe(S))return S;var Z=he(S);return Z.path="/styles/v1"+Z.path,this._makeAPIURL(Z,this._customAccessToken||z)},se.prototype.normalizeGlyphsURL=function(S,z){if(!fe(S))return S;var Z=he(S);return Z.path="/fonts/v1"+Z.path,this._makeAPIURL(Z,this._customAccessToken||z)},se.prototype.normalizeSourceURL=function(S,z){if(!fe(S))return S;var Z=he(S);return Z.path="/v4/"+Z.authority+".json",Z.params.push("secure"),this._makeAPIURL(Z,this._customAccessToken||z)},se.prototype.normalizeSpriteURL=function(S,z,Z,le){var ke=he(S);return fe(S)?(ke.path="/styles/v1"+ke.path+"/sprite"+z+Z,this._makeAPIURL(ke,this._customAccessToken||le)):(ke.path+=""+z+Z,xe(ke))},se.prototype.normalizeTileURL=function(S,z){if(this._isSkuTokenExpired()&&this._createSkuToken(),S&&!fe(S))return S;var Z=he(S),le=Q.devicePixelRatio>=2||z===512?"@2x":"",ke=Y.supported?".webp":"$1";Z.path=Z.path.replace(/(\.(png|jpg)\d*)(?=$)/,""+le+ke),Z.path=Z.path.replace(/^.+\/v4\//,"/"),Z.path="/v4"+Z.path;var Ie=this._customAccessToken||function(qe){for(var it=0,dt=qe;it=1&&self.localStorage.setItem(z,JSON.stringify(this.eventData))}catch{M("Unable to write to LocalStorage")}},Ae.prototype.processRequests=function(S){},Ae.prototype.postEvent=function(S,z,Z,le){var ke=this;if(X.EVENTS_URL){var Ie=he(X.EVENTS_URL);Ie.params.push("access_token="+(le||X.ACCESS_TOKEN||""));var qe={event:this.type,created:new Date(S).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:y,skuId:oe,userId:this.anonId},it=z?u(qe,z):qe,dt={url:xe(Ie),headers:{"Content-Type":"text/plain"},body:JSON.stringify([it])};this.pendingRequest=It(dt,function(St){ke.pendingRequest=null,Z(St),ke.saveEventData(),ke.processRequests(le)})}},Ae.prototype.queueRequest=function(S,z){this.queue.push(S),this.processRequests(z)};var Me,Ce,ne=function(S){function z(){S.call(this,"map.load"),this.success={},this.skuToken=""}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.postMapLoadEvent=function(Z,le,ke,Ie){this.skuToken=ke,(X.EVENTS_URL&&Ie||X.ACCESS_TOKEN&&Array.isArray(Z)&&Z.some(function(qe){return fe(qe)||pe(qe)}))&&this.queueRequest({id:le,timestamp:Date.now()},Ie)},z.prototype.processRequests=function(Z){var le=this;if(!this.pendingRequest&&this.queue.length!==0){var ke=this.queue.shift(),Ie=ke.id,qe=ke.timestamp;Ie&&this.success[Ie]||(this.anonId||this.fetchEventData(),d(this.anonId)||(this.anonId=b()),this.postEvent(qe,{skuToken:this.skuToken},function(it){it||Ie&&(le.success[Ie]=!0)},Z))}},z}(Ae),ue=function(S){function z(Z){S.call(this,"appUserTurnstile"),this._customAccessToken=Z}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.postTurnstileEvent=function(Z,le){X.EVENTS_URL&&X.ACCESS_TOKEN&&Array.isArray(Z)&&Z.some(function(ke){return fe(ke)||pe(ke)})&&this.queueRequest(Date.now(),le)},z.prototype.processRequests=function(Z){var le=this;if(!this.pendingRequest&&this.queue.length!==0){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var ke=we(X.ACCESS_TOKEN),Ie=ke?ke.u:X.ACCESS_TOKEN,qe=Ie!==this.eventData.tokenU;d(this.anonId)||(this.anonId=b(),qe=!0);var it=this.queue.shift();if(this.eventData.lastSuccess){var dt=new Date(this.eventData.lastSuccess),St=new Date(it),Rt=(it-this.eventData.lastSuccess)/864e5;qe=qe||Rt>=1||Rt<-1||dt.getDate()!==St.getDate()}else qe=!0;if(!qe)return this.processRequests();this.postEvent(it,{"enabled.telemetry":!1},function(Ht){Ht||(le.eventData.lastSuccess=it,le.eventData.tokenU=Ie)},Z)}},z}(Ae),me=new ue,Te=me.postTurnstileEvent.bind(me),Ee=new ne,Ue=Ee.postMapLoadEvent.bind(Ee),De="mapbox-tiles",je=500,ge=50;function be(){self.caches&&!Me&&(Me=self.caches.open(De))}function Se(S,z,Z){if(be(),Me){var le={status:z.status,statusText:z.statusText,headers:new self.Headers};z.headers.forEach(function(Ie,qe){return le.headers.set(qe,Ie)});var ke=O(z.headers.get("Cache-Control")||"");ke["no-store"]||(ke["max-age"]&&le.headers.set("Expires",new Date(Z+1e3*ke["max-age"]).toUTCString()),new Date(le.headers.get("Expires")).getTime()-Z<42e4||function(Ie,qe){if(Ce===void 0)try{new Response(new ReadableStream),Ce=!0}catch{Ce=!1}Ce?qe(Ie.body):Ie.blob().then(qe)}(z,function(Ie){var qe=new self.Response(Ie,le);be(),Me&&Me.then(function(it){return it.put(Ne(S.url),qe)}).catch(function(it){return M(it.message)})}))}}function Ne(S){var z=S.indexOf("?");return z<0?S:S.slice(0,z)}function Ye(S,z){if(be(),!Me)return z(null);var Z=Ne(S.url);Me.then(function(le){le.match(Z).then(function(ke){var Ie=function(qe){if(!qe)return!1;var it=new Date(qe.headers.get("Expires")||0),dt=O(qe.headers.get("Cache-Control")||"");return it>Date.now()&&!dt["no-cache"]}(ke);le.delete(Z),Ie&&le.put(Z,ke.clone()),z(null,ke,Ie)}).catch(z)}).catch(z)}var Ze,st=1/0;function ot(){return Ze==null&&(Ze=self.OffscreenCanvas&&new self.OffscreenCanvas(1,1).getContext("2d")&&typeof self.createImageBitmap=="function"),Ze}var ft={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(ft);var yt=function(S){function z(Z,le,ke){le===401&&pe(ke)&&(Z+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),S.call(this,Z),this.status=le,this.url=ke,this.name=this.constructor.name,this.message=Z}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},z}(Error),Et=L()?function(){return self.worker&&self.worker.referrer}:function(){return(self.location.protocol==="blob:"?self.parent:self).location.href};function Tt(S,z){var Z,le=new self.AbortController,ke=new self.Request(S.url,{method:S.method||"GET",body:S.body,credentials:S.credentials,headers:S.headers,referrer:Et(),signal:le.signal}),Ie=!1,qe=!1,it=(Z=ke.url).indexOf("sku=")>0&&pe(Z);S.type==="json"&&ke.headers.set("Accept","application/json");var dt=function(Rt,Ht,Yt){if(!qe){if(Rt&&Rt.message!=="SecurityError"&&M(Rt),Ht&&Yt)return St(Ht);var Zt=Date.now();self.fetch(ke).then(function(cn){if(cn.ok){var Tn=it?cn.clone():null;return St(cn,Tn,Zt)}return z(new yt(cn.statusText,cn.status,S.url))}).catch(function(cn){cn.code!==20&&z(new Error(cn.message))})}},St=function(Rt,Ht,Yt){(S.type==="arrayBuffer"?Rt.arrayBuffer():S.type==="json"?Rt.json():Rt.text()).then(function(Zt){qe||(Ht&&Yt&&Se(ke,Ht,Yt),Ie=!0,z(null,Zt,Rt.headers.get("Cache-Control"),Rt.headers.get("Expires")))}).catch(function(Zt){qe||z(new Error(Zt.message))})};return it?Ye(ke,dt):dt(null,null),{cancel:function(){qe=!0,Ie||le.abort()}}}var xt=function(S,z){if(Z=S.url,!(/^file:/.test(Z)||/^file:/.test(Et())&&!/^\w+:/.test(Z))){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty("signal"))return Tt(S,z);if(L()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",S,z,void 0,!0)}var Z;return function(le,ke){var Ie=new self.XMLHttpRequest;for(var qe in Ie.open(le.method||"GET",le.url,!0),le.type==="arrayBuffer"&&(Ie.responseType="arraybuffer"),le.headers)Ie.setRequestHeader(qe,le.headers[qe]);return le.type==="json"&&(Ie.responseType="text",Ie.setRequestHeader("Accept","application/json")),Ie.withCredentials=le.credentials==="include",Ie.onerror=function(){ke(new Error(Ie.statusText))},Ie.onload=function(){if((Ie.status>=200&&Ie.status<300||Ie.status===0)&&Ie.response!==null){var it=Ie.response;if(le.type==="json")try{it=JSON.parse(Ie.response)}catch(dt){return ke(dt)}ke(null,it,Ie.getResponseHeader("Cache-Control"),Ie.getResponseHeader("Expires"))}else ke(new yt(Ie.statusText,Ie.status,le.url))},Ie.send(le.body),{cancel:function(){return Ie.abort()}}}(S,z)},Dt=function(S,z){return xt(u(S,{type:"arrayBuffer"}),z)},It=function(S,z){return xt(u(S,{method:"POST"}),z)},Ft,qt;Ft=[],qt=0;var Nt=function(S,z){if(Y.supported&&(S.headers||(S.headers={}),S.headers.accept="image/webp,*/*"),qt>=X.MAX_PARALLEL_IMAGE_REQUESTS){var Z={requestParameters:S,callback:z,cancelled:!1,cancel:function(){this.cancelled=!0}};return Ft.push(Z),Z}qt++;var le=!1,ke=function(){if(!le)for(le=!0,qt--;Ft.length&&qt0||this._oneTimeListeners&&this._oneTimeListeners[S]&&this._oneTimeListeners[S].length>0||this._eventedParent&&this._eventedParent.listens(S)},ht.prototype.setEventedParent=function(S,z){return this._eventedParent=S,this._eventedParentData=z,this};var Oe={$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"},sources:{required:!0,type:"sources"},sprite:{type:"string"},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"},"*":{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"},"*":{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:{}},default:"mapbox"},"*":{type:"*"}},source_geojson:{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},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{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"],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"}},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":{},within:{}}},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},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},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}},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"}}},Be=function(S,z,Z,le){this.message=(S?S+": ":"")+Z,le&&(this.identifier=le),z!=null&&z.__line__&&(this.line=z.__line__)};function Qe(S){var z=S.key,Z=S.value;return Z?[new Be(z,Z,"constants have been deprecated as of v8")]:[]}function ut(S){for(var z=[],Z=arguments.length-1;Z-- >0;)z[Z]=arguments[Z+1];for(var le=0,ke=z;le":S.itemType.kind==="value"?"array":"array<"+z+">"}return S.kind}var kn=[mt,Ot,_t,Pt,Bt,Kt,Wt,yn(Gt),nn];function Wn(S,z){if(z.kind==="error")return null;if(S.kind==="array"){if(z.kind==="array"&&(z.N===0&&z.itemType.kind==="value"||!Wn(S.itemType,z.itemType))&&(typeof S.N!="number"||S.N===z.N))return null}else{if(S.kind===z.kind)return null;if(S.kind==="value"){for(var Z=0,le=kn;Z255?255:dt}function ke(dt){return dt<0?0:dt>1?1:dt}function Ie(dt){return dt[dt.length-1]==="%"?le(parseFloat(dt)/100*255):le(parseInt(dt))}function qe(dt){return dt[dt.length-1]==="%"?ke(parseFloat(dt)/100):ke(parseFloat(dt))}function it(dt,St,Rt){return Rt<0?Rt+=1:Rt>1&&(Rt-=1),6*Rt<1?dt+(St-dt)*Rt*6:2*Rt<1?St:3*Rt<2?dt+(St-dt)*(2/3-Rt)*6:dt}try{z.parseCSSColor=function(dt){var St,Rt=dt.replace(/ /g,"").toLowerCase();if(Rt in Z)return Z[Rt].slice();if(Rt[0]==="#")return Rt.length===4?(St=parseInt(Rt.substr(1),16))>=0&&St<=4095?[(3840&St)>>4|(3840&St)>>8,240&St|(240&St)>>4,15&St|(15&St)<<4,1]:null:Rt.length===7&&(St=parseInt(Rt.substr(1),16))>=0&&St<=16777215?[(16711680&St)>>16,(65280&St)>>8,255&St,1]:null;var Ht=Rt.indexOf("("),Yt=Rt.indexOf(")");if(Ht!==-1&&Yt+1===Rt.length){var Zt=Rt.substr(0,Ht),cn=Rt.substr(Ht+1,Yt-(Ht+1)).split(","),Tn=1;switch(Zt){case"rgba":if(cn.length!==4)return null;Tn=qe(cn.pop());case"rgb":return cn.length!==3?null:[Ie(cn[0]),Ie(cn[1]),Ie(cn[2]),Tn];case"hsla":if(cn.length!==4)return null;Tn=qe(cn.pop());case"hsl":if(cn.length!==3)return null;var Fn=(parseFloat(cn[0])%360+360)%360/360,Dn=qe(cn[1]),Gn=qe(cn[2]),Yn=Gn<=.5?Gn*(Dn+1):Gn+Dn-Gn*Dn,Kn=2*Gn-Yn;return[le(255*it(Kn,Yn,Fn+1/3)),le(255*it(Kn,Yn,Fn)),le(255*it(Kn,Yn,Fn-1/3)),Tn];default:return null}}return null}}catch{}}),fn=_n.parseCSSColor,hn=function(S,z,Z,le){le===void 0&&(le=1),this.r=S,this.g=z,this.b=Z,this.a=le};hn.parse=function(S){if(S){if(S instanceof hn)return S;if(typeof S=="string"){var z=fn(S);if(z)return new hn(z[0]/255*z[3],z[1]/255*z[3],z[2]/255*z[3],z[3])}}},hn.prototype.toString=function(){var S=this.toArray(),z=S[0],Z=S[1],le=S[2],ke=S[3];return"rgba("+Math.round(z)+","+Math.round(Z)+","+Math.round(le)+","+ke+")"},hn.prototype.toArray=function(){var S=this,z=S.r,Z=S.g,le=S.b,ke=S.a;return ke===0?[0,0,0,0]:[255*z/ke,255*Z/ke,255*le/ke,ke]},hn.black=new hn(0,0,0,1),hn.white=new hn(1,1,1,1),hn.transparent=new hn(0,0,0,0),hn.red=new hn(1,0,0,1);var In=function(S,z,Z){this.sensitivity=S?z?"variant":"case":z?"accent":"base",this.locale=Z,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};In.prototype.compare=function(S,z){return this.collator.compare(S,z)},In.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Cn=function(S,z,Z,le,ke){this.text=S,this.image=z,this.scale=Z,this.fontStack=le,this.textColor=ke},Nn=function(S){this.sections=S};Nn.fromString=function(S){return new Nn([new Cn(S,null,null,null,null)])},Nn.prototype.isEmpty=function(){return this.sections.length===0||!this.sections.some(function(S){return S.text.length!==0||S.image&&S.image.name.length!==0})},Nn.factory=function(S){return S instanceof Nn?S:Nn.fromString(S)},Nn.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(S){return S.text}).join("")},Nn.prototype.serialize=function(){for(var S=["format"],z=0,Z=this.sections;z=0&&S<=255&&typeof z=="number"&&z>=0&&z<=255&&typeof Z=="number"&&Z>=0&&Z<=255?le===void 0||typeof le=="number"&&le>=0&&le<=1?null:"Invalid rgba value ["+[S,z,Z,le].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+(typeof le=="number"?[S,z,Z,le]:[S,z,Z]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function or(S){if(S===null||typeof S=="string"||typeof S=="boolean"||typeof S=="number"||S instanceof hn||S instanceof In||S instanceof Nn||S instanceof Hn)return!0;if(Array.isArray(S)){for(var z=0,Z=S;z2){var it=S[1];if(typeof it!="string"||!(it in dr)||it==="object")return z.error('The item type argument of "array" must be one of string, number, boolean',1);Ie=dr[it],le++}else Ie=Gt;if(S.length>3){if(S[2]!==null&&(typeof S[2]!="number"||S[2]<0||S[2]!==Math.floor(S[2])))return z.error('The length argument to "array" must be a positive integer literal',2);qe=S[2],le++}Z=yn(Ie,qe)}else Z=dr[ke];for(var dt=[];le1)&&z.push(le)}}return z.concat(this.args.map(function(ke){return ke.serialize()}))};var $t=function(S){this.type=Kt,this.sections=S};$t.parse=function(S,z){if(S.length<2)return z.error("Expected at least one argument.");var Z=S[1];if(!Array.isArray(Z)&&typeof Z=="object")return z.error("First argument must be an image or text section.");for(var le=[],ke=!1,Ie=1;Ie<=S.length-1;++Ie){var qe=S[Ie];if(ke&&typeof qe=="object"&&!Array.isArray(qe)){ke=!1;var it=null;if(qe["font-scale"]&&!(it=z.parse(qe["font-scale"],1,Ot)))return null;var dt=null;if(qe["text-font"]&&!(dt=z.parse(qe["text-font"],1,yn(_t))))return null;var St=null;if(qe["text-color"]&&!(St=z.parse(qe["text-color"],1,Bt)))return null;var Rt=le[le.length-1];Rt.scale=it,Rt.font=dt,Rt.textColor=St}else{var Ht=z.parse(S[Ie],1,Gt);if(!Ht)return null;var Yt=Ht.type.kind;if(Yt!=="string"&&Yt!=="value"&&Yt!=="null"&&Yt!=="resolvedImage")return z.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");ke=!0,le.push({content:Ht,scale:null,font:null,textColor:null})}}return new $t(le)},$t.prototype.evaluate=function(S){return new Nn(this.sections.map(function(z){var Z=z.content.evaluate(S);return tr(Z)===nn?new Cn("",Z,null,null,null):new Cn(kr(Z),null,z.scale?z.scale.evaluate(S):null,z.font?z.font.evaluate(S).join(","):null,z.textColor?z.textColor.evaluate(S):null)}))},$t.prototype.eachChild=function(S){for(var z=0,Z=this.sections;z-1),Z},mn.prototype.eachChild=function(S){S(this.input)},mn.prototype.outputDefined=function(){return!1},mn.prototype.serialize=function(){return["image",this.input.serialize()]};var Ln={"to-boolean":Pt,"to-color":Bt,"to-number":Ot,"to-string":_t},En=function(S,z){this.type=S,this.args=z};En.parse=function(S,z){if(S.length<2)return z.error("Expected at least one argument.");var Z=S[0];if((Z==="to-boolean"||Z==="to-string")&&S.length!==2)return z.error("Expected one argument.");for(var le=Ln[Z],ke=[],Ie=1;Ie4?"Invalid rbga value "+JSON.stringify(z)+": expected an array containing either three or four numeric values.":qn(z[0],z[1],z[2],z[3])))return new hn(z[0]/255,z[1]/255,z[2]/255,z[3])}throw new ir(Z||"Could not parse color from value '"+(typeof z=="string"?z:String(JSON.stringify(z)))+"'")}if(this.type.kind==="number"){for(var qe=null,it=0,dt=this.args;it=z[2]||S[1]<=z[1]||S[3]>=z[3])}function jt(S,z){var Z,le=(180+S[0])/360,ke=(Z=S[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+Z*Math.PI/360)))/360),Ie=Math.pow(2,z.z);return[Math.round(le*Ie*hr),Math.round(ke*Ie*hr)]}function Jt(S,z,Z){return z[1]>S[1]!=Z[1]>S[1]&&S[0]<(Z[0]-z[0])*(S[1]-z[1])/(Z[1]-z[1])+z[0]}function un(S,z){for(var Z=!1,le=0,ke=z.length;le0&&Ht<0||Rt<0&&Ht>0}function Sn(S,z,Z){for(var le=0,ke=Z;leZ[2]){var ke=.5*le,Ie=S[0]-Z[0]>ke?-le:Z[0]-S[0]>ke?le:0;Ie===0&&(Ie=S[0]-Z[2]>ke?-le:Z[2]-S[0]>ke?le:0),S[0]+=Ie}tn(z,S)}function Bn(S,z,Z,le){for(var ke=Math.pow(2,le.z)*hr,Ie=[le.x*hr,le.y*hr],qe=[],it=0,dt=S;it=0)return!1;var Z=!0;return S.eachChild(function(le){Z&&!sr(le,z)&&(Z=!1)}),Z}er.parse=function(S,z){if(S.length!==2)return z.error("'within' expression requires exactly one argument, but found "+(S.length-1)+" instead.");if(or(S[1])){var Z=S[1];if(Z.type==="FeatureCollection")for(var le=0;lez))throw new ir("Input is not a number.");qe=it-1}return 0}cr.prototype.parse=function(S,z,Z,le,ke){return ke===void 0&&(ke={}),z?this.concat(z,Z,le)._parse(S,ke):this._parse(S,ke)},cr.prototype._parse=function(S,z){function Z(St,Rt,Ht){return Ht==="assert"?new yr(Rt,[St]):Ht==="coerce"?new En(Rt,[St]):St}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", []].');var le=S[0];if(typeof le!="string")return this.error("Expression name must be a string, but found "+typeof le+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var ke=this.registry[le];if(ke){var Ie=ke.parse(S,this);if(!Ie)return null;if(this.expectedType){var qe=this.expectedType,it=Ie.type;if(qe.kind!=="string"&&qe.kind!=="number"&&qe.kind!=="boolean"&&qe.kind!=="object"&&qe.kind!=="array"||it.kind!=="value")if(qe.kind!=="color"&&qe.kind!=="formatted"&&qe.kind!=="resolvedImage"||it.kind!=="value"&&it.kind!=="string"){if(this.checkSubtype(qe,it))return null}else Ie=Z(Ie,qe,z.typeAnnotation||"coerce");else Ie=Z(Ie,qe,z.typeAnnotation||"assert")}if(!(Ie instanceof gr)&&Ie.type.kind!=="resolvedImage"&&vr(Ie)){var dt=new $n;try{Ie=new gr(Ie.type,Ie.evaluate(dt))}catch(St){return this.error(St.message),null}}return Ie}return this.error('Unknown expression "'+le+'". If you wanted a literal array, use ["literal", [...]].',0)}return S===void 0?this.error("'undefined' value invalid. Use null instead."):typeof S=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof S+" instead.")},cr.prototype.concat=function(S,z,Z){var le=typeof S=="number"?this.path.concat(S):this.path,ke=Z?this.scope.concat(Z):this.scope;return new cr(this.registry,le,z||null,ke,this.errors)},cr.prototype.error=function(S){for(var z=[],Z=arguments.length-1;Z-- >0;)z[Z]=arguments[Z+1];var le=""+this.key+z.map(function(ke){return"["+ke+"]"}).join("");this.errors.push(new Lt(le,S))},cr.prototype.checkSubtype=function(S,z){var Z=Wn(S,z);return Z&&this.error(Z),Z};var Mr=function(S,z,Z){this.type=S,this.input=z,this.labels=[],this.outputs=[];for(var le=0,ke=Z;le=qe)return z.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',dt);var Rt=z.parse(it,St,ke);if(!Rt)return null;ke=ke||Rt.type,le.push([qe,Rt])}return new Mr(ke,Z,le)},Mr.prototype.evaluate=function(S){var z=this.labels,Z=this.outputs;if(z.length===1)return Z[0].evaluate(S);var le=this.input.evaluate(S);if(le<=z[0])return Z[0].evaluate(S);var ke=z.length;return le>=z[ke-1]?Z[ke-1].evaluate(S):Z[Sr(z,le)].evaluate(S)},Mr.prototype.eachChild=function(S){S(this.input);for(var z=0,Z=this.outputs;z0&&S.push(this.labels[z]),S.push(this.outputs[z].serialize());return S};var pr=Object.freeze({__proto__:null,number:Lr,color:function(S,z,Z){return new hn(Lr(S.r,z.r,Z),Lr(S.g,z.g,Z),Lr(S.b,z.b,Z),Lr(S.a,z.a,Z))},array:function(S,z,Z){return S.map(function(le,ke){return Lr(le,z[ke],Z)})}}),Pr=.95047,Hr=1.08883,ci=4/29,Ti=6/29,Mi=3*Ti*Ti,fa=Math.PI/180,Hi=180/Math.PI;function xi(S){return S>.008856451679035631?Math.pow(S,.3333333333333333):S/Mi+ci}function Oa(S){return S>Ti?S*S*S:Mi*(S-ci)}function Ka(S){return 255*(S<=.0031308?12.92*S:1.055*Math.pow(S,.4166666666666667)-.055)}function Yo(S){return(S/=255)<=.04045?S/12.92:Math.pow((S+.055)/1.055,2.4)}function Xs(S){var z=Yo(S.r),Z=Yo(S.g),le=Yo(S.b),ke=xi((.4124564*z+.3575761*Z+.1804375*le)/Pr),Ie=xi((.2126729*z+.7151522*Z+.072175*le)/1);return{l:116*Ie-16,a:500*(ke-Ie),b:200*(Ie-xi((.0193339*z+.119192*Z+.9503041*le)/Hr)),alpha:S.a}}function Uu(S){var z=(S.l+16)/116,Z=isNaN(S.a)?z:z+S.a/500,le=isNaN(S.b)?z:z-S.b/200;return z=1*Oa(z),Z=Pr*Oa(Z),le=Hr*Oa(le),new hn(Ka(3.2404542*Z-1.5371385*z-.4985314*le),Ka(-.969266*Z+1.8760108*z+.041556*le),Ka(.0556434*Z-.2040259*z+1.0572252*le),S.alpha)}function pu(S,z,Z){var le=z-S;return S+Z*(le>180||le<-180?le-360*Math.round(le/360):le)}var $s={forward:Xs,reverse:Uu,interpolate:function(S,z,Z){return{l:Lr(S.l,z.l,Z),a:Lr(S.a,z.a,Z),b:Lr(S.b,z.b,Z),alpha:Lr(S.alpha,z.alpha,Z)}}},Qa={forward:function(S){var z=Xs(S),Z=z.l,le=z.a,ke=z.b,Ie=Math.atan2(ke,le)*Hi;return{h:Ie<0?Ie+360:Ie,c:Math.sqrt(le*le+ke*ke),l:Z,alpha:S.a}},reverse:function(S){var z=S.h*fa,Z=S.c;return Uu({l:S.l,a:Math.cos(z)*Z,b:Math.sin(z)*Z,alpha:S.alpha})},interpolate:function(S,z,Z){return{h:pu(S.h,z.h,Z),c:Lr(S.c,z.c,Z),l:Lr(S.l,z.l,Z),alpha:Lr(S.alpha,z.alpha,Z)}}},du=Object.freeze({__proto__:null,lab:$s,hcl:Qa}),Qi=function(S,z,Z,le,ke){this.type=S,this.operator=z,this.interpolation=Z,this.input=le,this.labels=[],this.outputs=[];for(var Ie=0,qe=ke;Ie1}))return z.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);le={name:"cubic-bezier",controlPoints:it}}if(S.length-1<4)return z.error("Expected at least 4 arguments, but found only "+(S.length-1)+".");if((S.length-1)%2!=0)return z.error("Expected an even number of arguments.");if(!(ke=z.parse(ke,2,Ot)))return null;var dt=[],St=null;Z==="interpolate-hcl"||Z==="interpolate-lab"?St=Bt:z.expectedType&&z.expectedType.kind!=="value"&&(St=z.expectedType);for(var Rt=0;Rt=Ht)return z.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',Zt);var Tn=z.parse(Yt,cn,St);if(!Tn)return null;St=St||Tn.type,dt.push([Ht,Tn])}return St.kind==="number"||St.kind==="color"||St.kind==="array"&&St.itemType.kind==="number"&&typeof St.N=="number"?new Qi(St,Z,le,ke,dt):z.error("Type "+ln(St)+" is not interpolatable.")},Qi.prototype.evaluate=function(S){var z=this.labels,Z=this.outputs;if(z.length===1)return Z[0].evaluate(S);var le=this.input.evaluate(S);if(le<=z[0])return Z[0].evaluate(S);var ke=z.length;if(le>=z[ke-1])return Z[ke-1].evaluate(S);var Ie=Sr(z,le),qe=z[Ie],it=z[Ie+1],dt=Qi.interpolationFactor(this.interpolation,le,qe,it),St=Z[Ie].evaluate(S),Rt=Z[Ie+1].evaluate(S);return this.operator==="interpolate"?pr[this.type.kind.toLowerCase()](St,Rt,dt):this.operator==="interpolate-hcl"?Qa.reverse(Qa.interpolate(Qa.forward(St),Qa.forward(Rt),dt)):$s.reverse($s.interpolate($s.forward(St),$s.forward(Rt),dt))},Qi.prototype.eachChild=function(S){S(this.input);for(var z=0,Z=this.outputs;z=Z.length)throw new ir("Array index out of bounds: "+z+" > "+(Z.length-1)+".");if(z!==Math.floor(z))throw new ir("Array index must be an integer, but found "+z+" instead.");return Z[z]},fs.prototype.eachChild=function(S){S(this.index),S(this.input)},fs.prototype.outputDefined=function(){return!1},fs.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var fi=function(S,z){this.type=Pt,this.needle=S,this.haystack=z};fi.parse=function(S,z){if(S.length!==3)return z.error("Expected 2 arguments, but found "+(S.length-1)+" instead.");var Z=z.parse(S[1],1,Gt),le=z.parse(S[2],2,Gt);return Z&&le?wn(Z.type,[Pt,_t,Ot,mt,Gt])?new fi(Z,le):z.error("Expected first argument to be of type boolean, string, number or null, but found "+ln(Z.type)+" instead"):null},fi.prototype.evaluate=function(S){var z=this.needle.evaluate(S),Z=this.haystack.evaluate(S);if(!Z)return!1;if(!on(z,["boolean","string","number","null"]))throw new ir("Expected first argument to be of type boolean, string, number or null, but found "+ln(tr(z))+" instead.");if(!on(Z,["string","array"]))throw new ir("Expected second argument to be of type array or string, but found "+ln(tr(Z))+" instead.");return Z.indexOf(z)>=0},fi.prototype.eachChild=function(S){S(this.needle),S(this.haystack)},fi.prototype.outputDefined=function(){return!0},fi.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var hs=function(S,z,Z){this.type=Ot,this.needle=S,this.haystack=z,this.fromIndex=Z};hs.parse=function(S,z){if(S.length<=2||S.length>=5)return z.error("Expected 3 or 4 arguments, but found "+(S.length-1)+" instead.");var Z=z.parse(S[1],1,Gt),le=z.parse(S[2],2,Gt);if(!Z||!le)return null;if(!wn(Z.type,[Pt,_t,Ot,mt,Gt]))return z.error("Expected first argument to be of type boolean, string, number or null, but found "+ln(Z.type)+" instead");if(S.length===4){var ke=z.parse(S[3],3,Ot);return ke?new hs(Z,le,ke):null}return new hs(Z,le)},hs.prototype.evaluate=function(S){var z=this.needle.evaluate(S),Z=this.haystack.evaluate(S);if(!on(z,["boolean","string","number","null"]))throw new ir("Expected first argument to be of type boolean, string, number or null, but found "+ln(tr(z))+" instead.");if(!on(Z,["string","array"]))throw new ir("Expected second argument to be of type array or string, but found "+ln(tr(Z))+" instead.");if(this.fromIndex){var le=this.fromIndex.evaluate(S);return Z.indexOf(z,le)}return Z.indexOf(z)},hs.prototype.eachChild=function(S){S(this.needle),S(this.haystack),this.fromIndex&&S(this.fromIndex)},hs.prototype.outputDefined=function(){return!1},hs.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var S=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),S]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var ao=function(S,z,Z,le,ke,Ie){this.inputType=S,this.type=z,this.input=Z,this.cases=le,this.outputs=ke,this.otherwise=Ie};ao.parse=function(S,z){if(S.length<5)return z.error("Expected at least 4 arguments, but found only "+(S.length-1)+".");if(S.length%2!=1)return z.error("Expected an even number of arguments.");var Z,le;z.expectedType&&z.expectedType.kind!=="value"&&(le=z.expectedType);for(var ke={},Ie=[],qe=2;qeNumber.MAX_SAFE_INTEGER)return St.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof Yt=="number"&&Math.floor(Yt)!==Yt)return St.error("Numeric branch labels must be integer values.");if(Z){if(St.checkSubtype(Z,tr(Yt)))return null}else Z=tr(Yt);if(ke[String(Yt)]!==void 0)return St.error("Branch labels must be unique.");ke[String(Yt)]=Ie.length}var Zt=z.parse(dt,qe,le);if(!Zt)return null;le=le||Zt.type,Ie.push(Zt)}var cn=z.parse(S[1],1,Gt);if(!cn)return null;var Tn=z.parse(S[S.length-1],S.length-1,le);return Tn?cn.type.kind!=="value"&&z.concat(1).checkSubtype(Z,cn.type)?null:new ao(Z,le,cn,ke,Ie,Tn):null},ao.prototype.evaluate=function(S){var z=this.input.evaluate(S);return(tr(z)===this.inputType&&this.outputs[this.cases[z]]||this.otherwise).evaluate(S)},ao.prototype.eachChild=function(S){S(this.input),this.outputs.forEach(S),S(this.otherwise)},ao.prototype.outputDefined=function(){return this.outputs.every(function(S){return S.outputDefined()})&&this.otherwise.outputDefined()},ao.prototype.serialize=function(){for(var S=this,z=["match",this.input.serialize()],Z=[],le={},ke=0,Ie=Object.keys(this.cases).sort();ke=5)return z.error("Expected 3 or 4 arguments, but found "+(S.length-1)+" instead.");var Z=z.parse(S[1],1,Gt),le=z.parse(S[2],2,Ot);if(!Z||!le)return null;if(!wn(Z.type,[yn(Gt),_t,Gt]))return z.error("Expected first argument to be of type array or string, but found "+ln(Z.type)+" instead");if(S.length===4){var ke=z.parse(S[3],3,Ot);return ke?new Ro(Z.type,Z,le,ke):null}return new Ro(Z.type,Z,le)},Ro.prototype.evaluate=function(S){var z=this.input.evaluate(S),Z=this.beginIndex.evaluate(S);if(!on(z,["string","array"]))throw new ir("Expected first argument to be of type array or string, but found "+ln(tr(z))+" instead.");if(this.endIndex){var le=this.endIndex.evaluate(S);return z.slice(Z,le)}return z.slice(Z)},Ro.prototype.eachChild=function(S){S(this.input),S(this.beginIndex),this.endIndex&&S(this.endIndex)},Ro.prototype.outputDefined=function(){return!1},Ro.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var S=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),S]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var Hu=Xo("==",function(S,z,Z){return z===Z},Vu),qu=Xo("!=",function(S,z,Z){return z!==Z},function(S,z,Z,le){return!Vu(0,z,Z,le)}),Ec=Xo("<",function(S,z,Z){return z",function(S,z,Z){return z>Z},function(S,z,Z,le){return le.compare(z,Z)>0}),Gu=Xo("<=",function(S,z,Z){return z<=Z},function(S,z,Z,le){return le.compare(z,Z)<=0}),vu=Xo(">=",function(S,z,Z){return z>=Z},function(S,z,Z,le){return le.compare(z,Z)>=0}),$o=function(S,z,Z,le,ke){this.type=_t,this.number=S,this.locale=z,this.currency=Z,this.minFractionDigits=le,this.maxFractionDigits=ke};$o.parse=function(S,z){if(S.length!==3)return z.error("Expected two arguments.");var Z=z.parse(S[1],1,Ot);if(!Z)return null;var le=S[2];if(typeof le!="object"||Array.isArray(le))return z.error("NumberFormat options argument must be an object.");var ke=null;if(le.locale&&!(ke=z.parse(le.locale,1,_t)))return null;var Ie=null;if(le.currency&&!(Ie=z.parse(le.currency,1,_t)))return null;var qe=null;if(le["min-fraction-digits"]&&!(qe=z.parse(le["min-fraction-digits"],1,Ot)))return null;var it=null;return le["max-fraction-digits"]&&!(it=z.parse(le["max-fraction-digits"],1,Ot))?null:new $o(Z,ke,Ie,qe,it)},$o.prototype.evaluate=function(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))},$o.prototype.eachChild=function(S){S(this.number),this.locale&&S(this.locale),this.currency&&S(this.currency),this.minFractionDigits&&S(this.minFractionDigits),this.maxFractionDigits&&S(this.maxFractionDigits)},$o.prototype.outputDefined=function(){return!1},$o.prototype.serialize=function(){var S={};return this.locale&&(S.locale=this.locale.serialize()),this.currency&&(S.currency=this.currency.serialize()),this.minFractionDigits&&(S["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(S["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),S]};var Jo=function(S){this.type=Ot,this.input=S};Jo.parse=function(S,z){if(S.length!==2)return z.error("Expected 1 argument, but found "+(S.length-1)+" instead.");var Z=z.parse(S[1],1);return Z?Z.type.kind!=="array"&&Z.type.kind!=="string"&&Z.type.kind!=="value"?z.error("Expected argument of type string or array, but found "+ln(Z.type)+" instead."):new Jo(Z):null},Jo.prototype.evaluate=function(S){var z=this.input.evaluate(S);if(typeof z=="string"||Array.isArray(z))return z.length;throw new ir("Expected value to be of type string or array, but found "+ln(tr(z))+" instead.")},Jo.prototype.eachChild=function(S){S(this.input)},Jo.prototype.outputDefined=function(){return!1},Jo.prototype.serialize=function(){var S=["length"];return this.eachChild(function(z){S.push(z.serialize())}),S};var Js={"==":Hu,"!=":qu,">":gu,"<":Ec,">=":vu,"<=":Gu,array:yr,at:fs,boolean:yr,case:bo,coalesce:qa,collator:Qn,format:$t,image:mn,in:fi,"index-of":hs,interpolate:Qi,"interpolate-hcl":Qi,"interpolate-lab":Qi,length:Jo,let:eo,literal:gr,match:ao,number:yr,"number-format":$o,object:yr,slice:Ro,step:Mr,string:yr,"to-boolean":En,"to-color":En,"to-number":En,"to-string":En,var:fr,within:er};function Ko(S,z){var Z=z[0],le=z[1],ke=z[2],Ie=z[3];Z=Z.evaluate(S),le=le.evaluate(S),ke=ke.evaluate(S);var qe=Ie?Ie.evaluate(S):1,it=qn(Z,le,ke,qe);if(it)throw new ir(it);return new hn(Z/255*qe,le/255*qe,ke/255*qe,qe)}function mu(S,z){return S in z}function yu(S,z){var Z=z[S];return Z===void 0?null:Z}function Ls(S){return{type:S}}function Vl(S){return{result:"success",value:S}}function ps(S){return{result:"error",value:S}}function Ks(S){return S["property-type"]==="data-driven"||S["property-type"]==="cross-faded-data-driven"}function Ps(S){return!!S.expression&&S.expression.parameters.indexOf("zoom")>-1}function Qo(S){return!!S.expression&&S.expression.interpolated}function hi(S){return S instanceof Number?"number":S instanceof String?"string":S instanceof Boolean?"boolean":Array.isArray(S)?"array":S===null?"null":typeof S}function ds(S){return typeof S=="object"&&S!==null&&!Array.isArray(S)}function Cc(S){return S}function Hl(S,z){var Z,le,ke,Ie=z.type==="color",qe=S.stops&&typeof S.stops[0][0]=="object",it=qe||S.property!==void 0,dt=qe||!it,St=S.type||(Qo(z)?"exponential":"interval");if(Ie&&((S=ut({},S)).stops&&(S.stops=S.stops.map(function(_r){return[_r[0],hn.parse(_r[1])]})),S.default?S.default=hn.parse(S.default):S.default=hn.parse(z.default)),S.colorSpace&&S.colorSpace!=="rgb"&&!du[S.colorSpace])throw new Error("Unknown color space: "+S.colorSpace);if(St==="exponential")Z=oo;else if(St==="interval")Z=Qs;else if(St==="categorical"){Z=Os,le=Object.create(null);for(var Rt=0,Ht=S.stops;Rt=S.stops[le-1][0])return S.stops[le-1][1];var ke=Sr(S.stops.map(function(Ie){return Ie[0]}),Z);return S.stops[ke][1]}function oo(S,z,Z){var le=S.base!==void 0?S.base:1;if(hi(Z)!=="number")return bl(S.default,z.default);var ke=S.stops.length;if(ke===1||Z<=S.stops[0][0])return S.stops[0][1];if(Z>=S.stops[ke-1][0])return S.stops[ke-1][1];var Ie=Sr(S.stops.map(function(Ht){return Ht[0]}),Z),qe=function(Ht,Yt,Zt,cn){var Tn=cn-Zt,Fn=Ht-Zt;return Tn===0?0:Yt===1?Fn/Tn:(Math.pow(Yt,Fn)-1)/(Math.pow(Yt,Tn)-1)}(Z,le,S.stops[Ie][0],S.stops[Ie+1][0]),it=S.stops[Ie][1],dt=S.stops[Ie+1][1],St=pr[z.type]||Cc;if(S.colorSpace&&S.colorSpace!=="rgb"){var Rt=du[S.colorSpace];St=function(Ht,Yt){return Rt.reverse(Rt.interpolate(Rt.forward(Ht),Rt.forward(Yt),qe))}}return typeof it.evaluate=="function"?{evaluate:function(){for(var Ht=[],Yt=arguments.length;Yt--;)Ht[Yt]=arguments[Yt];var Zt=it.evaluate.apply(void 0,Ht),cn=dt.evaluate.apply(void 0,Ht);if(Zt!==void 0&&cn!==void 0)return St(Zt,cn,qe)}}:St(it,dt,qe)}function xu(S,z,Z){return z.type==="color"?Z=hn.parse(Z):z.type==="formatted"?Z=Nn.fromString(Z.toString()):z.type==="resolvedImage"?Z=Hn.fromString(Z.toString()):hi(Z)===z.type||z.type==="enum"&&z.values[Z]||(Z=void 0),bl(Z,S.default,z.default)}Zn.register(Js,{error:[{kind:"error"},[_t],function(S,z){var Z=z[0];throw new ir(Z.evaluate(S))}],typeof:[_t,[Gt],function(S,z){return ln(tr(z[0].evaluate(S)))}],"to-rgba":[yn(Ot,4),[Bt],function(S,z){return z[0].evaluate(S).toArray()}],rgb:[Bt,[Ot,Ot,Ot],Ko],rgba:[Bt,[Ot,Ot,Ot,Ot],Ko],has:{type:Pt,overloads:[[[_t],function(S,z){return mu(z[0].evaluate(S),S.properties())}],[[_t,Wt],function(S,z){var Z=z[0],le=z[1];return mu(Z.evaluate(S),le.evaluate(S))}]]},get:{type:Gt,overloads:[[[_t],function(S,z){return yu(z[0].evaluate(S),S.properties())}],[[_t,Wt],function(S,z){var Z=z[0],le=z[1];return yu(Z.evaluate(S),le.evaluate(S))}]]},"feature-state":[Gt,[_t],function(S,z){return yu(z[0].evaluate(S),S.featureState||{})}],properties:[Wt,[],function(S){return S.properties()}],"geometry-type":[_t,[],function(S){return S.geometryType()}],id:[Gt,[],function(S){return S.id()}],zoom:[Ot,[],function(S){return S.globals.zoom}],"heatmap-density":[Ot,[],function(S){return S.globals.heatmapDensity||0}],"line-progress":[Ot,[],function(S){return S.globals.lineProgress||0}],accumulated:[Gt,[],function(S){return S.globals.accumulated===void 0?null:S.globals.accumulated}],"+":[Ot,Ls(Ot),function(S,z){for(var Z=0,le=0,ke=z;le":[Pt,[_t,Gt],function(S,z){var Z=z[0],le=z[1],ke=S.properties()[Z.value],Ie=le.value;return typeof ke==typeof Ie&&ke>Ie}],"filter-id->":[Pt,[Gt],function(S,z){var Z=z[0],le=S.id(),ke=Z.value;return typeof le==typeof ke&&le>ke}],"filter-<=":[Pt,[_t,Gt],function(S,z){var Z=z[0],le=z[1],ke=S.properties()[Z.value],Ie=le.value;return typeof ke==typeof Ie&&ke<=Ie}],"filter-id-<=":[Pt,[Gt],function(S,z){var Z=z[0],le=S.id(),ke=Z.value;return typeof le==typeof ke&&le<=ke}],"filter->=":[Pt,[_t,Gt],function(S,z){var Z=z[0],le=z[1],ke=S.properties()[Z.value],Ie=le.value;return typeof ke==typeof Ie&&ke>=Ie}],"filter-id->=":[Pt,[Gt],function(S,z){var Z=z[0],le=S.id(),ke=Z.value;return typeof le==typeof ke&&le>=ke}],"filter-has":[Pt,[Gt],function(S,z){return z[0].value in S.properties()}],"filter-has-id":[Pt,[],function(S){return S.id()!==null&&S.id()!==void 0}],"filter-type-in":[Pt,[yn(_t)],function(S,z){return z[0].value.indexOf(S.geometryType())>=0}],"filter-id-in":[Pt,[yn(Gt)],function(S,z){return z[0].value.indexOf(S.id())>=0}],"filter-in-small":[Pt,[_t,yn(Gt)],function(S,z){var Z=z[0];return z[1].value.indexOf(S.properties()[Z.value])>=0}],"filter-in-large":[Pt,[_t,yn(Gt)],function(S,z){var Z=z[0],le=z[1];return function(ke,Ie,qe,it){for(;qe<=it;){var dt=qe+it>>1;if(Ie[dt]===ke)return!0;Ie[dt]>ke?it=dt-1:qe=dt+1}return!1}(S.properties()[Z.value],le.value,0,le.value.length-1)}],all:{type:Pt,overloads:[[[Pt,Pt],function(S,z){var Z=z[0],le=z[1];return Z.evaluate(S)&&le.evaluate(S)}],[Ls(Pt),function(S,z){for(var Z=0,le=z;Z0&&typeof S[0]=="string"&&S[0]in Js}function wl(S,z){var Z=new cr(Js,[],z?function(ke){var Ie={color:Bt,string:_t,number:Ot,enum:_t,boolean:Pt,formatted:Kt,resolvedImage:nn};return ke.type==="array"?yn(Ie[ke.value]||Gt,ke.length):Ie[ke.type]}(z):void 0),le=Z.parse(S,void 0,void 0,void 0,z&&z.type==="string"?{typeAnnotation:"coerce"}:void 0);return le?Vl(new _l(le,z)):ps(Z.errors)}_l.prototype.evaluateWithoutErrorHandling=function(S,z,Z,le,ke,Ie){return this._evaluator.globals=S,this._evaluator.feature=z,this._evaluator.featureState=Z,this._evaluator.canonical=le,this._evaluator.availableImages=ke||null,this._evaluator.formattedSection=Ie,this.expression.evaluate(this._evaluator)},_l.prototype.evaluate=function(S,z,Z,le,ke,Ie){this._evaluator.globals=S,this._evaluator.feature=z||null,this._evaluator.featureState=Z||null,this._evaluator.canonical=le,this._evaluator.availableImages=ke||null,this._evaluator.formattedSection=Ie||null;try{var qe=this.expression.evaluate(this._evaluator);if(qe==null||typeof qe=="number"&&qe!=qe)return this._defaultValue;if(this._enumValues&&!(qe in this._enumValues))throw new ir("Expected value to be one of "+Object.keys(this._enumValues).map(function(it){return JSON.stringify(it)}).join(", ")+", but found "+JSON.stringify(qe)+" instead.");return qe}catch(it){return this._warningHistory[it.message]||(this._warningHistory[it.message]=!0,typeof console<"u"&&console.warn(it.message)),this._defaultValue}};var Is=function(S,z){this.kind=S,this._styleExpression=z,this.isStateDependent=S!=="constant"&&!lr(z.expression)};Is.prototype.evaluateWithoutErrorHandling=function(S,z,Z,le,ke,Ie){return this._styleExpression.evaluateWithoutErrorHandling(S,z,Z,le,ke,Ie)},Is.prototype.evaluate=function(S,z,Z,le,ke,Ie){return this._styleExpression.evaluate(S,z,Z,le,ke,Ie)};var Rs=function(S,z,Z,le){this.kind=S,this.zoomStops=Z,this._styleExpression=z,this.isStateDependent=S!=="camera"&&!lr(z.expression),this.interpolationType=le};function tl(S,z){if((S=wl(S,z)).result==="error")return S;var Z=S.value.expression,le=Jn(Z);if(!le&&!Ks(z))return ps([new Lt("","data expressions not supported")]);var ke=sr(Z,["zoom"]);if(!ke&&!Ps(z))return ps([new Lt("","zoom expressions not supported")]);var Ie=kl(Z);if(!Ie&&!ke)return ps([new Lt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(Ie instanceof Lt)return ps([Ie]);if(Ie instanceof Qi&&!Qo(z))return ps([new Lt("",'"interpolate" expressions cannot be used with this property')]);if(!Ie)return Vl(new Is(le?"constant":"source",S.value));var qe=Ie instanceof Qi?Ie.interpolation:void 0;return Vl(new Rs(le?"camera":"composite",S.value,Ie.labels,qe))}Rs.prototype.evaluateWithoutErrorHandling=function(S,z,Z,le,ke,Ie){return this._styleExpression.evaluateWithoutErrorHandling(S,z,Z,le,ke,Ie)},Rs.prototype.evaluate=function(S,z,Z,le,ke,Ie){return this._styleExpression.evaluate(S,z,Z,le,ke,Ie)},Rs.prototype.interpolationFactor=function(S,z,Z){return this.interpolationType?Qi.interpolationFactor(this.interpolationType,S,z,Z):0};var Tl=function(S,z){this._parameters=S,this._specification=z,ut(this,Hl(this._parameters,this._specification))};function kl(S){var z=null;if(S instanceof eo)z=kl(S.result);else if(S instanceof qa)for(var Z=0,le=S.args;Zle.maximum?[new Be(z,Z,Z+" is greater than the maximum value "+le.maximum)]:[]}function bu(S){var z,Z,le,ke=S.valueSpec,Ie=pt(S.value.type),qe={},it=Ie!=="categorical"&&S.value.property===void 0,dt=!it,St=hi(S.value.stops)==="array"&&hi(S.value.stops[0])==="array"&&hi(S.value.stops[0][0])==="object",Rt=so({key:S.key,value:S.value,valueSpec:S.styleSpec.function,style:S.style,styleSpec:S.styleSpec,objectElementValidators:{stops:function(Zt){if(Ie==="identity")return[new Be(Zt.key,Zt.value,'identity function may not have a "stops" property')];var cn=[],Tn=Zt.value;return cn=cn.concat(Al({key:Zt.key,value:Tn,valueSpec:Zt.valueSpec,style:Zt.style,styleSpec:Zt.styleSpec,arrayElementValidator:Ht})),hi(Tn)==="array"&&Tn.length===0&&cn.push(new Be(Zt.key,Tn,"array must have at least one stop")),cn},default:function(Zt){return Oi({key:Zt.key,value:Zt.value,valueSpec:ke,style:Zt.style,styleSpec:Zt.styleSpec})}}});return Ie==="identity"&&it&&Rt.push(new Be(S.key,S.value,'missing required property "property"')),Ie==="identity"||S.value.stops||Rt.push(new Be(S.key,S.value,'missing required property "stops"')),Ie==="exponential"&&S.valueSpec.expression&&!Qo(S.valueSpec)&&Rt.push(new Be(S.key,S.value,"exponential functions not supported")),S.styleSpec.$version>=8&&(dt&&!Ks(S.valueSpec)?Rt.push(new Be(S.key,S.value,"property functions not supported")):it&&!Ps(S.valueSpec)&&Rt.push(new Be(S.key,S.value,"zoom functions not supported"))),Ie!=="categorical"&&!St||S.value.property!==void 0||Rt.push(new Be(S.key,S.value,'"property" property is required')),Rt;function Ht(Zt){var cn=[],Tn=Zt.value,Fn=Zt.key;if(hi(Tn)!=="array")return[new Be(Fn,Tn,"array expected, "+hi(Tn)+" found")];if(Tn.length!==2)return[new Be(Fn,Tn,"array length 2 expected, length "+Tn.length+" found")];if(St){if(hi(Tn[0])!=="object")return[new Be(Fn,Tn,"object expected, "+hi(Tn[0])+" found")];if(Tn[0].zoom===void 0)return[new Be(Fn,Tn,"object stop key must have zoom")];if(Tn[0].value===void 0)return[new Be(Fn,Tn,"object stop key must have value")];if(le&&le>pt(Tn[0].zoom))return[new Be(Fn,Tn[0].zoom,"stop zoom values must appear in ascending order")];pt(Tn[0].zoom)!==le&&(le=pt(Tn[0].zoom),Z=void 0,qe={}),cn=cn.concat(so({key:Fn+"[0]",value:Tn[0],valueSpec:{zoom:{}},style:Zt.style,styleSpec:Zt.styleSpec,objectElementValidators:{zoom:Ml,value:Yt}}))}else cn=cn.concat(Yt({key:Fn+"[0]",value:Tn[0],valueSpec:{},style:Zt.style,styleSpec:Zt.styleSpec},Tn));return el(bt(Tn[1]))?cn.concat([new Be(Fn+"[1]",Tn[1],"expressions are not allowed in function stops.")]):cn.concat(Oi({key:Fn+"[1]",value:Tn[1],valueSpec:ke,style:Zt.style,styleSpec:Zt.styleSpec}))}function Yt(Zt,cn){var Tn=hi(Zt.value),Fn=pt(Zt.value),Dn=Zt.value!==null?Zt.value:cn;if(z){if(Tn!==z)return[new Be(Zt.key,Dn,Tn+" stop domain type must match previous stop domain type "+z)]}else z=Tn;if(Tn!=="number"&&Tn!=="string"&&Tn!=="boolean")return[new Be(Zt.key,Dn,"stop domain value must be a number, string, or boolean")];if(Tn!=="number"&&Ie!=="categorical"){var Gn="number expected, "+Tn+" found";return Ks(ke)&&Ie===void 0&&(Gn+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Be(Zt.key,Dn,Gn)]}return Ie!=="categorical"||Tn!=="number"||isFinite(Fn)&&Math.floor(Fn)===Fn?Ie!=="categorical"&&Tn==="number"&&Z!==void 0&&Fn=2&&S[1]!=="$id"&&S[1]!=="$type";case"in":return S.length>=3&&(typeof S[1]!="string"||Array.isArray(S[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return S.length!==3||Array.isArray(S[1])||Array.isArray(S[2]);case"any":case"all":for(var z=0,Z=S.slice(1);zz?1:0}function zs(S){if(!Array.isArray(S))return!1;if(S[0]==="within")return!0;for(var z=1;z"||Z==="<="||Z===">="?bi(S[1],S[2],Z):Z==="any"?(z=S.slice(1),["any"].concat(z.map(Ds))):Z==="all"?["all"].concat(S.slice(1).map(Ds)):Z==="none"?["all"].concat(S.slice(1).map(Ds).map(ga)):Z==="in"?vs(S[1],S.slice(2)):Z==="!in"?ga(vs(S[1],S.slice(2))):Z==="has"?ms(S[1]):Z==="!has"?ga(ms(S[1])):Z!=="within"||S}function bi(S,z,Z){switch(S){case"$type":return["filter-type-"+Z,z];case"$id":return["filter-id-"+Z,z];default:return["filter-"+Z,S,z]}}function vs(S,z){if(z.length===0)return!1;switch(S){case"$type":return["filter-type-in",["literal",z]];case"$id":return["filter-id-in",["literal",z]];default:return z.length>200&&!z.some(function(Z){return typeof Z!=typeof z[0]})?["filter-in-large",S,["literal",z.sort(nl)]]:["filter-in-small",S,["literal",z]]}}function ms(S){switch(S){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",S]}}function ga(S){return["!",S]}function oi(S){return Sl(bt(S.value))?gs(ut({},S,{expressionContext:"filter",valueSpec:{value:"boolean"}})):li(S)}function li(S){var z=S.value,Z=S.key;if(hi(z)!=="array")return[new Be(Z,z,"array expected, "+hi(z)+" found")];var le,ke=S.styleSpec,Ie=[];if(z.length<1)return[new Be(Z,z,"filter array must have at least 1 element")];switch(Ie=Ie.concat(ql({key:Z+"[0]",value:z[0],valueSpec:ke.filter_operator,style:S.style,styleSpec:S.styleSpec})),pt(z[0])){case"<":case"<=":case">":case">=":z.length>=2&&pt(z[1])==="$type"&&Ie.push(new Be(Z,z,'"$type" cannot be use with operator "'+z[0]+'"'));case"==":case"!=":z.length!==3&&Ie.push(new Be(Z,z,'filter array for operator "'+z[0]+'" must have 3 elements'));case"in":case"!in":z.length>=2&&(le=hi(z[1]))!=="string"&&Ie.push(new Be(Z+"[1]",z[1],"string expected, "+le+" found"));for(var qe=2;qe=Rt[Zt+0]&&le>=Rt[Zt+1])?(qe[Yt]=!0,Ie.push(St[Yt])):qe[Yt]=!1}}},Ga.prototype._forEachCell=function(S,z,Z,le,ke,Ie,qe,it){for(var dt=this._convertToCellCoord(S),St=this._convertToCellCoord(z),Rt=this._convertToCellCoord(Z),Ht=this._convertToCellCoord(le),Yt=dt;Yt<=Rt;Yt++)for(var Zt=St;Zt<=Ht;Zt++){var cn=this.d*Zt+Yt;if((!it||it(this._convertFromCellCoord(Yt),this._convertFromCellCoord(Zt),this._convertFromCellCoord(Yt+1),this._convertFromCellCoord(Zt+1)))&&ke.call(this,S,z,Z,le,cn,Ie,qe,it))return}},Ga.prototype._convertFromCellCoord=function(S){return(S-this.padding)/this.scale},Ga.prototype._convertToCellCoord=function(S){return Math.max(0,Math.min(this.d-1,Math.floor(S*this.scale)+this.padding))},Ga.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var S=this.cells,z=3+this.cells.length+1+1,Z=0,le=0;le=0)){var Ht=S[Rt];St[Rt]=Sa[dt].shallow.indexOf(Rt)>=0?Ht:rl(Ht,z)}S instanceof Error&&(St.message=S.message)}if(St.$name)throw new Error("$name property is reserved for worker serialization logic.");return dt!=="Object"&&(St.$name=dt),St}throw new Error("can't serialize object of type "+typeof S)}function il(S){if(S==null||typeof S=="boolean"||typeof S=="number"||typeof S=="string"||S instanceof Boolean||S instanceof Number||S instanceof String||S instanceof Date||S instanceof RegExp||Ra(S)||Yl(S)||ArrayBuffer.isView(S)||S instanceof Wl)return S;if(Array.isArray(S))return S.map(il);if(typeof S=="object"){var z=S.$name||"Object",Z=Sa[z].klass;if(!Z)throw new Error("can't deserialize unregistered class "+z);if(Z.deserialize)return Z.deserialize(S);for(var le=Object.create(Z.prototype),ke=0,Ie=Object.keys(S);ke=0?it:il(it)}}return le}throw new Error("can't deserialize object of type "+typeof S)}var al=function(){this.first=!0};al.prototype.update=function(S,z){var 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=z):this.lastFloorZoom=128&&S<=255},Arabic:function(S){return S>=1536&&S<=1791},"Arabic Supplement":function(S){return S>=1872&&S<=1919},"Arabic Extended-A":function(S){return S>=2208&&S<=2303},"Hangul Jamo":function(S){return S>=4352&&S<=4607},"Unified Canadian Aboriginal Syllabics":function(S){return S>=5120&&S<=5759},Khmer:function(S){return S>=6016&&S<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(S){return S>=6320&&S<=6399},"General Punctuation":function(S){return S>=8192&&S<=8303},"Letterlike Symbols":function(S){return S>=8448&&S<=8527},"Number Forms":function(S){return S>=8528&&S<=8591},"Miscellaneous Technical":function(S){return S>=8960&&S<=9215},"Control Pictures":function(S){return S>=9216&&S<=9279},"Optical Character Recognition":function(S){return S>=9280&&S<=9311},"Enclosed Alphanumerics":function(S){return S>=9312&&S<=9471},"Geometric Shapes":function(S){return S>=9632&&S<=9727},"Miscellaneous Symbols":function(S){return S>=9728&&S<=9983},"Miscellaneous Symbols and Arrows":function(S){return S>=11008&&S<=11263},"CJK Radicals Supplement":function(S){return S>=11904&&S<=12031},"Kangxi Radicals":function(S){return S>=12032&&S<=12255},"Ideographic Description Characters":function(S){return S>=12272&&S<=12287},"CJK Symbols and Punctuation":function(S){return S>=12288&&S<=12351},Hiragana:function(S){return S>=12352&&S<=12447},Katakana:function(S){return S>=12448&&S<=12543},Bopomofo:function(S){return S>=12544&&S<=12591},"Hangul Compatibility Jamo":function(S){return S>=12592&&S<=12687},Kanbun:function(S){return S>=12688&&S<=12703},"Bopomofo Extended":function(S){return S>=12704&&S<=12735},"CJK Strokes":function(S){return S>=12736&&S<=12783},"Katakana Phonetic Extensions":function(S){return S>=12784&&S<=12799},"Enclosed CJK Letters and Months":function(S){return S>=12800&&S<=13055},"CJK Compatibility":function(S){return S>=13056&&S<=13311},"CJK Unified Ideographs Extension A":function(S){return S>=13312&&S<=19903},"Yijing Hexagram Symbols":function(S){return S>=19904&&S<=19967},"CJK Unified Ideographs":function(S){return S>=19968&&S<=40959},"Yi Syllables":function(S){return S>=40960&&S<=42127},"Yi Radicals":function(S){return S>=42128&&S<=42191},"Hangul Jamo Extended-A":function(S){return S>=43360&&S<=43391},"Hangul Syllables":function(S){return S>=44032&&S<=55215},"Hangul Jamo Extended-B":function(S){return S>=55216&&S<=55295},"Private Use Area":function(S){return S>=57344&&S<=63743},"CJK Compatibility Ideographs":function(S){return S>=63744&&S<=64255},"Arabic Presentation Forms-A":function(S){return S>=64336&&S<=65023},"Vertical Forms":function(S){return S>=65040&&S<=65055},"CJK Compatibility Forms":function(S){return S>=65072&&S<=65103},"Small Form Variants":function(S){return S>=65104&&S<=65135},"Arabic Presentation Forms-B":function(S){return S>=65136&&S<=65279},"Halfwidth and Fullwidth Forms":function(S){return S>=65280&&S<=65519}};function ol(S){for(var z=0,Z=S;z=65097&&S<=65103)||Or["CJK Compatibility Ideographs"](S)||Or["CJK Compatibility"](S)||Or["CJK Radicals Supplement"](S)||Or["CJK Strokes"](S)||!(!Or["CJK Symbols and Punctuation"](S)||S>=12296&&S<=12305||S>=12308&&S<=12319||S===12336)||Or["CJK Unified Ideographs Extension A"](S)||Or["CJK Unified Ideographs"](S)||Or["Enclosed CJK Letters and Months"](S)||Or["Hangul Compatibility Jamo"](S)||Or["Hangul Jamo Extended-A"](S)||Or["Hangul Jamo Extended-B"](S)||Or["Hangul Jamo"](S)||Or["Hangul Syllables"](S)||Or.Hiragana(S)||Or["Ideographic Description Characters"](S)||Or.Kanbun(S)||Or["Kangxi Radicals"](S)||Or["Katakana Phonetic Extensions"](S)||Or.Katakana(S)&&S!==12540||!(!Or["Halfwidth and Fullwidth Forms"](S)||S===65288||S===65289||S===65293||S>=65306&&S<=65310||S===65339||S===65341||S===65343||S>=65371&&S<=65503||S===65507||S>=65512&&S<=65519)||!(!Or["Small Form Variants"](S)||S>=65112&&S<=65118||S>=65123&&S<=65126)||Or["Unified Canadian Aboriginal Syllabics"](S)||Or["Unified Canadian Aboriginal Syllabics Extended"](S)||Or["Vertical Forms"](S)||Or["Yijing Hexagram Symbols"](S)||Or["Yi Syllables"](S)||Or["Yi Radicals"](S))))}function Xl(S){return!(uo(S)||function(z){return!!(Or["Latin-1 Supplement"](z)&&(z===167||z===169||z===174||z===177||z===188||z===189||z===190||z===215||z===247)||Or["General Punctuation"](z)&&(z===8214||z===8224||z===8225||z===8240||z===8241||z===8251||z===8252||z===8258||z===8263||z===8264||z===8265||z===8273)||Or["Letterlike Symbols"](z)||Or["Number Forms"](z)||Or["Miscellaneous Technical"](z)&&(z>=8960&&z<=8967||z>=8972&&z<=8991||z>=8996&&z<=9e3||z===9003||z>=9085&&z<=9114||z>=9150&&z<=9165||z===9167||z>=9169&&z<=9179||z>=9186&&z<=9215)||Or["Control Pictures"](z)&&z!==9251||Or["Optical Character Recognition"](z)||Or["Enclosed Alphanumerics"](z)||Or["Geometric Shapes"](z)||Or["Miscellaneous Symbols"](z)&&!(z>=9754&&z<=9759)||Or["Miscellaneous Symbols and Arrows"](z)&&(z>=11026&&z<=11055||z>=11088&&z<=11097||z>=11192&&z<=11243)||Or["CJK Symbols and Punctuation"](z)||Or.Katakana(z)||Or["Private Use Area"](z)||Or["CJK Compatibility Forms"](z)||Or["Small Form Variants"](z)||Or["Halfwidth and Fullwidth Forms"](z)||z===8734||z===8756||z===8757||z>=9984&&z<=10087||z>=10102&&z<=10131||z===65532||z===65533)}(S))}function Cl(S){return Or.Arabic(S)||Or["Arabic Supplement"](S)||Or["Arabic Extended-A"](S)||Or["Arabic Presentation Forms-A"](S)||Or["Arabic Presentation Forms-B"](S)}function ya(S){return S>=1424&&S<=2303||Or["Arabic Presentation Forms-A"](S)||Or["Arabic Presentation Forms-B"](S)}function Vs(S,z){return!(!z&&ya(S)||S>=2304&&S<=3583||S>=3840&&S<=4255||Or.Khmer(S))}function ns(S){for(var z=0,Z=S;z-1&&(xa=co),Hs&&Hs(S)};function Ll(){to.fire(new Ge("pluginStateChange",{pluginStatus:xa,pluginURL:fo}))}var to=new ht,ho=function(){return xa},Fo=function(){if(xa!==Wa||!fo)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");xa=xs,Ll(),fo&&Dt({url:fo},function(S){S?vi(S):(xa=_o,Ll())})},za={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return xa===_o||za.applyArabicShaping!=null},isLoading:function(){return xa===xs},setState:function(S){xa=S.pluginStatus,fo=S.pluginURL},isParsed:function(){return za.applyArabicShaping!=null&&za.processBidirectionalText!=null&&za.processStyledBidirectionalText!=null},getPluginURL:function(){return fo}},di=function(S,z){this.zoom=S,z?(this.now=z.now,this.fadeDuration=z.fadeDuration,this.zoomHistory=z.zoomHistory,this.transition=z.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new al,this.transition={})};di.prototype.isSupportedScript=function(S){return function(z,Z){for(var le=0,ke=z;lethis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:z+(1-z)*Z}:{fromScale:.5,toScale:1,t:1-(1-Z)*z}};var oa=function(S,z){this.property=S,this.value=z,this.expression=function(Z,le){if(ds(Z))return new Tl(Z,le);if(el(Z)){var ke=tl(Z,le);if(ke.result==="error")throw new Error(ke.value.map(function(qe){return qe.key+": "+qe.message}).join(", "));return ke.value}var Ie=Z;return typeof Z=="string"&&le.type==="color"&&(Ie=hn.parse(Z)),{kind:"constant",evaluate:function(){return Ie}}}(z===void 0?S.specification.default:z,S.specification)};oa.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},oa.prototype.possiblyEvaluate=function(S,z,Z){return this.property.possiblyEvaluate(this,S,z,Z)};var wo=function(S){this.property=S,this.value=new oa(S,void 0)};wo.prototype.transitioned=function(S,z){return new Bo(this.property,this.value,z,u({},S.transition,this.transition),S.now)},wo.prototype.untransitioned=function(){return new Bo(this.property,this.value,null,{},0)};var Da=function(S){this._properties=S,this._values=Object.create(S.defaultTransitionablePropertyValues)};Da.prototype.getValue=function(S){return k(this._values[S].value.value)},Da.prototype.setValue=function(S,z){this._values.hasOwnProperty(S)||(this._values[S]=new wo(this._values[S].property)),this._values[S].value=new oa(this._values[S].property,z===null?void 0:k(z))},Da.prototype.getTransition=function(S){return k(this._values[S].transition)},Da.prototype.setTransition=function(S,z){this._values.hasOwnProperty(S)||(this._values[S]=new wo(this._values[S].property)),this._values[S].transition=k(z)||void 0},Da.prototype.serialize=function(){for(var S={},z=0,Z=Object.keys(this._values);zthis.end)return this.prior=null,ke;if(this.value.isDataDriven())return this.prior=null,ke;if(le=1)return 1;var dt=it*it,St=dt*it;return 4*(it<.5?St:3*(it-dt)+St-.75)}(qe))}return ke};var bs=function(S){this._properties=S,this._values=Object.create(S.defaultTransitioningPropertyValues)};bs.prototype.possiblyEvaluate=function(S,z,Z){for(var le=new po(this._properties),ke=0,Ie=Object.keys(this._values);keIe.zoomHistory.lastIntegerZoom?{from:Z,to:le}:{from:ke,to:le}},z.prototype.interpolate=function(Z){return Z},z}(Ur),is=function(S){this.specification=S};is.prototype.possiblyEvaluate=function(S,z,Z,le){if(S.value!==void 0){if(S.expression.kind==="constant"){var ke=S.expression.evaluate(z,null,{},Z,le);return this._calculate(ke,ke,ke,z)}return this._calculate(S.expression.evaluate(new di(Math.floor(z.zoom-1),z)),S.expression.evaluate(new di(Math.floor(z.zoom),z)),S.expression.evaluate(new di(Math.floor(z.zoom+1),z)),z)}},is.prototype._calculate=function(S,z,Z,le){return le.zoom>le.zoomHistory.lastIntegerZoom?{from:S,to:z}:{from:Z,to:z}},is.prototype.interpolate=function(S){return S};var To=function(S){this.specification=S};To.prototype.possiblyEvaluate=function(S,z,Z,le){return!!S.expression.evaluate(z,null,{},Z,le)},To.prototype.interpolate=function(){return!1};var _a=function(S){for(var z in this.properties=S,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],S){var Z=S[z];Z.specification.overridable&&this.overridableProperties.push(z);var le=this.defaultPropertyValues[z]=new oa(Z,void 0),ke=this.defaultTransitionablePropertyValues[z]=new wo(Z);this.defaultTransitioningPropertyValues[z]=ke.untransitioned(),this.defaultPossiblyEvaluatedValues[z]=le.possiblyEvaluate({})}};Cr("DataDrivenProperty",Ur),Cr("DataConstantProperty",Fr),Cr("CrossFadedDataDrivenProperty",sl),Cr("CrossFadedProperty",is),Cr("ColorRampProperty",To);var $l="-transition",Fa=function(S){function z(Z,le){if(S.call(this),this.id=Z.id,this.type=Z.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},Z.type!=="custom"&&(this.metadata=Z.metadata,this.minzoom=Z.minzoom,this.maxzoom=Z.maxzoom,Z.type!=="background"&&(this.source=Z.source,this.sourceLayer=Z["source-layer"],this.filter=Z.filter),le.layout&&(this._unevaluatedLayout=new rs(le.layout)),le.paint)){for(var ke in this._transitionablePaint=new Da(le.paint),Z.paint)this.setPaintProperty(ke,Z.paint[ke],{validate:!1});for(var Ie in Z.layout)this.setLayoutProperty(Ie,Z.layout[Ie],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new po(le.paint)}}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},z.prototype.getLayoutProperty=function(Z){return Z==="visibility"?this.visibility:this._unevaluatedLayout.getValue(Z)},z.prototype.setLayoutProperty=function(Z,le,ke){if(ke===void 0&&(ke={}),le!=null){var Ie="layers."+this.id+".layout."+Z;if(this._validate(ys,Ie,Z,le,ke))return}Z!=="visibility"?this._unevaluatedLayout.setValue(Z,le):this.visibility=le},z.prototype.getPaintProperty=function(Z){return x(Z,$l)?this._transitionablePaint.getTransition(Z.slice(0,-$l.length)):this._transitionablePaint.getValue(Z)},z.prototype.setPaintProperty=function(Z,le,ke){if(ke===void 0&&(ke={}),le!=null){var Ie="layers."+this.id+".paint."+Z;if(this._validate(Ia,Ie,Z,le,ke))return!1}if(x(Z,$l))return this._transitionablePaint.setTransition(Z.slice(0,-$l.length),le||void 0),!1;var qe=this._transitionablePaint._values[Z],it=qe.property.specification["property-type"]==="cross-faded-data-driven",dt=qe.value.isDataDriven(),St=qe.value;this._transitionablePaint.setValue(Z,le),this._handleSpecialPaintPropertyUpdate(Z);var Rt=this._transitionablePaint._values[Z].value;return Rt.isDataDriven()||dt||it||this._handleOverridablePaintPropertyUpdate(Z,St,Rt)},z.prototype._handleSpecialPaintPropertyUpdate=function(Z){},z.prototype._handleOverridablePaintPropertyUpdate=function(Z,le,ke){return!1},z.prototype.isHidden=function(Z){return!!(this.minzoom&&Z=this.maxzoom)||this.visibility==="none"},z.prototype.updateTransitions=function(Z){this._transitioningPaint=this._transitionablePaint.transitioned(Z,this._transitioningPaint)},z.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},z.prototype.recalculate=function(Z,le){Z.getCrossfadeParameters&&(this._crossfadeParameters=Z.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(Z,void 0,le)),this.paint=this._transitioningPaint.possiblyEvaluate(Z,void 0,le)},z.prototype.serialize=function(){var Z={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&&(Z.layout=Z.layout||{},Z.layout.visibility=this.visibility),m(Z,function(le,ke){return!(le===void 0||ke==="layout"&&!Object.keys(le).length||ke==="paint"&&!Object.keys(le).length)})},z.prototype._validate=function(Z,le,ke,Ie,qe){return qe===void 0&&(qe={}),(!qe||qe.validate!==!1)&&lo(this,Z.call(ma,{key:le,layerType:this.type,objectKey:ke,value:Ie,styleSpec:Oe,style:{glyphs:!0,sprite:!0}}))},z.prototype.is3D=function(){return!1},z.prototype.isTileClipped=function(){return!1},z.prototype.hasOffscreenPass=function(){return!1},z.prototype.resize=function(){},z.prototype.isStateDependent=function(){for(var Z in this.paint._values){var le=this.paint.get(Z);if(le instanceof ba&&Ks(le.property.specification)&&(le.value.kind==="source"||le.value.kind==="composite")&&le.value.isStateDependent)return!0}return!1},z}(ht),ll={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},as=function(S,z){this._structArray=S,this._pos1=z*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},_i=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Si(S,z){z===void 0&&(z=1);var Z=0,le=0;return{members:S.map(function(ke){var Ie,qe=(Ie=ke.type,ll[Ie].BYTES_PER_ELEMENT),it=Z=Jl(Z,Math.max(z,qe)),dt=ke.components||1;return le=Math.max(le,qe),Z+=qe*dt,{name:ke.name,type:ke.type,components:dt,offset:it}}),size:Jl(Z,Math.max(le,z)),alignment:z}}function Jl(S,z){return Math.ceil(S/z)*z}_i.serialize=function(S,z){return S._trim(),z&&(S.isTransferred=!0,z.push(S.arrayBuffer)),{length:S.length,arrayBuffer:S.arrayBuffer}},_i.deserialize=function(S){var z=Object.create(this.prototype);return z.arrayBuffer=S.arrayBuffer,z.length=S.length,z.capacity=S.arrayBuffer.byteLength/z.bytesPerElement,z._refreshViews(),z},_i.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},_i.prototype.clear=function(){this.length=0},_i.prototype.resize=function(S){this.reserve(S),this.length=S},_i.prototype.reserve=function(S){if(S>this.capacity){this.capacity=Math.max(S,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var z=this.uint8;this._refreshViews(),z&&this.uint8.set(z)}},_i.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var et=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le){var ke=this.length;return this.resize(ke+1),this.emplace(ke,Z,le)},z.prototype.emplace=function(Z,le,ke){var Ie=2*Z;return this.int16[Ie+0]=le,this.int16[Ie+1]=ke,Z},z}(_i);et.prototype.bytesPerElement=4,Cr("StructArrayLayout2i4",et);var rt=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie){var qe=this.length;return this.resize(qe+1),this.emplace(qe,Z,le,ke,Ie)},z.prototype.emplace=function(Z,le,ke,Ie,qe){var it=4*Z;return this.int16[it+0]=le,this.int16[it+1]=ke,this.int16[it+2]=Ie,this.int16[it+3]=qe,Z},z}(_i);rt.prototype.bytesPerElement=8,Cr("StructArrayLayout4i8",rt);var ct=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe,it){var dt=this.length;return this.resize(dt+1),this.emplace(dt,Z,le,ke,Ie,qe,it)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it,dt){var St=6*Z;return this.int16[St+0]=le,this.int16[St+1]=ke,this.int16[St+2]=Ie,this.int16[St+3]=qe,this.int16[St+4]=it,this.int16[St+5]=dt,Z},z}(_i);ct.prototype.bytesPerElement=12,Cr("StructArrayLayout2i4i12",ct);var vt=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe,it){var dt=this.length;return this.resize(dt+1),this.emplace(dt,Z,le,ke,Ie,qe,it)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it,dt){var St=4*Z,Rt=8*Z;return this.int16[St+0]=le,this.int16[St+1]=ke,this.uint8[Rt+4]=Ie,this.uint8[Rt+5]=qe,this.uint8[Rt+6]=it,this.uint8[Rt+7]=dt,Z},z}(_i);vt.prototype.bytesPerElement=8,Cr("StructArrayLayout2i4ub8",vt);var Mt=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht){var Yt=this.length;return this.resize(Yt+1),this.emplace(Yt,Z,le,ke,Ie,qe,it,dt,St,Rt,Ht)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt){var Zt=9*Z,cn=18*Z;return this.uint16[Zt+0]=le,this.uint16[Zt+1]=ke,this.uint16[Zt+2]=Ie,this.uint16[Zt+3]=qe,this.uint16[Zt+4]=it,this.uint16[Zt+5]=dt,this.uint16[Zt+6]=St,this.uint16[Zt+7]=Rt,this.uint8[cn+16]=Ht,this.uint8[cn+17]=Yt,Z},z}(_i);Mt.prototype.bytesPerElement=18,Cr("StructArrayLayout8ui2ub18",Mt);var kt=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt){var cn=this.length;return this.resize(cn+1),this.emplace(cn,Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt,cn){var Tn=12*Z;return this.int16[Tn+0]=le,this.int16[Tn+1]=ke,this.int16[Tn+2]=Ie,this.int16[Tn+3]=qe,this.uint16[Tn+4]=it,this.uint16[Tn+5]=dt,this.uint16[Tn+6]=St,this.uint16[Tn+7]=Rt,this.int16[Tn+8]=Ht,this.int16[Tn+9]=Yt,this.int16[Tn+10]=Zt,this.int16[Tn+11]=cn,Z},z}(_i);kt.prototype.bytesPerElement=24,Cr("StructArrayLayout4i4ui4i24",kt);var q=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke){var Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,Z,le,ke)},z.prototype.emplace=function(Z,le,ke,Ie){var qe=3*Z;return this.float32[qe+0]=le,this.float32[qe+1]=ke,this.float32[qe+2]=Ie,Z},z}(_i);q.prototype.bytesPerElement=12,Cr("StructArrayLayout3f12",q);var $=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z){var le=this.length;return this.resize(le+1),this.emplace(le,Z)},z.prototype.emplace=function(Z,le){var ke=1*Z;return this.uint32[ke+0]=le,Z},z}(_i);$.prototype.bytesPerElement=4,Cr("StructArrayLayout1ul4",$);var W=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.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)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe,it,dt,St,Rt){var Ht=this.length;return this.resize(Ht+1),this.emplace(Ht,Z,le,ke,Ie,qe,it,dt,St,Rt)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht){var Yt=10*Z,Zt=5*Z;return this.int16[Yt+0]=le,this.int16[Yt+1]=ke,this.int16[Yt+2]=Ie,this.int16[Yt+3]=qe,this.int16[Yt+4]=it,this.int16[Yt+5]=dt,this.uint32[Zt+3]=St,this.uint16[Yt+8]=Rt,this.uint16[Yt+9]=Ht,Z},z}(_i);W.prototype.bytesPerElement=20,Cr("StructArrayLayout6i1ul2ui20",W);var ie=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe,it){var dt=this.length;return this.resize(dt+1),this.emplace(dt,Z,le,ke,Ie,qe,it)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it,dt){var St=6*Z;return this.int16[St+0]=le,this.int16[St+1]=ke,this.int16[St+2]=Ie,this.int16[St+3]=qe,this.int16[St+4]=it,this.int16[St+5]=dt,Z},z}(_i);ie.prototype.bytesPerElement=12,Cr("StructArrayLayout2i2i2i12",ie);var _e=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe){var it=this.length;return this.resize(it+1),this.emplace(it,Z,le,ke,Ie,qe)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it){var dt=4*Z,St=8*Z;return this.float32[dt+0]=le,this.float32[dt+1]=ke,this.float32[dt+2]=Ie,this.int16[St+6]=qe,this.int16[St+7]=it,Z},z}(_i);_e.prototype.bytesPerElement=16,Cr("StructArrayLayout2f1f2i16",_e);var ze=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie){var qe=this.length;return this.resize(qe+1),this.emplace(qe,Z,le,ke,Ie)},z.prototype.emplace=function(Z,le,ke,Ie,qe){var it=12*Z,dt=3*Z;return this.uint8[it+0]=le,this.uint8[it+1]=ke,this.float32[dt+1]=Ie,this.float32[dt+2]=qe,Z},z}(_i);ze.prototype.bytesPerElement=12,Cr("StructArrayLayout2ub2f12",ze);var He=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke){var Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,Z,le,ke)},z.prototype.emplace=function(Z,le,ke,Ie){var qe=3*Z;return this.uint16[qe+0]=le,this.uint16[qe+1]=ke,this.uint16[qe+2]=Ie,Z},z}(_i);He.prototype.bytesPerElement=6,Cr("StructArrayLayout3ui6",He);var Xe=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.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)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt,cn,Tn,Fn,Dn,Gn){var Yn=this.length;return this.resize(Yn+1),this.emplace(Yn,Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt,cn,Tn,Fn,Dn,Gn)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt,cn,Tn,Fn,Dn,Gn,Yn){var Kn=24*Z,ar=12*Z,ur=48*Z;return this.int16[Kn+0]=le,this.int16[Kn+1]=ke,this.uint16[Kn+2]=Ie,this.uint16[Kn+3]=qe,this.uint32[ar+2]=it,this.uint32[ar+3]=dt,this.uint32[ar+4]=St,this.uint16[Kn+10]=Rt,this.uint16[Kn+11]=Ht,this.uint16[Kn+12]=Yt,this.float32[ar+7]=Zt,this.float32[ar+8]=cn,this.uint8[ur+36]=Tn,this.uint8[ur+37]=Fn,this.uint8[ur+38]=Dn,this.uint32[ar+10]=Gn,this.int16[Kn+22]=Yn,Z},z}(_i);Xe.prototype.bytesPerElement=48,Cr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Xe);var at=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.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)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt,cn,Tn,Fn,Dn,Gn,Yn,Kn,ar,ur,Er,_r,Ir,Br,$r,jr,Xr){var Vr=this.length;return this.resize(Vr+1),this.emplace(Vr,Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt,cn,Tn,Fn,Dn,Gn,Yn,Kn,ar,ur,Er,_r,Ir,Br,$r,jr,Xr)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt,cn,Tn,Fn,Dn,Gn,Yn,Kn,ar,ur,Er,_r,Ir,Br,$r,jr,Xr,Vr){var Nr=34*Z,si=17*Z;return this.int16[Nr+0]=le,this.int16[Nr+1]=ke,this.int16[Nr+2]=Ie,this.int16[Nr+3]=qe,this.int16[Nr+4]=it,this.int16[Nr+5]=dt,this.int16[Nr+6]=St,this.int16[Nr+7]=Rt,this.uint16[Nr+8]=Ht,this.uint16[Nr+9]=Yt,this.uint16[Nr+10]=Zt,this.uint16[Nr+11]=cn,this.uint16[Nr+12]=Tn,this.uint16[Nr+13]=Fn,this.uint16[Nr+14]=Dn,this.uint16[Nr+15]=Gn,this.uint16[Nr+16]=Yn,this.uint16[Nr+17]=Kn,this.uint16[Nr+18]=ar,this.uint16[Nr+19]=ur,this.uint16[Nr+20]=Er,this.uint16[Nr+21]=_r,this.uint16[Nr+22]=Ir,this.uint32[si+12]=Br,this.float32[si+13]=$r,this.float32[si+14]=jr,this.float32[si+15]=Xr,this.float32[si+16]=Vr,Z},z}(_i);at.prototype.bytesPerElement=68,Cr("StructArrayLayout8i15ui1ul4f68",at);var wt=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z){var le=this.length;return this.resize(le+1),this.emplace(le,Z)},z.prototype.emplace=function(Z,le){var ke=1*Z;return this.float32[ke+0]=le,Z},z}(_i);wt.prototype.bytesPerElement=4,Cr("StructArrayLayout1f4",wt);var At=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke){var Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,Z,le,ke)},z.prototype.emplace=function(Z,le,ke,Ie){var qe=3*Z;return this.int16[qe+0]=le,this.int16[qe+1]=ke,this.int16[qe+2]=Ie,Z},z}(_i);At.prototype.bytesPerElement=6,Cr("StructArrayLayout3i6",At);var re=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke){var Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,Z,le,ke)},z.prototype.emplace=function(Z,le,ke,Ie){var qe=2*Z,it=4*Z;return this.uint32[qe+0]=le,this.uint16[it+2]=ke,this.uint16[it+3]=Ie,Z},z}(_i);re.prototype.bytesPerElement=8,Cr("StructArrayLayout1ul2ui8",re);var ve=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le){var ke=this.length;return this.resize(ke+1),this.emplace(ke,Z,le)},z.prototype.emplace=function(Z,le,ke){var Ie=2*Z;return this.uint16[Ie+0]=le,this.uint16[Ie+1]=ke,Z},z}(_i);ve.prototype.bytesPerElement=4,Cr("StructArrayLayout2ui4",ve);var Le=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z){var le=this.length;return this.resize(le+1),this.emplace(le,Z)},z.prototype.emplace=function(Z,le){var ke=1*Z;return this.uint16[ke+0]=le,Z},z}(_i);Le.prototype.bytesPerElement=2,Cr("StructArrayLayout1ui2",Le);var Fe=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le){var ke=this.length;return this.resize(ke+1),this.emplace(ke,Z,le)},z.prototype.emplace=function(Z,le,ke){var Ie=2*Z;return this.float32[Ie+0]=le,this.float32[Ie+1]=ke,Z},z}(_i);Fe.prototype.bytesPerElement=8,Cr("StructArrayLayout2f8",Fe);var Ve=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie){var qe=this.length;return this.resize(qe+1),this.emplace(qe,Z,le,ke,Ie)},z.prototype.emplace=function(Z,le,ke,Ie,qe){var it=4*Z;return this.float32[it+0]=le,this.float32[it+1]=ke,this.float32[it+2]=Ie,this.float32[it+3]=qe,Z},z}(_i);Ve.prototype.bytesPerElement=16,Cr("StructArrayLayout4f16",Ve);var We=function(S){function z(){S.apply(this,arguments)}S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z;var Z={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 Z.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},Z.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},Z.x1.get=function(){return this._structArray.int16[this._pos2+2]},Z.y1.get=function(){return this._structArray.int16[this._pos2+3]},Z.x2.get=function(){return this._structArray.int16[this._pos2+4]},Z.y2.get=function(){return this._structArray.int16[this._pos2+5]},Z.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},Z.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},Z.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},Z.anchorPoint.get=function(){return new t(this.anchorPointX,this.anchorPointY)},Object.defineProperties(z.prototype,Z),z}(as);We.prototype.size=20;var $e=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.get=function(Z){return new We(this,Z)},z}(W);Cr("CollisionBoxArray",$e);var tt=function(S){function z(){S.apply(this,arguments)}S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z;var Z={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 Z.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},Z.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},Z.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},Z.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},Z.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},Z.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},Z.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},Z.segment.get=function(){return this._structArray.uint16[this._pos2+10]},Z.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},Z.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},Z.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},Z.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},Z.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},Z.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},Z.placedOrientation.set=function(le){this._structArray.uint8[this._pos1+37]=le},Z.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},Z.hidden.set=function(le){this._structArray.uint8[this._pos1+38]=le},Z.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},Z.crossTileID.set=function(le){this._structArray.uint32[this._pos4+10]=le},Z.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(z.prototype,Z),z}(as);tt.prototype.size=48;var lt=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.get=function(Z){return new tt(this,Z)},z}(Xe);Cr("PlacedSymbolArray",lt);var gt=function(S){function z(){S.apply(this,arguments)}S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z;var Z={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 Z.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},Z.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},Z.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},Z.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},Z.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},Z.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},Z.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},Z.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},Z.key.get=function(){return this._structArray.uint16[this._pos2+8]},Z.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},Z.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},Z.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},Z.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},Z.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},Z.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},Z.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},Z.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},Z.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},Z.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},Z.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},Z.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},Z.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},Z.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},Z.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},Z.crossTileID.set=function(le){this._structArray.uint32[this._pos4+12]=le},Z.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},Z.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},Z.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},Z.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(z.prototype,Z),z}(as);gt.prototype.size=68;var zt=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.get=function(Z){return new gt(this,Z)},z}(at);Cr("SymbolInstanceArray",zt);var Ut=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.getoffsetX=function(Z){return this.float32[1*Z+0]},z}(wt);Cr("GlyphOffsetArray",Ut);var Vt=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.getx=function(Z){return this.int16[3*Z+0]},z.prototype.gety=function(Z){return this.int16[3*Z+1]},z.prototype.gettileUnitDistanceFromAnchor=function(Z){return this.int16[3*Z+2]},z}(At);Cr("SymbolLineVertexArray",Vt);var Qt=function(S){function z(){S.apply(this,arguments)}S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z;var Z={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return Z.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},Z.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},Z.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(z.prototype,Z),z}(as);Qt.prototype.size=8;var gn=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.get=function(Z){return new Qt(this,Z)},z}(re);Cr("FeatureIndexArray",gn);var en=Si([{name:"a_pos",components:2,type:"Int16"}],4).members,sn=function(S){S===void 0&&(S=[]),this.segments=S};function rn(S,z){return 256*(S=o(Math.floor(S),0,255))+o(Math.floor(z),0,255)}sn.prototype.prepareSegment=function(S,z,Z,le){var ke=this.segments[this.segments.length-1];return S>sn.MAX_VERTEX_ARRAY_LENGTH&&M("Max vertices per segment is "+sn.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+S),(!ke||ke.vertexLength+S>sn.MAX_VERTEX_ARRAY_LENGTH||ke.sortKey!==le)&&(ke={vertexOffset:z.length,primitiveOffset:Z.length,vertexLength:0,primitiveLength:0},le!==void 0&&(ke.sortKey=le),this.segments.push(ke)),ke},sn.prototype.get=function(){return this.segments},sn.prototype.destroy=function(){for(var S=0,z=this.segments;S>>16)*it&65535)<<16)&4294967295)<<15|St>>>17))*dt+(((St>>>16)*dt&65535)<<16)&4294967295)<<13|Ie>>>19))+((5*(Ie>>>16)&65535)<<16)&4294967295))+((58964+(qe>>>16)&65535)<<16);switch(St=0,le){case 3:St^=(255&z.charCodeAt(Rt+2))<<16;case 2:St^=(255&z.charCodeAt(Rt+1))<<8;case 1:Ie^=St=(65535&(St=(St=(65535&(St^=255&z.charCodeAt(Rt)))*it+(((St>>>16)*it&65535)<<16)&4294967295)<<15|St>>>17))*dt+(((St>>>16)*dt&65535)<<16)&4294967295}return Ie^=z.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}}),an=T(function(S){S.exports=function(z,Z){for(var le,ke=z.length,Ie=Z^ke,qe=0;ke>=4;)le=1540483477*(65535&(le=255&z.charCodeAt(qe)|(255&z.charCodeAt(++qe))<<8|(255&z.charCodeAt(++qe))<<16|(255&z.charCodeAt(++qe))<<24))+((1540483477*(le>>>16)&65535)<<16),Ie=1540483477*(65535&Ie)+((1540483477*(Ie>>>16)&65535)<<16)^(le=1540483477*(65535&(le^=le>>>24))+((1540483477*(le>>>16)&65535)<<16)),ke-=4,++qe;switch(ke){case 3:Ie^=(255&z.charCodeAt(qe+2))<<16;case 2:Ie^=(255&z.charCodeAt(qe+1))<<8;case 1:Ie=1540483477*(65535&(Ie^=255&z.charCodeAt(qe)))+((1540483477*(Ie>>>16)&65535)<<16)}return Ie=1540483477*(65535&(Ie^=Ie>>>13))+((1540483477*(Ie>>>16)&65535)<<16),(Ie^=Ie>>>15)>>>0}}),zn=xn,Vn=xn,nr=an;zn.murmur3=Vn,zn.murmur2=nr;var rr=function(){this.ids=[],this.positions=[],this.indexed=!1};rr.prototype.add=function(S,z,Z,le){this.ids.push(Ar(S)),this.positions.push(z,Z,le)},rr.prototype.getPositions=function(S){for(var z=Ar(S),Z=0,le=this.ids.length-1;Z>1;this.ids[ke]>=z?le=ke:Z=ke+1}for(var Ie=[];this.ids[Z]===z;){var qe=this.positions[3*Z],it=this.positions[3*Z+1],dt=this.positions[3*Z+2];Ie.push({index:qe,start:it,end:dt}),Z++}return Ie},rr.serialize=function(S,z){var Z=new Float64Array(S.ids),le=new Uint32Array(S.positions);return mr(Z,le,0,Z.length-1),z&&z.push(Z.buffer,le.buffer),{ids:Z,positions:le}},rr.deserialize=function(S){var z=new rr;return z.ids=S.ids,z.positions=S.positions,z.indexed=!0,z};var Tr=Math.pow(2,53)-1;function Ar(S){var z=+S;return!isNaN(z)&&z<=Tr?z:zn(String(S))}function mr(S,z,Z,le){for(;Z>1],Ie=Z-1,qe=le+1;;){do Ie++;while(S[Ie]ke);if(Ie>=qe)break;wr(S,Ie,qe),wr(z,3*Ie,3*qe),wr(z,3*Ie+1,3*qe+1),wr(z,3*Ie+2,3*qe+2)}qe-Zwa.max||qe.ywa.max)&&(M("Geometry exceeds allowed extent, reduce your vector tile buffer size"),qe.x=o(qe.x,wa.min,wa.max),qe.y=o(qe.y,wa.min,wa.max))}return Z}function ko(S,z,Z,le,ke){S.emplaceBack(2*z+(le+1)/2,2*Z+(ke+1)/2)}var ai=function(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(function(z){return z.id}),this.index=S.index,this.hasPattern=!1,this.layoutVertexArray=new et,this.indexArray=new He,this.segments=new sn,this.programConfigurations=new qi(en,S.layers,S.zoom),this.stateDependentLayerIds=this.layers.filter(function(z){return z.isStateDependent()}).map(function(z){return z.id})};function na(S,z){for(var Z=0;Z1){if(vh(S,z))return!0;for(var le=0;le1?S.distSqr(Z):S.distSqr(Z.sub(z)._mult(ke)._add(z))}function Lc(S,z){for(var Z,le,ke,Ie=!1,qe=0;qez.y!=ke.y>z.y&&z.x<(ke.x-le.x)*(z.y-le.y)/(ke.y-le.y)+le.x&&(Ie=!Ie);return Ie}function Zu(S,z){for(var Z=!1,le=0,ke=S.length-1;lez.y!=qe.y>z.y&&z.x<(qe.x-Ie.x)*(z.y-Ie.y)/(qe.y-Ie.y)+Ie.x&&(Z=!Z)}return Z}function g1(S,z,Z){var le=Z[0],ke=Z[2];if(S.xke.x&&z.x>ke.x||S.yke.y&&z.y>ke.y)return!1;var Ie=A(S,z,Z[0]);return Ie!==A(S,z,Z[1])||Ie!==A(S,z,Z[2])||Ie!==A(S,z,Z[3])}function ku(S,z,Z){var le=z.paint.get(S).value;return le.kind==="constant"?le.value:Z.programConfigurations.get(z.id).getMaxValue(S)}function $p(S){return Math.sqrt(S[0]*S[0]+S[1]*S[1])}function Jp(S,z,Z,le,ke){if(!z[0]&&!z[1])return S;var Ie=t.convert(z)._mult(ke);Z==="viewport"&&Ie._rotate(-le);for(var qe=[],it=0;it=Yr||Rt<0||Rt>=Yr)){var Ht=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,S.sortKey),Yt=Ht.vertexLength;ko(this.layoutVertexArray,St,Rt,-1,-1),ko(this.layoutVertexArray,St,Rt,1,-1),ko(this.layoutVertexArray,St,Rt,1,1),ko(this.layoutVertexArray,St,Rt,-1,1),this.indexArray.emplaceBack(Yt,Yt+1,Yt+2),this.indexArray.emplaceBack(Yt,Yt+3,Yt+2),Ht.vertexLength+=4,Ht.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,S,Z,{},le)},Cr("CircleBucket",ai,{omit:["layers"]});var Gw=new _a({"circle-sort-key":new Ur(Oe.layout_circle["circle-sort-key"])}),Ww={paint:new _a({"circle-radius":new Ur(Oe.paint_circle["circle-radius"]),"circle-color":new Ur(Oe.paint_circle["circle-color"]),"circle-blur":new Ur(Oe.paint_circle["circle-blur"]),"circle-opacity":new Ur(Oe.paint_circle["circle-opacity"]),"circle-translate":new Fr(Oe.paint_circle["circle-translate"]),"circle-translate-anchor":new Fr(Oe.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Fr(Oe.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Fr(Oe.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Ur(Oe.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Ur(Oe.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Ur(Oe.paint_circle["circle-stroke-opacity"])}),layout:Gw},ws=typeof Float32Array<"u"?Float32Array:Array;function v1(S){return S[0]=1,S[1]=0,S[2]=0,S[3]=0,S[4]=0,S[5]=1,S[6]=0,S[7]=0,S[8]=0,S[9]=0,S[10]=1,S[11]=0,S[12]=0,S[13]=0,S[14]=0,S[15]=1,S}function ny(S,z,Z){var le=z[0],ke=z[1],Ie=z[2],qe=z[3],it=z[4],dt=z[5],St=z[6],Rt=z[7],Ht=z[8],Yt=z[9],Zt=z[10],cn=z[11],Tn=z[12],Fn=z[13],Dn=z[14],Gn=z[15],Yn=Z[0],Kn=Z[1],ar=Z[2],ur=Z[3];return S[0]=Yn*le+Kn*it+ar*Ht+ur*Tn,S[1]=Yn*ke+Kn*dt+ar*Yt+ur*Fn,S[2]=Yn*Ie+Kn*St+ar*Zt+ur*Dn,S[3]=Yn*qe+Kn*Rt+ar*cn+ur*Gn,Yn=Z[4],Kn=Z[5],ar=Z[6],ur=Z[7],S[4]=Yn*le+Kn*it+ar*Ht+ur*Tn,S[5]=Yn*ke+Kn*dt+ar*Yt+ur*Fn,S[6]=Yn*Ie+Kn*St+ar*Zt+ur*Dn,S[7]=Yn*qe+Kn*Rt+ar*cn+ur*Gn,Yn=Z[8],Kn=Z[9],ar=Z[10],ur=Z[11],S[8]=Yn*le+Kn*it+ar*Ht+ur*Tn,S[9]=Yn*ke+Kn*dt+ar*Yt+ur*Fn,S[10]=Yn*Ie+Kn*St+ar*Zt+ur*Dn,S[11]=Yn*qe+Kn*Rt+ar*cn+ur*Gn,Yn=Z[12],Kn=Z[13],ar=Z[14],ur=Z[15],S[12]=Yn*le+Kn*it+ar*Ht+ur*Tn,S[13]=Yn*ke+Kn*dt+ar*Yt+ur*Fn,S[14]=Yn*Ie+Kn*St+ar*Zt+ur*Dn,S[15]=Yn*qe+Kn*Rt+ar*cn+ur*Gn,S}Math.hypot||(Math.hypot=function(){for(var S=arguments,z=0,Z=arguments.length;Z--;)z+=S[Z]*S[Z];return Math.sqrt(z)});var Zw=ny,Kp,Yw=function(S,z,Z){return S[0]=z[0]-Z[0],S[1]=z[1]-Z[1],S[2]=z[2]-Z[2],S};function Qp(S,z,Z){var le=z[0],ke=z[1],Ie=z[2],qe=z[3];return S[0]=Z[0]*le+Z[4]*ke+Z[8]*Ie+Z[12]*qe,S[1]=Z[1]*le+Z[5]*ke+Z[9]*Ie+Z[13]*qe,S[2]=Z[2]*le+Z[6]*ke+Z[10]*Ie+Z[14]*qe,S[3]=Z[3]*le+Z[7]*ke+Z[11]*Ie+Z[15]*qe,S}Kp=new ws(3),ws!=Float32Array&&(Kp[0]=0,Kp[1]=0,Kp[2]=0),function(){var S=new ws(4);ws!=Float32Array&&(S[0]=0,S[1]=0,S[2]=0,S[3]=0)}();var Xw=function(S){var z=S[0],Z=S[1];return z*z+Z*Z},$w=(function(){var S=new ws(2);ws!=Float32Array&&(S[0]=0,S[1]=0)}(),function(S){function z(Z){S.call(this,Z,Ww)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.createBucket=function(Z){return new ai(Z)},z.prototype.queryRadius=function(Z){var le=Z;return ku("circle-radius",this,le)+ku("circle-stroke-width",this,le)+$p(this.paint.get("circle-translate"))},z.prototype.queryIntersectsFeature=function(Z,le,ke,Ie,qe,it,dt,St){for(var Rt=Jp(Z,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),it.angle,dt),Ht=this.paint.get("circle-radius").evaluate(le,ke)+this.paint.get("circle-stroke-width").evaluate(le,ke),Yt=this.paint.get("circle-pitch-alignment")==="map",Zt=Yt?Rt:function(Er,_r){return Er.map(function(Ir){return ry(Ir,_r)})}(Rt,St),cn=Yt?Ht*dt:Ht,Tn=0,Fn=Ie;TnS.width||ke.height>S.height||Z.x>S.width-ke.width||Z.y>S.height-ke.height)throw new RangeError("out of range source coordinates for image copy");if(ke.width>z.width||ke.height>z.height||le.x>z.width-ke.width||le.y>z.height-ke.height)throw new RangeError("out of range destination coordinates for image copy");for(var qe=S.data,it=z.data,dt=0;dt80*Z){le=Ie=S[0],ke=qe=S[1];for(var cn=Z;cnIe&&(Ie=it),dt>qe&&(qe=dt);St=(St=Math.max(Ie-le,qe-ke))!==0?1/St:0}return mh(Yt,Zt,Z,le,ke,St),Zt}function ly(S,z,Z,le,ke){var Ie,qe;if(ke===w1(S,z,Z,le)>0)for(Ie=z;Ie=z;Ie-=le)qe=fy(Ie,S[Ie],S[Ie+1],qe);return qe&&td(qe,qe.next)&&(xh(qe),qe=qe.next),qe}function Yu(S,z){if(!S)return S;z||(z=S);var Z,le=S;do if(Z=!1,le.steiner||!td(le,le.next)&&Ta(le.prev,le,le.next)!==0)le=le.next;else{if(xh(le),(le=z=le.prev)===le.next)break;Z=!0}while(Z||le!==z);return z}function mh(S,z,Z,le,ke,Ie,qe){if(S){!qe&&Ie&&function(Rt,Ht,Yt,Zt){var cn=Rt;do cn.z===null&&(cn.z=b1(cn.x,cn.y,Ht,Yt,Zt)),cn.prevZ=cn.prev,cn.nextZ=cn.next,cn=cn.next;while(cn!==Rt);cn.prevZ.nextZ=null,cn.prevZ=null,function(Tn){var Fn,Dn,Gn,Yn,Kn,ar,ur,Er,_r=1;do{for(Dn=Tn,Tn=null,Kn=null,ar=0;Dn;){for(ar++,Gn=Dn,ur=0,Fn=0;Fn<_r&&(ur++,Gn=Gn.nextZ);Fn++);for(Er=_r;ur>0||Er>0&&Gn;)ur!==0&&(Er===0||!Gn||Dn.z<=Gn.z)?(Yn=Dn,Dn=Dn.nextZ,ur--):(Yn=Gn,Gn=Gn.nextZ,Er--),Kn?Kn.nextZ=Yn:Tn=Yn,Yn.prevZ=Kn,Kn=Yn;Dn=Gn}Kn.nextZ=null,_r*=2}while(ar>1)}(cn)}(S,le,ke,Ie);for(var it,dt,St=S;S.prev!==S.next;)if(it=S.prev,dt=S.next,Ie?r5(S,le,ke,Ie):n5(S))z.push(it.i/Z),z.push(S.i/Z),z.push(dt.i/Z),xh(S),S=dt.next,St=dt.next;else if((S=dt)===St){qe?qe===1?mh(S=i5(Yu(S),z,Z),z,Z,le,ke,Ie,2):qe===2&&a5(S,z,Z,le,ke,Ie):mh(Yu(S),z,Z,le,ke,Ie,1);break}}}function n5(S){var z=S.prev,Z=S,le=S.next;if(Ta(z,Z,le)>=0)return!1;for(var ke=S.next.next;ke!==S.prev;){if(df(z.x,z.y,Z.x,Z.y,le.x,le.y,ke.x,ke.y)&&Ta(ke.prev,ke,ke.next)>=0)return!1;ke=ke.next}return!0}function r5(S,z,Z,le){var ke=S.prev,Ie=S,qe=S.next;if(Ta(ke,Ie,qe)>=0)return!1;for(var it=ke.xIe.x?ke.x>qe.x?ke.x:qe.x:Ie.x>qe.x?Ie.x:qe.x,Rt=ke.y>Ie.y?ke.y>qe.y?ke.y:qe.y:Ie.y>qe.y?Ie.y:qe.y,Ht=b1(it,dt,z,Z,le),Yt=b1(St,Rt,z,Z,le),Zt=S.prevZ,cn=S.nextZ;Zt&&Zt.z>=Ht&&cn&&cn.z<=Yt;){if(Zt!==S.prev&&Zt!==S.next&&df(ke.x,ke.y,Ie.x,Ie.y,qe.x,qe.y,Zt.x,Zt.y)&&Ta(Zt.prev,Zt,Zt.next)>=0||(Zt=Zt.prevZ,cn!==S.prev&&cn!==S.next&&df(ke.x,ke.y,Ie.x,Ie.y,qe.x,qe.y,cn.x,cn.y)&&Ta(cn.prev,cn,cn.next)>=0))return!1;cn=cn.nextZ}for(;Zt&&Zt.z>=Ht;){if(Zt!==S.prev&&Zt!==S.next&&df(ke.x,ke.y,Ie.x,Ie.y,qe.x,qe.y,Zt.x,Zt.y)&&Ta(Zt.prev,Zt,Zt.next)>=0)return!1;Zt=Zt.prevZ}for(;cn&&cn.z<=Yt;){if(cn!==S.prev&&cn!==S.next&&df(ke.x,ke.y,Ie.x,Ie.y,qe.x,qe.y,cn.x,cn.y)&&Ta(cn.prev,cn,cn.next)>=0)return!1;cn=cn.nextZ}return!0}function i5(S,z,Z){var le=S;do{var ke=le.prev,Ie=le.next.next;!td(ke,Ie)&&uy(ke,le,le.next,Ie)&&yh(ke,Ie)&&yh(Ie,ke)&&(z.push(ke.i/Z),z.push(le.i/Z),z.push(Ie.i/Z),xh(le),xh(le.next),le=S=Ie),le=le.next}while(le!==S);return Yu(le)}function a5(S,z,Z,le,ke,Ie){var qe=S;do{for(var it=qe.next.next;it!==qe.prev;){if(qe.i!==it.i&&c5(qe,it)){var dt=cy(qe,it);return qe=Yu(qe,qe.next),dt=Yu(dt,dt.next),mh(qe,z,Z,le,ke,Ie),void mh(dt,z,Z,le,ke,Ie)}it=it.next}qe=qe.next}while(qe!==S)}function o5(S,z){return S.x-z.x}function s5(S,z){if(z=function(le,ke){var Ie,qe=ke,it=le.x,dt=le.y,St=-1/0;do{if(dt<=qe.y&&dt>=qe.next.y&&qe.next.y!==qe.y){var Rt=qe.x+(dt-qe.y)*(qe.next.x-qe.x)/(qe.next.y-qe.y);if(Rt<=it&&Rt>St){if(St=Rt,Rt===it){if(dt===qe.y)return qe;if(dt===qe.next.y)return qe.next}Ie=qe.x=qe.x&&qe.x>=Zt&&it!==qe.x&&df(dtIe.x||qe.x===Ie.x&&l5(Ie,qe)))&&(Ie=qe,Tn=Ht)),qe=qe.next;while(qe!==Yt);return Ie}(S,z)){var Z=cy(z,S);Yu(z,z.next),Yu(Z,Z.next)}}function l5(S,z){return Ta(S.prev,S,z.prev)<0&&Ta(z.next,S,S.next)<0}function b1(S,z,Z,le,ke){return(S=1431655765&((S=858993459&((S=252645135&((S=16711935&((S=32767*(S-Z)*ke)|S<<8))|S<<4))|S<<2))|S<<1))|(z=1431655765&((z=858993459&((z=252645135&((z=16711935&((z=32767*(z-le)*ke)|z<<8))|z<<4))|z<<2))|z<<1))<<1}function u5(S){var z=S,Z=S;do(z.x=0&&(S-qe)*(le-it)-(Z-qe)*(z-it)>=0&&(Z-qe)*(Ie-it)-(ke-qe)*(le-it)>=0}function c5(S,z){return S.next.i!==z.i&&S.prev.i!==z.i&&!function(Z,le){var ke=Z;do{if(ke.i!==Z.i&&ke.next.i!==Z.i&&ke.i!==le.i&&ke.next.i!==le.i&&uy(ke,ke.next,Z,le))return!0;ke=ke.next}while(ke!==Z);return!1}(S,z)&&(yh(S,z)&&yh(z,S)&&function(Z,le){var ke=Z,Ie=!1,qe=(Z.x+le.x)/2,it=(Z.y+le.y)/2;do ke.y>it!=ke.next.y>it&&ke.next.y!==ke.y&&qe<(ke.next.x-ke.x)*(it-ke.y)/(ke.next.y-ke.y)+ke.x&&(Ie=!Ie),ke=ke.next;while(ke!==Z);return Ie}(S,z)&&(Ta(S.prev,S,z.prev)||Ta(S,z.prev,z))||td(S,z)&&Ta(S.prev,S,S.next)>0&&Ta(z.prev,z,z.next)>0)}function Ta(S,z,Z){return(z.y-S.y)*(Z.x-z.x)-(z.x-S.x)*(Z.y-z.y)}function td(S,z){return S.x===z.x&&S.y===z.y}function uy(S,z,Z,le){var ke=rd(Ta(S,z,Z)),Ie=rd(Ta(S,z,le)),qe=rd(Ta(Z,le,S)),it=rd(Ta(Z,le,z));return ke!==Ie&&qe!==it||!(ke!==0||!nd(S,Z,z))||!(Ie!==0||!nd(S,le,z))||!(qe!==0||!nd(Z,S,le))||!(it!==0||!nd(Z,z,le))}function nd(S,z,Z){return z.x<=Math.max(S.x,Z.x)&&z.x>=Math.min(S.x,Z.x)&&z.y<=Math.max(S.y,Z.y)&&z.y>=Math.min(S.y,Z.y)}function rd(S){return S>0?1:S<0?-1:0}function yh(S,z){return Ta(S.prev,S,S.next)<0?Ta(S,z,S.next)>=0&&Ta(S,S.prev,z)>=0:Ta(S,z,S.prev)<0||Ta(S,S.next,z)<0}function cy(S,z){var Z=new _1(S.i,S.x,S.y),le=new _1(z.i,z.x,z.y),ke=S.next,Ie=z.prev;return S.next=z,z.prev=S,Z.next=ke,ke.prev=Z,le.next=Z,Z.prev=le,Ie.next=le,le.prev=Ie,le}function fy(S,z,Z,le){var ke=new _1(S,z,Z);return le?(ke.next=le.next,ke.prev=le,le.next.prev=ke,le.next=ke):(ke.prev=ke,ke.next=ke),ke}function xh(S){S.next.prev=S.prev,S.prev.next=S.next,S.prevZ&&(S.prevZ.nextZ=S.nextZ),S.nextZ&&(S.nextZ.prevZ=S.prevZ)}function _1(S,z,Z){this.i=S,this.x=z,this.y=Z,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function w1(S,z,Z,le){for(var ke=0,Ie=z,qe=Z-le;IeZ;){if(le-Z>600){var Ie=le-Z+1,qe=z-Z+1,it=Math.log(Ie),dt=.5*Math.exp(2*it/3),St=.5*Math.sqrt(it*dt*(Ie-dt)/Ie)*(qe-Ie/2<0?-1:1);hy(S,z,Math.max(Z,Math.floor(z-qe*dt/Ie+St)),Math.min(le,Math.floor(z+(Ie-qe)*dt/Ie+St)),ke)}var Rt=S[z],Ht=Z,Yt=le;for(bh(S,Z,z),ke(S[le],Rt)>0&&bh(S,Z,le);Ht0;)Yt--}ke(S[Z],Rt)===0?bh(S,Z,Yt):bh(S,++Yt,le),Yt<=z&&(Z=Yt+1),z<=Yt&&(le=Yt-1)}}function bh(S,z,Z){var le=S[z];S[z]=S[Z],S[Z]=le}function h5(S,z){return Sz?1:0}function T1(S,z){var Z=S.length;if(Z<=1)return[S];for(var le,ke,Ie=[],qe=0;qe1)for(var dt=0;dt0&&(le+=S[ke-1].length,Z.holes.push(le))}return Z},x1.default=t5;var Pl=function(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(function(z){return z.id}),this.index=S.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new et,this.indexArray=new He,this.indexArray2=new ve,this.programConfigurations=new qi(sy,S.layers,S.zoom),this.segments=new sn,this.segments2=new sn,this.stateDependentLayerIds=this.layers.filter(function(z){return z.isStateDependent()}).map(function(z){return z.id})};Pl.prototype.populate=function(S,z,Z){this.hasPattern=k1("fill",this.layers,z);for(var le=this.layers[0].layout.get("fill-sort-key"),ke=[],Ie=0,qe=S;Ie>3}if(ke--,le===1||le===2)Ie+=S.readSVarint(),qe+=S.readSVarint(),le===1&&(z&&it.push(z),z=[]),z.push(new t(Ie,qe));else{if(le!==7)throw new Error("unknown command "+le);z&&z.push(z[0].clone())}}return z&&it.push(z),it},gf.prototype.bbox=function(){var S=this._pbf;S.pos=this._geometry;for(var z=S.readVarint()+S.pos,Z=1,le=0,ke=0,Ie=0,qe=1/0,it=-1/0,dt=1/0,St=-1/0;S.pos>3}if(le--,Z===1||Z===2)(ke+=S.readSVarint())it&&(it=ke),(Ie+=S.readSVarint())St&&(St=Ie);else if(Z!==7)throw new Error("unknown command "+Z)}return[qe,dt,it,St]},gf.prototype.toGeoJSON=function(S,z,Z){var le,ke,Ie=this.extent*Math.pow(2,Z),qe=this.extent*S,it=this.extent*z,dt=this.loadGeometry(),St=gf.types[this.type];function Rt(Zt){for(var cn=0;cn>3;ke=qe===1?le.readString():qe===2?le.readFloat():qe===3?le.readDouble():qe===4?le.readVarint64():qe===5?le.readVarint():qe===6?le.readSVarint():qe===7?le.readBoolean():null}return ke}(Z))}function b5(S,z,Z){if(S===3){var le=new gy(Z,Z.readVarint()+Z.pos);le.length&&(z[le.name]=le)}}vy.prototype.feature=function(S){if(S<0||S>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[S];var z=this._pbf.readVarint()+this._pbf.pos;return new dy(this._pbf,z,this.extent,this._keys,this._values)};var vf={VectorTile:function(S,z){this.layers=S.readFields(b5,{},z)},VectorTileFeature:dy,VectorTileLayer:gy},_5=vf.VectorTileFeature.types,M1=Math.pow(2,13);function _h(S,z,Z,le,ke,Ie,qe,it){S.emplaceBack(z,Z,2*Math.floor(le*M1)+qe,ke*M1*2,Ie*M1*2,Math.round(it))}var Ol=function(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(function(z){return z.id}),this.index=S.index,this.hasPattern=!1,this.layoutVertexArray=new ct,this.indexArray=new He,this.programConfigurations=new qi(py,S.layers,S.zoom),this.segments=new sn,this.stateDependentLayerIds=this.layers.filter(function(z){return z.isStateDependent()}).map(function(z){return z.id})};function w5(S,z){return S.x===z.x&&(S.x<0||S.x>Yr)||S.y===z.y&&(S.y<0||S.y>Yr)}Ol.prototype.populate=function(S,z,Z){this.features=[],this.hasPattern=k1("fill-extrusion",this.layers,z);for(var le=0,ke=S;leYr})||si.every(function(Qr){return Qr.y<0})||si.every(function(Qr){return Qr.y>Yr})))for(var Tn=0,Fn=0;Fn=1){var Gn=cn[Fn-1];if(!w5(Dn,Gn)){Ht.vertexLength+4>sn.MAX_VERTEX_ARRAY_LENGTH&&(Ht=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var Yn=Dn.sub(Gn)._perp()._unit(),Kn=Gn.dist(Dn);Tn+Kn>32768&&(Tn=0),_h(this.layoutVertexArray,Dn.x,Dn.y,Yn.x,Yn.y,0,0,Tn),_h(this.layoutVertexArray,Dn.x,Dn.y,Yn.x,Yn.y,0,1,Tn),Tn+=Kn,_h(this.layoutVertexArray,Gn.x,Gn.y,Yn.x,Yn.y,0,0,Tn),_h(this.layoutVertexArray,Gn.x,Gn.y,Yn.x,Yn.y,0,1,Tn);var ar=Ht.vertexLength;this.indexArray.emplaceBack(ar,ar+2,ar+1),this.indexArray.emplaceBack(ar+1,ar+2,ar+3),Ht.vertexLength+=4,Ht.primitiveLength+=2}}}}if(Ht.vertexLength+dt>sn.MAX_VERTEX_ARRAY_LENGTH&&(Ht=this.segments.prepareSegment(dt,this.layoutVertexArray,this.indexArray)),_5[S.type]==="Polygon"){for(var ur=[],Er=[],_r=Ht.vertexLength,Ir=0,Br=it;Ir=2&&S[dt-1].equals(S[dt-2]);)dt--;for(var St=0;St0;if(Er&&Dn>St){var Ir=Rt.dist(Zt);if(Ir>2*Ht){var Br=Rt.sub(Rt.sub(Zt)._mult(Ht/Ir)._round());this.updateDistance(Zt,Br),this.addCurrentVertex(Br,Tn,0,0,Yt),Zt=Br}}var $r=Zt&&cn,jr=$r?Z:it?"butt":le;if($r&&jr==="round"&&(arke&&(jr="bevel"),jr==="bevel"&&(ar>2&&(jr="flipbevel"),ar100)Gn=Fn.mult(-1);else{var Xr=ar*Tn.add(Fn).mag()/Tn.sub(Fn).mag();Gn._perp()._mult(Xr*(_r?-1:1))}this.addCurrentVertex(Rt,Gn,0,0,Yt),this.addCurrentVertex(Rt,Gn.mult(-1),0,0,Yt)}else if(jr==="bevel"||jr==="fakeround"){var Vr=-Math.sqrt(ar*ar-1),Nr=_r?Vr:0,si=_r?0:Vr;if(Zt&&this.addCurrentVertex(Rt,Tn,Nr,si,Yt),jr==="fakeround")for(var Qr=Math.round(180*ur/Math.PI/20),Di=1;Di2*Ht){var Fi=Rt.add(cn.sub(Rt)._mult(Ht/Wi)._round());this.updateDistance(Rt,Fi),this.addCurrentVertex(Fi,Fn,0,0,Yt),Rt=Fi}}}}},jo.prototype.addCurrentVertex=function(S,z,Z,le,ke,Ie){Ie===void 0&&(Ie=!1);var qe=z.x+z.y*Z,it=z.y-z.x*Z,dt=-z.x+z.y*le,St=-z.y-z.x*le;this.addHalfVertex(S,qe,it,Ie,!1,Z,ke),this.addHalfVertex(S,dt,St,Ie,!0,-le,ke),this.distance>xy/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(S,z,Z,le,ke,Ie))},jo.prototype.addHalfVertex=function(S,z,Z,le,ke,Ie,qe){var it=S.x,dt=S.y,St=.5*this.scaledDistance;this.layoutVertexArray.emplaceBack((it<<1)+(le?1:0),(dt<<1)+(ke?1:0),Math.round(63*z)+128,Math.round(63*Z)+128,1+(Ie===0?0:Ie<0?-1:1)|(63&St)<<2,St>>6);var Rt=qe.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Rt),qe.primitiveLength++),ke?this.e2=Rt:this.e1=Rt},jo.prototype.updateScaledDistance=function(){this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(xy-1):this.distance},jo.prototype.updateDistance=function(S,z){this.distance+=S.dist(z),this.updateScaledDistance()},Cr("LineBucket",jo,{omit:["layers","patternFeatures"]});var S5=new _a({"line-cap":new Fr(Oe.layout_line["line-cap"]),"line-join":new Ur(Oe.layout_line["line-join"]),"line-miter-limit":new Fr(Oe.layout_line["line-miter-limit"]),"line-round-limit":new Fr(Oe.layout_line["line-round-limit"]),"line-sort-key":new Ur(Oe.layout_line["line-sort-key"])}),by={paint:new _a({"line-opacity":new Ur(Oe.paint_line["line-opacity"]),"line-color":new Ur(Oe.paint_line["line-color"]),"line-translate":new Fr(Oe.paint_line["line-translate"]),"line-translate-anchor":new Fr(Oe.paint_line["line-translate-anchor"]),"line-width":new Ur(Oe.paint_line["line-width"]),"line-gap-width":new Ur(Oe.paint_line["line-gap-width"]),"line-offset":new Ur(Oe.paint_line["line-offset"]),"line-blur":new Ur(Oe.paint_line["line-blur"]),"line-dasharray":new is(Oe.paint_line["line-dasharray"]),"line-pattern":new sl(Oe.paint_line["line-pattern"]),"line-gradient":new To(Oe.paint_line["line-gradient"])}),layout:S5},E5=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.possiblyEvaluate=function(Z,le){return le=new di(Math.floor(le.zoom),{now:le.now,fadeDuration:le.fadeDuration,zoomHistory:le.zoomHistory,transition:le.transition}),S.prototype.possiblyEvaluate.call(this,Z,le)},z.prototype.evaluate=function(Z,le,ke,Ie){return le=u({},le,{zoom:Math.floor(le.zoom)}),S.prototype.evaluate.call(this,Z,le,ke,Ie)},z}(Ur),_y=new E5(by.paint.properties["line-width"].specification);_y.useIntegerZoom=!0;var C5=function(S){function z(Z){S.call(this,Z,by)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._handleSpecialPaintPropertyUpdate=function(Z){Z==="line-gradient"&&this._updateGradient()},z.prototype._updateGradient=function(){var Z=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=oy(Z,"lineProgress"),this.gradientTexture=null},z.prototype.recalculate=function(Z,le){S.prototype.recalculate.call(this,Z,le),this.paint._values["line-floorwidth"]=_y.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,Z)},z.prototype.createBucket=function(Z){return new jo(Z)},z.prototype.queryRadius=function(Z){var le=Z,ke=wy(ku("line-width",this,le),ku("line-gap-width",this,le)),Ie=ku("line-offset",this,le);return ke/2+Math.abs(Ie)+$p(this.paint.get("line-translate"))},z.prototype.queryIntersectsFeature=function(Z,le,ke,Ie,qe,it,dt){var St=Jp(Z,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),it.angle,dt),Rt=dt/2*wy(this.paint.get("line-width").evaluate(le,ke),this.paint.get("line-gap-width").evaluate(le,ke)),Ht=this.paint.get("line-offset").evaluate(le,ke);return Ht&&(Ie=function(Yt,Zt){for(var cn=[],Tn=new t(0,0),Fn=0;Fn=3){for(var Dn=0;Dn0?z+2*S:S}var S1=Si([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),L5=Si([{name:"a_projected_pos",components:3,type:"Float32"}],4),P5=(Si([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Si([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),Ty=(Si([{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"}]),Si([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),O5=Si([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function I5(S,z,Z){return S.sections.forEach(function(le){le.text=function(ke,Ie,qe){var it=Ie.layout.get("text-transform").evaluate(qe,{});return it==="uppercase"?ke=ke.toLocaleUpperCase():it==="lowercase"&&(ke=ke.toLocaleLowerCase()),za.applyArabicShaping&&(ke=za.applyArabicShaping(ke)),ke}(le.text,z,Z)}),S}Si([{name:"triangle",components:3,type:"Uint16"}]),Si([{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"}]),Si([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),Si([{type:"Float32",name:"offsetX"}]),Si([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var Th={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},no=24,ky=function(S,z,Z,le,ke){var Ie,qe,it=8*ke-le-1,dt=(1<>1,Rt=-7,Ht=Z?ke-1:0,Yt=Z?-1:1,Zt=S[z+Ht];for(Ht+=Yt,Ie=Zt&(1<<-Rt)-1,Zt>>=-Rt,Rt+=it;Rt>0;Ie=256*Ie+S[z+Ht],Ht+=Yt,Rt-=8);for(qe=Ie&(1<<-Rt)-1,Ie>>=-Rt,Rt+=le;Rt>0;qe=256*qe+S[z+Ht],Ht+=Yt,Rt-=8);if(Ie===0)Ie=1-St;else{if(Ie===dt)return qe?NaN:1/0*(Zt?-1:1);qe+=Math.pow(2,le),Ie-=St}return(Zt?-1:1)*qe*Math.pow(2,Ie-le)},Ay=function(S,z,Z,le,ke,Ie){var qe,it,dt,St=8*Ie-ke-1,Rt=(1<>1,Yt=ke===23?Math.pow(2,-24)-Math.pow(2,-77):0,Zt=le?0:Ie-1,cn=le?1:-1,Tn=z<0||z===0&&1/z<0?1:0;for(z=Math.abs(z),isNaN(z)||z===1/0?(it=isNaN(z)?1:0,qe=Rt):(qe=Math.floor(Math.log(z)/Math.LN2),z*(dt=Math.pow(2,-qe))<1&&(qe--,dt*=2),(z+=qe+Ht>=1?Yt/dt:Yt*Math.pow(2,1-Ht))*dt>=2&&(qe++,dt/=2),qe+Ht>=Rt?(it=0,qe=Rt):qe+Ht>=1?(it=(z*dt-1)*Math.pow(2,ke),qe+=Ht):(it=z*Math.pow(2,Ht-1)*Math.pow(2,ke),qe=0));ke>=8;S[Z+Zt]=255&it,Zt+=cn,it/=256,ke-=8);for(qe=qe<0;S[Z+Zt]=255&qe,Zt+=cn,qe/=256,St-=8);S[Z+Zt-cn]|=128*Tn},id=Ni;function Ni(S){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(S)?S:new Uint8Array(S||0),this.pos=0,this.type=0,this.length=this.buf.length}Ni.Varint=0,Ni.Fixed64=1,Ni.Bytes=2,Ni.Fixed32=5;var E1=4294967296,My=1/E1,Sy=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function Au(S){return S.type===Ni.Bytes?S.readVarint()+S.pos:S.pos+1}function mf(S,z,Z){return Z?4294967296*z+(S>>>0):4294967296*(z>>>0)+(S>>>0)}function Ey(S,z,Z){var le=z<=16383?1:z<=2097151?2:z<=268435455?3:Math.floor(Math.log(z)/(7*Math.LN2));Z.realloc(le);for(var ke=Z.pos-1;ke>=S;ke--)Z.buf[ke+le]=Z.buf[ke]}function R5(S,z){for(var Z=0;Z>>8,S[Z+2]=z>>>16,S[Z+3]=z>>>24}function Cy(S,z){return(S[z]|S[z+1]<<8|S[z+2]<<16)+(S[z+3]<<24)}Ni.prototype={destroy:function(){this.buf=null},readFields:function(S,z,Z){for(Z=Z||this.length;this.pos>3,Ie=this.pos;this.type=7&le,S(ke,z,this),this.pos===Ie&&this.skip(le)}return z},readMessage:function(S,z){return this.readFields(S,z,this.readVarint()+this.pos)},readFixed32:function(){var S=ad(this.buf,this.pos);return this.pos+=4,S},readSFixed32:function(){var S=Cy(this.buf,this.pos);return this.pos+=4,S},readFixed64:function(){var S=ad(this.buf,this.pos)+ad(this.buf,this.pos+4)*E1;return this.pos+=8,S},readSFixed64:function(){var S=ad(this.buf,this.pos)+Cy(this.buf,this.pos+4)*E1;return this.pos+=8,S},readFloat:function(){var S=ky(this.buf,this.pos,!0,23,4);return this.pos+=4,S},readDouble:function(){var S=ky(this.buf,this.pos,!0,52,8);return this.pos+=8,S},readVarint:function(S){var z,Z,le=this.buf;return z=127&(Z=le[this.pos++]),Z<128?z:(z|=(127&(Z=le[this.pos++]))<<7,Z<128?z:(z|=(127&(Z=le[this.pos++]))<<14,Z<128?z:(z|=(127&(Z=le[this.pos++]))<<21,Z<128?z:function(ke,Ie,qe){var it,dt,St=qe.buf;if(it=(112&(dt=St[qe.pos++]))>>4,dt<128||(it|=(127&(dt=St[qe.pos++]))<<3,dt<128)||(it|=(127&(dt=St[qe.pos++]))<<10,dt<128)||(it|=(127&(dt=St[qe.pos++]))<<17,dt<128)||(it|=(127&(dt=St[qe.pos++]))<<24,dt<128)||(it|=(1&(dt=St[qe.pos++]))<<31,dt<128))return mf(ke,it,Ie);throw new Error("Expected varint not more than 10 bytes")}(z|=(15&(Z=le[this.pos]))<<28,S,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var S=this.readVarint();return S%2==1?(S+1)/-2:S/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var S=this.readVarint()+this.pos,z=this.pos;return this.pos=S,S-z>=12&&Sy?function(Z,le,ke){return Sy.decode(Z.subarray(le,ke))}(this.buf,z,S):function(Z,le,ke){for(var Ie="",qe=le;qe239?4:Rt>223?3:Rt>191?2:1;if(qe+Yt>ke)break;Yt===1?Rt<128&&(Ht=Rt):Yt===2?(192&(it=Z[qe+1]))==128&&(Ht=(31&Rt)<<6|63&it)<=127&&(Ht=null):Yt===3?(it=Z[qe+1],dt=Z[qe+2],(192&it)==128&&(192&dt)==128&&((Ht=(15&Rt)<<12|(63&it)<<6|63&dt)<=2047||Ht>=55296&&Ht<=57343)&&(Ht=null)):Yt===4&&(it=Z[qe+1],dt=Z[qe+2],St=Z[qe+3],(192&it)==128&&(192&dt)==128&&(192&St)==128&&((Ht=(15&Rt)<<18|(63&it)<<12|(63&dt)<<6|63&St)<=65535||Ht>=1114112)&&(Ht=null)),Ht===null?(Ht=65533,Yt=1):Ht>65535&&(Ht-=65536,Ie+=String.fromCharCode(Ht>>>10&1023|55296),Ht=56320|1023&Ht),Ie+=String.fromCharCode(Ht),qe+=Yt}return Ie}(this.buf,z,S)},readBytes:function(){var S=this.readVarint()+this.pos,z=this.buf.subarray(this.pos,S);return this.pos=S,z},readPackedVarint:function(S,z){if(this.type!==Ni.Bytes)return S.push(this.readVarint(z));var Z=Au(this);for(S=S||[];this.pos127;);else if(z===Ni.Bytes)this.pos=this.readVarint()+this.pos;else if(z===Ni.Fixed32)this.pos+=4;else{if(z!==Ni.Fixed64)throw new Error("Unimplemented type: "+z);this.pos+=8}},writeTag:function(S,z){this.writeVarint(S<<3|z)},realloc:function(S){for(var z=this.length||16;z268435455||S<0?function(z,Z){var le,ke;if(z>=0?(le=z%4294967296|0,ke=z/4294967296|0):(ke=~(-z/4294967296),4294967295^(le=~(-z%4294967296))?le=le+1|0:(le=0,ke=ke+1|0)),z>=18446744073709552e3||z<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");Z.realloc(10),function(Ie,qe,it){it.buf[it.pos++]=127&Ie|128,Ie>>>=7,it.buf[it.pos++]=127&Ie|128,Ie>>>=7,it.buf[it.pos++]=127&Ie|128,Ie>>>=7,it.buf[it.pos++]=127&Ie|128,Ie>>>=7,it.buf[it.pos]=127&Ie}(le,0,Z),function(Ie,qe){var it=(7&Ie)<<4;qe.buf[qe.pos++]|=it|((Ie>>>=3)?128:0),Ie&&(qe.buf[qe.pos++]=127&Ie|((Ie>>>=7)?128:0),Ie&&(qe.buf[qe.pos++]=127&Ie|((Ie>>>=7)?128:0),Ie&&(qe.buf[qe.pos++]=127&Ie|((Ie>>>=7)?128:0),Ie&&(qe.buf[qe.pos++]=127&Ie|((Ie>>>=7)?128:0),Ie&&(qe.buf[qe.pos++]=127&Ie)))))}(ke,Z)}(S,this):(this.realloc(4),this.buf[this.pos++]=127&S|(S>127?128:0),S<=127||(this.buf[this.pos++]=127&(S>>>=7)|(S>127?128:0),S<=127||(this.buf[this.pos++]=127&(S>>>=7)|(S>127?128:0),S<=127||(this.buf[this.pos++]=S>>>7&127))))},writeSVarint:function(S){this.writeVarint(S<0?2*-S-1:2*S)},writeBoolean:function(S){this.writeVarint(!!S)},writeString:function(S){S=String(S),this.realloc(4*S.length),this.pos++;var z=this.pos;this.pos=function(le,ke,Ie){for(var qe,it,dt=0;dt55295&&qe<57344){if(!it){qe>56319||dt+1===ke.length?(le[Ie++]=239,le[Ie++]=191,le[Ie++]=189):it=qe;continue}if(qe<56320){le[Ie++]=239,le[Ie++]=191,le[Ie++]=189,it=qe;continue}qe=it-55296<<10|qe-56320|65536,it=null}else it&&(le[Ie++]=239,le[Ie++]=191,le[Ie++]=189,it=null);qe<128?le[Ie++]=qe:(qe<2048?le[Ie++]=qe>>6|192:(qe<65536?le[Ie++]=qe>>12|224:(le[Ie++]=qe>>18|240,le[Ie++]=qe>>12&63|128),le[Ie++]=qe>>6&63|128),le[Ie++]=63&qe|128)}return Ie}(this.buf,S,this.pos);var Z=this.pos-z;Z>=128&&Ey(z,Z,this),this.pos=z-1,this.writeVarint(Z),this.pos+=Z},writeFloat:function(S){this.realloc(4),Ay(this.buf,S,this.pos,!0,23,4),this.pos+=4},writeDouble:function(S){this.realloc(8),Ay(this.buf,S,this.pos,!0,52,8),this.pos+=8},writeBytes:function(S){var z=S.length;this.writeVarint(z),this.realloc(z);for(var Z=0;Z=128&&Ey(Z,le,this),this.pos=Z-1,this.writeVarint(le),this.pos+=le},writeMessage:function(S,z,Z){this.writeTag(S,Ni.Bytes),this.writeRawMessage(z,Z)},writePackedVarint:function(S,z){z.length&&this.writeMessage(S,R5,z)},writePackedSVarint:function(S,z){z.length&&this.writeMessage(S,z5,z)},writePackedBoolean:function(S,z){z.length&&this.writeMessage(S,B5,z)},writePackedFloat:function(S,z){z.length&&this.writeMessage(S,D5,z)},writePackedDouble:function(S,z){z.length&&this.writeMessage(S,F5,z)},writePackedFixed32:function(S,z){z.length&&this.writeMessage(S,N5,z)},writePackedSFixed32:function(S,z){z.length&&this.writeMessage(S,j5,z)},writePackedFixed64:function(S,z){z.length&&this.writeMessage(S,U5,z)},writePackedSFixed64:function(S,z){z.length&&this.writeMessage(S,V5,z)},writeBytesField:function(S,z){this.writeTag(S,Ni.Bytes),this.writeBytes(z)},writeFixed32Field:function(S,z){this.writeTag(S,Ni.Fixed32),this.writeFixed32(z)},writeSFixed32Field:function(S,z){this.writeTag(S,Ni.Fixed32),this.writeSFixed32(z)},writeFixed64Field:function(S,z){this.writeTag(S,Ni.Fixed64),this.writeFixed64(z)},writeSFixed64Field:function(S,z){this.writeTag(S,Ni.Fixed64),this.writeSFixed64(z)},writeVarintField:function(S,z){this.writeTag(S,Ni.Varint),this.writeVarint(z)},writeSVarintField:function(S,z){this.writeTag(S,Ni.Varint),this.writeSVarint(z)},writeStringField:function(S,z){this.writeTag(S,Ni.Bytes),this.writeString(z)},writeFloatField:function(S,z){this.writeTag(S,Ni.Fixed32),this.writeFloat(z)},writeDoubleField:function(S,z){this.writeTag(S,Ni.Fixed64),this.writeDouble(z)},writeBooleanField:function(S,z){this.writeVarintField(S,!!z)}};function H5(S,z,Z){S===1&&Z.readMessage(q5,z)}function q5(S,z,Z){if(S===3){var le=Z.readMessage(G5,{}),ke=le.id,Ie=le.bitmap,qe=le.width,it=le.height,dt=le.left,St=le.top,Rt=le.advance;z.push({id:ke,bitmap:new Pc({width:qe+6,height:it+6},Ie),metrics:{width:qe,height:it,left:dt,top:St,advance:Rt}})}}function G5(S,z,Z){S===1?z.id=Z.readVarint():S===2?z.bitmap=Z.readBytes():S===3?z.width=Z.readVarint():S===4?z.height=Z.readVarint():S===5?z.left=Z.readSVarint():S===6?z.top=Z.readSVarint():S===7&&(z.advance=Z.readVarint())}function Ly(S){for(var z=0,Z=0,le=0,ke=S;le=0;Yt--){var Zt=qe[Yt];if(!(Ht.w>Zt.w||Ht.h>Zt.h)){if(Ht.x=Zt.x,Ht.y=Zt.y,dt=Math.max(dt,Ht.y+Ht.h),it=Math.max(it,Ht.x+Ht.w),Ht.w===Zt.w&&Ht.h===Zt.h){var cn=qe.pop();Yt0&&zc>Ji&&(Ji=zc)}else{var yd=Qr[mi.fontStack],Dc=yd&&yd[Mo];if(Dc&&Dc.rect)Il=Dc.rect,vo=Dc.metrics;else{var xd=si[mi.fontStack],Eh=xd&&xd[Mo];if(!Eh)continue;vo=Eh.metrics}ss=(ei-mi.scale)*no}Rl?(Nr.verticalizable=!0,Ri.push({glyph:Mo,imageName:Eu,x:ja,y:ro+ss,vertical:Rl,scale:mi.scale,fontStack:mi.fontStack,sectionIndex:ia,metrics:vo,rect:Il}),ja+=Va*mi.scale+Fi):(Ri.push({glyph:Mo,imageName:Eu,x:ja,y:ro+ss,vertical:Rl,scale:mi.scale,fontStack:mi.fontStack,sectionIndex:ia,metrics:vo,rect:Il}),ja+=vo.advance*mi.scale+Fi)}if(Ri.length!==0){var N1=ja-Fi;Za=Math.max(N1,Za),Z5(Ri,0,Ri.length-1,Ya,Ji)}ja=0;var bd=Pi*ei+Ji;ra.lineOffset=Math.max(Ji,pi),ro+=bd,Ao=Math.max(bd,Ao),++Ea}else ro+=Pi,++Ea}var Sf=ro-sd,_d=L1(ji),wd=_d.horizontalAlign,Ch=_d.verticalAlign;(function(j1,Lh,Fc,Ef,Td,kd,Cf,Ad,Md){var Ph=(Lh-Fc)*Td,Oh=0;Oh=kd!==Cf?-Ad*Ef-sd:(-Ef*Md+.5)*Cf;for(var Bc=0,Ih=j1;Bc=0&&le>=S&&ud[this.text.charCodeAt(le)];le--)Z--;this.text=this.text.substring(S,Z),this.sectionIndex=this.sectionIndex.slice(S,Z)},go.prototype.substring=function(S,z){var Z=new go;return Z.text=this.text.substring(S,z),Z.sectionIndex=this.sectionIndex.slice(S,z),Z.sections=this.sections,Z},go.prototype.toString=function(){return this.text},go.prototype.getMaxScale=function(){var S=this;return this.sectionIndex.reduce(function(z,Z){return Math.max(z,S.sections[Z].scale)},0)},go.prototype.addTextSection=function(S,z){this.text+=S.text,this.sections.push(xf.forText(S.scale,S.fontStack||z));for(var Z=this.sections.length-1,le=0;le=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var ud={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},os={};function Py(S,z,Z,le,ke,Ie){if(z.imageName){var qe=le[z.imageName];return qe?qe.displaySize[0]*z.scale*no/Ie+ke:0}var it=Z[z.fontStack],dt=it&&it[S];return dt?dt.metrics.advance*z.scale+ke:0}function Oy(S,z,Z,le){var ke=Math.pow(S-z,2);return le?S=0,Rt=0,Ht=0;Ht-Z/2;){if(--qe<0)return!1;it-=S[qe].dist(Ie),Ie=S[qe]}it+=S[qe].dist(S[qe+1]),qe++;for(var dt=[],St=0;itle;)St-=dt.shift().angleDelta;if(St>ke)return!1;qe++,it+=Ht.dist(Yt)}return!0}function Ny(S){for(var z=0,Z=0;ZSt){var cn=(St-dt)/Zt,Tn=Lr(Ht.x,Yt.x,cn),Fn=Lr(Ht.y,Yt.y,cn),Dn=new bf(Tn,Fn,Yt.angleTo(Ht),Rt);return Dn._round(),!qe||By(S,Dn,it,qe,z)?Dn:void 0}dt+=Zt}}function $5(S,z,Z,le,ke,Ie,qe,it,dt){var St=jy(le,Ie,qe),Rt=Uy(le,ke),Ht=Rt*qe,Yt=S[0].x===0||S[0].x===dt||S[0].y===0||S[0].y===dt;return z-Ht=0&&Kn=0&&ar=0&&Yt+St<=Rt){var ur=new bf(Kn,ar,Gn,cn);ur._round(),le&&!By(S,ur,Ie,le,ke)||Zt.push(ur)}}Ht+=Dn}return it||Zt.length||qe||(Zt=Vy(S,Ht/2,Z,le,ke,Ie,qe,!0,dt)),Zt}function Hy(S,z,Z,le,ke){for(var Ie=[],qe=0;qe=le&&Ht.x>=le||(Rt.x>=le?Rt=new t(le,Rt.y+(Ht.y-Rt.y)*((le-Rt.x)/(Ht.x-Rt.x)))._round():Ht.x>=le&&(Ht=new t(le,Rt.y+(Ht.y-Rt.y)*((le-Rt.x)/(Ht.x-Rt.x)))._round()),Rt.y>=ke&&Ht.y>=ke||(Rt.y>=ke?Rt=new t(Rt.x+(Ht.x-Rt.x)*((ke-Rt.y)/(Ht.y-Rt.y)),ke)._round():Ht.y>=ke&&(Ht=new t(Rt.x+(Ht.x-Rt.x)*((ke-Rt.y)/(Ht.y-Rt.y)),ke)._round()),dt&&Rt.equals(dt[dt.length-1])||(dt=[Rt],Ie.push(dt)),dt.push(Ht)))))}return Ie}function qy(S,z,Z,le){var ke=[],Ie=S.image,qe=Ie.pixelRatio,it=Ie.paddedRect.w-2,dt=Ie.paddedRect.h-2,St=S.right-S.left,Rt=S.bottom-S.top,Ht=Ie.stretchX||[[0,it]],Yt=Ie.stretchY||[[0,dt]],Zt=function(Pi,ji){return Pi+ji[1]-ji[0]},cn=Ht.reduce(Zt,0),Tn=Yt.reduce(Zt,0),Fn=it-cn,Dn=dt-Tn,Gn=0,Yn=cn,Kn=0,ar=Tn,ur=0,Er=Fn,_r=0,Ir=Dn;if(Ie.content&&le){var Br=Ie.content;Gn=cd(Ht,0,Br[0]),Kn=cd(Yt,0,Br[1]),Yn=cd(Ht,Br[0],Br[2]),ar=cd(Yt,Br[1],Br[3]),ur=Br[0]-Gn,_r=Br[1]-Kn,Er=Br[2]-Br[0]-Yn,Ir=Br[3]-Br[1]-ar}var $r=function(Pi,ji,Vi,Wi){var Fi=fd(Pi.stretch-Gn,Yn,St,S.left),Ma=hd(Pi.fixed-ur,Er,Pi.stretch,cn),Xi=fd(ji.stretch-Kn,ar,Rt,S.top),ja=hd(ji.fixed-_r,Ir,ji.stretch,Tn),ro=fd(Vi.stretch-Gn,Yn,St,S.left),Za=hd(Vi.fixed-ur,Er,Vi.stretch,cn),Ao=fd(Wi.stretch-Kn,ar,Rt,S.top),Ya=hd(Wi.fixed-_r,Ir,Wi.stretch,Tn),Ea=new t(Fi,Xi),Xa=new t(ro,Xi),Ua=new t(ro,Ao),Ca=new t(Fi,Ao),ei=new t(Ma/qe,ja/qe),pi=new t(Za/qe,Ya/qe),ra=z*Math.PI/180;if(ra){var Ri=Math.sin(ra),Ji=Math.cos(ra),Zi=[Ji,-Ri,Ri,Ji];Ea._matMult(Zi),Xa._matMult(Zi),Ca._matMult(Zi),Ua._matMult(Zi)}var mi=Pi.stretch+Pi.fixed,ia=Vi.stretch+Vi.fixed,Mo=ji.stretch+ji.fixed,ss=Wi.stretch+Wi.fixed;return{tl:Ea,tr:Xa,bl:Ca,br:Ua,tex:{x:Ie.paddedRect.x+1+mi,y:Ie.paddedRect.y+1+Mo,w:ia-mi,h:ss-Mo},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:ei,pixelOffsetBR:pi,minFontScaleX:Er/qe/St,minFontScaleY:Ir/qe/Rt,isSDF:Z}};if(le&&(Ie.stretchX||Ie.stretchY))for(var jr=Gy(Ht,Fn,cn),Xr=Gy(Yt,Dn,Tn),Vr=0;Vr0&&(Zt=Math.max(10,Zt),this.circleDiameter=Zt)}else{var cn=Ie.top*qe-it,Tn=Ie.bottom*qe+it,Fn=Ie.left*qe-it,Dn=Ie.right*qe+it,Gn=Ie.collisionPadding;if(Gn&&(Fn-=Gn[0]*qe,cn-=Gn[1]*qe,Dn+=Gn[2]*qe,Tn+=Gn[3]*qe),St){var Yn=new t(Fn,cn),Kn=new t(Dn,cn),ar=new t(Fn,Tn),ur=new t(Dn,Tn),Er=St*Math.PI/180;Yn._rotate(Er),Kn._rotate(Er),ar._rotate(Er),ur._rotate(Er),Fn=Math.min(Yn.x,Kn.x,ar.x,ur.x),Dn=Math.max(Yn.x,Kn.x,ar.x,ur.x),cn=Math.min(Yn.y,Kn.y,ar.y,ur.y),Tn=Math.max(Yn.y,Kn.y,ar.y,ur.y)}S.emplaceBack(z.x,z.y,Fn,cn,Dn,Tn,Z,le,ke)}this.boxEndIndex=S.length},_f=function(S,z){if(S===void 0&&(S=[]),z===void 0&&(z=J5),this.data=S,this.length=this.data.length,this.compare=z,this.length>0)for(var Z=(this.length>>1)-1;Z>=0;Z--)this._down(Z)};function J5(S,z){return Sz?1:0}function K5(S,z,Z){z===void 0&&(z=1),Z===void 0&&(Z=!1);for(var le=1/0,ke=1/0,Ie=-1/0,qe=-1/0,it=S[0],dt=0;dtIe)&&(Ie=St.x),(!dt||St.y>qe)&&(qe=St.y)}var Rt=Ie-le,Ht=qe-ke,Yt=Math.min(Rt,Ht),Zt=Yt/2,cn=new _f([],Q5);if(Yt===0)return new t(le,ke);for(var Tn=le;TnDn.d||!Dn.d)&&(Dn=Yn,Z&&console.log("found best %d after %d probes",Math.round(1e4*Yn.d)/1e4,Gn)),Yn.max-Dn.d<=z||(Zt=Yn.h/2,cn.push(new wf(Yn.p.x-Zt,Yn.p.y-Zt,Zt,S)),cn.push(new wf(Yn.p.x+Zt,Yn.p.y-Zt,Zt,S)),cn.push(new wf(Yn.p.x-Zt,Yn.p.y+Zt,Zt,S)),cn.push(new wf(Yn.p.x+Zt,Yn.p.y+Zt,Zt,S)),Gn+=4)}return Z&&(console.log("num probes: "+Gn),console.log("best distance: "+Dn.d)),Dn.p}function Q5(S,z){return z.max-S.max}function wf(S,z,Z,le){this.p=new t(S,z),this.h=Z,this.d=function(ke,Ie){for(var qe=!1,it=1/0,dt=0;dtke.y!=cn.y>ke.y&&ke.x<(cn.x-Zt.x)*(ke.y-Zt.y)/(cn.y-Zt.y)+Zt.x&&(qe=!qe),it=Math.min(it,Xp(ke,Zt,cn))}return(qe?1:-1)*Math.sqrt(it)}(this.p,le),this.max=this.d+this.h*Math.SQRT2}_f.prototype.push=function(S){this.data.push(S),this.length++,this._up(this.length-1)},_f.prototype.pop=function(){if(this.length!==0){var S=this.data[0],z=this.data.pop();return this.length--,this.length>0&&(this.data[0]=z,this._down(0)),S}},_f.prototype.peek=function(){return this.data[0]},_f.prototype._up=function(S){for(var z=this.data,Z=this.compare,le=z[S];S>0;){var ke=S-1>>1,Ie=z[ke];if(Z(le,Ie)>=0)break;z[S]=Ie,S=ke}z[S]=le},_f.prototype._down=function(S){for(var z=this.data,Z=this.compare,le=this.length>>1,ke=z[S];S=0)break;z[S]=qe,S=Ie}z[S]=ke};var O1=Number.POSITIVE_INFINITY;function Wy(S,z){return z[1]!==O1?function(Z,le,ke){var Ie=0,qe=0;switch(le=Math.abs(le),ke=Math.abs(ke),Z){case"top-right":case"top-left":case"top":qe=ke-7;break;case"bottom-right":case"bottom-left":case"bottom":qe=7-ke}switch(Z){case"top-right":case"bottom-right":case"right":Ie=-le;break;case"top-left":case"bottom-left":case"left":Ie=le}return[Ie,qe]}(S,z[0],z[1]):function(Z,le){var ke=0,Ie=0;le<0&&(le=0);var qe=le/Math.sqrt(2);switch(Z){case"top-right":case"top-left":Ie=qe-7;break;case"bottom-right":case"bottom-left":Ie=7-qe;break;case"bottom":Ie=7-le;break;case"top":Ie=le-7}switch(Z){case"top-right":case"bottom-right":ke=-qe;break;case"top-left":case"bottom-left":ke=qe;break;case"left":ke=le;break;case"right":ke=-le}return[ke,Ie]}(S,z[0])}function I1(S){switch(S){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}var Xu=32640;function Zy(S,z,Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt,cn){var Tn=function(Kn,ar,ur,Er,_r,Ir,Br,$r){for(var jr=Er.layout.get("text-rotate").evaluate(Ir,{})*Math.PI/180,Xr=[],Vr=0,Nr=ar.positionedLines;VrXu&&M(S.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):Fn.kind==="composite"&&((Dn=[Ql*Zt.compositeTextSizes[0].evaluate(qe,{},cn),Ql*Zt.compositeTextSizes[1].evaluate(qe,{},cn)])[0]>Xu||Dn[1]>Xu)&&M(S.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),S.addSymbols(S.text,Tn,Dn,it,Ie,qe,St,z,dt.lineStartIndex,dt.lineLength,Yt,cn);for(var Gn=0,Yn=Rt;Gn=0;qe--)if(le.dist(Ie[qe])0)&&(Ie.value.kind!=="constant"||Ie.value.value.length>0),St=it.value.kind!=="constant"||!!it.value.value||Object.keys(it.parameters).length>0,Rt=ke.get("symbol-sort-key");if(this.features=[],dt||St){for(var Ht=z.iconDependencies,Yt=z.glyphDependencies,Zt=z.availableImages,cn=new di(this.zoom),Tn=0,Fn=S;Tn=0;for(var Qr=0,Di=_r.sections;Qr=0;it--)Ie[it]={x:z[it].x,y:z[it].y,tileUnitDistanceFromAnchor:ke},it>0&&(ke+=z[it-1].dist(z[it]));for(var dt=0;dt0},Li.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Li.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Li.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Li.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Li.prototype.addIndicesForPlacedSymbol=function(S,z){for(var Z=S.placedSymbolArray.get(z),le=Z.vertexStartIndex+4*Z.numGlyphs,ke=Z.vertexStartIndex;ke1||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(var Z=0,le=this.symbolInstanceIndexes;Z=0&&dt.indexOf(qe)===it&&z.addIndicesForPlacedSymbol(z.text,qe)}),Ie.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,Ie.verticalPlacedTextSymbolIndex),Ie.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Ie.placedIconSymbolIndex),Ie.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Ie.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Cr("SymbolBucket",Li,{omit:["layers","collisionBoxArray","features","compareText"]}),Li.MAX_GLYPHS=65535,Li.addDynamicAttributes=R1;var i4=new _a({"symbol-placement":new Fr(Oe.layout_symbol["symbol-placement"]),"symbol-spacing":new Fr(Oe.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Fr(Oe.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Ur(Oe.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Fr(Oe.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Fr(Oe.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Fr(Oe.layout_symbol["icon-ignore-placement"]),"icon-optional":new Fr(Oe.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Fr(Oe.layout_symbol["icon-rotation-alignment"]),"icon-size":new Ur(Oe.layout_symbol["icon-size"]),"icon-text-fit":new Fr(Oe.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Fr(Oe.layout_symbol["icon-text-fit-padding"]),"icon-image":new Ur(Oe.layout_symbol["icon-image"]),"icon-rotate":new Ur(Oe.layout_symbol["icon-rotate"]),"icon-padding":new Fr(Oe.layout_symbol["icon-padding"]),"icon-keep-upright":new Fr(Oe.layout_symbol["icon-keep-upright"]),"icon-offset":new Ur(Oe.layout_symbol["icon-offset"]),"icon-anchor":new Ur(Oe.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Fr(Oe.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Fr(Oe.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Fr(Oe.layout_symbol["text-rotation-alignment"]),"text-field":new Ur(Oe.layout_symbol["text-field"]),"text-font":new Ur(Oe.layout_symbol["text-font"]),"text-size":new Ur(Oe.layout_symbol["text-size"]),"text-max-width":new Ur(Oe.layout_symbol["text-max-width"]),"text-line-height":new Fr(Oe.layout_symbol["text-line-height"]),"text-letter-spacing":new Ur(Oe.layout_symbol["text-letter-spacing"]),"text-justify":new Ur(Oe.layout_symbol["text-justify"]),"text-radial-offset":new Ur(Oe.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Fr(Oe.layout_symbol["text-variable-anchor"]),"text-anchor":new Ur(Oe.layout_symbol["text-anchor"]),"text-max-angle":new Fr(Oe.layout_symbol["text-max-angle"]),"text-writing-mode":new Fr(Oe.layout_symbol["text-writing-mode"]),"text-rotate":new Ur(Oe.layout_symbol["text-rotate"]),"text-padding":new Fr(Oe.layout_symbol["text-padding"]),"text-keep-upright":new Fr(Oe.layout_symbol["text-keep-upright"]),"text-transform":new Ur(Oe.layout_symbol["text-transform"]),"text-offset":new Ur(Oe.layout_symbol["text-offset"]),"text-allow-overlap":new Fr(Oe.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Fr(Oe.layout_symbol["text-ignore-placement"]),"text-optional":new Fr(Oe.layout_symbol["text-optional"])}),z1={paint:new _a({"icon-opacity":new Ur(Oe.paint_symbol["icon-opacity"]),"icon-color":new Ur(Oe.paint_symbol["icon-color"]),"icon-halo-color":new Ur(Oe.paint_symbol["icon-halo-color"]),"icon-halo-width":new Ur(Oe.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Ur(Oe.paint_symbol["icon-halo-blur"]),"icon-translate":new Fr(Oe.paint_symbol["icon-translate"]),"icon-translate-anchor":new Fr(Oe.paint_symbol["icon-translate-anchor"]),"text-opacity":new Ur(Oe.paint_symbol["text-opacity"]),"text-color":new Ur(Oe.paint_symbol["text-color"],{runtimeType:Bt,getOverride:function(S){return S.textColor},hasOverride:function(S){return!!S.textColor}}),"text-halo-color":new Ur(Oe.paint_symbol["text-halo-color"]),"text-halo-width":new Ur(Oe.paint_symbol["text-halo-width"]),"text-halo-blur":new Ur(Oe.paint_symbol["text-halo-blur"]),"text-translate":new Fr(Oe.paint_symbol["text-translate"]),"text-translate-anchor":new Fr(Oe.paint_symbol["text-translate-anchor"])}),layout:i4},kf=function(S){this.type=S.property.overrides?S.property.overrides.runtimeType:mt,this.defaultValue=S};kf.prototype.evaluate=function(S){if(S.formattedSection){var z=this.defaultValue.property.overrides;if(z&&z.hasOverride(S.formattedSection))return z.getOverride(S.formattedSection)}return S.feature&&S.featureState?this.defaultValue.evaluate(S.feature,S.featureState):this.defaultValue.property.specification.default},kf.prototype.eachChild=function(S){this.defaultValue.isConstant()||S(this.defaultValue.value._styleExpression.expression)},kf.prototype.outputDefined=function(){return!1},kf.prototype.serialize=function(){return null},Cr("FormatSectionOverride",kf,{omit:["defaultValue"]});var a4=function(S){function z(Z){S.call(this,Z,z1)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.recalculate=function(Z,le){if(S.prototype.recalculate.call(this,Z,le),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 ke=this.layout.get("text-writing-mode");if(ke){for(var Ie=[],qe=0,it=ke;qe",targetMapId:le,sourceMapId:Ie.mapId})}}},Af.prototype.receive=function(S){var z=S.data,Z=z.id;if(Z&&(!z.targetMapId||this.mapId===z.targetMapId))if(z.type===""){delete this.tasks[Z];var le=this.cancelCallbacks[Z];delete this.cancelCallbacks[Z],le&&le()}else L()||z.mustQueue?(this.tasks[Z]=z,this.taskQueue.push(Z),this.invoker.trigger()):this.processTask(Z,z)},Af.prototype.process=function(){if(this.taskQueue.length){var S=this.taskQueue.shift(),z=this.tasks[S];delete this.tasks[S],this.taskQueue.length&&this.invoker.trigger(),z&&this.processTask(S,z)}},Af.prototype.processTask=function(S,z){var Z=this;if(z.type===""){var le=this.callbacks[S];delete this.callbacks[S],le&&(z.error?le(il(z.error)):le(null,il(z.data)))}else{var ke=!1,Ie=R(this.globalScope)?void 0:[],qe=z.hasCallback?function(Rt,Ht){ke=!0,delete Z.cancelCallbacks[S],Z.target.postMessage({id:S,type:"",sourceMapId:Z.mapId,error:Rt?rl(Rt):null,data:rl(Ht,Ie)},Ie)}:function(Rt){ke=!0},it=null,dt=il(z.data);if(this.parent[z.type])it=this.parent[z.type](z.sourceMapId,dt,qe);else if(this.parent.getWorkerSource){var St=z.type.split(".");it=this.parent.getWorkerSource(z.sourceMapId,St[0],dt.source)[St[1]](dt,qe)}else qe(new Error("Could not find function "+z.type));!ke&&it&&it.cancel&&(this.cancelCallbacks[S]=it.cancel)}},Af.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var ka=function(S,z){S&&(z?this.setSouthWest(S).setNorthEast(z):S.length===4?this.setSouthWest([S[0],S[1]]).setNorthEast([S[2],S[3]]):this.setSouthWest(S[0]).setNorthEast(S[1]))};ka.prototype.setNorthEast=function(S){return this._ne=S instanceof Gi?new Gi(S.lng,S.lat):Gi.convert(S),this},ka.prototype.setSouthWest=function(S){return this._sw=S instanceof Gi?new Gi(S.lng,S.lat):Gi.convert(S),this},ka.prototype.extend=function(S){var z,Z,le=this._sw,ke=this._ne;if(S instanceof Gi)z=S,Z=S;else{if(!(S instanceof ka)){if(Array.isArray(S)){if(S.length===4||S.every(Array.isArray)){var Ie=S;return this.extend(ka.convert(Ie))}var qe=S;return this.extend(Gi.convert(qe))}return this}if(z=S._sw,Z=S._ne,!z||!Z)return this}return le||ke?(le.lng=Math.min(z.lng,le.lng),le.lat=Math.min(z.lat,le.lat),ke.lng=Math.max(Z.lng,ke.lng),ke.lat=Math.max(Z.lat,ke.lat)):(this._sw=new Gi(z.lng,z.lat),this._ne=new Gi(Z.lng,Z.lat)),this},ka.prototype.getCenter=function(){return new Gi((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},ka.prototype.getSouthWest=function(){return this._sw},ka.prototype.getNorthEast=function(){return this._ne},ka.prototype.getNorthWest=function(){return new Gi(this.getWest(),this.getNorth())},ka.prototype.getSouthEast=function(){return new Gi(this.getEast(),this.getSouth())},ka.prototype.getWest=function(){return this._sw.lng},ka.prototype.getSouth=function(){return this._sw.lat},ka.prototype.getEast=function(){return this._ne.lng},ka.prototype.getNorth=function(){return this._ne.lat},ka.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},ka.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},ka.prototype.isEmpty=function(){return!(this._sw&&this._ne)},ka.prototype.contains=function(S){var z=Gi.convert(S),Z=z.lng,le=z.lat,ke=this._sw.lat<=le&&le<=this._ne.lat,Ie=this._sw.lng<=Z&&Z<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Ie=this._sw.lng>=Z&&Z>=this._ne.lng),ke&&Ie},ka.convert=function(S){return!S||S instanceof ka?S:new ka(S)};var ex=63710088e-1,Gi=function(S,z){if(isNaN(S)||isNaN(z))throw new Error("Invalid LngLat object: ("+S+", "+z+")");if(this.lng=+S,this.lat=+z,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Gi.prototype.wrap=function(){return new Gi(a(this.lng,-180,180),this.lat)},Gi.prototype.toArray=function(){return[this.lng,this.lat]},Gi.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Gi.prototype.distanceTo=function(S){var z=Math.PI/180,Z=this.lat*z,le=S.lat*z,ke=Math.sin(Z)*Math.sin(le)+Math.cos(Z)*Math.cos(le)*Math.cos((S.lng-this.lng)*z);return ex*Math.acos(Math.min(ke,1))},Gi.prototype.toBounds=function(S){S===void 0&&(S=0);var z=360*S/40075017,Z=z/Math.cos(Math.PI/180*this.lat);return new ka(new Gi(this.lng-Z,this.lat-z),new Gi(this.lng+Z,this.lat+z))},Gi.convert=function(S){if(S instanceof Gi)return S;if(Array.isArray(S)&&(S.length===2||S.length===3))return new Gi(Number(S[0]),Number(S[1]));if(!Array.isArray(S)&&typeof S=="object"&&S!==null)return new Gi(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 [, ]")};var tx=2*Math.PI*ex;function nx(S){return tx*Math.cos(S*Math.PI/180)}function rx(S){return(180+S)/360}function ix(S){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+S*Math.PI/360)))/360}function ax(S,z){return S/nx(z)}function F1(S){var z=180-360*S;return 360/Math.PI*Math.atan(Math.exp(z*Math.PI/180))-90}var Ic=function(S,z,Z){Z===void 0&&(Z=0),this.x=+S,this.y=+z,this.z=+Z};Ic.fromLngLat=function(S,z){z===void 0&&(z=0);var Z=Gi.convert(S);return new Ic(rx(Z.lng),ix(Z.lat),ax(z,Z.lat))},Ic.prototype.toLngLat=function(){return new Gi(360*this.x-180,F1(this.y))},Ic.prototype.toAltitude=function(){return S=this.z,z=this.y,S*nx(F1(z));var S,z},Ic.prototype.meterInMercatorCoordinateUnits=function(){return 1/tx*(S=F1(this.y),1/Math.cos(S*Math.PI/180));var S};var Rc=function(S,z,Z){this.z=S,this.x=z,this.y=Z,this.key=Sh(0,S,S,z,Z)};Rc.prototype.equals=function(S){return this.z===S.z&&this.x===S.x&&this.y===S.y},Rc.prototype.url=function(S,z){var Z,le,ke,Ie,qe,it=(Z=this.x,le=this.y,ke=this.z,Ie=Qy(256*Z,256*(le=Math.pow(2,ke)-le-1),ke),qe=Qy(256*(Z+1),256*(le+1),ke),Ie[0]+","+Ie[1]+","+qe[0]+","+qe[1]),dt=function(St,Rt,Ht){for(var Yt,Zt="",cn=St;cn>0;cn--)Zt+=(Rt&(Yt=1<this.canonical.z?new Aa(S,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Aa(S,this.wrap,S,this.canonical.x>>z,this.canonical.y>>z)},Aa.prototype.calculateScaledKey=function(S,z){var Z=this.canonical.z-S;return S>this.canonical.z?Sh(this.wrap*+z,S,this.canonical.z,this.canonical.x,this.canonical.y):Sh(this.wrap*+z,S,S,this.canonical.x>>Z,this.canonical.y>>Z)},Aa.prototype.isChildOf=function(S){if(S.wrap!==this.wrap)return!1;var z=this.canonical.z-S.canonical.z;return S.overscaledZ===0||S.overscaledZ>z&&S.canonical.y===this.canonical.y>>z},Aa.prototype.children=function(S){if(this.overscaledZ>=S)return[new Aa(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var z=this.canonical.z+1,Z=2*this.canonical.x,le=2*this.canonical.y;return[new Aa(z,this.wrap,z,Z,le),new Aa(z,this.wrap,z,Z+1,le),new Aa(z,this.wrap,z,Z,le+1),new Aa(z,this.wrap,z,Z+1,le+1)]},Aa.prototype.isLessThan=function(S){return this.wrapS.wrap)&&(this.overscaledZS.overscaledZ)&&(this.canonical.xS.canonical.x)&&this.canonical.y=this.dim+1||z<-1||z>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(z+1)*this.stride+(S+1)},Mu.prototype._unpackMapbox=function(S,z,Z){return(256*S*256+256*z+Z)/10-1e4},Mu.prototype._unpackTerrarium=function(S,z,Z){return 256*S+z+Z/256-32768},Mu.prototype.getPixels=function(){return new No({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Mu.prototype.backfillBorder=function(S,z,Z){if(this.dim!==S.dim)throw new Error("dem dimension mismatch");var le=z*this.dim,ke=z*this.dim+this.dim,Ie=Z*this.dim,qe=Z*this.dim+this.dim;switch(z){case-1:le=ke-1;break;case 1:ke=le+1}switch(Z){case-1:Ie=qe-1;break;case 1:qe=Ie+1}for(var it=-z*this.dim,dt=-Z*this.dim,St=Ie;St=0&&Rt[3]>=0&&it.insert(qe,Rt[0],Rt[1],Rt[2],Rt[3])}},Su.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new vf.VectorTile(new id(this.rawTileData)).layers,this.sourceLayerCoder=new vd(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Su.prototype.query=function(S,z,Z,le){var ke=this;this.loadVTLayers();for(var Ie=S.params||{},qe=Yr/S.tileSize/S.scale,it=El(Ie.filter),dt=S.queryGeometry,St=S.queryPadding*qe,Rt=lx(dt),Ht=this.grid.query(Rt.minX-St,Rt.minY-St,Rt.maxX+St,Rt.maxY+St),Yt=lx(S.cameraQueryGeometry),Zt=0,cn=this.grid3D.query(Yt.minX-St,Yt.minY-St,Yt.maxX+St,Yt.maxY+St,function(Kn,ar,ur,Er){return function(_r,Ir,Br,$r,jr){for(var Xr=0,Vr=_r;Xr=Nr.x&&jr>=Nr.y)return!0}var si=[new t(Ir,Br),new t(Ir,jr),new t($r,jr),new t($r,Br)];if(_r.length>2){for(var Qr=0,Di=si;Qr=0)return!0;return!1}(Ie,Ht)){var Yt=this.sourceLayerCoder.decode(Z),Zt=this.vtLayers[Yt].feature(le);if(ke.filter(new di(this.tileID.overscaledZ),Zt))for(var cn=this.getId(Zt,Yt),Tn=0;Tnle)ke=!1;else if(z)if(this.expirationTimege&&(S.getActor().send("enforceCacheSizeLimit",je),st=0)},s.clamp=o,s.clearTileCache=function(S){var z=self.caches.delete(De);S&&z.catch(S).then(function(){return S()})},s.clipLine=Hy,s.clone=function(S){var z=new ws(16);return z[0]=S[0],z[1]=S[1],z[2]=S[2],z[3]=S[3],z[4]=S[4],z[5]=S[5],z[6]=S[6],z[7]=S[7],z[8]=S[8],z[9]=S[9],z[10]=S[10],z[11]=S[11],z[12]=S[12],z[13]=S[13],z[14]=S[14],z[15]=S[15],z},s.clone$1=k,s.clone$2=function(S){var z=new ws(3);return z[0]=S[0],z[1]=S[1],z[2]=S[2],z},s.collisionCircleLayout=O5,s.config=X,s.create=function(){var S=new ws(16);return ws!=Float32Array&&(S[1]=0,S[2]=0,S[3]=0,S[4]=0,S[6]=0,S[7]=0,S[8]=0,S[9]=0,S[11]=0,S[12]=0,S[13]=0,S[14]=0),S[0]=1,S[5]=1,S[10]=1,S[15]=1,S},s.create$1=function(){var S=new ws(9);return ws!=Float32Array&&(S[1]=0,S[2]=0,S[3]=0,S[5]=0,S[6]=0,S[7]=0),S[0]=1,S[4]=1,S[8]=1,S},s.create$2=function(){var S=new ws(4);return ws!=Float32Array&&(S[1]=0,S[2]=0),S[0]=1,S[3]=1,S},s.createCommonjsModule=T,s.createExpression=wl,s.createLayout=Si,s.createStyleLayer=function(S){return S.type==="custom"?new c4(S):new f4[S.type](S)},s.cross=function(S,z,Z){var le=z[0],ke=z[1],Ie=z[2],qe=Z[0],it=Z[1],dt=Z[2];return S[0]=ke*dt-Ie*it,S[1]=Ie*qe-le*dt,S[2]=le*it-ke*qe,S},s.deepEqual=function S(z,Z){if(Array.isArray(z)){if(!Array.isArray(Z)||z.length!==Z.length)return!1;for(var le=0;le0&&(Ie=1/Math.sqrt(Ie)),S[0]=z[0]*Ie,S[1]=z[1]*Ie,S[2]=z[2]*Ie,S},s.number=Lr,s.offscreenCanvasSupported=ot,s.ortho=function(S,z,Z,le,ke,Ie,qe){var it=1/(z-Z),dt=1/(le-ke),St=1/(Ie-qe);return S[0]=-2*it,S[1]=0,S[2]=0,S[3]=0,S[4]=0,S[5]=-2*dt,S[6]=0,S[7]=0,S[8]=0,S[9]=0,S[10]=2*St,S[11]=0,S[12]=(z+Z)*it,S[13]=(ke+le)*dt,S[14]=(qe+Ie)*St,S[15]=1,S},s.parseGlyphPBF=function(S){return new id(S).readFields(H5,[])},s.pbf=id,s.performSymbolLayout=function(S,z,Z,le,ke,Ie,qe){S.createArrays();var it=512*S.overscaling;S.tilePixelRatio=Yr/it,S.compareText={},S.iconsNeedLinear=!1;var dt=S.layers[0].layout,St=S.layers[0]._unevaluatedLayout._values,Rt={};if(S.textSizeData.kind==="composite"){var Ht=S.textSizeData,Yt=Ht.minZoom,Zt=Ht.maxZoom;Rt.compositeTextSizes=[St["text-size"].possiblyEvaluate(new di(Yt),qe),St["text-size"].possiblyEvaluate(new di(Zt),qe)]}if(S.iconSizeData.kind==="composite"){var cn=S.iconSizeData,Tn=cn.minZoom,Fn=cn.maxZoom;Rt.compositeIconSizes=[St["icon-size"].possiblyEvaluate(new di(Tn),qe),St["icon-size"].possiblyEvaluate(new di(Fn),qe)]}Rt.layoutTextSize=St["text-size"].possiblyEvaluate(new di(S.zoom+1),qe),Rt.layoutIconSize=St["icon-size"].possiblyEvaluate(new di(S.zoom+1),qe),Rt.textMaxSize=St["text-size"].possiblyEvaluate(new di(18));for(var Dn=dt.get("text-line-height")*no,Gn=dt.get("text-rotation-alignment")==="map"&&dt.get("symbol-placement")!=="point",Yn=dt.get("text-keep-upright"),Kn=dt.get("text-size"),ar=function(){var _r=Er[ur],Ir=dt.get("text-font").evaluate(_r,{},qe).join(","),Br=Kn.evaluate(_r,{},qe),$r=Rt.layoutTextSize.evaluate(_r,{},qe),jr=Rt.layoutIconSize.evaluate(_r,{},qe),Xr={horizontal:{},vertical:void 0},Vr=_r.text,Nr=[0,0];if(Vr){var si=Vr.toString(),Qr=dt.get("text-letter-spacing").evaluate(_r,{},qe)*no,Di=function(ei){for(var pi=0,ra=ei;pi=Yr||Dh.y<0||Dh.y>=Yr||function(sa,zl,d4,Ju,W1,dx,Sd,eu,Ed,Fh,Cd,Ld,Z1,gx,Bh,vx,mx,yx,xx,bx,ks,Pd,_x,tu,g4){var wx,jc,Lf,Pf,Of,If=sa.addToLineVertexArray(zl,d4),Tx=0,kx=0,Ax=0,Mx=0,Y1=-1,X1=-1,Cu={},Sx=zn(""),$1=0,J1=0;if(eu._unevaluatedLayout.getValue("text-radial-offset")===void 0?($1=(wx=eu.layout.get("text-offset").evaluate(ks,{},tu).map(function(jh){return jh*no}))[0],J1=wx[1]):($1=eu.layout.get("text-radial-offset").evaluate(ks,{},tu)*no,J1=O1),sa.allowVerticalPlacement&&Ju.vertical){var Ex=eu.layout.get("text-rotate").evaluate(ks,{},tu)+90,v4=Ju.vertical;Pf=new pd(Ed,zl,Fh,Cd,Ld,v4,Z1,gx,Bh,Ex),Sd&&(Of=new pd(Ed,zl,Fh,Cd,Ld,Sd,mx,yx,Bh,Ex))}if(W1){var K1=eu.layout.get("icon-rotate").evaluate(ks,{}),Cx=eu.layout.get("icon-text-fit")!=="none",Lx=qy(W1,K1,_x,Cx),Q1=Sd?qy(Sd,K1,_x,Cx):void 0;Lf=new pd(Ed,zl,Fh,Cd,Ld,W1,mx,yx,!1,K1),Tx=4*Lx.length;var Px=sa.iconSizeData,Nh=null;Px.kind==="source"?(Nh=[Ql*eu.layout.get("icon-size").evaluate(ks,{})])[0]>Xu&&M(sa.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):Px.kind==="composite"&&((Nh=[Ql*Pd.compositeIconSizes[0].evaluate(ks,{},tu),Ql*Pd.compositeIconSizes[1].evaluate(ks,{},tu)])[0]>Xu||Nh[1]>Xu)&&M(sa.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),sa.addSymbols(sa.icon,Lx,Nh,bx,xx,ks,!1,zl,If.lineStartIndex,If.lineLength,-1,tu),Y1=sa.icon.placedSymbolArray.length-1,Q1&&(kx=4*Q1.length,sa.addSymbols(sa.icon,Q1,Nh,bx,xx,ks,Ts.vertical,zl,If.lineStartIndex,If.lineLength,-1,tu),X1=sa.icon.placedSymbolArray.length-1)}for(var Ox in Ju.horizontal){var Od=Ju.horizontal[Ox];if(!jc){Sx=zn(Od.text);var m4=eu.layout.get("text-rotate").evaluate(ks,{},tu);jc=new pd(Ed,zl,Fh,Cd,Ld,Od,Z1,gx,Bh,m4)}var Ix=Od.positionedLines.length===1;if(Ax+=Zy(sa,zl,Od,dx,eu,Bh,ks,vx,If,Ju.vertical?Ts.horizontal:Ts.horizontalOnly,Ix?Object.keys(Ju.horizontal):[Ox],Cu,Y1,Pd,tu),Ix)break}Ju.vertical&&(Mx+=Zy(sa,zl,Ju.vertical,dx,eu,Bh,ks,vx,If,Ts.vertical,["vertical"],Cu,X1,Pd,tu));var y4=jc?jc.boxStartIndex:sa.collisionBoxArray.length,x4=jc?jc.boxEndIndex:sa.collisionBoxArray.length,b4=Pf?Pf.boxStartIndex:sa.collisionBoxArray.length,_4=Pf?Pf.boxEndIndex:sa.collisionBoxArray.length,w4=Lf?Lf.boxStartIndex:sa.collisionBoxArray.length,T4=Lf?Lf.boxEndIndex:sa.collisionBoxArray.length,k4=Of?Of.boxStartIndex:sa.collisionBoxArray.length,A4=Of?Of.boxEndIndex:sa.collisionBoxArray.length,nu=-1,Id=function(jh,zx){return jh&&jh.circleDiameter?Math.max(jh.circleDiameter,zx):zx};nu=Id(jc,nu),nu=Id(Pf,nu),nu=Id(Lf,nu);var Rx=(nu=Id(Of,nu))>-1?1:0;Rx&&(nu*=g4/no),sa.glyphOffsetArray.length>=Li.MAX_GLYPHS&&M("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),ks.sortKey!==void 0&&sa.addToSortKeyRanges(sa.symbolInstances.length,ks.sortKey),sa.symbolInstances.emplaceBack(zl.x,zl.y,Cu.right>=0?Cu.right:-1,Cu.center>=0?Cu.center:-1,Cu.left>=0?Cu.left:-1,Cu.vertical||-1,Y1,X1,Sx,y4,x4,b4,_4,w4,T4,k4,A4,Fh,Ax,Mx,Tx,kx,Rx,0,Z1,$1,J1,nu)}(ei,Dh,p4,ra,Ri,Ji,Eu,ei.layers[0],ei.collisionBoxArray,pi.index,pi.sourceLayerIndex,ei.index,yd,N1,_d,Mo,xd,bd,wd,Rl,pi,Zi,ss,vo,mi)};if(Ch==="line")for(var Ef=0,Td=Hy(pi.geometry,0,0,Yr,Yr);Ef1){var Ih=X5(Bc,Sf,ra.vertical||ul,Ri,cl,Dc);Ih&&Fc(Bc,Ih)}}else if(pi.type==="Polygon")for(var Nc=0,Rh=T1(pi.geometry,0);Nc=kn.maxzoom||kn.visibility!=="none"&&(i(ln,this.zoom,Ge),(Ct[kn.id]=kn.createBucket({index:Qe.bucketLayerIDs.length,layers:ln,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Bt,sourceID:this.source})).populate(Wt,mt,this.tileID.canonical),Qe.bucketLayerIDs.push(ln.map(function(fn){return fn.id})))}}}var Wn=s.mapObject(mt.glyphDependencies,function(fn){return Object.keys(fn).map(Number)});Object.keys(Wn).length?nt.send("getGlyphs",{uid:this.uid,stacks:Wn},function(fn,hn){ut||(ut=fn,pt=hn,_n.call(Oe))}):pt={};var wn=Object.keys(mt.iconDependencies);wn.length?nt.send("getImages",{icons:wn,source:this.source,tileID:this.tileID,type:"icons"},function(fn,hn){ut||(ut=fn,bt=hn,_n.call(Oe))}):bt={};var on=Object.keys(mt.patternDependencies);function _n(){if(ut)return ht(ut);if(pt&&bt&&Lt){var fn=new l(pt),hn=new s.ImageAtlas(bt,Lt);for(var In in Ct){var Cn=Ct[In];Cn instanceof s.SymbolBucket?(i(Cn.layers,this.zoom,Ge),s.performSymbolLayout(Cn,pt,fn.positions,bt,hn.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):Cn.hasPattern&&(Cn instanceof s.LineBucket||Cn instanceof s.FillBucket||Cn instanceof s.FillExtrusionBucket)&&(i(Cn.layers,this.zoom,Ge),Cn.addFeatures(mt,this.tileID.canonical,hn.patternPositions))}this.status="done",ht(null,{buckets:s.values(Ct).filter(function(Nn){return!Nn.isEmpty()}),featureIndex:Qe,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:fn.image,imageAtlas:hn,glyphMap:this.returnDependencies?pt:null,iconMap:this.returnDependencies?bt:null,glyphPositions:this.returnDependencies?fn.positions:null})}}on.length?nt.send("getImages",{icons:on,source:this.source,tileID:this.tileID,type:"patterns"},function(fn,hn){ut||(ut=fn,Lt=hn,_n.call(Oe))}):Lt={},_n.call(this)};var n=function(Je,Ke,Ge,nt){this.actor=Je,this.layerIndex=Ke,this.availableImages=Ge,this.loadVectorData=nt||r,this.loading={},this.loaded={}};n.prototype.loadTile=function(Je,Ke){var Ge=this,nt=Je.uid;this.loading||(this.loading={});var ht=!!(Je&&Je.request&&Je.request.collectResourceTiming)&&new s.RequestPerformance(Je.request),Oe=this.loading[nt]=new t(Je);Oe.abort=this.loadVectorData(Je,function(Be,Qe){if(delete Ge.loading[nt],Be||!Qe)return Oe.status="done",Ge.loaded[nt]=Oe,Ke(Be);var ut=Qe.rawData,pt={};Qe.expires&&(pt.expires=Qe.expires),Qe.cacheControl&&(pt.cacheControl=Qe.cacheControl);var bt={};if(ht){var Lt=ht.finish();Lt&&(bt.resourceTiming=JSON.parse(JSON.stringify(Lt)))}Oe.vectorTile=Qe.vectorTile,Oe.parse(Qe.vectorTile,Ge.layerIndex,Ge.availableImages,Ge.actor,function(Ct,mt){if(Ct||!mt)return Ke(Ct);Ke(null,s.extend({rawTileData:ut.slice(0)},mt,pt,bt))}),Ge.loaded=Ge.loaded||{},Ge.loaded[nt]=Oe})},n.prototype.reloadTile=function(Je,Ke){var Ge=this,nt=this.loaded,ht=Je.uid,Oe=this;if(nt&&nt[ht]){var Be=nt[ht];Be.showCollisionBoxes=Je.showCollisionBoxes;var Qe=function(ut,pt){var bt=Be.reloadCallback;bt&&(delete Be.reloadCallback,Be.parse(Be.vectorTile,Oe.layerIndex,Ge.availableImages,Oe.actor,bt)),Ke(ut,pt)};Be.status==="parsing"?Be.reloadCallback=Qe:Be.status==="done"&&(Be.vectorTile?Be.parse(Be.vectorTile,this.layerIndex,this.availableImages,this.actor,Qe):Qe())}},n.prototype.abortTile=function(Je,Ke){var Ge=this.loading,nt=Je.uid;Ge&&Ge[nt]&&Ge[nt].abort&&(Ge[nt].abort(),delete Ge[nt]),Ke()},n.prototype.removeTile=function(Je,Ke){var Ge=this.loaded,nt=Je.uid;Ge&&Ge[nt]&&delete Ge[nt],Ke()};var o=s.window.ImageBitmap,a=function(){this.loaded={}};a.prototype.loadTile=function(Je,Ke){var Ge=Je.uid,nt=Je.encoding,ht=Je.rawImageData,Oe=o&&ht instanceof o?this.getImageData(ht):ht,Be=new s.DEMData(Ge,Oe,nt);this.loaded=this.loaded||{},this.loaded[Ge]=Be,Ke(null,Be)},a.prototype.getImageData=function(Je){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(Je.width,Je.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=Je.width,this.offscreenCanvas.height=Je.height,this.offscreenCanvasContext.drawImage(Je,0,0,Je.width,Je.height);var Ke=this.offscreenCanvasContext.getImageData(-1,-1,Je.width+2,Je.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new s.RGBAImage({width:Ke.width,height:Ke.height},Ke.data)},a.prototype.removeTile=function(Je){var Ke=this.loaded,Ge=Je.uid;Ke&&Ke[Ge]&&delete Ke[Ge]};var u=function Je(Ke,Ge){var nt,ht=Ke&&Ke.type;if(ht==="FeatureCollection")for(nt=0;nt=0!=!!Ke&&Je.reverse()}var b=s.vectorTile.VectorTileFeature.prototype.toGeoJSON,d=function(Je){this._feature=Je,this.extent=s.EXTENT,this.type=Je.type,this.properties=Je.tags,"id"in Je&&!isNaN(Je.id)&&(this.id=parseInt(Je.id,10))};d.prototype.loadGeometry=function(){if(this._feature.type===1){for(var Je=[],Ke=0,Ge=this._feature.geometry;Ke>31}function G(Je,Ke){for(var Ge=Je.loadGeometry(),nt=Je.type,ht=0,Oe=0,Be=Ge.length,Qe=0;Qe>1;V(Je,Ke,Be,nt,ht,Oe%2),j(Je,Ke,Ge,nt,Be-1,Oe+1),j(Je,Ke,Ge,Be+1,ht,Oe+1)}}function V(Je,Ke,Ge,nt,ht,Oe){for(;ht>nt;){if(ht-nt>600){var Be=ht-nt+1,Qe=Ge-nt+1,ut=Math.log(Be),pt=.5*Math.exp(2*ut/3),bt=.5*Math.sqrt(ut*pt*(Be-pt)/Be)*(Qe-Be/2<0?-1:1);V(Je,Ke,Ge,Math.max(nt,Math.floor(Ge-Qe*pt/Be+bt)),Math.min(ht,Math.floor(Ge+(Be-Qe)*pt/Be+bt)),Oe)}var Lt=Ke[2*Ge+Oe],Ct=nt,mt=ht;for(H(Je,Ke,nt,Ge),Ke[2*ht+Oe]>Lt&&H(Je,Ke,nt,ht);CtLt;)mt--}Ke[2*nt+Oe]===Lt?H(Je,Ke,nt,mt):H(Je,Ke,++mt,ht),mt<=Ge&&(nt=mt+1),Ge<=mt&&(ht=mt-1)}}function H(Je,Ke,Ge,nt){ee(Je,Ge,nt),ee(Ke,2*Ge,2*nt),ee(Ke,2*Ge+1,2*nt+1)}function ee(Je,Ke,Ge){var nt=Je[Ke];Je[Ke]=Je[Ge],Je[Ge]=nt}function Q(Je,Ke,Ge,nt){var ht=Je-Ge,Oe=Ke-nt;return ht*ht+Oe*Oe}h.fromVectorTileJs=M,h.fromGeojsonVt=A,h.GeoJSONWrapper=C;var X=function(Je){return Je[0]},Y=function(Je){return Je[1]},K=function(Je,Ke,Ge,nt,ht){Ke===void 0&&(Ke=X),Ge===void 0&&(Ge=Y),nt===void 0&&(nt=64),ht===void 0&&(ht=Float64Array),this.nodeSize=nt,this.points=Je;for(var Oe=Je.length<65536?Uint16Array:Uint32Array,Be=this.ids=new Oe(Je.length),Qe=this.coords=new ht(2*Je.length),ut=0;ut=Be&&Lt<=ut&&Ct>=Qe&&Ct<=pt&&Ot.push(ht[Wt]);else{var Gt=Math.floor((Bt+Pt)/2);Lt=Oe[2*Gt],Ct=Oe[2*Gt+1],Lt>=Be&&Lt<=ut&&Ct>=Qe&&Ct<=pt&&Ot.push(ht[Gt]);var Xt=(_t+1)%2;(_t===0?Be<=Lt:Qe<=Ct)&&(mt.push(Bt),mt.push(Gt-1),mt.push(Xt)),(_t===0?ut>=Lt:pt>=Ct)&&(mt.push(Gt+1),mt.push(Pt),mt.push(Xt))}}return Ot}(this.ids,this.coords,Je,Ke,Ge,nt,this.nodeSize)},K.prototype.within=function(Je,Ke,Ge){return function(nt,ht,Oe,Be,Qe,ut){for(var pt=[0,nt.length-1,0],bt=[],Lt=Qe*Qe;pt.length;){var Ct=pt.pop(),mt=pt.pop(),Ot=pt.pop();if(mt-Ot<=ut)for(var _t=Ot;_t<=mt;_t++)Q(ht[2*_t],ht[2*_t+1],Oe,Be)<=Lt&&bt.push(nt[_t]);else{var Pt=Math.floor((Ot+mt)/2),Bt=ht[2*Pt],Wt=ht[2*Pt+1];Q(Bt,Wt,Oe,Be)<=Lt&&bt.push(nt[Pt]);var Gt=(Ct+1)%2;(Ct===0?Oe-Qe<=Bt:Be-Qe<=Wt)&&(pt.push(Ot),pt.push(Pt-1),pt.push(Gt)),(Ct===0?Oe+Qe>=Bt:Be+Qe>=Wt)&&(pt.push(Pt+1),pt.push(mt),pt.push(Gt))}}return bt}(this.ids,this.coords,Je,Ke,Ge,this.nodeSize)};var te={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(Je){return Je}},ae=function(Je){this.options=he(Object.create(te),Je),this.trees=new Array(this.options.maxZoom+1)};function oe(Je,Ke,Ge,nt,ht){return{x:Je,y:Ke,zoom:1/0,id:Ge,parentId:-1,numPoints:nt,properties:ht}}function se(Je,Ke){var Ge=Je.geometry.coordinates,nt=Ge[0],ht=Ge[1];return{x:pe(nt),y:de(ht),zoom:1/0,index:Ke,parentId:-1}}function fe(Je){return{type:"Feature",id:Je.id,properties:ye(Je),geometry:{type:"Point",coordinates:[(nt=Je.x,360*(nt-.5)),(Ke=Je.y,Ge=(180-360*Ke)*Math.PI/180,360*Math.atan(Math.exp(Ge))/Math.PI-90)]}};var Ke,Ge,nt}function ye(Je){var Ke=Je.numPoints,Ge=Ke>=1e4?Math.round(Ke/1e3)+"k":Ke>=1e3?Math.round(Ke/100)/10+"k":Ke;return he(he({},Je.properties),{cluster:!0,cluster_id:Je.id,point_count:Ke,point_count_abbreviated:Ge})}function pe(Je){return Je/360+.5}function de(Je){var Ke=Math.sin(Je*Math.PI/180),Ge=.5-.25*Math.log((1+Ke)/(1-Ke))/Math.PI;return Ge<0?0:Ge>1?1:Ge}function he(Je,Ke){for(var Ge in Ke)Je[Ge]=Ke[Ge];return Je}function xe(Je){return Je.x}function Re(Je){return Je.y}function we(Je,Ke,Ge,nt){for(var ht,Oe=nt,Be=Ge-Ke>>1,Qe=Ge-Ke,ut=Je[Ke],pt=Je[Ke+1],bt=Je[Ge],Lt=Je[Ge+1],Ct=Ke+3;CtOe)ht=Ct,Oe=mt;else if(mt===Oe){var Ot=Math.abs(Ct-Be);Otnt&&(ht-Ke>3&&we(Je,Ke,ht,nt),Je[ht+2]=Oe,Ge-ht>3&&we(Je,ht,Ge,nt))}function Ae(Je,Ke,Ge,nt,ht,Oe){var Be=ht-Ge,Qe=Oe-nt;if(Be!==0||Qe!==0){var ut=((Je-Ge)*Be+(Ke-nt)*Qe)/(Be*Be+Qe*Qe);ut>1?(Ge=ht,nt=Oe):ut>0&&(Ge+=Be*ut,nt+=Qe*ut)}return(Be=Je-Ge)*Be+(Qe=Ke-nt)*Qe}function Me(Je,Ke,Ge,nt){var ht={id:Je===void 0?null:Je,type:Ke,geometry:Ge,tags:nt,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(Oe){var Be=Oe.geometry,Qe=Oe.type;if(Qe==="Point"||Qe==="MultiPoint"||Qe==="LineString")Ce(Oe,Be);else if(Qe==="Polygon"||Qe==="MultiLineString")for(var ut=0;ut0&&(Be+=nt?(ht*pt-ut*Oe)/2:Math.sqrt(Math.pow(ut-ht,2)+Math.pow(pt-Oe,2))),ht=ut,Oe=pt}var bt=Ke.length-3;Ke[2]=1,we(Ke,0,bt,Ge),Ke[bt+2]=1,Ke.size=Math.abs(Be),Ke.start=0,Ke.end=Ke.size}function Te(Je,Ke,Ge,nt){for(var ht=0;ht1?1:Ge}function De(Je,Ke,Ge,nt,ht,Oe,Be,Qe){if(nt/=Ke,Oe>=(Ge/=Ke)&&Be=nt)return null;for(var ut=[],pt=0;pt=Ge&&Ot=nt)){var _t=[];if(Ct==="Point"||Ct==="MultiPoint")je(Lt,_t,Ge,nt,ht);else if(Ct==="LineString")ge(Lt,_t,Ge,nt,ht,!1,Qe.lineMetrics);else if(Ct==="MultiLineString")Se(Lt,_t,Ge,nt,ht,!1);else if(Ct==="Polygon")Se(Lt,_t,Ge,nt,ht,!0);else if(Ct==="MultiPolygon")for(var Pt=0;Pt=Ge&&Be<=nt&&(Ke.push(Je[Oe]),Ke.push(Je[Oe+1]),Ke.push(Je[Oe+2]))}}function ge(Je,Ke,Ge,nt,ht,Oe,Be){for(var Qe,ut,pt=be(Je),bt=ht===0?Ye:Ze,Lt=Je.start,Ct=0;CtGe&&(ut=bt(pt,mt,Ot,Pt,Bt,Ge),Be&&(pt.start=Lt+Qe*ut)):Wt>nt?Gt=Ge&&(ut=bt(pt,mt,Ot,Pt,Bt,Ge),Xt=!0),Gt>nt&&Wt<=nt&&(ut=bt(pt,mt,Ot,Pt,Bt,nt),Xt=!0),!Oe&&Xt&&(Be&&(pt.end=Lt+Qe*ut),Ke.push(pt),pt=be(Je)),Be&&(Lt+=Qe)}var Kt=Je.length-3;mt=Je[Kt],Ot=Je[Kt+1],_t=Je[Kt+2],(Wt=ht===0?mt:Ot)>=Ge&&Wt<=nt&&Ne(pt,mt,Ot,_t),Kt=pt.length-3,Oe&&Kt>=3&&(pt[Kt]!==pt[0]||pt[Kt+1]!==pt[1])&&Ne(pt,pt[0],pt[1],pt[2]),pt.length&&Ke.push(pt)}function be(Je){var Ke=[];return Ke.size=Je.size,Ke.start=Je.start,Ke.end=Je.end,Ke}function Se(Je,Ke,Ge,nt,ht,Oe){for(var Be=0;BeBe.maxX&&(Be.maxX=bt),Lt>Be.maxY&&(Be.maxY=Lt)}return Be}function Tt(Je,Ke,Ge,nt){var ht=Ke.geometry,Oe=Ke.type,Be=[];if(Oe==="Point"||Oe==="MultiPoint")for(var Qe=0;Qe0&&Ke.size<(ht?Be:nt))Ge.numPoints+=Ke.length/3;else{for(var Qe=[],ut=0;utBe)&&(Ge.numSimplified++,Qe.push(Ke[ut]),Qe.push(Ke[ut+1])),Ge.numPoints++;ht&&function(pt,bt){for(var Lt=0,Ct=0,mt=pt.length,Ot=mt-2;Ct0===bt)for(Ct=0,mt=pt.length;Ct24)throw new Error("maxZoom should be in the 0-24 range");if(Ke.promoteId&&Ke.generateId)throw new Error("promoteId and generateId cannot be used together.");var nt=function(ht,Oe){var Be=[];if(ht.type==="FeatureCollection")for(var Qe=0;Qe=nt;pt--){var bt=+Date.now();Qe=this._cluster(Qe,pt),this.trees[pt]=new K(Qe,xe,Re,Oe,Float32Array),Ge&&console.log("z%d: %d clusters in %dms",pt,Qe.length,+Date.now()-bt)}return Ge&&console.timeEnd("total time"),this},ae.prototype.getClusters=function(Je,Ke){var Ge=((Je[0]+180)%360+360)%360-180,nt=Math.max(-90,Math.min(90,Je[1])),ht=Je[2]===180?180:((Je[2]+180)%360+360)%360-180,Oe=Math.max(-90,Math.min(90,Je[3]));if(Je[2]-Je[0]>=360)Ge=-180,ht=180;else if(Ge>ht){var Be=this.getClusters([Ge,nt,180,Oe],Ke),Qe=this.getClusters([-180,nt,ht,Oe],Ke);return Be.concat(Qe)}for(var ut=this.trees[this._limitZoom(Ke)],pt=[],bt=0,Lt=ut.range(pe(Ge),de(Oe),pe(ht),de(nt));bt1?this._map(pt,!0):null,Pt=(ut<<5)+(Ke+1)+this.points.length,Bt=0,Wt=Lt;Bt>5},ae.prototype._getOriginZoom=function(Je){return(Je-this.points.length)%32},ae.prototype._map=function(Je,Ke){if(Je.numPoints)return Ke?he({},Je.properties):Je.properties;var Ge=this.points[Je.index].properties,nt=this.options.map(Ge);return Ke&&nt===Ge?he({},nt):nt},Dt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Dt.prototype.splitTile=function(Je,Ke,Ge,nt,ht,Oe,Be){for(var Qe=[Je,Ke,Ge,nt],ut=this.options,pt=ut.debug;Qe.length;){nt=Qe.pop(),Ge=Qe.pop(),Ke=Qe.pop(),Je=Qe.pop();var bt=1<1&&console.time("creation"),Ct=this.tiles[Lt]=Et(Je,Ke,Ge,nt,ut),this.tileCoords.push({z:Ke,x:Ge,y:nt}),pt)){pt>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Ke,Ge,nt,Ct.numFeatures,Ct.numPoints,Ct.numSimplified),console.timeEnd("creation"));var mt="z"+Ke;this.stats[mt]=(this.stats[mt]||0)+1,this.total++}if(Ct.source=Je,ht){if(Ke===ut.maxZoom||Ke===ht)continue;var Ot=1<1&&console.time("clipping");var _t,Pt,Bt,Wt,Gt,Xt,Kt=.5*ut.buffer/ut.extent,nn=.5-Kt,yn=.5+Kt,ln=1+Kt;_t=Pt=Bt=Wt=null,Gt=De(Je,bt,Ge-Kt,Ge+yn,0,Ct.minX,Ct.maxX,ut),Xt=De(Je,bt,Ge+nn,Ge+ln,0,Ct.minX,Ct.maxX,ut),Je=null,Gt&&(_t=De(Gt,bt,nt-Kt,nt+yn,1,Ct.minY,Ct.maxY,ut),Pt=De(Gt,bt,nt+nn,nt+ln,1,Ct.minY,Ct.maxY,ut),Gt=null),Xt&&(Bt=De(Xt,bt,nt-Kt,nt+yn,1,Ct.minY,Ct.maxY,ut),Wt=De(Xt,bt,nt+nn,nt+ln,1,Ct.minY,Ct.maxY,ut),Xt=null),pt>1&&console.timeEnd("clipping"),Qe.push(_t||[],Ke+1,2*Ge,2*nt),Qe.push(Pt||[],Ke+1,2*Ge,2*nt+1),Qe.push(Bt||[],Ke+1,2*Ge+1,2*nt),Qe.push(Wt||[],Ke+1,2*Ge+1,2*nt+1)}}},Dt.prototype.getTile=function(Je,Ke,Ge){var nt=this.options,ht=nt.extent,Oe=nt.debug;if(Je<0||Je>24)return null;var Be=1<1&&console.log("drilling down to z%d-%d-%d",Je,Ke,Ge);for(var ut,pt=Je,bt=Ke,Lt=Ge;!ut&&pt>0;)pt--,bt=Math.floor(bt/2),Lt=Math.floor(Lt/2),ut=this.tiles[It(pt,bt,Lt)];return ut&&ut.source?(Oe>1&&console.log("found parent tile z%d-%d-%d",pt,bt,Lt),Oe>1&&console.time("drilling down"),this.splitTile(ut.source,pt,bt,Lt,Je,Ke,Ge),Oe>1&&console.timeEnd("drilling down"),this.tiles[Qe]?ft(this.tiles[Qe],ht):null):null};var qt=function(Je){function Ke(Ge,nt,ht,Oe){Je.call(this,Ge,nt,ht,Ft),Oe&&(this.loadGeoJSON=Oe)}return Je&&(Ke.__proto__=Je),Ke.prototype=Object.create(Je&&Je.prototype),Ke.prototype.constructor=Ke,Ke.prototype.loadData=function(Ge,nt){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=nt,this._pendingLoadDataParams=Ge,this._state&&this._state!=="Idle"?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},Ke.prototype._loadData=function(){var Ge=this;if(this._pendingCallback&&this._pendingLoadDataParams){var nt=this._pendingCallback,ht=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var Oe=!!(ht&&ht.request&&ht.request.collectResourceTiming)&&new s.RequestPerformance(ht.request);this.loadGeoJSON(ht,function(Be,Qe){if(Be||!Qe)return nt(Be);if(typeof Qe!="object")return nt(new Error("Input data given to '"+ht.source+"' is not a valid GeoJSON object."));u(Qe,!0);try{Ge._geoJSONIndex=ht.cluster?new ae(function(bt){var Lt=bt.superclusterOptions,Ct=bt.clusterProperties;if(!Ct||!Lt)return Lt;for(var mt={},Ot={},_t={accumulated:null,zoom:0},Pt={properties:null},Bt=Object.keys(Ct),Wt=0,Gt=Bt;Wt=0?0:q.button},y.remove=function(q){q.parentNode&&q.parentNode.removeChild(q)};var p=function(q){function $(){q.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new s.RGBAImage({width:1,height:1}),this.dirty=!0}return q&&($.__proto__=q),$.prototype=Object.create(q&&q.prototype),$.prototype.constructor=$,$.prototype.isLoaded=function(){return this.loaded},$.prototype.setLoaded=function(W){if(this.loaded!==W&&(this.loaded=W,W)){for(var ie=0,_e=this.requestors;ie<_e.length;ie+=1){var ze=_e[ie],He=ze.ids,Xe=ze.callback;this._notify(He,Xe)}this.requestors=[]}},$.prototype.getImage=function(W){return this.images[W]},$.prototype.addImage=function(W,ie){this._validate(W,ie)&&(this.images[W]=ie)},$.prototype._validate=function(W,ie){var _e=!0;return this._validateStretch(ie.stretchX,ie.data&&ie.data.width)||(this.fire(new s.ErrorEvent(new Error('Image "'+W+'" has invalid "stretchX" value'))),_e=!1),this._validateStretch(ie.stretchY,ie.data&&ie.data.height)||(this.fire(new s.ErrorEvent(new Error('Image "'+W+'" has invalid "stretchY" value'))),_e=!1),this._validateContent(ie.content,ie)||(this.fire(new s.ErrorEvent(new Error('Image "'+W+'" has invalid "content" value'))),_e=!1),_e},$.prototype._validateStretch=function(W,ie){if(!W)return!0;for(var _e=0,ze=0,He=W;ze=0?1.2:1))}function x(q,$,W,ie,_e,ze,He){for(var Xe=0;Xe<$;Xe++){for(var at=0;at65535)wt(new Error("glyphs > 65535 not supported"));else if(ve.ranges[Fe])wt(null,{stack:At,id:re,glyph:Le});else{var Ve=ve.requests[Fe];Ve||(Ve=ve.requests[Fe]=[],m.loadGlyphRange(At,Fe,W.url,W.requestManager,function(We,$e){if($e){for(var tt in $e)W._doesCharSupportLocalGlyph(+tt)||(ve.glyphs[+tt]=$e[+tt]);ve.ranges[Fe]=!0}for(var lt=0,gt=Ve;lt1&&(at=q[++Xe]);var At=Math.abs(wt-at.left),re=Math.abs(wt-at.right),ve=Math.min(At,re),Le=void 0,Fe=_e/W*(ie+1);if(at.isDash){var Ve=ie-Math.abs(Fe);Le=Math.sqrt(ve*ve+Ve*Ve)}else Le=ie-Math.sqrt(ve*ve+Fe*Fe);this.data[He+wt]=Math.max(0,Math.min(255,Le+128))}},C.prototype.addRegularDash=function(q){for(var $=q.length-1;$>=0;--$){var W=q[$],ie=q[$+1];W.zeroLength?q.splice($,1):ie&&ie.isDash===W.isDash&&(ie.left=W.left,q.splice($,1))}var _e=q[0],ze=q[q.length-1];_e.isDash===ze.isDash&&(_e.left=ze.left-this.width,ze.right=_e.right+this.width);for(var He=this.width*this.nextRow,Xe=0,at=q[Xe],wt=0;wt1&&(at=q[++Xe]);var At=Math.abs(wt-at.left),re=Math.abs(wt-at.right),ve=Math.min(At,re),Le=at.isDash?ve:-ve;this.data[He+wt]=Math.max(0,Math.min(255,Le+128))}},C.prototype.addDash=function(q,$){var W=$?7:0,ie=2*W+1;if(this.nextRow+ie>this.height)return s.warnOnce("LineAtlas out of space"),null;for(var _e=0,ze=0;ze=W&&q.x<_e&&q.y>=ie&&q.y0&&(wt[new s.OverscaledTileID(W.overscaledZ,He,ie.z,ze,ie.y-1).key]={backfilled:!1},wt[new s.OverscaledTileID(W.overscaledZ,W.wrap,ie.z,ie.x,ie.y-1).key]={backfilled:!1},wt[new s.OverscaledTileID(W.overscaledZ,at,ie.z,Xe,ie.y-1).key]={backfilled:!1}),ie.y+1<_e&&(wt[new s.OverscaledTileID(W.overscaledZ,He,ie.z,ze,ie.y+1).key]={backfilled:!1},wt[new s.OverscaledTileID(W.overscaledZ,W.wrap,ie.z,ie.x,ie.y+1).key]={backfilled:!1},wt[new s.OverscaledTileID(W.overscaledZ,at,ie.z,Xe,ie.y+1).key]={backfilled:!1}),wt},$.prototype.unloadTile=function(W){W.demTexture&&this.map.painter.saveTileTexture(W.demTexture),W.fbo&&(W.fbo.destroy(),delete W.fbo),W.dem&&delete W.dem,delete W.neighboringTiles,W.state="unloaded",W.actor&&W.actor.send("removeDEMTile",{uid:W.uid,source:this.id})},$}(U),G=function(q){function $(W,ie,_e,ze){q.call(this),this.id=W,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._loaded=!1,this.actor=_e.getActor(),this.setEventedParent(ze),this._data=ie.data,this._options=s.extend({},ie),this._collectResourceTiming=ie.collectResourceTiming,this._resourceTiming=[],ie.maxzoom!==void 0&&(this.maxzoom=ie.maxzoom),ie.type&&(this.type=ie.type),ie.attribution&&(this.attribution=ie.attribution),this.promoteId=ie.promoteId;var He=s.EXTENT/this.tileSize;this.workerOptions=s.extend({source:this.id,cluster:ie.cluster||!1,geojsonVtOptions:{buffer:(ie.buffer!==void 0?ie.buffer:128)*He,tolerance:(ie.tolerance!==void 0?ie.tolerance:.375)*He,extent:s.EXTENT,maxZoom:this.maxzoom,lineMetrics:ie.lineMetrics||!1,generateId:ie.generateId||!1},superclusterOptions:{maxZoom:ie.clusterMaxZoom!==void 0?Math.min(ie.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,extent:s.EXTENT,radius:(ie.clusterRadius||50)*He,log:!1,generateId:ie.generateId||!1},clusterProperties:ie.clusterProperties},ie.workerOptions)}return q&&($.__proto__=q),$.prototype=Object.create(q&&q.prototype),$.prototype.constructor=$,$.prototype.load=function(){var W=this;this.fire(new s.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(ie){if(ie)W.fire(new s.ErrorEvent(ie));else{var _e={dataType:"source",sourceDataType:"metadata"};W._collectResourceTiming&&W._resourceTiming&&W._resourceTiming.length>0&&(_e.resourceTiming=W._resourceTiming,W._resourceTiming=[]),W.fire(new s.Event("data",_e))}})},$.prototype.onAdd=function(W){this.map=W,this.load()},$.prototype.setData=function(W){var ie=this;return this._data=W,this.fire(new s.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(_e){if(_e)ie.fire(new s.ErrorEvent(_e));else{var ze={dataType:"source",sourceDataType:"content"};ie._collectResourceTiming&&ie._resourceTiming&&ie._resourceTiming.length>0&&(ze.resourceTiming=ie._resourceTiming,ie._resourceTiming=[]),ie.fire(new s.Event("data",ze))}}),this},$.prototype.getClusterExpansionZoom=function(W,ie){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:W,source:this.id},ie),this},$.prototype.getClusterChildren=function(W,ie){return this.actor.send("geojson.getClusterChildren",{clusterId:W,source:this.id},ie),this},$.prototype.getClusterLeaves=function(W,ie,_e,ze){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:W,limit:ie,offset:_e},ze),this},$.prototype._updateWorkerData=function(W){var ie=this;this._loaded=!1;var _e=s.extend({},this.workerOptions),ze=this._data;typeof ze=="string"?(_e.request=this.map._requestManager.transformRequest(s.browser.resolveURL(ze),s.ResourceType.Source),_e.request.collectResourceTiming=this._collectResourceTiming):_e.data=JSON.stringify(ze),this.actor.send(this.type+".loadData",_e,function(He,Xe){ie._removed||Xe&&Xe.abandoned||(ie._loaded=!0,Xe&&Xe.resourceTiming&&Xe.resourceTiming[ie.id]&&(ie._resourceTiming=Xe.resourceTiming[ie.id].slice(0)),ie.actor.send(ie.type+".coalesce",{source:_e.source},null),W(He))})},$.prototype.loaded=function(){return this._loaded},$.prototype.loadTile=function(W,ie){var _e=this,ze=W.actor?"reloadTile":"loadTile";W.actor=this.actor;var He={type:this.type,uid:W.uid,tileID:W.tileID,zoom:W.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:s.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};W.request=this.actor.send(ze,He,function(Xe,at){return delete W.request,W.unloadVectorData(),W.aborted?ie(null):Xe?ie(Xe):(W.loadVectorData(at,_e.map.painter,ze==="reloadTile"),ie(null))})},$.prototype.abortTile=function(W){W.request&&(W.request.cancel(),delete W.request),W.aborted=!0},$.prototype.unloadTile=function(W){W.unloadVectorData(),this.actor.send("removeTile",{uid:W.uid,type:this.type,source:this.id})},$.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},$.prototype.serialize=function(){return s.extend({},this._options,{type:this.type,data:this._data})},$.prototype.hasTransition=function(){return!1},$}(s.Evented),N=s.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),j=function(q){function $(W,ie,_e,ze){q.call(this),this.id=W,this.dispatcher=_e,this.coordinates=ie.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(ze),this.options=ie}return q&&($.__proto__=q),$.prototype=Object.create(q&&q.prototype),$.prototype.constructor=$,$.prototype.load=function(W,ie){var _e=this;this._loaded=!1,this.fire(new s.Event("dataloading",{dataType:"source"})),this.url=this.options.url,s.getImage(this.map._requestManager.transformRequest(this.url,s.ResourceType.Image),function(ze,He){_e._loaded=!0,ze?_e.fire(new s.ErrorEvent(ze)):He&&(_e.image=He,W&&(_e.coordinates=W),ie&&ie(),_e._finishLoading())})},$.prototype.loaded=function(){return this._loaded},$.prototype.updateImage=function(W){var ie=this;return this.image&&W.url?(this.options.url=W.url,this.load(W.coordinates,function(){ie.texture=null}),this):this},$.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new s.Event("data",{dataType:"source",sourceDataType:"metadata"})))},$.prototype.onAdd=function(W){this.map=W,this.load()},$.prototype.setCoordinates=function(W){var ie=this;this.coordinates=W;var _e=W.map(s.MercatorCoordinate.fromLngLat);this.tileID=function(He){for(var Xe=1/0,at=1/0,wt=-1/0,At=-1/0,re=0,ve=He;reie.end(0)?this.fire(new s.ErrorEvent(new s.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+ie.start(0)+" and "+ie.end(0)+"-second mark."))):this.video.currentTime=W}},$.prototype.getVideo=function(){return this.video},$.prototype.onAdd=function(W){this.map||(this.map=W,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},$.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var W=this.map.painter.context,ie=W.gl;for(var _e in this.boundsBuffer||(this.boundsBuffer=W.createVertexBuffer(this._boundsArray,N.members)),this.boundsSegments||(this.boundsSegments=s.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE),ie.texSubImage2D(ie.TEXTURE_2D,0,0,0,ie.RGBA,ie.UNSIGNED_BYTE,this.video)):(this.texture=new s.Texture(W,this.video,ie.RGBA),this.texture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE)),this.tiles){var ze=this.tiles[_e];ze.state!=="loaded"&&(ze.state="loaded",ze.texture=this.texture)}}},$.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},$.prototype.hasTransition=function(){return this.video&&!this.video.paused},$}(j),H=function(q){function $(W,ie,_e,ze){q.call(this,W,ie,_e,ze),ie.coordinates?Array.isArray(ie.coordinates)&&ie.coordinates.length===4&&!ie.coordinates.some(function(He){return!Array.isArray(He)||He.length!==2||He.some(function(Xe){return typeof Xe!="number"})})||this.fire(new s.ErrorEvent(new s.ValidationError("sources."+W,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new s.ErrorEvent(new s.ValidationError("sources."+W,null,'missing required property "coordinates"'))),ie.animate&&typeof ie.animate!="boolean"&&this.fire(new s.ErrorEvent(new s.ValidationError("sources."+W,null,'optional "animate" property must be a boolean value'))),ie.canvas?typeof ie.canvas=="string"||ie.canvas instanceof s.window.HTMLCanvasElement||this.fire(new s.ErrorEvent(new s.ValidationError("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 s.ErrorEvent(new s.ValidationError("sources."+W,null,'missing required property "canvas"'))),this.options=ie,this.animate=ie.animate===void 0||ie.animate}return q&&($.__proto__=q),$.prototype=Object.create(q&&q.prototype),$.prototype.constructor=$,$.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof s.window.HTMLCanvasElement?this.options.canvas:s.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new s.ErrorEvent(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())},$.prototype.getCanvas=function(){return this.canvas},$.prototype.onAdd=function(W){this.map=W,this.load(),this.canvas&&this.animate&&this.play()},$.prototype.onRemove=function(){this.pause()},$.prototype.prepare=function(){var 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){var ie=this.map.painter.context,_e=ie.gl;for(var ze in this.boundsBuffer||(this.boundsBuffer=ie.createVertexBuffer(this._boundsArray,N.members)),this.boundsSegments||(this.boundsSegments=s.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(W||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new s.Texture(ie,this.canvas,_e.RGBA,{premultiply:!0}),this.tiles){var He=this.tiles[ze];He.state!=="loaded"&&(He.state="loaded",He.texture=this.texture)}}},$.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},$.prototype.hasTransition=function(){return this._playing},$.prototype._hasInvalidDimensions=function(){for(var W=0,ie=[this.canvas.width,this.canvas.height];Wthis.max){var He=this._getAndRemoveByKey(this.order[0]);He&&this.onRemove(He)}return this},K.prototype.has=function(q){return q.wrapped().key in this.data},K.prototype.getAndRemove=function(q){return this.has(q)?this._getAndRemoveByKey(q.wrapped().key):null},K.prototype._getAndRemoveByKey=function(q){var $=this.data[q].shift();return $.timeout&&clearTimeout($.timeout),this.data[q].length===0&&delete this.data[q],this.order.splice(this.order.indexOf(q),1),$.value},K.prototype.getByKey=function(q){var $=this.data[q];return $?$[0].value:null},K.prototype.get=function(q){return this.has(q)?this.data[q.wrapped().key][0].value:null},K.prototype.remove=function(q,$){if(!this.has(q))return this;var W=q.wrapped().key,ie=$===void 0?0:this.data[W].indexOf($),_e=this.data[W][ie];return this.data[W].splice(ie,1),_e.timeout&&clearTimeout(_e.timeout),this.data[W].length===0&&delete this.data[W],this.onRemove(_e.value),this.order.splice(this.order.indexOf(W),1),this},K.prototype.setMaxSize=function(q){for(this.max=q;this.order.length>this.max;){var $=this._getAndRemoveByKey(this.order[0]);$&&this.onRemove($)}return this},K.prototype.filter=function(q){var $=[];for(var W in this.data)for(var ie=0,_e=this.data[W];ie<_e.length;ie+=1){var ze=_e[ie];q(ze.value)||$.push(ze)}for(var He=0,Xe=$;He1||(Math.abs(At)>1&&(Math.abs(At+ve)===1?At+=ve:Math.abs(At-ve)===1&&(At-=ve)),wt.dem&&at.dem&&(at.dem.backfillBorder(wt.dem,At,re),at.neighboringTiles&&at.neighboringTiles[Le]&&(at.neighboringTiles[Le].backfilled=!0)))}},$.prototype.getTile=function(W){return this.getTileByID(W.key)},$.prototype.getTileByID=function(W){return this._tiles[W]},$.prototype._retainLoadedChildren=function(W,ie,_e,ze){for(var He in this._tiles){var Xe=this._tiles[He];if(!(ze[He]||!Xe.hasData()||Xe.tileID.overscaledZ<=ie||Xe.tileID.overscaledZ>_e)){for(var at=Xe.tileID;Xe&&Xe.tileID.overscaledZ>ie+1;){var wt=Xe.tileID.scaledTo(Xe.tileID.overscaledZ-1);(Xe=this._tiles[wt.key])&&Xe.hasData()&&(at=wt)}for(var At=at;At.overscaledZ>ie;)if(W[(At=At.scaledTo(At.overscaledZ-1)).key]){ze[at.key]=at;break}}}},$.prototype.findLoadedParent=function(W,ie){if(W.key in this._loadedParentTiles){var _e=this._loadedParentTiles[W.key];return _e&&_e.tileID.overscaledZ>=ie?_e:null}for(var ze=W.overscaledZ-1;ze>=ie;ze--){var He=W.scaledTo(ze),Xe=this._getLoadedTile(He);if(Xe)return Xe}},$.prototype._getLoadedTile=function(W){var ie=this._tiles[W.key];return ie&&ie.hasData()?ie:this._cache.getByKey(W.wrapped().key)},$.prototype.updateCacheSize=function(W){var ie=(Math.ceil(W.width/this._source.tileSize)+1)*(Math.ceil(W.height/this._source.tileSize)+1),_e=Math.floor(5*ie),ze=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,_e):_e;this._cache.setMaxSize(ze)},$.prototype.handleWrapJump=function(W){var ie=(W-(this._prevLng===void 0?W:this._prevLng))/360,_e=Math.round(ie);if(this._prevLng=W,_e){var ze={};for(var He in this._tiles){var Xe=this._tiles[He];Xe.tileID=Xe.tileID.unwrapTo(Xe.tileID.wrap+_e),ze[Xe.tileID.key]=Xe}for(var at in this._tiles=ze,this._timers)clearTimeout(this._timers[at]),delete this._timers[at];for(var wt in this._tiles){var At=this._tiles[wt];this._setTileReloadTimer(wt,At)}}},$.prototype.update=function(W){var ie=this;if(this.transform=W,this._sourceLoaded&&!this._paused){var _e;this.updateCacheSize(W),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?_e=W.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(Vt){return new s.OverscaledTileID(Vt.canonical.z,Vt.wrap,Vt.canonical.z,Vt.canonical.x,Vt.canonical.y)}):(_e=W.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(_e=_e.filter(function(Vt){return ie._source.hasTile(Vt)}))):_e=[];var ze=W.coveringZoomLevel(this._source),He=Math.max(ze-$.maxOverzooming,this._source.minzoom),Xe=Math.max(ze+$.maxUnderzooming,this._source.minzoom),at=this._updateRetainedTiles(_e,ze);if(Be(this._source.type)){for(var wt={},At={},re=0,ve=Object.keys(at);rethis._source.maxzoom){var $e=Ve.children(this._source.maxzoom)[0],tt=this.getTile($e);if(tt&&tt.hasData()){_e[$e.key]=$e;continue}}else{var lt=Ve.children(this._source.maxzoom);if(_e[lt[0].key]&&_e[lt[1].key]&&_e[lt[2].key]&&_e[lt[3].key])continue}for(var gt=We.wasRequested(),zt=Ve.overscaledZ-1;zt>=He;--zt){var Ut=Ve.scaledTo(zt);if(ze[Ut.key]||(ze[Ut.key]=!0,!(We=this.getTile(Ut))&>&&(We=this._addTile(Ut)),We&&(_e[Ut.key]=Ut,gt=We.wasRequested(),We.hasData())))break}}}return _e},$.prototype._updateLoadedParentTileCache=function(){for(var W in this._loadedParentTiles={},this._tiles){for(var ie=[],_e=void 0,ze=this._tiles[W].tileID;ze.overscaledZ>0;){if(ze.key in this._loadedParentTiles){_e=this._loadedParentTiles[ze.key];break}ie.push(ze.key);var He=ze.scaledTo(ze.overscaledZ-1);if(_e=this._getLoadedTile(He))break;ze=He}for(var Xe=0,at=ie;Xe0||(ie.hasData()&&ie.state!=="reloading"?this._cache.add(ie.tileID,ie,ie.getExpiryTimeout()):(ie.aborted=!0,this._abortTile(ie),this._unloadTile(ie))))},$.prototype.clearTiles=function(){for(var W in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(W);this._cache.reset()},$.prototype.tilesIn=function(W,ie,_e){var ze=this,He=[],Xe=this.transform;if(!Xe)return He;for(var at=_e?Xe.getCameraQueryGeometry(W):W,wt=W.map(function(zt){return Xe.pointCoordinate(zt)}),At=at.map(function(zt){return Xe.pointCoordinate(zt)}),re=this.getIds(),ve=1/0,Le=1/0,Fe=-1/0,Ve=-1/0,We=0,$e=At;We<$e.length;We+=1){var tt=$e[We];ve=Math.min(ve,tt.x),Le=Math.min(Le,tt.y),Fe=Math.max(Fe,tt.x),Ve=Math.max(Ve,tt.y)}for(var lt=function(zt){var Ut=ze._tiles[re[zt]];if(!Ut.holdingForFade()){var Vt=Ut.tileID,Qt=Math.pow(2,Xe.zoom-Ut.tileID.overscaledZ),gn=ie*Ut.queryPadding*s.EXTENT/Ut.tileSize/Qt,en=[Vt.getTilePoint(new s.MercatorCoordinate(ve,Le)),Vt.getTilePoint(new s.MercatorCoordinate(Fe,Ve))];if(en[0].x-gn=0&&en[1].y+gn>=0){var sn=wt.map(function(Mn){return Vt.getTilePoint(Mn)}),rn=At.map(function(Mn){return Vt.getTilePoint(Mn)});He.push({tile:Ut,tileID:Vt,queryGeometry:sn,cameraQueryGeometry:rn,scale:Qt})}}},gt=0;gt=s.browser.now())return!0}return!1},$.prototype.setFeatureState=function(W,ie,_e){W=W||"_geojsonTileLayer",this._state.updateState(W,ie,_e)},$.prototype.removeFeatureState=function(W,ie,_e){W=W||"_geojsonTileLayer",this._state.removeFeatureState(W,ie,_e)},$.prototype.getFeatureState=function(W,ie){return W=W||"_geojsonTileLayer",this._state.getState(W,ie)},$.prototype.setDependencies=function(W,ie,_e){var ze=this._tiles[W];ze&&ze.setDependencies(ie,_e)},$.prototype.reloadTilesForDependencies=function(W,ie){for(var _e in this._tiles)this._tiles[_e].hasDependency(W,ie)&&this._reloadTile(_e,"reloading");this._cache.filter(function(ze){return!ze.hasDependency(W,ie)})},$}(s.Evented);function Oe(q,$){var W=Math.abs(2*q.wrap)-+(q.wrap<0),ie=Math.abs(2*$.wrap)-+($.wrap<0);return q.overscaledZ-$.overscaledZ||ie-W||$.canonical.y-q.canonical.y||$.canonical.x-q.canonical.x}function Be(q){return q==="raster"||q==="image"||q==="video"}function Qe(){return new s.window.Worker(kt.workerUrl)}ht.maxOverzooming=10,ht.maxUnderzooming=3;var ut="mapboxgl_preloaded_worker_pool",pt=function(){this.active={}};pt.prototype.acquire=function(q){if(!this.workers)for(this.workers=[];this.workers.length0?(ie-ze)/He:0;return this.points[_e].mult(1-Xe).add(this.points[$].mult(Xe))};var kn=function(q,$,W){var ie=this.boxCells=[],_e=this.circleCells=[];this.xCellCount=Math.ceil(q/W),this.yCellCount=Math.ceil($/W);for(var ze=0;ze=-$[0]&&W<=$[0]&&ie>=-$[1]&&ie<=$[1]}function hn(q,$,W,ie,_e,ze,He,Xe){var at=ie?q.textSizeData:q.iconSizeData,wt=s.evaluateSizeForZoom(at,W.transform.zoom),At=[256/W.width*2+1,256/W.height*2+1],re=ie?q.text.dynamicLayoutVertexArray:q.icon.dynamicLayoutVertexArray;re.clear();for(var ve=q.lineVertexArray,Le=ie?q.text.placedSymbolArray:q.icon.placedSymbolArray,Fe=W.transform.width/W.transform.height,Ve=!1,We=0;WeMath.abs(W.x-$.x)*ie?{useVertical:!0}:(q===s.WritingMode.vertical?$.yW.x)?{needsFlipping:!0}:null}function Nn(q,$,W,ie,_e,ze,He,Xe,at,wt,At,re,ve,Le){var Fe,Ve=$/24,We=q.lineOffsetX*Ve,$e=q.lineOffsetY*Ve;if(q.numGlyphs>1){var tt=q.glyphStartIndex+q.numGlyphs,lt=q.lineStartIndex,gt=q.lineStartIndex+q.lineLength,zt=In(Ve,Xe,We,$e,W,At,re,q,at,ze,ve);if(!zt)return{notEnoughRoom:!0};var Ut=on(zt.first.point,He).point,Vt=on(zt.last.point,He).point;if(ie&&!W){var Qt=Cn(q.writingMode,Ut,Vt,Le);if(Qt)return Qt}Fe=[zt.first];for(var gn=q.glyphStartIndex+1;gn0?Mn.point:Hn(re,rn,en,1,_e),an=Cn(q.writingMode,en,xn,Le);if(an)return an}var zn=qn(Ve*Xe.getoffsetX(q.glyphStartIndex),We,$e,W,At,re,q.segment,q.lineStartIndex,q.lineStartIndex+q.lineLength,at,ze,ve);if(!zn)return{notEnoughRoom:!0};Fe=[zn]}for(var Vn=0,nr=Fe;Vn0?1:-1,Fe=0;ie&&(Le*=-1,Fe=Math.PI),Le<0&&(Fe+=Math.PI);for(var Ve=Le>0?Xe+He:Xe+He+1,We=_e,$e=_e,tt=0,lt=0,gt=Math.abs(ve),zt=[];tt+lt<=gt;){if((Ve+=Le)=at)return null;if($e=We,zt.push(We),(We=re[Ve])===void 0){var Ut=new s.Point(wt.getx(Ve),wt.gety(Ve)),Vt=on(Ut,At);if(Vt.signedDistanceFromCamera>0)We=re[Ve]=Vt.point;else{var Qt=Ve-Le;We=Hn(tt===0?ze:new s.Point(wt.getx(Qt),wt.gety(Qt)),Ut,$e,gt-tt+1,At)}}tt+=lt,lt=$e.dist(We)}var gn=(gt-tt)/lt,en=We.sub($e),sn=en.mult(gn)._add($e);sn._add(en._unit()._perp()._mult(W*Le));var rn=Fe+Math.atan2(We.y-$e.y,We.x-$e.x);return zt.push(sn),{point:sn,angle:rn,path:zt}}kn.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},kn.prototype.insert=function(q,$,W,ie,_e){this._forEachCell($,W,ie,_e,this._insertBoxCell,this.boxUid++),this.boxKeys.push(q),this.bboxes.push($),this.bboxes.push(W),this.bboxes.push(ie),this.bboxes.push(_e)},kn.prototype.insertCircle=function(q,$,W,ie){this._forEachCell($-ie,W-ie,$+ie,W+ie,this._insertCircleCell,this.circleUid++),this.circleKeys.push(q),this.circles.push($),this.circles.push(W),this.circles.push(ie)},kn.prototype._insertBoxCell=function(q,$,W,ie,_e,ze){this.boxCells[_e].push(ze)},kn.prototype._insertCircleCell=function(q,$,W,ie,_e,ze){this.circleCells[_e].push(ze)},kn.prototype._query=function(q,$,W,ie,_e,ze){if(W<0||q>this.width||ie<0||$>this.height)return!_e&&[];var He=[];if(q<=0&&$<=0&&this.width<=W&&this.height<=ie){if(_e)return!0;for(var Xe=0;Xe0:He},kn.prototype._queryCircle=function(q,$,W,ie,_e){var ze=q-W,He=q+W,Xe=$-W,at=$+W;if(He<0||ze>this.width||at<0||Xe>this.height)return!ie&&[];var wt=[],At={hitTest:ie,circle:{x:q,y:$,radius:W},seenUids:{box:{},circle:{}}};return this._forEachCell(ze,Xe,He,at,this._queryCellCircle,wt,At,_e),ie?wt.length>0:wt},kn.prototype.query=function(q,$,W,ie,_e){return this._query(q,$,W,ie,!1,_e)},kn.prototype.hitTest=function(q,$,W,ie,_e){return this._query(q,$,W,ie,!0,_e)},kn.prototype.hitTestCircle=function(q,$,W,ie){return this._queryCircle(q,$,W,!0,ie)},kn.prototype._queryCell=function(q,$,W,ie,_e,ze,He,Xe){var at=He.seenUids,wt=this.boxCells[_e];if(wt!==null)for(var At=this.bboxes,re=0,ve=wt;re=At[Fe+0]&&ie>=At[Fe+1]&&(!Xe||Xe(this.boxKeys[Le]))){if(He.hitTest)return ze.push(!0),!0;ze.push({key:this.boxKeys[Le],x1:At[Fe],y1:At[Fe+1],x2:At[Fe+2],y2:At[Fe+3]})}}}var Ve=this.circleCells[_e];if(Ve!==null)for(var We=this.circles,$e=0,tt=Ve;$eHe*He+Xe*Xe},kn.prototype._circleAndRectCollide=function(q,$,W,ie,_e,ze,He){var Xe=(ze-ie)/2,at=Math.abs(q-(ie+Xe));if(at>Xe+W)return!1;var wt=(He-_e)/2,At=Math.abs($-(_e+wt));if(At>wt+W)return!1;if(at<=Xe||At<=wt)return!0;var re=at-Xe,ve=At-wt;return re*re+ve*ve<=W*W};var or=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function tr(q,$){for(var W=0;W=1;xn--)Mn.push(sn.path[xn]);for(var an=1;an0){for(var rr=Mn[0].clone(),Tr=Mn[0].clone(),Ar=1;Ar=Qt.x&&Tr.x<=gn.x&&rr.y>=Qt.y&&Tr.y<=gn.y?[Mn]:Tr.xgn.x||Tr.ygn.y?[]:s.clipLine([Mn],Qt.x,Qt.y,gn.x,gn.y)}for(var mr=0,wr=nr;mr=this.screenRightBoundary||iethis.screenBottomBoundary},ir.prototype.isInsideGrid=function(q,$,W,ie){return W>=0&&q=0&&$0?(this.prevPlacement&&this.prevPlacement.variableOffsets[re.crossTileID]&&this.prevPlacement.placements[re.crossTileID]&&this.prevPlacement.placements[re.crossTileID].text&&(Ve=this.prevPlacement.variableOffsets[re.crossTileID].anchor),this.variableOffsets[re.crossTileID]={textOffset:We,width:W,height:ie,anchor:q,textBoxScale:_e,prevAnchor:Ve},this.markUsedJustification(ve,q,re,Le),ve.allowVerticalPlacement&&(this.markUsedOrientation(ve,Le,re),this.placedOrientations[re.crossTileID]=Le),{shift:$e,placedGlyphBoxes:tt}):void 0},Qn.prototype.placeLayerBucketPart=function(q,$,W){var ie=this,_e=q.parameters,ze=_e.bucket,He=_e.layout,Xe=_e.posMatrix,at=_e.textLabelPlaneMatrix,wt=_e.labelToScreenMatrix,At=_e.textPixelRatio,re=_e.holdingForFade,ve=_e.collisionBoxArray,Le=_e.partiallyEvaluatedTextSize,Fe=_e.collisionGroup,Ve=He.get("text-optional"),We=He.get("icon-optional"),$e=He.get("text-allow-overlap"),tt=He.get("icon-allow-overlap"),lt=He.get("text-rotation-alignment")==="map",gt=He.get("text-pitch-alignment")==="map",zt=He.get("icon-text-fit")!=="none",Ut=He.get("symbol-z-order")==="viewport-y",Vt=$e&&(tt||!ze.hasIconData()||We),Qt=tt&&($e||!ze.hasTextData()||Ve);!ze.collisionArrays&&ve&&ze.deserializeCollisionBoxes(ve);var gn=function(an,zn){if(!$[an.crossTileID])if(re)ie.placements[an.crossTileID]=new mn(!1,!1,!1);else{var Vn,nr=!1,rr=!1,Tr=!0,Ar=null,mr={box:null,offscreen:null},wr={box:null,offscreen:null},Rr=null,Jr=null,Kr=0,xr=0,zr=0;zn.textFeatureIndex?Kr=zn.textFeatureIndex:an.useRuntimeCollisionCircles&&(Kr=an.featureIndex),zn.verticalTextFeatureIndex&&(xr=zn.verticalTextFeatureIndex);var Wr=zn.textBox;if(Wr){var Gr=function(ai){var na=s.WritingMode.horizontal;if(ze.allowVerticalPlacement&&!ai&&ie.prevPlacement){var Ba=ie.prevPlacement.placedOrientations[an.crossTileID];Ba&&(ie.placedOrientations[an.crossTileID]=Ba,na=Ba,ie.markUsedOrientation(ze,na,an))}return na},ii=function(ai,na){if(ze.allowVerticalPlacement&&an.numVerticalGlyphVertices>0&&zn.verticalTextBox)for(var Ba=0,Kl=ze.writingModes;Ba0&&(ti=ti.filter(function(ai){return ai!==ui.anchor})).unshift(ui.anchor)}var ki=function(ai,na,Ba){for(var Kl=ai.x2-ai.x1,p1=ai.y2-ai.y1,vh=an.textBoxScale,d1=zt&&!tt?na:null,Wu={box:[],offscreen:!1},Xp=$e?2*ti.length:ti.length,Lc=0;Lc=ti.length,ku=ie.attemptAnchorPlacement(Zu,ai,Kl,p1,vh,lt,gt,At,Xe,Fe,g1,an,ze,Ba,d1);if(ku&&(Wu=ku.placedGlyphBoxes)&&Wu.box&&Wu.box.length){nr=!0,Ar=ku.shift;break}}return Wu};ii(function(){return ki(Wr,zn.iconBox,s.WritingMode.horizontal)},function(){var ai=zn.verticalTextBox,na=mr&&mr.box&&mr.box.length;return ze.allowVerticalPlacement&&!na&&an.numVerticalGlyphVertices>0&&ai?ki(ai,zn.verticalIconBox,s.WritingMode.vertical):{box:null,offscreen:null}}),mr&&(nr=mr.box,Tr=mr.offscreen);var Ii=Gr(mr&&mr.box);if(!nr&&ie.prevPlacement){var Ei=ie.prevPlacement.variableOffsets[an.crossTileID];Ei&&(ie.variableOffsets[an.crossTileID]=Ei,ie.markUsedJustification(ze,Ei.anchor,an,Ii))}}else{var wi=function(ai,na){var Ba=ie.collisionIndex.placeCollisionBox(ai,$e,At,Xe,Fe.predicate);return Ba&&Ba.box&&Ba.box.length&&(ie.markUsedOrientation(ze,na,an),ie.placedOrientations[an.crossTileID]=na),Ba};ii(function(){return wi(Wr,s.WritingMode.horizontal)},function(){var ai=zn.verticalTextBox;return ze.allowVerticalPlacement&&an.numVerticalGlyphVertices>0&&ai?wi(ai,s.WritingMode.vertical):{box:null,offscreen:null}}),Gr(mr&&mr.box&&mr.box.length)}}if(nr=(Vn=mr)&&Vn.box&&Vn.box.length>0,Tr=Vn&&Vn.offscreen,an.useRuntimeCollisionCircles){var Ai=ze.text.placedSymbolArray.get(an.centerJustifiedTextSymbolIndex),Ci=s.evaluateSizeForFeature(ze.textSizeData,Le,Ai),qi=He.get("text-padding"),_s=an.collisionCircleDiameter;Rr=ie.collisionIndex.placeCollisionCircles($e,Ai,ze.lineVertexArray,ze.glyphOffsetArray,Ci,Xe,at,wt,W,gt,Fe.predicate,_s,qi),nr=$e||Rr.circles.length>0&&!Rr.collisionDetected,Tr=Tr&&Rr.offscreen}if(zn.iconFeatureIndex&&(zr=zn.iconFeatureIndex),zn.iconBox){var ta=function(ai){var na=zt&&Ar?Zn(ai,Ar.x,Ar.y,lt,gt,ie.transform.angle):ai;return ie.collisionIndex.placeCollisionBox(na,tt,At,Xe,Fe.predicate)};rr=wr&&wr.box&&wr.box.length&&zn.verticalIconBox?(Jr=ta(zn.verticalIconBox)).box.length>0:(Jr=ta(zn.iconBox)).box.length>0,Tr=Tr&&Jr.offscreen}var Yr=Ve||an.numHorizontalGlyphVertices===0&&an.numVerticalGlyphVertices===0,pa=We||an.numIconVertices===0;if(Yr||pa?pa?Yr||(rr=rr&&nr):nr=rr&&nr:rr=nr=rr&&nr,nr&&Vn&&Vn.box&&(wr&&wr.box&&xr?ie.collisionIndex.insertCollisionBox(Vn.box,He.get("text-ignore-placement"),ze.bucketInstanceId,xr,Fe.ID):ie.collisionIndex.insertCollisionBox(Vn.box,He.get("text-ignore-placement"),ze.bucketInstanceId,Kr,Fe.ID)),rr&&Jr&&ie.collisionIndex.insertCollisionBox(Jr.box,He.get("icon-ignore-placement"),ze.bucketInstanceId,zr,Fe.ID),Rr&&(nr&&ie.collisionIndex.insertCollisionCircles(Rr.circles,He.get("text-ignore-placement"),ze.bucketInstanceId,Kr,Fe.ID),W)){var wa=ze.bucketInstanceId,Ui=ie.collisionCircleArrays[wa];Ui===void 0&&(Ui=ie.collisionCircleArrays[wa]=new Ln);for(var ko=0;ko=0;--sn){var rn=en[sn];gn(ze.symbolInstances.get(rn),ze.collisionArrays[rn])}else for(var Mn=q.symbolInstanceStart;Mn=0&&(q.text.placedSymbolArray.get(at).crossTileID=_e>=0&&at!==_e?0:W.crossTileID)}},Qn.prototype.markUsedOrientation=function(q,$,W){for(var ie=$===s.WritingMode.horizontal||$===s.WritingMode.horizontalOnly?$:0,_e=$===s.WritingMode.vertical?$:0,ze=0,He=[W.leftJustifiedTextSymbolIndex,W.centerJustifiedTextSymbolIndex,W.rightJustifiedTextSymbolIndex];ze0||gt>0,gn=tt.numIconVertices>0,en=ie.placedOrientations[tt.crossTileID],sn=en===s.WritingMode.vertical,rn=en===s.WritingMode.horizontal||en===s.WritingMode.horizontalOnly;if(Qt){var Mn=Sn(Vt.text),xn=sn?pn:Mn;Le(q.text,lt,xn);var an=rn?pn:Mn;Le(q.text,gt,an);var zn=Vt.text.isHidden();[tt.rightJustifiedTextSymbolIndex,tt.centerJustifiedTextSymbolIndex,tt.leftJustifiedTextSymbolIndex].forEach(function(zr){zr>=0&&(q.text.placedSymbolArray.get(zr).hidden=zn||sn?1:0)}),tt.verticalPlacedTextSymbolIndex>=0&&(q.text.placedSymbolArray.get(tt.verticalPlacedTextSymbolIndex).hidden=zn||rn?1:0);var Vn=ie.variableOffsets[tt.crossTileID];Vn&&ie.markUsedJustification(q,Vn.anchor,tt,en);var nr=ie.placedOrientations[tt.crossTileID];nr&&(ie.markUsedJustification(q,"left",tt,nr),ie.markUsedOrientation(q,nr,tt))}if(gn){var rr=Sn(Vt.icon),Tr=!(re&&tt.verticalPlacedIconSymbolIndex&&sn);if(tt.placedIconSymbolIndex>=0){var Ar=Tr?rr:pn;Le(q.icon,tt.numIconVertices,Ar),q.icon.placedSymbolArray.get(tt.placedIconSymbolIndex).hidden=Vt.icon.isHidden()}if(tt.verticalPlacedIconSymbolIndex>=0){var mr=Tr?pn:rr;Le(q.icon,tt.numVerticalIconVertices,mr),q.icon.placedSymbolArray.get(tt.verticalPlacedIconSymbolIndex).hidden=Vt.icon.isHidden()}}if(q.hasIconCollisionBoxData()||q.hasTextCollisionBoxData()){var wr=q.collisionArrays[$e];if(wr){var Rr=new s.Point(0,0);if(wr.textBox||wr.verticalTextBox){var Jr=!0;if(at){var Kr=ie.variableOffsets[zt];Kr?(Rr=$n(Kr.anchor,Kr.width,Kr.height,Kr.textOffset,Kr.textBoxScale),wt&&Rr._rotate(At?ie.transform.angle:-ie.transform.angle)):Jr=!1}wr.textBox&&hr(q.textCollisionBox.collisionVertexArray,Vt.text.placed,!Jr||sn,Rr.x,Rr.y),wr.verticalTextBox&&hr(q.textCollisionBox.collisionVertexArray,Vt.text.placed,!Jr||rn,Rr.x,Rr.y)}var xr=!!(!rn&&wr.verticalIconBox);wr.iconBox&&hr(q.iconCollisionBox.collisionVertexArray,Vt.icon.placed,xr,re?Rr.x:0,re?Rr.y:0),wr.verticalIconBox&&hr(q.iconCollisionBox.collisionVertexArray,Vt.icon.placed,!xr,re?Rr.x:0,re?Rr.y:0)}}},Ve=0;Veq},Qn.prototype.setStale=function(){this.stale=!0};var tn=Math.pow(2,25),Pn=Math.pow(2,24),jt=Math.pow(2,17),Jt=Math.pow(2,16),un=Math.pow(2,9),Rn=Math.pow(2,8),On=Math.pow(2,1);function Sn(q){if(q.opacity===0&&!q.placed)return 0;if(q.opacity===1&&q.placed)return 4294967295;var $=q.placed?1:0,W=Math.floor(127*q.opacity);return W*tn+$*Pn+W*jt+$*Jt+W*un+$*Rn+W*On+$}var pn=0,bn=function(q){this._sortAcrossTiles=q.layout.get("symbol-z-order")!=="viewport-y"&&q.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};bn.prototype.continuePlacement=function(q,$,W,ie,_e){for(var ze=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var He=$[q[this._currentPlacementIndex]],Xe=this.placement.collisionIndex.transform.zoom;if(He.type==="symbol"&&(!He.minzoom||He.minzoom<=Xe)&&(!He.maxzoom||He.maxzoom>Xe)){if(this._inProgressLayer||(this._inProgressLayer=new bn(He)),this._inProgressLayer.continuePlacement(W[He.source],this.placement,this._showCollisionBoxes,He,ze))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},dn.prototype.commit=function(q){return this.placement.commit(q),this.placement};var vn=512/s.EXTENT/2,An=function(q,$,W){this.tileID=q,this.indexedSymbolInstances={},this.bucketInstanceId=W;for(var ie=0;ie<$.length;ie++){var _e=$.get(ie),ze=_e.key;this.indexedSymbolInstances[ze]||(this.indexedSymbolInstances[ze]=[]),this.indexedSymbolInstances[ze].push({crossTileID:_e.crossTileID,coord:this.getScaledCoordinates(_e,q)})}};An.prototype.getScaledCoordinates=function(q,$){var W=$.canonical.z-this.tileID.canonical.z,ie=vn/Math.pow(2,W);return{x:Math.floor(($.canonical.x*s.EXTENT+q.anchorX)*ie),y:Math.floor(($.canonical.y*s.EXTENT+q.anchorY)*ie)}},An.prototype.findMatches=function(q,$,W){for(var ie=this.tileID.canonical.z<$.canonical.z?1:Math.pow(2,this.tileID.canonical.z-$.canonical.z),_e=0;_eq.overscaledZ)for(var Xe in He){var at=He[Xe];at.tileID.isChildOf(q)&&at.findMatches($.symbolInstances,q,_e)}else{var wt=He[q.scaledTo(Number(ze)).key];wt&&wt.findMatches($.symbolInstances,q,_e)}}for(var At=0;At<$.symbolInstances.length;At++){var re=$.symbolInstances.get(At);re.crossTileID||(re.crossTileID=W.generate(),_e[re.crossTileID]=!0)}return this.indexes[q.overscaledZ]===void 0&&(this.indexes[q.overscaledZ]={}),this.indexes[q.overscaledZ][q.key]=new An(q,$.symbolInstances,$.bucketInstanceId),!0},Xn.prototype.removeBucketCrossTileIDs=function(q,$){for(var W in $.indexedSymbolInstances)for(var ie=0,_e=$.indexedSymbolInstances[W];ie<_e.length;ie+=1){var ze=_e[ie];delete this.usedCrossTileIDs[q][ze.crossTileID]}},Xn.prototype.removeStaleBuckets=function(q){var $=!1;for(var W in this.indexes){var ie=this.indexes[W];for(var _e in ie)q[ie[_e].bucketInstanceId]||(this.removeBucketCrossTileIDs(W,ie[_e]),delete ie[_e],$=!0)}return $};var er=function(){this.layerIndexes={},this.crossTileIDs=new Bn,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};er.prototype.addLayer=function(q,$,W){var ie=this.layerIndexes[q.id];ie===void 0&&(ie=this.layerIndexes[q.id]=new Xn);var _e=!1,ze={};ie.handleWrapJump(W);for(var He=0,Xe=$;He1?"@2x":"",re=s.getJSON(ze.transformRequest(ze.normalizeSpriteURL(_e,At,".json"),s.ResourceType.SpriteJSON),function(Fe,Ve){re=null,wt||(wt=Fe,Xe=Ve,Le())}),ve=s.getImage(ze.transformRequest(ze.normalizeSpriteURL(_e,At,".png"),s.ResourceType.SpriteImage),function(Fe,Ve){ve=null,wt||(wt=Fe,at=Ve,Le())});function Le(){if(wt)He(wt);else if(Xe&&at){var Fe=s.browser.getImageData(at),Ve={};for(var We in Xe){var $e=Xe[We],tt=$e.width,lt=$e.height,gt=$e.x,zt=$e.y,Ut=$e.sdf,Vt=$e.pixelRatio,Qt=$e.stretchX,gn=$e.stretchY,en=$e.content,sn=new s.RGBAImage({width:tt,height:lt});s.RGBAImage.copy(Fe,sn,{x:gt,y:zt},{x:0,y:0},{width:tt,height:lt}),Ve[We]={data:sn,pixelRatio:Vt,sdf:Ut,stretchX:Qt,stretchY:gn,content:en}}He(null,Ve)}}return{cancel:function(){re&&(re.cancel(),re=null),ve&&(ve.cancel(),ve=null)}}}(W,this.map._requestManager,function(_e,ze){if(ie._spriteRequest=null,_e)ie.fire(new s.ErrorEvent(_e));else if(ze)for(var He in ze)ie.imageManager.addImage(He,ze[He]);ie.imageManager.setLoaded(!0),ie._availableImages=ie.imageManager.listImages(),ie.dispatcher.broadcast("setImages",ie._availableImages),ie.fire(new s.Event("data",{dataType:"style"}))})},$.prototype._validateLayer=function(W){var ie=this.sourceCaches[W.source];if(ie){var _e=W.sourceLayer;if(_e){var ze=ie.getSource();(ze.type==="geojson"||ze.vectorLayerIds&&ze.vectorLayerIds.indexOf(_e)===-1)&&this.fire(new s.ErrorEvent(new Error('Source layer "'+_e+'" does not exist on source "'+ze.id+'" as specified by style layer "'+W.id+'"')))}}},$.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var W in this.sourceCaches)if(!this.sourceCaches[W].loaded())return!1;return!!this.imageManager.isLoaded()},$.prototype._serializeLayers=function(W){for(var ie=[],_e=0,ze=W;_e0)throw new Error("Unimplemented: "+ze.map(function(He){return He.command}).join(", ")+".");return _e.forEach(function(He){He.command!=="setTransition"&&ie[He.command].apply(ie,He.args)}),this.stylesheet=W,!0},$.prototype.addImage=function(W,ie){if(this.getImage(W))return this.fire(new s.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(W,ie),this._availableImages=this.imageManager.listImages(),this._changedImages[W]=!0,this._changed=!0,this.fire(new s.Event("data",{dataType:"style"}))},$.prototype.updateImage=function(W,ie){this.imageManager.updateImage(W,ie)},$.prototype.getImage=function(W){return this.imageManager.getImage(W)},$.prototype.removeImage=function(W){if(!this.getImage(W))return this.fire(new s.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(W),this._availableImages=this.imageManager.listImages(),this._changedImages[W]=!0,this._changed=!0,this.fire(new s.Event("data",{dataType:"style"}))},$.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},$.prototype.addSource=function(W,ie,_e){var ze=this;if(_e===void 0&&(_e={}),this._checkLoaded(),this.sourceCaches[W]!==void 0)throw new Error("There is already a source with this ID");if(!ie.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(ie).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(ie.type)>=0&&this._validate(s.validateStyle.source,"sources."+W,ie,null,_e))){this.map&&this.map._collectResourceTiming&&(ie.collectResourceTiming=!0);var He=this.sourceCaches[W]=new ht(W,ie,this.dispatcher);He.style=this,He.setEventedParent(this,function(){return{isSourceLoaded:ze.loaded(),source:He.serialize(),sourceId:W}}),He.onAdd(this.map),this._changed=!0}},$.prototype.removeSource=function(W){if(this._checkLoaded(),this.sourceCaches[W]===void 0)throw new Error("There is no source with this ID");for(var ie in this._layers)if(this._layers[ie].source===W)return this.fire(new s.ErrorEvent(new Error('Source "'+W+'" cannot be removed while layer "'+ie+'" is using it.')));var _e=this.sourceCaches[W];delete this.sourceCaches[W],delete this._updatedSources[W],_e.fire(new s.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:W})),_e.setEventedParent(null),_e.clearTiles(),_e.onRemove&&_e.onRemove(this.map),this._changed=!0},$.prototype.setGeoJSONSourceData=function(W,ie){this._checkLoaded(),this.sourceCaches[W].getSource().setData(ie),this._changed=!0},$.prototype.getSource=function(W){return this.sourceCaches[W]&&this.sourceCaches[W].getSource()},$.prototype.addLayer=function(W,ie,_e){_e===void 0&&(_e={}),this._checkLoaded();var ze=W.id;if(this.getLayer(ze))this.fire(new s.ErrorEvent(new Error('Layer with id "'+ze+'" already exists on this map')));else{var He;if(W.type==="custom"){if(Jn(this,s.validateCustomStyleLayer(W)))return;He=s.createStyleLayer(W)}else{if(typeof W.source=="object"&&(this.addSource(ze,W.source),W=s.clone$1(W),W=s.extend(W,{source:ze})),this._validate(s.validateStyle.layer,"layers."+ze,W,{arrayIndex:-1},_e))return;He=s.createStyleLayer(W),this._validateLayer(He),He.setEventedParent(this,{layer:{id:ze}}),this._serializedLayers[He.id]=He.serialize()}var Xe=ie?this._order.indexOf(ie):this._order.length;if(ie&&Xe===-1)this.fire(new s.ErrorEvent(new Error('Layer with id "'+ie+'" does not exist on this map.')));else{if(this._order.splice(Xe,0,ze),this._layerOrderChanged=!0,this._layers[ze]=He,this._removedLayers[ze]&&He.source&&He.type!=="custom"){var at=this._removedLayers[ze];delete this._removedLayers[ze],at.type!==He.type?this._updatedSources[He.source]="clear":(this._updatedSources[He.source]="reload",this.sourceCaches[He.source].pause())}this._updateLayer(He),He.onAdd&&He.onAdd(this.map)}}},$.prototype.moveLayer=function(W,ie){if(this._checkLoaded(),this._changed=!0,this._layers[W]){if(W!==ie){var _e=this._order.indexOf(W);this._order.splice(_e,1);var ze=ie?this._order.indexOf(ie):this._order.length;ie&&ze===-1?this.fire(new s.ErrorEvent(new Error('Layer with id "'+ie+'" does not exist on this map.'))):(this._order.splice(ze,0,W),this._layerOrderChanged=!0)}}else this.fire(new s.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style and cannot be moved.")))},$.prototype.removeLayer=function(W){this._checkLoaded();var ie=this._layers[W];if(ie){ie.setEventedParent(null);var _e=this._order.indexOf(W);this._order.splice(_e,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[W]=ie,delete this._layers[W],delete this._serializedLayers[W],delete this._updatedLayers[W],delete this._updatedPaintProps[W],ie.onRemove&&ie.onRemove(this.map)}else this.fire(new s.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style and cannot be removed.")))},$.prototype.getLayer=function(W){return this._layers[W]},$.prototype.hasLayer=function(W){return W in this._layers},$.prototype.setLayerZoomRange=function(W,ie,_e){this._checkLoaded();var ze=this.getLayer(W);ze?ze.minzoom===ie&&ze.maxzoom===_e||(ie!=null&&(ze.minzoom=ie),_e!=null&&(ze.maxzoom=_e),this._updateLayer(ze)):this.fire(new s.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style and cannot have zoom extent.")))},$.prototype.setFilter=function(W,ie,_e){_e===void 0&&(_e={}),this._checkLoaded();var ze=this.getLayer(W);if(ze){if(!s.deepEqual(ze.filter,ie))return ie==null?(ze.filter=void 0,void this._updateLayer(ze)):void(this._validate(s.validateStyle.filter,"layers."+ze.id+".filter",ie,null,_e)||(ze.filter=s.clone$1(ie),this._updateLayer(ze)))}else this.fire(new s.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style and cannot be filtered.")))},$.prototype.getFilter=function(W){return s.clone$1(this.getLayer(W).filter)},$.prototype.setLayoutProperty=function(W,ie,_e,ze){ze===void 0&&(ze={}),this._checkLoaded();var He=this.getLayer(W);He?s.deepEqual(He.getLayoutProperty(ie),_e)||(He.setLayoutProperty(ie,_e,ze),this._updateLayer(He)):this.fire(new s.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style and cannot be styled.")))},$.prototype.getLayoutProperty=function(W,ie){var _e=this.getLayer(W);if(_e)return _e.getLayoutProperty(ie);this.fire(new s.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style.")))},$.prototype.setPaintProperty=function(W,ie,_e,ze){ze===void 0&&(ze={}),this._checkLoaded();var He=this.getLayer(W);He?s.deepEqual(He.getPaintProperty(ie),_e)||(He.setPaintProperty(ie,_e,ze)&&this._updateLayer(He),this._changed=!0,this._updatedPaintProps[W]=!0):this.fire(new s.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style and cannot be styled.")))},$.prototype.getPaintProperty=function(W,ie){return this.getLayer(W).getPaintProperty(ie)},$.prototype.setFeatureState=function(W,ie){this._checkLoaded();var _e=W.source,ze=W.sourceLayer,He=this.sourceCaches[_e];if(He!==void 0){var Xe=He.getSource().type;Xe==="geojson"&&ze?this.fire(new s.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):Xe!=="vector"||ze?(W.id===void 0&&this.fire(new s.ErrorEvent(new Error("The feature id parameter must be provided."))),He.setFeatureState(ze,W.id,ie)):this.fire(new s.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new s.ErrorEvent(new Error("The source '"+_e+"' does not exist in the map's style.")))},$.prototype.removeFeatureState=function(W,ie){this._checkLoaded();var _e=W.source,ze=this.sourceCaches[_e];if(ze!==void 0){var He=ze.getSource().type,Xe=He==="vector"?W.sourceLayer:void 0;He!=="vector"||Xe?ie&&typeof W.id!="string"&&typeof W.id!="number"?this.fire(new s.ErrorEvent(new Error("A feature id is requred to remove its specific state property."))):ze.removeFeatureState(Xe,W.id,ie):this.fire(new s.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new s.ErrorEvent(new Error("The source '"+_e+"' does not exist in the map's style.")))},$.prototype.getFeatureState=function(W){this._checkLoaded();var ie=W.source,_e=W.sourceLayer,ze=this.sourceCaches[ie];if(ze!==void 0){if(ze.getSource().type!=="vector"||_e)return W.id===void 0&&this.fire(new s.ErrorEvent(new Error("The feature id parameter must be provided."))),ze.getFeatureState(_e,W.id);this.fire(new s.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new s.ErrorEvent(new Error("The source '"+ie+"' does not exist in the map's style.")))},$.prototype.getTransition=function(){return s.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},$.prototype.serialize=function(){return s.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:s.mapObject(this.sourceCaches,function(W){return W.serialize()}),layers:this._serializeLayers(this._order)},function(W){return W!==void 0})},$.prototype._updateLayer=function(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._changed=!0},$.prototype._flattenAndSortRenderedFeatures=function(W){for(var ie=this,_e=function(en){return ie._layers[en].type==="fill-extrusion"},ze={},He=[],Xe=this._order.length-1;Xe>=0;Xe--){var at=this._order[Xe];if(_e(at)){ze[at]=Xe;for(var wt=0,At=W;wt=0;We--){var $e=this._order[We];if(_e($e))for(var tt=He.length-1;tt>=0;tt--){var lt=He[tt].feature;if(ze[lt.layer.id]2){for(var C=Array(.5*y.position.length),L=0;L2){for(var I=!y.position[0].length,R=t.mallocFloat(2*this.count),U=0,B=0;U1?k.align[ue]:k.align[0]:k.align;if(typeof me=="number")return me;switch(me){case"right":case"end":return-ne;case"center":case"centre":case"middle":return .5*-ne}return 0})),this.baseline==null&&y.baseline==null&&(y.baseline=0),y.baseline!=null&&(this.baseline=y.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(ne,ue){var me=(k.font[ue]||k.font[0]).metrics,Te=0;return Te+=.5*me.bottom,-1*(Te+=typeof ne=="number"?ne-me.baseline:-me[ne])})),y.color!=null)if(y.color||(y.color="transparent"),typeof y.color!="string"&&isNaN(y.color)){var de;if(typeof y.color[0]=="number"&&y.color.length>this.counts.length){var pe=y.color.length;de=t.mallocUint8(pe);for(var ye=(y.color.subarray||y.color.slice).bind(y.color),Re=0;Re4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var Me=Math.max(.5*this.position.length||0,.25*this.color.length||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,.5*this.positionOffset.length||0);this.batch=Array(Me);for(var Ce=0;Ce1?this.counts[Ce]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[Ce]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*Ce,4*Ce+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[Ce]:this.opacity,baseline:this.baselineOffset[Ce]!=null?this.baselineOffset[Ce]:this.baselineOffset[0],align:this.align?this.alignOffset[Ce]!=null?this.alignOffset[Ce]:this.alignOffset[0]:0,atlas:this.fontAtlas[Ce]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*Ce,2*Ce+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=[]},g.prototype.destroy=function(){},g.prototype.kerning=!0,g.prototype.position={constant:new Float32Array(2)},g.prototype.translate=null,g.prototype.scale=null,g.prototype.font=null,g.prototype.text="",g.prototype.positionOffset=[0,0],g.prototype.opacity=1,g.prototype.color=new Uint8Array([0,0,0,255]),g.prototype.alignOffset=[0,0],g.maxAtlasSize=1024,g.atlasCanvas=document.createElement("canvas"),g.atlasContext=g.atlasCanvas.getContext("2d",{alpha:!1}),g.baseFontSize=64,g.fonts={},D.exports=g},12018:function(D,E,e){var _=e(71299);function w(m){if(m.container)if(m.container==document.body)document.body.style.width||(m.canvas.width=m.width||m.pixelRatio*e.g.innerWidth),document.body.style.height||(m.canvas.height=m.height||m.pixelRatio*e.g.innerHeight);else{var f=m.container.getBoundingClientRect();m.canvas.width=m.width||f.right-f.left,m.canvas.height=m.height||f.bottom-f.top}}function s(m){return typeof m.getContext=="function"&&"width"in m&&"height"in m}function T(){var m=document.createElement("canvas");return m.style.position="absolute",m.style.top=0,m.style.left=0,m}D.exports=function(m){var f;if(m?typeof m=="string"&&(m={container:m}):m={},(m=s(m)||typeof(f=m).nodeName=="string"&&typeof f.appendChild=="function"&&typeof f.getBoundingClientRect=="function"?{container:m}:function(t){return typeof t.drawArrays=="function"||typeof t.drawElements=="function"}(m)?{gl:m}:_(m,{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)).pixelRatio||(m.pixelRatio=e.g.pixelRatio||1),m.gl)return m.gl;if(m.canvas&&(m.container=m.canvas.parentNode),m.container){if(typeof m.container=="string"){var l=document.querySelector(m.container);if(!l)throw Error("Element "+m.container+" is not found");m.container=l}s(m.container)?(m.canvas=m.container,m.container=m.canvas.parentNode):m.canvas||(m.canvas=T(),m.container.appendChild(m.canvas),w(m))}else if(!m.canvas){if(typeof document>"u")throw Error("Not DOM environment. Use headless-gl.");m.container=document.body||document.documentElement,m.canvas=T(),m.container.appendChild(m.canvas),w(m)}return m.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(t){try{m.gl=m.canvas.getContext(t,m.attrs)}catch{}return m.gl}),m.gl}},56068:function(D){D.exports=function(E){typeof E=="string"&&(E=[E]);for(var e=[].slice.call(arguments,1),_=[],w=0;w>1,r=-7,n=w?T-1:0,o=w?-1:1,a=e[_+n];for(n+=o,m=a&(1<<-r)-1,a>>=-r,r+=l;r>0;m=256*m+e[_+n],n+=o,r-=8);for(f=m&(1<<-r)-1,m>>=-r,r+=s;r>0;f=256*f+e[_+n],n+=o,r-=8);if(m===0)m=1-i;else{if(m===t)return f?NaN:1/0*(a?-1:1);f+=Math.pow(2,s),m-=i}return(a?-1:1)*f*Math.pow(2,m-s)},E.write=function(e,_,w,s,T,m){var f,l,t,i=8*m-T-1,r=(1<>1,o=T===23?Math.pow(2,-24)-Math.pow(2,-77):0,a=s?0:m-1,u=s?1:-1,p=_<0||_===0&&1/_<0?1:0;for(_=Math.abs(_),isNaN(_)||_===1/0?(l=isNaN(_)?1:0,f=r):(f=Math.floor(Math.log(_)/Math.LN2),_*(t=Math.pow(2,-f))<1&&(f--,t*=2),(_+=f+n>=1?o/t:o*Math.pow(2,1-n))*t>=2&&(f++,t/=2),f+n>=r?(l=0,f=r):f+n>=1?(l=(_*t-1)*Math.pow(2,T),f+=n):(l=_*Math.pow(2,n-1)*Math.pow(2,T),f=0));T>=8;e[w+a]=255&l,a+=u,l/=256,T-=8);for(f=f<0;e[w+a]=255&f,a+=u,f/=256,i-=8);e[w+a-u]|=128*p}},42018:function(D){typeof Object.create=="function"?D.exports=function(E,e){e&&(E.super_=e,E.prototype=Object.create(e.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}))}:D.exports=function(E,e){if(e){E.super_=e;var _=function(){};_.prototype=e.prototype,E.prototype=new _,E.prototype.constructor=E}}},47216:function(D,E,e){var _=e(84543)(),w=e(6614)("Object.prototype.toString"),s=function(f){return!(_&&f&&typeof f=="object"&&Symbol.toStringTag in f)&&w(f)==="[object Arguments]"},T=function(f){return!!s(f)||f!==null&&typeof f=="object"&&typeof f.length=="number"&&f.length>=0&&w(f)!=="[object Array]"&&w(f.callee)==="[object Function]"},m=function(){return s(arguments)}();s.isLegacyArguments=T,D.exports=m?s:T},54404:function(D){D.exports=!0},85395:function(D){var E,e,_=Function.prototype.toString,w=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply;if(typeof w=="function"&&typeof Object.defineProperty=="function")try{E=Object.defineProperty({},"length",{get:function(){throw e}}),e={},w(function(){throw 42},null,E)}catch(n){n!==e&&(w=null)}else w=null;var s=/^\s*class\b/,T=function(n){try{var o=_.call(n);return s.test(o)}catch{return!1}},m=function(n){try{return!T(n)&&(_.call(n),!0)}catch{return!1}},f=Object.prototype.toString,l=typeof Symbol=="function"&&!!Symbol.toStringTag,t=!(0 in[,]),i=function(){return!1};if(typeof document=="object"){var r=document.all;f.call(r)===f.call(document.all)&&(i=function(n){if((t||!n)&&(n===void 0||typeof n=="object"))try{var o=f.call(n);return(o==="[object HTMLAllCollection]"||o==="[object HTML document.all class]"||o==="[object HTMLCollection]"||o==="[object Object]")&&n("")==null}catch{}return!1})}D.exports=w?function(n){if(i(n))return!0;if(!n||typeof n!="function"&&typeof n!="object")return!1;try{w(n,null,E)}catch(o){if(o!==e)return!1}return!T(n)&&m(n)}:function(n){if(i(n))return!0;if(!n||typeof n!="function"&&typeof n!="object")return!1;if(l)return m(n);if(T(n))return!1;var o=f.call(n);return!(o!=="[object Function]"&&o!=="[object GeneratorFunction]"&&!/^\[object HTML/.test(o))&&m(n)}},65481:function(D,E,e){var _,w=Object.prototype.toString,s=Function.prototype.toString,T=/^\s*(?:function)?\*/,m=e(84543)(),f=Object.getPrototypeOf;D.exports=function(l){if(typeof l!="function")return!1;if(T.test(s.call(l)))return!0;if(!m)return w.call(l)==="[object GeneratorFunction]";if(!f)return!1;if(_===void 0){var t=function(){if(!m)return!1;try{return Function("return function*() {}")()}catch{}}();_=!!t&&f(t)}return f(l)===_}},62683:function(D){D.exports=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},64274:function(D){D.exports=function(E){return E!=E}},15567:function(D,E,e){var _=e(68222),w=e(17045),s=e(64274),T=e(14922),m=e(22442),f=_(T(),Number);w(f,{getPolyfill:T,implementation:s,shim:m}),D.exports=f},14922:function(D,E,e){var _=e(64274);D.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:_}},22442:function(D,E,e){var _=e(17045),w=e(14922);D.exports=function(){var s=w();return _(Number,{isNaN:s},{isNaN:function(){return Number.isNaN!==s}}),s}},64941:function(D){D.exports=function(E){var e=typeof E;return E!==null&&(e==="object"||e==="function")}},10973:function(D){var E=Object.prototype.toString;D.exports=function(e){var _;return E.call(e)==="[object Object]"&&((_=Object.getPrototypeOf(e))===null||_===Object.getPrototypeOf({}))}},18546:function(D){D.exports=function(E){for(var e,_=E.length,w=0;w<_;w++)if(((e=E.charCodeAt(w))<9||e>13)&&e!==32&&e!==133&&e!==160&&e!==5760&&e!==6158&&(e<8192||e>8205)&&e!==8232&&e!==8233&&e!==8239&&e!==8287&&e!==8288&&e!==12288&&e!==65279)return!1;return!0}},89546:function(D){D.exports=function(E){return typeof E=="string"&&(E=E.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(E)&&/[\dz]$/i.test(E)&&E.length>4))}},9187:function(D,E,e){var _=e(31353),w=e(72077),s=e(6614),T=s("Object.prototype.toString"),m=e(84543)(),f=e(40383),l=typeof globalThis>"u"?e.g:globalThis,t=w(),i=s("Array.prototype.indexOf",!0)||function(a,u){for(var p=0;p-1}return!!f&&function(p){var c=!1;return _(n,function(b,d){if(!c)try{c=b.call(p)===d}catch{}}),c}(a)}},44517:function(D){D.exports=function(){var E,e,_;function w(s,T){if(E)if(e){var m="var sharedChunk = {}; ("+E+")(sharedChunk); ("+e+")(sharedChunk);",f={};E(f),(_=T(f)).workerUrl=window.URL.createObjectURL(new Blob([m],{type:"text/javascript"}))}else e=T;else E=T}return w(0,function(s){function T(S,z){return S(z={exports:{}},z.exports),z.exports}var m="1.10.1",f=l;function l(S,z,Z,le){this.cx=3*S,this.bx=3*(Z-S)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*z,this.by=3*(le-z)-this.cy,this.ay=1-this.cy-this.by,this.p1x=S,this.p1y=le,this.p2x=Z,this.p2y=le}l.prototype.sampleCurveX=function(S){return((this.ax*S+this.bx)*S+this.cx)*S},l.prototype.sampleCurveY=function(S){return((this.ay*S+this.by)*S+this.cy)*S},l.prototype.sampleCurveDerivativeX=function(S){return(3*this.ax*S+2*this.bx)*S+this.cx},l.prototype.solveCurveX=function(S,z){var Z,le,ke,Ie,qe;for(z===void 0&&(z=1e-6),ke=S,qe=0;qe<8;qe++){if(Ie=this.sampleCurveX(ke)-S,Math.abs(Ie)(le=1))return le;for(;ZIe?Z=ke:le=ke,ke=.5*(le-Z)+Z}return ke},l.prototype.solve=function(S,z){return this.sampleCurveY(this.solveCurveX(S,z))};var t=i;function i(S,z){this.x=S,this.y=z}function r(S,z,Z,le){var ke=new f(S,z,Z,le);return function(Ie){return ke.solve(Ie)}}i.prototype={clone:function(){return new i(this.x,this.y)},add:function(S){return this.clone()._add(S)},sub:function(S){return this.clone()._sub(S)},multByPoint:function(S){return this.clone()._multByPoint(S)},divByPoint:function(S){return this.clone()._divByPoint(S)},mult:function(S){return this.clone()._mult(S)},div:function(S){return this.clone()._div(S)},rotate:function(S){return this.clone()._rotate(S)},rotateAround:function(S,z){return this.clone()._rotateAround(S,z)},matMult:function(S){return this.clone()._matMult(S)},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(S){return this.x===S.x&&this.y===S.y},dist:function(S){return Math.sqrt(this.distSqr(S))},distSqr:function(S){var z=S.x-this.x,Z=S.y-this.y;return z*z+Z*Z},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(S){return Math.atan2(this.y-S.y,this.x-S.x)},angleWith:function(S){return this.angleWithSep(S.x,S.y)},angleWithSep:function(S,z){return Math.atan2(this.x*z-this.y*S,this.x*S+this.y*z)},_matMult:function(S){var z=S[0]*this.x+S[1]*this.y,Z=S[2]*this.x+S[3]*this.y;return this.x=z,this.y=Z,this},_add:function(S){return this.x+=S.x,this.y+=S.y,this},_sub:function(S){return this.x-=S.x,this.y-=S.y,this},_mult:function(S){return this.x*=S,this.y*=S,this},_div:function(S){return this.x/=S,this.y/=S,this},_multByPoint:function(S){return this.x*=S.x,this.y*=S.y,this},_divByPoint:function(S){return this.x/=S.x,this.y/=S.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var S=this.y;return this.y=this.x,this.x=-S,this},_rotate:function(S){var z=Math.cos(S),Z=Math.sin(S),le=z*this.x-Z*this.y,ke=Z*this.x+z*this.y;return this.x=le,this.y=ke,this},_rotateAround:function(S,z){var Z=Math.cos(S),le=Math.sin(S),ke=z.x+Z*(this.x-z.x)-le*(this.y-z.y),Ie=z.y+le*(this.x-z.x)+Z*(this.y-z.y);return this.x=ke,this.y=Ie,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},i.convert=function(S){return S instanceof i?S:Array.isArray(S)?new i(S[0],S[1]):S};var n=r(.25,.1,.25,1);function o(S,z,Z){return Math.min(Z,Math.max(z,S))}function a(S,z,Z){var le=Z-z,ke=((S-z)%le+le)%le+z;return ke===z?Z:ke}function u(S){for(var z=[],Z=arguments.length-1;Z-- >0;)z[Z]=arguments[Z+1];for(var le=0,ke=z;le>z/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,S)}()}function d(S){return!!S&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(S)}function v(S,z){S.forEach(function(Z){z[Z]&&(z[Z]=z[Z].bind(z))})}function x(S,z){return S.indexOf(z,S.length-z.length)!==-1}function g(S,z,Z){var le={};for(var ke in S)le[ke]=z.call(Z||this,S[ke],ke,S);return le}function y(S,z,Z){var le={};for(var ke in S)z.call(Z||this,S[ke],ke,S)&&(le[ke]=S[ke]);return le}function k(S){return Array.isArray(S)?S.map(k):typeof S=="object"&&S?g(S,k):S}var h={};function M(S){h[S]||(typeof console<"u"&&console.warn(S),h[S]=!0)}function A(S,z,Z){return(Z.y-S.y)*(z.x-S.x)>(z.y-S.y)*(Z.x-S.x)}function C(S){for(var z=0,Z=0,le=S.length,ke=le-1,Ie=void 0,qe=void 0;Z@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,function(le,ke,Ie,qe){var it=Ie||qe;return z[ke]=!it||it.toLowerCase(),""}),z["max-age"]){var Z=parseInt(z["max-age"],10);isNaN(Z)?delete z["max-age"]:z["max-age"]=Z}return z}var I=null;function R(S){if(I==null){var z=S.navigator?S.navigator.userAgent:null;I=!!S.safari||!(!z||!(/\b(iPad|iPhone|iPod)\b/.test(z)||z.match("Safari")&&!z.match("Chrome")))}return I}function U(S){try{var z=self[S];return z.setItem("_mapbox_test_",1),z.removeItem("_mapbox_test_"),!0}catch{return!1}}var B,G,N,j,V=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),H=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,ee=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,Q={now:V,frame:function(S){var z=H(S);return{cancel:function(){return ee(z)}}},getImageData:function(S,z){z===void 0&&(z=0);var Z=self.document.createElement("canvas"),le=Z.getContext("2d");if(!le)throw new Error("failed to create canvas 2d context");return Z.width=S.width,Z.height=S.height,le.drawImage(S,0,0,S.width,S.height),le.getImageData(-z,-z,S.width+2*z,S.height+2*z)},resolveURL:function(S){return B||(B=self.document.createElement("a")),B.href=S,B.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return!!self.matchMedia&&(G==null&&(G=self.matchMedia("(prefers-reduced-motion: reduce)")),G.matches)}},Y={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},X={supported:!1,testSupport:function(S){!K&&j&&(te?ae(S):N=S)}},K=!1,te=!1;function ae(S){var z=S.createTexture();S.bindTexture(S.TEXTURE_2D,z);try{if(S.texImage2D(S.TEXTURE_2D,0,S.RGBA,S.RGBA,S.UNSIGNED_BYTE,j),S.isContextLost())return;X.supported=!0}catch{}S.deleteTexture(z),K=!0}self.document&&((j=self.document.createElement("img")).onload=function(){N&&ae(N),N=null,te=!0},j.onerror=function(){K=!0,N=null},j.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var oe="01",se=function(S,z){this._transformRequestFn=S,this._customAccessToken=z,this._createSkuToken()};function fe(S){return S.indexOf("mapbox:")===0}se.prototype._createSkuToken=function(){var S=function(){for(var z="",Z=0;Z<10;Z++)z+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",oe,z].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=S.token,this._skuTokenExpiresAt=S.tokenExpiresAt},se.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},se.prototype.transformRequest=function(S,z){return this._transformRequestFn&&this._transformRequestFn(S,z)||{url:S}},se.prototype.normalizeStyleURL=function(S,z){if(!fe(S))return S;var Z=pe(S);return Z.path="/styles/v1"+Z.path,this._makeAPIURL(Z,this._customAccessToken||z)},se.prototype.normalizeGlyphsURL=function(S,z){if(!fe(S))return S;var Z=pe(S);return Z.path="/fonts/v1"+Z.path,this._makeAPIURL(Z,this._customAccessToken||z)},se.prototype.normalizeSourceURL=function(S,z){if(!fe(S))return S;var Z=pe(S);return Z.path="/v4/"+Z.authority+".json",Z.params.push("secure"),this._makeAPIURL(Z,this._customAccessToken||z)},se.prototype.normalizeSpriteURL=function(S,z,Z,le){var ke=pe(S);return fe(S)?(ke.path="/styles/v1"+ke.path+"/sprite"+z+Z,this._makeAPIURL(ke,this._customAccessToken||le)):(ke.path+=""+z+Z,ye(ke))},se.prototype.normalizeTileURL=function(S,z){if(this._isSkuTokenExpired()&&this._createSkuToken(),S&&!fe(S))return S;var Z=pe(S),le=Q.devicePixelRatio>=2||z===512?"@2x":"",ke=X.supported?".webp":"$1";Z.path=Z.path.replace(/(\.(png|jpg)\d*)(?=$)/,""+le+ke),Z.path=Z.path.replace(/^.+\/v4\//,"/"),Z.path="/v4"+Z.path;var Ie=this._customAccessToken||function(qe){for(var it=0,dt=qe;it=1&&self.localStorage.setItem(z,JSON.stringify(this.eventData))}catch{M("Unable to write to LocalStorage")}},Ae.prototype.processRequests=function(S){},Ae.prototype.postEvent=function(S,z,Z,le){var ke=this;if(Y.EVENTS_URL){var Ie=pe(Y.EVENTS_URL);Ie.params.push("access_token="+(le||Y.ACCESS_TOKEN||""));var qe={event:this.type,created:new Date(S).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:m,skuId:oe,userId:this.anonId},it=z?u(qe,z):qe,dt={url:ye(Ie),headers:{"Content-Type":"text/plain"},body:JSON.stringify([it])};this.pendingRequest=It(dt,function(St){ke.pendingRequest=null,Z(St),ke.saveEventData(),ke.processRequests(le)})}},Ae.prototype.queueRequest=function(S,z){this.queue.push(S),this.processRequests(z)};var Me,Ce,ne=function(S){function z(){S.call(this,"map.load"),this.success={},this.skuToken=""}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.postMapLoadEvent=function(Z,le,ke,Ie){this.skuToken=ke,(Y.EVENTS_URL&&Ie||Y.ACCESS_TOKEN&&Array.isArray(Z)&&Z.some(function(qe){return fe(qe)||he(qe)}))&&this.queueRequest({id:le,timestamp:Date.now()},Ie)},z.prototype.processRequests=function(Z){var le=this;if(!this.pendingRequest&&this.queue.length!==0){var ke=this.queue.shift(),Ie=ke.id,qe=ke.timestamp;Ie&&this.success[Ie]||(this.anonId||this.fetchEventData(),d(this.anonId)||(this.anonId=b()),this.postEvent(qe,{skuToken:this.skuToken},function(it){it||Ie&&(le.success[Ie]=!0)},Z))}},z}(Ae),ue=function(S){function z(Z){S.call(this,"appUserTurnstile"),this._customAccessToken=Z}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.postTurnstileEvent=function(Z,le){Y.EVENTS_URL&&Y.ACCESS_TOKEN&&Array.isArray(Z)&&Z.some(function(ke){return fe(ke)||he(ke)})&&this.queueRequest(Date.now(),le)},z.prototype.processRequests=function(Z){var le=this;if(!this.pendingRequest&&this.queue.length!==0){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var ke=we(Y.ACCESS_TOKEN),Ie=ke?ke.u:Y.ACCESS_TOKEN,qe=Ie!==this.eventData.tokenU;d(this.anonId)||(this.anonId=b(),qe=!0);var it=this.queue.shift();if(this.eventData.lastSuccess){var dt=new Date(this.eventData.lastSuccess),St=new Date(it),Rt=(it-this.eventData.lastSuccess)/864e5;qe=qe||Rt>=1||Rt<-1||dt.getDate()!==St.getDate()}else qe=!0;if(!qe)return this.processRequests();this.postEvent(it,{"enabled.telemetry":!1},function(Ht){Ht||(le.eventData.lastSuccess=it,le.eventData.tokenU=Ie)},Z)}},z}(Ae),me=new ue,Te=me.postTurnstileEvent.bind(me),Ee=new ne,Ue=Ee.postMapLoadEvent.bind(Ee),De="mapbox-tiles",je=500,ge=50;function be(){self.caches&&!Me&&(Me=self.caches.open(De))}function Se(S,z,Z){if(be(),Me){var le={status:z.status,statusText:z.statusText,headers:new self.Headers};z.headers.forEach(function(Ie,qe){return le.headers.set(qe,Ie)});var ke=O(z.headers.get("Cache-Control")||"");ke["no-store"]||(ke["max-age"]&&le.headers.set("Expires",new Date(Z+1e3*ke["max-age"]).toUTCString()),new Date(le.headers.get("Expires")).getTime()-Z<42e4||function(Ie,qe){if(Ce===void 0)try{new Response(new ReadableStream),Ce=!0}catch{Ce=!1}Ce?qe(Ie.body):Ie.blob().then(qe)}(z,function(Ie){var qe=new self.Response(Ie,le);be(),Me&&Me.then(function(it){return it.put(Ne(S.url),qe)}).catch(function(it){return M(it.message)})}))}}function Ne(S){var z=S.indexOf("?");return z<0?S:S.slice(0,z)}function Ye(S,z){if(be(),!Me)return z(null);var Z=Ne(S.url);Me.then(function(le){le.match(Z).then(function(ke){var Ie=function(qe){if(!qe)return!1;var it=new Date(qe.headers.get("Expires")||0),dt=O(qe.headers.get("Cache-Control")||"");return it>Date.now()&&!dt["no-cache"]}(ke);le.delete(Z),Ie&&le.put(Z,ke.clone()),z(null,ke,Ie)}).catch(z)}).catch(z)}var Ze,st=1/0;function ot(){return Ze==null&&(Ze=self.OffscreenCanvas&&new self.OffscreenCanvas(1,1).getContext("2d")&&typeof self.createImageBitmap=="function"),Ze}var ft={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(ft);var yt=function(S){function z(Z,le,ke){le===401&&he(ke)&&(Z+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),S.call(this,Z),this.status=le,this.url=ke,this.name=this.constructor.name,this.message=Z}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},z}(Error),Et=L()?function(){return self.worker&&self.worker.referrer}:function(){return(self.location.protocol==="blob:"?self.parent:self).location.href};function Tt(S,z){var Z,le=new self.AbortController,ke=new self.Request(S.url,{method:S.method||"GET",body:S.body,credentials:S.credentials,headers:S.headers,referrer:Et(),signal:le.signal}),Ie=!1,qe=!1,it=(Z=ke.url).indexOf("sku=")>0&&he(Z);S.type==="json"&&ke.headers.set("Accept","application/json");var dt=function(Rt,Ht,Yt){if(!qe){if(Rt&&Rt.message!=="SecurityError"&&M(Rt),Ht&&Yt)return St(Ht);var Zt=Date.now();self.fetch(ke).then(function(cn){if(cn.ok){var Tn=it?cn.clone():null;return St(cn,Tn,Zt)}return z(new yt(cn.statusText,cn.status,S.url))}).catch(function(cn){cn.code!==20&&z(new Error(cn.message))})}},St=function(Rt,Ht,Yt){(S.type==="arrayBuffer"?Rt.arrayBuffer():S.type==="json"?Rt.json():Rt.text()).then(function(Zt){qe||(Ht&&Yt&&Se(ke,Ht,Yt),Ie=!0,z(null,Zt,Rt.headers.get("Cache-Control"),Rt.headers.get("Expires")))}).catch(function(Zt){qe||z(new Error(Zt.message))})};return it?Ye(ke,dt):dt(null,null),{cancel:function(){qe=!0,Ie||le.abort()}}}var xt=function(S,z){if(Z=S.url,!(/^file:/.test(Z)||/^file:/.test(Et())&&!/^\w+:/.test(Z))){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty("signal"))return Tt(S,z);if(L()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",S,z,void 0,!0)}var Z;return function(le,ke){var Ie=new self.XMLHttpRequest;for(var qe in Ie.open(le.method||"GET",le.url,!0),le.type==="arrayBuffer"&&(Ie.responseType="arraybuffer"),le.headers)Ie.setRequestHeader(qe,le.headers[qe]);return le.type==="json"&&(Ie.responseType="text",Ie.setRequestHeader("Accept","application/json")),Ie.withCredentials=le.credentials==="include",Ie.onerror=function(){ke(new Error(Ie.statusText))},Ie.onload=function(){if((Ie.status>=200&&Ie.status<300||Ie.status===0)&&Ie.response!==null){var it=Ie.response;if(le.type==="json")try{it=JSON.parse(Ie.response)}catch(dt){return ke(dt)}ke(null,it,Ie.getResponseHeader("Cache-Control"),Ie.getResponseHeader("Expires"))}else ke(new yt(Ie.statusText,Ie.status,le.url))},Ie.send(le.body),{cancel:function(){return Ie.abort()}}}(S,z)},Dt=function(S,z){return xt(u(S,{type:"arrayBuffer"}),z)},It=function(S,z){return xt(u(S,{method:"POST"}),z)},Ft,qt;Ft=[],qt=0;var Nt=function(S,z){if(X.supported&&(S.headers||(S.headers={}),S.headers.accept="image/webp,*/*"),qt>=Y.MAX_PARALLEL_IMAGE_REQUESTS){var Z={requestParameters:S,callback:z,cancelled:!1,cancel:function(){this.cancelled=!0}};return Ft.push(Z),Z}qt++;var le=!1,ke=function(){if(!le)for(le=!0,qt--;Ft.length&&qt0||this._oneTimeListeners&&this._oneTimeListeners[S]&&this._oneTimeListeners[S].length>0||this._eventedParent&&this._eventedParent.listens(S)},ht.prototype.setEventedParent=function(S,z){return this._eventedParent=S,this._eventedParentData=z,this};var Oe={$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"},sources:{required:!0,type:"sources"},sprite:{type:"string"},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"},"*":{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"},"*":{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:{}},default:"mapbox"},"*":{type:"*"}},source_geojson:{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},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{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"],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"}},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":{},within:{}}},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},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},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}},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"}}},Be=function(S,z,Z,le){this.message=(S?S+": ":"")+Z,le&&(this.identifier=le),z!=null&&z.__line__&&(this.line=z.__line__)};function Qe(S){var z=S.key,Z=S.value;return Z?[new Be(z,Z,"constants have been deprecated as of v8")]:[]}function ut(S){for(var z=[],Z=arguments.length-1;Z-- >0;)z[Z]=arguments[Z+1];for(var le=0,ke=z;le":S.itemType.kind==="value"?"array":"array<"+z+">"}return S.kind}var kn=[mt,Ot,_t,Pt,Bt,Kt,Wt,yn(Gt),nn];function Wn(S,z){if(z.kind==="error")return null;if(S.kind==="array"){if(z.kind==="array"&&(z.N===0&&z.itemType.kind==="value"||!Wn(S.itemType,z.itemType))&&(typeof S.N!="number"||S.N===z.N))return null}else{if(S.kind===z.kind)return null;if(S.kind==="value"){for(var Z=0,le=kn;Z255?255:dt}function ke(dt){return dt<0?0:dt>1?1:dt}function Ie(dt){return dt[dt.length-1]==="%"?le(parseFloat(dt)/100*255):le(parseInt(dt))}function qe(dt){return dt[dt.length-1]==="%"?ke(parseFloat(dt)/100):ke(parseFloat(dt))}function it(dt,St,Rt){return Rt<0?Rt+=1:Rt>1&&(Rt-=1),6*Rt<1?dt+(St-dt)*Rt*6:2*Rt<1?St:3*Rt<2?dt+(St-dt)*(2/3-Rt)*6:dt}try{z.parseCSSColor=function(dt){var St,Rt=dt.replace(/ /g,"").toLowerCase();if(Rt in Z)return Z[Rt].slice();if(Rt[0]==="#")return Rt.length===4?(St=parseInt(Rt.substr(1),16))>=0&&St<=4095?[(3840&St)>>4|(3840&St)>>8,240&St|(240&St)>>4,15&St|(15&St)<<4,1]:null:Rt.length===7&&(St=parseInt(Rt.substr(1),16))>=0&&St<=16777215?[(16711680&St)>>16,(65280&St)>>8,255&St,1]:null;var Ht=Rt.indexOf("("),Yt=Rt.indexOf(")");if(Ht!==-1&&Yt+1===Rt.length){var Zt=Rt.substr(0,Ht),cn=Rt.substr(Ht+1,Yt-(Ht+1)).split(","),Tn=1;switch(Zt){case"rgba":if(cn.length!==4)return null;Tn=qe(cn.pop());case"rgb":return cn.length!==3?null:[Ie(cn[0]),Ie(cn[1]),Ie(cn[2]),Tn];case"hsla":if(cn.length!==4)return null;Tn=qe(cn.pop());case"hsl":if(cn.length!==3)return null;var Fn=(parseFloat(cn[0])%360+360)%360/360,Dn=qe(cn[1]),Gn=qe(cn[2]),Yn=Gn<=.5?Gn*(Dn+1):Gn+Dn-Gn*Dn,Kn=2*Gn-Yn;return[le(255*it(Kn,Yn,Fn+1/3)),le(255*it(Kn,Yn,Fn)),le(255*it(Kn,Yn,Fn-1/3)),Tn];default:return null}}return null}}catch{}}),fn=_n.parseCSSColor,hn=function(S,z,Z,le){le===void 0&&(le=1),this.r=S,this.g=z,this.b=Z,this.a=le};hn.parse=function(S){if(S){if(S instanceof hn)return S;if(typeof S=="string"){var z=fn(S);if(z)return new hn(z[0]/255*z[3],z[1]/255*z[3],z[2]/255*z[3],z[3])}}},hn.prototype.toString=function(){var S=this.toArray(),z=S[0],Z=S[1],le=S[2],ke=S[3];return"rgba("+Math.round(z)+","+Math.round(Z)+","+Math.round(le)+","+ke+")"},hn.prototype.toArray=function(){var S=this,z=S.r,Z=S.g,le=S.b,ke=S.a;return ke===0?[0,0,0,0]:[255*z/ke,255*Z/ke,255*le/ke,ke]},hn.black=new hn(0,0,0,1),hn.white=new hn(1,1,1,1),hn.transparent=new hn(0,0,0,0),hn.red=new hn(1,0,0,1);var In=function(S,z,Z){this.sensitivity=S?z?"variant":"case":z?"accent":"base",this.locale=Z,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};In.prototype.compare=function(S,z){return this.collator.compare(S,z)},In.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Cn=function(S,z,Z,le,ke){this.text=S,this.image=z,this.scale=Z,this.fontStack=le,this.textColor=ke},Nn=function(S){this.sections=S};Nn.fromString=function(S){return new Nn([new Cn(S,null,null,null,null)])},Nn.prototype.isEmpty=function(){return this.sections.length===0||!this.sections.some(function(S){return S.text.length!==0||S.image&&S.image.name.length!==0})},Nn.factory=function(S){return S instanceof Nn?S:Nn.fromString(S)},Nn.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(S){return S.text}).join("")},Nn.prototype.serialize=function(){for(var S=["format"],z=0,Z=this.sections;z=0&&S<=255&&typeof z=="number"&&z>=0&&z<=255&&typeof Z=="number"&&Z>=0&&Z<=255?le===void 0||typeof le=="number"&&le>=0&&le<=1?null:"Invalid rgba value ["+[S,z,Z,le].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+(typeof le=="number"?[S,z,Z,le]:[S,z,Z]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function or(S){if(S===null||typeof S=="string"||typeof S=="boolean"||typeof S=="number"||S instanceof hn||S instanceof In||S instanceof Nn||S instanceof Hn)return!0;if(Array.isArray(S)){for(var z=0,Z=S;z2){var it=S[1];if(typeof it!="string"||!(it in dr)||it==="object")return z.error('The item type argument of "array" must be one of string, number, boolean',1);Ie=dr[it],le++}else Ie=Gt;if(S.length>3){if(S[2]!==null&&(typeof S[2]!="number"||S[2]<0||S[2]!==Math.floor(S[2])))return z.error('The length argument to "array" must be a positive integer literal',2);qe=S[2],le++}Z=yn(Ie,qe)}else Z=dr[ke];for(var dt=[];le1)&&z.push(le)}}return z.concat(this.args.map(function(ke){return ke.serialize()}))};var $t=function(S){this.type=Kt,this.sections=S};$t.parse=function(S,z){if(S.length<2)return z.error("Expected at least one argument.");var Z=S[1];if(!Array.isArray(Z)&&typeof Z=="object")return z.error("First argument must be an image or text section.");for(var le=[],ke=!1,Ie=1;Ie<=S.length-1;++Ie){var qe=S[Ie];if(ke&&typeof qe=="object"&&!Array.isArray(qe)){ke=!1;var it=null;if(qe["font-scale"]&&!(it=z.parse(qe["font-scale"],1,Ot)))return null;var dt=null;if(qe["text-font"]&&!(dt=z.parse(qe["text-font"],1,yn(_t))))return null;var St=null;if(qe["text-color"]&&!(St=z.parse(qe["text-color"],1,Bt)))return null;var Rt=le[le.length-1];Rt.scale=it,Rt.font=dt,Rt.textColor=St}else{var Ht=z.parse(S[Ie],1,Gt);if(!Ht)return null;var Yt=Ht.type.kind;if(Yt!=="string"&&Yt!=="value"&&Yt!=="null"&&Yt!=="resolvedImage")return z.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");ke=!0,le.push({content:Ht,scale:null,font:null,textColor:null})}}return new $t(le)},$t.prototype.evaluate=function(S){return new Nn(this.sections.map(function(z){var Z=z.content.evaluate(S);return tr(Z)===nn?new Cn("",Z,null,null,null):new Cn(kr(Z),null,z.scale?z.scale.evaluate(S):null,z.font?z.font.evaluate(S).join(","):null,z.textColor?z.textColor.evaluate(S):null)}))},$t.prototype.eachChild=function(S){for(var z=0,Z=this.sections;z-1),Z},mn.prototype.eachChild=function(S){S(this.input)},mn.prototype.outputDefined=function(){return!1},mn.prototype.serialize=function(){return["image",this.input.serialize()]};var Ln={"to-boolean":Pt,"to-color":Bt,"to-number":Ot,"to-string":_t},En=function(S,z){this.type=S,this.args=z};En.parse=function(S,z){if(S.length<2)return z.error("Expected at least one argument.");var Z=S[0];if((Z==="to-boolean"||Z==="to-string")&&S.length!==2)return z.error("Expected one argument.");for(var le=Ln[Z],ke=[],Ie=1;Ie4?"Invalid rbga value "+JSON.stringify(z)+": expected an array containing either three or four numeric values.":qn(z[0],z[1],z[2],z[3])))return new hn(z[0]/255,z[1]/255,z[2]/255,z[3])}throw new ir(Z||"Could not parse color from value '"+(typeof z=="string"?z:String(JSON.stringify(z)))+"'")}if(this.type.kind==="number"){for(var qe=null,it=0,dt=this.args;it=z[2]||S[1]<=z[1]||S[3]>=z[3])}function jt(S,z){var Z,le=(180+S[0])/360,ke=(Z=S[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+Z*Math.PI/360)))/360),Ie=Math.pow(2,z.z);return[Math.round(le*Ie*hr),Math.round(ke*Ie*hr)]}function Jt(S,z,Z){return z[1]>S[1]!=Z[1]>S[1]&&S[0]<(Z[0]-z[0])*(S[1]-z[1])/(Z[1]-z[1])+z[0]}function un(S,z){for(var Z=!1,le=0,ke=z.length;le0&&Ht<0||Rt<0&&Ht>0}function Sn(S,z,Z){for(var le=0,ke=Z;leZ[2]){var ke=.5*le,Ie=S[0]-Z[0]>ke?-le:Z[0]-S[0]>ke?le:0;Ie===0&&(Ie=S[0]-Z[2]>ke?-le:Z[2]-S[0]>ke?le:0),S[0]+=Ie}tn(z,S)}function Bn(S,z,Z,le){for(var ke=Math.pow(2,le.z)*hr,Ie=[le.x*hr,le.y*hr],qe=[],it=0,dt=S;it=0)return!1;var Z=!0;return S.eachChild(function(le){Z&&!sr(le,z)&&(Z=!1)}),Z}er.parse=function(S,z){if(S.length!==2)return z.error("'within' expression requires exactly one argument, but found "+(S.length-1)+" instead.");if(or(S[1])){var Z=S[1];if(Z.type==="FeatureCollection")for(var le=0;lez))throw new ir("Input is not a number.");qe=it-1}return 0}cr.prototype.parse=function(S,z,Z,le,ke){return ke===void 0&&(ke={}),z?this.concat(z,Z,le)._parse(S,ke):this._parse(S,ke)},cr.prototype._parse=function(S,z){function Z(St,Rt,Ht){return Ht==="assert"?new yr(Rt,[St]):Ht==="coerce"?new En(Rt,[St]):St}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", []].');var le=S[0];if(typeof le!="string")return this.error("Expression name must be a string, but found "+typeof le+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var ke=this.registry[le];if(ke){var Ie=ke.parse(S,this);if(!Ie)return null;if(this.expectedType){var qe=this.expectedType,it=Ie.type;if(qe.kind!=="string"&&qe.kind!=="number"&&qe.kind!=="boolean"&&qe.kind!=="object"&&qe.kind!=="array"||it.kind!=="value")if(qe.kind!=="color"&&qe.kind!=="formatted"&&qe.kind!=="resolvedImage"||it.kind!=="value"&&it.kind!=="string"){if(this.checkSubtype(qe,it))return null}else Ie=Z(Ie,qe,z.typeAnnotation||"coerce");else Ie=Z(Ie,qe,z.typeAnnotation||"assert")}if(!(Ie instanceof gr)&&Ie.type.kind!=="resolvedImage"&&vr(Ie)){var dt=new $n;try{Ie=new gr(Ie.type,Ie.evaluate(dt))}catch(St){return this.error(St.message),null}}return Ie}return this.error('Unknown expression "'+le+'". If you wanted a literal array, use ["literal", [...]].',0)}return S===void 0?this.error("'undefined' value invalid. Use null instead."):typeof S=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof S+" instead.")},cr.prototype.concat=function(S,z,Z){var le=typeof S=="number"?this.path.concat(S):this.path,ke=Z?this.scope.concat(Z):this.scope;return new cr(this.registry,le,z||null,ke,this.errors)},cr.prototype.error=function(S){for(var z=[],Z=arguments.length-1;Z-- >0;)z[Z]=arguments[Z+1];var le=""+this.key+z.map(function(ke){return"["+ke+"]"}).join("");this.errors.push(new Lt(le,S))},cr.prototype.checkSubtype=function(S,z){var Z=Wn(S,z);return Z&&this.error(Z),Z};var Mr=function(S,z,Z){this.type=S,this.input=z,this.labels=[],this.outputs=[];for(var le=0,ke=Z;le=qe)return z.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',dt);var Rt=z.parse(it,St,ke);if(!Rt)return null;ke=ke||Rt.type,le.push([qe,Rt])}return new Mr(ke,Z,le)},Mr.prototype.evaluate=function(S){var z=this.labels,Z=this.outputs;if(z.length===1)return Z[0].evaluate(S);var le=this.input.evaluate(S);if(le<=z[0])return Z[0].evaluate(S);var ke=z.length;return le>=z[ke-1]?Z[ke-1].evaluate(S):Z[Sr(z,le)].evaluate(S)},Mr.prototype.eachChild=function(S){S(this.input);for(var z=0,Z=this.outputs;z0&&S.push(this.labels[z]),S.push(this.outputs[z].serialize());return S};var pr=Object.freeze({__proto__:null,number:Lr,color:function(S,z,Z){return new hn(Lr(S.r,z.r,Z),Lr(S.g,z.g,Z),Lr(S.b,z.b,Z),Lr(S.a,z.a,Z))},array:function(S,z,Z){return S.map(function(le,ke){return Lr(le,z[ke],Z)})}}),Pr=.95047,Hr=1.08883,ci=4/29,Ti=6/29,Mi=3*Ti*Ti,fa=Math.PI/180,Hi=180/Math.PI;function xi(S){return S>.008856451679035631?Math.pow(S,.3333333333333333):S/Mi+ci}function Oa(S){return S>Ti?S*S*S:Mi*(S-ci)}function Ka(S){return 255*(S<=.0031308?12.92*S:1.055*Math.pow(S,.4166666666666667)-.055)}function Yo(S){return(S/=255)<=.04045?S/12.92:Math.pow((S+.055)/1.055,2.4)}function Xs(S){var z=Yo(S.r),Z=Yo(S.g),le=Yo(S.b),ke=xi((.4124564*z+.3575761*Z+.1804375*le)/Pr),Ie=xi((.2126729*z+.7151522*Z+.072175*le)/1);return{l:116*Ie-16,a:500*(ke-Ie),b:200*(Ie-xi((.0193339*z+.119192*Z+.9503041*le)/Hr)),alpha:S.a}}function Uu(S){var z=(S.l+16)/116,Z=isNaN(S.a)?z:z+S.a/500,le=isNaN(S.b)?z:z-S.b/200;return z=1*Oa(z),Z=Pr*Oa(Z),le=Hr*Oa(le),new hn(Ka(3.2404542*Z-1.5371385*z-.4985314*le),Ka(-.969266*Z+1.8760108*z+.041556*le),Ka(.0556434*Z-.2040259*z+1.0572252*le),S.alpha)}function pu(S,z,Z){var le=z-S;return S+Z*(le>180||le<-180?le-360*Math.round(le/360):le)}var $s={forward:Xs,reverse:Uu,interpolate:function(S,z,Z){return{l:Lr(S.l,z.l,Z),a:Lr(S.a,z.a,Z),b:Lr(S.b,z.b,Z),alpha:Lr(S.alpha,z.alpha,Z)}}},Qa={forward:function(S){var z=Xs(S),Z=z.l,le=z.a,ke=z.b,Ie=Math.atan2(ke,le)*Hi;return{h:Ie<0?Ie+360:Ie,c:Math.sqrt(le*le+ke*ke),l:Z,alpha:S.a}},reverse:function(S){var z=S.h*fa,Z=S.c;return Uu({l:S.l,a:Math.cos(z)*Z,b:Math.sin(z)*Z,alpha:S.alpha})},interpolate:function(S,z,Z){return{h:pu(S.h,z.h,Z),c:Lr(S.c,z.c,Z),l:Lr(S.l,z.l,Z),alpha:Lr(S.alpha,z.alpha,Z)}}},du=Object.freeze({__proto__:null,lab:$s,hcl:Qa}),Qi=function(S,z,Z,le,ke){this.type=S,this.operator=z,this.interpolation=Z,this.input=le,this.labels=[],this.outputs=[];for(var Ie=0,qe=ke;Ie1}))return z.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);le={name:"cubic-bezier",controlPoints:it}}if(S.length-1<4)return z.error("Expected at least 4 arguments, but found only "+(S.length-1)+".");if((S.length-1)%2!=0)return z.error("Expected an even number of arguments.");if(!(ke=z.parse(ke,2,Ot)))return null;var dt=[],St=null;Z==="interpolate-hcl"||Z==="interpolate-lab"?St=Bt:z.expectedType&&z.expectedType.kind!=="value"&&(St=z.expectedType);for(var Rt=0;Rt=Ht)return z.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',Zt);var Tn=z.parse(Yt,cn,St);if(!Tn)return null;St=St||Tn.type,dt.push([Ht,Tn])}return St.kind==="number"||St.kind==="color"||St.kind==="array"&&St.itemType.kind==="number"&&typeof St.N=="number"?new Qi(St,Z,le,ke,dt):z.error("Type "+ln(St)+" is not interpolatable.")},Qi.prototype.evaluate=function(S){var z=this.labels,Z=this.outputs;if(z.length===1)return Z[0].evaluate(S);var le=this.input.evaluate(S);if(le<=z[0])return Z[0].evaluate(S);var ke=z.length;if(le>=z[ke-1])return Z[ke-1].evaluate(S);var Ie=Sr(z,le),qe=z[Ie],it=z[Ie+1],dt=Qi.interpolationFactor(this.interpolation,le,qe,it),St=Z[Ie].evaluate(S),Rt=Z[Ie+1].evaluate(S);return this.operator==="interpolate"?pr[this.type.kind.toLowerCase()](St,Rt,dt):this.operator==="interpolate-hcl"?Qa.reverse(Qa.interpolate(Qa.forward(St),Qa.forward(Rt),dt)):$s.reverse($s.interpolate($s.forward(St),$s.forward(Rt),dt))},Qi.prototype.eachChild=function(S){S(this.input);for(var z=0,Z=this.outputs;z=Z.length)throw new ir("Array index out of bounds: "+z+" > "+(Z.length-1)+".");if(z!==Math.floor(z))throw new ir("Array index must be an integer, but found "+z+" instead.");return Z[z]},fs.prototype.eachChild=function(S){S(this.index),S(this.input)},fs.prototype.outputDefined=function(){return!1},fs.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var fi=function(S,z){this.type=Pt,this.needle=S,this.haystack=z};fi.parse=function(S,z){if(S.length!==3)return z.error("Expected 2 arguments, but found "+(S.length-1)+" instead.");var Z=z.parse(S[1],1,Gt),le=z.parse(S[2],2,Gt);return Z&&le?wn(Z.type,[Pt,_t,Ot,mt,Gt])?new fi(Z,le):z.error("Expected first argument to be of type boolean, string, number or null, but found "+ln(Z.type)+" instead"):null},fi.prototype.evaluate=function(S){var z=this.needle.evaluate(S),Z=this.haystack.evaluate(S);if(!Z)return!1;if(!on(z,["boolean","string","number","null"]))throw new ir("Expected first argument to be of type boolean, string, number or null, but found "+ln(tr(z))+" instead.");if(!on(Z,["string","array"]))throw new ir("Expected second argument to be of type array or string, but found "+ln(tr(Z))+" instead.");return Z.indexOf(z)>=0},fi.prototype.eachChild=function(S){S(this.needle),S(this.haystack)},fi.prototype.outputDefined=function(){return!0},fi.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var hs=function(S,z,Z){this.type=Ot,this.needle=S,this.haystack=z,this.fromIndex=Z};hs.parse=function(S,z){if(S.length<=2||S.length>=5)return z.error("Expected 3 or 4 arguments, but found "+(S.length-1)+" instead.");var Z=z.parse(S[1],1,Gt),le=z.parse(S[2],2,Gt);if(!Z||!le)return null;if(!wn(Z.type,[Pt,_t,Ot,mt,Gt]))return z.error("Expected first argument to be of type boolean, string, number or null, but found "+ln(Z.type)+" instead");if(S.length===4){var ke=z.parse(S[3],3,Ot);return ke?new hs(Z,le,ke):null}return new hs(Z,le)},hs.prototype.evaluate=function(S){var z=this.needle.evaluate(S),Z=this.haystack.evaluate(S);if(!on(z,["boolean","string","number","null"]))throw new ir("Expected first argument to be of type boolean, string, number or null, but found "+ln(tr(z))+" instead.");if(!on(Z,["string","array"]))throw new ir("Expected second argument to be of type array or string, but found "+ln(tr(Z))+" instead.");if(this.fromIndex){var le=this.fromIndex.evaluate(S);return Z.indexOf(z,le)}return Z.indexOf(z)},hs.prototype.eachChild=function(S){S(this.needle),S(this.haystack),this.fromIndex&&S(this.fromIndex)},hs.prototype.outputDefined=function(){return!1},hs.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var S=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),S]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var ao=function(S,z,Z,le,ke,Ie){this.inputType=S,this.type=z,this.input=Z,this.cases=le,this.outputs=ke,this.otherwise=Ie};ao.parse=function(S,z){if(S.length<5)return z.error("Expected at least 4 arguments, but found only "+(S.length-1)+".");if(S.length%2!=1)return z.error("Expected an even number of arguments.");var Z,le;z.expectedType&&z.expectedType.kind!=="value"&&(le=z.expectedType);for(var ke={},Ie=[],qe=2;qeNumber.MAX_SAFE_INTEGER)return St.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof Yt=="number"&&Math.floor(Yt)!==Yt)return St.error("Numeric branch labels must be integer values.");if(Z){if(St.checkSubtype(Z,tr(Yt)))return null}else Z=tr(Yt);if(ke[String(Yt)]!==void 0)return St.error("Branch labels must be unique.");ke[String(Yt)]=Ie.length}var Zt=z.parse(dt,qe,le);if(!Zt)return null;le=le||Zt.type,Ie.push(Zt)}var cn=z.parse(S[1],1,Gt);if(!cn)return null;var Tn=z.parse(S[S.length-1],S.length-1,le);return Tn?cn.type.kind!=="value"&&z.concat(1).checkSubtype(Z,cn.type)?null:new ao(Z,le,cn,ke,Ie,Tn):null},ao.prototype.evaluate=function(S){var z=this.input.evaluate(S);return(tr(z)===this.inputType&&this.outputs[this.cases[z]]||this.otherwise).evaluate(S)},ao.prototype.eachChild=function(S){S(this.input),this.outputs.forEach(S),S(this.otherwise)},ao.prototype.outputDefined=function(){return this.outputs.every(function(S){return S.outputDefined()})&&this.otherwise.outputDefined()},ao.prototype.serialize=function(){for(var S=this,z=["match",this.input.serialize()],Z=[],le={},ke=0,Ie=Object.keys(this.cases).sort();ke=5)return z.error("Expected 3 or 4 arguments, but found "+(S.length-1)+" instead.");var Z=z.parse(S[1],1,Gt),le=z.parse(S[2],2,Ot);if(!Z||!le)return null;if(!wn(Z.type,[yn(Gt),_t,Gt]))return z.error("Expected first argument to be of type array or string, but found "+ln(Z.type)+" instead");if(S.length===4){var ke=z.parse(S[3],3,Ot);return ke?new Ro(Z.type,Z,le,ke):null}return new Ro(Z.type,Z,le)},Ro.prototype.evaluate=function(S){var z=this.input.evaluate(S),Z=this.beginIndex.evaluate(S);if(!on(z,["string","array"]))throw new ir("Expected first argument to be of type array or string, but found "+ln(tr(z))+" instead.");if(this.endIndex){var le=this.endIndex.evaluate(S);return z.slice(Z,le)}return z.slice(Z)},Ro.prototype.eachChild=function(S){S(this.input),S(this.beginIndex),this.endIndex&&S(this.endIndex)},Ro.prototype.outputDefined=function(){return!1},Ro.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var S=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),S]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var Hu=Xo("==",function(S,z,Z){return z===Z},Vu),qu=Xo("!=",function(S,z,Z){return z!==Z},function(S,z,Z,le){return!Vu(0,z,Z,le)}),Ec=Xo("<",function(S,z,Z){return z",function(S,z,Z){return z>Z},function(S,z,Z,le){return le.compare(z,Z)>0}),Gu=Xo("<=",function(S,z,Z){return z<=Z},function(S,z,Z,le){return le.compare(z,Z)<=0}),vu=Xo(">=",function(S,z,Z){return z>=Z},function(S,z,Z,le){return le.compare(z,Z)>=0}),$o=function(S,z,Z,le,ke){this.type=_t,this.number=S,this.locale=z,this.currency=Z,this.minFractionDigits=le,this.maxFractionDigits=ke};$o.parse=function(S,z){if(S.length!==3)return z.error("Expected two arguments.");var Z=z.parse(S[1],1,Ot);if(!Z)return null;var le=S[2];if(typeof le!="object"||Array.isArray(le))return z.error("NumberFormat options argument must be an object.");var ke=null;if(le.locale&&!(ke=z.parse(le.locale,1,_t)))return null;var Ie=null;if(le.currency&&!(Ie=z.parse(le.currency,1,_t)))return null;var qe=null;if(le["min-fraction-digits"]&&!(qe=z.parse(le["min-fraction-digits"],1,Ot)))return null;var it=null;return le["max-fraction-digits"]&&!(it=z.parse(le["max-fraction-digits"],1,Ot))?null:new $o(Z,ke,Ie,qe,it)},$o.prototype.evaluate=function(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))},$o.prototype.eachChild=function(S){S(this.number),this.locale&&S(this.locale),this.currency&&S(this.currency),this.minFractionDigits&&S(this.minFractionDigits),this.maxFractionDigits&&S(this.maxFractionDigits)},$o.prototype.outputDefined=function(){return!1},$o.prototype.serialize=function(){var S={};return this.locale&&(S.locale=this.locale.serialize()),this.currency&&(S.currency=this.currency.serialize()),this.minFractionDigits&&(S["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(S["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),S]};var Jo=function(S){this.type=Ot,this.input=S};Jo.parse=function(S,z){if(S.length!==2)return z.error("Expected 1 argument, but found "+(S.length-1)+" instead.");var Z=z.parse(S[1],1);return Z?Z.type.kind!=="array"&&Z.type.kind!=="string"&&Z.type.kind!=="value"?z.error("Expected argument of type string or array, but found "+ln(Z.type)+" instead."):new Jo(Z):null},Jo.prototype.evaluate=function(S){var z=this.input.evaluate(S);if(typeof z=="string"||Array.isArray(z))return z.length;throw new ir("Expected value to be of type string or array, but found "+ln(tr(z))+" instead.")},Jo.prototype.eachChild=function(S){S(this.input)},Jo.prototype.outputDefined=function(){return!1},Jo.prototype.serialize=function(){var S=["length"];return this.eachChild(function(z){S.push(z.serialize())}),S};var Js={"==":Hu,"!=":qu,">":gu,"<":Ec,">=":vu,"<=":Gu,array:yr,at:fs,boolean:yr,case:bo,coalesce:qa,collator:Qn,format:$t,image:mn,in:fi,"index-of":hs,interpolate:Qi,"interpolate-hcl":Qi,"interpolate-lab":Qi,length:Jo,let:eo,literal:gr,match:ao,number:yr,"number-format":$o,object:yr,slice:Ro,step:Mr,string:yr,"to-boolean":En,"to-color":En,"to-number":En,"to-string":En,var:fr,within:er};function Ko(S,z){var Z=z[0],le=z[1],ke=z[2],Ie=z[3];Z=Z.evaluate(S),le=le.evaluate(S),ke=ke.evaluate(S);var qe=Ie?Ie.evaluate(S):1,it=qn(Z,le,ke,qe);if(it)throw new ir(it);return new hn(Z/255*qe,le/255*qe,ke/255*qe,qe)}function mu(S,z){return S in z}function yu(S,z){var Z=z[S];return Z===void 0?null:Z}function Ls(S){return{type:S}}function Vl(S){return{result:"success",value:S}}function ps(S){return{result:"error",value:S}}function Ks(S){return S["property-type"]==="data-driven"||S["property-type"]==="cross-faded-data-driven"}function Ps(S){return!!S.expression&&S.expression.parameters.indexOf("zoom")>-1}function Qo(S){return!!S.expression&&S.expression.interpolated}function hi(S){return S instanceof Number?"number":S instanceof String?"string":S instanceof Boolean?"boolean":Array.isArray(S)?"array":S===null?"null":typeof S}function ds(S){return typeof S=="object"&&S!==null&&!Array.isArray(S)}function Cc(S){return S}function Hl(S,z){var Z,le,ke,Ie=z.type==="color",qe=S.stops&&typeof S.stops[0][0]=="object",it=qe||S.property!==void 0,dt=qe||!it,St=S.type||(Qo(z)?"exponential":"interval");if(Ie&&((S=ut({},S)).stops&&(S.stops=S.stops.map(function(_r){return[_r[0],hn.parse(_r[1])]})),S.default?S.default=hn.parse(S.default):S.default=hn.parse(z.default)),S.colorSpace&&S.colorSpace!=="rgb"&&!du[S.colorSpace])throw new Error("Unknown color space: "+S.colorSpace);if(St==="exponential")Z=oo;else if(St==="interval")Z=Qs;else if(St==="categorical"){Z=Os,le=Object.create(null);for(var Rt=0,Ht=S.stops;Rt=S.stops[le-1][0])return S.stops[le-1][1];var ke=Sr(S.stops.map(function(Ie){return Ie[0]}),Z);return S.stops[ke][1]}function oo(S,z,Z){var le=S.base!==void 0?S.base:1;if(hi(Z)!=="number")return bl(S.default,z.default);var ke=S.stops.length;if(ke===1||Z<=S.stops[0][0])return S.stops[0][1];if(Z>=S.stops[ke-1][0])return S.stops[ke-1][1];var Ie=Sr(S.stops.map(function(Ht){return Ht[0]}),Z),qe=function(Ht,Yt,Zt,cn){var Tn=cn-Zt,Fn=Ht-Zt;return Tn===0?0:Yt===1?Fn/Tn:(Math.pow(Yt,Fn)-1)/(Math.pow(Yt,Tn)-1)}(Z,le,S.stops[Ie][0],S.stops[Ie+1][0]),it=S.stops[Ie][1],dt=S.stops[Ie+1][1],St=pr[z.type]||Cc;if(S.colorSpace&&S.colorSpace!=="rgb"){var Rt=du[S.colorSpace];St=function(Ht,Yt){return Rt.reverse(Rt.interpolate(Rt.forward(Ht),Rt.forward(Yt),qe))}}return typeof it.evaluate=="function"?{evaluate:function(){for(var Ht=[],Yt=arguments.length;Yt--;)Ht[Yt]=arguments[Yt];var Zt=it.evaluate.apply(void 0,Ht),cn=dt.evaluate.apply(void 0,Ht);if(Zt!==void 0&&cn!==void 0)return St(Zt,cn,qe)}}:St(it,dt,qe)}function xu(S,z,Z){return z.type==="color"?Z=hn.parse(Z):z.type==="formatted"?Z=Nn.fromString(Z.toString()):z.type==="resolvedImage"?Z=Hn.fromString(Z.toString()):hi(Z)===z.type||z.type==="enum"&&z.values[Z]||(Z=void 0),bl(Z,S.default,z.default)}Zn.register(Js,{error:[{kind:"error"},[_t],function(S,z){var Z=z[0];throw new ir(Z.evaluate(S))}],typeof:[_t,[Gt],function(S,z){return ln(tr(z[0].evaluate(S)))}],"to-rgba":[yn(Ot,4),[Bt],function(S,z){return z[0].evaluate(S).toArray()}],rgb:[Bt,[Ot,Ot,Ot],Ko],rgba:[Bt,[Ot,Ot,Ot,Ot],Ko],has:{type:Pt,overloads:[[[_t],function(S,z){return mu(z[0].evaluate(S),S.properties())}],[[_t,Wt],function(S,z){var Z=z[0],le=z[1];return mu(Z.evaluate(S),le.evaluate(S))}]]},get:{type:Gt,overloads:[[[_t],function(S,z){return yu(z[0].evaluate(S),S.properties())}],[[_t,Wt],function(S,z){var Z=z[0],le=z[1];return yu(Z.evaluate(S),le.evaluate(S))}]]},"feature-state":[Gt,[_t],function(S,z){return yu(z[0].evaluate(S),S.featureState||{})}],properties:[Wt,[],function(S){return S.properties()}],"geometry-type":[_t,[],function(S){return S.geometryType()}],id:[Gt,[],function(S){return S.id()}],zoom:[Ot,[],function(S){return S.globals.zoom}],"heatmap-density":[Ot,[],function(S){return S.globals.heatmapDensity||0}],"line-progress":[Ot,[],function(S){return S.globals.lineProgress||0}],accumulated:[Gt,[],function(S){return S.globals.accumulated===void 0?null:S.globals.accumulated}],"+":[Ot,Ls(Ot),function(S,z){for(var Z=0,le=0,ke=z;le":[Pt,[_t,Gt],function(S,z){var Z=z[0],le=z[1],ke=S.properties()[Z.value],Ie=le.value;return typeof ke==typeof Ie&&ke>Ie}],"filter-id->":[Pt,[Gt],function(S,z){var Z=z[0],le=S.id(),ke=Z.value;return typeof le==typeof ke&&le>ke}],"filter-<=":[Pt,[_t,Gt],function(S,z){var Z=z[0],le=z[1],ke=S.properties()[Z.value],Ie=le.value;return typeof ke==typeof Ie&&ke<=Ie}],"filter-id-<=":[Pt,[Gt],function(S,z){var Z=z[0],le=S.id(),ke=Z.value;return typeof le==typeof ke&&le<=ke}],"filter->=":[Pt,[_t,Gt],function(S,z){var Z=z[0],le=z[1],ke=S.properties()[Z.value],Ie=le.value;return typeof ke==typeof Ie&&ke>=Ie}],"filter-id->=":[Pt,[Gt],function(S,z){var Z=z[0],le=S.id(),ke=Z.value;return typeof le==typeof ke&&le>=ke}],"filter-has":[Pt,[Gt],function(S,z){return z[0].value in S.properties()}],"filter-has-id":[Pt,[],function(S){return S.id()!==null&&S.id()!==void 0}],"filter-type-in":[Pt,[yn(_t)],function(S,z){return z[0].value.indexOf(S.geometryType())>=0}],"filter-id-in":[Pt,[yn(Gt)],function(S,z){return z[0].value.indexOf(S.id())>=0}],"filter-in-small":[Pt,[_t,yn(Gt)],function(S,z){var Z=z[0];return z[1].value.indexOf(S.properties()[Z.value])>=0}],"filter-in-large":[Pt,[_t,yn(Gt)],function(S,z){var Z=z[0],le=z[1];return function(ke,Ie,qe,it){for(;qe<=it;){var dt=qe+it>>1;if(Ie[dt]===ke)return!0;Ie[dt]>ke?it=dt-1:qe=dt+1}return!1}(S.properties()[Z.value],le.value,0,le.value.length-1)}],all:{type:Pt,overloads:[[[Pt,Pt],function(S,z){var Z=z[0],le=z[1];return Z.evaluate(S)&&le.evaluate(S)}],[Ls(Pt),function(S,z){for(var Z=0,le=z;Z0&&typeof S[0]=="string"&&S[0]in Js}function wl(S,z){var Z=new cr(Js,[],z?function(ke){var Ie={color:Bt,string:_t,number:Ot,enum:_t,boolean:Pt,formatted:Kt,resolvedImage:nn};return ke.type==="array"?yn(Ie[ke.value]||Gt,ke.length):Ie[ke.type]}(z):void 0),le=Z.parse(S,void 0,void 0,void 0,z&&z.type==="string"?{typeAnnotation:"coerce"}:void 0);return le?Vl(new _l(le,z)):ps(Z.errors)}_l.prototype.evaluateWithoutErrorHandling=function(S,z,Z,le,ke,Ie){return this._evaluator.globals=S,this._evaluator.feature=z,this._evaluator.featureState=Z,this._evaluator.canonical=le,this._evaluator.availableImages=ke||null,this._evaluator.formattedSection=Ie,this.expression.evaluate(this._evaluator)},_l.prototype.evaluate=function(S,z,Z,le,ke,Ie){this._evaluator.globals=S,this._evaluator.feature=z||null,this._evaluator.featureState=Z||null,this._evaluator.canonical=le,this._evaluator.availableImages=ke||null,this._evaluator.formattedSection=Ie||null;try{var qe=this.expression.evaluate(this._evaluator);if(qe==null||typeof qe=="number"&&qe!=qe)return this._defaultValue;if(this._enumValues&&!(qe in this._enumValues))throw new ir("Expected value to be one of "+Object.keys(this._enumValues).map(function(it){return JSON.stringify(it)}).join(", ")+", but found "+JSON.stringify(qe)+" instead.");return qe}catch(it){return this._warningHistory[it.message]||(this._warningHistory[it.message]=!0,typeof console<"u"&&console.warn(it.message)),this._defaultValue}};var Is=function(S,z){this.kind=S,this._styleExpression=z,this.isStateDependent=S!=="constant"&&!lr(z.expression)};Is.prototype.evaluateWithoutErrorHandling=function(S,z,Z,le,ke,Ie){return this._styleExpression.evaluateWithoutErrorHandling(S,z,Z,le,ke,Ie)},Is.prototype.evaluate=function(S,z,Z,le,ke,Ie){return this._styleExpression.evaluate(S,z,Z,le,ke,Ie)};var Rs=function(S,z,Z,le){this.kind=S,this.zoomStops=Z,this._styleExpression=z,this.isStateDependent=S!=="camera"&&!lr(z.expression),this.interpolationType=le};function tl(S,z){if((S=wl(S,z)).result==="error")return S;var Z=S.value.expression,le=Jn(Z);if(!le&&!Ks(z))return ps([new Lt("","data expressions not supported")]);var ke=sr(Z,["zoom"]);if(!ke&&!Ps(z))return ps([new Lt("","zoom expressions not supported")]);var Ie=kl(Z);if(!Ie&&!ke)return ps([new Lt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(Ie instanceof Lt)return ps([Ie]);if(Ie instanceof Qi&&!Qo(z))return ps([new Lt("",'"interpolate" expressions cannot be used with this property')]);if(!Ie)return Vl(new Is(le?"constant":"source",S.value));var qe=Ie instanceof Qi?Ie.interpolation:void 0;return Vl(new Rs(le?"camera":"composite",S.value,Ie.labels,qe))}Rs.prototype.evaluateWithoutErrorHandling=function(S,z,Z,le,ke,Ie){return this._styleExpression.evaluateWithoutErrorHandling(S,z,Z,le,ke,Ie)},Rs.prototype.evaluate=function(S,z,Z,le,ke,Ie){return this._styleExpression.evaluate(S,z,Z,le,ke,Ie)},Rs.prototype.interpolationFactor=function(S,z,Z){return this.interpolationType?Qi.interpolationFactor(this.interpolationType,S,z,Z):0};var Tl=function(S,z){this._parameters=S,this._specification=z,ut(this,Hl(this._parameters,this._specification))};function kl(S){var z=null;if(S instanceof eo)z=kl(S.result);else if(S instanceof qa)for(var Z=0,le=S.args;Zle.maximum?[new Be(z,Z,Z+" is greater than the maximum value "+le.maximum)]:[]}function bu(S){var z,Z,le,ke=S.valueSpec,Ie=pt(S.value.type),qe={},it=Ie!=="categorical"&&S.value.property===void 0,dt=!it,St=hi(S.value.stops)==="array"&&hi(S.value.stops[0])==="array"&&hi(S.value.stops[0][0])==="object",Rt=so({key:S.key,value:S.value,valueSpec:S.styleSpec.function,style:S.style,styleSpec:S.styleSpec,objectElementValidators:{stops:function(Zt){if(Ie==="identity")return[new Be(Zt.key,Zt.value,'identity function may not have a "stops" property')];var cn=[],Tn=Zt.value;return cn=cn.concat(Al({key:Zt.key,value:Tn,valueSpec:Zt.valueSpec,style:Zt.style,styleSpec:Zt.styleSpec,arrayElementValidator:Ht})),hi(Tn)==="array"&&Tn.length===0&&cn.push(new Be(Zt.key,Tn,"array must have at least one stop")),cn},default:function(Zt){return Oi({key:Zt.key,value:Zt.value,valueSpec:ke,style:Zt.style,styleSpec:Zt.styleSpec})}}});return Ie==="identity"&&it&&Rt.push(new Be(S.key,S.value,'missing required property "property"')),Ie==="identity"||S.value.stops||Rt.push(new Be(S.key,S.value,'missing required property "stops"')),Ie==="exponential"&&S.valueSpec.expression&&!Qo(S.valueSpec)&&Rt.push(new Be(S.key,S.value,"exponential functions not supported")),S.styleSpec.$version>=8&&(dt&&!Ks(S.valueSpec)?Rt.push(new Be(S.key,S.value,"property functions not supported")):it&&!Ps(S.valueSpec)&&Rt.push(new Be(S.key,S.value,"zoom functions not supported"))),Ie!=="categorical"&&!St||S.value.property!==void 0||Rt.push(new Be(S.key,S.value,'"property" property is required')),Rt;function Ht(Zt){var cn=[],Tn=Zt.value,Fn=Zt.key;if(hi(Tn)!=="array")return[new Be(Fn,Tn,"array expected, "+hi(Tn)+" found")];if(Tn.length!==2)return[new Be(Fn,Tn,"array length 2 expected, length "+Tn.length+" found")];if(St){if(hi(Tn[0])!=="object")return[new Be(Fn,Tn,"object expected, "+hi(Tn[0])+" found")];if(Tn[0].zoom===void 0)return[new Be(Fn,Tn,"object stop key must have zoom")];if(Tn[0].value===void 0)return[new Be(Fn,Tn,"object stop key must have value")];if(le&&le>pt(Tn[0].zoom))return[new Be(Fn,Tn[0].zoom,"stop zoom values must appear in ascending order")];pt(Tn[0].zoom)!==le&&(le=pt(Tn[0].zoom),Z=void 0,qe={}),cn=cn.concat(so({key:Fn+"[0]",value:Tn[0],valueSpec:{zoom:{}},style:Zt.style,styleSpec:Zt.styleSpec,objectElementValidators:{zoom:Ml,value:Yt}}))}else cn=cn.concat(Yt({key:Fn+"[0]",value:Tn[0],valueSpec:{},style:Zt.style,styleSpec:Zt.styleSpec},Tn));return el(bt(Tn[1]))?cn.concat([new Be(Fn+"[1]",Tn[1],"expressions are not allowed in function stops.")]):cn.concat(Oi({key:Fn+"[1]",value:Tn[1],valueSpec:ke,style:Zt.style,styleSpec:Zt.styleSpec}))}function Yt(Zt,cn){var Tn=hi(Zt.value),Fn=pt(Zt.value),Dn=Zt.value!==null?Zt.value:cn;if(z){if(Tn!==z)return[new Be(Zt.key,Dn,Tn+" stop domain type must match previous stop domain type "+z)]}else z=Tn;if(Tn!=="number"&&Tn!=="string"&&Tn!=="boolean")return[new Be(Zt.key,Dn,"stop domain value must be a number, string, or boolean")];if(Tn!=="number"&&Ie!=="categorical"){var Gn="number expected, "+Tn+" found";return Ks(ke)&&Ie===void 0&&(Gn+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Be(Zt.key,Dn,Gn)]}return Ie!=="categorical"||Tn!=="number"||isFinite(Fn)&&Math.floor(Fn)===Fn?Ie!=="categorical"&&Tn==="number"&&Z!==void 0&&Fn=2&&S[1]!=="$id"&&S[1]!=="$type";case"in":return S.length>=3&&(typeof S[1]!="string"||Array.isArray(S[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return S.length!==3||Array.isArray(S[1])||Array.isArray(S[2]);case"any":case"all":for(var z=0,Z=S.slice(1);zz?1:0}function zs(S){if(!Array.isArray(S))return!1;if(S[0]==="within")return!0;for(var z=1;z"||Z==="<="||Z===">="?bi(S[1],S[2],Z):Z==="any"?(z=S.slice(1),["any"].concat(z.map(Ds))):Z==="all"?["all"].concat(S.slice(1).map(Ds)):Z==="none"?["all"].concat(S.slice(1).map(Ds).map(ga)):Z==="in"?vs(S[1],S.slice(2)):Z==="!in"?ga(vs(S[1],S.slice(2))):Z==="has"?ms(S[1]):Z==="!has"?ga(ms(S[1])):Z!=="within"||S}function bi(S,z,Z){switch(S){case"$type":return["filter-type-"+Z,z];case"$id":return["filter-id-"+Z,z];default:return["filter-"+Z,S,z]}}function vs(S,z){if(z.length===0)return!1;switch(S){case"$type":return["filter-type-in",["literal",z]];case"$id":return["filter-id-in",["literal",z]];default:return z.length>200&&!z.some(function(Z){return typeof Z!=typeof z[0]})?["filter-in-large",S,["literal",z.sort(nl)]]:["filter-in-small",S,["literal",z]]}}function ms(S){switch(S){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",S]}}function ga(S){return["!",S]}function oi(S){return Sl(bt(S.value))?gs(ut({},S,{expressionContext:"filter",valueSpec:{value:"boolean"}})):li(S)}function li(S){var z=S.value,Z=S.key;if(hi(z)!=="array")return[new Be(Z,z,"array expected, "+hi(z)+" found")];var le,ke=S.styleSpec,Ie=[];if(z.length<1)return[new Be(Z,z,"filter array must have at least 1 element")];switch(Ie=Ie.concat(ql({key:Z+"[0]",value:z[0],valueSpec:ke.filter_operator,style:S.style,styleSpec:S.styleSpec})),pt(z[0])){case"<":case"<=":case">":case">=":z.length>=2&&pt(z[1])==="$type"&&Ie.push(new Be(Z,z,'"$type" cannot be use with operator "'+z[0]+'"'));case"==":case"!=":z.length!==3&&Ie.push(new Be(Z,z,'filter array for operator "'+z[0]+'" must have 3 elements'));case"in":case"!in":z.length>=2&&(le=hi(z[1]))!=="string"&&Ie.push(new Be(Z+"[1]",z[1],"string expected, "+le+" found"));for(var qe=2;qe=Rt[Zt+0]&&le>=Rt[Zt+1])?(qe[Yt]=!0,Ie.push(St[Yt])):qe[Yt]=!1}}},Ga.prototype._forEachCell=function(S,z,Z,le,ke,Ie,qe,it){for(var dt=this._convertToCellCoord(S),St=this._convertToCellCoord(z),Rt=this._convertToCellCoord(Z),Ht=this._convertToCellCoord(le),Yt=dt;Yt<=Rt;Yt++)for(var Zt=St;Zt<=Ht;Zt++){var cn=this.d*Zt+Yt;if((!it||it(this._convertFromCellCoord(Yt),this._convertFromCellCoord(Zt),this._convertFromCellCoord(Yt+1),this._convertFromCellCoord(Zt+1)))&&ke.call(this,S,z,Z,le,cn,Ie,qe,it))return}},Ga.prototype._convertFromCellCoord=function(S){return(S-this.padding)/this.scale},Ga.prototype._convertToCellCoord=function(S){return Math.max(0,Math.min(this.d-1,Math.floor(S*this.scale)+this.padding))},Ga.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var S=this.cells,z=3+this.cells.length+1+1,Z=0,le=0;le=0)){var Ht=S[Rt];St[Rt]=Sa[dt].shallow.indexOf(Rt)>=0?Ht:rl(Ht,z)}S instanceof Error&&(St.message=S.message)}if(St.$name)throw new Error("$name property is reserved for worker serialization logic.");return dt!=="Object"&&(St.$name=dt),St}throw new Error("can't serialize object of type "+typeof S)}function il(S){if(S==null||typeof S=="boolean"||typeof S=="number"||typeof S=="string"||S instanceof Boolean||S instanceof Number||S instanceof String||S instanceof Date||S instanceof RegExp||Ra(S)||Yl(S)||ArrayBuffer.isView(S)||S instanceof Wl)return S;if(Array.isArray(S))return S.map(il);if(typeof S=="object"){var z=S.$name||"Object",Z=Sa[z].klass;if(!Z)throw new Error("can't deserialize unregistered class "+z);if(Z.deserialize)return Z.deserialize(S);for(var le=Object.create(Z.prototype),ke=0,Ie=Object.keys(S);ke=0?it:il(it)}}return le}throw new Error("can't deserialize object of type "+typeof S)}var al=function(){this.first=!0};al.prototype.update=function(S,z){var 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=z):this.lastFloorZoom=128&&S<=255},Arabic:function(S){return S>=1536&&S<=1791},"Arabic Supplement":function(S){return S>=1872&&S<=1919},"Arabic Extended-A":function(S){return S>=2208&&S<=2303},"Hangul Jamo":function(S){return S>=4352&&S<=4607},"Unified Canadian Aboriginal Syllabics":function(S){return S>=5120&&S<=5759},Khmer:function(S){return S>=6016&&S<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(S){return S>=6320&&S<=6399},"General Punctuation":function(S){return S>=8192&&S<=8303},"Letterlike Symbols":function(S){return S>=8448&&S<=8527},"Number Forms":function(S){return S>=8528&&S<=8591},"Miscellaneous Technical":function(S){return S>=8960&&S<=9215},"Control Pictures":function(S){return S>=9216&&S<=9279},"Optical Character Recognition":function(S){return S>=9280&&S<=9311},"Enclosed Alphanumerics":function(S){return S>=9312&&S<=9471},"Geometric Shapes":function(S){return S>=9632&&S<=9727},"Miscellaneous Symbols":function(S){return S>=9728&&S<=9983},"Miscellaneous Symbols and Arrows":function(S){return S>=11008&&S<=11263},"CJK Radicals Supplement":function(S){return S>=11904&&S<=12031},"Kangxi Radicals":function(S){return S>=12032&&S<=12255},"Ideographic Description Characters":function(S){return S>=12272&&S<=12287},"CJK Symbols and Punctuation":function(S){return S>=12288&&S<=12351},Hiragana:function(S){return S>=12352&&S<=12447},Katakana:function(S){return S>=12448&&S<=12543},Bopomofo:function(S){return S>=12544&&S<=12591},"Hangul Compatibility Jamo":function(S){return S>=12592&&S<=12687},Kanbun:function(S){return S>=12688&&S<=12703},"Bopomofo Extended":function(S){return S>=12704&&S<=12735},"CJK Strokes":function(S){return S>=12736&&S<=12783},"Katakana Phonetic Extensions":function(S){return S>=12784&&S<=12799},"Enclosed CJK Letters and Months":function(S){return S>=12800&&S<=13055},"CJK Compatibility":function(S){return S>=13056&&S<=13311},"CJK Unified Ideographs Extension A":function(S){return S>=13312&&S<=19903},"Yijing Hexagram Symbols":function(S){return S>=19904&&S<=19967},"CJK Unified Ideographs":function(S){return S>=19968&&S<=40959},"Yi Syllables":function(S){return S>=40960&&S<=42127},"Yi Radicals":function(S){return S>=42128&&S<=42191},"Hangul Jamo Extended-A":function(S){return S>=43360&&S<=43391},"Hangul Syllables":function(S){return S>=44032&&S<=55215},"Hangul Jamo Extended-B":function(S){return S>=55216&&S<=55295},"Private Use Area":function(S){return S>=57344&&S<=63743},"CJK Compatibility Ideographs":function(S){return S>=63744&&S<=64255},"Arabic Presentation Forms-A":function(S){return S>=64336&&S<=65023},"Vertical Forms":function(S){return S>=65040&&S<=65055},"CJK Compatibility Forms":function(S){return S>=65072&&S<=65103},"Small Form Variants":function(S){return S>=65104&&S<=65135},"Arabic Presentation Forms-B":function(S){return S>=65136&&S<=65279},"Halfwidth and Fullwidth Forms":function(S){return S>=65280&&S<=65519}};function ol(S){for(var z=0,Z=S;z=65097&&S<=65103)||Or["CJK Compatibility Ideographs"](S)||Or["CJK Compatibility"](S)||Or["CJK Radicals Supplement"](S)||Or["CJK Strokes"](S)||!(!Or["CJK Symbols and Punctuation"](S)||S>=12296&&S<=12305||S>=12308&&S<=12319||S===12336)||Or["CJK Unified Ideographs Extension A"](S)||Or["CJK Unified Ideographs"](S)||Or["Enclosed CJK Letters and Months"](S)||Or["Hangul Compatibility Jamo"](S)||Or["Hangul Jamo Extended-A"](S)||Or["Hangul Jamo Extended-B"](S)||Or["Hangul Jamo"](S)||Or["Hangul Syllables"](S)||Or.Hiragana(S)||Or["Ideographic Description Characters"](S)||Or.Kanbun(S)||Or["Kangxi Radicals"](S)||Or["Katakana Phonetic Extensions"](S)||Or.Katakana(S)&&S!==12540||!(!Or["Halfwidth and Fullwidth Forms"](S)||S===65288||S===65289||S===65293||S>=65306&&S<=65310||S===65339||S===65341||S===65343||S>=65371&&S<=65503||S===65507||S>=65512&&S<=65519)||!(!Or["Small Form Variants"](S)||S>=65112&&S<=65118||S>=65123&&S<=65126)||Or["Unified Canadian Aboriginal Syllabics"](S)||Or["Unified Canadian Aboriginal Syllabics Extended"](S)||Or["Vertical Forms"](S)||Or["Yijing Hexagram Symbols"](S)||Or["Yi Syllables"](S)||Or["Yi Radicals"](S))))}function Xl(S){return!(uo(S)||function(z){return!!(Or["Latin-1 Supplement"](z)&&(z===167||z===169||z===174||z===177||z===188||z===189||z===190||z===215||z===247)||Or["General Punctuation"](z)&&(z===8214||z===8224||z===8225||z===8240||z===8241||z===8251||z===8252||z===8258||z===8263||z===8264||z===8265||z===8273)||Or["Letterlike Symbols"](z)||Or["Number Forms"](z)||Or["Miscellaneous Technical"](z)&&(z>=8960&&z<=8967||z>=8972&&z<=8991||z>=8996&&z<=9e3||z===9003||z>=9085&&z<=9114||z>=9150&&z<=9165||z===9167||z>=9169&&z<=9179||z>=9186&&z<=9215)||Or["Control Pictures"](z)&&z!==9251||Or["Optical Character Recognition"](z)||Or["Enclosed Alphanumerics"](z)||Or["Geometric Shapes"](z)||Or["Miscellaneous Symbols"](z)&&!(z>=9754&&z<=9759)||Or["Miscellaneous Symbols and Arrows"](z)&&(z>=11026&&z<=11055||z>=11088&&z<=11097||z>=11192&&z<=11243)||Or["CJK Symbols and Punctuation"](z)||Or.Katakana(z)||Or["Private Use Area"](z)||Or["CJK Compatibility Forms"](z)||Or["Small Form Variants"](z)||Or["Halfwidth and Fullwidth Forms"](z)||z===8734||z===8756||z===8757||z>=9984&&z<=10087||z>=10102&&z<=10131||z===65532||z===65533)}(S))}function Cl(S){return Or.Arabic(S)||Or["Arabic Supplement"](S)||Or["Arabic Extended-A"](S)||Or["Arabic Presentation Forms-A"](S)||Or["Arabic Presentation Forms-B"](S)}function ya(S){return S>=1424&&S<=2303||Or["Arabic Presentation Forms-A"](S)||Or["Arabic Presentation Forms-B"](S)}function Vs(S,z){return!(!z&&ya(S)||S>=2304&&S<=3583||S>=3840&&S<=4255||Or.Khmer(S))}function ns(S){for(var z=0,Z=S;z-1&&(xa=co),Hs&&Hs(S)};function Ll(){to.fire(new Ge("pluginStateChange",{pluginStatus:xa,pluginURL:fo}))}var to=new ht,ho=function(){return xa},Fo=function(){if(xa!==Wa||!fo)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");xa=xs,Ll(),fo&&Dt({url:fo},function(S){S?vi(S):(xa=_o,Ll())})},za={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return xa===_o||za.applyArabicShaping!=null},isLoading:function(){return xa===xs},setState:function(S){xa=S.pluginStatus,fo=S.pluginURL},isParsed:function(){return za.applyArabicShaping!=null&&za.processBidirectionalText!=null&&za.processStyledBidirectionalText!=null},getPluginURL:function(){return fo}},di=function(S,z){this.zoom=S,z?(this.now=z.now,this.fadeDuration=z.fadeDuration,this.zoomHistory=z.zoomHistory,this.transition=z.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new al,this.transition={})};di.prototype.isSupportedScript=function(S){return function(z,Z){for(var le=0,ke=z;lethis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:z+(1-z)*Z}:{fromScale:.5,toScale:1,t:1-(1-Z)*z}};var oa=function(S,z){this.property=S,this.value=z,this.expression=function(Z,le){if(ds(Z))return new Tl(Z,le);if(el(Z)){var ke=tl(Z,le);if(ke.result==="error")throw new Error(ke.value.map(function(qe){return qe.key+": "+qe.message}).join(", "));return ke.value}var Ie=Z;return typeof Z=="string"&&le.type==="color"&&(Ie=hn.parse(Z)),{kind:"constant",evaluate:function(){return Ie}}}(z===void 0?S.specification.default:z,S.specification)};oa.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},oa.prototype.possiblyEvaluate=function(S,z,Z){return this.property.possiblyEvaluate(this,S,z,Z)};var wo=function(S){this.property=S,this.value=new oa(S,void 0)};wo.prototype.transitioned=function(S,z){return new Bo(this.property,this.value,z,u({},S.transition,this.transition),S.now)},wo.prototype.untransitioned=function(){return new Bo(this.property,this.value,null,{},0)};var Da=function(S){this._properties=S,this._values=Object.create(S.defaultTransitionablePropertyValues)};Da.prototype.getValue=function(S){return k(this._values[S].value.value)},Da.prototype.setValue=function(S,z){this._values.hasOwnProperty(S)||(this._values[S]=new wo(this._values[S].property)),this._values[S].value=new oa(this._values[S].property,z===null?void 0:k(z))},Da.prototype.getTransition=function(S){return k(this._values[S].transition)},Da.prototype.setTransition=function(S,z){this._values.hasOwnProperty(S)||(this._values[S]=new wo(this._values[S].property)),this._values[S].transition=k(z)||void 0},Da.prototype.serialize=function(){for(var S={},z=0,Z=Object.keys(this._values);zthis.end)return this.prior=null,ke;if(this.value.isDataDriven())return this.prior=null,ke;if(le=1)return 1;var dt=it*it,St=dt*it;return 4*(it<.5?St:3*(it-dt)+St-.75)}(qe))}return ke};var bs=function(S){this._properties=S,this._values=Object.create(S.defaultTransitioningPropertyValues)};bs.prototype.possiblyEvaluate=function(S,z,Z){for(var le=new po(this._properties),ke=0,Ie=Object.keys(this._values);keIe.zoomHistory.lastIntegerZoom?{from:Z,to:le}:{from:ke,to:le}},z.prototype.interpolate=function(Z){return Z},z}(Ur),is=function(S){this.specification=S};is.prototype.possiblyEvaluate=function(S,z,Z,le){if(S.value!==void 0){if(S.expression.kind==="constant"){var ke=S.expression.evaluate(z,null,{},Z,le);return this._calculate(ke,ke,ke,z)}return this._calculate(S.expression.evaluate(new di(Math.floor(z.zoom-1),z)),S.expression.evaluate(new di(Math.floor(z.zoom),z)),S.expression.evaluate(new di(Math.floor(z.zoom+1),z)),z)}},is.prototype._calculate=function(S,z,Z,le){return le.zoom>le.zoomHistory.lastIntegerZoom?{from:S,to:z}:{from:Z,to:z}},is.prototype.interpolate=function(S){return S};var To=function(S){this.specification=S};To.prototype.possiblyEvaluate=function(S,z,Z,le){return!!S.expression.evaluate(z,null,{},Z,le)},To.prototype.interpolate=function(){return!1};var _a=function(S){for(var z in this.properties=S,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],S){var Z=S[z];Z.specification.overridable&&this.overridableProperties.push(z);var le=this.defaultPropertyValues[z]=new oa(Z,void 0),ke=this.defaultTransitionablePropertyValues[z]=new wo(Z);this.defaultTransitioningPropertyValues[z]=ke.untransitioned(),this.defaultPossiblyEvaluatedValues[z]=le.possiblyEvaluate({})}};Cr("DataDrivenProperty",Ur),Cr("DataConstantProperty",Fr),Cr("CrossFadedDataDrivenProperty",sl),Cr("CrossFadedProperty",is),Cr("ColorRampProperty",To);var $l="-transition",Fa=function(S){function z(Z,le){if(S.call(this),this.id=Z.id,this.type=Z.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},Z.type!=="custom"&&(this.metadata=Z.metadata,this.minzoom=Z.minzoom,this.maxzoom=Z.maxzoom,Z.type!=="background"&&(this.source=Z.source,this.sourceLayer=Z["source-layer"],this.filter=Z.filter),le.layout&&(this._unevaluatedLayout=new rs(le.layout)),le.paint)){for(var ke in this._transitionablePaint=new Da(le.paint),Z.paint)this.setPaintProperty(ke,Z.paint[ke],{validate:!1});for(var Ie in Z.layout)this.setLayoutProperty(Ie,Z.layout[Ie],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new po(le.paint)}}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},z.prototype.getLayoutProperty=function(Z){return Z==="visibility"?this.visibility:this._unevaluatedLayout.getValue(Z)},z.prototype.setLayoutProperty=function(Z,le,ke){if(ke===void 0&&(ke={}),le!=null){var Ie="layers."+this.id+".layout."+Z;if(this._validate(ys,Ie,Z,le,ke))return}Z!=="visibility"?this._unevaluatedLayout.setValue(Z,le):this.visibility=le},z.prototype.getPaintProperty=function(Z){return x(Z,$l)?this._transitionablePaint.getTransition(Z.slice(0,-$l.length)):this._transitionablePaint.getValue(Z)},z.prototype.setPaintProperty=function(Z,le,ke){if(ke===void 0&&(ke={}),le!=null){var Ie="layers."+this.id+".paint."+Z;if(this._validate(Ia,Ie,Z,le,ke))return!1}if(x(Z,$l))return this._transitionablePaint.setTransition(Z.slice(0,-$l.length),le||void 0),!1;var qe=this._transitionablePaint._values[Z],it=qe.property.specification["property-type"]==="cross-faded-data-driven",dt=qe.value.isDataDriven(),St=qe.value;this._transitionablePaint.setValue(Z,le),this._handleSpecialPaintPropertyUpdate(Z);var Rt=this._transitionablePaint._values[Z].value;return Rt.isDataDriven()||dt||it||this._handleOverridablePaintPropertyUpdate(Z,St,Rt)},z.prototype._handleSpecialPaintPropertyUpdate=function(Z){},z.prototype._handleOverridablePaintPropertyUpdate=function(Z,le,ke){return!1},z.prototype.isHidden=function(Z){return!!(this.minzoom&&Z=this.maxzoom)||this.visibility==="none"},z.prototype.updateTransitions=function(Z){this._transitioningPaint=this._transitionablePaint.transitioned(Z,this._transitioningPaint)},z.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},z.prototype.recalculate=function(Z,le){Z.getCrossfadeParameters&&(this._crossfadeParameters=Z.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(Z,void 0,le)),this.paint=this._transitioningPaint.possiblyEvaluate(Z,void 0,le)},z.prototype.serialize=function(){var Z={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&&(Z.layout=Z.layout||{},Z.layout.visibility=this.visibility),y(Z,function(le,ke){return!(le===void 0||ke==="layout"&&!Object.keys(le).length||ke==="paint"&&!Object.keys(le).length)})},z.prototype._validate=function(Z,le,ke,Ie,qe){return qe===void 0&&(qe={}),(!qe||qe.validate!==!1)&&lo(this,Z.call(ma,{key:le,layerType:this.type,objectKey:ke,value:Ie,styleSpec:Oe,style:{glyphs:!0,sprite:!0}}))},z.prototype.is3D=function(){return!1},z.prototype.isTileClipped=function(){return!1},z.prototype.hasOffscreenPass=function(){return!1},z.prototype.resize=function(){},z.prototype.isStateDependent=function(){for(var Z in this.paint._values){var le=this.paint.get(Z);if(le instanceof ba&&Ks(le.property.specification)&&(le.value.kind==="source"||le.value.kind==="composite")&&le.value.isStateDependent)return!0}return!1},z}(ht),ll={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},as=function(S,z){this._structArray=S,this._pos1=z*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},_i=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Si(S,z){z===void 0&&(z=1);var Z=0,le=0;return{members:S.map(function(ke){var Ie,qe=(Ie=ke.type,ll[Ie].BYTES_PER_ELEMENT),it=Z=Jl(Z,Math.max(z,qe)),dt=ke.components||1;return le=Math.max(le,qe),Z+=qe*dt,{name:ke.name,type:ke.type,components:dt,offset:it}}),size:Jl(Z,Math.max(le,z)),alignment:z}}function Jl(S,z){return Math.ceil(S/z)*z}_i.serialize=function(S,z){return S._trim(),z&&(S.isTransferred=!0,z.push(S.arrayBuffer)),{length:S.length,arrayBuffer:S.arrayBuffer}},_i.deserialize=function(S){var z=Object.create(this.prototype);return z.arrayBuffer=S.arrayBuffer,z.length=S.length,z.capacity=S.arrayBuffer.byteLength/z.bytesPerElement,z._refreshViews(),z},_i.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},_i.prototype.clear=function(){this.length=0},_i.prototype.resize=function(S){this.reserve(S),this.length=S},_i.prototype.reserve=function(S){if(S>this.capacity){this.capacity=Math.max(S,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var z=this.uint8;this._refreshViews(),z&&this.uint8.set(z)}},_i.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var et=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le){var ke=this.length;return this.resize(ke+1),this.emplace(ke,Z,le)},z.prototype.emplace=function(Z,le,ke){var Ie=2*Z;return this.int16[Ie+0]=le,this.int16[Ie+1]=ke,Z},z}(_i);et.prototype.bytesPerElement=4,Cr("StructArrayLayout2i4",et);var rt=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie){var qe=this.length;return this.resize(qe+1),this.emplace(qe,Z,le,ke,Ie)},z.prototype.emplace=function(Z,le,ke,Ie,qe){var it=4*Z;return this.int16[it+0]=le,this.int16[it+1]=ke,this.int16[it+2]=Ie,this.int16[it+3]=qe,Z},z}(_i);rt.prototype.bytesPerElement=8,Cr("StructArrayLayout4i8",rt);var ct=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe,it){var dt=this.length;return this.resize(dt+1),this.emplace(dt,Z,le,ke,Ie,qe,it)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it,dt){var St=6*Z;return this.int16[St+0]=le,this.int16[St+1]=ke,this.int16[St+2]=Ie,this.int16[St+3]=qe,this.int16[St+4]=it,this.int16[St+5]=dt,Z},z}(_i);ct.prototype.bytesPerElement=12,Cr("StructArrayLayout2i4i12",ct);var vt=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe,it){var dt=this.length;return this.resize(dt+1),this.emplace(dt,Z,le,ke,Ie,qe,it)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it,dt){var St=4*Z,Rt=8*Z;return this.int16[St+0]=le,this.int16[St+1]=ke,this.uint8[Rt+4]=Ie,this.uint8[Rt+5]=qe,this.uint8[Rt+6]=it,this.uint8[Rt+7]=dt,Z},z}(_i);vt.prototype.bytesPerElement=8,Cr("StructArrayLayout2i4ub8",vt);var Mt=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht){var Yt=this.length;return this.resize(Yt+1),this.emplace(Yt,Z,le,ke,Ie,qe,it,dt,St,Rt,Ht)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt){var Zt=9*Z,cn=18*Z;return this.uint16[Zt+0]=le,this.uint16[Zt+1]=ke,this.uint16[Zt+2]=Ie,this.uint16[Zt+3]=qe,this.uint16[Zt+4]=it,this.uint16[Zt+5]=dt,this.uint16[Zt+6]=St,this.uint16[Zt+7]=Rt,this.uint8[cn+16]=Ht,this.uint8[cn+17]=Yt,Z},z}(_i);Mt.prototype.bytesPerElement=18,Cr("StructArrayLayout8ui2ub18",Mt);var kt=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt){var cn=this.length;return this.resize(cn+1),this.emplace(cn,Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt,cn){var Tn=12*Z;return this.int16[Tn+0]=le,this.int16[Tn+1]=ke,this.int16[Tn+2]=Ie,this.int16[Tn+3]=qe,this.uint16[Tn+4]=it,this.uint16[Tn+5]=dt,this.uint16[Tn+6]=St,this.uint16[Tn+7]=Rt,this.int16[Tn+8]=Ht,this.int16[Tn+9]=Yt,this.int16[Tn+10]=Zt,this.int16[Tn+11]=cn,Z},z}(_i);kt.prototype.bytesPerElement=24,Cr("StructArrayLayout4i4ui4i24",kt);var q=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke){var Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,Z,le,ke)},z.prototype.emplace=function(Z,le,ke,Ie){var qe=3*Z;return this.float32[qe+0]=le,this.float32[qe+1]=ke,this.float32[qe+2]=Ie,Z},z}(_i);q.prototype.bytesPerElement=12,Cr("StructArrayLayout3f12",q);var $=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z){var le=this.length;return this.resize(le+1),this.emplace(le,Z)},z.prototype.emplace=function(Z,le){var ke=1*Z;return this.uint32[ke+0]=le,Z},z}(_i);$.prototype.bytesPerElement=4,Cr("StructArrayLayout1ul4",$);var W=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.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)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe,it,dt,St,Rt){var Ht=this.length;return this.resize(Ht+1),this.emplace(Ht,Z,le,ke,Ie,qe,it,dt,St,Rt)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht){var Yt=10*Z,Zt=5*Z;return this.int16[Yt+0]=le,this.int16[Yt+1]=ke,this.int16[Yt+2]=Ie,this.int16[Yt+3]=qe,this.int16[Yt+4]=it,this.int16[Yt+5]=dt,this.uint32[Zt+3]=St,this.uint16[Yt+8]=Rt,this.uint16[Yt+9]=Ht,Z},z}(_i);W.prototype.bytesPerElement=20,Cr("StructArrayLayout6i1ul2ui20",W);var ie=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe,it){var dt=this.length;return this.resize(dt+1),this.emplace(dt,Z,le,ke,Ie,qe,it)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it,dt){var St=6*Z;return this.int16[St+0]=le,this.int16[St+1]=ke,this.int16[St+2]=Ie,this.int16[St+3]=qe,this.int16[St+4]=it,this.int16[St+5]=dt,Z},z}(_i);ie.prototype.bytesPerElement=12,Cr("StructArrayLayout2i2i2i12",ie);var _e=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe){var it=this.length;return this.resize(it+1),this.emplace(it,Z,le,ke,Ie,qe)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it){var dt=4*Z,St=8*Z;return this.float32[dt+0]=le,this.float32[dt+1]=ke,this.float32[dt+2]=Ie,this.int16[St+6]=qe,this.int16[St+7]=it,Z},z}(_i);_e.prototype.bytesPerElement=16,Cr("StructArrayLayout2f1f2i16",_e);var ze=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie){var qe=this.length;return this.resize(qe+1),this.emplace(qe,Z,le,ke,Ie)},z.prototype.emplace=function(Z,le,ke,Ie,qe){var it=12*Z,dt=3*Z;return this.uint8[it+0]=le,this.uint8[it+1]=ke,this.float32[dt+1]=Ie,this.float32[dt+2]=qe,Z},z}(_i);ze.prototype.bytesPerElement=12,Cr("StructArrayLayout2ub2f12",ze);var He=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke){var Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,Z,le,ke)},z.prototype.emplace=function(Z,le,ke,Ie){var qe=3*Z;return this.uint16[qe+0]=le,this.uint16[qe+1]=ke,this.uint16[qe+2]=Ie,Z},z}(_i);He.prototype.bytesPerElement=6,Cr("StructArrayLayout3ui6",He);var Xe=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.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)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt,cn,Tn,Fn,Dn,Gn){var Yn=this.length;return this.resize(Yn+1),this.emplace(Yn,Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt,cn,Tn,Fn,Dn,Gn)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt,cn,Tn,Fn,Dn,Gn,Yn){var Kn=24*Z,ar=12*Z,ur=48*Z;return this.int16[Kn+0]=le,this.int16[Kn+1]=ke,this.uint16[Kn+2]=Ie,this.uint16[Kn+3]=qe,this.uint32[ar+2]=it,this.uint32[ar+3]=dt,this.uint32[ar+4]=St,this.uint16[Kn+10]=Rt,this.uint16[Kn+11]=Ht,this.uint16[Kn+12]=Yt,this.float32[ar+7]=Zt,this.float32[ar+8]=cn,this.uint8[ur+36]=Tn,this.uint8[ur+37]=Fn,this.uint8[ur+38]=Dn,this.uint32[ar+10]=Gn,this.int16[Kn+22]=Yn,Z},z}(_i);Xe.prototype.bytesPerElement=48,Cr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Xe);var at=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.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)},z.prototype.emplaceBack=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt,cn,Tn,Fn,Dn,Gn,Yn,Kn,ar,ur,Er,_r,Ir,Br,$r,jr,Xr){var Vr=this.length;return this.resize(Vr+1),this.emplace(Vr,Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt,cn,Tn,Fn,Dn,Gn,Yn,Kn,ar,ur,Er,_r,Ir,Br,$r,jr,Xr)},z.prototype.emplace=function(Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt,cn,Tn,Fn,Dn,Gn,Yn,Kn,ar,ur,Er,_r,Ir,Br,$r,jr,Xr,Vr){var Nr=34*Z,si=17*Z;return this.int16[Nr+0]=le,this.int16[Nr+1]=ke,this.int16[Nr+2]=Ie,this.int16[Nr+3]=qe,this.int16[Nr+4]=it,this.int16[Nr+5]=dt,this.int16[Nr+6]=St,this.int16[Nr+7]=Rt,this.uint16[Nr+8]=Ht,this.uint16[Nr+9]=Yt,this.uint16[Nr+10]=Zt,this.uint16[Nr+11]=cn,this.uint16[Nr+12]=Tn,this.uint16[Nr+13]=Fn,this.uint16[Nr+14]=Dn,this.uint16[Nr+15]=Gn,this.uint16[Nr+16]=Yn,this.uint16[Nr+17]=Kn,this.uint16[Nr+18]=ar,this.uint16[Nr+19]=ur,this.uint16[Nr+20]=Er,this.uint16[Nr+21]=_r,this.uint16[Nr+22]=Ir,this.uint32[si+12]=Br,this.float32[si+13]=$r,this.float32[si+14]=jr,this.float32[si+15]=Xr,this.float32[si+16]=Vr,Z},z}(_i);at.prototype.bytesPerElement=68,Cr("StructArrayLayout8i15ui1ul4f68",at);var wt=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z){var le=this.length;return this.resize(le+1),this.emplace(le,Z)},z.prototype.emplace=function(Z,le){var ke=1*Z;return this.float32[ke+0]=le,Z},z}(_i);wt.prototype.bytesPerElement=4,Cr("StructArrayLayout1f4",wt);var At=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke){var Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,Z,le,ke)},z.prototype.emplace=function(Z,le,ke,Ie){var qe=3*Z;return this.int16[qe+0]=le,this.int16[qe+1]=ke,this.int16[qe+2]=Ie,Z},z}(_i);At.prototype.bytesPerElement=6,Cr("StructArrayLayout3i6",At);var re=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke){var Ie=this.length;return this.resize(Ie+1),this.emplace(Ie,Z,le,ke)},z.prototype.emplace=function(Z,le,ke,Ie){var qe=2*Z,it=4*Z;return this.uint32[qe+0]=le,this.uint16[it+2]=ke,this.uint16[it+3]=Ie,Z},z}(_i);re.prototype.bytesPerElement=8,Cr("StructArrayLayout1ul2ui8",re);var ve=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le){var ke=this.length;return this.resize(ke+1),this.emplace(ke,Z,le)},z.prototype.emplace=function(Z,le,ke){var Ie=2*Z;return this.uint16[Ie+0]=le,this.uint16[Ie+1]=ke,Z},z}(_i);ve.prototype.bytesPerElement=4,Cr("StructArrayLayout2ui4",ve);var Le=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z){var le=this.length;return this.resize(le+1),this.emplace(le,Z)},z.prototype.emplace=function(Z,le){var ke=1*Z;return this.uint16[ke+0]=le,Z},z}(_i);Le.prototype.bytesPerElement=2,Cr("StructArrayLayout1ui2",Le);var Fe=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le){var ke=this.length;return this.resize(ke+1),this.emplace(ke,Z,le)},z.prototype.emplace=function(Z,le,ke){var Ie=2*Z;return this.float32[Ie+0]=le,this.float32[Ie+1]=ke,Z},z}(_i);Fe.prototype.bytesPerElement=8,Cr("StructArrayLayout2f8",Fe);var Ve=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},z.prototype.emplaceBack=function(Z,le,ke,Ie){var qe=this.length;return this.resize(qe+1),this.emplace(qe,Z,le,ke,Ie)},z.prototype.emplace=function(Z,le,ke,Ie,qe){var it=4*Z;return this.float32[it+0]=le,this.float32[it+1]=ke,this.float32[it+2]=Ie,this.float32[it+3]=qe,Z},z}(_i);Ve.prototype.bytesPerElement=16,Cr("StructArrayLayout4f16",Ve);var We=function(S){function z(){S.apply(this,arguments)}S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z;var Z={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 Z.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},Z.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},Z.x1.get=function(){return this._structArray.int16[this._pos2+2]},Z.y1.get=function(){return this._structArray.int16[this._pos2+3]},Z.x2.get=function(){return this._structArray.int16[this._pos2+4]},Z.y2.get=function(){return this._structArray.int16[this._pos2+5]},Z.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},Z.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},Z.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},Z.anchorPoint.get=function(){return new t(this.anchorPointX,this.anchorPointY)},Object.defineProperties(z.prototype,Z),z}(as);We.prototype.size=20;var $e=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.get=function(Z){return new We(this,Z)},z}(W);Cr("CollisionBoxArray",$e);var tt=function(S){function z(){S.apply(this,arguments)}S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z;var Z={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 Z.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},Z.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},Z.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},Z.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},Z.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},Z.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},Z.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},Z.segment.get=function(){return this._structArray.uint16[this._pos2+10]},Z.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},Z.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},Z.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},Z.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},Z.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},Z.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},Z.placedOrientation.set=function(le){this._structArray.uint8[this._pos1+37]=le},Z.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},Z.hidden.set=function(le){this._structArray.uint8[this._pos1+38]=le},Z.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},Z.crossTileID.set=function(le){this._structArray.uint32[this._pos4+10]=le},Z.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(z.prototype,Z),z}(as);tt.prototype.size=48;var lt=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.get=function(Z){return new tt(this,Z)},z}(Xe);Cr("PlacedSymbolArray",lt);var gt=function(S){function z(){S.apply(this,arguments)}S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z;var Z={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 Z.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},Z.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},Z.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},Z.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},Z.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},Z.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},Z.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},Z.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},Z.key.get=function(){return this._structArray.uint16[this._pos2+8]},Z.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},Z.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},Z.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},Z.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},Z.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},Z.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},Z.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},Z.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},Z.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},Z.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},Z.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},Z.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},Z.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},Z.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},Z.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},Z.crossTileID.set=function(le){this._structArray.uint32[this._pos4+12]=le},Z.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},Z.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},Z.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},Z.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(z.prototype,Z),z}(as);gt.prototype.size=68;var zt=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.get=function(Z){return new gt(this,Z)},z}(at);Cr("SymbolInstanceArray",zt);var Ut=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.getoffsetX=function(Z){return this.float32[1*Z+0]},z}(wt);Cr("GlyphOffsetArray",Ut);var Vt=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.getx=function(Z){return this.int16[3*Z+0]},z.prototype.gety=function(Z){return this.int16[3*Z+1]},z.prototype.gettileUnitDistanceFromAnchor=function(Z){return this.int16[3*Z+2]},z}(At);Cr("SymbolLineVertexArray",Vt);var Qt=function(S){function z(){S.apply(this,arguments)}S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z;var Z={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return Z.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},Z.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},Z.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(z.prototype,Z),z}(as);Qt.prototype.size=8;var gn=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.get=function(Z){return new Qt(this,Z)},z}(re);Cr("FeatureIndexArray",gn);var en=Si([{name:"a_pos",components:2,type:"Int16"}],4).members,sn=function(S){S===void 0&&(S=[]),this.segments=S};function rn(S,z){return 256*(S=o(Math.floor(S),0,255))+o(Math.floor(z),0,255)}sn.prototype.prepareSegment=function(S,z,Z,le){var ke=this.segments[this.segments.length-1];return S>sn.MAX_VERTEX_ARRAY_LENGTH&&M("Max vertices per segment is "+sn.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+S),(!ke||ke.vertexLength+S>sn.MAX_VERTEX_ARRAY_LENGTH||ke.sortKey!==le)&&(ke={vertexOffset:z.length,primitiveOffset:Z.length,vertexLength:0,primitiveLength:0},le!==void 0&&(ke.sortKey=le),this.segments.push(ke)),ke},sn.prototype.get=function(){return this.segments},sn.prototype.destroy=function(){for(var S=0,z=this.segments;S>>16)*it&65535)<<16)&4294967295)<<15|St>>>17))*dt+(((St>>>16)*dt&65535)<<16)&4294967295)<<13|Ie>>>19))+((5*(Ie>>>16)&65535)<<16)&4294967295))+((58964+(qe>>>16)&65535)<<16);switch(St=0,le){case 3:St^=(255&z.charCodeAt(Rt+2))<<16;case 2:St^=(255&z.charCodeAt(Rt+1))<<8;case 1:Ie^=St=(65535&(St=(St=(65535&(St^=255&z.charCodeAt(Rt)))*it+(((St>>>16)*it&65535)<<16)&4294967295)<<15|St>>>17))*dt+(((St>>>16)*dt&65535)<<16)&4294967295}return Ie^=z.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}}),an=T(function(S){S.exports=function(z,Z){for(var le,ke=z.length,Ie=Z^ke,qe=0;ke>=4;)le=1540483477*(65535&(le=255&z.charCodeAt(qe)|(255&z.charCodeAt(++qe))<<8|(255&z.charCodeAt(++qe))<<16|(255&z.charCodeAt(++qe))<<24))+((1540483477*(le>>>16)&65535)<<16),Ie=1540483477*(65535&Ie)+((1540483477*(Ie>>>16)&65535)<<16)^(le=1540483477*(65535&(le^=le>>>24))+((1540483477*(le>>>16)&65535)<<16)),ke-=4,++qe;switch(ke){case 3:Ie^=(255&z.charCodeAt(qe+2))<<16;case 2:Ie^=(255&z.charCodeAt(qe+1))<<8;case 1:Ie=1540483477*(65535&(Ie^=255&z.charCodeAt(qe)))+((1540483477*(Ie>>>16)&65535)<<16)}return Ie=1540483477*(65535&(Ie^=Ie>>>13))+((1540483477*(Ie>>>16)&65535)<<16),(Ie^=Ie>>>15)>>>0}}),zn=xn,Vn=xn,nr=an;zn.murmur3=Vn,zn.murmur2=nr;var rr=function(){this.ids=[],this.positions=[],this.indexed=!1};rr.prototype.add=function(S,z,Z,le){this.ids.push(Ar(S)),this.positions.push(z,Z,le)},rr.prototype.getPositions=function(S){for(var z=Ar(S),Z=0,le=this.ids.length-1;Z>1;this.ids[ke]>=z?le=ke:Z=ke+1}for(var Ie=[];this.ids[Z]===z;){var qe=this.positions[3*Z],it=this.positions[3*Z+1],dt=this.positions[3*Z+2];Ie.push({index:qe,start:it,end:dt}),Z++}return Ie},rr.serialize=function(S,z){var Z=new Float64Array(S.ids),le=new Uint32Array(S.positions);return mr(Z,le,0,Z.length-1),z&&z.push(Z.buffer,le.buffer),{ids:Z,positions:le}},rr.deserialize=function(S){var z=new rr;return z.ids=S.ids,z.positions=S.positions,z.indexed=!0,z};var Tr=Math.pow(2,53)-1;function Ar(S){var z=+S;return!isNaN(z)&&z<=Tr?z:zn(String(S))}function mr(S,z,Z,le){for(;Z>1],Ie=Z-1,qe=le+1;;){do Ie++;while(S[Ie]ke);if(Ie>=qe)break;wr(S,Ie,qe),wr(z,3*Ie,3*qe),wr(z,3*Ie+1,3*qe+1),wr(z,3*Ie+2,3*qe+2)}qe-Zwa.max||qe.ywa.max)&&(M("Geometry exceeds allowed extent, reduce your vector tile buffer size"),qe.x=o(qe.x,wa.min,wa.max),qe.y=o(qe.y,wa.min,wa.max))}return Z}function ko(S,z,Z,le,ke){S.emplaceBack(2*z+(le+1)/2,2*Z+(ke+1)/2)}var ai=function(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(function(z){return z.id}),this.index=S.index,this.hasPattern=!1,this.layoutVertexArray=new et,this.indexArray=new He,this.segments=new sn,this.programConfigurations=new qi(en,S.layers,S.zoom),this.stateDependentLayerIds=this.layers.filter(function(z){return z.isStateDependent()}).map(function(z){return z.id})};function na(S,z){for(var Z=0;Z1){if(vh(S,z))return!0;for(var le=0;le1?S.distSqr(Z):S.distSqr(Z.sub(z)._mult(ke)._add(z))}function Lc(S,z){for(var Z,le,ke,Ie=!1,qe=0;qez.y!=ke.y>z.y&&z.x<(ke.x-le.x)*(z.y-le.y)/(ke.y-le.y)+le.x&&(Ie=!Ie);return Ie}function Zu(S,z){for(var Z=!1,le=0,ke=S.length-1;lez.y!=qe.y>z.y&&z.x<(qe.x-Ie.x)*(z.y-Ie.y)/(qe.y-Ie.y)+Ie.x&&(Z=!Z)}return Z}function g1(S,z,Z){var le=Z[0],ke=Z[2];if(S.xke.x&&z.x>ke.x||S.yke.y&&z.y>ke.y)return!1;var Ie=A(S,z,Z[0]);return Ie!==A(S,z,Z[1])||Ie!==A(S,z,Z[2])||Ie!==A(S,z,Z[3])}function ku(S,z,Z){var le=z.paint.get(S).value;return le.kind==="constant"?le.value:Z.programConfigurations.get(z.id).getMaxValue(S)}function $p(S){return Math.sqrt(S[0]*S[0]+S[1]*S[1])}function Jp(S,z,Z,le,ke){if(!z[0]&&!z[1])return S;var Ie=t.convert(z)._mult(ke);Z==="viewport"&&Ie._rotate(-le);for(var qe=[],it=0;it=Yr||Rt<0||Rt>=Yr)){var Ht=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,S.sortKey),Yt=Ht.vertexLength;ko(this.layoutVertexArray,St,Rt,-1,-1),ko(this.layoutVertexArray,St,Rt,1,-1),ko(this.layoutVertexArray,St,Rt,1,1),ko(this.layoutVertexArray,St,Rt,-1,1),this.indexArray.emplaceBack(Yt,Yt+1,Yt+2),this.indexArray.emplaceBack(Yt,Yt+3,Yt+2),Ht.vertexLength+=4,Ht.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,S,Z,{},le)},Cr("CircleBucket",ai,{omit:["layers"]});var Gw=new _a({"circle-sort-key":new Ur(Oe.layout_circle["circle-sort-key"])}),Ww={paint:new _a({"circle-radius":new Ur(Oe.paint_circle["circle-radius"]),"circle-color":new Ur(Oe.paint_circle["circle-color"]),"circle-blur":new Ur(Oe.paint_circle["circle-blur"]),"circle-opacity":new Ur(Oe.paint_circle["circle-opacity"]),"circle-translate":new Fr(Oe.paint_circle["circle-translate"]),"circle-translate-anchor":new Fr(Oe.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Fr(Oe.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Fr(Oe.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Ur(Oe.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Ur(Oe.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Ur(Oe.paint_circle["circle-stroke-opacity"])}),layout:Gw},ws=typeof Float32Array<"u"?Float32Array:Array;function v1(S){return S[0]=1,S[1]=0,S[2]=0,S[3]=0,S[4]=0,S[5]=1,S[6]=0,S[7]=0,S[8]=0,S[9]=0,S[10]=1,S[11]=0,S[12]=0,S[13]=0,S[14]=0,S[15]=1,S}function ny(S,z,Z){var le=z[0],ke=z[1],Ie=z[2],qe=z[3],it=z[4],dt=z[5],St=z[6],Rt=z[7],Ht=z[8],Yt=z[9],Zt=z[10],cn=z[11],Tn=z[12],Fn=z[13],Dn=z[14],Gn=z[15],Yn=Z[0],Kn=Z[1],ar=Z[2],ur=Z[3];return S[0]=Yn*le+Kn*it+ar*Ht+ur*Tn,S[1]=Yn*ke+Kn*dt+ar*Yt+ur*Fn,S[2]=Yn*Ie+Kn*St+ar*Zt+ur*Dn,S[3]=Yn*qe+Kn*Rt+ar*cn+ur*Gn,Yn=Z[4],Kn=Z[5],ar=Z[6],ur=Z[7],S[4]=Yn*le+Kn*it+ar*Ht+ur*Tn,S[5]=Yn*ke+Kn*dt+ar*Yt+ur*Fn,S[6]=Yn*Ie+Kn*St+ar*Zt+ur*Dn,S[7]=Yn*qe+Kn*Rt+ar*cn+ur*Gn,Yn=Z[8],Kn=Z[9],ar=Z[10],ur=Z[11],S[8]=Yn*le+Kn*it+ar*Ht+ur*Tn,S[9]=Yn*ke+Kn*dt+ar*Yt+ur*Fn,S[10]=Yn*Ie+Kn*St+ar*Zt+ur*Dn,S[11]=Yn*qe+Kn*Rt+ar*cn+ur*Gn,Yn=Z[12],Kn=Z[13],ar=Z[14],ur=Z[15],S[12]=Yn*le+Kn*it+ar*Ht+ur*Tn,S[13]=Yn*ke+Kn*dt+ar*Yt+ur*Fn,S[14]=Yn*Ie+Kn*St+ar*Zt+ur*Dn,S[15]=Yn*qe+Kn*Rt+ar*cn+ur*Gn,S}Math.hypot||(Math.hypot=function(){for(var S=arguments,z=0,Z=arguments.length;Z--;)z+=S[Z]*S[Z];return Math.sqrt(z)});var Zw=ny,Kp,Yw=function(S,z,Z){return S[0]=z[0]-Z[0],S[1]=z[1]-Z[1],S[2]=z[2]-Z[2],S};function Qp(S,z,Z){var le=z[0],ke=z[1],Ie=z[2],qe=z[3];return S[0]=Z[0]*le+Z[4]*ke+Z[8]*Ie+Z[12]*qe,S[1]=Z[1]*le+Z[5]*ke+Z[9]*Ie+Z[13]*qe,S[2]=Z[2]*le+Z[6]*ke+Z[10]*Ie+Z[14]*qe,S[3]=Z[3]*le+Z[7]*ke+Z[11]*Ie+Z[15]*qe,S}Kp=new ws(3),ws!=Float32Array&&(Kp[0]=0,Kp[1]=0,Kp[2]=0),function(){var S=new ws(4);ws!=Float32Array&&(S[0]=0,S[1]=0,S[2]=0,S[3]=0)}();var Xw=function(S){var z=S[0],Z=S[1];return z*z+Z*Z},$w=(function(){var S=new ws(2);ws!=Float32Array&&(S[0]=0,S[1]=0)}(),function(S){function z(Z){S.call(this,Z,Ww)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.createBucket=function(Z){return new ai(Z)},z.prototype.queryRadius=function(Z){var le=Z;return ku("circle-radius",this,le)+ku("circle-stroke-width",this,le)+$p(this.paint.get("circle-translate"))},z.prototype.queryIntersectsFeature=function(Z,le,ke,Ie,qe,it,dt,St){for(var Rt=Jp(Z,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),it.angle,dt),Ht=this.paint.get("circle-radius").evaluate(le,ke)+this.paint.get("circle-stroke-width").evaluate(le,ke),Yt=this.paint.get("circle-pitch-alignment")==="map",Zt=Yt?Rt:function(Er,_r){return Er.map(function(Ir){return ry(Ir,_r)})}(Rt,St),cn=Yt?Ht*dt:Ht,Tn=0,Fn=Ie;TnS.width||ke.height>S.height||Z.x>S.width-ke.width||Z.y>S.height-ke.height)throw new RangeError("out of range source coordinates for image copy");if(ke.width>z.width||ke.height>z.height||le.x>z.width-ke.width||le.y>z.height-ke.height)throw new RangeError("out of range destination coordinates for image copy");for(var qe=S.data,it=z.data,dt=0;dt80*Z){le=Ie=S[0],ke=qe=S[1];for(var cn=Z;cnIe&&(Ie=it),dt>qe&&(qe=dt);St=(St=Math.max(Ie-le,qe-ke))!==0?1/St:0}return mh(Yt,Zt,Z,le,ke,St),Zt}function ly(S,z,Z,le,ke){var Ie,qe;if(ke===w1(S,z,Z,le)>0)for(Ie=z;Ie=z;Ie-=le)qe=fy(Ie,S[Ie],S[Ie+1],qe);return qe&&td(qe,qe.next)&&(xh(qe),qe=qe.next),qe}function Yu(S,z){if(!S)return S;z||(z=S);var Z,le=S;do if(Z=!1,le.steiner||!td(le,le.next)&&Ta(le.prev,le,le.next)!==0)le=le.next;else{if(xh(le),(le=z=le.prev)===le.next)break;Z=!0}while(Z||le!==z);return z}function mh(S,z,Z,le,ke,Ie,qe){if(S){!qe&&Ie&&function(Rt,Ht,Yt,Zt){var cn=Rt;do cn.z===null&&(cn.z=b1(cn.x,cn.y,Ht,Yt,Zt)),cn.prevZ=cn.prev,cn.nextZ=cn.next,cn=cn.next;while(cn!==Rt);cn.prevZ.nextZ=null,cn.prevZ=null,function(Tn){var Fn,Dn,Gn,Yn,Kn,ar,ur,Er,_r=1;do{for(Dn=Tn,Tn=null,Kn=null,ar=0;Dn;){for(ar++,Gn=Dn,ur=0,Fn=0;Fn<_r&&(ur++,Gn=Gn.nextZ);Fn++);for(Er=_r;ur>0||Er>0&&Gn;)ur!==0&&(Er===0||!Gn||Dn.z<=Gn.z)?(Yn=Dn,Dn=Dn.nextZ,ur--):(Yn=Gn,Gn=Gn.nextZ,Er--),Kn?Kn.nextZ=Yn:Tn=Yn,Yn.prevZ=Kn,Kn=Yn;Dn=Gn}Kn.nextZ=null,_r*=2}while(ar>1)}(cn)}(S,le,ke,Ie);for(var it,dt,St=S;S.prev!==S.next;)if(it=S.prev,dt=S.next,Ie?r5(S,le,ke,Ie):n5(S))z.push(it.i/Z),z.push(S.i/Z),z.push(dt.i/Z),xh(S),S=dt.next,St=dt.next;else if((S=dt)===St){qe?qe===1?mh(S=i5(Yu(S),z,Z),z,Z,le,ke,Ie,2):qe===2&&a5(S,z,Z,le,ke,Ie):mh(Yu(S),z,Z,le,ke,Ie,1);break}}}function n5(S){var z=S.prev,Z=S,le=S.next;if(Ta(z,Z,le)>=0)return!1;for(var ke=S.next.next;ke!==S.prev;){if(df(z.x,z.y,Z.x,Z.y,le.x,le.y,ke.x,ke.y)&&Ta(ke.prev,ke,ke.next)>=0)return!1;ke=ke.next}return!0}function r5(S,z,Z,le){var ke=S.prev,Ie=S,qe=S.next;if(Ta(ke,Ie,qe)>=0)return!1;for(var it=ke.xIe.x?ke.x>qe.x?ke.x:qe.x:Ie.x>qe.x?Ie.x:qe.x,Rt=ke.y>Ie.y?ke.y>qe.y?ke.y:qe.y:Ie.y>qe.y?Ie.y:qe.y,Ht=b1(it,dt,z,Z,le),Yt=b1(St,Rt,z,Z,le),Zt=S.prevZ,cn=S.nextZ;Zt&&Zt.z>=Ht&&cn&&cn.z<=Yt;){if(Zt!==S.prev&&Zt!==S.next&&df(ke.x,ke.y,Ie.x,Ie.y,qe.x,qe.y,Zt.x,Zt.y)&&Ta(Zt.prev,Zt,Zt.next)>=0||(Zt=Zt.prevZ,cn!==S.prev&&cn!==S.next&&df(ke.x,ke.y,Ie.x,Ie.y,qe.x,qe.y,cn.x,cn.y)&&Ta(cn.prev,cn,cn.next)>=0))return!1;cn=cn.nextZ}for(;Zt&&Zt.z>=Ht;){if(Zt!==S.prev&&Zt!==S.next&&df(ke.x,ke.y,Ie.x,Ie.y,qe.x,qe.y,Zt.x,Zt.y)&&Ta(Zt.prev,Zt,Zt.next)>=0)return!1;Zt=Zt.prevZ}for(;cn&&cn.z<=Yt;){if(cn!==S.prev&&cn!==S.next&&df(ke.x,ke.y,Ie.x,Ie.y,qe.x,qe.y,cn.x,cn.y)&&Ta(cn.prev,cn,cn.next)>=0)return!1;cn=cn.nextZ}return!0}function i5(S,z,Z){var le=S;do{var ke=le.prev,Ie=le.next.next;!td(ke,Ie)&&uy(ke,le,le.next,Ie)&&yh(ke,Ie)&&yh(Ie,ke)&&(z.push(ke.i/Z),z.push(le.i/Z),z.push(Ie.i/Z),xh(le),xh(le.next),le=S=Ie),le=le.next}while(le!==S);return Yu(le)}function a5(S,z,Z,le,ke,Ie){var qe=S;do{for(var it=qe.next.next;it!==qe.prev;){if(qe.i!==it.i&&c5(qe,it)){var dt=cy(qe,it);return qe=Yu(qe,qe.next),dt=Yu(dt,dt.next),mh(qe,z,Z,le,ke,Ie),void mh(dt,z,Z,le,ke,Ie)}it=it.next}qe=qe.next}while(qe!==S)}function o5(S,z){return S.x-z.x}function s5(S,z){if(z=function(le,ke){var Ie,qe=ke,it=le.x,dt=le.y,St=-1/0;do{if(dt<=qe.y&&dt>=qe.next.y&&qe.next.y!==qe.y){var Rt=qe.x+(dt-qe.y)*(qe.next.x-qe.x)/(qe.next.y-qe.y);if(Rt<=it&&Rt>St){if(St=Rt,Rt===it){if(dt===qe.y)return qe;if(dt===qe.next.y)return qe.next}Ie=qe.x=qe.x&&qe.x>=Zt&&it!==qe.x&&df(dtIe.x||qe.x===Ie.x&&l5(Ie,qe)))&&(Ie=qe,Tn=Ht)),qe=qe.next;while(qe!==Yt);return Ie}(S,z)){var Z=cy(z,S);Yu(z,z.next),Yu(Z,Z.next)}}function l5(S,z){return Ta(S.prev,S,z.prev)<0&&Ta(z.next,S,S.next)<0}function b1(S,z,Z,le,ke){return(S=1431655765&((S=858993459&((S=252645135&((S=16711935&((S=32767*(S-Z)*ke)|S<<8))|S<<4))|S<<2))|S<<1))|(z=1431655765&((z=858993459&((z=252645135&((z=16711935&((z=32767*(z-le)*ke)|z<<8))|z<<4))|z<<2))|z<<1))<<1}function u5(S){var z=S,Z=S;do(z.x=0&&(S-qe)*(le-it)-(Z-qe)*(z-it)>=0&&(Z-qe)*(Ie-it)-(ke-qe)*(le-it)>=0}function c5(S,z){return S.next.i!==z.i&&S.prev.i!==z.i&&!function(Z,le){var ke=Z;do{if(ke.i!==Z.i&&ke.next.i!==Z.i&&ke.i!==le.i&&ke.next.i!==le.i&&uy(ke,ke.next,Z,le))return!0;ke=ke.next}while(ke!==Z);return!1}(S,z)&&(yh(S,z)&&yh(z,S)&&function(Z,le){var ke=Z,Ie=!1,qe=(Z.x+le.x)/2,it=(Z.y+le.y)/2;do ke.y>it!=ke.next.y>it&&ke.next.y!==ke.y&&qe<(ke.next.x-ke.x)*(it-ke.y)/(ke.next.y-ke.y)+ke.x&&(Ie=!Ie),ke=ke.next;while(ke!==Z);return Ie}(S,z)&&(Ta(S.prev,S,z.prev)||Ta(S,z.prev,z))||td(S,z)&&Ta(S.prev,S,S.next)>0&&Ta(z.prev,z,z.next)>0)}function Ta(S,z,Z){return(z.y-S.y)*(Z.x-z.x)-(z.x-S.x)*(Z.y-z.y)}function td(S,z){return S.x===z.x&&S.y===z.y}function uy(S,z,Z,le){var ke=rd(Ta(S,z,Z)),Ie=rd(Ta(S,z,le)),qe=rd(Ta(Z,le,S)),it=rd(Ta(Z,le,z));return ke!==Ie&&qe!==it||!(ke!==0||!nd(S,Z,z))||!(Ie!==0||!nd(S,le,z))||!(qe!==0||!nd(Z,S,le))||!(it!==0||!nd(Z,z,le))}function nd(S,z,Z){return z.x<=Math.max(S.x,Z.x)&&z.x>=Math.min(S.x,Z.x)&&z.y<=Math.max(S.y,Z.y)&&z.y>=Math.min(S.y,Z.y)}function rd(S){return S>0?1:S<0?-1:0}function yh(S,z){return Ta(S.prev,S,S.next)<0?Ta(S,z,S.next)>=0&&Ta(S,S.prev,z)>=0:Ta(S,z,S.prev)<0||Ta(S,S.next,z)<0}function cy(S,z){var Z=new _1(S.i,S.x,S.y),le=new _1(z.i,z.x,z.y),ke=S.next,Ie=z.prev;return S.next=z,z.prev=S,Z.next=ke,ke.prev=Z,le.next=Z,Z.prev=le,Ie.next=le,le.prev=Ie,le}function fy(S,z,Z,le){var ke=new _1(S,z,Z);return le?(ke.next=le.next,ke.prev=le,le.next.prev=ke,le.next=ke):(ke.prev=ke,ke.next=ke),ke}function xh(S){S.next.prev=S.prev,S.prev.next=S.next,S.prevZ&&(S.prevZ.nextZ=S.nextZ),S.nextZ&&(S.nextZ.prevZ=S.prevZ)}function _1(S,z,Z){this.i=S,this.x=z,this.y=Z,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function w1(S,z,Z,le){for(var ke=0,Ie=z,qe=Z-le;IeZ;){if(le-Z>600){var Ie=le-Z+1,qe=z-Z+1,it=Math.log(Ie),dt=.5*Math.exp(2*it/3),St=.5*Math.sqrt(it*dt*(Ie-dt)/Ie)*(qe-Ie/2<0?-1:1);hy(S,z,Math.max(Z,Math.floor(z-qe*dt/Ie+St)),Math.min(le,Math.floor(z+(Ie-qe)*dt/Ie+St)),ke)}var Rt=S[z],Ht=Z,Yt=le;for(bh(S,Z,z),ke(S[le],Rt)>0&&bh(S,Z,le);Ht0;)Yt--}ke(S[Z],Rt)===0?bh(S,Z,Yt):bh(S,++Yt,le),Yt<=z&&(Z=Yt+1),z<=Yt&&(le=Yt-1)}}function bh(S,z,Z){var le=S[z];S[z]=S[Z],S[Z]=le}function h5(S,z){return Sz?1:0}function T1(S,z){var Z=S.length;if(Z<=1)return[S];for(var le,ke,Ie=[],qe=0;qe1)for(var dt=0;dt0&&(le+=S[ke-1].length,Z.holes.push(le))}return Z},x1.default=t5;var Pl=function(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(function(z){return z.id}),this.index=S.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new et,this.indexArray=new He,this.indexArray2=new ve,this.programConfigurations=new qi(sy,S.layers,S.zoom),this.segments=new sn,this.segments2=new sn,this.stateDependentLayerIds=this.layers.filter(function(z){return z.isStateDependent()}).map(function(z){return z.id})};Pl.prototype.populate=function(S,z,Z){this.hasPattern=k1("fill",this.layers,z);for(var le=this.layers[0].layout.get("fill-sort-key"),ke=[],Ie=0,qe=S;Ie>3}if(ke--,le===1||le===2)Ie+=S.readSVarint(),qe+=S.readSVarint(),le===1&&(z&&it.push(z),z=[]),z.push(new t(Ie,qe));else{if(le!==7)throw new Error("unknown command "+le);z&&z.push(z[0].clone())}}return z&&it.push(z),it},gf.prototype.bbox=function(){var S=this._pbf;S.pos=this._geometry;for(var z=S.readVarint()+S.pos,Z=1,le=0,ke=0,Ie=0,qe=1/0,it=-1/0,dt=1/0,St=-1/0;S.pos>3}if(le--,Z===1||Z===2)(ke+=S.readSVarint())it&&(it=ke),(Ie+=S.readSVarint())St&&(St=Ie);else if(Z!==7)throw new Error("unknown command "+Z)}return[qe,dt,it,St]},gf.prototype.toGeoJSON=function(S,z,Z){var le,ke,Ie=this.extent*Math.pow(2,Z),qe=this.extent*S,it=this.extent*z,dt=this.loadGeometry(),St=gf.types[this.type];function Rt(Zt){for(var cn=0;cn>3;ke=qe===1?le.readString():qe===2?le.readFloat():qe===3?le.readDouble():qe===4?le.readVarint64():qe===5?le.readVarint():qe===6?le.readSVarint():qe===7?le.readBoolean():null}return ke}(Z))}function b5(S,z,Z){if(S===3){var le=new gy(Z,Z.readVarint()+Z.pos);le.length&&(z[le.name]=le)}}vy.prototype.feature=function(S){if(S<0||S>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[S];var z=this._pbf.readVarint()+this._pbf.pos;return new dy(this._pbf,z,this.extent,this._keys,this._values)};var vf={VectorTile:function(S,z){this.layers=S.readFields(b5,{},z)},VectorTileFeature:dy,VectorTileLayer:gy},_5=vf.VectorTileFeature.types,M1=Math.pow(2,13);function _h(S,z,Z,le,ke,Ie,qe,it){S.emplaceBack(z,Z,2*Math.floor(le*M1)+qe,ke*M1*2,Ie*M1*2,Math.round(it))}var Ol=function(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(function(z){return z.id}),this.index=S.index,this.hasPattern=!1,this.layoutVertexArray=new ct,this.indexArray=new He,this.programConfigurations=new qi(py,S.layers,S.zoom),this.segments=new sn,this.stateDependentLayerIds=this.layers.filter(function(z){return z.isStateDependent()}).map(function(z){return z.id})};function w5(S,z){return S.x===z.x&&(S.x<0||S.x>Yr)||S.y===z.y&&(S.y<0||S.y>Yr)}Ol.prototype.populate=function(S,z,Z){this.features=[],this.hasPattern=k1("fill-extrusion",this.layers,z);for(var le=0,ke=S;leYr})||si.every(function(Qr){return Qr.y<0})||si.every(function(Qr){return Qr.y>Yr})))for(var Tn=0,Fn=0;Fn=1){var Gn=cn[Fn-1];if(!w5(Dn,Gn)){Ht.vertexLength+4>sn.MAX_VERTEX_ARRAY_LENGTH&&(Ht=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var Yn=Dn.sub(Gn)._perp()._unit(),Kn=Gn.dist(Dn);Tn+Kn>32768&&(Tn=0),_h(this.layoutVertexArray,Dn.x,Dn.y,Yn.x,Yn.y,0,0,Tn),_h(this.layoutVertexArray,Dn.x,Dn.y,Yn.x,Yn.y,0,1,Tn),Tn+=Kn,_h(this.layoutVertexArray,Gn.x,Gn.y,Yn.x,Yn.y,0,0,Tn),_h(this.layoutVertexArray,Gn.x,Gn.y,Yn.x,Yn.y,0,1,Tn);var ar=Ht.vertexLength;this.indexArray.emplaceBack(ar,ar+2,ar+1),this.indexArray.emplaceBack(ar+1,ar+2,ar+3),Ht.vertexLength+=4,Ht.primitiveLength+=2}}}}if(Ht.vertexLength+dt>sn.MAX_VERTEX_ARRAY_LENGTH&&(Ht=this.segments.prepareSegment(dt,this.layoutVertexArray,this.indexArray)),_5[S.type]==="Polygon"){for(var ur=[],Er=[],_r=Ht.vertexLength,Ir=0,Br=it;Ir=2&&S[dt-1].equals(S[dt-2]);)dt--;for(var St=0;St0;if(Er&&Dn>St){var Ir=Rt.dist(Zt);if(Ir>2*Ht){var Br=Rt.sub(Rt.sub(Zt)._mult(Ht/Ir)._round());this.updateDistance(Zt,Br),this.addCurrentVertex(Br,Tn,0,0,Yt),Zt=Br}}var $r=Zt&&cn,jr=$r?Z:it?"butt":le;if($r&&jr==="round"&&(arke&&(jr="bevel"),jr==="bevel"&&(ar>2&&(jr="flipbevel"),ar100)Gn=Fn.mult(-1);else{var Xr=ar*Tn.add(Fn).mag()/Tn.sub(Fn).mag();Gn._perp()._mult(Xr*(_r?-1:1))}this.addCurrentVertex(Rt,Gn,0,0,Yt),this.addCurrentVertex(Rt,Gn.mult(-1),0,0,Yt)}else if(jr==="bevel"||jr==="fakeround"){var Vr=-Math.sqrt(ar*ar-1),Nr=_r?Vr:0,si=_r?0:Vr;if(Zt&&this.addCurrentVertex(Rt,Tn,Nr,si,Yt),jr==="fakeround")for(var Qr=Math.round(180*ur/Math.PI/20),Di=1;Di2*Ht){var Fi=Rt.add(cn.sub(Rt)._mult(Ht/Wi)._round());this.updateDistance(Rt,Fi),this.addCurrentVertex(Fi,Fn,0,0,Yt),Rt=Fi}}}}},jo.prototype.addCurrentVertex=function(S,z,Z,le,ke,Ie){Ie===void 0&&(Ie=!1);var qe=z.x+z.y*Z,it=z.y-z.x*Z,dt=-z.x+z.y*le,St=-z.y-z.x*le;this.addHalfVertex(S,qe,it,Ie,!1,Z,ke),this.addHalfVertex(S,dt,St,Ie,!0,-le,ke),this.distance>xy/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(S,z,Z,le,ke,Ie))},jo.prototype.addHalfVertex=function(S,z,Z,le,ke,Ie,qe){var it=S.x,dt=S.y,St=.5*this.scaledDistance;this.layoutVertexArray.emplaceBack((it<<1)+(le?1:0),(dt<<1)+(ke?1:0),Math.round(63*z)+128,Math.round(63*Z)+128,1+(Ie===0?0:Ie<0?-1:1)|(63&St)<<2,St>>6);var Rt=qe.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Rt),qe.primitiveLength++),ke?this.e2=Rt:this.e1=Rt},jo.prototype.updateScaledDistance=function(){this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(xy-1):this.distance},jo.prototype.updateDistance=function(S,z){this.distance+=S.dist(z),this.updateScaledDistance()},Cr("LineBucket",jo,{omit:["layers","patternFeatures"]});var S5=new _a({"line-cap":new Fr(Oe.layout_line["line-cap"]),"line-join":new Ur(Oe.layout_line["line-join"]),"line-miter-limit":new Fr(Oe.layout_line["line-miter-limit"]),"line-round-limit":new Fr(Oe.layout_line["line-round-limit"]),"line-sort-key":new Ur(Oe.layout_line["line-sort-key"])}),by={paint:new _a({"line-opacity":new Ur(Oe.paint_line["line-opacity"]),"line-color":new Ur(Oe.paint_line["line-color"]),"line-translate":new Fr(Oe.paint_line["line-translate"]),"line-translate-anchor":new Fr(Oe.paint_line["line-translate-anchor"]),"line-width":new Ur(Oe.paint_line["line-width"]),"line-gap-width":new Ur(Oe.paint_line["line-gap-width"]),"line-offset":new Ur(Oe.paint_line["line-offset"]),"line-blur":new Ur(Oe.paint_line["line-blur"]),"line-dasharray":new is(Oe.paint_line["line-dasharray"]),"line-pattern":new sl(Oe.paint_line["line-pattern"]),"line-gradient":new To(Oe.paint_line["line-gradient"])}),layout:S5},E5=function(S){function z(){S.apply(this,arguments)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.possiblyEvaluate=function(Z,le){return le=new di(Math.floor(le.zoom),{now:le.now,fadeDuration:le.fadeDuration,zoomHistory:le.zoomHistory,transition:le.transition}),S.prototype.possiblyEvaluate.call(this,Z,le)},z.prototype.evaluate=function(Z,le,ke,Ie){return le=u({},le,{zoom:Math.floor(le.zoom)}),S.prototype.evaluate.call(this,Z,le,ke,Ie)},z}(Ur),_y=new E5(by.paint.properties["line-width"].specification);_y.useIntegerZoom=!0;var C5=function(S){function z(Z){S.call(this,Z,by)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype._handleSpecialPaintPropertyUpdate=function(Z){Z==="line-gradient"&&this._updateGradient()},z.prototype._updateGradient=function(){var Z=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=oy(Z,"lineProgress"),this.gradientTexture=null},z.prototype.recalculate=function(Z,le){S.prototype.recalculate.call(this,Z,le),this.paint._values["line-floorwidth"]=_y.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,Z)},z.prototype.createBucket=function(Z){return new jo(Z)},z.prototype.queryRadius=function(Z){var le=Z,ke=wy(ku("line-width",this,le),ku("line-gap-width",this,le)),Ie=ku("line-offset",this,le);return ke/2+Math.abs(Ie)+$p(this.paint.get("line-translate"))},z.prototype.queryIntersectsFeature=function(Z,le,ke,Ie,qe,it,dt){var St=Jp(Z,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),it.angle,dt),Rt=dt/2*wy(this.paint.get("line-width").evaluate(le,ke),this.paint.get("line-gap-width").evaluate(le,ke)),Ht=this.paint.get("line-offset").evaluate(le,ke);return Ht&&(Ie=function(Yt,Zt){for(var cn=[],Tn=new t(0,0),Fn=0;Fn=3){for(var Dn=0;Dn0?z+2*S:S}var S1=Si([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),L5=Si([{name:"a_projected_pos",components:3,type:"Float32"}],4),P5=(Si([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Si([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),Ty=(Si([{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"}]),Si([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),O5=Si([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function I5(S,z,Z){return S.sections.forEach(function(le){le.text=function(ke,Ie,qe){var it=Ie.layout.get("text-transform").evaluate(qe,{});return it==="uppercase"?ke=ke.toLocaleUpperCase():it==="lowercase"&&(ke=ke.toLocaleLowerCase()),za.applyArabicShaping&&(ke=za.applyArabicShaping(ke)),ke}(le.text,z,Z)}),S}Si([{name:"triangle",components:3,type:"Uint16"}]),Si([{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"}]),Si([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),Si([{type:"Float32",name:"offsetX"}]),Si([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var Th={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},no=24,ky=function(S,z,Z,le,ke){var Ie,qe,it=8*ke-le-1,dt=(1<>1,Rt=-7,Ht=Z?ke-1:0,Yt=Z?-1:1,Zt=S[z+Ht];for(Ht+=Yt,Ie=Zt&(1<<-Rt)-1,Zt>>=-Rt,Rt+=it;Rt>0;Ie=256*Ie+S[z+Ht],Ht+=Yt,Rt-=8);for(qe=Ie&(1<<-Rt)-1,Ie>>=-Rt,Rt+=le;Rt>0;qe=256*qe+S[z+Ht],Ht+=Yt,Rt-=8);if(Ie===0)Ie=1-St;else{if(Ie===dt)return qe?NaN:1/0*(Zt?-1:1);qe+=Math.pow(2,le),Ie-=St}return(Zt?-1:1)*qe*Math.pow(2,Ie-le)},Ay=function(S,z,Z,le,ke,Ie){var qe,it,dt,St=8*Ie-ke-1,Rt=(1<>1,Yt=ke===23?Math.pow(2,-24)-Math.pow(2,-77):0,Zt=le?0:Ie-1,cn=le?1:-1,Tn=z<0||z===0&&1/z<0?1:0;for(z=Math.abs(z),isNaN(z)||z===1/0?(it=isNaN(z)?1:0,qe=Rt):(qe=Math.floor(Math.log(z)/Math.LN2),z*(dt=Math.pow(2,-qe))<1&&(qe--,dt*=2),(z+=qe+Ht>=1?Yt/dt:Yt*Math.pow(2,1-Ht))*dt>=2&&(qe++,dt/=2),qe+Ht>=Rt?(it=0,qe=Rt):qe+Ht>=1?(it=(z*dt-1)*Math.pow(2,ke),qe+=Ht):(it=z*Math.pow(2,Ht-1)*Math.pow(2,ke),qe=0));ke>=8;S[Z+Zt]=255&it,Zt+=cn,it/=256,ke-=8);for(qe=qe<0;S[Z+Zt]=255&qe,Zt+=cn,qe/=256,St-=8);S[Z+Zt-cn]|=128*Tn},id=Ni;function Ni(S){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(S)?S:new Uint8Array(S||0),this.pos=0,this.type=0,this.length=this.buf.length}Ni.Varint=0,Ni.Fixed64=1,Ni.Bytes=2,Ni.Fixed32=5;var E1=4294967296,My=1/E1,Sy=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function Au(S){return S.type===Ni.Bytes?S.readVarint()+S.pos:S.pos+1}function mf(S,z,Z){return Z?4294967296*z+(S>>>0):4294967296*(z>>>0)+(S>>>0)}function Ey(S,z,Z){var le=z<=16383?1:z<=2097151?2:z<=268435455?3:Math.floor(Math.log(z)/(7*Math.LN2));Z.realloc(le);for(var ke=Z.pos-1;ke>=S;ke--)Z.buf[ke+le]=Z.buf[ke]}function R5(S,z){for(var Z=0;Z>>8,S[Z+2]=z>>>16,S[Z+3]=z>>>24}function Cy(S,z){return(S[z]|S[z+1]<<8|S[z+2]<<16)+(S[z+3]<<24)}Ni.prototype={destroy:function(){this.buf=null},readFields:function(S,z,Z){for(Z=Z||this.length;this.pos>3,Ie=this.pos;this.type=7&le,S(ke,z,this),this.pos===Ie&&this.skip(le)}return z},readMessage:function(S,z){return this.readFields(S,z,this.readVarint()+this.pos)},readFixed32:function(){var S=ad(this.buf,this.pos);return this.pos+=4,S},readSFixed32:function(){var S=Cy(this.buf,this.pos);return this.pos+=4,S},readFixed64:function(){var S=ad(this.buf,this.pos)+ad(this.buf,this.pos+4)*E1;return this.pos+=8,S},readSFixed64:function(){var S=ad(this.buf,this.pos)+Cy(this.buf,this.pos+4)*E1;return this.pos+=8,S},readFloat:function(){var S=ky(this.buf,this.pos,!0,23,4);return this.pos+=4,S},readDouble:function(){var S=ky(this.buf,this.pos,!0,52,8);return this.pos+=8,S},readVarint:function(S){var z,Z,le=this.buf;return z=127&(Z=le[this.pos++]),Z<128?z:(z|=(127&(Z=le[this.pos++]))<<7,Z<128?z:(z|=(127&(Z=le[this.pos++]))<<14,Z<128?z:(z|=(127&(Z=le[this.pos++]))<<21,Z<128?z:function(ke,Ie,qe){var it,dt,St=qe.buf;if(it=(112&(dt=St[qe.pos++]))>>4,dt<128||(it|=(127&(dt=St[qe.pos++]))<<3,dt<128)||(it|=(127&(dt=St[qe.pos++]))<<10,dt<128)||(it|=(127&(dt=St[qe.pos++]))<<17,dt<128)||(it|=(127&(dt=St[qe.pos++]))<<24,dt<128)||(it|=(1&(dt=St[qe.pos++]))<<31,dt<128))return mf(ke,it,Ie);throw new Error("Expected varint not more than 10 bytes")}(z|=(15&(Z=le[this.pos]))<<28,S,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var S=this.readVarint();return S%2==1?(S+1)/-2:S/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var S=this.readVarint()+this.pos,z=this.pos;return this.pos=S,S-z>=12&&Sy?function(Z,le,ke){return Sy.decode(Z.subarray(le,ke))}(this.buf,z,S):function(Z,le,ke){for(var Ie="",qe=le;qe239?4:Rt>223?3:Rt>191?2:1;if(qe+Yt>ke)break;Yt===1?Rt<128&&(Ht=Rt):Yt===2?(192&(it=Z[qe+1]))==128&&(Ht=(31&Rt)<<6|63&it)<=127&&(Ht=null):Yt===3?(it=Z[qe+1],dt=Z[qe+2],(192&it)==128&&(192&dt)==128&&((Ht=(15&Rt)<<12|(63&it)<<6|63&dt)<=2047||Ht>=55296&&Ht<=57343)&&(Ht=null)):Yt===4&&(it=Z[qe+1],dt=Z[qe+2],St=Z[qe+3],(192&it)==128&&(192&dt)==128&&(192&St)==128&&((Ht=(15&Rt)<<18|(63&it)<<12|(63&dt)<<6|63&St)<=65535||Ht>=1114112)&&(Ht=null)),Ht===null?(Ht=65533,Yt=1):Ht>65535&&(Ht-=65536,Ie+=String.fromCharCode(Ht>>>10&1023|55296),Ht=56320|1023&Ht),Ie+=String.fromCharCode(Ht),qe+=Yt}return Ie}(this.buf,z,S)},readBytes:function(){var S=this.readVarint()+this.pos,z=this.buf.subarray(this.pos,S);return this.pos=S,z},readPackedVarint:function(S,z){if(this.type!==Ni.Bytes)return S.push(this.readVarint(z));var Z=Au(this);for(S=S||[];this.pos127;);else if(z===Ni.Bytes)this.pos=this.readVarint()+this.pos;else if(z===Ni.Fixed32)this.pos+=4;else{if(z!==Ni.Fixed64)throw new Error("Unimplemented type: "+z);this.pos+=8}},writeTag:function(S,z){this.writeVarint(S<<3|z)},realloc:function(S){for(var z=this.length||16;z268435455||S<0?function(z,Z){var le,ke;if(z>=0?(le=z%4294967296|0,ke=z/4294967296|0):(ke=~(-z/4294967296),4294967295^(le=~(-z%4294967296))?le=le+1|0:(le=0,ke=ke+1|0)),z>=18446744073709552e3||z<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");Z.realloc(10),function(Ie,qe,it){it.buf[it.pos++]=127&Ie|128,Ie>>>=7,it.buf[it.pos++]=127&Ie|128,Ie>>>=7,it.buf[it.pos++]=127&Ie|128,Ie>>>=7,it.buf[it.pos++]=127&Ie|128,Ie>>>=7,it.buf[it.pos]=127&Ie}(le,0,Z),function(Ie,qe){var it=(7&Ie)<<4;qe.buf[qe.pos++]|=it|((Ie>>>=3)?128:0),Ie&&(qe.buf[qe.pos++]=127&Ie|((Ie>>>=7)?128:0),Ie&&(qe.buf[qe.pos++]=127&Ie|((Ie>>>=7)?128:0),Ie&&(qe.buf[qe.pos++]=127&Ie|((Ie>>>=7)?128:0),Ie&&(qe.buf[qe.pos++]=127&Ie|((Ie>>>=7)?128:0),Ie&&(qe.buf[qe.pos++]=127&Ie)))))}(ke,Z)}(S,this):(this.realloc(4),this.buf[this.pos++]=127&S|(S>127?128:0),S<=127||(this.buf[this.pos++]=127&(S>>>=7)|(S>127?128:0),S<=127||(this.buf[this.pos++]=127&(S>>>=7)|(S>127?128:0),S<=127||(this.buf[this.pos++]=S>>>7&127))))},writeSVarint:function(S){this.writeVarint(S<0?2*-S-1:2*S)},writeBoolean:function(S){this.writeVarint(!!S)},writeString:function(S){S=String(S),this.realloc(4*S.length),this.pos++;var z=this.pos;this.pos=function(le,ke,Ie){for(var qe,it,dt=0;dt55295&&qe<57344){if(!it){qe>56319||dt+1===ke.length?(le[Ie++]=239,le[Ie++]=191,le[Ie++]=189):it=qe;continue}if(qe<56320){le[Ie++]=239,le[Ie++]=191,le[Ie++]=189,it=qe;continue}qe=it-55296<<10|qe-56320|65536,it=null}else it&&(le[Ie++]=239,le[Ie++]=191,le[Ie++]=189,it=null);qe<128?le[Ie++]=qe:(qe<2048?le[Ie++]=qe>>6|192:(qe<65536?le[Ie++]=qe>>12|224:(le[Ie++]=qe>>18|240,le[Ie++]=qe>>12&63|128),le[Ie++]=qe>>6&63|128),le[Ie++]=63&qe|128)}return Ie}(this.buf,S,this.pos);var Z=this.pos-z;Z>=128&&Ey(z,Z,this),this.pos=z-1,this.writeVarint(Z),this.pos+=Z},writeFloat:function(S){this.realloc(4),Ay(this.buf,S,this.pos,!0,23,4),this.pos+=4},writeDouble:function(S){this.realloc(8),Ay(this.buf,S,this.pos,!0,52,8),this.pos+=8},writeBytes:function(S){var z=S.length;this.writeVarint(z),this.realloc(z);for(var Z=0;Z=128&&Ey(Z,le,this),this.pos=Z-1,this.writeVarint(le),this.pos+=le},writeMessage:function(S,z,Z){this.writeTag(S,Ni.Bytes),this.writeRawMessage(z,Z)},writePackedVarint:function(S,z){z.length&&this.writeMessage(S,R5,z)},writePackedSVarint:function(S,z){z.length&&this.writeMessage(S,z5,z)},writePackedBoolean:function(S,z){z.length&&this.writeMessage(S,B5,z)},writePackedFloat:function(S,z){z.length&&this.writeMessage(S,D5,z)},writePackedDouble:function(S,z){z.length&&this.writeMessage(S,F5,z)},writePackedFixed32:function(S,z){z.length&&this.writeMessage(S,N5,z)},writePackedSFixed32:function(S,z){z.length&&this.writeMessage(S,j5,z)},writePackedFixed64:function(S,z){z.length&&this.writeMessage(S,U5,z)},writePackedSFixed64:function(S,z){z.length&&this.writeMessage(S,V5,z)},writeBytesField:function(S,z){this.writeTag(S,Ni.Bytes),this.writeBytes(z)},writeFixed32Field:function(S,z){this.writeTag(S,Ni.Fixed32),this.writeFixed32(z)},writeSFixed32Field:function(S,z){this.writeTag(S,Ni.Fixed32),this.writeSFixed32(z)},writeFixed64Field:function(S,z){this.writeTag(S,Ni.Fixed64),this.writeFixed64(z)},writeSFixed64Field:function(S,z){this.writeTag(S,Ni.Fixed64),this.writeSFixed64(z)},writeVarintField:function(S,z){this.writeTag(S,Ni.Varint),this.writeVarint(z)},writeSVarintField:function(S,z){this.writeTag(S,Ni.Varint),this.writeSVarint(z)},writeStringField:function(S,z){this.writeTag(S,Ni.Bytes),this.writeString(z)},writeFloatField:function(S,z){this.writeTag(S,Ni.Fixed32),this.writeFloat(z)},writeDoubleField:function(S,z){this.writeTag(S,Ni.Fixed64),this.writeDouble(z)},writeBooleanField:function(S,z){this.writeVarintField(S,!!z)}};function H5(S,z,Z){S===1&&Z.readMessage(q5,z)}function q5(S,z,Z){if(S===3){var le=Z.readMessage(G5,{}),ke=le.id,Ie=le.bitmap,qe=le.width,it=le.height,dt=le.left,St=le.top,Rt=le.advance;z.push({id:ke,bitmap:new Pc({width:qe+6,height:it+6},Ie),metrics:{width:qe,height:it,left:dt,top:St,advance:Rt}})}}function G5(S,z,Z){S===1?z.id=Z.readVarint():S===2?z.bitmap=Z.readBytes():S===3?z.width=Z.readVarint():S===4?z.height=Z.readVarint():S===5?z.left=Z.readSVarint():S===6?z.top=Z.readSVarint():S===7&&(z.advance=Z.readVarint())}function Ly(S){for(var z=0,Z=0,le=0,ke=S;le=0;Yt--){var Zt=qe[Yt];if(!(Ht.w>Zt.w||Ht.h>Zt.h)){if(Ht.x=Zt.x,Ht.y=Zt.y,dt=Math.max(dt,Ht.y+Ht.h),it=Math.max(it,Ht.x+Ht.w),Ht.w===Zt.w&&Ht.h===Zt.h){var cn=qe.pop();Yt0&&zc>Ji&&(Ji=zc)}else{var yd=Qr[mi.fontStack],Dc=yd&&yd[Mo];if(Dc&&Dc.rect)Il=Dc.rect,vo=Dc.metrics;else{var xd=si[mi.fontStack],Eh=xd&&xd[Mo];if(!Eh)continue;vo=Eh.metrics}ss=(ei-mi.scale)*no}Rl?(Nr.verticalizable=!0,Ri.push({glyph:Mo,imageName:Eu,x:ja,y:ro+ss,vertical:Rl,scale:mi.scale,fontStack:mi.fontStack,sectionIndex:ia,metrics:vo,rect:Il}),ja+=Va*mi.scale+Fi):(Ri.push({glyph:Mo,imageName:Eu,x:ja,y:ro+ss,vertical:Rl,scale:mi.scale,fontStack:mi.fontStack,sectionIndex:ia,metrics:vo,rect:Il}),ja+=vo.advance*mi.scale+Fi)}if(Ri.length!==0){var N1=ja-Fi;Za=Math.max(N1,Za),Z5(Ri,0,Ri.length-1,Ya,Ji)}ja=0;var bd=Pi*ei+Ji;ra.lineOffset=Math.max(Ji,pi),ro+=bd,Ao=Math.max(bd,Ao),++Ea}else ro+=Pi,++Ea}var Sf=ro-sd,_d=L1(ji),wd=_d.horizontalAlign,Ch=_d.verticalAlign;(function(j1,Lh,Fc,Ef,Td,kd,Cf,Ad,Md){var Ph=(Lh-Fc)*Td,Oh=0;Oh=kd!==Cf?-Ad*Ef-sd:(-Ef*Md+.5)*Cf;for(var Bc=0,Ih=j1;Bc=0&&le>=S&&ud[this.text.charCodeAt(le)];le--)Z--;this.text=this.text.substring(S,Z),this.sectionIndex=this.sectionIndex.slice(S,Z)},go.prototype.substring=function(S,z){var Z=new go;return Z.text=this.text.substring(S,z),Z.sectionIndex=this.sectionIndex.slice(S,z),Z.sections=this.sections,Z},go.prototype.toString=function(){return this.text},go.prototype.getMaxScale=function(){var S=this;return this.sectionIndex.reduce(function(z,Z){return Math.max(z,S.sections[Z].scale)},0)},go.prototype.addTextSection=function(S,z){this.text+=S.text,this.sections.push(xf.forText(S.scale,S.fontStack||z));for(var Z=this.sections.length-1,le=0;le=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var ud={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},os={};function Py(S,z,Z,le,ke,Ie){if(z.imageName){var qe=le[z.imageName];return qe?qe.displaySize[0]*z.scale*no/Ie+ke:0}var it=Z[z.fontStack],dt=it&&it[S];return dt?dt.metrics.advance*z.scale+ke:0}function Oy(S,z,Z,le){var ke=Math.pow(S-z,2);return le?S=0,Rt=0,Ht=0;Ht-Z/2;){if(--qe<0)return!1;it-=S[qe].dist(Ie),Ie=S[qe]}it+=S[qe].dist(S[qe+1]),qe++;for(var dt=[],St=0;itle;)St-=dt.shift().angleDelta;if(St>ke)return!1;qe++,it+=Ht.dist(Yt)}return!0}function Ny(S){for(var z=0,Z=0;ZSt){var cn=(St-dt)/Zt,Tn=Lr(Ht.x,Yt.x,cn),Fn=Lr(Ht.y,Yt.y,cn),Dn=new bf(Tn,Fn,Yt.angleTo(Ht),Rt);return Dn._round(),!qe||By(S,Dn,it,qe,z)?Dn:void 0}dt+=Zt}}function $5(S,z,Z,le,ke,Ie,qe,it,dt){var St=jy(le,Ie,qe),Rt=Uy(le,ke),Ht=Rt*qe,Yt=S[0].x===0||S[0].x===dt||S[0].y===0||S[0].y===dt;return z-Ht=0&&Kn=0&&ar=0&&Yt+St<=Rt){var ur=new bf(Kn,ar,Gn,cn);ur._round(),le&&!By(S,ur,Ie,le,ke)||Zt.push(ur)}}Ht+=Dn}return it||Zt.length||qe||(Zt=Vy(S,Ht/2,Z,le,ke,Ie,qe,!0,dt)),Zt}function Hy(S,z,Z,le,ke){for(var Ie=[],qe=0;qe=le&&Ht.x>=le||(Rt.x>=le?Rt=new t(le,Rt.y+(Ht.y-Rt.y)*((le-Rt.x)/(Ht.x-Rt.x)))._round():Ht.x>=le&&(Ht=new t(le,Rt.y+(Ht.y-Rt.y)*((le-Rt.x)/(Ht.x-Rt.x)))._round()),Rt.y>=ke&&Ht.y>=ke||(Rt.y>=ke?Rt=new t(Rt.x+(Ht.x-Rt.x)*((ke-Rt.y)/(Ht.y-Rt.y)),ke)._round():Ht.y>=ke&&(Ht=new t(Rt.x+(Ht.x-Rt.x)*((ke-Rt.y)/(Ht.y-Rt.y)),ke)._round()),dt&&Rt.equals(dt[dt.length-1])||(dt=[Rt],Ie.push(dt)),dt.push(Ht)))))}return Ie}function qy(S,z,Z,le){var ke=[],Ie=S.image,qe=Ie.pixelRatio,it=Ie.paddedRect.w-2,dt=Ie.paddedRect.h-2,St=S.right-S.left,Rt=S.bottom-S.top,Ht=Ie.stretchX||[[0,it]],Yt=Ie.stretchY||[[0,dt]],Zt=function(Pi,ji){return Pi+ji[1]-ji[0]},cn=Ht.reduce(Zt,0),Tn=Yt.reduce(Zt,0),Fn=it-cn,Dn=dt-Tn,Gn=0,Yn=cn,Kn=0,ar=Tn,ur=0,Er=Fn,_r=0,Ir=Dn;if(Ie.content&&le){var Br=Ie.content;Gn=cd(Ht,0,Br[0]),Kn=cd(Yt,0,Br[1]),Yn=cd(Ht,Br[0],Br[2]),ar=cd(Yt,Br[1],Br[3]),ur=Br[0]-Gn,_r=Br[1]-Kn,Er=Br[2]-Br[0]-Yn,Ir=Br[3]-Br[1]-ar}var $r=function(Pi,ji,Vi,Wi){var Fi=fd(Pi.stretch-Gn,Yn,St,S.left),Ma=hd(Pi.fixed-ur,Er,Pi.stretch,cn),Xi=fd(ji.stretch-Kn,ar,Rt,S.top),ja=hd(ji.fixed-_r,Ir,ji.stretch,Tn),ro=fd(Vi.stretch-Gn,Yn,St,S.left),Za=hd(Vi.fixed-ur,Er,Vi.stretch,cn),Ao=fd(Wi.stretch-Kn,ar,Rt,S.top),Ya=hd(Wi.fixed-_r,Ir,Wi.stretch,Tn),Ea=new t(Fi,Xi),Xa=new t(ro,Xi),Ua=new t(ro,Ao),Ca=new t(Fi,Ao),ei=new t(Ma/qe,ja/qe),pi=new t(Za/qe,Ya/qe),ra=z*Math.PI/180;if(ra){var Ri=Math.sin(ra),Ji=Math.cos(ra),Zi=[Ji,-Ri,Ri,Ji];Ea._matMult(Zi),Xa._matMult(Zi),Ca._matMult(Zi),Ua._matMult(Zi)}var mi=Pi.stretch+Pi.fixed,ia=Vi.stretch+Vi.fixed,Mo=ji.stretch+ji.fixed,ss=Wi.stretch+Wi.fixed;return{tl:Ea,tr:Xa,bl:Ca,br:Ua,tex:{x:Ie.paddedRect.x+1+mi,y:Ie.paddedRect.y+1+Mo,w:ia-mi,h:ss-Mo},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:ei,pixelOffsetBR:pi,minFontScaleX:Er/qe/St,minFontScaleY:Ir/qe/Rt,isSDF:Z}};if(le&&(Ie.stretchX||Ie.stretchY))for(var jr=Gy(Ht,Fn,cn),Xr=Gy(Yt,Dn,Tn),Vr=0;Vr0&&(Zt=Math.max(10,Zt),this.circleDiameter=Zt)}else{var cn=Ie.top*qe-it,Tn=Ie.bottom*qe+it,Fn=Ie.left*qe-it,Dn=Ie.right*qe+it,Gn=Ie.collisionPadding;if(Gn&&(Fn-=Gn[0]*qe,cn-=Gn[1]*qe,Dn+=Gn[2]*qe,Tn+=Gn[3]*qe),St){var Yn=new t(Fn,cn),Kn=new t(Dn,cn),ar=new t(Fn,Tn),ur=new t(Dn,Tn),Er=St*Math.PI/180;Yn._rotate(Er),Kn._rotate(Er),ar._rotate(Er),ur._rotate(Er),Fn=Math.min(Yn.x,Kn.x,ar.x,ur.x),Dn=Math.max(Yn.x,Kn.x,ar.x,ur.x),cn=Math.min(Yn.y,Kn.y,ar.y,ur.y),Tn=Math.max(Yn.y,Kn.y,ar.y,ur.y)}S.emplaceBack(z.x,z.y,Fn,cn,Dn,Tn,Z,le,ke)}this.boxEndIndex=S.length},_f=function(S,z){if(S===void 0&&(S=[]),z===void 0&&(z=J5),this.data=S,this.length=this.data.length,this.compare=z,this.length>0)for(var Z=(this.length>>1)-1;Z>=0;Z--)this._down(Z)};function J5(S,z){return Sz?1:0}function K5(S,z,Z){z===void 0&&(z=1),Z===void 0&&(Z=!1);for(var le=1/0,ke=1/0,Ie=-1/0,qe=-1/0,it=S[0],dt=0;dtIe)&&(Ie=St.x),(!dt||St.y>qe)&&(qe=St.y)}var Rt=Ie-le,Ht=qe-ke,Yt=Math.min(Rt,Ht),Zt=Yt/2,cn=new _f([],Q5);if(Yt===0)return new t(le,ke);for(var Tn=le;TnDn.d||!Dn.d)&&(Dn=Yn,Z&&console.log("found best %d after %d probes",Math.round(1e4*Yn.d)/1e4,Gn)),Yn.max-Dn.d<=z||(Zt=Yn.h/2,cn.push(new wf(Yn.p.x-Zt,Yn.p.y-Zt,Zt,S)),cn.push(new wf(Yn.p.x+Zt,Yn.p.y-Zt,Zt,S)),cn.push(new wf(Yn.p.x-Zt,Yn.p.y+Zt,Zt,S)),cn.push(new wf(Yn.p.x+Zt,Yn.p.y+Zt,Zt,S)),Gn+=4)}return Z&&(console.log("num probes: "+Gn),console.log("best distance: "+Dn.d)),Dn.p}function Q5(S,z){return z.max-S.max}function wf(S,z,Z,le){this.p=new t(S,z),this.h=Z,this.d=function(ke,Ie){for(var qe=!1,it=1/0,dt=0;dtke.y!=cn.y>ke.y&&ke.x<(cn.x-Zt.x)*(ke.y-Zt.y)/(cn.y-Zt.y)+Zt.x&&(qe=!qe),it=Math.min(it,Xp(ke,Zt,cn))}return(qe?1:-1)*Math.sqrt(it)}(this.p,le),this.max=this.d+this.h*Math.SQRT2}_f.prototype.push=function(S){this.data.push(S),this.length++,this._up(this.length-1)},_f.prototype.pop=function(){if(this.length!==0){var S=this.data[0],z=this.data.pop();return this.length--,this.length>0&&(this.data[0]=z,this._down(0)),S}},_f.prototype.peek=function(){return this.data[0]},_f.prototype._up=function(S){for(var z=this.data,Z=this.compare,le=z[S];S>0;){var ke=S-1>>1,Ie=z[ke];if(Z(le,Ie)>=0)break;z[S]=Ie,S=ke}z[S]=le},_f.prototype._down=function(S){for(var z=this.data,Z=this.compare,le=this.length>>1,ke=z[S];S=0)break;z[S]=qe,S=Ie}z[S]=ke};var O1=Number.POSITIVE_INFINITY;function Wy(S,z){return z[1]!==O1?function(Z,le,ke){var Ie=0,qe=0;switch(le=Math.abs(le),ke=Math.abs(ke),Z){case"top-right":case"top-left":case"top":qe=ke-7;break;case"bottom-right":case"bottom-left":case"bottom":qe=7-ke}switch(Z){case"top-right":case"bottom-right":case"right":Ie=-le;break;case"top-left":case"bottom-left":case"left":Ie=le}return[Ie,qe]}(S,z[0],z[1]):function(Z,le){var ke=0,Ie=0;le<0&&(le=0);var qe=le/Math.sqrt(2);switch(Z){case"top-right":case"top-left":Ie=qe-7;break;case"bottom-right":case"bottom-left":Ie=7-qe;break;case"bottom":Ie=7-le;break;case"top":Ie=le-7}switch(Z){case"top-right":case"bottom-right":ke=-qe;break;case"top-left":case"bottom-left":ke=qe;break;case"left":ke=le;break;case"right":ke=-le}return[ke,Ie]}(S,z[0])}function I1(S){switch(S){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}var Xu=32640;function Zy(S,z,Z,le,ke,Ie,qe,it,dt,St,Rt,Ht,Yt,Zt,cn){var Tn=function(Kn,ar,ur,Er,_r,Ir,Br,$r){for(var jr=Er.layout.get("text-rotate").evaluate(Ir,{})*Math.PI/180,Xr=[],Vr=0,Nr=ar.positionedLines;VrXu&&M(S.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):Fn.kind==="composite"&&((Dn=[Ql*Zt.compositeTextSizes[0].evaluate(qe,{},cn),Ql*Zt.compositeTextSizes[1].evaluate(qe,{},cn)])[0]>Xu||Dn[1]>Xu)&&M(S.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),S.addSymbols(S.text,Tn,Dn,it,Ie,qe,St,z,dt.lineStartIndex,dt.lineLength,Yt,cn);for(var Gn=0,Yn=Rt;Gn=0;qe--)if(le.dist(Ie[qe])0)&&(Ie.value.kind!=="constant"||Ie.value.value.length>0),St=it.value.kind!=="constant"||!!it.value.value||Object.keys(it.parameters).length>0,Rt=ke.get("symbol-sort-key");if(this.features=[],dt||St){for(var Ht=z.iconDependencies,Yt=z.glyphDependencies,Zt=z.availableImages,cn=new di(this.zoom),Tn=0,Fn=S;Tn=0;for(var Qr=0,Di=_r.sections;Qr=0;it--)Ie[it]={x:z[it].x,y:z[it].y,tileUnitDistanceFromAnchor:ke},it>0&&(ke+=z[it-1].dist(z[it]));for(var dt=0;dt0},Li.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Li.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Li.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Li.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Li.prototype.addIndicesForPlacedSymbol=function(S,z){for(var Z=S.placedSymbolArray.get(z),le=Z.vertexStartIndex+4*Z.numGlyphs,ke=Z.vertexStartIndex;ke1||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(var Z=0,le=this.symbolInstanceIndexes;Z=0&&dt.indexOf(qe)===it&&z.addIndicesForPlacedSymbol(z.text,qe)}),Ie.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,Ie.verticalPlacedTextSymbolIndex),Ie.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Ie.placedIconSymbolIndex),Ie.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Ie.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Cr("SymbolBucket",Li,{omit:["layers","collisionBoxArray","features","compareText"]}),Li.MAX_GLYPHS=65535,Li.addDynamicAttributes=R1;var i4=new _a({"symbol-placement":new Fr(Oe.layout_symbol["symbol-placement"]),"symbol-spacing":new Fr(Oe.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Fr(Oe.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Ur(Oe.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Fr(Oe.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Fr(Oe.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Fr(Oe.layout_symbol["icon-ignore-placement"]),"icon-optional":new Fr(Oe.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Fr(Oe.layout_symbol["icon-rotation-alignment"]),"icon-size":new Ur(Oe.layout_symbol["icon-size"]),"icon-text-fit":new Fr(Oe.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Fr(Oe.layout_symbol["icon-text-fit-padding"]),"icon-image":new Ur(Oe.layout_symbol["icon-image"]),"icon-rotate":new Ur(Oe.layout_symbol["icon-rotate"]),"icon-padding":new Fr(Oe.layout_symbol["icon-padding"]),"icon-keep-upright":new Fr(Oe.layout_symbol["icon-keep-upright"]),"icon-offset":new Ur(Oe.layout_symbol["icon-offset"]),"icon-anchor":new Ur(Oe.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Fr(Oe.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Fr(Oe.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Fr(Oe.layout_symbol["text-rotation-alignment"]),"text-field":new Ur(Oe.layout_symbol["text-field"]),"text-font":new Ur(Oe.layout_symbol["text-font"]),"text-size":new Ur(Oe.layout_symbol["text-size"]),"text-max-width":new Ur(Oe.layout_symbol["text-max-width"]),"text-line-height":new Fr(Oe.layout_symbol["text-line-height"]),"text-letter-spacing":new Ur(Oe.layout_symbol["text-letter-spacing"]),"text-justify":new Ur(Oe.layout_symbol["text-justify"]),"text-radial-offset":new Ur(Oe.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Fr(Oe.layout_symbol["text-variable-anchor"]),"text-anchor":new Ur(Oe.layout_symbol["text-anchor"]),"text-max-angle":new Fr(Oe.layout_symbol["text-max-angle"]),"text-writing-mode":new Fr(Oe.layout_symbol["text-writing-mode"]),"text-rotate":new Ur(Oe.layout_symbol["text-rotate"]),"text-padding":new Fr(Oe.layout_symbol["text-padding"]),"text-keep-upright":new Fr(Oe.layout_symbol["text-keep-upright"]),"text-transform":new Ur(Oe.layout_symbol["text-transform"]),"text-offset":new Ur(Oe.layout_symbol["text-offset"]),"text-allow-overlap":new Fr(Oe.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Fr(Oe.layout_symbol["text-ignore-placement"]),"text-optional":new Fr(Oe.layout_symbol["text-optional"])}),z1={paint:new _a({"icon-opacity":new Ur(Oe.paint_symbol["icon-opacity"]),"icon-color":new Ur(Oe.paint_symbol["icon-color"]),"icon-halo-color":new Ur(Oe.paint_symbol["icon-halo-color"]),"icon-halo-width":new Ur(Oe.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Ur(Oe.paint_symbol["icon-halo-blur"]),"icon-translate":new Fr(Oe.paint_symbol["icon-translate"]),"icon-translate-anchor":new Fr(Oe.paint_symbol["icon-translate-anchor"]),"text-opacity":new Ur(Oe.paint_symbol["text-opacity"]),"text-color":new Ur(Oe.paint_symbol["text-color"],{runtimeType:Bt,getOverride:function(S){return S.textColor},hasOverride:function(S){return!!S.textColor}}),"text-halo-color":new Ur(Oe.paint_symbol["text-halo-color"]),"text-halo-width":new Ur(Oe.paint_symbol["text-halo-width"]),"text-halo-blur":new Ur(Oe.paint_symbol["text-halo-blur"]),"text-translate":new Fr(Oe.paint_symbol["text-translate"]),"text-translate-anchor":new Fr(Oe.paint_symbol["text-translate-anchor"])}),layout:i4},kf=function(S){this.type=S.property.overrides?S.property.overrides.runtimeType:mt,this.defaultValue=S};kf.prototype.evaluate=function(S){if(S.formattedSection){var z=this.defaultValue.property.overrides;if(z&&z.hasOverride(S.formattedSection))return z.getOverride(S.formattedSection)}return S.feature&&S.featureState?this.defaultValue.evaluate(S.feature,S.featureState):this.defaultValue.property.specification.default},kf.prototype.eachChild=function(S){this.defaultValue.isConstant()||S(this.defaultValue.value._styleExpression.expression)},kf.prototype.outputDefined=function(){return!1},kf.prototype.serialize=function(){return null},Cr("FormatSectionOverride",kf,{omit:["defaultValue"]});var a4=function(S){function z(Z){S.call(this,Z,z1)}return S&&(z.__proto__=S),z.prototype=Object.create(S&&S.prototype),z.prototype.constructor=z,z.prototype.recalculate=function(Z,le){if(S.prototype.recalculate.call(this,Z,le),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 ke=this.layout.get("text-writing-mode");if(ke){for(var Ie=[],qe=0,it=ke;qe",targetMapId:le,sourceMapId:Ie.mapId})}}},Af.prototype.receive=function(S){var z=S.data,Z=z.id;if(Z&&(!z.targetMapId||this.mapId===z.targetMapId))if(z.type===""){delete this.tasks[Z];var le=this.cancelCallbacks[Z];delete this.cancelCallbacks[Z],le&&le()}else L()||z.mustQueue?(this.tasks[Z]=z,this.taskQueue.push(Z),this.invoker.trigger()):this.processTask(Z,z)},Af.prototype.process=function(){if(this.taskQueue.length){var S=this.taskQueue.shift(),z=this.tasks[S];delete this.tasks[S],this.taskQueue.length&&this.invoker.trigger(),z&&this.processTask(S,z)}},Af.prototype.processTask=function(S,z){var Z=this;if(z.type===""){var le=this.callbacks[S];delete this.callbacks[S],le&&(z.error?le(il(z.error)):le(null,il(z.data)))}else{var ke=!1,Ie=R(this.globalScope)?void 0:[],qe=z.hasCallback?function(Rt,Ht){ke=!0,delete Z.cancelCallbacks[S],Z.target.postMessage({id:S,type:"",sourceMapId:Z.mapId,error:Rt?rl(Rt):null,data:rl(Ht,Ie)},Ie)}:function(Rt){ke=!0},it=null,dt=il(z.data);if(this.parent[z.type])it=this.parent[z.type](z.sourceMapId,dt,qe);else if(this.parent.getWorkerSource){var St=z.type.split(".");it=this.parent.getWorkerSource(z.sourceMapId,St[0],dt.source)[St[1]](dt,qe)}else qe(new Error("Could not find function "+z.type));!ke&&it&&it.cancel&&(this.cancelCallbacks[S]=it.cancel)}},Af.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var ka=function(S,z){S&&(z?this.setSouthWest(S).setNorthEast(z):S.length===4?this.setSouthWest([S[0],S[1]]).setNorthEast([S[2],S[3]]):this.setSouthWest(S[0]).setNorthEast(S[1]))};ka.prototype.setNorthEast=function(S){return this._ne=S instanceof Gi?new Gi(S.lng,S.lat):Gi.convert(S),this},ka.prototype.setSouthWest=function(S){return this._sw=S instanceof Gi?new Gi(S.lng,S.lat):Gi.convert(S),this},ka.prototype.extend=function(S){var z,Z,le=this._sw,ke=this._ne;if(S instanceof Gi)z=S,Z=S;else{if(!(S instanceof ka)){if(Array.isArray(S)){if(S.length===4||S.every(Array.isArray)){var Ie=S;return this.extend(ka.convert(Ie))}var qe=S;return this.extend(Gi.convert(qe))}return this}if(z=S._sw,Z=S._ne,!z||!Z)return this}return le||ke?(le.lng=Math.min(z.lng,le.lng),le.lat=Math.min(z.lat,le.lat),ke.lng=Math.max(Z.lng,ke.lng),ke.lat=Math.max(Z.lat,ke.lat)):(this._sw=new Gi(z.lng,z.lat),this._ne=new Gi(Z.lng,Z.lat)),this},ka.prototype.getCenter=function(){return new Gi((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},ka.prototype.getSouthWest=function(){return this._sw},ka.prototype.getNorthEast=function(){return this._ne},ka.prototype.getNorthWest=function(){return new Gi(this.getWest(),this.getNorth())},ka.prototype.getSouthEast=function(){return new Gi(this.getEast(),this.getSouth())},ka.prototype.getWest=function(){return this._sw.lng},ka.prototype.getSouth=function(){return this._sw.lat},ka.prototype.getEast=function(){return this._ne.lng},ka.prototype.getNorth=function(){return this._ne.lat},ka.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},ka.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},ka.prototype.isEmpty=function(){return!(this._sw&&this._ne)},ka.prototype.contains=function(S){var z=Gi.convert(S),Z=z.lng,le=z.lat,ke=this._sw.lat<=le&&le<=this._ne.lat,Ie=this._sw.lng<=Z&&Z<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Ie=this._sw.lng>=Z&&Z>=this._ne.lng),ke&&Ie},ka.convert=function(S){return!S||S instanceof ka?S:new ka(S)};var ex=63710088e-1,Gi=function(S,z){if(isNaN(S)||isNaN(z))throw new Error("Invalid LngLat object: ("+S+", "+z+")");if(this.lng=+S,this.lat=+z,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Gi.prototype.wrap=function(){return new Gi(a(this.lng,-180,180),this.lat)},Gi.prototype.toArray=function(){return[this.lng,this.lat]},Gi.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Gi.prototype.distanceTo=function(S){var z=Math.PI/180,Z=this.lat*z,le=S.lat*z,ke=Math.sin(Z)*Math.sin(le)+Math.cos(Z)*Math.cos(le)*Math.cos((S.lng-this.lng)*z);return ex*Math.acos(Math.min(ke,1))},Gi.prototype.toBounds=function(S){S===void 0&&(S=0);var z=360*S/40075017,Z=z/Math.cos(Math.PI/180*this.lat);return new ka(new Gi(this.lng-Z,this.lat-z),new Gi(this.lng+Z,this.lat+z))},Gi.convert=function(S){if(S instanceof Gi)return S;if(Array.isArray(S)&&(S.length===2||S.length===3))return new Gi(Number(S[0]),Number(S[1]));if(!Array.isArray(S)&&typeof S=="object"&&S!==null)return new Gi(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 [, ]")};var tx=2*Math.PI*ex;function nx(S){return tx*Math.cos(S*Math.PI/180)}function rx(S){return(180+S)/360}function ix(S){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+S*Math.PI/360)))/360}function ax(S,z){return S/nx(z)}function F1(S){var z=180-360*S;return 360/Math.PI*Math.atan(Math.exp(z*Math.PI/180))-90}var Ic=function(S,z,Z){Z===void 0&&(Z=0),this.x=+S,this.y=+z,this.z=+Z};Ic.fromLngLat=function(S,z){z===void 0&&(z=0);var Z=Gi.convert(S);return new Ic(rx(Z.lng),ix(Z.lat),ax(z,Z.lat))},Ic.prototype.toLngLat=function(){return new Gi(360*this.x-180,F1(this.y))},Ic.prototype.toAltitude=function(){return S=this.z,z=this.y,S*nx(F1(z));var S,z},Ic.prototype.meterInMercatorCoordinateUnits=function(){return 1/tx*(S=F1(this.y),1/Math.cos(S*Math.PI/180));var S};var Rc=function(S,z,Z){this.z=S,this.x=z,this.y=Z,this.key=Sh(0,S,S,z,Z)};Rc.prototype.equals=function(S){return this.z===S.z&&this.x===S.x&&this.y===S.y},Rc.prototype.url=function(S,z){var Z,le,ke,Ie,qe,it=(Z=this.x,le=this.y,ke=this.z,Ie=Qy(256*Z,256*(le=Math.pow(2,ke)-le-1),ke),qe=Qy(256*(Z+1),256*(le+1),ke),Ie[0]+","+Ie[1]+","+qe[0]+","+qe[1]),dt=function(St,Rt,Ht){for(var Yt,Zt="",cn=St;cn>0;cn--)Zt+=(Rt&(Yt=1<this.canonical.z?new Aa(S,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Aa(S,this.wrap,S,this.canonical.x>>z,this.canonical.y>>z)},Aa.prototype.calculateScaledKey=function(S,z){var Z=this.canonical.z-S;return S>this.canonical.z?Sh(this.wrap*+z,S,this.canonical.z,this.canonical.x,this.canonical.y):Sh(this.wrap*+z,S,S,this.canonical.x>>Z,this.canonical.y>>Z)},Aa.prototype.isChildOf=function(S){if(S.wrap!==this.wrap)return!1;var z=this.canonical.z-S.canonical.z;return S.overscaledZ===0||S.overscaledZ>z&&S.canonical.y===this.canonical.y>>z},Aa.prototype.children=function(S){if(this.overscaledZ>=S)return[new Aa(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var z=this.canonical.z+1,Z=2*this.canonical.x,le=2*this.canonical.y;return[new Aa(z,this.wrap,z,Z,le),new Aa(z,this.wrap,z,Z+1,le),new Aa(z,this.wrap,z,Z,le+1),new Aa(z,this.wrap,z,Z+1,le+1)]},Aa.prototype.isLessThan=function(S){return this.wrapS.wrap)&&(this.overscaledZS.overscaledZ)&&(this.canonical.xS.canonical.x)&&this.canonical.y=this.dim+1||z<-1||z>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(z+1)*this.stride+(S+1)},Mu.prototype._unpackMapbox=function(S,z,Z){return(256*S*256+256*z+Z)/10-1e4},Mu.prototype._unpackTerrarium=function(S,z,Z){return 256*S+z+Z/256-32768},Mu.prototype.getPixels=function(){return new No({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Mu.prototype.backfillBorder=function(S,z,Z){if(this.dim!==S.dim)throw new Error("dem dimension mismatch");var le=z*this.dim,ke=z*this.dim+this.dim,Ie=Z*this.dim,qe=Z*this.dim+this.dim;switch(z){case-1:le=ke-1;break;case 1:ke=le+1}switch(Z){case-1:Ie=qe-1;break;case 1:qe=Ie+1}for(var it=-z*this.dim,dt=-Z*this.dim,St=Ie;St=0&&Rt[3]>=0&&it.insert(qe,Rt[0],Rt[1],Rt[2],Rt[3])}},Su.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new vf.VectorTile(new id(this.rawTileData)).layers,this.sourceLayerCoder=new vd(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Su.prototype.query=function(S,z,Z,le){var ke=this;this.loadVTLayers();for(var Ie=S.params||{},qe=Yr/S.tileSize/S.scale,it=El(Ie.filter),dt=S.queryGeometry,St=S.queryPadding*qe,Rt=lx(dt),Ht=this.grid.query(Rt.minX-St,Rt.minY-St,Rt.maxX+St,Rt.maxY+St),Yt=lx(S.cameraQueryGeometry),Zt=0,cn=this.grid3D.query(Yt.minX-St,Yt.minY-St,Yt.maxX+St,Yt.maxY+St,function(Kn,ar,ur,Er){return function(_r,Ir,Br,$r,jr){for(var Xr=0,Vr=_r;Xr=Nr.x&&jr>=Nr.y)return!0}var si=[new t(Ir,Br),new t(Ir,jr),new t($r,jr),new t($r,Br)];if(_r.length>2){for(var Qr=0,Di=si;Qr=0)return!0;return!1}(Ie,Ht)){var Yt=this.sourceLayerCoder.decode(Z),Zt=this.vtLayers[Yt].feature(le);if(ke.filter(new di(this.tileID.overscaledZ),Zt))for(var cn=this.getId(Zt,Yt),Tn=0;Tnle)ke=!1;else if(z)if(this.expirationTimege&&(S.getActor().send("enforceCacheSizeLimit",je),st=0)},s.clamp=o,s.clearTileCache=function(S){var z=self.caches.delete(De);S&&z.catch(S).then(function(){return S()})},s.clipLine=Hy,s.clone=function(S){var z=new ws(16);return z[0]=S[0],z[1]=S[1],z[2]=S[2],z[3]=S[3],z[4]=S[4],z[5]=S[5],z[6]=S[6],z[7]=S[7],z[8]=S[8],z[9]=S[9],z[10]=S[10],z[11]=S[11],z[12]=S[12],z[13]=S[13],z[14]=S[14],z[15]=S[15],z},s.clone$1=k,s.clone$2=function(S){var z=new ws(3);return z[0]=S[0],z[1]=S[1],z[2]=S[2],z},s.collisionCircleLayout=O5,s.config=Y,s.create=function(){var S=new ws(16);return ws!=Float32Array&&(S[1]=0,S[2]=0,S[3]=0,S[4]=0,S[6]=0,S[7]=0,S[8]=0,S[9]=0,S[11]=0,S[12]=0,S[13]=0,S[14]=0),S[0]=1,S[5]=1,S[10]=1,S[15]=1,S},s.create$1=function(){var S=new ws(9);return ws!=Float32Array&&(S[1]=0,S[2]=0,S[3]=0,S[5]=0,S[6]=0,S[7]=0),S[0]=1,S[4]=1,S[8]=1,S},s.create$2=function(){var S=new ws(4);return ws!=Float32Array&&(S[1]=0,S[2]=0),S[0]=1,S[3]=1,S},s.createCommonjsModule=T,s.createExpression=wl,s.createLayout=Si,s.createStyleLayer=function(S){return S.type==="custom"?new c4(S):new f4[S.type](S)},s.cross=function(S,z,Z){var le=z[0],ke=z[1],Ie=z[2],qe=Z[0],it=Z[1],dt=Z[2];return S[0]=ke*dt-Ie*it,S[1]=Ie*qe-le*dt,S[2]=le*it-ke*qe,S},s.deepEqual=function S(z,Z){if(Array.isArray(z)){if(!Array.isArray(Z)||z.length!==Z.length)return!1;for(var le=0;le0&&(Ie=1/Math.sqrt(Ie)),S[0]=z[0]*Ie,S[1]=z[1]*Ie,S[2]=z[2]*Ie,S},s.number=Lr,s.offscreenCanvasSupported=ot,s.ortho=function(S,z,Z,le,ke,Ie,qe){var it=1/(z-Z),dt=1/(le-ke),St=1/(Ie-qe);return S[0]=-2*it,S[1]=0,S[2]=0,S[3]=0,S[4]=0,S[5]=-2*dt,S[6]=0,S[7]=0,S[8]=0,S[9]=0,S[10]=2*St,S[11]=0,S[12]=(z+Z)*it,S[13]=(ke+le)*dt,S[14]=(qe+Ie)*St,S[15]=1,S},s.parseGlyphPBF=function(S){return new id(S).readFields(H5,[])},s.pbf=id,s.performSymbolLayout=function(S,z,Z,le,ke,Ie,qe){S.createArrays();var it=512*S.overscaling;S.tilePixelRatio=Yr/it,S.compareText={},S.iconsNeedLinear=!1;var dt=S.layers[0].layout,St=S.layers[0]._unevaluatedLayout._values,Rt={};if(S.textSizeData.kind==="composite"){var Ht=S.textSizeData,Yt=Ht.minZoom,Zt=Ht.maxZoom;Rt.compositeTextSizes=[St["text-size"].possiblyEvaluate(new di(Yt),qe),St["text-size"].possiblyEvaluate(new di(Zt),qe)]}if(S.iconSizeData.kind==="composite"){var cn=S.iconSizeData,Tn=cn.minZoom,Fn=cn.maxZoom;Rt.compositeIconSizes=[St["icon-size"].possiblyEvaluate(new di(Tn),qe),St["icon-size"].possiblyEvaluate(new di(Fn),qe)]}Rt.layoutTextSize=St["text-size"].possiblyEvaluate(new di(S.zoom+1),qe),Rt.layoutIconSize=St["icon-size"].possiblyEvaluate(new di(S.zoom+1),qe),Rt.textMaxSize=St["text-size"].possiblyEvaluate(new di(18));for(var Dn=dt.get("text-line-height")*no,Gn=dt.get("text-rotation-alignment")==="map"&&dt.get("symbol-placement")!=="point",Yn=dt.get("text-keep-upright"),Kn=dt.get("text-size"),ar=function(){var _r=Er[ur],Ir=dt.get("text-font").evaluate(_r,{},qe).join(","),Br=Kn.evaluate(_r,{},qe),$r=Rt.layoutTextSize.evaluate(_r,{},qe),jr=Rt.layoutIconSize.evaluate(_r,{},qe),Xr={horizontal:{},vertical:void 0},Vr=_r.text,Nr=[0,0];if(Vr){var si=Vr.toString(),Qr=dt.get("text-letter-spacing").evaluate(_r,{},qe)*no,Di=function(ei){for(var pi=0,ra=ei;pi=Yr||Dh.y<0||Dh.y>=Yr||function(sa,zl,d4,Ju,W1,dx,Sd,eu,Ed,Fh,Cd,Ld,Z1,gx,Bh,vx,mx,yx,xx,bx,ks,Pd,_x,tu,g4){var wx,jc,Lf,Pf,Of,If=sa.addToLineVertexArray(zl,d4),Tx=0,kx=0,Ax=0,Mx=0,Y1=-1,X1=-1,Cu={},Sx=zn(""),$1=0,J1=0;if(eu._unevaluatedLayout.getValue("text-radial-offset")===void 0?($1=(wx=eu.layout.get("text-offset").evaluate(ks,{},tu).map(function(jh){return jh*no}))[0],J1=wx[1]):($1=eu.layout.get("text-radial-offset").evaluate(ks,{},tu)*no,J1=O1),sa.allowVerticalPlacement&&Ju.vertical){var Ex=eu.layout.get("text-rotate").evaluate(ks,{},tu)+90,v4=Ju.vertical;Pf=new pd(Ed,zl,Fh,Cd,Ld,v4,Z1,gx,Bh,Ex),Sd&&(Of=new pd(Ed,zl,Fh,Cd,Ld,Sd,mx,yx,Bh,Ex))}if(W1){var K1=eu.layout.get("icon-rotate").evaluate(ks,{}),Cx=eu.layout.get("icon-text-fit")!=="none",Lx=qy(W1,K1,_x,Cx),Q1=Sd?qy(Sd,K1,_x,Cx):void 0;Lf=new pd(Ed,zl,Fh,Cd,Ld,W1,mx,yx,!1,K1),Tx=4*Lx.length;var Px=sa.iconSizeData,Nh=null;Px.kind==="source"?(Nh=[Ql*eu.layout.get("icon-size").evaluate(ks,{})])[0]>Xu&&M(sa.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):Px.kind==="composite"&&((Nh=[Ql*Pd.compositeIconSizes[0].evaluate(ks,{},tu),Ql*Pd.compositeIconSizes[1].evaluate(ks,{},tu)])[0]>Xu||Nh[1]>Xu)&&M(sa.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),sa.addSymbols(sa.icon,Lx,Nh,bx,xx,ks,!1,zl,If.lineStartIndex,If.lineLength,-1,tu),Y1=sa.icon.placedSymbolArray.length-1,Q1&&(kx=4*Q1.length,sa.addSymbols(sa.icon,Q1,Nh,bx,xx,ks,Ts.vertical,zl,If.lineStartIndex,If.lineLength,-1,tu),X1=sa.icon.placedSymbolArray.length-1)}for(var Ox in Ju.horizontal){var Od=Ju.horizontal[Ox];if(!jc){Sx=zn(Od.text);var m4=eu.layout.get("text-rotate").evaluate(ks,{},tu);jc=new pd(Ed,zl,Fh,Cd,Ld,Od,Z1,gx,Bh,m4)}var Ix=Od.positionedLines.length===1;if(Ax+=Zy(sa,zl,Od,dx,eu,Bh,ks,vx,If,Ju.vertical?Ts.horizontal:Ts.horizontalOnly,Ix?Object.keys(Ju.horizontal):[Ox],Cu,Y1,Pd,tu),Ix)break}Ju.vertical&&(Mx+=Zy(sa,zl,Ju.vertical,dx,eu,Bh,ks,vx,If,Ts.vertical,["vertical"],Cu,X1,Pd,tu));var y4=jc?jc.boxStartIndex:sa.collisionBoxArray.length,x4=jc?jc.boxEndIndex:sa.collisionBoxArray.length,b4=Pf?Pf.boxStartIndex:sa.collisionBoxArray.length,_4=Pf?Pf.boxEndIndex:sa.collisionBoxArray.length,w4=Lf?Lf.boxStartIndex:sa.collisionBoxArray.length,T4=Lf?Lf.boxEndIndex:sa.collisionBoxArray.length,k4=Of?Of.boxStartIndex:sa.collisionBoxArray.length,A4=Of?Of.boxEndIndex:sa.collisionBoxArray.length,nu=-1,Id=function(jh,zx){return jh&&jh.circleDiameter?Math.max(jh.circleDiameter,zx):zx};nu=Id(jc,nu),nu=Id(Pf,nu),nu=Id(Lf,nu);var Rx=(nu=Id(Of,nu))>-1?1:0;Rx&&(nu*=g4/no),sa.glyphOffsetArray.length>=Li.MAX_GLYPHS&&M("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),ks.sortKey!==void 0&&sa.addToSortKeyRanges(sa.symbolInstances.length,ks.sortKey),sa.symbolInstances.emplaceBack(zl.x,zl.y,Cu.right>=0?Cu.right:-1,Cu.center>=0?Cu.center:-1,Cu.left>=0?Cu.left:-1,Cu.vertical||-1,Y1,X1,Sx,y4,x4,b4,_4,w4,T4,k4,A4,Fh,Ax,Mx,Tx,kx,Rx,0,Z1,$1,J1,nu)}(ei,Dh,p4,ra,Ri,Ji,Eu,ei.layers[0],ei.collisionBoxArray,pi.index,pi.sourceLayerIndex,ei.index,yd,N1,_d,Mo,xd,bd,wd,Rl,pi,Zi,ss,vo,mi)};if(Ch==="line")for(var Ef=0,Td=Hy(pi.geometry,0,0,Yr,Yr);Ef1){var Ih=X5(Bc,Sf,ra.vertical||ul,Ri,cl,Dc);Ih&&Fc(Bc,Ih)}}else if(pi.type==="Polygon")for(var Nc=0,Rh=T1(pi.geometry,0);Nc=kn.maxzoom||kn.visibility!=="none"&&(i(ln,this.zoom,Ge),(Ct[kn.id]=kn.createBucket({index:Qe.bucketLayerIDs.length,layers:ln,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Bt,sourceID:this.source})).populate(Wt,mt,this.tileID.canonical),Qe.bucketLayerIDs.push(ln.map(function(fn){return fn.id})))}}}var Wn=s.mapObject(mt.glyphDependencies,function(fn){return Object.keys(fn).map(Number)});Object.keys(Wn).length?nt.send("getGlyphs",{uid:this.uid,stacks:Wn},function(fn,hn){ut||(ut=fn,pt=hn,_n.call(Oe))}):pt={};var wn=Object.keys(mt.iconDependencies);wn.length?nt.send("getImages",{icons:wn,source:this.source,tileID:this.tileID,type:"icons"},function(fn,hn){ut||(ut=fn,bt=hn,_n.call(Oe))}):bt={};var on=Object.keys(mt.patternDependencies);function _n(){if(ut)return ht(ut);if(pt&&bt&&Lt){var fn=new l(pt),hn=new s.ImageAtlas(bt,Lt);for(var In in Ct){var Cn=Ct[In];Cn instanceof s.SymbolBucket?(i(Cn.layers,this.zoom,Ge),s.performSymbolLayout(Cn,pt,fn.positions,bt,hn.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):Cn.hasPattern&&(Cn instanceof s.LineBucket||Cn instanceof s.FillBucket||Cn instanceof s.FillExtrusionBucket)&&(i(Cn.layers,this.zoom,Ge),Cn.addFeatures(mt,this.tileID.canonical,hn.patternPositions))}this.status="done",ht(null,{buckets:s.values(Ct).filter(function(Nn){return!Nn.isEmpty()}),featureIndex:Qe,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:fn.image,imageAtlas:hn,glyphMap:this.returnDependencies?pt:null,iconMap:this.returnDependencies?bt:null,glyphPositions:this.returnDependencies?fn.positions:null})}}on.length?nt.send("getImages",{icons:on,source:this.source,tileID:this.tileID,type:"patterns"},function(fn,hn){ut||(ut=fn,Lt=hn,_n.call(Oe))}):Lt={},_n.call(this)};var n=function(Je,Ke,Ge,nt){this.actor=Je,this.layerIndex=Ke,this.availableImages=Ge,this.loadVectorData=nt||r,this.loading={},this.loaded={}};n.prototype.loadTile=function(Je,Ke){var Ge=this,nt=Je.uid;this.loading||(this.loading={});var ht=!!(Je&&Je.request&&Je.request.collectResourceTiming)&&new s.RequestPerformance(Je.request),Oe=this.loading[nt]=new t(Je);Oe.abort=this.loadVectorData(Je,function(Be,Qe){if(delete Ge.loading[nt],Be||!Qe)return Oe.status="done",Ge.loaded[nt]=Oe,Ke(Be);var ut=Qe.rawData,pt={};Qe.expires&&(pt.expires=Qe.expires),Qe.cacheControl&&(pt.cacheControl=Qe.cacheControl);var bt={};if(ht){var Lt=ht.finish();Lt&&(bt.resourceTiming=JSON.parse(JSON.stringify(Lt)))}Oe.vectorTile=Qe.vectorTile,Oe.parse(Qe.vectorTile,Ge.layerIndex,Ge.availableImages,Ge.actor,function(Ct,mt){if(Ct||!mt)return Ke(Ct);Ke(null,s.extend({rawTileData:ut.slice(0)},mt,pt,bt))}),Ge.loaded=Ge.loaded||{},Ge.loaded[nt]=Oe})},n.prototype.reloadTile=function(Je,Ke){var Ge=this,nt=this.loaded,ht=Je.uid,Oe=this;if(nt&&nt[ht]){var Be=nt[ht];Be.showCollisionBoxes=Je.showCollisionBoxes;var Qe=function(ut,pt){var bt=Be.reloadCallback;bt&&(delete Be.reloadCallback,Be.parse(Be.vectorTile,Oe.layerIndex,Ge.availableImages,Oe.actor,bt)),Ke(ut,pt)};Be.status==="parsing"?Be.reloadCallback=Qe:Be.status==="done"&&(Be.vectorTile?Be.parse(Be.vectorTile,this.layerIndex,this.availableImages,this.actor,Qe):Qe())}},n.prototype.abortTile=function(Je,Ke){var Ge=this.loading,nt=Je.uid;Ge&&Ge[nt]&&Ge[nt].abort&&(Ge[nt].abort(),delete Ge[nt]),Ke()},n.prototype.removeTile=function(Je,Ke){var Ge=this.loaded,nt=Je.uid;Ge&&Ge[nt]&&delete Ge[nt],Ke()};var o=s.window.ImageBitmap,a=function(){this.loaded={}};a.prototype.loadTile=function(Je,Ke){var Ge=Je.uid,nt=Je.encoding,ht=Je.rawImageData,Oe=o&&ht instanceof o?this.getImageData(ht):ht,Be=new s.DEMData(Ge,Oe,nt);this.loaded=this.loaded||{},this.loaded[Ge]=Be,Ke(null,Be)},a.prototype.getImageData=function(Je){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(Je.width,Je.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=Je.width,this.offscreenCanvas.height=Je.height,this.offscreenCanvasContext.drawImage(Je,0,0,Je.width,Je.height);var Ke=this.offscreenCanvasContext.getImageData(-1,-1,Je.width+2,Je.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new s.RGBAImage({width:Ke.width,height:Ke.height},Ke.data)},a.prototype.removeTile=function(Je){var Ke=this.loaded,Ge=Je.uid;Ke&&Ke[Ge]&&delete Ke[Ge]};var u=function Je(Ke,Ge){var nt,ht=Ke&&Ke.type;if(ht==="FeatureCollection")for(nt=0;nt=0!=!!Ke&&Je.reverse()}var b=s.vectorTile.VectorTileFeature.prototype.toGeoJSON,d=function(Je){this._feature=Je,this.extent=s.EXTENT,this.type=Je.type,this.properties=Je.tags,"id"in Je&&!isNaN(Je.id)&&(this.id=parseInt(Je.id,10))};d.prototype.loadGeometry=function(){if(this._feature.type===1){for(var Je=[],Ke=0,Ge=this._feature.geometry;Ke>31}function G(Je,Ke){for(var Ge=Je.loadGeometry(),nt=Je.type,ht=0,Oe=0,Be=Ge.length,Qe=0;Qe>1;V(Je,Ke,Be,nt,ht,Oe%2),j(Je,Ke,Ge,nt,Be-1,Oe+1),j(Je,Ke,Ge,Be+1,ht,Oe+1)}}function V(Je,Ke,Ge,nt,ht,Oe){for(;ht>nt;){if(ht-nt>600){var Be=ht-nt+1,Qe=Ge-nt+1,ut=Math.log(Be),pt=.5*Math.exp(2*ut/3),bt=.5*Math.sqrt(ut*pt*(Be-pt)/Be)*(Qe-Be/2<0?-1:1);V(Je,Ke,Ge,Math.max(nt,Math.floor(Ge-Qe*pt/Be+bt)),Math.min(ht,Math.floor(Ge+(Be-Qe)*pt/Be+bt)),Oe)}var Lt=Ke[2*Ge+Oe],Ct=nt,mt=ht;for(H(Je,Ke,nt,Ge),Ke[2*ht+Oe]>Lt&&H(Je,Ke,nt,ht);CtLt;)mt--}Ke[2*nt+Oe]===Lt?H(Je,Ke,nt,mt):H(Je,Ke,++mt,ht),mt<=Ge&&(nt=mt+1),Ge<=mt&&(ht=mt-1)}}function H(Je,Ke,Ge,nt){ee(Je,Ge,nt),ee(Ke,2*Ge,2*nt),ee(Ke,2*Ge+1,2*nt+1)}function ee(Je,Ke,Ge){var nt=Je[Ke];Je[Ke]=Je[Ge],Je[Ge]=nt}function Q(Je,Ke,Ge,nt){var ht=Je-Ge,Oe=Ke-nt;return ht*ht+Oe*Oe}h.fromVectorTileJs=M,h.fromGeojsonVt=A,h.GeoJSONWrapper=C;var Y=function(Je){return Je[0]},X=function(Je){return Je[1]},K=function(Je,Ke,Ge,nt,ht){Ke===void 0&&(Ke=Y),Ge===void 0&&(Ge=X),nt===void 0&&(nt=64),ht===void 0&&(ht=Float64Array),this.nodeSize=nt,this.points=Je;for(var Oe=Je.length<65536?Uint16Array:Uint32Array,Be=this.ids=new Oe(Je.length),Qe=this.coords=new ht(2*Je.length),ut=0;ut=Be&&Lt<=ut&&Ct>=Qe&&Ct<=pt&&Ot.push(ht[Wt]);else{var Gt=Math.floor((Bt+Pt)/2);Lt=Oe[2*Gt],Ct=Oe[2*Gt+1],Lt>=Be&&Lt<=ut&&Ct>=Qe&&Ct<=pt&&Ot.push(ht[Gt]);var Xt=(_t+1)%2;(_t===0?Be<=Lt:Qe<=Ct)&&(mt.push(Bt),mt.push(Gt-1),mt.push(Xt)),(_t===0?ut>=Lt:pt>=Ct)&&(mt.push(Gt+1),mt.push(Pt),mt.push(Xt))}}return Ot}(this.ids,this.coords,Je,Ke,Ge,nt,this.nodeSize)},K.prototype.within=function(Je,Ke,Ge){return function(nt,ht,Oe,Be,Qe,ut){for(var pt=[0,nt.length-1,0],bt=[],Lt=Qe*Qe;pt.length;){var Ct=pt.pop(),mt=pt.pop(),Ot=pt.pop();if(mt-Ot<=ut)for(var _t=Ot;_t<=mt;_t++)Q(ht[2*_t],ht[2*_t+1],Oe,Be)<=Lt&&bt.push(nt[_t]);else{var Pt=Math.floor((Ot+mt)/2),Bt=ht[2*Pt],Wt=ht[2*Pt+1];Q(Bt,Wt,Oe,Be)<=Lt&&bt.push(nt[Pt]);var Gt=(Ct+1)%2;(Ct===0?Oe-Qe<=Bt:Be-Qe<=Wt)&&(pt.push(Ot),pt.push(Pt-1),pt.push(Gt)),(Ct===0?Oe+Qe>=Bt:Be+Qe>=Wt)&&(pt.push(Pt+1),pt.push(mt),pt.push(Gt))}}return bt}(this.ids,this.coords,Je,Ke,Ge,this.nodeSize)};var te={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(Je){return Je}},ae=function(Je){this.options=pe(Object.create(te),Je),this.trees=new Array(this.options.maxZoom+1)};function oe(Je,Ke,Ge,nt,ht){return{x:Je,y:Ke,zoom:1/0,id:Ge,parentId:-1,numPoints:nt,properties:ht}}function se(Je,Ke){var Ge=Je.geometry.coordinates,nt=Ge[0],ht=Ge[1];return{x:he(nt),y:de(ht),zoom:1/0,index:Ke,parentId:-1}}function fe(Je){return{type:"Feature",id:Je.id,properties:xe(Je),geometry:{type:"Point",coordinates:[(nt=Je.x,360*(nt-.5)),(Ke=Je.y,Ge=(180-360*Ke)*Math.PI/180,360*Math.atan(Math.exp(Ge))/Math.PI-90)]}};var Ke,Ge,nt}function xe(Je){var Ke=Je.numPoints,Ge=Ke>=1e4?Math.round(Ke/1e3)+"k":Ke>=1e3?Math.round(Ke/100)/10+"k":Ke;return pe(pe({},Je.properties),{cluster:!0,cluster_id:Je.id,point_count:Ke,point_count_abbreviated:Ge})}function he(Je){return Je/360+.5}function de(Je){var Ke=Math.sin(Je*Math.PI/180),Ge=.5-.25*Math.log((1+Ke)/(1-Ke))/Math.PI;return Ge<0?0:Ge>1?1:Ge}function pe(Je,Ke){for(var Ge in Ke)Je[Ge]=Ke[Ge];return Je}function ye(Je){return Je.x}function Re(Je){return Je.y}function we(Je,Ke,Ge,nt){for(var ht,Oe=nt,Be=Ge-Ke>>1,Qe=Ge-Ke,ut=Je[Ke],pt=Je[Ke+1],bt=Je[Ge],Lt=Je[Ge+1],Ct=Ke+3;CtOe)ht=Ct,Oe=mt;else if(mt===Oe){var Ot=Math.abs(Ct-Be);Otnt&&(ht-Ke>3&&we(Je,Ke,ht,nt),Je[ht+2]=Oe,Ge-ht>3&&we(Je,ht,Ge,nt))}function Ae(Je,Ke,Ge,nt,ht,Oe){var Be=ht-Ge,Qe=Oe-nt;if(Be!==0||Qe!==0){var ut=((Je-Ge)*Be+(Ke-nt)*Qe)/(Be*Be+Qe*Qe);ut>1?(Ge=ht,nt=Oe):ut>0&&(Ge+=Be*ut,nt+=Qe*ut)}return(Be=Je-Ge)*Be+(Qe=Ke-nt)*Qe}function Me(Je,Ke,Ge,nt){var ht={id:Je===void 0?null:Je,type:Ke,geometry:Ge,tags:nt,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(Oe){var Be=Oe.geometry,Qe=Oe.type;if(Qe==="Point"||Qe==="MultiPoint"||Qe==="LineString")Ce(Oe,Be);else if(Qe==="Polygon"||Qe==="MultiLineString")for(var ut=0;ut0&&(Be+=nt?(ht*pt-ut*Oe)/2:Math.sqrt(Math.pow(ut-ht,2)+Math.pow(pt-Oe,2))),ht=ut,Oe=pt}var bt=Ke.length-3;Ke[2]=1,we(Ke,0,bt,Ge),Ke[bt+2]=1,Ke.size=Math.abs(Be),Ke.start=0,Ke.end=Ke.size}function Te(Je,Ke,Ge,nt){for(var ht=0;ht1?1:Ge}function De(Je,Ke,Ge,nt,ht,Oe,Be,Qe){if(nt/=Ke,Oe>=(Ge/=Ke)&&Be=nt)return null;for(var ut=[],pt=0;pt=Ge&&Ot=nt)){var _t=[];if(Ct==="Point"||Ct==="MultiPoint")je(Lt,_t,Ge,nt,ht);else if(Ct==="LineString")ge(Lt,_t,Ge,nt,ht,!1,Qe.lineMetrics);else if(Ct==="MultiLineString")Se(Lt,_t,Ge,nt,ht,!1);else if(Ct==="Polygon")Se(Lt,_t,Ge,nt,ht,!0);else if(Ct==="MultiPolygon")for(var Pt=0;Pt=Ge&&Be<=nt&&(Ke.push(Je[Oe]),Ke.push(Je[Oe+1]),Ke.push(Je[Oe+2]))}}function ge(Je,Ke,Ge,nt,ht,Oe,Be){for(var Qe,ut,pt=be(Je),bt=ht===0?Ye:Ze,Lt=Je.start,Ct=0;CtGe&&(ut=bt(pt,mt,Ot,Pt,Bt,Ge),Be&&(pt.start=Lt+Qe*ut)):Wt>nt?Gt=Ge&&(ut=bt(pt,mt,Ot,Pt,Bt,Ge),Xt=!0),Gt>nt&&Wt<=nt&&(ut=bt(pt,mt,Ot,Pt,Bt,nt),Xt=!0),!Oe&&Xt&&(Be&&(pt.end=Lt+Qe*ut),Ke.push(pt),pt=be(Je)),Be&&(Lt+=Qe)}var Kt=Je.length-3;mt=Je[Kt],Ot=Je[Kt+1],_t=Je[Kt+2],(Wt=ht===0?mt:Ot)>=Ge&&Wt<=nt&&Ne(pt,mt,Ot,_t),Kt=pt.length-3,Oe&&Kt>=3&&(pt[Kt]!==pt[0]||pt[Kt+1]!==pt[1])&&Ne(pt,pt[0],pt[1],pt[2]),pt.length&&Ke.push(pt)}function be(Je){var Ke=[];return Ke.size=Je.size,Ke.start=Je.start,Ke.end=Je.end,Ke}function Se(Je,Ke,Ge,nt,ht,Oe){for(var Be=0;BeBe.maxX&&(Be.maxX=bt),Lt>Be.maxY&&(Be.maxY=Lt)}return Be}function Tt(Je,Ke,Ge,nt){var ht=Ke.geometry,Oe=Ke.type,Be=[];if(Oe==="Point"||Oe==="MultiPoint")for(var Qe=0;Qe0&&Ke.size<(ht?Be:nt))Ge.numPoints+=Ke.length/3;else{for(var Qe=[],ut=0;utBe)&&(Ge.numSimplified++,Qe.push(Ke[ut]),Qe.push(Ke[ut+1])),Ge.numPoints++;ht&&function(pt,bt){for(var Lt=0,Ct=0,mt=pt.length,Ot=mt-2;Ct0===bt)for(Ct=0,mt=pt.length;Ct24)throw new Error("maxZoom should be in the 0-24 range");if(Ke.promoteId&&Ke.generateId)throw new Error("promoteId and generateId cannot be used together.");var nt=function(ht,Oe){var Be=[];if(ht.type==="FeatureCollection")for(var Qe=0;Qe=nt;pt--){var bt=+Date.now();Qe=this._cluster(Qe,pt),this.trees[pt]=new K(Qe,ye,Re,Oe,Float32Array),Ge&&console.log("z%d: %d clusters in %dms",pt,Qe.length,+Date.now()-bt)}return Ge&&console.timeEnd("total time"),this},ae.prototype.getClusters=function(Je,Ke){var Ge=((Je[0]+180)%360+360)%360-180,nt=Math.max(-90,Math.min(90,Je[1])),ht=Je[2]===180?180:((Je[2]+180)%360+360)%360-180,Oe=Math.max(-90,Math.min(90,Je[3]));if(Je[2]-Je[0]>=360)Ge=-180,ht=180;else if(Ge>ht){var Be=this.getClusters([Ge,nt,180,Oe],Ke),Qe=this.getClusters([-180,nt,ht,Oe],Ke);return Be.concat(Qe)}for(var ut=this.trees[this._limitZoom(Ke)],pt=[],bt=0,Lt=ut.range(he(Ge),de(Oe),he(ht),de(nt));bt1?this._map(pt,!0):null,Pt=(ut<<5)+(Ke+1)+this.points.length,Bt=0,Wt=Lt;Bt>5},ae.prototype._getOriginZoom=function(Je){return(Je-this.points.length)%32},ae.prototype._map=function(Je,Ke){if(Je.numPoints)return Ke?pe({},Je.properties):Je.properties;var Ge=this.points[Je.index].properties,nt=this.options.map(Ge);return Ke&&nt===Ge?pe({},nt):nt},Dt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Dt.prototype.splitTile=function(Je,Ke,Ge,nt,ht,Oe,Be){for(var Qe=[Je,Ke,Ge,nt],ut=this.options,pt=ut.debug;Qe.length;){nt=Qe.pop(),Ge=Qe.pop(),Ke=Qe.pop(),Je=Qe.pop();var bt=1<1&&console.time("creation"),Ct=this.tiles[Lt]=Et(Je,Ke,Ge,nt,ut),this.tileCoords.push({z:Ke,x:Ge,y:nt}),pt)){pt>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Ke,Ge,nt,Ct.numFeatures,Ct.numPoints,Ct.numSimplified),console.timeEnd("creation"));var mt="z"+Ke;this.stats[mt]=(this.stats[mt]||0)+1,this.total++}if(Ct.source=Je,ht){if(Ke===ut.maxZoom||Ke===ht)continue;var Ot=1<1&&console.time("clipping");var _t,Pt,Bt,Wt,Gt,Xt,Kt=.5*ut.buffer/ut.extent,nn=.5-Kt,yn=.5+Kt,ln=1+Kt;_t=Pt=Bt=Wt=null,Gt=De(Je,bt,Ge-Kt,Ge+yn,0,Ct.minX,Ct.maxX,ut),Xt=De(Je,bt,Ge+nn,Ge+ln,0,Ct.minX,Ct.maxX,ut),Je=null,Gt&&(_t=De(Gt,bt,nt-Kt,nt+yn,1,Ct.minY,Ct.maxY,ut),Pt=De(Gt,bt,nt+nn,nt+ln,1,Ct.minY,Ct.maxY,ut),Gt=null),Xt&&(Bt=De(Xt,bt,nt-Kt,nt+yn,1,Ct.minY,Ct.maxY,ut),Wt=De(Xt,bt,nt+nn,nt+ln,1,Ct.minY,Ct.maxY,ut),Xt=null),pt>1&&console.timeEnd("clipping"),Qe.push(_t||[],Ke+1,2*Ge,2*nt),Qe.push(Pt||[],Ke+1,2*Ge,2*nt+1),Qe.push(Bt||[],Ke+1,2*Ge+1,2*nt),Qe.push(Wt||[],Ke+1,2*Ge+1,2*nt+1)}}},Dt.prototype.getTile=function(Je,Ke,Ge){var nt=this.options,ht=nt.extent,Oe=nt.debug;if(Je<0||Je>24)return null;var Be=1<1&&console.log("drilling down to z%d-%d-%d",Je,Ke,Ge);for(var ut,pt=Je,bt=Ke,Lt=Ge;!ut&&pt>0;)pt--,bt=Math.floor(bt/2),Lt=Math.floor(Lt/2),ut=this.tiles[It(pt,bt,Lt)];return ut&&ut.source?(Oe>1&&console.log("found parent tile z%d-%d-%d",pt,bt,Lt),Oe>1&&console.time("drilling down"),this.splitTile(ut.source,pt,bt,Lt,Je,Ke,Ge),Oe>1&&console.timeEnd("drilling down"),this.tiles[Qe]?ft(this.tiles[Qe],ht):null):null};var qt=function(Je){function Ke(Ge,nt,ht,Oe){Je.call(this,Ge,nt,ht,Ft),Oe&&(this.loadGeoJSON=Oe)}return Je&&(Ke.__proto__=Je),Ke.prototype=Object.create(Je&&Je.prototype),Ke.prototype.constructor=Ke,Ke.prototype.loadData=function(Ge,nt){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=nt,this._pendingLoadDataParams=Ge,this._state&&this._state!=="Idle"?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},Ke.prototype._loadData=function(){var Ge=this;if(this._pendingCallback&&this._pendingLoadDataParams){var nt=this._pendingCallback,ht=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var Oe=!!(ht&&ht.request&&ht.request.collectResourceTiming)&&new s.RequestPerformance(ht.request);this.loadGeoJSON(ht,function(Be,Qe){if(Be||!Qe)return nt(Be);if(typeof Qe!="object")return nt(new Error("Input data given to '"+ht.source+"' is not a valid GeoJSON object."));u(Qe,!0);try{Ge._geoJSONIndex=ht.cluster?new ae(function(bt){var Lt=bt.superclusterOptions,Ct=bt.clusterProperties;if(!Ct||!Lt)return Lt;for(var mt={},Ot={},_t={accumulated:null,zoom:0},Pt={properties:null},Bt=Object.keys(Ct),Wt=0,Gt=Bt;Wt=0?0:q.button},m.remove=function(q){q.parentNode&&q.parentNode.removeChild(q)};var p=function(q){function $(){q.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new s.RGBAImage({width:1,height:1}),this.dirty=!0}return q&&($.__proto__=q),$.prototype=Object.create(q&&q.prototype),$.prototype.constructor=$,$.prototype.isLoaded=function(){return this.loaded},$.prototype.setLoaded=function(W){if(this.loaded!==W&&(this.loaded=W,W)){for(var ie=0,_e=this.requestors;ie<_e.length;ie+=1){var ze=_e[ie],He=ze.ids,Xe=ze.callback;this._notify(He,Xe)}this.requestors=[]}},$.prototype.getImage=function(W){return this.images[W]},$.prototype.addImage=function(W,ie){this._validate(W,ie)&&(this.images[W]=ie)},$.prototype._validate=function(W,ie){var _e=!0;return this._validateStretch(ie.stretchX,ie.data&&ie.data.width)||(this.fire(new s.ErrorEvent(new Error('Image "'+W+'" has invalid "stretchX" value'))),_e=!1),this._validateStretch(ie.stretchY,ie.data&&ie.data.height)||(this.fire(new s.ErrorEvent(new Error('Image "'+W+'" has invalid "stretchY" value'))),_e=!1),this._validateContent(ie.content,ie)||(this.fire(new s.ErrorEvent(new Error('Image "'+W+'" has invalid "content" value'))),_e=!1),_e},$.prototype._validateStretch=function(W,ie){if(!W)return!0;for(var _e=0,ze=0,He=W;ze=0?1.2:1))}function x(q,$,W,ie,_e,ze,He){for(var Xe=0;Xe<$;Xe++){for(var at=0;at65535)wt(new Error("glyphs > 65535 not supported"));else if(ve.ranges[Fe])wt(null,{stack:At,id:re,glyph:Le});else{var Ve=ve.requests[Fe];Ve||(Ve=ve.requests[Fe]=[],y.loadGlyphRange(At,Fe,W.url,W.requestManager,function(We,$e){if($e){for(var tt in $e)W._doesCharSupportLocalGlyph(+tt)||(ve.glyphs[+tt]=$e[+tt]);ve.ranges[Fe]=!0}for(var lt=0,gt=Ve;lt1&&(at=q[++Xe]);var At=Math.abs(wt-at.left),re=Math.abs(wt-at.right),ve=Math.min(At,re),Le=void 0,Fe=_e/W*(ie+1);if(at.isDash){var Ve=ie-Math.abs(Fe);Le=Math.sqrt(ve*ve+Ve*Ve)}else Le=ie-Math.sqrt(ve*ve+Fe*Fe);this.data[He+wt]=Math.max(0,Math.min(255,Le+128))}},C.prototype.addRegularDash=function(q){for(var $=q.length-1;$>=0;--$){var W=q[$],ie=q[$+1];W.zeroLength?q.splice($,1):ie&&ie.isDash===W.isDash&&(ie.left=W.left,q.splice($,1))}var _e=q[0],ze=q[q.length-1];_e.isDash===ze.isDash&&(_e.left=ze.left-this.width,ze.right=_e.right+this.width);for(var He=this.width*this.nextRow,Xe=0,at=q[Xe],wt=0;wt1&&(at=q[++Xe]);var At=Math.abs(wt-at.left),re=Math.abs(wt-at.right),ve=Math.min(At,re),Le=at.isDash?ve:-ve;this.data[He+wt]=Math.max(0,Math.min(255,Le+128))}},C.prototype.addDash=function(q,$){var W=$?7:0,ie=2*W+1;if(this.nextRow+ie>this.height)return s.warnOnce("LineAtlas out of space"),null;for(var _e=0,ze=0;ze=W&&q.x<_e&&q.y>=ie&&q.y0&&(wt[new s.OverscaledTileID(W.overscaledZ,He,ie.z,ze,ie.y-1).key]={backfilled:!1},wt[new s.OverscaledTileID(W.overscaledZ,W.wrap,ie.z,ie.x,ie.y-1).key]={backfilled:!1},wt[new s.OverscaledTileID(W.overscaledZ,at,ie.z,Xe,ie.y-1).key]={backfilled:!1}),ie.y+1<_e&&(wt[new s.OverscaledTileID(W.overscaledZ,He,ie.z,ze,ie.y+1).key]={backfilled:!1},wt[new s.OverscaledTileID(W.overscaledZ,W.wrap,ie.z,ie.x,ie.y+1).key]={backfilled:!1},wt[new s.OverscaledTileID(W.overscaledZ,at,ie.z,Xe,ie.y+1).key]={backfilled:!1}),wt},$.prototype.unloadTile=function(W){W.demTexture&&this.map.painter.saveTileTexture(W.demTexture),W.fbo&&(W.fbo.destroy(),delete W.fbo),W.dem&&delete W.dem,delete W.neighboringTiles,W.state="unloaded",W.actor&&W.actor.send("removeDEMTile",{uid:W.uid,source:this.id})},$}(U),G=function(q){function $(W,ie,_e,ze){q.call(this),this.id=W,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._loaded=!1,this.actor=_e.getActor(),this.setEventedParent(ze),this._data=ie.data,this._options=s.extend({},ie),this._collectResourceTiming=ie.collectResourceTiming,this._resourceTiming=[],ie.maxzoom!==void 0&&(this.maxzoom=ie.maxzoom),ie.type&&(this.type=ie.type),ie.attribution&&(this.attribution=ie.attribution),this.promoteId=ie.promoteId;var He=s.EXTENT/this.tileSize;this.workerOptions=s.extend({source:this.id,cluster:ie.cluster||!1,geojsonVtOptions:{buffer:(ie.buffer!==void 0?ie.buffer:128)*He,tolerance:(ie.tolerance!==void 0?ie.tolerance:.375)*He,extent:s.EXTENT,maxZoom:this.maxzoom,lineMetrics:ie.lineMetrics||!1,generateId:ie.generateId||!1},superclusterOptions:{maxZoom:ie.clusterMaxZoom!==void 0?Math.min(ie.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,extent:s.EXTENT,radius:(ie.clusterRadius||50)*He,log:!1,generateId:ie.generateId||!1},clusterProperties:ie.clusterProperties},ie.workerOptions)}return q&&($.__proto__=q),$.prototype=Object.create(q&&q.prototype),$.prototype.constructor=$,$.prototype.load=function(){var W=this;this.fire(new s.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(ie){if(ie)W.fire(new s.ErrorEvent(ie));else{var _e={dataType:"source",sourceDataType:"metadata"};W._collectResourceTiming&&W._resourceTiming&&W._resourceTiming.length>0&&(_e.resourceTiming=W._resourceTiming,W._resourceTiming=[]),W.fire(new s.Event("data",_e))}})},$.prototype.onAdd=function(W){this.map=W,this.load()},$.prototype.setData=function(W){var ie=this;return this._data=W,this.fire(new s.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(_e){if(_e)ie.fire(new s.ErrorEvent(_e));else{var ze={dataType:"source",sourceDataType:"content"};ie._collectResourceTiming&&ie._resourceTiming&&ie._resourceTiming.length>0&&(ze.resourceTiming=ie._resourceTiming,ie._resourceTiming=[]),ie.fire(new s.Event("data",ze))}}),this},$.prototype.getClusterExpansionZoom=function(W,ie){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:W,source:this.id},ie),this},$.prototype.getClusterChildren=function(W,ie){return this.actor.send("geojson.getClusterChildren",{clusterId:W,source:this.id},ie),this},$.prototype.getClusterLeaves=function(W,ie,_e,ze){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:W,limit:ie,offset:_e},ze),this},$.prototype._updateWorkerData=function(W){var ie=this;this._loaded=!1;var _e=s.extend({},this.workerOptions),ze=this._data;typeof ze=="string"?(_e.request=this.map._requestManager.transformRequest(s.browser.resolveURL(ze),s.ResourceType.Source),_e.request.collectResourceTiming=this._collectResourceTiming):_e.data=JSON.stringify(ze),this.actor.send(this.type+".loadData",_e,function(He,Xe){ie._removed||Xe&&Xe.abandoned||(ie._loaded=!0,Xe&&Xe.resourceTiming&&Xe.resourceTiming[ie.id]&&(ie._resourceTiming=Xe.resourceTiming[ie.id].slice(0)),ie.actor.send(ie.type+".coalesce",{source:_e.source},null),W(He))})},$.prototype.loaded=function(){return this._loaded},$.prototype.loadTile=function(W,ie){var _e=this,ze=W.actor?"reloadTile":"loadTile";W.actor=this.actor;var He={type:this.type,uid:W.uid,tileID:W.tileID,zoom:W.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:s.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};W.request=this.actor.send(ze,He,function(Xe,at){return delete W.request,W.unloadVectorData(),W.aborted?ie(null):Xe?ie(Xe):(W.loadVectorData(at,_e.map.painter,ze==="reloadTile"),ie(null))})},$.prototype.abortTile=function(W){W.request&&(W.request.cancel(),delete W.request),W.aborted=!0},$.prototype.unloadTile=function(W){W.unloadVectorData(),this.actor.send("removeTile",{uid:W.uid,type:this.type,source:this.id})},$.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},$.prototype.serialize=function(){return s.extend({},this._options,{type:this.type,data:this._data})},$.prototype.hasTransition=function(){return!1},$}(s.Evented),N=s.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),j=function(q){function $(W,ie,_e,ze){q.call(this),this.id=W,this.dispatcher=_e,this.coordinates=ie.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(ze),this.options=ie}return q&&($.__proto__=q),$.prototype=Object.create(q&&q.prototype),$.prototype.constructor=$,$.prototype.load=function(W,ie){var _e=this;this._loaded=!1,this.fire(new s.Event("dataloading",{dataType:"source"})),this.url=this.options.url,s.getImage(this.map._requestManager.transformRequest(this.url,s.ResourceType.Image),function(ze,He){_e._loaded=!0,ze?_e.fire(new s.ErrorEvent(ze)):He&&(_e.image=He,W&&(_e.coordinates=W),ie&&ie(),_e._finishLoading())})},$.prototype.loaded=function(){return this._loaded},$.prototype.updateImage=function(W){var ie=this;return this.image&&W.url?(this.options.url=W.url,this.load(W.coordinates,function(){ie.texture=null}),this):this},$.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new s.Event("data",{dataType:"source",sourceDataType:"metadata"})))},$.prototype.onAdd=function(W){this.map=W,this.load()},$.prototype.setCoordinates=function(W){var ie=this;this.coordinates=W;var _e=W.map(s.MercatorCoordinate.fromLngLat);this.tileID=function(He){for(var Xe=1/0,at=1/0,wt=-1/0,At=-1/0,re=0,ve=He;reie.end(0)?this.fire(new s.ErrorEvent(new s.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+ie.start(0)+" and "+ie.end(0)+"-second mark."))):this.video.currentTime=W}},$.prototype.getVideo=function(){return this.video},$.prototype.onAdd=function(W){this.map||(this.map=W,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},$.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var W=this.map.painter.context,ie=W.gl;for(var _e in this.boundsBuffer||(this.boundsBuffer=W.createVertexBuffer(this._boundsArray,N.members)),this.boundsSegments||(this.boundsSegments=s.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE),ie.texSubImage2D(ie.TEXTURE_2D,0,0,0,ie.RGBA,ie.UNSIGNED_BYTE,this.video)):(this.texture=new s.Texture(W,this.video,ie.RGBA),this.texture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE)),this.tiles){var ze=this.tiles[_e];ze.state!=="loaded"&&(ze.state="loaded",ze.texture=this.texture)}}},$.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},$.prototype.hasTransition=function(){return this.video&&!this.video.paused},$}(j),H=function(q){function $(W,ie,_e,ze){q.call(this,W,ie,_e,ze),ie.coordinates?Array.isArray(ie.coordinates)&&ie.coordinates.length===4&&!ie.coordinates.some(function(He){return!Array.isArray(He)||He.length!==2||He.some(function(Xe){return typeof Xe!="number"})})||this.fire(new s.ErrorEvent(new s.ValidationError("sources."+W,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new s.ErrorEvent(new s.ValidationError("sources."+W,null,'missing required property "coordinates"'))),ie.animate&&typeof ie.animate!="boolean"&&this.fire(new s.ErrorEvent(new s.ValidationError("sources."+W,null,'optional "animate" property must be a boolean value'))),ie.canvas?typeof ie.canvas=="string"||ie.canvas instanceof s.window.HTMLCanvasElement||this.fire(new s.ErrorEvent(new s.ValidationError("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 s.ErrorEvent(new s.ValidationError("sources."+W,null,'missing required property "canvas"'))),this.options=ie,this.animate=ie.animate===void 0||ie.animate}return q&&($.__proto__=q),$.prototype=Object.create(q&&q.prototype),$.prototype.constructor=$,$.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof s.window.HTMLCanvasElement?this.options.canvas:s.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new s.ErrorEvent(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())},$.prototype.getCanvas=function(){return this.canvas},$.prototype.onAdd=function(W){this.map=W,this.load(),this.canvas&&this.animate&&this.play()},$.prototype.onRemove=function(){this.pause()},$.prototype.prepare=function(){var 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){var ie=this.map.painter.context,_e=ie.gl;for(var ze in this.boundsBuffer||(this.boundsBuffer=ie.createVertexBuffer(this._boundsArray,N.members)),this.boundsSegments||(this.boundsSegments=s.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(W||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new s.Texture(ie,this.canvas,_e.RGBA,{premultiply:!0}),this.tiles){var He=this.tiles[ze];He.state!=="loaded"&&(He.state="loaded",He.texture=this.texture)}}},$.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},$.prototype.hasTransition=function(){return this._playing},$.prototype._hasInvalidDimensions=function(){for(var W=0,ie=[this.canvas.width,this.canvas.height];Wthis.max){var He=this._getAndRemoveByKey(this.order[0]);He&&this.onRemove(He)}return this},K.prototype.has=function(q){return q.wrapped().key in this.data},K.prototype.getAndRemove=function(q){return this.has(q)?this._getAndRemoveByKey(q.wrapped().key):null},K.prototype._getAndRemoveByKey=function(q){var $=this.data[q].shift();return $.timeout&&clearTimeout($.timeout),this.data[q].length===0&&delete this.data[q],this.order.splice(this.order.indexOf(q),1),$.value},K.prototype.getByKey=function(q){var $=this.data[q];return $?$[0].value:null},K.prototype.get=function(q){return this.has(q)?this.data[q.wrapped().key][0].value:null},K.prototype.remove=function(q,$){if(!this.has(q))return this;var W=q.wrapped().key,ie=$===void 0?0:this.data[W].indexOf($),_e=this.data[W][ie];return this.data[W].splice(ie,1),_e.timeout&&clearTimeout(_e.timeout),this.data[W].length===0&&delete this.data[W],this.onRemove(_e.value),this.order.splice(this.order.indexOf(W),1),this},K.prototype.setMaxSize=function(q){for(this.max=q;this.order.length>this.max;){var $=this._getAndRemoveByKey(this.order[0]);$&&this.onRemove($)}return this},K.prototype.filter=function(q){var $=[];for(var W in this.data)for(var ie=0,_e=this.data[W];ie<_e.length;ie+=1){var ze=_e[ie];q(ze.value)||$.push(ze)}for(var He=0,Xe=$;He1||(Math.abs(At)>1&&(Math.abs(At+ve)===1?At+=ve:Math.abs(At-ve)===1&&(At-=ve)),wt.dem&&at.dem&&(at.dem.backfillBorder(wt.dem,At,re),at.neighboringTiles&&at.neighboringTiles[Le]&&(at.neighboringTiles[Le].backfilled=!0)))}},$.prototype.getTile=function(W){return this.getTileByID(W.key)},$.prototype.getTileByID=function(W){return this._tiles[W]},$.prototype._retainLoadedChildren=function(W,ie,_e,ze){for(var He in this._tiles){var Xe=this._tiles[He];if(!(ze[He]||!Xe.hasData()||Xe.tileID.overscaledZ<=ie||Xe.tileID.overscaledZ>_e)){for(var at=Xe.tileID;Xe&&Xe.tileID.overscaledZ>ie+1;){var wt=Xe.tileID.scaledTo(Xe.tileID.overscaledZ-1);(Xe=this._tiles[wt.key])&&Xe.hasData()&&(at=wt)}for(var At=at;At.overscaledZ>ie;)if(W[(At=At.scaledTo(At.overscaledZ-1)).key]){ze[at.key]=at;break}}}},$.prototype.findLoadedParent=function(W,ie){if(W.key in this._loadedParentTiles){var _e=this._loadedParentTiles[W.key];return _e&&_e.tileID.overscaledZ>=ie?_e:null}for(var ze=W.overscaledZ-1;ze>=ie;ze--){var He=W.scaledTo(ze),Xe=this._getLoadedTile(He);if(Xe)return Xe}},$.prototype._getLoadedTile=function(W){var ie=this._tiles[W.key];return ie&&ie.hasData()?ie:this._cache.getByKey(W.wrapped().key)},$.prototype.updateCacheSize=function(W){var ie=(Math.ceil(W.width/this._source.tileSize)+1)*(Math.ceil(W.height/this._source.tileSize)+1),_e=Math.floor(5*ie),ze=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,_e):_e;this._cache.setMaxSize(ze)},$.prototype.handleWrapJump=function(W){var ie=(W-(this._prevLng===void 0?W:this._prevLng))/360,_e=Math.round(ie);if(this._prevLng=W,_e){var ze={};for(var He in this._tiles){var Xe=this._tiles[He];Xe.tileID=Xe.tileID.unwrapTo(Xe.tileID.wrap+_e),ze[Xe.tileID.key]=Xe}for(var at in this._tiles=ze,this._timers)clearTimeout(this._timers[at]),delete this._timers[at];for(var wt in this._tiles){var At=this._tiles[wt];this._setTileReloadTimer(wt,At)}}},$.prototype.update=function(W){var ie=this;if(this.transform=W,this._sourceLoaded&&!this._paused){var _e;this.updateCacheSize(W),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?_e=W.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(Vt){return new s.OverscaledTileID(Vt.canonical.z,Vt.wrap,Vt.canonical.z,Vt.canonical.x,Vt.canonical.y)}):(_e=W.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(_e=_e.filter(function(Vt){return ie._source.hasTile(Vt)}))):_e=[];var ze=W.coveringZoomLevel(this._source),He=Math.max(ze-$.maxOverzooming,this._source.minzoom),Xe=Math.max(ze+$.maxUnderzooming,this._source.minzoom),at=this._updateRetainedTiles(_e,ze);if(Be(this._source.type)){for(var wt={},At={},re=0,ve=Object.keys(at);rethis._source.maxzoom){var $e=Ve.children(this._source.maxzoom)[0],tt=this.getTile($e);if(tt&&tt.hasData()){_e[$e.key]=$e;continue}}else{var lt=Ve.children(this._source.maxzoom);if(_e[lt[0].key]&&_e[lt[1].key]&&_e[lt[2].key]&&_e[lt[3].key])continue}for(var gt=We.wasRequested(),zt=Ve.overscaledZ-1;zt>=He;--zt){var Ut=Ve.scaledTo(zt);if(ze[Ut.key]||(ze[Ut.key]=!0,!(We=this.getTile(Ut))&>&&(We=this._addTile(Ut)),We&&(_e[Ut.key]=Ut,gt=We.wasRequested(),We.hasData())))break}}}return _e},$.prototype._updateLoadedParentTileCache=function(){for(var W in this._loadedParentTiles={},this._tiles){for(var ie=[],_e=void 0,ze=this._tiles[W].tileID;ze.overscaledZ>0;){if(ze.key in this._loadedParentTiles){_e=this._loadedParentTiles[ze.key];break}ie.push(ze.key);var He=ze.scaledTo(ze.overscaledZ-1);if(_e=this._getLoadedTile(He))break;ze=He}for(var Xe=0,at=ie;Xe0||(ie.hasData()&&ie.state!=="reloading"?this._cache.add(ie.tileID,ie,ie.getExpiryTimeout()):(ie.aborted=!0,this._abortTile(ie),this._unloadTile(ie))))},$.prototype.clearTiles=function(){for(var W in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(W);this._cache.reset()},$.prototype.tilesIn=function(W,ie,_e){var ze=this,He=[],Xe=this.transform;if(!Xe)return He;for(var at=_e?Xe.getCameraQueryGeometry(W):W,wt=W.map(function(zt){return Xe.pointCoordinate(zt)}),At=at.map(function(zt){return Xe.pointCoordinate(zt)}),re=this.getIds(),ve=1/0,Le=1/0,Fe=-1/0,Ve=-1/0,We=0,$e=At;We<$e.length;We+=1){var tt=$e[We];ve=Math.min(ve,tt.x),Le=Math.min(Le,tt.y),Fe=Math.max(Fe,tt.x),Ve=Math.max(Ve,tt.y)}for(var lt=function(zt){var Ut=ze._tiles[re[zt]];if(!Ut.holdingForFade()){var Vt=Ut.tileID,Qt=Math.pow(2,Xe.zoom-Ut.tileID.overscaledZ),gn=ie*Ut.queryPadding*s.EXTENT/Ut.tileSize/Qt,en=[Vt.getTilePoint(new s.MercatorCoordinate(ve,Le)),Vt.getTilePoint(new s.MercatorCoordinate(Fe,Ve))];if(en[0].x-gn=0&&en[1].y+gn>=0){var sn=wt.map(function(Mn){return Vt.getTilePoint(Mn)}),rn=At.map(function(Mn){return Vt.getTilePoint(Mn)});He.push({tile:Ut,tileID:Vt,queryGeometry:sn,cameraQueryGeometry:rn,scale:Qt})}}},gt=0;gt=s.browser.now())return!0}return!1},$.prototype.setFeatureState=function(W,ie,_e){W=W||"_geojsonTileLayer",this._state.updateState(W,ie,_e)},$.prototype.removeFeatureState=function(W,ie,_e){W=W||"_geojsonTileLayer",this._state.removeFeatureState(W,ie,_e)},$.prototype.getFeatureState=function(W,ie){return W=W||"_geojsonTileLayer",this._state.getState(W,ie)},$.prototype.setDependencies=function(W,ie,_e){var ze=this._tiles[W];ze&&ze.setDependencies(ie,_e)},$.prototype.reloadTilesForDependencies=function(W,ie){for(var _e in this._tiles)this._tiles[_e].hasDependency(W,ie)&&this._reloadTile(_e,"reloading");this._cache.filter(function(ze){return!ze.hasDependency(W,ie)})},$}(s.Evented);function Oe(q,$){var W=Math.abs(2*q.wrap)-+(q.wrap<0),ie=Math.abs(2*$.wrap)-+($.wrap<0);return q.overscaledZ-$.overscaledZ||ie-W||$.canonical.y-q.canonical.y||$.canonical.x-q.canonical.x}function Be(q){return q==="raster"||q==="image"||q==="video"}function Qe(){return new s.window.Worker(kt.workerUrl)}ht.maxOverzooming=10,ht.maxUnderzooming=3;var ut="mapboxgl_preloaded_worker_pool",pt=function(){this.active={}};pt.prototype.acquire=function(q){if(!this.workers)for(this.workers=[];this.workers.length0?(ie-ze)/He:0;return this.points[_e].mult(1-Xe).add(this.points[$].mult(Xe))};var kn=function(q,$,W){var ie=this.boxCells=[],_e=this.circleCells=[];this.xCellCount=Math.ceil(q/W),this.yCellCount=Math.ceil($/W);for(var ze=0;ze=-$[0]&&W<=$[0]&&ie>=-$[1]&&ie<=$[1]}function hn(q,$,W,ie,_e,ze,He,Xe){var at=ie?q.textSizeData:q.iconSizeData,wt=s.evaluateSizeForZoom(at,W.transform.zoom),At=[256/W.width*2+1,256/W.height*2+1],re=ie?q.text.dynamicLayoutVertexArray:q.icon.dynamicLayoutVertexArray;re.clear();for(var ve=q.lineVertexArray,Le=ie?q.text.placedSymbolArray:q.icon.placedSymbolArray,Fe=W.transform.width/W.transform.height,Ve=!1,We=0;WeMath.abs(W.x-$.x)*ie?{useVertical:!0}:(q===s.WritingMode.vertical?$.yW.x)?{needsFlipping:!0}:null}function Nn(q,$,W,ie,_e,ze,He,Xe,at,wt,At,re,ve,Le){var Fe,Ve=$/24,We=q.lineOffsetX*Ve,$e=q.lineOffsetY*Ve;if(q.numGlyphs>1){var tt=q.glyphStartIndex+q.numGlyphs,lt=q.lineStartIndex,gt=q.lineStartIndex+q.lineLength,zt=In(Ve,Xe,We,$e,W,At,re,q,at,ze,ve);if(!zt)return{notEnoughRoom:!0};var Ut=on(zt.first.point,He).point,Vt=on(zt.last.point,He).point;if(ie&&!W){var Qt=Cn(q.writingMode,Ut,Vt,Le);if(Qt)return Qt}Fe=[zt.first];for(var gn=q.glyphStartIndex+1;gn0?Mn.point:Hn(re,rn,en,1,_e),an=Cn(q.writingMode,en,xn,Le);if(an)return an}var zn=qn(Ve*Xe.getoffsetX(q.glyphStartIndex),We,$e,W,At,re,q.segment,q.lineStartIndex,q.lineStartIndex+q.lineLength,at,ze,ve);if(!zn)return{notEnoughRoom:!0};Fe=[zn]}for(var Vn=0,nr=Fe;Vn0?1:-1,Fe=0;ie&&(Le*=-1,Fe=Math.PI),Le<0&&(Fe+=Math.PI);for(var Ve=Le>0?Xe+He:Xe+He+1,We=_e,$e=_e,tt=0,lt=0,gt=Math.abs(ve),zt=[];tt+lt<=gt;){if((Ve+=Le)=at)return null;if($e=We,zt.push(We),(We=re[Ve])===void 0){var Ut=new s.Point(wt.getx(Ve),wt.gety(Ve)),Vt=on(Ut,At);if(Vt.signedDistanceFromCamera>0)We=re[Ve]=Vt.point;else{var Qt=Ve-Le;We=Hn(tt===0?ze:new s.Point(wt.getx(Qt),wt.gety(Qt)),Ut,$e,gt-tt+1,At)}}tt+=lt,lt=$e.dist(We)}var gn=(gt-tt)/lt,en=We.sub($e),sn=en.mult(gn)._add($e);sn._add(en._unit()._perp()._mult(W*Le));var rn=Fe+Math.atan2(We.y-$e.y,We.x-$e.x);return zt.push(sn),{point:sn,angle:rn,path:zt}}kn.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},kn.prototype.insert=function(q,$,W,ie,_e){this._forEachCell($,W,ie,_e,this._insertBoxCell,this.boxUid++),this.boxKeys.push(q),this.bboxes.push($),this.bboxes.push(W),this.bboxes.push(ie),this.bboxes.push(_e)},kn.prototype.insertCircle=function(q,$,W,ie){this._forEachCell($-ie,W-ie,$+ie,W+ie,this._insertCircleCell,this.circleUid++),this.circleKeys.push(q),this.circles.push($),this.circles.push(W),this.circles.push(ie)},kn.prototype._insertBoxCell=function(q,$,W,ie,_e,ze){this.boxCells[_e].push(ze)},kn.prototype._insertCircleCell=function(q,$,W,ie,_e,ze){this.circleCells[_e].push(ze)},kn.prototype._query=function(q,$,W,ie,_e,ze){if(W<0||q>this.width||ie<0||$>this.height)return!_e&&[];var He=[];if(q<=0&&$<=0&&this.width<=W&&this.height<=ie){if(_e)return!0;for(var Xe=0;Xe0:He},kn.prototype._queryCircle=function(q,$,W,ie,_e){var ze=q-W,He=q+W,Xe=$-W,at=$+W;if(He<0||ze>this.width||at<0||Xe>this.height)return!ie&&[];var wt=[],At={hitTest:ie,circle:{x:q,y:$,radius:W},seenUids:{box:{},circle:{}}};return this._forEachCell(ze,Xe,He,at,this._queryCellCircle,wt,At,_e),ie?wt.length>0:wt},kn.prototype.query=function(q,$,W,ie,_e){return this._query(q,$,W,ie,!1,_e)},kn.prototype.hitTest=function(q,$,W,ie,_e){return this._query(q,$,W,ie,!0,_e)},kn.prototype.hitTestCircle=function(q,$,W,ie){return this._queryCircle(q,$,W,!0,ie)},kn.prototype._queryCell=function(q,$,W,ie,_e,ze,He,Xe){var at=He.seenUids,wt=this.boxCells[_e];if(wt!==null)for(var At=this.bboxes,re=0,ve=wt;re=At[Fe+0]&&ie>=At[Fe+1]&&(!Xe||Xe(this.boxKeys[Le]))){if(He.hitTest)return ze.push(!0),!0;ze.push({key:this.boxKeys[Le],x1:At[Fe],y1:At[Fe+1],x2:At[Fe+2],y2:At[Fe+3]})}}}var Ve=this.circleCells[_e];if(Ve!==null)for(var We=this.circles,$e=0,tt=Ve;$eHe*He+Xe*Xe},kn.prototype._circleAndRectCollide=function(q,$,W,ie,_e,ze,He){var Xe=(ze-ie)/2,at=Math.abs(q-(ie+Xe));if(at>Xe+W)return!1;var wt=(He-_e)/2,At=Math.abs($-(_e+wt));if(At>wt+W)return!1;if(at<=Xe||At<=wt)return!0;var re=at-Xe,ve=At-wt;return re*re+ve*ve<=W*W};var or=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function tr(q,$){for(var W=0;W=1;xn--)Mn.push(sn.path[xn]);for(var an=1;an0){for(var rr=Mn[0].clone(),Tr=Mn[0].clone(),Ar=1;Ar=Qt.x&&Tr.x<=gn.x&&rr.y>=Qt.y&&Tr.y<=gn.y?[Mn]:Tr.xgn.x||Tr.ygn.y?[]:s.clipLine([Mn],Qt.x,Qt.y,gn.x,gn.y)}for(var mr=0,wr=nr;mr=this.screenRightBoundary||iethis.screenBottomBoundary},ir.prototype.isInsideGrid=function(q,$,W,ie){return W>=0&&q=0&&$0?(this.prevPlacement&&this.prevPlacement.variableOffsets[re.crossTileID]&&this.prevPlacement.placements[re.crossTileID]&&this.prevPlacement.placements[re.crossTileID].text&&(Ve=this.prevPlacement.variableOffsets[re.crossTileID].anchor),this.variableOffsets[re.crossTileID]={textOffset:We,width:W,height:ie,anchor:q,textBoxScale:_e,prevAnchor:Ve},this.markUsedJustification(ve,q,re,Le),ve.allowVerticalPlacement&&(this.markUsedOrientation(ve,Le,re),this.placedOrientations[re.crossTileID]=Le),{shift:$e,placedGlyphBoxes:tt}):void 0},Qn.prototype.placeLayerBucketPart=function(q,$,W){var ie=this,_e=q.parameters,ze=_e.bucket,He=_e.layout,Xe=_e.posMatrix,at=_e.textLabelPlaneMatrix,wt=_e.labelToScreenMatrix,At=_e.textPixelRatio,re=_e.holdingForFade,ve=_e.collisionBoxArray,Le=_e.partiallyEvaluatedTextSize,Fe=_e.collisionGroup,Ve=He.get("text-optional"),We=He.get("icon-optional"),$e=He.get("text-allow-overlap"),tt=He.get("icon-allow-overlap"),lt=He.get("text-rotation-alignment")==="map",gt=He.get("text-pitch-alignment")==="map",zt=He.get("icon-text-fit")!=="none",Ut=He.get("symbol-z-order")==="viewport-y",Vt=$e&&(tt||!ze.hasIconData()||We),Qt=tt&&($e||!ze.hasTextData()||Ve);!ze.collisionArrays&&ve&&ze.deserializeCollisionBoxes(ve);var gn=function(an,zn){if(!$[an.crossTileID])if(re)ie.placements[an.crossTileID]=new mn(!1,!1,!1);else{var Vn,nr=!1,rr=!1,Tr=!0,Ar=null,mr={box:null,offscreen:null},wr={box:null,offscreen:null},Rr=null,Jr=null,Kr=0,xr=0,zr=0;zn.textFeatureIndex?Kr=zn.textFeatureIndex:an.useRuntimeCollisionCircles&&(Kr=an.featureIndex),zn.verticalTextFeatureIndex&&(xr=zn.verticalTextFeatureIndex);var Wr=zn.textBox;if(Wr){var Gr=function(ai){var na=s.WritingMode.horizontal;if(ze.allowVerticalPlacement&&!ai&&ie.prevPlacement){var Ba=ie.prevPlacement.placedOrientations[an.crossTileID];Ba&&(ie.placedOrientations[an.crossTileID]=Ba,na=Ba,ie.markUsedOrientation(ze,na,an))}return na},ii=function(ai,na){if(ze.allowVerticalPlacement&&an.numVerticalGlyphVertices>0&&zn.verticalTextBox)for(var Ba=0,Kl=ze.writingModes;Ba0&&(ti=ti.filter(function(ai){return ai!==ui.anchor})).unshift(ui.anchor)}var ki=function(ai,na,Ba){for(var Kl=ai.x2-ai.x1,p1=ai.y2-ai.y1,vh=an.textBoxScale,d1=zt&&!tt?na:null,Wu={box:[],offscreen:!1},Xp=$e?2*ti.length:ti.length,Lc=0;Lc=ti.length,ku=ie.attemptAnchorPlacement(Zu,ai,Kl,p1,vh,lt,gt,At,Xe,Fe,g1,an,ze,Ba,d1);if(ku&&(Wu=ku.placedGlyphBoxes)&&Wu.box&&Wu.box.length){nr=!0,Ar=ku.shift;break}}return Wu};ii(function(){return ki(Wr,zn.iconBox,s.WritingMode.horizontal)},function(){var ai=zn.verticalTextBox,na=mr&&mr.box&&mr.box.length;return ze.allowVerticalPlacement&&!na&&an.numVerticalGlyphVertices>0&&ai?ki(ai,zn.verticalIconBox,s.WritingMode.vertical):{box:null,offscreen:null}}),mr&&(nr=mr.box,Tr=mr.offscreen);var Ii=Gr(mr&&mr.box);if(!nr&&ie.prevPlacement){var Ei=ie.prevPlacement.variableOffsets[an.crossTileID];Ei&&(ie.variableOffsets[an.crossTileID]=Ei,ie.markUsedJustification(ze,Ei.anchor,an,Ii))}}else{var wi=function(ai,na){var Ba=ie.collisionIndex.placeCollisionBox(ai,$e,At,Xe,Fe.predicate);return Ba&&Ba.box&&Ba.box.length&&(ie.markUsedOrientation(ze,na,an),ie.placedOrientations[an.crossTileID]=na),Ba};ii(function(){return wi(Wr,s.WritingMode.horizontal)},function(){var ai=zn.verticalTextBox;return ze.allowVerticalPlacement&&an.numVerticalGlyphVertices>0&&ai?wi(ai,s.WritingMode.vertical):{box:null,offscreen:null}}),Gr(mr&&mr.box&&mr.box.length)}}if(nr=(Vn=mr)&&Vn.box&&Vn.box.length>0,Tr=Vn&&Vn.offscreen,an.useRuntimeCollisionCircles){var Ai=ze.text.placedSymbolArray.get(an.centerJustifiedTextSymbolIndex),Ci=s.evaluateSizeForFeature(ze.textSizeData,Le,Ai),qi=He.get("text-padding"),_s=an.collisionCircleDiameter;Rr=ie.collisionIndex.placeCollisionCircles($e,Ai,ze.lineVertexArray,ze.glyphOffsetArray,Ci,Xe,at,wt,W,gt,Fe.predicate,_s,qi),nr=$e||Rr.circles.length>0&&!Rr.collisionDetected,Tr=Tr&&Rr.offscreen}if(zn.iconFeatureIndex&&(zr=zn.iconFeatureIndex),zn.iconBox){var ta=function(ai){var na=zt&&Ar?Zn(ai,Ar.x,Ar.y,lt,gt,ie.transform.angle):ai;return ie.collisionIndex.placeCollisionBox(na,tt,At,Xe,Fe.predicate)};rr=wr&&wr.box&&wr.box.length&&zn.verticalIconBox?(Jr=ta(zn.verticalIconBox)).box.length>0:(Jr=ta(zn.iconBox)).box.length>0,Tr=Tr&&Jr.offscreen}var Yr=Ve||an.numHorizontalGlyphVertices===0&&an.numVerticalGlyphVertices===0,pa=We||an.numIconVertices===0;if(Yr||pa?pa?Yr||(rr=rr&&nr):nr=rr&&nr:rr=nr=rr&&nr,nr&&Vn&&Vn.box&&(wr&&wr.box&&xr?ie.collisionIndex.insertCollisionBox(Vn.box,He.get("text-ignore-placement"),ze.bucketInstanceId,xr,Fe.ID):ie.collisionIndex.insertCollisionBox(Vn.box,He.get("text-ignore-placement"),ze.bucketInstanceId,Kr,Fe.ID)),rr&&Jr&&ie.collisionIndex.insertCollisionBox(Jr.box,He.get("icon-ignore-placement"),ze.bucketInstanceId,zr,Fe.ID),Rr&&(nr&&ie.collisionIndex.insertCollisionCircles(Rr.circles,He.get("text-ignore-placement"),ze.bucketInstanceId,Kr,Fe.ID),W)){var wa=ze.bucketInstanceId,Ui=ie.collisionCircleArrays[wa];Ui===void 0&&(Ui=ie.collisionCircleArrays[wa]=new Ln);for(var ko=0;ko=0;--sn){var rn=en[sn];gn(ze.symbolInstances.get(rn),ze.collisionArrays[rn])}else for(var Mn=q.symbolInstanceStart;Mn=0&&(q.text.placedSymbolArray.get(at).crossTileID=_e>=0&&at!==_e?0:W.crossTileID)}},Qn.prototype.markUsedOrientation=function(q,$,W){for(var ie=$===s.WritingMode.horizontal||$===s.WritingMode.horizontalOnly?$:0,_e=$===s.WritingMode.vertical?$:0,ze=0,He=[W.leftJustifiedTextSymbolIndex,W.centerJustifiedTextSymbolIndex,W.rightJustifiedTextSymbolIndex];ze0||gt>0,gn=tt.numIconVertices>0,en=ie.placedOrientations[tt.crossTileID],sn=en===s.WritingMode.vertical,rn=en===s.WritingMode.horizontal||en===s.WritingMode.horizontalOnly;if(Qt){var Mn=Sn(Vt.text),xn=sn?pn:Mn;Le(q.text,lt,xn);var an=rn?pn:Mn;Le(q.text,gt,an);var zn=Vt.text.isHidden();[tt.rightJustifiedTextSymbolIndex,tt.centerJustifiedTextSymbolIndex,tt.leftJustifiedTextSymbolIndex].forEach(function(zr){zr>=0&&(q.text.placedSymbolArray.get(zr).hidden=zn||sn?1:0)}),tt.verticalPlacedTextSymbolIndex>=0&&(q.text.placedSymbolArray.get(tt.verticalPlacedTextSymbolIndex).hidden=zn||rn?1:0);var Vn=ie.variableOffsets[tt.crossTileID];Vn&&ie.markUsedJustification(q,Vn.anchor,tt,en);var nr=ie.placedOrientations[tt.crossTileID];nr&&(ie.markUsedJustification(q,"left",tt,nr),ie.markUsedOrientation(q,nr,tt))}if(gn){var rr=Sn(Vt.icon),Tr=!(re&&tt.verticalPlacedIconSymbolIndex&&sn);if(tt.placedIconSymbolIndex>=0){var Ar=Tr?rr:pn;Le(q.icon,tt.numIconVertices,Ar),q.icon.placedSymbolArray.get(tt.placedIconSymbolIndex).hidden=Vt.icon.isHidden()}if(tt.verticalPlacedIconSymbolIndex>=0){var mr=Tr?pn:rr;Le(q.icon,tt.numVerticalIconVertices,mr),q.icon.placedSymbolArray.get(tt.verticalPlacedIconSymbolIndex).hidden=Vt.icon.isHidden()}}if(q.hasIconCollisionBoxData()||q.hasTextCollisionBoxData()){var wr=q.collisionArrays[$e];if(wr){var Rr=new s.Point(0,0);if(wr.textBox||wr.verticalTextBox){var Jr=!0;if(at){var Kr=ie.variableOffsets[zt];Kr?(Rr=$n(Kr.anchor,Kr.width,Kr.height,Kr.textOffset,Kr.textBoxScale),wt&&Rr._rotate(At?ie.transform.angle:-ie.transform.angle)):Jr=!1}wr.textBox&&hr(q.textCollisionBox.collisionVertexArray,Vt.text.placed,!Jr||sn,Rr.x,Rr.y),wr.verticalTextBox&&hr(q.textCollisionBox.collisionVertexArray,Vt.text.placed,!Jr||rn,Rr.x,Rr.y)}var xr=!!(!rn&&wr.verticalIconBox);wr.iconBox&&hr(q.iconCollisionBox.collisionVertexArray,Vt.icon.placed,xr,re?Rr.x:0,re?Rr.y:0),wr.verticalIconBox&&hr(q.iconCollisionBox.collisionVertexArray,Vt.icon.placed,!xr,re?Rr.x:0,re?Rr.y:0)}}},Ve=0;Veq},Qn.prototype.setStale=function(){this.stale=!0};var tn=Math.pow(2,25),Pn=Math.pow(2,24),jt=Math.pow(2,17),Jt=Math.pow(2,16),un=Math.pow(2,9),Rn=Math.pow(2,8),On=Math.pow(2,1);function Sn(q){if(q.opacity===0&&!q.placed)return 0;if(q.opacity===1&&q.placed)return 4294967295;var $=q.placed?1:0,W=Math.floor(127*q.opacity);return W*tn+$*Pn+W*jt+$*Jt+W*un+$*Rn+W*On+$}var pn=0,bn=function(q){this._sortAcrossTiles=q.layout.get("symbol-z-order")!=="viewport-y"&&q.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};bn.prototype.continuePlacement=function(q,$,W,ie,_e){for(var ze=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var He=$[q[this._currentPlacementIndex]],Xe=this.placement.collisionIndex.transform.zoom;if(He.type==="symbol"&&(!He.minzoom||He.minzoom<=Xe)&&(!He.maxzoom||He.maxzoom>Xe)){if(this._inProgressLayer||(this._inProgressLayer=new bn(He)),this._inProgressLayer.continuePlacement(W[He.source],this.placement,this._showCollisionBoxes,He,ze))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},dn.prototype.commit=function(q){return this.placement.commit(q),this.placement};var vn=512/s.EXTENT/2,An=function(q,$,W){this.tileID=q,this.indexedSymbolInstances={},this.bucketInstanceId=W;for(var ie=0;ie<$.length;ie++){var _e=$.get(ie),ze=_e.key;this.indexedSymbolInstances[ze]||(this.indexedSymbolInstances[ze]=[]),this.indexedSymbolInstances[ze].push({crossTileID:_e.crossTileID,coord:this.getScaledCoordinates(_e,q)})}};An.prototype.getScaledCoordinates=function(q,$){var W=$.canonical.z-this.tileID.canonical.z,ie=vn/Math.pow(2,W);return{x:Math.floor(($.canonical.x*s.EXTENT+q.anchorX)*ie),y:Math.floor(($.canonical.y*s.EXTENT+q.anchorY)*ie)}},An.prototype.findMatches=function(q,$,W){for(var ie=this.tileID.canonical.z<$.canonical.z?1:Math.pow(2,this.tileID.canonical.z-$.canonical.z),_e=0;_eq.overscaledZ)for(var Xe in He){var at=He[Xe];at.tileID.isChildOf(q)&&at.findMatches($.symbolInstances,q,_e)}else{var wt=He[q.scaledTo(Number(ze)).key];wt&&wt.findMatches($.symbolInstances,q,_e)}}for(var At=0;At<$.symbolInstances.length;At++){var re=$.symbolInstances.get(At);re.crossTileID||(re.crossTileID=W.generate(),_e[re.crossTileID]=!0)}return this.indexes[q.overscaledZ]===void 0&&(this.indexes[q.overscaledZ]={}),this.indexes[q.overscaledZ][q.key]=new An(q,$.symbolInstances,$.bucketInstanceId),!0},Xn.prototype.removeBucketCrossTileIDs=function(q,$){for(var W in $.indexedSymbolInstances)for(var ie=0,_e=$.indexedSymbolInstances[W];ie<_e.length;ie+=1){var ze=_e[ie];delete this.usedCrossTileIDs[q][ze.crossTileID]}},Xn.prototype.removeStaleBuckets=function(q){var $=!1;for(var W in this.indexes){var ie=this.indexes[W];for(var _e in ie)q[ie[_e].bucketInstanceId]||(this.removeBucketCrossTileIDs(W,ie[_e]),delete ie[_e],$=!0)}return $};var er=function(){this.layerIndexes={},this.crossTileIDs=new Bn,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};er.prototype.addLayer=function(q,$,W){var ie=this.layerIndexes[q.id];ie===void 0&&(ie=this.layerIndexes[q.id]=new Xn);var _e=!1,ze={};ie.handleWrapJump(W);for(var He=0,Xe=$;He1?"@2x":"",re=s.getJSON(ze.transformRequest(ze.normalizeSpriteURL(_e,At,".json"),s.ResourceType.SpriteJSON),function(Fe,Ve){re=null,wt||(wt=Fe,Xe=Ve,Le())}),ve=s.getImage(ze.transformRequest(ze.normalizeSpriteURL(_e,At,".png"),s.ResourceType.SpriteImage),function(Fe,Ve){ve=null,wt||(wt=Fe,at=Ve,Le())});function Le(){if(wt)He(wt);else if(Xe&&at){var Fe=s.browser.getImageData(at),Ve={};for(var We in Xe){var $e=Xe[We],tt=$e.width,lt=$e.height,gt=$e.x,zt=$e.y,Ut=$e.sdf,Vt=$e.pixelRatio,Qt=$e.stretchX,gn=$e.stretchY,en=$e.content,sn=new s.RGBAImage({width:tt,height:lt});s.RGBAImage.copy(Fe,sn,{x:gt,y:zt},{x:0,y:0},{width:tt,height:lt}),Ve[We]={data:sn,pixelRatio:Vt,sdf:Ut,stretchX:Qt,stretchY:gn,content:en}}He(null,Ve)}}return{cancel:function(){re&&(re.cancel(),re=null),ve&&(ve.cancel(),ve=null)}}}(W,this.map._requestManager,function(_e,ze){if(ie._spriteRequest=null,_e)ie.fire(new s.ErrorEvent(_e));else if(ze)for(var He in ze)ie.imageManager.addImage(He,ze[He]);ie.imageManager.setLoaded(!0),ie._availableImages=ie.imageManager.listImages(),ie.dispatcher.broadcast("setImages",ie._availableImages),ie.fire(new s.Event("data",{dataType:"style"}))})},$.prototype._validateLayer=function(W){var ie=this.sourceCaches[W.source];if(ie){var _e=W.sourceLayer;if(_e){var ze=ie.getSource();(ze.type==="geojson"||ze.vectorLayerIds&&ze.vectorLayerIds.indexOf(_e)===-1)&&this.fire(new s.ErrorEvent(new Error('Source layer "'+_e+'" does not exist on source "'+ze.id+'" as specified by style layer "'+W.id+'"')))}}},$.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var W in this.sourceCaches)if(!this.sourceCaches[W].loaded())return!1;return!!this.imageManager.isLoaded()},$.prototype._serializeLayers=function(W){for(var ie=[],_e=0,ze=W;_e0)throw new Error("Unimplemented: "+ze.map(function(He){return He.command}).join(", ")+".");return _e.forEach(function(He){He.command!=="setTransition"&&ie[He.command].apply(ie,He.args)}),this.stylesheet=W,!0},$.prototype.addImage=function(W,ie){if(this.getImage(W))return this.fire(new s.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(W,ie),this._availableImages=this.imageManager.listImages(),this._changedImages[W]=!0,this._changed=!0,this.fire(new s.Event("data",{dataType:"style"}))},$.prototype.updateImage=function(W,ie){this.imageManager.updateImage(W,ie)},$.prototype.getImage=function(W){return this.imageManager.getImage(W)},$.prototype.removeImage=function(W){if(!this.getImage(W))return this.fire(new s.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(W),this._availableImages=this.imageManager.listImages(),this._changedImages[W]=!0,this._changed=!0,this.fire(new s.Event("data",{dataType:"style"}))},$.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},$.prototype.addSource=function(W,ie,_e){var ze=this;if(_e===void 0&&(_e={}),this._checkLoaded(),this.sourceCaches[W]!==void 0)throw new Error("There is already a source with this ID");if(!ie.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(ie).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(ie.type)>=0&&this._validate(s.validateStyle.source,"sources."+W,ie,null,_e))){this.map&&this.map._collectResourceTiming&&(ie.collectResourceTiming=!0);var He=this.sourceCaches[W]=new ht(W,ie,this.dispatcher);He.style=this,He.setEventedParent(this,function(){return{isSourceLoaded:ze.loaded(),source:He.serialize(),sourceId:W}}),He.onAdd(this.map),this._changed=!0}},$.prototype.removeSource=function(W){if(this._checkLoaded(),this.sourceCaches[W]===void 0)throw new Error("There is no source with this ID");for(var ie in this._layers)if(this._layers[ie].source===W)return this.fire(new s.ErrorEvent(new Error('Source "'+W+'" cannot be removed while layer "'+ie+'" is using it.')));var _e=this.sourceCaches[W];delete this.sourceCaches[W],delete this._updatedSources[W],_e.fire(new s.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:W})),_e.setEventedParent(null),_e.clearTiles(),_e.onRemove&&_e.onRemove(this.map),this._changed=!0},$.prototype.setGeoJSONSourceData=function(W,ie){this._checkLoaded(),this.sourceCaches[W].getSource().setData(ie),this._changed=!0},$.prototype.getSource=function(W){return this.sourceCaches[W]&&this.sourceCaches[W].getSource()},$.prototype.addLayer=function(W,ie,_e){_e===void 0&&(_e={}),this._checkLoaded();var ze=W.id;if(this.getLayer(ze))this.fire(new s.ErrorEvent(new Error('Layer with id "'+ze+'" already exists on this map')));else{var He;if(W.type==="custom"){if(Jn(this,s.validateCustomStyleLayer(W)))return;He=s.createStyleLayer(W)}else{if(typeof W.source=="object"&&(this.addSource(ze,W.source),W=s.clone$1(W),W=s.extend(W,{source:ze})),this._validate(s.validateStyle.layer,"layers."+ze,W,{arrayIndex:-1},_e))return;He=s.createStyleLayer(W),this._validateLayer(He),He.setEventedParent(this,{layer:{id:ze}}),this._serializedLayers[He.id]=He.serialize()}var Xe=ie?this._order.indexOf(ie):this._order.length;if(ie&&Xe===-1)this.fire(new s.ErrorEvent(new Error('Layer with id "'+ie+'" does not exist on this map.')));else{if(this._order.splice(Xe,0,ze),this._layerOrderChanged=!0,this._layers[ze]=He,this._removedLayers[ze]&&He.source&&He.type!=="custom"){var at=this._removedLayers[ze];delete this._removedLayers[ze],at.type!==He.type?this._updatedSources[He.source]="clear":(this._updatedSources[He.source]="reload",this.sourceCaches[He.source].pause())}this._updateLayer(He),He.onAdd&&He.onAdd(this.map)}}},$.prototype.moveLayer=function(W,ie){if(this._checkLoaded(),this._changed=!0,this._layers[W]){if(W!==ie){var _e=this._order.indexOf(W);this._order.splice(_e,1);var ze=ie?this._order.indexOf(ie):this._order.length;ie&&ze===-1?this.fire(new s.ErrorEvent(new Error('Layer with id "'+ie+'" does not exist on this map.'))):(this._order.splice(ze,0,W),this._layerOrderChanged=!0)}}else this.fire(new s.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style and cannot be moved.")))},$.prototype.removeLayer=function(W){this._checkLoaded();var ie=this._layers[W];if(ie){ie.setEventedParent(null);var _e=this._order.indexOf(W);this._order.splice(_e,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[W]=ie,delete this._layers[W],delete this._serializedLayers[W],delete this._updatedLayers[W],delete this._updatedPaintProps[W],ie.onRemove&&ie.onRemove(this.map)}else this.fire(new s.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style and cannot be removed.")))},$.prototype.getLayer=function(W){return this._layers[W]},$.prototype.hasLayer=function(W){return W in this._layers},$.prototype.setLayerZoomRange=function(W,ie,_e){this._checkLoaded();var ze=this.getLayer(W);ze?ze.minzoom===ie&&ze.maxzoom===_e||(ie!=null&&(ze.minzoom=ie),_e!=null&&(ze.maxzoom=_e),this._updateLayer(ze)):this.fire(new s.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style and cannot have zoom extent.")))},$.prototype.setFilter=function(W,ie,_e){_e===void 0&&(_e={}),this._checkLoaded();var ze=this.getLayer(W);if(ze){if(!s.deepEqual(ze.filter,ie))return ie==null?(ze.filter=void 0,void this._updateLayer(ze)):void(this._validate(s.validateStyle.filter,"layers."+ze.id+".filter",ie,null,_e)||(ze.filter=s.clone$1(ie),this._updateLayer(ze)))}else this.fire(new s.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style and cannot be filtered.")))},$.prototype.getFilter=function(W){return s.clone$1(this.getLayer(W).filter)},$.prototype.setLayoutProperty=function(W,ie,_e,ze){ze===void 0&&(ze={}),this._checkLoaded();var He=this.getLayer(W);He?s.deepEqual(He.getLayoutProperty(ie),_e)||(He.setLayoutProperty(ie,_e,ze),this._updateLayer(He)):this.fire(new s.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style and cannot be styled.")))},$.prototype.getLayoutProperty=function(W,ie){var _e=this.getLayer(W);if(_e)return _e.getLayoutProperty(ie);this.fire(new s.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style.")))},$.prototype.setPaintProperty=function(W,ie,_e,ze){ze===void 0&&(ze={}),this._checkLoaded();var He=this.getLayer(W);He?s.deepEqual(He.getPaintProperty(ie),_e)||(He.setPaintProperty(ie,_e,ze)&&this._updateLayer(He),this._changed=!0,this._updatedPaintProps[W]=!0):this.fire(new s.ErrorEvent(new Error("The layer '"+W+"' does not exist in the map's style and cannot be styled.")))},$.prototype.getPaintProperty=function(W,ie){return this.getLayer(W).getPaintProperty(ie)},$.prototype.setFeatureState=function(W,ie){this._checkLoaded();var _e=W.source,ze=W.sourceLayer,He=this.sourceCaches[_e];if(He!==void 0){var Xe=He.getSource().type;Xe==="geojson"&&ze?this.fire(new s.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):Xe!=="vector"||ze?(W.id===void 0&&this.fire(new s.ErrorEvent(new Error("The feature id parameter must be provided."))),He.setFeatureState(ze,W.id,ie)):this.fire(new s.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new s.ErrorEvent(new Error("The source '"+_e+"' does not exist in the map's style.")))},$.prototype.removeFeatureState=function(W,ie){this._checkLoaded();var _e=W.source,ze=this.sourceCaches[_e];if(ze!==void 0){var He=ze.getSource().type,Xe=He==="vector"?W.sourceLayer:void 0;He!=="vector"||Xe?ie&&typeof W.id!="string"&&typeof W.id!="number"?this.fire(new s.ErrorEvent(new Error("A feature id is requred to remove its specific state property."))):ze.removeFeatureState(Xe,W.id,ie):this.fire(new s.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new s.ErrorEvent(new Error("The source '"+_e+"' does not exist in the map's style.")))},$.prototype.getFeatureState=function(W){this._checkLoaded();var ie=W.source,_e=W.sourceLayer,ze=this.sourceCaches[ie];if(ze!==void 0){if(ze.getSource().type!=="vector"||_e)return W.id===void 0&&this.fire(new s.ErrorEvent(new Error("The feature id parameter must be provided."))),ze.getFeatureState(_e,W.id);this.fire(new s.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new s.ErrorEvent(new Error("The source '"+ie+"' does not exist in the map's style.")))},$.prototype.getTransition=function(){return s.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},$.prototype.serialize=function(){return s.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:s.mapObject(this.sourceCaches,function(W){return W.serialize()}),layers:this._serializeLayers(this._order)},function(W){return W!==void 0})},$.prototype._updateLayer=function(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._changed=!0},$.prototype._flattenAndSortRenderedFeatures=function(W){for(var ie=this,_e=function(en){return ie._layers[en].type==="fill-extrusion"},ze={},He=[],Xe=this._order.length-1;Xe>=0;Xe--){var at=this._order[Xe];if(_e(at)){ze[at]=Xe;for(var wt=0,At=W;wt=0;We--){var $e=this._order[We];if(_e($e))for(var tt=He.length-1;tt>=0;tt--){var lt=He[tt].feature;if(ze[lt.layer.id]>16,Xe>>16],u_pixel_coord_lower:[65535&He,65535&Xe]}}bo.prototype.draw=function(q,$,W,ie,_e,ze,He,Xe,at,wt,At,re,ve,Le,Fe,Ve){var We,$e=q.gl;if(!this.failedToCreate){for(var tt in q.program.set(this.program),q.setDepthMode(W),q.setStencilMode(ie),q.setColorMode(_e),q.setCullFace(ze),this.fixedUniforms)this.fixedUniforms[tt].set(He[tt]);Le&&Le.setUniforms(q,this.binderUniforms,re,{zoom:ve});for(var lt=(We={},We[$e.LINES]=2,We[$e.TRIANGLES]=3,We[$e.LINE_STRIP]=1,We)[$],gt=0,zt=At.get();gt0?1-1/(1.001-He):-He),u_contrast_factor:(ze=_e.paint.get("raster-contrast"),ze>0?1/(1-ze):1+ze),u_spin_weights:Ps(_e.paint.get("raster-hue-rotate"))};var ze,He};function Ps(q){q*=Math.PI/180;var $=Math.sin(q),W=Math.cos(q);return[(2*W+1)/3,(-Math.sqrt(3)*$-W+1)/3,(Math.sqrt(3)*$-W+1)/3]}var Qo,hi=function(q,$,W,ie,_e,ze,He,Xe,at,wt){var At=_e.transform;return{u_is_size_zoom_constant:+(q==="constant"||q==="source"),u_is_size_feature_constant:+(q==="constant"||q==="camera"),u_size_t:$?$.uSizeT:0,u_size:$?$.uSize:0,u_camera_to_center_distance:At.cameraToCenterDistance,u_pitch:At.pitch/360*2*Math.PI,u_rotate_symbol:+W,u_aspect_ratio:At.width/At.height,u_fade_change:_e.options.fadeDuration?_e.symbolFadeChange:1,u_matrix:ze,u_label_plane_matrix:He,u_coord_matrix:Xe,u_is_text:+at,u_pitch_with_map:+ie,u_texsize:wt,u_texture:0}},ds=function(q,$,W,ie,_e,ze,He,Xe,at,wt,At){var re=_e.transform;return s.extend(hi(q,$,W,ie,_e,ze,He,Xe,at,wt),{u_gamma_scale:ie?Math.cos(re._pitch)*re.cameraToCenterDistance:1,u_device_pixel_ratio:s.browser.devicePixelRatio,u_is_halo:+At})},Cc=function(q,$,W,ie,_e,ze,He,Xe,at,wt){return s.extend(ds(q,$,W,ie,_e,ze,He,Xe,!0,at,!0),{u_texsize_icon:wt,u_texture_icon:1})},Hl=function(q,$,W){return{u_matrix:q,u_opacity:$,u_color:W}},bl=function(q,$,W,ie,_e,ze){return s.extend(function(He,Xe,at,wt){var At=at.imageManager.getPattern(He.from.toString()),re=at.imageManager.getPattern(He.to.toString()),ve=at.imageManager.getPixelSize(),Le=ve.width,Fe=ve.height,Ve=Math.pow(2,wt.tileID.overscaledZ),We=wt.tileSize*Math.pow(2,at.transform.tileZoom)/Ve,$e=We*(wt.tileID.canonical.x+wt.tileID.wrap*Ve),tt=We*wt.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:At.tl,u_pattern_br_a:At.br,u_pattern_tl_b:re.tl,u_pattern_br_b:re.br,u_texsize:[Le,Fe],u_mix:Xe.t,u_pattern_size_a:At.displaySize,u_pattern_size_b:re.displaySize,u_scale_a:Xe.fromScale,u_scale_b:Xe.toScale,u_tile_units_to_pixels:1/dr(wt,1,at.transform.tileZoom),u_pixel_coord_upper:[$e>>16,tt>>16],u_pixel_coord_lower:[65535&$e,65535&tt]}}(ie,ze,W,_e),{u_matrix:q,u_opacity:$})},Os={fillExtrusion:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_lightpos:new s.Uniform3f(q,$.u_lightpos),u_lightintensity:new s.Uniform1f(q,$.u_lightintensity),u_lightcolor:new s.Uniform3f(q,$.u_lightcolor),u_vertical_gradient:new s.Uniform1f(q,$.u_vertical_gradient),u_opacity:new s.Uniform1f(q,$.u_opacity)}},fillExtrusionPattern:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_lightpos:new s.Uniform3f(q,$.u_lightpos),u_lightintensity:new s.Uniform1f(q,$.u_lightintensity),u_lightcolor:new s.Uniform3f(q,$.u_lightcolor),u_vertical_gradient:new s.Uniform1f(q,$.u_vertical_gradient),u_height_factor:new s.Uniform1f(q,$.u_height_factor),u_image:new s.Uniform1i(q,$.u_image),u_texsize:new s.Uniform2f(q,$.u_texsize),u_pixel_coord_upper:new s.Uniform2f(q,$.u_pixel_coord_upper),u_pixel_coord_lower:new s.Uniform2f(q,$.u_pixel_coord_lower),u_scale:new s.Uniform3f(q,$.u_scale),u_fade:new s.Uniform1f(q,$.u_fade),u_opacity:new s.Uniform1f(q,$.u_opacity)}},fill:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix)}},fillPattern:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_image:new s.Uniform1i(q,$.u_image),u_texsize:new s.Uniform2f(q,$.u_texsize),u_pixel_coord_upper:new s.Uniform2f(q,$.u_pixel_coord_upper),u_pixel_coord_lower:new s.Uniform2f(q,$.u_pixel_coord_lower),u_scale:new s.Uniform3f(q,$.u_scale),u_fade:new s.Uniform1f(q,$.u_fade)}},fillOutline:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_world:new s.Uniform2f(q,$.u_world)}},fillOutlinePattern:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_world:new s.Uniform2f(q,$.u_world),u_image:new s.Uniform1i(q,$.u_image),u_texsize:new s.Uniform2f(q,$.u_texsize),u_pixel_coord_upper:new s.Uniform2f(q,$.u_pixel_coord_upper),u_pixel_coord_lower:new s.Uniform2f(q,$.u_pixel_coord_lower),u_scale:new s.Uniform3f(q,$.u_scale),u_fade:new s.Uniform1f(q,$.u_fade)}},circle:function(q,$){return{u_camera_to_center_distance:new s.Uniform1f(q,$.u_camera_to_center_distance),u_scale_with_map:new s.Uniform1i(q,$.u_scale_with_map),u_pitch_with_map:new s.Uniform1i(q,$.u_pitch_with_map),u_extrude_scale:new s.Uniform2f(q,$.u_extrude_scale),u_device_pixel_ratio:new s.Uniform1f(q,$.u_device_pixel_ratio),u_matrix:new s.UniformMatrix4f(q,$.u_matrix)}},collisionBox:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_camera_to_center_distance:new s.Uniform1f(q,$.u_camera_to_center_distance),u_pixels_to_tile_units:new s.Uniform1f(q,$.u_pixels_to_tile_units),u_extrude_scale:new s.Uniform2f(q,$.u_extrude_scale),u_overscale_factor:new s.Uniform1f(q,$.u_overscale_factor)}},collisionCircle:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_inv_matrix:new s.UniformMatrix4f(q,$.u_inv_matrix),u_camera_to_center_distance:new s.Uniform1f(q,$.u_camera_to_center_distance),u_viewport_size:new s.Uniform2f(q,$.u_viewport_size)}},debug:function(q,$){return{u_color:new s.UniformColor(q,$.u_color),u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_overlay:new s.Uniform1i(q,$.u_overlay),u_overlay_scale:new s.Uniform1f(q,$.u_overlay_scale)}},clippingMask:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix)}},heatmap:function(q,$){return{u_extrude_scale:new s.Uniform1f(q,$.u_extrude_scale),u_intensity:new s.Uniform1f(q,$.u_intensity),u_matrix:new s.UniformMatrix4f(q,$.u_matrix)}},heatmapTexture:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_world:new s.Uniform2f(q,$.u_world),u_image:new s.Uniform1i(q,$.u_image),u_color_ramp:new s.Uniform1i(q,$.u_color_ramp),u_opacity:new s.Uniform1f(q,$.u_opacity)}},hillshade:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_image:new s.Uniform1i(q,$.u_image),u_latrange:new s.Uniform2f(q,$.u_latrange),u_light:new s.Uniform2f(q,$.u_light),u_shadow:new s.UniformColor(q,$.u_shadow),u_highlight:new s.UniformColor(q,$.u_highlight),u_accent:new s.UniformColor(q,$.u_accent)}},hillshadePrepare:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_image:new s.Uniform1i(q,$.u_image),u_dimension:new s.Uniform2f(q,$.u_dimension),u_zoom:new s.Uniform1f(q,$.u_zoom),u_maxzoom:new s.Uniform1f(q,$.u_maxzoom),u_unpack:new s.Uniform4f(q,$.u_unpack)}},line:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_ratio:new s.Uniform1f(q,$.u_ratio),u_device_pixel_ratio:new s.Uniform1f(q,$.u_device_pixel_ratio),u_units_to_pixels:new s.Uniform2f(q,$.u_units_to_pixels)}},lineGradient:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_ratio:new s.Uniform1f(q,$.u_ratio),u_device_pixel_ratio:new s.Uniform1f(q,$.u_device_pixel_ratio),u_units_to_pixels:new s.Uniform2f(q,$.u_units_to_pixels),u_image:new s.Uniform1i(q,$.u_image)}},linePattern:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_texsize:new s.Uniform2f(q,$.u_texsize),u_ratio:new s.Uniform1f(q,$.u_ratio),u_device_pixel_ratio:new s.Uniform1f(q,$.u_device_pixel_ratio),u_image:new s.Uniform1i(q,$.u_image),u_units_to_pixels:new s.Uniform2f(q,$.u_units_to_pixels),u_scale:new s.Uniform3f(q,$.u_scale),u_fade:new s.Uniform1f(q,$.u_fade)}},lineSDF:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_ratio:new s.Uniform1f(q,$.u_ratio),u_device_pixel_ratio:new s.Uniform1f(q,$.u_device_pixel_ratio),u_units_to_pixels:new s.Uniform2f(q,$.u_units_to_pixels),u_patternscale_a:new s.Uniform2f(q,$.u_patternscale_a),u_patternscale_b:new s.Uniform2f(q,$.u_patternscale_b),u_sdfgamma:new s.Uniform1f(q,$.u_sdfgamma),u_image:new s.Uniform1i(q,$.u_image),u_tex_y_a:new s.Uniform1f(q,$.u_tex_y_a),u_tex_y_b:new s.Uniform1f(q,$.u_tex_y_b),u_mix:new s.Uniform1f(q,$.u_mix)}},raster:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_tl_parent:new s.Uniform2f(q,$.u_tl_parent),u_scale_parent:new s.Uniform1f(q,$.u_scale_parent),u_buffer_scale:new s.Uniform1f(q,$.u_buffer_scale),u_fade_t:new s.Uniform1f(q,$.u_fade_t),u_opacity:new s.Uniform1f(q,$.u_opacity),u_image0:new s.Uniform1i(q,$.u_image0),u_image1:new s.Uniform1i(q,$.u_image1),u_brightness_low:new s.Uniform1f(q,$.u_brightness_low),u_brightness_high:new s.Uniform1f(q,$.u_brightness_high),u_saturation_factor:new s.Uniform1f(q,$.u_saturation_factor),u_contrast_factor:new s.Uniform1f(q,$.u_contrast_factor),u_spin_weights:new s.Uniform3f(q,$.u_spin_weights)}},symbolIcon:function(q,$){return{u_is_size_zoom_constant:new s.Uniform1i(q,$.u_is_size_zoom_constant),u_is_size_feature_constant:new s.Uniform1i(q,$.u_is_size_feature_constant),u_size_t:new s.Uniform1f(q,$.u_size_t),u_size:new s.Uniform1f(q,$.u_size),u_camera_to_center_distance:new s.Uniform1f(q,$.u_camera_to_center_distance),u_pitch:new s.Uniform1f(q,$.u_pitch),u_rotate_symbol:new s.Uniform1i(q,$.u_rotate_symbol),u_aspect_ratio:new s.Uniform1f(q,$.u_aspect_ratio),u_fade_change:new s.Uniform1f(q,$.u_fade_change),u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_label_plane_matrix:new s.UniformMatrix4f(q,$.u_label_plane_matrix),u_coord_matrix:new s.UniformMatrix4f(q,$.u_coord_matrix),u_is_text:new s.Uniform1i(q,$.u_is_text),u_pitch_with_map:new s.Uniform1i(q,$.u_pitch_with_map),u_texsize:new s.Uniform2f(q,$.u_texsize),u_texture:new s.Uniform1i(q,$.u_texture)}},symbolSDF:function(q,$){return{u_is_size_zoom_constant:new s.Uniform1i(q,$.u_is_size_zoom_constant),u_is_size_feature_constant:new s.Uniform1i(q,$.u_is_size_feature_constant),u_size_t:new s.Uniform1f(q,$.u_size_t),u_size:new s.Uniform1f(q,$.u_size),u_camera_to_center_distance:new s.Uniform1f(q,$.u_camera_to_center_distance),u_pitch:new s.Uniform1f(q,$.u_pitch),u_rotate_symbol:new s.Uniform1i(q,$.u_rotate_symbol),u_aspect_ratio:new s.Uniform1f(q,$.u_aspect_ratio),u_fade_change:new s.Uniform1f(q,$.u_fade_change),u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_label_plane_matrix:new s.UniformMatrix4f(q,$.u_label_plane_matrix),u_coord_matrix:new s.UniformMatrix4f(q,$.u_coord_matrix),u_is_text:new s.Uniform1i(q,$.u_is_text),u_pitch_with_map:new s.Uniform1i(q,$.u_pitch_with_map),u_texsize:new s.Uniform2f(q,$.u_texsize),u_texture:new s.Uniform1i(q,$.u_texture),u_gamma_scale:new s.Uniform1f(q,$.u_gamma_scale),u_device_pixel_ratio:new s.Uniform1f(q,$.u_device_pixel_ratio),u_is_halo:new s.Uniform1i(q,$.u_is_halo)}},symbolTextAndIcon:function(q,$){return{u_is_size_zoom_constant:new s.Uniform1i(q,$.u_is_size_zoom_constant),u_is_size_feature_constant:new s.Uniform1i(q,$.u_is_size_feature_constant),u_size_t:new s.Uniform1f(q,$.u_size_t),u_size:new s.Uniform1f(q,$.u_size),u_camera_to_center_distance:new s.Uniform1f(q,$.u_camera_to_center_distance),u_pitch:new s.Uniform1f(q,$.u_pitch),u_rotate_symbol:new s.Uniform1i(q,$.u_rotate_symbol),u_aspect_ratio:new s.Uniform1f(q,$.u_aspect_ratio),u_fade_change:new s.Uniform1f(q,$.u_fade_change),u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_label_plane_matrix:new s.UniformMatrix4f(q,$.u_label_plane_matrix),u_coord_matrix:new s.UniformMatrix4f(q,$.u_coord_matrix),u_is_text:new s.Uniform1i(q,$.u_is_text),u_pitch_with_map:new s.Uniform1i(q,$.u_pitch_with_map),u_texsize:new s.Uniform2f(q,$.u_texsize),u_texsize_icon:new s.Uniform2f(q,$.u_texsize_icon),u_texture:new s.Uniform1i(q,$.u_texture),u_texture_icon:new s.Uniform1i(q,$.u_texture_icon),u_gamma_scale:new s.Uniform1f(q,$.u_gamma_scale),u_device_pixel_ratio:new s.Uniform1f(q,$.u_device_pixel_ratio),u_is_halo:new s.Uniform1i(q,$.u_is_halo)}},background:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_opacity:new s.Uniform1f(q,$.u_opacity),u_color:new s.UniformColor(q,$.u_color)}},backgroundPattern:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_opacity:new s.Uniform1f(q,$.u_opacity),u_image:new s.Uniform1i(q,$.u_image),u_pattern_tl_a:new s.Uniform2f(q,$.u_pattern_tl_a),u_pattern_br_a:new s.Uniform2f(q,$.u_pattern_br_a),u_pattern_tl_b:new s.Uniform2f(q,$.u_pattern_tl_b),u_pattern_br_b:new s.Uniform2f(q,$.u_pattern_br_b),u_texsize:new s.Uniform2f(q,$.u_texsize),u_mix:new s.Uniform1f(q,$.u_mix),u_pattern_size_a:new s.Uniform2f(q,$.u_pattern_size_a),u_pattern_size_b:new s.Uniform2f(q,$.u_pattern_size_b),u_scale_a:new s.Uniform1f(q,$.u_scale_a),u_scale_b:new s.Uniform1f(q,$.u_scale_b),u_pixel_coord_upper:new s.Uniform2f(q,$.u_pixel_coord_upper),u_pixel_coord_lower:new s.Uniform2f(q,$.u_pixel_coord_lower),u_tile_units_to_pixels:new s.Uniform1f(q,$.u_tile_units_to_pixels)}}};function Qs(q,$,W,ie,_e,ze,He){for(var Xe=q.context,at=Xe.gl,wt=q.useProgram("collisionBox"),At=[],re=0,ve=0,Le=0;Le0){var gt=s.create(),zt=$e;s.mul(gt,We.placementInvProjMatrix,q.transform.glCoordMatrix),s.mul(gt,gt,We.placementViewportMatrix),At.push({circleArray:lt,circleOffset:ve,transform:zt,invTransform:gt}),ve=re+=lt.length/4}tt&&wt.draw(Xe,at.LINES,qt.disabled,Je.disabled,q.colorModeForRenderPass(),Ge.disabled,Gu($e,q.transform,Ve),W.id,tt.layoutVertexBuffer,tt.indexBuffer,tt.segments,null,q.transform.zoom,null,null,tt.collisionVertexBuffer)}}if(He&&At.length){var Ut=q.useProgram("collisionCircle"),Vt=new s.StructArrayLayout2f1f2i16;Vt.resize(4*re),Vt._trim();for(var Qt=0,gn=0,en=At;gn=0&&(Fe[We.associatedIconIndex]={shiftedAnchor:en,angle:sn})}else tr(We.numGlyphs,ve)}if(At){Le.clear();for(var Mn=q.icon.placedSymbolArray,xn=0;xn0){var He=s.browser.now(),Xe=(He-q.timeAdded)/ze,at=$?(He-$.timeAdded)/ze:-1,wt=W.getSource(),At=_e.coveringZoomLevel({tileSize:wt.tileSize,roundZoom:wt.roundZoom}),re=!$||Math.abs($.tileID.overscaledZ-At)>Math.abs(q.tileID.overscaledZ-At),ve=re&&q.refreshedUponExpiration?1:s.clamp(re?Xe:1-at,0,1);return q.refreshedUponExpiration&&Xe>=1&&(q.refreshedUponExpiration=!1),$?{opacity:1,mix:1-ve}:{opacity:ve,mix:0}}return{opacity:1,mix:0}}var Al=new s.Color(1,0,0,1),Ml=new s.Color(0,1,0,1),bu=new s.Color(0,0,1,1),gs=new s.Color(1,0,1,1),ql=new s.Color(0,1,1,1);function Sl(q){var $=q.transform.padding;_u(q,q.transform.height-($.top||0),3,Al),_u(q,$.bottom||0,3,Ml),El(q,$.left||0,3,bu),El(q,q.transform.width-($.right||0),3,gs);var W=q.transform.centerPoint;(function(ie,_e,ze,He){var Xe=20,at=2;nl(ie,_e-at/2,ze-Xe/2,at,Xe,He),nl(ie,_e-Xe/2,ze-at/2,Xe,at,He)})(q,W.x,q.transform.height-W.y,ql)}function _u(q,$,W,ie){nl(q,0,$+W/2,q.transform.width,W,ie)}function El(q,$,W,ie){nl(q,$-W/2,0,W,q.transform.height,ie)}function nl(q,$,W,ie,_e,ze){var He=q.context,Xe=He.gl;Xe.enable(Xe.SCISSOR_TEST),Xe.scissor($*s.browser.devicePixelRatio,W*s.browser.devicePixelRatio,ie*s.browser.devicePixelRatio,_e*s.browser.devicePixelRatio),He.clear({color:ze}),Xe.disable(Xe.SCISSOR_TEST)}function zs(q,$,W){var ie=q.context,_e=ie.gl,ze=W.posMatrix,He=q.useProgram("debug"),Xe=qt.disabled,at=Je.disabled,wt=q.colorModeForRenderPass(),At="$debug";ie.activeTexture.set(_e.TEXTURE0),q.emptyTexture.bind(_e.LINEAR,_e.CLAMP_TO_EDGE),He.draw(ie,_e.LINE_STRIP,Xe,at,wt,Ge.disabled,$o(ze,s.Color.red),At,q.debugBuffer,q.tileBorderIndexBuffer,q.debugSegments);var re=$.getTileByID(W.key).latestRawTileData,ve=re&&re.byteLength||0,Le=Math.floor(ve/1024),Fe=$.getTile(W).tileSize,Ve=512/Math.min(Fe,512)*(W.overscaledZ/q.transform.zoom)*.5,We=W.canonical.toString();W.overscaledZ!==W.canonical.z&&(We+=" => "+W.overscaledZ),function($e,tt){$e.initDebugOverlayCanvas();var lt=$e.debugOverlayCanvas,gt=$e.context.gl,zt=$e.debugOverlayCanvas.getContext("2d");zt.clearRect(0,0,lt.width,lt.height),zt.shadowColor="white",zt.shadowBlur=2,zt.lineWidth=1.5,zt.strokeStyle="white",zt.textBaseline="top",zt.font="bold 36px Open Sans, sans-serif",zt.fillText(tt,5,5),zt.strokeText(tt,5,5),$e.debugOverlayTexture.update(lt),$e.debugOverlayTexture.bind(gt.LINEAR,gt.CLAMP_TO_EDGE)}(q,We+" "+Le+"kb"),He.draw(ie,_e.TRIANGLES,Xe,at,Ke.alphaBlended,Ge.disabled,$o(ze,s.Color.transparent,Ve),At,q.debugBuffer,q.quadTriangleIndexBuffer,q.debugSegments)}var Ds={symbol:function(q,$,W,ie,_e){if(q.renderPass==="translucent"){var ze=Je.disabled,He=q.colorModeForRenderPass();W.layout.get("text-variable-anchor")&&function(Xe,at,wt,At,re,ve,Le){for(var Fe=at.transform,Ve=re==="map",We=ve==="map",$e=0,tt=Xe;$e256&&this.clearStencil(),W.setColorMode(Ke.disabled),W.setDepthMode(qt.disabled);var _e=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var ze=0,He=$;ze256&&this.clearStencil();var q=this.nextStencilID++,$=this.context.gl;return new Je({func:$.NOTEQUAL,mask:255},q,255,$.KEEP,$.KEEP,$.REPLACE)},bi.prototype.stencilModeForClipping=function(q){var $=this.context.gl;return new Je({func:$.EQUAL,mask:255},this._tileClippingMaskIDs[q.key],0,$.KEEP,$.KEEP,$.REPLACE)},bi.prototype.stencilConfigForOverlap=function(q){var $,W=this.context.gl,ie=q.sort(function(at,wt){return wt.overscaledZ-at.overscaledZ}),_e=ie[ie.length-1].overscaledZ,ze=ie[0].overscaledZ-_e+1;if(ze>1){this.currentStencilSource=void 0,this.nextStencilID+ze>256&&this.clearStencil();for(var He={},Xe=0;Xe=0;this.currentLayer--){var zt=this.style._layers[ie[this.currentLayer]],Ut=_e[zt.source],Vt=wt[zt.source];this._renderTileClippingMasks(zt,Vt),this.renderLayer(this,Ut,zt,Vt)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?$.pop():null},bi.prototype.isPatternMissing=function(q){if(!q)return!1;if(!q.from||!q.to)return!0;var $=this.imageManager.getPattern(q.from.toString()),W=this.imageManager.getPattern(q.to.toString());return!$||!W},bi.prototype.useProgram=function(q,$){this.cache=this.cache||{};var W=""+q+($?$.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[W]||(this.cache[W]=new bo(this.context,hs[q],$,Os[q],this._showOverdrawInspector)),this.cache[W]},bi.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()},bi.prototype.setBaseState=function(){var q=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(q.FUNC_ADD)},bi.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=s.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var q=this.context.gl;this.debugOverlayTexture=new s.Texture(this.context,this.debugOverlayCanvas,q.RGBA)}},bi.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var vs=function(q,$){this.points=q,this.planes=$};vs.fromInvProjectionMatrix=function(q,$,W){var ie=Math.pow(2,W),_e=[[-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(function(He){return s.transformMat4([],He,q)}).map(function(He){return s.scale$1([],He,1/He[3]/$*ie)}),ze=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(function(He){var Xe=s.sub([],_e[He[0]],_e[He[1]]),at=s.sub([],_e[He[2]],_e[He[1]]),wt=s.normalize([],s.cross([],Xe,at)),At=-s.dot(wt,_e[He[1]]);return wt.concat(At)});return new vs(_e,ze)};var ms=function(q,$){this.min=q,this.max=$,this.center=s.scale$2([],s.add([],this.min,this.max),.5)};ms.prototype.quadrant=function(q){for(var $=[q%2==0,q<2],W=s.clone$2(this.min),ie=s.clone$2(this.max),_e=0;_e<$.length;_e++)W[_e]=$[_e]?this.min[_e]:this.center[_e],ie[_e]=$[_e]?this.center[_e]:this.max[_e];return ie[2]=this.max[2],new ms(W,ie)},ms.prototype.distanceX=function(q){return Math.max(Math.min(this.max[0],q[0]),this.min[0])-q[0]},ms.prototype.distanceY=function(q){return Math.max(Math.min(this.max[1],q[1]),this.min[1])-q[1]},ms.prototype.intersects=function(q){for(var $=[[this.min[0],this.min[1],0,1],[this.max[0],this.min[1],0,1],[this.max[0],this.max[1],0,1],[this.min[0],this.max[1],0,1]],W=!0,ie=0;ie=0;if(ze===0)return 0;ze!==$.length&&(W=!1)}if(W)return 2;for(var Xe=0;Xe<3;Xe++){for(var at=Number.MAX_VALUE,wt=-Number.MAX_VALUE,At=0;Atthis.max[Xe]-this.min[Xe])return 0}return 1};var ga=function(q,$,W,ie){if(q===void 0&&(q=0),$===void 0&&($=0),W===void 0&&(W=0),ie===void 0&&(ie=0),isNaN(q)||q<0||isNaN($)||$<0||isNaN(W)||W<0||isNaN(ie)||ie<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=q,this.bottom=$,this.left=W,this.right=ie};ga.prototype.interpolate=function(q,$,W){return $.top!=null&&q.top!=null&&(this.top=s.number(q.top,$.top,W)),$.bottom!=null&&q.bottom!=null&&(this.bottom=s.number(q.bottom,$.bottom,W)),$.left!=null&&q.left!=null&&(this.left=s.number(q.left,$.left,W)),$.right!=null&&q.right!=null&&(this.right=s.number(q.right,$.right,W)),this},ga.prototype.getCenter=function(q,$){var W=s.clamp((this.left+q-this.right)/2,0,q),ie=s.clamp((this.top+$-this.bottom)/2,0,$);return new s.Point(W,ie)},ga.prototype.equals=function(q){return this.top===q.top&&this.bottom===q.bottom&&this.left===q.left&&this.right===q.right},ga.prototype.clone=function(){return new ga(this.top,this.bottom,this.left,this.right)},ga.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var oi=function(q,$,W,ie,_e){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=_e===void 0||_e,this._minZoom=q||0,this._maxZoom=$||22,this._minPitch=W??0,this._maxPitch=ie??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new s.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new ga,this._posMatrixCache={},this._alignedPosMatrixCache={}},li={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}};oi.prototype.clone=function(){var q=new oi(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return q.tileSize=this.tileSize,q.latRange=this.latRange,q.width=this.width,q.height=this.height,q._center=this._center,q.zoom=this.zoom,q.angle=this.angle,q._fov=this._fov,q._pitch=this._pitch,q._unmodified=this._unmodified,q._edgeInsets=this._edgeInsets.clone(),q._calcMatrices(),q},li.minZoom.get=function(){return this._minZoom},li.minZoom.set=function(q){this._minZoom!==q&&(this._minZoom=q,this.zoom=Math.max(this.zoom,q))},li.maxZoom.get=function(){return this._maxZoom},li.maxZoom.set=function(q){this._maxZoom!==q&&(this._maxZoom=q,this.zoom=Math.min(this.zoom,q))},li.minPitch.get=function(){return this._minPitch},li.minPitch.set=function(q){this._minPitch!==q&&(this._minPitch=q,this.pitch=Math.max(this.pitch,q))},li.maxPitch.get=function(){return this._maxPitch},li.maxPitch.set=function(q){this._maxPitch!==q&&(this._maxPitch=q,this.pitch=Math.min(this.pitch,q))},li.renderWorldCopies.get=function(){return this._renderWorldCopies},li.renderWorldCopies.set=function(q){q===void 0?q=!0:q===null&&(q=!1),this._renderWorldCopies=q},li.worldSize.get=function(){return this.tileSize*this.scale},li.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},li.size.get=function(){return new s.Point(this.width,this.height)},li.bearing.get=function(){return-this.angle/Math.PI*180},li.bearing.set=function(q){var $=-s.wrap(q,-180,180)*Math.PI/180;this.angle!==$&&(this._unmodified=!1,this.angle=$,this._calcMatrices(),this.rotationMatrix=s.create$2(),s.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},li.pitch.get=function(){return this._pitch/Math.PI*180},li.pitch.set=function(q){var $=s.clamp(q,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==$&&(this._unmodified=!1,this._pitch=$,this._calcMatrices())},li.fov.get=function(){return this._fov/Math.PI*180},li.fov.set=function(q){q=Math.max(.01,Math.min(60,q)),this._fov!==q&&(this._unmodified=!1,this._fov=q/180*Math.PI,this._calcMatrices())},li.zoom.get=function(){return this._zoom},li.zoom.set=function(q){var $=Math.min(Math.max(q,this.minZoom),this.maxZoom);this._zoom!==$&&(this._unmodified=!1,this._zoom=$,this.scale=this.zoomScale($),this.tileZoom=Math.floor($),this.zoomFraction=$-this.tileZoom,this._constrain(),this._calcMatrices())},li.center.get=function(){return this._center},li.center.set=function(q){q.lat===this._center.lat&&q.lng===this._center.lng||(this._unmodified=!1,this._center=q,this._constrain(),this._calcMatrices())},li.padding.get=function(){return this._edgeInsets.toJSON()},li.padding.set=function(q){this._edgeInsets.equals(q)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,q,1),this._calcMatrices())},li.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},oi.prototype.isPaddingEqual=function(q){return this._edgeInsets.equals(q)},oi.prototype.interpolatePadding=function(q,$,W){this._unmodified=!1,this._edgeInsets.interpolate(q,$,W),this._constrain(),this._calcMatrices()},oi.prototype.coveringZoomLevel=function(q){var $=(q.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/q.tileSize));return Math.max(0,$)},oi.prototype.getVisibleUnwrappedCoordinates=function(q){var $=[new s.UnwrappedTileID(0,q)];if(this._renderWorldCopies)for(var W=this.pointCoordinate(new s.Point(0,0)),ie=this.pointCoordinate(new s.Point(this.width,0)),_e=this.pointCoordinate(new s.Point(this.width,this.height)),ze=this.pointCoordinate(new s.Point(0,this.height)),He=Math.floor(Math.min(W.x,ie.x,_e.x,ze.x)),Xe=Math.floor(Math.max(W.x,ie.x,_e.x,ze.x)),at=He-1;at<=Xe+1;at++)at!==0&&$.push(new s.UnwrappedTileID(at,q));return $},oi.prototype.coveringTiles=function(q){var $=this.coveringZoomLevel(q),W=$;if(q.minzoom!==void 0&&$q.maxzoom&&($=q.maxzoom);var ie=s.MercatorCoordinate.fromLngLat(this.center),_e=Math.pow(2,$),ze=[_e*ie.x,_e*ie.y,0],He=vs.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,$),Xe=q.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(Xe=$);var at=function(en){return{aabb:new ms([en*_e,0,0],[(en+1)*_e,_e,0]),zoom:0,x:0,y:0,wrap:en,fullyVisible:!1}},wt=[],At=[],re=$,ve=q.reparseOverscaled?W:$;if(this._renderWorldCopies)for(var Le=1;Le<=3;Le++)wt.push(at(-Le)),wt.push(at(Le));for(wt.push(at(0));wt.length>0;){var Fe=wt.pop(),Ve=Fe.x,We=Fe.y,$e=Fe.fullyVisible;if(!$e){var tt=Fe.aabb.intersects(He);if(tt===0)continue;$e=tt===2}var lt=Fe.aabb.distanceX(ze),gt=Fe.aabb.distanceY(ze),zt=Math.max(Math.abs(lt),Math.abs(gt)),Ut=3+(1<Ut&&Fe.zoom>=Xe)At.push({tileID:new s.OverscaledTileID(Fe.zoom===re?ve:Fe.zoom,Fe.wrap,Fe.zoom,Ve,We),distanceSq:s.sqrLen([ze[0]-.5-Ve,ze[1]-.5-We])});else for(var Vt=0;Vt<4;Vt++){var Qt=(Ve<<1)+Vt%2,gn=(We<<1)+(Vt>>1);wt.push({aabb:Fe.aabb.quadrant(Vt),zoom:Fe.zoom+1,x:Qt,y:gn,wrap:Fe.wrap,fullyVisible:$e})}}return At.sort(function(en,sn){return en.distanceSq-sn.distanceSq}).map(function(en){return en.tileID})},oi.prototype.resize=function(q,$){this.width=q,this.height=$,this.pixelsToGLUnits=[2/q,-2/$],this._constrain(),this._calcMatrices()},li.unmodified.get=function(){return this._unmodified},oi.prototype.zoomScale=function(q){return Math.pow(2,q)},oi.prototype.scaleZoom=function(q){return Math.log(q)/Math.LN2},oi.prototype.project=function(q){var $=s.clamp(q.lat,-this.maxValidLatitude,this.maxValidLatitude);return new s.Point(s.mercatorXfromLng(q.lng)*this.worldSize,s.mercatorYfromLat($)*this.worldSize)},oi.prototype.unproject=function(q){return new s.MercatorCoordinate(q.x/this.worldSize,q.y/this.worldSize).toLngLat()},li.point.get=function(){return this.project(this.center)},oi.prototype.setLocationAtPoint=function(q,$){var W=this.pointCoordinate($),ie=this.pointCoordinate(this.centerPoint),_e=this.locationCoordinate(q),ze=new s.MercatorCoordinate(_e.x-(W.x-ie.x),_e.y-(W.y-ie.y));this.center=this.coordinateLocation(ze),this._renderWorldCopies&&(this.center=this.center.wrap())},oi.prototype.locationPoint=function(q){return this.coordinatePoint(this.locationCoordinate(q))},oi.prototype.pointLocation=function(q){return this.coordinateLocation(this.pointCoordinate(q))},oi.prototype.locationCoordinate=function(q){return s.MercatorCoordinate.fromLngLat(q)},oi.prototype.coordinateLocation=function(q){return q.toLngLat()},oi.prototype.pointCoordinate=function(q){var $=[q.x,q.y,0,1],W=[q.x,q.y,1,1];s.transformMat4($,$,this.pixelMatrixInverse),s.transformMat4(W,W,this.pixelMatrixInverse);var ie=$[3],_e=W[3],ze=$[0]/ie,He=W[0]/_e,Xe=$[1]/ie,at=W[1]/_e,wt=$[2]/ie,At=W[2]/_e,re=wt===At?0:(0-wt)/(At-wt);return new s.MercatorCoordinate(s.number(ze,He,re)/this.worldSize,s.number(Xe,at,re)/this.worldSize)},oi.prototype.coordinatePoint=function(q){var $=[q.x*this.worldSize,q.y*this.worldSize,0,1];return s.transformMat4($,$,this.pixelMatrix),new s.Point($[0]/$[3],$[1]/$[3])},oi.prototype.getBounds=function(){return new s.LngLatBounds().extend(this.pointLocation(new s.Point(0,0))).extend(this.pointLocation(new s.Point(this.width,0))).extend(this.pointLocation(new s.Point(this.width,this.height))).extend(this.pointLocation(new s.Point(0,this.height)))},oi.prototype.getMaxBounds=function(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new s.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},oi.prototype.setMaxBounds=function(q){q?(this.lngRange=[q.getWest(),q.getEast()],this.latRange=[q.getSouth(),q.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},oi.prototype.calculatePosMatrix=function(q,$){$===void 0&&($=!1);var W=q.key,ie=$?this._alignedPosMatrixCache:this._posMatrixCache;if(ie[W])return ie[W];var _e=q.canonical,ze=this.worldSize/this.zoomScale(_e.z),He=_e.x+Math.pow(2,_e.z)*q.wrap,Xe=s.identity(new Float64Array(16));return s.translate(Xe,Xe,[He*ze,_e.y*ze,0]),s.scale(Xe,Xe,[ze/s.EXTENT,ze/s.EXTENT,1]),s.multiply(Xe,$?this.alignedProjMatrix:this.projMatrix,Xe),ie[W]=new Float32Array(Xe),ie[W]},oi.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},oi.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var q,$,W,ie,_e=-90,ze=90,He=-180,Xe=180,at=this.size,wt=this._unmodified;if(this.latRange){var At=this.latRange;_e=s.mercatorYfromLat(At[1])*this.worldSize,q=(ze=s.mercatorYfromLat(At[0])*this.worldSize)-_eze&&(ie=ze-Ve)}if(this.lngRange){var We=ve.x,$e=at.x/2;We-$eXe&&(W=Xe-$e)}W===void 0&&ie===void 0||(this.center=this.unproject(new s.Point(W!==void 0?W:ve.x,ie!==void 0?ie:ve.y))),this._unmodified=wt,this._constraining=!1}},oi.prototype._calcMatrices=function(){if(this.height){var q=this._fov/2,$=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(q)*this.height;var W=Math.PI/2+this._pitch,ie=this._fov*(.5+$.y/this.height),_e=Math.sin(ie)*this.cameraToCenterDistance/Math.sin(s.clamp(Math.PI-W-ie,.01,Math.PI-.01)),ze=this.point,He=ze.x,Xe=ze.y,at=1.01*(Math.cos(Math.PI/2-this._pitch)*_e+this.cameraToCenterDistance),wt=this.height/50,At=new Float64Array(16);s.perspective(At,this._fov,this.width/this.height,wt,at),At[8]=2*-$.x/this.width,At[9]=2*$.y/this.height,s.scale(At,At,[1,-1,1]),s.translate(At,At,[0,0,-this.cameraToCenterDistance]),s.rotateX(At,At,this._pitch),s.rotateZ(At,At,this.angle),s.translate(At,At,[-He,-Xe,0]),this.mercatorMatrix=s.scale([],At,[this.worldSize,this.worldSize,this.worldSize]),s.scale(At,At,[1,1,s.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=At,this.invProjMatrix=s.invert([],this.projMatrix);var re=this.width%2/2,ve=this.height%2/2,Le=Math.cos(this.angle),Fe=Math.sin(this.angle),Ve=He-Math.round(He)+Le*re+Fe*ve,We=Xe-Math.round(Xe)+Le*ve+Fe*re,$e=new Float64Array(At);if(s.translate($e,$e,[Ve>.5?Ve-1:Ve,We>.5?We-1:We,0]),this.alignedProjMatrix=$e,At=s.create(),s.scale(At,At,[this.width/2,-this.height/2,1]),s.translate(At,At,[1,-1,0]),this.labelPlaneMatrix=At,At=s.create(),s.scale(At,At,[1,-1,1]),s.translate(At,At,[-1,-1,0]),s.scale(At,At,[2/this.width,2/this.height,1]),this.glCoordMatrix=At,this.pixelMatrix=s.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(At=s.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=At,this._posMatrixCache={},this._alignedPosMatrixCache={}}},oi.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var q=this.pointCoordinate(new s.Point(0,0)),$=[q.x*this.worldSize,q.y*this.worldSize,0,1];return s.transformMat4($,$,this.pixelMatrix)[3]/this.cameraToCenterDistance},oi.prototype.getCameraPoint=function(){var q=this._pitch,$=Math.tan(q)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new s.Point(0,$))},oi.prototype.getCameraQueryGeometry=function(q){var $=this.getCameraPoint();if(q.length===1)return[q[0],$];for(var W=$.x,ie=$.y,_e=$.x,ze=$.y,He=0,Xe=q;He=3&&!q.some(function(W){return isNaN(W)})){var $=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(q[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+q[2],+q[1]],zoom:+q[0],bearing:$,pitch:+(q[4]||0)}),!0}return!1},es.prototype._updateHashUnthrottled=function(){var q=this.getHashString();try{s.window.history.replaceState(s.window.history.state,"",q)}catch{}};var zo={linearity:.3,easing:s.bezier(0,0,.3,1)},Gl=s.extend({deceleration:2500,maxSpeed:1400},zo),wu=s.extend({deceleration:20,maxSpeed:1400},zo),Fs=s.extend({deceleration:1e3,maxSpeed:360},zo),Tu=s.extend({deceleration:1e3,maxSpeed:90},zo),Bs=function(q){this._map=q,this.clear()};function ts(q,$){(!q.duration||q.duration<$.duration)&&(q.duration=$.duration,q.easing=$.easing)}function Ns(q,$,W){var ie=W.maxSpeed,_e=W.linearity,ze=W.deceleration,He=s.clamp(q*_e/($/1e3),-ie,ie),Xe=Math.abs(He)/(ze*_e);return{easing:W.easing,duration:1e3*Xe,amount:He*(Xe/2)}}Bs.prototype.clear=function(){this._inertiaBuffer=[]},Bs.prototype.record=function(q){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:s.browser.now(),settings:q})},Bs.prototype._drainInertiaBuffer=function(){for(var q=this._inertiaBuffer,$=s.browser.now();q.length>0&&$-q[0].time>160;)q.shift()},Bs.prototype._onMoveEnd=function(q){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var $={zoom:0,bearing:0,pitch:0,pan:new s.Point(0,0),pinchAround:void 0,around:void 0},W=0,ie=this._inertiaBuffer;W=this._clickTolerance||this._map.fire(new Oi(q.type,this._map,q))},$i.prototype.dblclick=function(q){return this._firePreventable(new Oi(q.type,this._map,q))},$i.prototype.mouseover=function(q){this._map.fire(new Oi(q.type,this._map,q))},$i.prototype.mouseout=function(q){this._map.fire(new Oi(q.type,this._map,q))},$i.prototype.touchstart=function(q){return this._firePreventable(new Do(q.type,this._map,q))},$i.prototype.touchmove=function(q){this._map.fire(new Do(q.type,this._map,q))},$i.prototype.touchend=function(q){this._map.fire(new Do(q.type,this._map,q))},$i.prototype.touchcancel=function(q){this._map.fire(new Do(q.type,this._map,q))},$i.prototype._firePreventable=function(q){if(this._map.fire(q),q.defaultPrevented)return{}},$i.prototype.isEnabled=function(){return!0},$i.prototype.isActive=function(){return!1},$i.prototype.enable=function(){},$i.prototype.disable=function(){};var va=function(q){this._map=q};va.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},va.prototype.mousemove=function(q){this._map.fire(new Oi(q.type,this._map,q))},va.prototype.mousedown=function(){this._delayContextMenu=!0},va.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Oi("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},va.prototype.contextmenu=function(q){this._delayContextMenu?this._contextMenuEvent=q:this._map.fire(new Oi(q.type,this._map,q)),this._map.listens("contextmenu")&&q.preventDefault()},va.prototype.isEnabled=function(){return!0},va.prototype.isActive=function(){return!1},va.prototype.enable=function(){},va.prototype.disable=function(){};var ma=function(q,$){this._map=q,this._el=q.getCanvasContainer(),this._container=q.getContainer(),this._clickTolerance=$.clickTolerance||1};function ha(q,$){for(var W={},ie=0;iethis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=q.timeStamp),W.length===this.numTouches&&(this.centroid=function(ie){for(var _e=new s.Point(0,0),ze=0,He=ie;ze30)&&(this.aborted=!0)}}},Ia.prototype.touchend=function(q,$,W){if((!this.centroid||q.timeStamp-this.startTime>500)&&(this.aborted=!0),W.length===0){var ie=!this.aborted&&this.centroid;if(this.reset(),ie)return ie}};var ys=function(q){this.singleTap=new Ia(q),this.numTaps=q.numTaps,this.reset()};ys.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},ys.prototype.touchstart=function(q,$,W){this.singleTap.touchstart(q,$,W)},ys.prototype.touchmove=function(q,$,W){this.singleTap.touchmove(q,$,W)},ys.prototype.touchend=function(q,$,W){var ie=this.singleTap.touchend(q,$,W);if(ie){var _e=q.timeStamp-this.lastTime<500,ze=!this.lastTap||this.lastTap.dist(ie)<30;if(_e&&ze||this.reset(),this.count++,this.lastTime=q.timeStamp,this.lastTap=ie,this.count===this.numTaps)return this.reset(),ie}};var lo=function(){this._zoomIn=new ys({numTouches:1,numTaps:2}),this._zoomOut=new ys({numTouches:2,numTaps:1}),this.reset()};lo.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},lo.prototype.touchstart=function(q,$,W){this._zoomIn.touchstart(q,$,W),this._zoomOut.touchstart(q,$,W)},lo.prototype.touchmove=function(q,$,W){this._zoomIn.touchmove(q,$,W),this._zoomOut.touchmove(q,$,W)},lo.prototype.touchend=function(q,$,W){var ie=this,_e=this._zoomIn.touchend(q,$,W),ze=this._zoomOut.touchend(q,$,W);return _e?(this._active=!0,q.preventDefault(),setTimeout(function(){return ie.reset()},0),{cameraAnimation:function(He){return He.easeTo({duration:300,zoom:He.getZoom()+1,around:He.unproject(_e)},{originalEvent:q})}}):ze?(this._active=!0,q.preventDefault(),setTimeout(function(){return ie.reset()},0),{cameraAnimation:function(He){return He.easeTo({duration:300,zoom:He.getZoom()-1,around:He.unproject(ze)},{originalEvent:q})}}):void 0},lo.prototype.touchcancel=function(){this.reset()},lo.prototype.enable=function(){this._enabled=!0},lo.prototype.disable=function(){this._enabled=!1,this.reset()},lo.prototype.isEnabled=function(){return this._enabled},lo.prototype.isActive=function(){return this._active};var ea=function(q){this.reset(),this._clickTolerance=q.clickTolerance||1};ea.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},ea.prototype._correctButton=function(q,$){return!1},ea.prototype._move=function(q,$){return{}},ea.prototype.mousedown=function(q,$){if(!this._lastPoint){var W=y.mouseButton(q);this._correctButton(q,W)&&(this._lastPoint=$,this._eventButton=W)}},ea.prototype.mousemoveWindow=function(q,$){var W=this._lastPoint;if(W&&(q.preventDefault(),this._moved||!($.dist(W)0&&(this._active=!0);var ie=ha(W,$),_e=new s.Point(0,0),ze=new s.Point(0,0),He=0;for(var Xe in ie){var at=ie[Xe],wt=this._touches[Xe];wt&&(_e._add(at),ze._add(at.sub(wt)),He++,ie[Xe]=at)}if(this._touches=ie,!(HeMath.abs(q.x)}var Or=function(q){function $(){q.apply(this,arguments)}return q&&($.__proto__=q),$.prototype=Object.create(q&&q.prototype),$.prototype.constructor=$,$.prototype.reset=function(){q.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},$.prototype._start=function(W){this._lastPoints=W,al(W[0].sub(W[1]))&&(this._valid=!1)},$.prototype._move=function(W,ie,_e){var ze=W[0].sub(this._lastPoints[0]),He=W[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(ze,He,_e.timeStamp),this._valid)return this._lastPoints=W,this._active=!0,{pitchDelta:(ze.y+He.y)/2*-.5}},$.prototype.gestureBeginsVertically=function(W,ie,_e){if(this._valid!==void 0)return this._valid;var ze=W.mag()>=2,He=ie.mag()>=2;if(ze||He){if(!ze||!He)return this._firstMove===void 0&&(this._firstMove=_e),_e-this._firstMove<100&&void 0;var Xe=W.y>0==ie.y>0;return al(W)&&al(ie)&&Xe}},$}(Cr),ol={panStep:100,bearingStep:15,pitchStep:10},uo=function(){var q=ol;this._panStep=q.panStep,this._bearingStep=q.bearingStep,this._pitchStep=q.pitchStep};function Xl(q){return q*(2-q)}uo.prototype.reset=function(){this._active=!1},uo.prototype.keydown=function(q){var $=this;if(!(q.altKey||q.ctrlKey||q.metaKey)){var W=0,ie=0,_e=0,ze=0,He=0;switch(q.keyCode){case 61:case 107:case 171:case 187:W=1;break;case 189:case 109:case 173:W=-1;break;case 37:q.shiftKey?ie=-1:(q.preventDefault(),ze=-1);break;case 39:q.shiftKey?ie=1:(q.preventDefault(),ze=1);break;case 38:q.shiftKey?_e=1:(q.preventDefault(),He=-1);break;case 40:q.shiftKey?_e=-1:(q.preventDefault(),He=1);break;default:return}return{cameraAnimation:function(Xe){var at=Xe.getZoom();Xe.easeTo({duration:300,easeId:"keyboardHandler",easing:Xl,zoom:W?Math.round(at)+W*(q.shiftKey?2:1):at,bearing:Xe.getBearing()+ie*$._bearingStep,pitch:Xe.getPitch()+_e*$._pitchStep,offset:[-ze*$._panStep,-He*$._panStep],center:Xe.getCenter()},{originalEvent:q})}}}},uo.prototype.enable=function(){this._enabled=!0},uo.prototype.disable=function(){this._enabled=!1,this.reset()},uo.prototype.isEnabled=function(){return this._enabled},uo.prototype.isActive=function(){return this._active};var Cl=4.000244140625,ya=function(q,$){this._map=q,this._el=q.getCanvasContainer(),this._handler=$,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222,s.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};ya.prototype.setZoomRate=function(q){this._defaultZoomRate=q},ya.prototype.setWheelZoomRate=function(q){this._wheelZoomRate=q},ya.prototype.isEnabled=function(){return!!this._enabled},ya.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},ya.prototype.isZooming=function(){return!!this._zooming},ya.prototype.enable=function(q){this.isEnabled()||(this._enabled=!0,this._aroundCenter=q&&q.around==="center")},ya.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},ya.prototype.wheel=function(q){if(this.isEnabled()){var $=q.deltaMode===s.window.WheelEvent.DOM_DELTA_LINE?40*q.deltaY:q.deltaY,W=s.browser.now(),ie=W-(this._lastWheelEventTime||0);this._lastWheelEventTime=W,$!==0&&$%Cl==0?this._type="wheel":$!==0&&Math.abs($)<4?this._type="trackpad":ie>400?(this._type=null,this._lastValue=$,this._timeout=setTimeout(this._onTimeout,40,q)):this._type||(this._type=Math.abs(ie*$)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,$+=this._lastValue)),q.shiftKey&&$&&($/=4),this._type&&(this._lastWheelEvent=q,this._delta-=$,this._active||this._start(q)),q.preventDefault()}},ya.prototype._onTimeout=function(q){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(q)},ya.prototype._start=function(q){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 $=y.mousePos(this._el,q);this._around=s.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject($)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},ya.prototype.renderFrame=function(){return this._onScrollFrame()},ya.prototype._onScrollFrame=function(){var q=this;if(this._frameId&&(this._frameId=null,this.isActive())){var $=this._map.transform;if(this._delta!==0){var W=this._type==="wheel"&&Math.abs(this._delta)>Cl?this._wheelZoomRate:this._defaultZoomRate,ie=2/(1+Math.exp(-Math.abs(this._delta*W)));this._delta<0&&ie!==0&&(ie=1/ie);var _e=typeof this._targetZoom=="number"?$.zoomScale(this._targetZoom):$.scale;this._targetZoom=Math.min($.maxZoom,Math.max($.minZoom,$.scaleZoom(_e*ie))),this._type==="wheel"&&(this._startZoom=$.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var ze,He=typeof this._targetZoom=="number"?this._targetZoom:$.zoom,Xe=this._startZoom,at=this._easing,wt=!1;if(this._type==="wheel"&&Xe&&at){var At=Math.min((s.browser.now()-this._lastWheelEventTime)/200,1),re=at(At);ze=s.number(Xe,He,re),At<1?this._frameId||(this._frameId=!0):wt=!0}else ze=He,wt=!0;return this._active=!0,wt&&(this._active=!1,this._finishTimeout=setTimeout(function(){q._zooming=!1,q._handler._triggerRenderFrame(),delete q._targetZoom,delete q._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!wt,zoomDelta:ze-$.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},ya.prototype._smoothOutEasing=function(q){var $=s.ease;if(this._prevEase){var W=this._prevEase,ie=(s.browser.now()-W.start)/W.duration,_e=W.easing(ie+.01)-W.easing(ie),ze=.27/Math.sqrt(_e*_e+1e-4)*.01,He=Math.sqrt(.0729-ze*ze);$=s.bezier(ze,He,.25,1)}return this._prevEase={start:s.browser.now(),duration:q,easing:$},$},ya.prototype.reset=function(){this._active=!1};var Vs=function(q,$){this._clickZoom=q,this._tapZoom=$};Vs.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Vs.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Vs.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Vs.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var ns=function(){this.reset()};ns.prototype.reset=function(){this._active=!1},ns.prototype.dblclick=function(q,$){return q.preventDefault(),{cameraAnimation:function(W){W.easeTo({duration:300,zoom:W.getZoom()+(q.shiftKey?-1:1),around:W.unproject($)},{originalEvent:q})}}},ns.prototype.enable=function(){this._enabled=!0},ns.prototype.disable=function(){this._enabled=!1,this.reset()},ns.prototype.isEnabled=function(){return this._enabled},ns.prototype.isActive=function(){return this._active};var Wa=function(){this._tap=new ys({numTouches:1,numTaps:1}),this.reset()};Wa.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Wa.prototype.touchstart=function(q,$,W){this._swipePoint||(this._tapTime&&q.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?W.length>0&&(this._swipePoint=$[0],this._swipeTouch=W[0].identifier):this._tap.touchstart(q,$,W))},Wa.prototype.touchmove=function(q,$,W){if(this._tapTime){if(this._swipePoint){if(W[0].identifier!==this._swipeTouch)return;var ie=$[0],_e=ie.y-this._swipePoint.y;return this._swipePoint=ie,q.preventDefault(),this._active=!0,{zoomDelta:_e/128}}}else this._tap.touchmove(q,$,W)},Wa.prototype.touchend=function(q,$,W){this._tapTime?this._swipePoint&&W.length===0&&this.reset():this._tap.touchend(q,$,W)&&(this._tapTime=q.timeStamp)},Wa.prototype.touchcancel=function(){this.reset()},Wa.prototype.enable=function(){this._enabled=!0},Wa.prototype.disable=function(){this._enabled=!1,this.reset()},Wa.prototype.isEnabled=function(){return this._enabled},Wa.prototype.isActive=function(){return this._active};var xs=function(q,$,W){this._el=q,this._mousePan=$,this._touchPan=W};xs.prototype.enable=function(q){this._inertiaOptions=q||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},xs.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},xs.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},xs.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var _o=function(q,$,W){this._pitchWithRotate=q.pitchWithRotate,this._mouseRotate=$,this._mousePitch=W};_o.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},_o.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},_o.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},_o.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var co=function(q,$,W,ie){this._el=q,this._touchZoom=$,this._touchRotate=W,this._tapDragZoom=ie,this._rotationDisabled=!1,this._enabled=!0};co.prototype.enable=function(q){this._touchZoom.enable(q),this._rotationDisabled||this._touchRotate.enable(q),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},co.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},co.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},co.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},co.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},co.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var Hs=function(q){return q.zoom||q.drag||q.pitch||q.rotate},xa=function(q){function $(){q.apply(this,arguments)}return q&&($.__proto__=q),$.prototype=Object.create(q&&q.prototype),$.prototype.constructor=$,$}(s.Event);function fo(q){return q.panDelta&&q.panDelta.mag()||q.zoomDelta||q.bearingDelta||q.pitchDelta}var vi=function(q,$){this._map=q,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Bs(q),this._bearingSnap=$.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers($),s.bindAll(["handleEvent","handleWindowEvent"],this);var W=this._el;this._listeners=[[W,"touchstart",{passive:!1}],[W,"touchmove",{passive:!1}],[W,"touchend",void 0],[W,"touchcancel",void 0],[W,"mousedown",void 0],[W,"mousemove",void 0],[W,"mouseup",void 0],[s.window.document,"mousemove",{capture:!0}],[s.window.document,"mouseup",void 0],[W,"mouseover",void 0],[W,"mouseout",void 0],[W,"dblclick",void 0],[W,"click",void 0],[W,"keydown",{capture:!1}],[W,"keyup",void 0],[W,"wheel",{passive:!1}],[W,"contextmenu",void 0],[s.window,"blur",void 0]];for(var ie=0,_e=this._listeners;ie<_e.length;ie+=1){var ze=_e[ie],He=ze[0],Xe=ze[1],at=ze[2];y.addEventListener(He,Xe,He===s.window.document?this.handleWindowEvent:this.handleEvent,at)}};vi.prototype.destroy=function(){for(var q=0,$=this._listeners;q<$.length;q+=1){var W=$[q],ie=W[0],_e=W[1],ze=W[2];y.removeEventListener(ie,_e,ie===s.window.document?this.handleWindowEvent:this.handleEvent,ze)}},vi.prototype._addDefaultHandlers=function(q){var $=this._map,W=$.getCanvasContainer();this._add("mapEvent",new $i($,q));var ie=$.boxZoom=new ma($,q);this._add("boxZoom",ie);var _e=new lo,ze=new ns;$.doubleClickZoom=new Vs(ze,_e),this._add("tapZoom",_e),this._add("clickZoom",ze);var He=new Wa;this._add("tapDragZoom",He);var Xe=$.touchPitch=new Or;this._add("touchPitch",Xe);var at=new Wl(q),wt=new Zl(q);$.dragRotate=new _o(q,at,wt),this._add("mouseRotate",at,["mousePitch"]),this._add("mousePitch",wt,["mouseRotate"]);var At=new Ga(q),re=new Sa(q);$.dragPan=new xs(W,At,re),this._add("mousePan",At),this._add("touchPan",re,["touchZoom","touchRotate"]);var ve=new il,Le=new Yl;$.touchZoomRotate=new co(W,Le,ve,He),this._add("touchRotate",ve,["touchPan","touchZoom"]),this._add("touchZoom",Le,["touchPan","touchRotate"]);var Fe=$.scrollZoom=new ya($,this);this._add("scrollZoom",Fe,["mousePan"]);var Ve=$.keyboard=new uo;this._add("keyboard",Ve),this._add("blockableMapEvent",new va($));for(var We=0,$e=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];We<$e.length;We+=1){var tt=$e[We];q.interactive&&q[tt]&&$[tt].enable(q[tt])}},vi.prototype._add=function(q,$,W){this._handlers.push({handlerName:q,handler:$,allowed:W}),this._handlersById[q]=$},vi.prototype.stop=function(){if(!this._updatingCamera){for(var q=0,$=this._handlers;q<$.length;q+=1)$[q].handler.reset();this._inertia.clear(),this._fireEvents({},{}),this._changes=[]}},vi.prototype.isActive=function(){for(var q=0,$=this._handlers;q<$.length;q+=1)if($[q].handler.isActive())return!0;return!1},vi.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},vi.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},vi.prototype.isMoving=function(){return!!Hs(this._eventsInProgress)||this.isZooming()},vi.prototype._blockedByActive=function(q,$,W){for(var ie in q)if(ie!==W&&(!$||$.indexOf(ie)<0))return!0;return!1},vi.prototype.handleWindowEvent=function(q){this.handleEvent(q,q.type+"Window")},vi.prototype._getMapTouches=function(q){for(var $=[],W=0,ie=q;WHe?Math.min(2,Ut):Math.max(.5,Ut),sn=Math.pow(en,1-Qt),rn=ze.unproject(gt.add(zt.mult(Qt*sn)).mult(gn));ze.setLocationAtPoint(ze.renderWorldCopies?rn.wrap():rn,Ve)}_e._fireMoveEvents(ie)},function(Qt){_e._afterEase(ie,Qt)},W),this},$.prototype._prepareEase=function(W,ie,_e){_e===void 0&&(_e={}),this._moving=!0,ie||_e.moving||this.fire(new s.Event("movestart",W)),this._zooming&&!_e.zooming&&this.fire(new s.Event("zoomstart",W)),this._rotating&&!_e.rotating&&this.fire(new s.Event("rotatestart",W)),this._pitching&&!_e.pitching&&this.fire(new s.Event("pitchstart",W))},$.prototype._fireMoveEvents=function(W){this.fire(new s.Event("move",W)),this._zooming&&this.fire(new s.Event("zoom",W)),this._rotating&&this.fire(new s.Event("rotate",W)),this._pitching&&this.fire(new s.Event("pitch",W))},$.prototype._afterEase=function(W,ie){if(!this._easeId||!ie||this._easeId!==ie){delete this._easeId;var _e=this._zooming,ze=this._rotating,He=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,_e&&this.fire(new s.Event("zoomend",W)),ze&&this.fire(new s.Event("rotateend",W)),He&&this.fire(new s.Event("pitchend",W)),this.fire(new s.Event("moveend",W))}},$.prototype.flyTo=function(W,ie){var _e=this;if(!W.essential&&s.browser.prefersReducedMotion){var ze=s.pick(W,["center","zoom","bearing","pitch","around"]);return this.jumpTo(ze,ie)}this.stop(),W=s.extend({offset:[0,0],speed:1.2,curve:1.42,easing:s.ease},W);var He=this.transform,Xe=this.getZoom(),at=this.getBearing(),wt=this.getPitch(),At=this.getPadding(),re="zoom"in W?s.clamp(+W.zoom,He.minZoom,He.maxZoom):Xe,ve="bearing"in W?this._normalizeBearing(W.bearing,at):at,Le="pitch"in W?+W.pitch:wt,Fe="padding"in W?W.padding:He.padding,Ve=He.zoomScale(re-Xe),We=s.Point.convert(W.offset),$e=He.centerPoint.add(We),tt=He.pointLocation($e),lt=s.LngLat.convert(W.center||tt);this._normalizeCenter(lt);var gt=He.project(tt),zt=He.project(lt).sub(gt),Ut=W.curve,Vt=Math.max(He.width,He.height),Qt=Vt/Ve,gn=zt.mag();if("minZoom"in W){var en=s.clamp(Math.min(W.minZoom,Xe,re),He.minZoom,He.maxZoom),sn=Vt/He.zoomScale(en-Xe);Ut=Math.sqrt(sn/gn*2)}var rn=Ut*Ut;function Mn(mr){var wr=(Qt*Qt-Vt*Vt+(mr?-1:1)*rn*rn*gn*gn)/(2*(mr?Qt:Vt)*rn*gn);return Math.log(Math.sqrt(wr*wr+1)-wr)}function xn(mr){return(Math.exp(mr)-Math.exp(-mr))/2}function an(mr){return(Math.exp(mr)+Math.exp(-mr))/2}var zn=Mn(0),Vn=function(mr){return an(zn)/an(zn+Ut*mr)},nr=function(mr){return Vt*((an(zn)*(xn(wr=zn+Ut*mr)/an(wr))-xn(zn))/rn)/gn;var wr},rr=(Mn(1)-zn)/Ut;if(Math.abs(gn)<1e-6||!isFinite(rr)){if(Math.abs(Vt-Qt)<1e-6)return this.easeTo(W,ie);var Tr=QtW.maxDuration&&(W.duration=0),this._zooming=!0,this._rotating=at!==ve,this._pitching=Le!==wt,this._padding=!He.isPaddingEqual(Fe),this._prepareEase(ie,!1),this._ease(function(mr){var wr=mr*rr,Rr=1/Vn(wr);He.zoom=mr===1?re:Xe+He.scaleZoom(Rr),_e._rotating&&(He.bearing=s.number(at,ve,mr)),_e._pitching&&(He.pitch=s.number(wt,Le,mr)),_e._padding&&(He.interpolatePadding(At,Fe,mr),$e=He.centerPoint.add(We));var Jr=mr===1?lt:He.unproject(gt.add(zt.mult(nr(wr))).mult(Rr));He.setLocationAtPoint(He.renderWorldCopies?Jr.wrap():Jr,$e),_e._fireMoveEvents(ie)},function(){return _e._afterEase(ie)},W),this},$.prototype.isEasing=function(){return!!this._easeFrameId},$.prototype.stop=function(){return this._stop()},$.prototype._stop=function(W,ie){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var _e=this._onEaseEnd;delete this._onEaseEnd,_e.call(this,ie)}if(!W){var ze=this.handlers;ze&&ze.stop()}return this},$.prototype._ease=function(W,ie,_e){_e.animate===!1||_e.duration===0?(W(1),ie()):(this._easeStart=s.browser.now(),this._easeOptions=_e,this._onEaseFrame=W,this._onEaseEnd=ie,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},$.prototype._renderFrameCallback=function(){var W=Math.min((s.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(W)),W<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},$.prototype._normalizeBearing=function(W,ie){W=s.wrap(W,-180,180);var _e=Math.abs(W-ie);return Math.abs(W-360-ie)<_e&&(W-=360),Math.abs(W+360-ie)<_e&&(W+=360),W},$.prototype._normalizeCenter=function(W){var ie=this.transform;if(ie.renderWorldCopies&&!ie.lngRange){var _e=W.lng-ie.center.lng;W.lng+=_e>180?-360:_e<-180?360:0}},$}(s.Evented),to=function(q){q===void 0&&(q={}),this.options=q,s.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};to.prototype.getDefaultPosition=function(){return"bottom-right"},to.prototype.onAdd=function(q){var $=this.options&&this.options.compact;return this._map=q,this._container=y.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._innerContainer=y.create("div","mapboxgl-ctrl-attrib-inner",this._container),$&&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),$===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},to.prototype.onRemove=function(){y.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},to.prototype._updateEditLink=function(){var q=this._editLink;q||(q=this._editLink=this._container.querySelector(".mapbox-improve-map"));var $=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||s.config.ACCESS_TOKEN}];if(q){var W=$.reduce(function(ie,_e,ze){return _e.value&&(ie+=_e.key+"="+_e.value+(ze<$.length-1?"&":"")),ie},"?");q.href=s.config.FEEDBACK_URL+"/"+W+(this._map._hash?this._map._hash.getHashString(!0):""),q.rel="noopener nofollow"}},to.prototype._updateData=function(q){!q||q.sourceDataType!=="metadata"&&q.dataType!=="style"||(this._updateAttributions(),this._updateEditLink())},to.prototype._updateAttributions=function(){if(this._map.style){var q=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?q=q.concat(this.options.customAttribution.map(function(Xe){return typeof Xe!="string"?"":Xe})):typeof this.options.customAttribution=="string"&&q.push(this.options.customAttribution)),this._map.style.stylesheet){var $=this._map.style.stylesheet;this.styleOwner=$.owner,this.styleId=$.id}var W=this._map.style.sourceCaches;for(var ie in W){var _e=W[ie];if(_e.used){var ze=_e.getSource();ze.attribution&&q.indexOf(ze.attribution)<0&&q.push(ze.attribution)}}q.sort(function(Xe,at){return Xe.length-at.length});var He=(q=q.filter(function(Xe,at){for(var wt=at+1;wt=0)return!1;return!0})).join(" | ");He!==this._attribHTML&&(this._attribHTML=He,q.length?(this._innerContainer.innerHTML=He,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},to.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var ho=function(){s.bindAll(["_updateLogo"],this),s.bindAll(["_updateCompact"],this)};ho.prototype.onAdd=function(q){this._map=q,this._container=y.create("div","mapboxgl-ctrl");var $=y.create("a","mapboxgl-ctrl-logo");return $.target="_blank",$.rel="noopener nofollow",$.href="https://www.mapbox.com/",$.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),$.setAttribute("rel","noopener nofollow"),this._container.appendChild($),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},ho.prototype.onRemove=function(){y.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},ho.prototype.getDefaultPosition=function(){return"bottom-left"},ho.prototype._updateLogo=function(q){q&&q.sourceDataType!=="metadata"||(this._container.style.display=this._logoRequired()?"block":"none")},ho.prototype._logoRequired=function(){if(this._map.style){var q=this._map.style.sourceCaches;for(var $ in q)if(q[$].getSource().mapbox_logo)return!0;return!1}},ho.prototype._updateCompact=function(){var q=this._container.children;if(q.length){var $=q[0];this._map.getCanvasContainer().offsetWidth<250?$.classList.add("mapboxgl-compact"):$.classList.remove("mapboxgl-compact")}};var Fo=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Fo.prototype.add=function(q){var $=++this._id;return this._queue.push({callback:q,id:$,cancelled:!1}),$},Fo.prototype.remove=function(q){for(var $=this._currentlyRunning,W=0,ie=$?this._queue.concat($):this._queue;Wie.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(ie.minPitch!=null&&ie.maxPitch!=null&&ie.minPitch>ie.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(ie.minPitch!=null&&ie.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(ie.maxPitch!=null&&ie.maxPitch>Da)throw new Error("maxPitch must be less than or equal to 60");var ze=new oi(ie.minZoom,ie.maxZoom,ie.minPitch,ie.maxPitch,ie.renderWorldCopies);if(q.call(this,ze,ie),this._interactive=ie.interactive,this._maxTileCacheSize=ie.maxTileCacheSize,this._failIfMajorPerformanceCaveat=ie.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=ie.preserveDrawingBuffer,this._antialias=ie.antialias,this._trackResize=ie.trackResize,this._bearingSnap=ie.bearingSnap,this._refreshExpiredTiles=ie.refreshExpiredTiles,this._fadeDuration=ie.fadeDuration,this._crossSourceCollisions=ie.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=ie.collectResourceTiming,this._renderTaskQueue=new Fo,this._controls=[],this._mapId=s.uniqueId(),this._locale=s.extend({},za,ie.locale),this._requestManager=new s.RequestManager(ie.transformRequest,ie.accessToken),typeof ie.container=="string"){if(this._container=s.window.document.getElementById(ie.container),!this._container)throw new Error("Container '"+ie.container+"' not found.")}else{if(!(ie.container instanceof oa))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=ie.container}if(ie.maxBounds&&this.setMaxBounds(ie.maxBounds),s.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return _e._update(!1)}),this.on("moveend",function(){return _e._update(!1)}),this.on("zoom",function(){return _e._update(!0)}),s.window!==void 0&&(s.window.addEventListener("online",this._onWindowOnline,!1),s.window.addEventListener("resize",this._onWindowResize,!1)),this.handlers=new vi(this,ie);var He=typeof ie.hash=="string"&&ie.hash||void 0;this._hash=ie.hash&&new es(He).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:ie.center,zoom:ie.zoom,bearing:ie.bearing,pitch:ie.pitch}),ie.bounds&&(this.resize(),this.fitBounds(ie.bounds,s.extend({},ie.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=ie.localIdeographFontFamily,ie.style&&this.setStyle(ie.style,{localIdeographFontFamily:ie.localIdeographFontFamily}),ie.attributionControl&&this.addControl(new to({customAttribution:ie.customAttribution})),this.addControl(new ho,ie.logoPosition),this.on("style.load",function(){_e.transform.unmodified&&_e.jumpTo(_e.style.stylesheet)}),this.on("data",function(Xe){_e._update(Xe.dataType==="style"),_e.fire(new s.Event(Xe.dataType+"data",Xe))}),this.on("dataloading",function(Xe){_e.fire(new s.Event(Xe.dataType+"dataloading",Xe))})}q&&($.__proto__=q),$.prototype=Object.create(q&&q.prototype),$.prototype.constructor=$;var W={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return $.prototype._getMapId=function(){return this._mapId},$.prototype.addControl=function(ie,_e){if(_e===void 0&&ie.getDefaultPosition&&(_e=ie.getDefaultPosition()),_e===void 0&&(_e="top-right"),!ie||!ie.onAdd)return this.fire(new s.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var ze=ie.onAdd(this);this._controls.push(ie);var He=this._controlPositions[_e];return _e.indexOf("bottom")!==-1?He.insertBefore(ze,He.firstChild):He.appendChild(ze),this},$.prototype.removeControl=function(ie){if(!ie||!ie.onRemove)return this.fire(new s.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var _e=this._controls.indexOf(ie);return _e>-1&&this._controls.splice(_e,1),ie.onRemove(this),this},$.prototype.resize=function(ie){var _e=this._containerDimensions(),ze=_e[0],He=_e[1];this._resizeCanvas(ze,He),this.transform.resize(ze,He),this.painter.resize(ze,He);var Xe=!this._moving;return Xe&&(this.stop(),this.fire(new s.Event("movestart",ie)).fire(new s.Event("move",ie))),this.fire(new s.Event("resize",ie)),Xe&&this.fire(new s.Event("moveend",ie)),this},$.prototype.getBounds=function(){return this.transform.getBounds()},$.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},$.prototype.setMaxBounds=function(ie){return this.transform.setMaxBounds(s.LngLatBounds.convert(ie)),this._update()},$.prototype.setMinZoom=function(ie){if((ie=ie??-2)>=-2&&ie<=this.transform.maxZoom)return this.transform.minZoom=ie,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=ie,this._update(),this.getZoom()>ie&&this.setZoom(ie),this;throw new Error("maxZoom must be greater than the current minZoom")},$.prototype.getMaxZoom=function(){return this.transform.maxZoom},$.prototype.setMinPitch=function(ie){if((ie=ie??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(ie>=0&&ie<=this.transform.maxPitch)return this.transform.minPitch=ie,this._update(),this.getPitch()Da)throw new Error("maxPitch must be less than or equal to 60");if(ie>=this.transform.minPitch)return this.transform.maxPitch=ie,this._update(),this.getPitch()>ie&&this.setPitch(ie),this;throw new Error("maxPitch must be greater than the current minPitch")},$.prototype.getMaxPitch=function(){return this.transform.maxPitch},$.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},$.prototype.setRenderWorldCopies=function(ie){return this.transform.renderWorldCopies=ie,this._update()},$.prototype.project=function(ie){return this.transform.locationPoint(s.LngLat.convert(ie))},$.prototype.unproject=function(ie){return this.transform.pointLocation(s.Point.convert(ie))},$.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},$.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},$.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},$.prototype._createDelegatedListener=function(ie,_e,ze){var He,Xe=this;if(ie==="mouseenter"||ie==="mouseover"){var at=!1;return{layer:_e,listener:ze,delegates:{mousemove:function(At){var re=Xe.getLayer(_e)?Xe.queryRenderedFeatures(At.point,{layers:[_e]}):[];re.length?at||(at=!0,ze.call(Xe,new Oi(ie,Xe,At.originalEvent,{features:re}))):at=!1},mouseout:function(){at=!1}}}}if(ie==="mouseleave"||ie==="mouseout"){var wt=!1;return{layer:_e,listener:ze,delegates:{mousemove:function(At){(Xe.getLayer(_e)?Xe.queryRenderedFeatures(At.point,{layers:[_e]}):[]).length?wt=!0:wt&&(wt=!1,ze.call(Xe,new Oi(ie,Xe,At.originalEvent)))},mouseout:function(At){wt&&(wt=!1,ze.call(Xe,new Oi(ie,Xe,At.originalEvent)))}}}}return{layer:_e,listener:ze,delegates:(He={},He[ie]=function(At){var re=Xe.getLayer(_e)?Xe.queryRenderedFeatures(At.point,{layers:[_e]}):[];re.length&&(At.features=re,ze.call(Xe,At),delete At.features)},He)}},$.prototype.on=function(ie,_e,ze){if(ze===void 0)return q.prototype.on.call(this,ie,_e);var He=this._createDelegatedListener(ie,_e,ze);for(var Xe in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[ie]=this._delegatedListeners[ie]||[],this._delegatedListeners[ie].push(He),He.delegates)this.on(Xe,He.delegates[Xe]);return this},$.prototype.once=function(ie,_e,ze){if(ze===void 0)return q.prototype.once.call(this,ie,_e);var He=this._createDelegatedListener(ie,_e,ze);for(var Xe in He.delegates)this.once(Xe,He.delegates[Xe]);return this},$.prototype.off=function(ie,_e,ze){var He=this;return ze===void 0?q.prototype.off.call(this,ie,_e):(this._delegatedListeners&&this._delegatedListeners[ie]&&function(Xe){for(var at=Xe[ie],wt=0;wt180;){var He=W.locationPoint(q);if(He.x>=0&&He.y>=0&&He.x<=W.width&&He.y<=W.height)break;q.lng>W.center.lng?q.lng-=360:q.lng+=360}return q}Fr.prototype.down=function(q,$){this.mouseRotate.mousedown(q,$),this.mousePitch&&this.mousePitch.mousedown(q,$),y.disableDrag()},Fr.prototype.move=function(q,$){var W=this.map,ie=this.mouseRotate.mousemoveWindow(q,$);if(ie&&ie.bearingDelta&&W.setBearing(W.getBearing()+ie.bearingDelta),this.mousePitch){var _e=this.mousePitch.mousemoveWindow(q,$);_e&&_e.pitchDelta&&W.setPitch(W.getPitch()+_e.pitchDelta)}},Fr.prototype.off=function(){var q=this.element;y.removeEventListener(q,"mousedown",this.mousedown),y.removeEventListener(q,"touchstart",this.touchstart,{passive:!1}),y.removeEventListener(q,"touchmove",this.touchmove),y.removeEventListener(q,"touchend",this.touchend),y.removeEventListener(q,"touchcancel",this.reset),this.offTemp()},Fr.prototype.offTemp=function(){y.enableDrag(),y.removeEventListener(s.window,"mousemove",this.mousemove),y.removeEventListener(s.window,"mouseup",this.mouseup)},Fr.prototype.mousedown=function(q){this.down(s.extend({},q,{ctrlKey:!0,preventDefault:function(){return q.preventDefault()}}),y.mousePos(this.element,q)),y.addEventListener(s.window,"mousemove",this.mousemove),y.addEventListener(s.window,"mouseup",this.mouseup)},Fr.prototype.mousemove=function(q){this.move(q,y.mousePos(this.element,q))},Fr.prototype.mouseup=function(q){this.mouseRotate.mouseupWindow(q),this.mousePitch&&this.mousePitch.mouseupWindow(q),this.offTemp()},Fr.prototype.touchstart=function(q){q.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=y.touchPos(this.element,q.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return q.preventDefault()}},this._startPos))},Fr.prototype.touchmove=function(q){q.targetTouches.length!==1?this.reset():(this._lastPos=y.touchPos(this.element,q.targetTouches)[0],this.move({preventDefault:function(){return q.preventDefault()}},this._lastPos))},Fr.prototype.touchend=function(q){q.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)ie.getEast()||_e.latitudeie.getNorth())},$.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")}},$.prototype._onSuccess=function(W){if(this._map){if(this._isOutOfMapMaxBounds(W))return this._setErrorState(),this.fire(new s.Event("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("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")}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("mapboxgl-user-location-dot-stale"),this.fire(new s.Event("geolocate",W)),this._finish()}},$.prototype._updateCamera=function(W){var ie=new s.LngLat(W.coords.longitude,W.coords.latitude),_e=W.coords.accuracy,ze=this._map.getBearing(),He=s.extend({bearing:ze},this.options.fitBoundsOptions);this._map.fitBounds(ie.toBounds(_e),He,{geolocateSource:!0})},$.prototype._updateMarker=function(W){if(W){var ie=new s.LngLat(W.coords.longitude,W.coords.latitude);this._accuracyCircleMarker.setLngLat(ie).addTo(this._map),this._userLocationDotMarker.setLngLat(ie).addTo(this._map),this._accuracy=W.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},$.prototype._updateCircleRadius=function(){var W=this._map._container.clientHeight/2,ie=this._map.unproject([0,W]),_e=this._map.unproject([1,W]),ze=ie.distanceTo(_e),He=Math.ceil(2*this._accuracy/ze);this._circleElement.style.width=He+"px",this._circleElement.style.height=He+"px"},$.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},$.prototype._onError=function(W){if(this._map){if(this.options.trackUserLocation)if(W.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 ie=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=ie,this._geolocateButton.setAttribute("aria-label",ie),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(W.code===3&&ll)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new s.Event("error",W)),this._finish()}},$.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},$.prototype._setupUI=function(W){var ie=this;if(this._container.addEventListener("contextmenu",function(He){return He.preventDefault()}),this._geolocateButton=y.create("button","mapboxgl-ctrl-geolocate",this._container),y.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",W===!1){s.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var _e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=_e,this._geolocateButton.setAttribute("aria-label",_e)}else{var ze=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=ze,this._geolocateButton.setAttribute("aria-label",ze)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=y.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new _a(this._dotElement),this._circleElement=y.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new _a({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(He){var Xe=He.originalEvent&&He.originalEvent.type==="resize";He.geolocateSource||ie._watchState!=="ACTIVE_LOCK"||Xe||(ie._watchState="BACKGROUND",ie._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),ie._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),ie.fire(new s.Event("trackuserlocationend")))})},$.prototype.trigger=function(){if(!this._setup)return s.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 s.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Fa--,ll=!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 s.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 s.Event("trackuserlocationstart"))}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")}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){var W;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++Fa>1?(W={maximumAge:6e5,timeout:0},ll=!0):(W=this.options.positionOptions,ll=!1),this._geolocationWatchID=s.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,W)}}else s.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},$.prototype._clearWatch=function(){s.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)},$}(s.Evented),_i={maxWidth:100,unit:"metric"},Si=function(q){this.options=s.extend({},_i,q),s.bindAll(["_onMove","setUnit"],this)};function Jl(q,$,W){var ie=W&&W.maxWidth||100,_e=q._container.clientHeight/2,ze=q.unproject([0,_e]),He=q.unproject([ie,_e]),Xe=ze.distanceTo(He);if(W&&W.unit==="imperial"){var at=3.2808*Xe;at>5280?et($,ie,at/5280,q._getUIString("ScaleControl.Miles")):et($,ie,at,q._getUIString("ScaleControl.Feet"))}else W&&W.unit==="nautical"?et($,ie,Xe/1852,q._getUIString("ScaleControl.NauticalMiles")):Xe>=1e3?et($,ie,Xe/1e3,q._getUIString("ScaleControl.Kilometers")):et($,ie,Xe,q._getUIString("ScaleControl.Meters"))}function et(q,$,W,ie){var _e,ze,He,Xe=(_e=W,(ze=Math.pow(10,(""+Math.floor(_e)).length-1))*((He=_e/ze)>=10?10:He>=5?5:He>=3?3:He>=2?2:He>=1?1:function(wt){var At=Math.pow(10,Math.ceil(-Math.log(wt)/Math.LN10));return Math.round(wt*At)/At}(He))),at=Xe/W;q.style.width=$*at+"px",q.innerHTML=Xe+" "+ie}Si.prototype.getDefaultPosition=function(){return"bottom-left"},Si.prototype._onMove=function(){Jl(this._map,this._container,this.options)},Si.prototype.onAdd=function(q){return this._map=q,this._container=y.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",q.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Si.prototype.onRemove=function(){y.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Si.prototype.setUnit=function(q){this.options.unit=q,Jl(this._map,this._container,this.options)};var rt=function(q){this._fullscreen=!1,q&&q.container&&(q.container instanceof s.window.HTMLElement?this._container=q.container:s.warnOnce("Full screen control 'container' must be a DOM element.")),s.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in s.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in s.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in s.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in s.window.document&&(this._fullscreenchange="MSFullscreenChange")};rt.prototype.onAdd=function(q){return this._map=q,this._container||(this._container=this._map.getContainer()),this._controlContainer=y.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",s.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},rt.prototype.onRemove=function(){y.remove(this._controlContainer),this._map=null,s.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},rt.prototype._checkFullscreenSupport=function(){return!!(s.window.document.fullscreenEnabled||s.window.document.mozFullScreenEnabled||s.window.document.msFullscreenEnabled||s.window.document.webkitFullscreenEnabled)},rt.prototype._setupUI=function(){var q=this._fullscreenButton=y.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);y.create("span","mapboxgl-ctrl-icon",q).setAttribute("aria-hidden",!0),q.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),s.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},rt.prototype._updateTitle=function(){var q=this._getTitle();this._fullscreenButton.setAttribute("aria-label",q),this._fullscreenButton.title=q},rt.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},rt.prototype._isFullscreen=function(){return this._fullscreen},rt.prototype._changeIcon=function(){(s.window.document.fullscreenElement||s.window.document.mozFullScreenElement||s.window.document.webkitFullscreenElement||s.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},rt.prototype._onClickFullscreen=function(){this._isFullscreen()?s.window.document.exitFullscreen?s.window.document.exitFullscreen():s.window.document.mozCancelFullScreen?s.window.document.mozCancelFullScreen():s.window.document.msExitFullscreen?s.window.document.msExitFullscreen():s.window.document.webkitCancelFullScreen&&s.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 ct={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},vt=function(q){function $(W){q.call(this),this.options=s.extend(Object.create(ct),W),s.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return q&&($.__proto__=q),$.prototype=Object.create(q&&q.prototype),$.prototype.constructor=$,$.prototype.addTo=function(W){return this._map&&this.remove(),this._map=W,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._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 s.Event("open")),this},$.prototype.isOpen=function(){return!!this._map},$.prototype.remove=function(){return this._content&&y.remove(this._content),this._container&&(y.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 s.Event("close")),this},$.prototype.getLngLat=function(){return this._lngLat},$.prototype.setLngLat=function(W){return this._lngLat=s.LngLat.convert(W),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},$.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},$.prototype.getElement=function(){return this._container},$.prototype.setText=function(W){return this.setDOMContent(s.window.document.createTextNode(W))},$.prototype.setHTML=function(W){var ie,_e=s.window.document.createDocumentFragment(),ze=s.window.document.createElement("body");for(ze.innerHTML=W;ie=ze.firstChild;)_e.appendChild(ie);return this.setDOMContent(_e)},$.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},$.prototype.setMaxWidth=function(W){return this.options.maxWidth=W,this._update(),this},$.prototype.setDOMContent=function(W){return this._createContent(),this._content.appendChild(W),this._update(),this},$.prototype.addClassName=function(W){this._container&&this._container.classList.add(W)},$.prototype.removeClassName=function(W){this._container&&this._container.classList.remove(W)},$.prototype.toggleClassName=function(W){if(this._container)return this._container.classList.toggle(W)},$.prototype._createContent=function(){this._content&&y.remove(this._content),this._content=y.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=y.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))},$.prototype._onMouseUp=function(W){this._update(W.point)},$.prototype._onMouseMove=function(W){this._update(W.point)},$.prototype._onDrag=function(W){this._update(W.point)},$.prototype._update=function(W){var ie=this,_e=this._lngLat||this._trackPointer;if(this._map&&_e&&this._content&&(this._container||(this._container=y.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=y.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(ve){return ie._container.classList.add(ve)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Ur(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||W)){var ze=this._pos=this._trackPointer&&W?W:this._map.project(this._lngLat),He=this.options.anchor,Xe=Mt(this.options.offset);if(!He){var at,wt=this._container.offsetWidth,At=this._container.offsetHeight;at=ze.y+Xe.bottom.ythis._map.transform.height-At?["bottom"]:[],ze.xthis._map.transform.width-wt/2&&at.push("right"),He=at.length===0?"bottom":at.join("-")}var re=ze.add(Xe[He]).round();y.setTransform(this._container,sl[He]+" translate("+re.x+"px,"+re.y+"px)"),is(this._container,He,"popup")}},$.prototype._onClose=function(){this.remove()},$}(s.Evented);function Mt(q){if(q){if(typeof q=="number"){var $=Math.round(Math.sqrt(.5*Math.pow(q,2)));return{center:new s.Point(0,0),top:new s.Point(0,q),"top-left":new s.Point($,$),"top-right":new s.Point(-$,$),bottom:new s.Point(0,-q),"bottom-left":new s.Point($,-$),"bottom-right":new s.Point(-$,-$),left:new s.Point(q,0),right:new s.Point(-q,0)}}if(q instanceof s.Point||Array.isArray(q)){var W=s.Point.convert(q);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:s.Point.convert(q.center||[0,0]),top:s.Point.convert(q.top||[0,0]),"top-left":s.Point.convert(q["top-left"]||[0,0]),"top-right":s.Point.convert(q["top-right"]||[0,0]),bottom:s.Point.convert(q.bottom||[0,0]),"bottom-left":s.Point.convert(q["bottom-left"]||[0,0]),"bottom-right":s.Point.convert(q["bottom-right"]||[0,0]),left:s.Point.convert(q.left||[0,0]),right:s.Point.convert(q.right||[0,0])}}return Mt(new s.Point(0,0))}var kt={version:s.version,supported:T,setRTLTextPlugin:s.setRTLTextPlugin,getRTLTextPluginStatus:s.getRTLTextPluginStatus,Map:bs,NavigationControl:po,GeolocateControl:as,AttributionControl:to,ScaleControl:Si,FullscreenControl:rt,Popup:vt,Marker:_a,Style:cr,LngLat:s.LngLat,LngLatBounds:s.LngLatBounds,Point:s.Point,MercatorCoordinate:s.MercatorCoordinate,Evented:s.Evented,config:s.config,prewarm:function(){Ct().acquire(ut)},clearPrewarmedResources:function(){var q=bt;q&&(q.isPreloaded()&&q.numActive()===1?(q.release(ut),bt=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()"))},get accessToken(){return s.config.ACCESS_TOKEN},set accessToken(q){s.config.ACCESS_TOKEN=q},get baseApiUrl(){return s.config.API_URL},set baseApiUrl(q){s.config.API_URL=q},get workerCount(){return pt.workerCount},set workerCount(q){pt.workerCount=q},get maxParallelImageRequests(){return s.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(q){s.config.MAX_PARALLEL_IMAGE_REQUESTS=q},clearStorage:function(q){s.clearTileCache(q)},workerUrl:""};return kt}),_}()},27084:function(D){D.exports=Math.log2||function(E){return Math.log(E)*Math.LOG2E}},16825:function(D,E,e){D.exports=function(w,s){s||(s=w,w=window);var T=0,y=0,f=0,l={shift:!1,alt:!1,control:!1,meta:!1},t=!1;function i(v){var x=!1;return"altKey"in v&&(x=x||v.altKey!==l.alt,l.alt=!!v.altKey),"shiftKey"in v&&(x=x||v.shiftKey!==l.shift,l.shift=!!v.shiftKey),"ctrlKey"in v&&(x=x||v.ctrlKey!==l.control,l.control=!!v.ctrlKey),"metaKey"in v&&(x=x||v.metaKey!==l.meta,l.meta=!!v.metaKey),x}function r(v,x){var g=_.x(x),m=_.y(x);"buttons"in x&&(v=0|x.buttons),(v!==T||g!==y||m!==f||i(x))&&(T=0|v,y=g||0,f=m||0,s&&s(T,y,f,l))}function n(v){r(0,v)}function o(){(T||y||f||l.shift||l.alt||l.meta||l.control)&&(y=f=0,T=0,l.shift=l.alt=l.control=l.meta=!1,s&&s(0,0,0,l))}function a(v){i(v)&&s&&s(T,y,f,l)}function u(v){_.buttons(v)===0?r(0,v):r(T,v)}function p(v){r(T|_.buttons(v),v)}function c(v){r(T&~_.buttons(v),v)}function b(){t||(t=!0,w.addEventListener("mousemove",u),w.addEventListener("mousedown",p),w.addEventListener("mouseup",c),w.addEventListener("mouseleave",n),w.addEventListener("mouseenter",n),w.addEventListener("mouseout",n),w.addEventListener("mouseover",n),w.addEventListener("blur",o),w.addEventListener("keyup",a),w.addEventListener("keydown",a),w.addEventListener("keypress",a),w!==window&&(window.addEventListener("blur",o),window.addEventListener("keyup",a),window.addEventListener("keydown",a),window.addEventListener("keypress",a)))}b();var d={element:w};return Object.defineProperties(d,{enabled:{get:function(){return t},set:function(v){v?b():t&&(t=!1,w.removeEventListener("mousemove",u),w.removeEventListener("mousedown",p),w.removeEventListener("mouseup",c),w.removeEventListener("mouseleave",n),w.removeEventListener("mouseenter",n),w.removeEventListener("mouseout",n),w.removeEventListener("mouseover",n),w.removeEventListener("blur",o),w.removeEventListener("keyup",a),w.removeEventListener("keydown",a),w.removeEventListener("keypress",a),w!==window&&(window.removeEventListener("blur",o),window.removeEventListener("keyup",a),window.removeEventListener("keydown",a),window.removeEventListener("keypress",a)))},enumerable:!0},buttons:{get:function(){return T},enumerable:!0},x:{get:function(){return y},enumerable:!0},y:{get:function(){return f},enumerable:!0},mods:{get:function(){return l},enumerable:!0}}),d};var _=e(74311)},48956:function(D){var E={left:0,top:0};D.exports=function(e,_,w){_=_||e.currentTarget||e.srcElement,Array.isArray(w)||(w=[0,0]);var s,T=e.clientX||0,y=e.clientY||0,f=(s=_)===window||s===document||s===document.body?E:s.getBoundingClientRect();return w[0]=T-f.left,w[1]=y-f.top,w}},74311:function(D,E){function e(_){return _.target||_.srcElement||window}E.buttons=function(_){if(typeof _=="object"){if("buttons"in _)return _.buttons;if("which"in _){if((w=_.which)===2)return 4;if(w===3)return 2;if(w>0)return 1<=0)return 1<0&&r(o,k))}catch(h){p.call(new b(k),h)}}}function p(g){var m=this;m.triggered||(m.triggered=!0,m.def&&(m=m.def),m.msg=g,m.state=2,m.chain.length>0&&r(o,m))}function c(g,m,k,h){for(var M=0;M1&&(t*=v=Math.sqrt(v),i*=v);var x=t*t,g=i*i,m=(n==o?-1:1)*Math.sqrt(Math.abs((x*g-x*d*d-g*b*b)/(x*d*d+g*b*b)));m==1/0&&(m=1);var k=m*t*d/i+(f+a)/2,h=m*-i*b/t+(l+u)/2,M=Math.asin(((l-h)/i).toFixed(9)),A=Math.asin(((u-h)/i).toFixed(9));(M=fA&&(M-=2*E),!o&&A>M&&(A-=2*E)}if(Math.abs(A-M)>e){var C=A,L=a,O=u;A=M+e*(o&&A>M?1:-1);var I=s(a=k+t*Math.cos(A),u=h+i*Math.sin(A),t,i,r,0,o,L,O,[A,C,k,h])}var R=Math.tan((A-M)/4),U=4/3*t*R,B=4/3*i*R,G=[2*f-(f+U*Math.sin(M)),2*l-(l-B*Math.cos(M)),a+U*Math.sin(A),u-B*Math.cos(A),a,u];if(p)return G;I&&(G=G.concat(I));for(var N=0;N7&&(t.push(v.splice(0,7)),v.unshift("C"));break;case"S":var g=p,m=c;l!="C"&&l!="S"||(g+=g-i,m+=m-r),v=["C",g,m,v[1],v[2],v[3],v[4]];break;case"T":l=="Q"||l=="T"?(a=2*p-a,u=2*c-u):(a=p,u=c),v=w(p,c,a,u,v[1],v[2]);break;case"Q":a=v[1],u=v[2],v=w(p,c,v[1],v[2],v[3],v[4]);break;case"L":v=_(p,c,v[1],v[2]);break;case"H":v=_(p,c,v[1],c);break;case"V":v=_(p,c,p,v[1]);break;case"Z":v=_(p,c,n,o)}l=x,p=v[v.length-2],c=v[v.length-1],v.length>4?(i=v[v.length-4],r=v[v.length-3]):(i=p,r=c),t.push(v)}return t}},56131:function(D){var E=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;function w(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}D.exports=function(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var T={},y=0;y<10;y++)T["_"+String.fromCharCode(y)]=y;if(Object.getOwnPropertyNames(T).map(function(l){return T[l]}).join("")!=="0123456789")return!1;var f={};return"abcdefghijklmnopqrst".split("").forEach(function(l){f[l]=l}),Object.keys(Object.assign({},f)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}()?Object.assign:function(s,T){for(var y,f,l=w(s),t=1;t"u")return!1;for(var o in window)try{if(!r["$"+o]&&w.call(window,o)&&window[o]!==null&&typeof window[o]=="object")try{i(window[o])}catch{return!0}}catch{return!0}return!1}();_=function(o){var a=o!==null&&typeof o=="object",u=s.call(o)==="[object Function]",p=T(o),c=a&&s.call(o)==="[object String]",b=[];if(!a&&!u&&!p)throw new TypeError("Object.keys called on a non-object");var d=l&&u;if(c&&o.length>0&&!w.call(o,0))for(var v=0;v0)for(var x=0;x"u"||!n)return i(h);try{return i(h)}catch{return!1}}(o),k=0;k=0&&E.call(e.callee)==="[object Function]"),w}},88641:function(D){function E(w,s){if(typeof w!="string")return[w];var T=[w];typeof s=="string"||Array.isArray(s)?s={brackets:s}:s||(s={});var y=s.brackets?Array.isArray(s.brackets)?s.brackets:[s.brackets]:["{}","[]","()"],f=s.escape||"___",l=!!s.flat;y.forEach(function(i){var r=new RegExp(["\\",i[0],"[^\\",i[0],"\\",i[1],"]*\\",i[1]].join("")),n=[];function o(a,u,p){var c=T.push(a.slice(i[0].length,-i[1].length))-1;return n.push(c),f+c+f}T.forEach(function(a,u){for(var p,c=0;a!=p;)if(p=a,a=a.replace(r,o),c++>1e4)throw Error("References have circular dependency. Please, check them.");T[u]=a}),n=n.reverse(),T=T.map(function(a){return n.forEach(function(u){a=a.replace(new RegExp("(\\"+f+u+"\\"+f+")","g"),i[0]+"$1"+i[1])}),a})});var t=new RegExp("\\"+f+"([0-9]+)\\"+f);return l?T:function i(r,n,o){for(var a,u=[],p=0;a=t.exec(r);){if(p++>1e4)throw Error("Circular references in parenthesis");u.push(r.slice(0,a.index)),u.push(i(n[a[1]],n)),r=r.slice(a.index+a[0].length)}return u.push(r),u}(T[0],T)}function e(w,s){if(s&&s.flat){var T,y=s&&s.escape||"___",f=w[0];if(!f)return"";for(var l=new RegExp("\\"+y+"([0-9]+)\\"+y),t=0;f!=T;){if(t++>1e4)throw Error("Circular references in "+w);T=f,f=f.replace(l,i)}return f}return w.reduce(function r(n,o){return Array.isArray(o)&&(o=o.reduce(r,"")),n+o},"");function i(r,n){if(w[n]==null)throw Error("Reference "+n+"is undefined");return w[n]}}function _(w,s){return Array.isArray(w)?e(w,s):E(w,s)}_.parse=E,_.stringify=e,D.exports=_},18863:function(D,E,e){var _=e(71299);D.exports=function(w){var s;return arguments.length>1&&(w=arguments),typeof w=="string"?w=w.split(/\s/).map(parseFloat):typeof w=="number"&&(w=[w]),w.length&&typeof w[0]=="number"?s=w.length===1?{width:w[0],height:w[0],x:0,y:0}:w.length===2?{width:w[0],height:w[1],x:0,y:0}:{x:w[0],y:w[1],width:w[2]-w[0]||0,height:w[3]-w[1]||0}:w&&(s={x:(w=_(w,{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"})).left||0,y:w.top||0},w.width==null?w.right?s.width=w.right-s.x:s.width=0:s.width=w.width,w.height==null?w.bottom?s.height=w.bottom-s.y:s.height=0:s.height=w.height),s}},95616:function(D){D.exports=function(w){var s=[];return w.replace(e,function(T,y,f){var l=y.toLowerCase();for(f=function(t){var i=t.match(_);return i?i.map(Number):[]}(f),l=="m"&&f.length>2&&(s.push([y].concat(f.splice(0,2))),l="l",y=y=="m"?"l":"L");;){if(f.length==E[l])return f.unshift(y),s.push(f);if(f.lengthT!=o>T&&s<(n-i)*(T-r)/(o-r)+i&&(y=!y)}return y}},52142:function(D,E,e){var _,w=e(69444),s=e(29023),T=e(87263),y=e(11328),f=e(55968),l=e(10670),t=!1,i=s();function r(n,o,a){var u=_.segments(n),p=_.segments(o),c=a(_.combine(u,p));return _.polygon(c)}_={buildLog:function(n){return n===!0?t=w():n===!1&&(t=!1),t!==!1&&t.list},epsilon:function(n){return i.epsilon(n)},segments:function(n){var o=T(!0,i,t);return n.regions.forEach(o.addRegion),{segments:o.calculate(n.inverted),inverted:n.inverted}},combine:function(n,o){return{combined:T(!1,i,t).calculate(n.segments,n.inverted,o.segments,o.inverted),inverted1:n.inverted,inverted2:o.inverted}},selectUnion:function(n){return{segments:f.union(n.combined,t),inverted:n.inverted1||n.inverted2}},selectIntersect:function(n){return{segments:f.intersect(n.combined,t),inverted:n.inverted1&&n.inverted2}},selectDifference:function(n){return{segments:f.difference(n.combined,t),inverted:n.inverted1&&!n.inverted2}},selectDifferenceRev:function(n){return{segments:f.differenceRev(n.combined,t),inverted:!n.inverted1&&n.inverted2}},selectXor:function(n){return{segments:f.xor(n.combined,t),inverted:n.inverted1!==n.inverted2}},polygon:function(n){return{regions:y(n.segments,i,t),inverted:n.inverted}},polygonFromGeoJSON:function(n){return l.toPolygon(_,n)},polygonToGeoJSON:function(n){return l.fromPolygon(_,i,n)},union:function(n,o){return r(n,o,_.selectUnion)},intersect:function(n,o){return r(n,o,_.selectIntersect)},difference:function(n,o){return r(n,o,_.selectDifference)},differenceRev:function(n,o){return r(n,o,_.selectDifferenceRev)},xor:function(n,o){return r(n,o,_.selectXor)}},typeof window=="object"&&(window.PolyBool=_),D.exports=_},69444:function(D){D.exports=function(){var E,e=0,_=!1;function w(s,T){return E.list.push({type:s,data:T?JSON.parse(JSON.stringify(T)):void 0}),E}return E={list:[],segmentId:function(){return e++},checkIntersection:function(s,T){return w("check",{seg1:s,seg2:T})},segmentChop:function(s,T){return w("div_seg",{seg:s,pt:T}),w("chop",{seg:s,pt:T})},statusRemove:function(s){return w("pop_seg",{seg:s})},segmentUpdate:function(s){return w("seg_update",{seg:s})},segmentNew:function(s,T){return w("new_seg",{seg:s,primary:T})},segmentRemove:function(s){return w("rem_seg",{seg:s})},tempStatus:function(s,T,y){return w("temp_status",{seg:s,above:T,below:y})},rewind:function(s){return w("rewind",{seg:s})},status:function(s,T,y){return w("status",{seg:s,above:T,below:y})},vert:function(s){return s===_?E:(_=s,w("vert",{x:s}))},log:function(s){return typeof s!="string"&&(s=JSON.stringify(s,!1," ")),w("log",{txt:s})},reset:function(){return w("reset")},selected:function(s){return w("selected",{segs:s})},chainStart:function(s){return w("chain_start",{seg:s})},chainRemoveHead:function(s,T){return w("chain_rem_head",{index:s,pt:T})},chainRemoveTail:function(s,T){return w("chain_rem_tail",{index:s,pt:T})},chainNew:function(s,T){return w("chain_new",{pt1:s,pt2:T})},chainMatch:function(s){return w("chain_match",{index:s})},chainClose:function(s){return w("chain_close",{index:s})},chainAddHead:function(s,T){return w("chain_add_head",{index:s,pt:T})},chainAddTail:function(s,T){return w("chain_add_tail",{index:s,pt:T})},chainConnect:function(s,T){return w("chain_con",{index1:s,index2:T})},chainReverse:function(s){return w("chain_rev",{index:s})},chainJoin:function(s,T){return w("chain_join",{index1:s,index2:T})},done:function(){return w("done")}}}},29023:function(D){D.exports=function(E){typeof E!="number"&&(E=1e-10);var e={epsilon:function(_){return typeof _=="number"&&(E=_),E},pointAboveOrOnLine:function(_,w,s){var T=w[0],y=w[1],f=s[0],l=s[1],t=_[0];return(f-T)*(_[1]-y)-(l-y)*(t-T)>=-E},pointBetween:function(_,w,s){var T=_[1]-w[1],y=s[0]-w[0],f=_[0]-w[0],l=s[1]-w[1],t=f*y+T*l;return!(t-E)},pointsSameX:function(_,w){return Math.abs(_[0]-w[0])E!=f-T>E&&(y-i)*(T-r)/(f-r)+i-s>E&&(l=!l),y=i,f=r}return l}};return e}},10670:function(D){var E={toPolygon:function(e,_){function w(y){if(y.length<=0)return e.segments({inverted:!1,regions:[]});function f(i){var r=i.slice(0,i.length-1);return e.segments({inverted:!1,regions:[r]})}for(var l=f(y[0]),t=1;t0})}function p(C,L){var O=C.seg,I=L.seg,R=O.start,U=O.end,B=I.start,G=I.end;T&&T.checkIntersection(O,I);var N=s.linesIntersect(R,U,B,G);if(N===!1){if(!s.pointsCollinear(R,U,B)||s.pointsSame(R,G)||s.pointsSame(U,B))return!1;var j=s.pointsSame(R,B),V=s.pointsSame(U,G);if(j&&V)return L;var H=!j&&s.pointBetween(R,B,G),ee=!V&&s.pointBetween(U,B,G);if(j)return ee?i(L,U):i(C,G),L;H&&(V||(ee?i(L,U):i(C,G)),i(L,R))}else N.alongA===0&&(N.alongB===-1?i(C,B):N.alongB===0?i(C,N.pt):N.alongB===1&&i(C,G)),N.alongB===0&&(N.alongA===-1?i(L,R):N.alongA===0?i(L,N.pt):N.alongA===1&&i(L,U));return!1}for(var c=[];!f.isEmpty();){var b=f.getHead();if(T&&T.vert(b.pt[0]),b.isStart){let C=function(){if(v){var L=p(b,v);if(L)return L}return!!x&&p(b,x)};var A=C;T&&T.segmentNew(b.seg,b.primary);var d=u(b),v=d.before?d.before.ev:null,x=d.after?d.after.ev:null;T&&T.tempStatus(b.seg,!!v&&v.seg,!!x&&x.seg);var g,m,k=C();if(k&&(w?(m=b.seg.myFill.below===null||b.seg.myFill.above!==b.seg.myFill.below)&&(k.seg.myFill.above=!k.seg.myFill.above):k.seg.otherFill=b.seg.myFill,T&&T.segmentUpdate(k.seg),b.other.remove(),b.remove()),f.getHead()!==b){T&&T.rewind(b.seg);continue}w?(m=b.seg.myFill.below===null||b.seg.myFill.above!==b.seg.myFill.below,b.seg.myFill.below=x?x.seg.myFill.above:n,b.seg.myFill.above=m?!b.seg.myFill.below:b.seg.myFill.below):b.seg.otherFill===null&&(g=x?b.primary===x.primary?x.seg.otherFill.above:x.seg.myFill.above:b.primary?o:n,b.seg.otherFill={above:g,below:g}),T&&T.status(b.seg,!!v&&v.seg,!!x&&x.seg),b.other.status=d.insert(_.node({ev:b}))}else{var h=b.status;if(h===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(a.exists(h.prev)&&a.exists(h.next)&&p(h.prev.ev,h.next.ev),T&&T.statusRemove(h.ev.seg),h.remove(),!b.primary){var M=b.seg.myFill;b.seg.myFill=b.seg.otherFill,b.seg.otherFill=M}c.push(b.seg)}f.getHead().remove()}return T&&T.done(),c}return w?{addRegion:function(n){for(var o,a,u,p=n[n.length-1],c=0;c0&&!this.aborted;){var T=this.ifds_to_read.shift();T.offset&&this.scan_ifd(T.id,T.offset,w)}},_.prototype.read_uint16=function(w){var s=this.input;if(w+2>s.length)throw E("unexpected EOF","EBADDATA");return this.big_endian?256*s[w]+s[w+1]:s[w]+256*s[w+1]},_.prototype.read_uint32=function(w){var s=this.input;if(w+4>s.length)throw E("unexpected EOF","EBADDATA");return this.big_endian?16777216*s[w]+65536*s[w+1]+256*s[w+2]+s[w+3]:s[w]+256*s[w+1]+65536*s[w+2]+16777216*s[w+3]},_.prototype.is_subifd_link=function(w,s){return w===0&&s===34665||w===0&&s===34853||w===34665&&s===40965},_.prototype.exif_format_length=function(w){switch(w){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}},_.prototype.exif_format_read=function(w,s){var T;switch(w){case 1:case 2:return this.input[s];case 6:return(T=this.input[s])|33554430*(128&T);case 3:return this.read_uint16(s);case 8:return(T=this.read_uint16(s))|131070*(32768&T);case 4:return this.read_uint32(s);case 9:return 0|this.read_uint32(s);default:return null}},_.prototype.scan_ifd=function(w,s,T){var y=this.read_uint16(s);s+=2;for(var f=0;fthis.input.length)throw E("unexpected EOF","EBADDATA");for(var u=[],p=o,c=0;c0&&(this.ifds_to_read.push({id:l,offset:u[0]}),a=!0),T({is_big_endian:this.big_endian,ifd:w,tag:l,format:t,count:i,entry_offset:s+this.start,data_length:n,data_offset:o+this.start,value:u,is_subifd_link:a})===!1)return void(this.aborted=!0);s+=12}w===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(s)})},D.exports.ExifParser=_,D.exports.get_orientation=function(w){var s=0;try{return new _(w,0,w.length).each(function(T){if(T.ifd===0&&T.tag===274&&Array.isArray(T.value))return s=T.value[0],!1}),s}catch{return-1}}},76767:function(D,E,e){var _=e(14847).n8,w=e(14847).Ag;function s(i,r){if(i.length<4+r)return null;var n=w(i,r);return i.length>4&15,o=15&i[4],a=i[5]>>4&15,u=_(i,6),p=8,c=0;cd.width||b.width===d.width&&b.height>d.height?b:d}),a=n.reduce(function(b,d){return b.height>d.height||b.height===d.height&&b.width>d.width?b:d}),o.width>a.height||o.width===a.height&&o.height>a.width?o:a),p=1;r.transforms.forEach(function(b){var d={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},v={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(b.type==="imir"&&(p=b.value===0?v[p]:d[p=d[p=v[p]]]),b.type==="irot")for(var x=0;x1&&(u.variants=a.variants),a.orientation&&(u.orientation=a.orientation),a.exif_location&&a.exif_location.offset+a.exif_location.length<=l.length){var p=s(l,a.exif_location.offset),c=l.slice(a.exif_location.offset+p+4,a.exif_location.offset+a.exif_location.length),b=y.get_orientation(c);b>0&&(u.orientation=b)}return u}}}}}}},2504:function(D,E,e){var _=e(14847).eG,w=e(14847).OF,s=e(14847).mP,T=_("BM");D.exports=function(y){if(!(y.length<26)&&w(y,0,T))return{width:s(y,18),height:s(y,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}},47342:function(D,E,e){var _=e(14847).eG,w=e(14847).OF,s=e(14847).mP,T=_("GIF87a"),y=_("GIF89a");D.exports=function(f){if(!(f.length<10)&&(w(f,0,T)||w(f,0,y)))return{width:s(f,6),height:s(f,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}},31355:function(D,E,e){var _=e(14847).mP;D.exports=function(w){var s=_(w,0),T=_(w,2),y=_(w,4);if(s===0&&T===1&&y){for(var f=[],l={width:0,height:0},t=0;tl.width||r>l.height)&&(l=n)}return{width:l.width,height:l.height,variants:f,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}},54261:function(D,E,e){var _=e(14847).n8,w=e(14847).eG,s=e(14847).OF,T=e(71371),y=w("Exif\0\0");D.exports=function(f){if(!(f.length<2)&&f[0]===255&&f[1]===216&&f[2]===255)for(var l=2;;){for(;;){if(f.length-l<2)return;if(f[l++]===255)break}for(var t,i,r=f[l++];r===255;)r=f[l++];if(208<=r&&r<=217||r===1)t=0;else{if(!(192<=r&&r<=254)||f.length-l<2)return;t=_(f,l)-2,l+=2}if(r===217||r===218)return;if(r===225&&t>=10&&s(f,l,y)&&(i=T.get_orientation(f.slice(l+6,l+t))),t>=5&&192<=r&&r<=207&&r!==196&&r!==200&&r!==204){if(f.length-l0&&(n.orientation=i),n}l+=t}}},6303:function(D,E,e){var _=e(14847).eG,w=e(14847).OF,s=e(14847).Ag,T=_(`‰PNG\r +`),wt=ze.createShader(ze.FRAGMENT_SHADER);if(ze.isContextLost())this.failedToCreate=!0;else{ze.shaderSource(wt,Xe),ze.compileShader(wt),ze.attachShader(this.program,wt);var At=ze.createShader(ze.VERTEX_SHADER);if(ze.isContextLost())this.failedToCreate=!0;else{ze.shaderSource(At,at),ze.compileShader(At),ze.attachShader(this.program,At);for(var re=W?W.layoutAttributes:[],ve=0;ve>16,Xe>>16],u_pixel_coord_lower:[65535&He,65535&Xe]}}bo.prototype.draw=function(q,$,W,ie,_e,ze,He,Xe,at,wt,At,re,ve,Le,Fe,Ve){var We,$e=q.gl;if(!this.failedToCreate){for(var tt in q.program.set(this.program),q.setDepthMode(W),q.setStencilMode(ie),q.setColorMode(_e),q.setCullFace(ze),this.fixedUniforms)this.fixedUniforms[tt].set(He[tt]);Le&&Le.setUniforms(q,this.binderUniforms,re,{zoom:ve});for(var lt=(We={},We[$e.LINES]=2,We[$e.TRIANGLES]=3,We[$e.LINE_STRIP]=1,We)[$],gt=0,zt=At.get();gt0?1-1/(1.001-He):-He),u_contrast_factor:(ze=_e.paint.get("raster-contrast"),ze>0?1/(1-ze):1+ze),u_spin_weights:Ps(_e.paint.get("raster-hue-rotate"))};var ze,He};function Ps(q){q*=Math.PI/180;var $=Math.sin(q),W=Math.cos(q);return[(2*W+1)/3,(-Math.sqrt(3)*$-W+1)/3,(Math.sqrt(3)*$-W+1)/3]}var Qo,hi=function(q,$,W,ie,_e,ze,He,Xe,at,wt){var At=_e.transform;return{u_is_size_zoom_constant:+(q==="constant"||q==="source"),u_is_size_feature_constant:+(q==="constant"||q==="camera"),u_size_t:$?$.uSizeT:0,u_size:$?$.uSize:0,u_camera_to_center_distance:At.cameraToCenterDistance,u_pitch:At.pitch/360*2*Math.PI,u_rotate_symbol:+W,u_aspect_ratio:At.width/At.height,u_fade_change:_e.options.fadeDuration?_e.symbolFadeChange:1,u_matrix:ze,u_label_plane_matrix:He,u_coord_matrix:Xe,u_is_text:+at,u_pitch_with_map:+ie,u_texsize:wt,u_texture:0}},ds=function(q,$,W,ie,_e,ze,He,Xe,at,wt,At){var re=_e.transform;return s.extend(hi(q,$,W,ie,_e,ze,He,Xe,at,wt),{u_gamma_scale:ie?Math.cos(re._pitch)*re.cameraToCenterDistance:1,u_device_pixel_ratio:s.browser.devicePixelRatio,u_is_halo:+At})},Cc=function(q,$,W,ie,_e,ze,He,Xe,at,wt){return s.extend(ds(q,$,W,ie,_e,ze,He,Xe,!0,at,!0),{u_texsize_icon:wt,u_texture_icon:1})},Hl=function(q,$,W){return{u_matrix:q,u_opacity:$,u_color:W}},bl=function(q,$,W,ie,_e,ze){return s.extend(function(He,Xe,at,wt){var At=at.imageManager.getPattern(He.from.toString()),re=at.imageManager.getPattern(He.to.toString()),ve=at.imageManager.getPixelSize(),Le=ve.width,Fe=ve.height,Ve=Math.pow(2,wt.tileID.overscaledZ),We=wt.tileSize*Math.pow(2,at.transform.tileZoom)/Ve,$e=We*(wt.tileID.canonical.x+wt.tileID.wrap*Ve),tt=We*wt.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:At.tl,u_pattern_br_a:At.br,u_pattern_tl_b:re.tl,u_pattern_br_b:re.br,u_texsize:[Le,Fe],u_mix:Xe.t,u_pattern_size_a:At.displaySize,u_pattern_size_b:re.displaySize,u_scale_a:Xe.fromScale,u_scale_b:Xe.toScale,u_tile_units_to_pixels:1/dr(wt,1,at.transform.tileZoom),u_pixel_coord_upper:[$e>>16,tt>>16],u_pixel_coord_lower:[65535&$e,65535&tt]}}(ie,ze,W,_e),{u_matrix:q,u_opacity:$})},Os={fillExtrusion:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_lightpos:new s.Uniform3f(q,$.u_lightpos),u_lightintensity:new s.Uniform1f(q,$.u_lightintensity),u_lightcolor:new s.Uniform3f(q,$.u_lightcolor),u_vertical_gradient:new s.Uniform1f(q,$.u_vertical_gradient),u_opacity:new s.Uniform1f(q,$.u_opacity)}},fillExtrusionPattern:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_lightpos:new s.Uniform3f(q,$.u_lightpos),u_lightintensity:new s.Uniform1f(q,$.u_lightintensity),u_lightcolor:new s.Uniform3f(q,$.u_lightcolor),u_vertical_gradient:new s.Uniform1f(q,$.u_vertical_gradient),u_height_factor:new s.Uniform1f(q,$.u_height_factor),u_image:new s.Uniform1i(q,$.u_image),u_texsize:new s.Uniform2f(q,$.u_texsize),u_pixel_coord_upper:new s.Uniform2f(q,$.u_pixel_coord_upper),u_pixel_coord_lower:new s.Uniform2f(q,$.u_pixel_coord_lower),u_scale:new s.Uniform3f(q,$.u_scale),u_fade:new s.Uniform1f(q,$.u_fade),u_opacity:new s.Uniform1f(q,$.u_opacity)}},fill:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix)}},fillPattern:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_image:new s.Uniform1i(q,$.u_image),u_texsize:new s.Uniform2f(q,$.u_texsize),u_pixel_coord_upper:new s.Uniform2f(q,$.u_pixel_coord_upper),u_pixel_coord_lower:new s.Uniform2f(q,$.u_pixel_coord_lower),u_scale:new s.Uniform3f(q,$.u_scale),u_fade:new s.Uniform1f(q,$.u_fade)}},fillOutline:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_world:new s.Uniform2f(q,$.u_world)}},fillOutlinePattern:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_world:new s.Uniform2f(q,$.u_world),u_image:new s.Uniform1i(q,$.u_image),u_texsize:new s.Uniform2f(q,$.u_texsize),u_pixel_coord_upper:new s.Uniform2f(q,$.u_pixel_coord_upper),u_pixel_coord_lower:new s.Uniform2f(q,$.u_pixel_coord_lower),u_scale:new s.Uniform3f(q,$.u_scale),u_fade:new s.Uniform1f(q,$.u_fade)}},circle:function(q,$){return{u_camera_to_center_distance:new s.Uniform1f(q,$.u_camera_to_center_distance),u_scale_with_map:new s.Uniform1i(q,$.u_scale_with_map),u_pitch_with_map:new s.Uniform1i(q,$.u_pitch_with_map),u_extrude_scale:new s.Uniform2f(q,$.u_extrude_scale),u_device_pixel_ratio:new s.Uniform1f(q,$.u_device_pixel_ratio),u_matrix:new s.UniformMatrix4f(q,$.u_matrix)}},collisionBox:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_camera_to_center_distance:new s.Uniform1f(q,$.u_camera_to_center_distance),u_pixels_to_tile_units:new s.Uniform1f(q,$.u_pixels_to_tile_units),u_extrude_scale:new s.Uniform2f(q,$.u_extrude_scale),u_overscale_factor:new s.Uniform1f(q,$.u_overscale_factor)}},collisionCircle:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_inv_matrix:new s.UniformMatrix4f(q,$.u_inv_matrix),u_camera_to_center_distance:new s.Uniform1f(q,$.u_camera_to_center_distance),u_viewport_size:new s.Uniform2f(q,$.u_viewport_size)}},debug:function(q,$){return{u_color:new s.UniformColor(q,$.u_color),u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_overlay:new s.Uniform1i(q,$.u_overlay),u_overlay_scale:new s.Uniform1f(q,$.u_overlay_scale)}},clippingMask:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix)}},heatmap:function(q,$){return{u_extrude_scale:new s.Uniform1f(q,$.u_extrude_scale),u_intensity:new s.Uniform1f(q,$.u_intensity),u_matrix:new s.UniformMatrix4f(q,$.u_matrix)}},heatmapTexture:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_world:new s.Uniform2f(q,$.u_world),u_image:new s.Uniform1i(q,$.u_image),u_color_ramp:new s.Uniform1i(q,$.u_color_ramp),u_opacity:new s.Uniform1f(q,$.u_opacity)}},hillshade:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_image:new s.Uniform1i(q,$.u_image),u_latrange:new s.Uniform2f(q,$.u_latrange),u_light:new s.Uniform2f(q,$.u_light),u_shadow:new s.UniformColor(q,$.u_shadow),u_highlight:new s.UniformColor(q,$.u_highlight),u_accent:new s.UniformColor(q,$.u_accent)}},hillshadePrepare:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_image:new s.Uniform1i(q,$.u_image),u_dimension:new s.Uniform2f(q,$.u_dimension),u_zoom:new s.Uniform1f(q,$.u_zoom),u_maxzoom:new s.Uniform1f(q,$.u_maxzoom),u_unpack:new s.Uniform4f(q,$.u_unpack)}},line:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_ratio:new s.Uniform1f(q,$.u_ratio),u_device_pixel_ratio:new s.Uniform1f(q,$.u_device_pixel_ratio),u_units_to_pixels:new s.Uniform2f(q,$.u_units_to_pixels)}},lineGradient:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_ratio:new s.Uniform1f(q,$.u_ratio),u_device_pixel_ratio:new s.Uniform1f(q,$.u_device_pixel_ratio),u_units_to_pixels:new s.Uniform2f(q,$.u_units_to_pixels),u_image:new s.Uniform1i(q,$.u_image)}},linePattern:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_texsize:new s.Uniform2f(q,$.u_texsize),u_ratio:new s.Uniform1f(q,$.u_ratio),u_device_pixel_ratio:new s.Uniform1f(q,$.u_device_pixel_ratio),u_image:new s.Uniform1i(q,$.u_image),u_units_to_pixels:new s.Uniform2f(q,$.u_units_to_pixels),u_scale:new s.Uniform3f(q,$.u_scale),u_fade:new s.Uniform1f(q,$.u_fade)}},lineSDF:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_ratio:new s.Uniform1f(q,$.u_ratio),u_device_pixel_ratio:new s.Uniform1f(q,$.u_device_pixel_ratio),u_units_to_pixels:new s.Uniform2f(q,$.u_units_to_pixels),u_patternscale_a:new s.Uniform2f(q,$.u_patternscale_a),u_patternscale_b:new s.Uniform2f(q,$.u_patternscale_b),u_sdfgamma:new s.Uniform1f(q,$.u_sdfgamma),u_image:new s.Uniform1i(q,$.u_image),u_tex_y_a:new s.Uniform1f(q,$.u_tex_y_a),u_tex_y_b:new s.Uniform1f(q,$.u_tex_y_b),u_mix:new s.Uniform1f(q,$.u_mix)}},raster:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_tl_parent:new s.Uniform2f(q,$.u_tl_parent),u_scale_parent:new s.Uniform1f(q,$.u_scale_parent),u_buffer_scale:new s.Uniform1f(q,$.u_buffer_scale),u_fade_t:new s.Uniform1f(q,$.u_fade_t),u_opacity:new s.Uniform1f(q,$.u_opacity),u_image0:new s.Uniform1i(q,$.u_image0),u_image1:new s.Uniform1i(q,$.u_image1),u_brightness_low:new s.Uniform1f(q,$.u_brightness_low),u_brightness_high:new s.Uniform1f(q,$.u_brightness_high),u_saturation_factor:new s.Uniform1f(q,$.u_saturation_factor),u_contrast_factor:new s.Uniform1f(q,$.u_contrast_factor),u_spin_weights:new s.Uniform3f(q,$.u_spin_weights)}},symbolIcon:function(q,$){return{u_is_size_zoom_constant:new s.Uniform1i(q,$.u_is_size_zoom_constant),u_is_size_feature_constant:new s.Uniform1i(q,$.u_is_size_feature_constant),u_size_t:new s.Uniform1f(q,$.u_size_t),u_size:new s.Uniform1f(q,$.u_size),u_camera_to_center_distance:new s.Uniform1f(q,$.u_camera_to_center_distance),u_pitch:new s.Uniform1f(q,$.u_pitch),u_rotate_symbol:new s.Uniform1i(q,$.u_rotate_symbol),u_aspect_ratio:new s.Uniform1f(q,$.u_aspect_ratio),u_fade_change:new s.Uniform1f(q,$.u_fade_change),u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_label_plane_matrix:new s.UniformMatrix4f(q,$.u_label_plane_matrix),u_coord_matrix:new s.UniformMatrix4f(q,$.u_coord_matrix),u_is_text:new s.Uniform1i(q,$.u_is_text),u_pitch_with_map:new s.Uniform1i(q,$.u_pitch_with_map),u_texsize:new s.Uniform2f(q,$.u_texsize),u_texture:new s.Uniform1i(q,$.u_texture)}},symbolSDF:function(q,$){return{u_is_size_zoom_constant:new s.Uniform1i(q,$.u_is_size_zoom_constant),u_is_size_feature_constant:new s.Uniform1i(q,$.u_is_size_feature_constant),u_size_t:new s.Uniform1f(q,$.u_size_t),u_size:new s.Uniform1f(q,$.u_size),u_camera_to_center_distance:new s.Uniform1f(q,$.u_camera_to_center_distance),u_pitch:new s.Uniform1f(q,$.u_pitch),u_rotate_symbol:new s.Uniform1i(q,$.u_rotate_symbol),u_aspect_ratio:new s.Uniform1f(q,$.u_aspect_ratio),u_fade_change:new s.Uniform1f(q,$.u_fade_change),u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_label_plane_matrix:new s.UniformMatrix4f(q,$.u_label_plane_matrix),u_coord_matrix:new s.UniformMatrix4f(q,$.u_coord_matrix),u_is_text:new s.Uniform1i(q,$.u_is_text),u_pitch_with_map:new s.Uniform1i(q,$.u_pitch_with_map),u_texsize:new s.Uniform2f(q,$.u_texsize),u_texture:new s.Uniform1i(q,$.u_texture),u_gamma_scale:new s.Uniform1f(q,$.u_gamma_scale),u_device_pixel_ratio:new s.Uniform1f(q,$.u_device_pixel_ratio),u_is_halo:new s.Uniform1i(q,$.u_is_halo)}},symbolTextAndIcon:function(q,$){return{u_is_size_zoom_constant:new s.Uniform1i(q,$.u_is_size_zoom_constant),u_is_size_feature_constant:new s.Uniform1i(q,$.u_is_size_feature_constant),u_size_t:new s.Uniform1f(q,$.u_size_t),u_size:new s.Uniform1f(q,$.u_size),u_camera_to_center_distance:new s.Uniform1f(q,$.u_camera_to_center_distance),u_pitch:new s.Uniform1f(q,$.u_pitch),u_rotate_symbol:new s.Uniform1i(q,$.u_rotate_symbol),u_aspect_ratio:new s.Uniform1f(q,$.u_aspect_ratio),u_fade_change:new s.Uniform1f(q,$.u_fade_change),u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_label_plane_matrix:new s.UniformMatrix4f(q,$.u_label_plane_matrix),u_coord_matrix:new s.UniformMatrix4f(q,$.u_coord_matrix),u_is_text:new s.Uniform1i(q,$.u_is_text),u_pitch_with_map:new s.Uniform1i(q,$.u_pitch_with_map),u_texsize:new s.Uniform2f(q,$.u_texsize),u_texsize_icon:new s.Uniform2f(q,$.u_texsize_icon),u_texture:new s.Uniform1i(q,$.u_texture),u_texture_icon:new s.Uniform1i(q,$.u_texture_icon),u_gamma_scale:new s.Uniform1f(q,$.u_gamma_scale),u_device_pixel_ratio:new s.Uniform1f(q,$.u_device_pixel_ratio),u_is_halo:new s.Uniform1i(q,$.u_is_halo)}},background:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_opacity:new s.Uniform1f(q,$.u_opacity),u_color:new s.UniformColor(q,$.u_color)}},backgroundPattern:function(q,$){return{u_matrix:new s.UniformMatrix4f(q,$.u_matrix),u_opacity:new s.Uniform1f(q,$.u_opacity),u_image:new s.Uniform1i(q,$.u_image),u_pattern_tl_a:new s.Uniform2f(q,$.u_pattern_tl_a),u_pattern_br_a:new s.Uniform2f(q,$.u_pattern_br_a),u_pattern_tl_b:new s.Uniform2f(q,$.u_pattern_tl_b),u_pattern_br_b:new s.Uniform2f(q,$.u_pattern_br_b),u_texsize:new s.Uniform2f(q,$.u_texsize),u_mix:new s.Uniform1f(q,$.u_mix),u_pattern_size_a:new s.Uniform2f(q,$.u_pattern_size_a),u_pattern_size_b:new s.Uniform2f(q,$.u_pattern_size_b),u_scale_a:new s.Uniform1f(q,$.u_scale_a),u_scale_b:new s.Uniform1f(q,$.u_scale_b),u_pixel_coord_upper:new s.Uniform2f(q,$.u_pixel_coord_upper),u_pixel_coord_lower:new s.Uniform2f(q,$.u_pixel_coord_lower),u_tile_units_to_pixels:new s.Uniform1f(q,$.u_tile_units_to_pixels)}}};function Qs(q,$,W,ie,_e,ze,He){for(var Xe=q.context,at=Xe.gl,wt=q.useProgram("collisionBox"),At=[],re=0,ve=0,Le=0;Le0){var gt=s.create(),zt=$e;s.mul(gt,We.placementInvProjMatrix,q.transform.glCoordMatrix),s.mul(gt,gt,We.placementViewportMatrix),At.push({circleArray:lt,circleOffset:ve,transform:zt,invTransform:gt}),ve=re+=lt.length/4}tt&&wt.draw(Xe,at.LINES,qt.disabled,Je.disabled,q.colorModeForRenderPass(),Ge.disabled,Gu($e,q.transform,Ve),W.id,tt.layoutVertexBuffer,tt.indexBuffer,tt.segments,null,q.transform.zoom,null,null,tt.collisionVertexBuffer)}}if(He&&At.length){var Ut=q.useProgram("collisionCircle"),Vt=new s.StructArrayLayout2f1f2i16;Vt.resize(4*re),Vt._trim();for(var Qt=0,gn=0,en=At;gn=0&&(Fe[We.associatedIconIndex]={shiftedAnchor:en,angle:sn})}else tr(We.numGlyphs,ve)}if(At){Le.clear();for(var Mn=q.icon.placedSymbolArray,xn=0;xn0){var He=s.browser.now(),Xe=(He-q.timeAdded)/ze,at=$?(He-$.timeAdded)/ze:-1,wt=W.getSource(),At=_e.coveringZoomLevel({tileSize:wt.tileSize,roundZoom:wt.roundZoom}),re=!$||Math.abs($.tileID.overscaledZ-At)>Math.abs(q.tileID.overscaledZ-At),ve=re&&q.refreshedUponExpiration?1:s.clamp(re?Xe:1-at,0,1);return q.refreshedUponExpiration&&Xe>=1&&(q.refreshedUponExpiration=!1),$?{opacity:1,mix:1-ve}:{opacity:ve,mix:0}}return{opacity:1,mix:0}}var Al=new s.Color(1,0,0,1),Ml=new s.Color(0,1,0,1),bu=new s.Color(0,0,1,1),gs=new s.Color(1,0,1,1),ql=new s.Color(0,1,1,1);function Sl(q){var $=q.transform.padding;_u(q,q.transform.height-($.top||0),3,Al),_u(q,$.bottom||0,3,Ml),El(q,$.left||0,3,bu),El(q,q.transform.width-($.right||0),3,gs);var W=q.transform.centerPoint;(function(ie,_e,ze,He){var Xe=20,at=2;nl(ie,_e-at/2,ze-Xe/2,at,Xe,He),nl(ie,_e-Xe/2,ze-at/2,Xe,at,He)})(q,W.x,q.transform.height-W.y,ql)}function _u(q,$,W,ie){nl(q,0,$+W/2,q.transform.width,W,ie)}function El(q,$,W,ie){nl(q,$-W/2,0,W,q.transform.height,ie)}function nl(q,$,W,ie,_e,ze){var He=q.context,Xe=He.gl;Xe.enable(Xe.SCISSOR_TEST),Xe.scissor($*s.browser.devicePixelRatio,W*s.browser.devicePixelRatio,ie*s.browser.devicePixelRatio,_e*s.browser.devicePixelRatio),He.clear({color:ze}),Xe.disable(Xe.SCISSOR_TEST)}function zs(q,$,W){var ie=q.context,_e=ie.gl,ze=W.posMatrix,He=q.useProgram("debug"),Xe=qt.disabled,at=Je.disabled,wt=q.colorModeForRenderPass(),At="$debug";ie.activeTexture.set(_e.TEXTURE0),q.emptyTexture.bind(_e.LINEAR,_e.CLAMP_TO_EDGE),He.draw(ie,_e.LINE_STRIP,Xe,at,wt,Ge.disabled,$o(ze,s.Color.red),At,q.debugBuffer,q.tileBorderIndexBuffer,q.debugSegments);var re=$.getTileByID(W.key).latestRawTileData,ve=re&&re.byteLength||0,Le=Math.floor(ve/1024),Fe=$.getTile(W).tileSize,Ve=512/Math.min(Fe,512)*(W.overscaledZ/q.transform.zoom)*.5,We=W.canonical.toString();W.overscaledZ!==W.canonical.z&&(We+=" => "+W.overscaledZ),function($e,tt){$e.initDebugOverlayCanvas();var lt=$e.debugOverlayCanvas,gt=$e.context.gl,zt=$e.debugOverlayCanvas.getContext("2d");zt.clearRect(0,0,lt.width,lt.height),zt.shadowColor="white",zt.shadowBlur=2,zt.lineWidth=1.5,zt.strokeStyle="white",zt.textBaseline="top",zt.font="bold 36px Open Sans, sans-serif",zt.fillText(tt,5,5),zt.strokeText(tt,5,5),$e.debugOverlayTexture.update(lt),$e.debugOverlayTexture.bind(gt.LINEAR,gt.CLAMP_TO_EDGE)}(q,We+" "+Le+"kb"),He.draw(ie,_e.TRIANGLES,Xe,at,Ke.alphaBlended,Ge.disabled,$o(ze,s.Color.transparent,Ve),At,q.debugBuffer,q.quadTriangleIndexBuffer,q.debugSegments)}var Ds={symbol:function(q,$,W,ie,_e){if(q.renderPass==="translucent"){var ze=Je.disabled,He=q.colorModeForRenderPass();W.layout.get("text-variable-anchor")&&function(Xe,at,wt,At,re,ve,Le){for(var Fe=at.transform,Ve=re==="map",We=ve==="map",$e=0,tt=Xe;$e256&&this.clearStencil(),W.setColorMode(Ke.disabled),W.setDepthMode(qt.disabled);var _e=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var ze=0,He=$;ze256&&this.clearStencil();var q=this.nextStencilID++,$=this.context.gl;return new Je({func:$.NOTEQUAL,mask:255},q,255,$.KEEP,$.KEEP,$.REPLACE)},bi.prototype.stencilModeForClipping=function(q){var $=this.context.gl;return new Je({func:$.EQUAL,mask:255},this._tileClippingMaskIDs[q.key],0,$.KEEP,$.KEEP,$.REPLACE)},bi.prototype.stencilConfigForOverlap=function(q){var $,W=this.context.gl,ie=q.sort(function(at,wt){return wt.overscaledZ-at.overscaledZ}),_e=ie[ie.length-1].overscaledZ,ze=ie[0].overscaledZ-_e+1;if(ze>1){this.currentStencilSource=void 0,this.nextStencilID+ze>256&&this.clearStencil();for(var He={},Xe=0;Xe=0;this.currentLayer--){var zt=this.style._layers[ie[this.currentLayer]],Ut=_e[zt.source],Vt=wt[zt.source];this._renderTileClippingMasks(zt,Vt),this.renderLayer(this,Ut,zt,Vt)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?$.pop():null},bi.prototype.isPatternMissing=function(q){if(!q)return!1;if(!q.from||!q.to)return!0;var $=this.imageManager.getPattern(q.from.toString()),W=this.imageManager.getPattern(q.to.toString());return!$||!W},bi.prototype.useProgram=function(q,$){this.cache=this.cache||{};var W=""+q+($?$.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[W]||(this.cache[W]=new bo(this.context,hs[q],$,Os[q],this._showOverdrawInspector)),this.cache[W]},bi.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()},bi.prototype.setBaseState=function(){var q=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(q.FUNC_ADD)},bi.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=s.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var q=this.context.gl;this.debugOverlayTexture=new s.Texture(this.context,this.debugOverlayCanvas,q.RGBA)}},bi.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var vs=function(q,$){this.points=q,this.planes=$};vs.fromInvProjectionMatrix=function(q,$,W){var ie=Math.pow(2,W),_e=[[-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(function(He){return s.transformMat4([],He,q)}).map(function(He){return s.scale$1([],He,1/He[3]/$*ie)}),ze=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(function(He){var Xe=s.sub([],_e[He[0]],_e[He[1]]),at=s.sub([],_e[He[2]],_e[He[1]]),wt=s.normalize([],s.cross([],Xe,at)),At=-s.dot(wt,_e[He[1]]);return wt.concat(At)});return new vs(_e,ze)};var ms=function(q,$){this.min=q,this.max=$,this.center=s.scale$2([],s.add([],this.min,this.max),.5)};ms.prototype.quadrant=function(q){for(var $=[q%2==0,q<2],W=s.clone$2(this.min),ie=s.clone$2(this.max),_e=0;_e<$.length;_e++)W[_e]=$[_e]?this.min[_e]:this.center[_e],ie[_e]=$[_e]?this.center[_e]:this.max[_e];return ie[2]=this.max[2],new ms(W,ie)},ms.prototype.distanceX=function(q){return Math.max(Math.min(this.max[0],q[0]),this.min[0])-q[0]},ms.prototype.distanceY=function(q){return Math.max(Math.min(this.max[1],q[1]),this.min[1])-q[1]},ms.prototype.intersects=function(q){for(var $=[[this.min[0],this.min[1],0,1],[this.max[0],this.min[1],0,1],[this.max[0],this.max[1],0,1],[this.min[0],this.max[1],0,1]],W=!0,ie=0;ie=0;if(ze===0)return 0;ze!==$.length&&(W=!1)}if(W)return 2;for(var Xe=0;Xe<3;Xe++){for(var at=Number.MAX_VALUE,wt=-Number.MAX_VALUE,At=0;Atthis.max[Xe]-this.min[Xe])return 0}return 1};var ga=function(q,$,W,ie){if(q===void 0&&(q=0),$===void 0&&($=0),W===void 0&&(W=0),ie===void 0&&(ie=0),isNaN(q)||q<0||isNaN($)||$<0||isNaN(W)||W<0||isNaN(ie)||ie<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=q,this.bottom=$,this.left=W,this.right=ie};ga.prototype.interpolate=function(q,$,W){return $.top!=null&&q.top!=null&&(this.top=s.number(q.top,$.top,W)),$.bottom!=null&&q.bottom!=null&&(this.bottom=s.number(q.bottom,$.bottom,W)),$.left!=null&&q.left!=null&&(this.left=s.number(q.left,$.left,W)),$.right!=null&&q.right!=null&&(this.right=s.number(q.right,$.right,W)),this},ga.prototype.getCenter=function(q,$){var W=s.clamp((this.left+q-this.right)/2,0,q),ie=s.clamp((this.top+$-this.bottom)/2,0,$);return new s.Point(W,ie)},ga.prototype.equals=function(q){return this.top===q.top&&this.bottom===q.bottom&&this.left===q.left&&this.right===q.right},ga.prototype.clone=function(){return new ga(this.top,this.bottom,this.left,this.right)},ga.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var oi=function(q,$,W,ie,_e){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=_e===void 0||_e,this._minZoom=q||0,this._maxZoom=$||22,this._minPitch=W??0,this._maxPitch=ie??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new s.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new ga,this._posMatrixCache={},this._alignedPosMatrixCache={}},li={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}};oi.prototype.clone=function(){var q=new oi(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return q.tileSize=this.tileSize,q.latRange=this.latRange,q.width=this.width,q.height=this.height,q._center=this._center,q.zoom=this.zoom,q.angle=this.angle,q._fov=this._fov,q._pitch=this._pitch,q._unmodified=this._unmodified,q._edgeInsets=this._edgeInsets.clone(),q._calcMatrices(),q},li.minZoom.get=function(){return this._minZoom},li.minZoom.set=function(q){this._minZoom!==q&&(this._minZoom=q,this.zoom=Math.max(this.zoom,q))},li.maxZoom.get=function(){return this._maxZoom},li.maxZoom.set=function(q){this._maxZoom!==q&&(this._maxZoom=q,this.zoom=Math.min(this.zoom,q))},li.minPitch.get=function(){return this._minPitch},li.minPitch.set=function(q){this._minPitch!==q&&(this._minPitch=q,this.pitch=Math.max(this.pitch,q))},li.maxPitch.get=function(){return this._maxPitch},li.maxPitch.set=function(q){this._maxPitch!==q&&(this._maxPitch=q,this.pitch=Math.min(this.pitch,q))},li.renderWorldCopies.get=function(){return this._renderWorldCopies},li.renderWorldCopies.set=function(q){q===void 0?q=!0:q===null&&(q=!1),this._renderWorldCopies=q},li.worldSize.get=function(){return this.tileSize*this.scale},li.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},li.size.get=function(){return new s.Point(this.width,this.height)},li.bearing.get=function(){return-this.angle/Math.PI*180},li.bearing.set=function(q){var $=-s.wrap(q,-180,180)*Math.PI/180;this.angle!==$&&(this._unmodified=!1,this.angle=$,this._calcMatrices(),this.rotationMatrix=s.create$2(),s.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},li.pitch.get=function(){return this._pitch/Math.PI*180},li.pitch.set=function(q){var $=s.clamp(q,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==$&&(this._unmodified=!1,this._pitch=$,this._calcMatrices())},li.fov.get=function(){return this._fov/Math.PI*180},li.fov.set=function(q){q=Math.max(.01,Math.min(60,q)),this._fov!==q&&(this._unmodified=!1,this._fov=q/180*Math.PI,this._calcMatrices())},li.zoom.get=function(){return this._zoom},li.zoom.set=function(q){var $=Math.min(Math.max(q,this.minZoom),this.maxZoom);this._zoom!==$&&(this._unmodified=!1,this._zoom=$,this.scale=this.zoomScale($),this.tileZoom=Math.floor($),this.zoomFraction=$-this.tileZoom,this._constrain(),this._calcMatrices())},li.center.get=function(){return this._center},li.center.set=function(q){q.lat===this._center.lat&&q.lng===this._center.lng||(this._unmodified=!1,this._center=q,this._constrain(),this._calcMatrices())},li.padding.get=function(){return this._edgeInsets.toJSON()},li.padding.set=function(q){this._edgeInsets.equals(q)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,q,1),this._calcMatrices())},li.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},oi.prototype.isPaddingEqual=function(q){return this._edgeInsets.equals(q)},oi.prototype.interpolatePadding=function(q,$,W){this._unmodified=!1,this._edgeInsets.interpolate(q,$,W),this._constrain(),this._calcMatrices()},oi.prototype.coveringZoomLevel=function(q){var $=(q.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/q.tileSize));return Math.max(0,$)},oi.prototype.getVisibleUnwrappedCoordinates=function(q){var $=[new s.UnwrappedTileID(0,q)];if(this._renderWorldCopies)for(var W=this.pointCoordinate(new s.Point(0,0)),ie=this.pointCoordinate(new s.Point(this.width,0)),_e=this.pointCoordinate(new s.Point(this.width,this.height)),ze=this.pointCoordinate(new s.Point(0,this.height)),He=Math.floor(Math.min(W.x,ie.x,_e.x,ze.x)),Xe=Math.floor(Math.max(W.x,ie.x,_e.x,ze.x)),at=He-1;at<=Xe+1;at++)at!==0&&$.push(new s.UnwrappedTileID(at,q));return $},oi.prototype.coveringTiles=function(q){var $=this.coveringZoomLevel(q),W=$;if(q.minzoom!==void 0&&$q.maxzoom&&($=q.maxzoom);var ie=s.MercatorCoordinate.fromLngLat(this.center),_e=Math.pow(2,$),ze=[_e*ie.x,_e*ie.y,0],He=vs.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,$),Xe=q.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(Xe=$);var at=function(en){return{aabb:new ms([en*_e,0,0],[(en+1)*_e,_e,0]),zoom:0,x:0,y:0,wrap:en,fullyVisible:!1}},wt=[],At=[],re=$,ve=q.reparseOverscaled?W:$;if(this._renderWorldCopies)for(var Le=1;Le<=3;Le++)wt.push(at(-Le)),wt.push(at(Le));for(wt.push(at(0));wt.length>0;){var Fe=wt.pop(),Ve=Fe.x,We=Fe.y,$e=Fe.fullyVisible;if(!$e){var tt=Fe.aabb.intersects(He);if(tt===0)continue;$e=tt===2}var lt=Fe.aabb.distanceX(ze),gt=Fe.aabb.distanceY(ze),zt=Math.max(Math.abs(lt),Math.abs(gt)),Ut=3+(1<Ut&&Fe.zoom>=Xe)At.push({tileID:new s.OverscaledTileID(Fe.zoom===re?ve:Fe.zoom,Fe.wrap,Fe.zoom,Ve,We),distanceSq:s.sqrLen([ze[0]-.5-Ve,ze[1]-.5-We])});else for(var Vt=0;Vt<4;Vt++){var Qt=(Ve<<1)+Vt%2,gn=(We<<1)+(Vt>>1);wt.push({aabb:Fe.aabb.quadrant(Vt),zoom:Fe.zoom+1,x:Qt,y:gn,wrap:Fe.wrap,fullyVisible:$e})}}return At.sort(function(en,sn){return en.distanceSq-sn.distanceSq}).map(function(en){return en.tileID})},oi.prototype.resize=function(q,$){this.width=q,this.height=$,this.pixelsToGLUnits=[2/q,-2/$],this._constrain(),this._calcMatrices()},li.unmodified.get=function(){return this._unmodified},oi.prototype.zoomScale=function(q){return Math.pow(2,q)},oi.prototype.scaleZoom=function(q){return Math.log(q)/Math.LN2},oi.prototype.project=function(q){var $=s.clamp(q.lat,-this.maxValidLatitude,this.maxValidLatitude);return new s.Point(s.mercatorXfromLng(q.lng)*this.worldSize,s.mercatorYfromLat($)*this.worldSize)},oi.prototype.unproject=function(q){return new s.MercatorCoordinate(q.x/this.worldSize,q.y/this.worldSize).toLngLat()},li.point.get=function(){return this.project(this.center)},oi.prototype.setLocationAtPoint=function(q,$){var W=this.pointCoordinate($),ie=this.pointCoordinate(this.centerPoint),_e=this.locationCoordinate(q),ze=new s.MercatorCoordinate(_e.x-(W.x-ie.x),_e.y-(W.y-ie.y));this.center=this.coordinateLocation(ze),this._renderWorldCopies&&(this.center=this.center.wrap())},oi.prototype.locationPoint=function(q){return this.coordinatePoint(this.locationCoordinate(q))},oi.prototype.pointLocation=function(q){return this.coordinateLocation(this.pointCoordinate(q))},oi.prototype.locationCoordinate=function(q){return s.MercatorCoordinate.fromLngLat(q)},oi.prototype.coordinateLocation=function(q){return q.toLngLat()},oi.prototype.pointCoordinate=function(q){var $=[q.x,q.y,0,1],W=[q.x,q.y,1,1];s.transformMat4($,$,this.pixelMatrixInverse),s.transformMat4(W,W,this.pixelMatrixInverse);var ie=$[3],_e=W[3],ze=$[0]/ie,He=W[0]/_e,Xe=$[1]/ie,at=W[1]/_e,wt=$[2]/ie,At=W[2]/_e,re=wt===At?0:(0-wt)/(At-wt);return new s.MercatorCoordinate(s.number(ze,He,re)/this.worldSize,s.number(Xe,at,re)/this.worldSize)},oi.prototype.coordinatePoint=function(q){var $=[q.x*this.worldSize,q.y*this.worldSize,0,1];return s.transformMat4($,$,this.pixelMatrix),new s.Point($[0]/$[3],$[1]/$[3])},oi.prototype.getBounds=function(){return new s.LngLatBounds().extend(this.pointLocation(new s.Point(0,0))).extend(this.pointLocation(new s.Point(this.width,0))).extend(this.pointLocation(new s.Point(this.width,this.height))).extend(this.pointLocation(new s.Point(0,this.height)))},oi.prototype.getMaxBounds=function(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new s.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},oi.prototype.setMaxBounds=function(q){q?(this.lngRange=[q.getWest(),q.getEast()],this.latRange=[q.getSouth(),q.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},oi.prototype.calculatePosMatrix=function(q,$){$===void 0&&($=!1);var W=q.key,ie=$?this._alignedPosMatrixCache:this._posMatrixCache;if(ie[W])return ie[W];var _e=q.canonical,ze=this.worldSize/this.zoomScale(_e.z),He=_e.x+Math.pow(2,_e.z)*q.wrap,Xe=s.identity(new Float64Array(16));return s.translate(Xe,Xe,[He*ze,_e.y*ze,0]),s.scale(Xe,Xe,[ze/s.EXTENT,ze/s.EXTENT,1]),s.multiply(Xe,$?this.alignedProjMatrix:this.projMatrix,Xe),ie[W]=new Float32Array(Xe),ie[W]},oi.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},oi.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var q,$,W,ie,_e=-90,ze=90,He=-180,Xe=180,at=this.size,wt=this._unmodified;if(this.latRange){var At=this.latRange;_e=s.mercatorYfromLat(At[1])*this.worldSize,q=(ze=s.mercatorYfromLat(At[0])*this.worldSize)-_eze&&(ie=ze-Ve)}if(this.lngRange){var We=ve.x,$e=at.x/2;We-$eXe&&(W=Xe-$e)}W===void 0&&ie===void 0||(this.center=this.unproject(new s.Point(W!==void 0?W:ve.x,ie!==void 0?ie:ve.y))),this._unmodified=wt,this._constraining=!1}},oi.prototype._calcMatrices=function(){if(this.height){var q=this._fov/2,$=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(q)*this.height;var W=Math.PI/2+this._pitch,ie=this._fov*(.5+$.y/this.height),_e=Math.sin(ie)*this.cameraToCenterDistance/Math.sin(s.clamp(Math.PI-W-ie,.01,Math.PI-.01)),ze=this.point,He=ze.x,Xe=ze.y,at=1.01*(Math.cos(Math.PI/2-this._pitch)*_e+this.cameraToCenterDistance),wt=this.height/50,At=new Float64Array(16);s.perspective(At,this._fov,this.width/this.height,wt,at),At[8]=2*-$.x/this.width,At[9]=2*$.y/this.height,s.scale(At,At,[1,-1,1]),s.translate(At,At,[0,0,-this.cameraToCenterDistance]),s.rotateX(At,At,this._pitch),s.rotateZ(At,At,this.angle),s.translate(At,At,[-He,-Xe,0]),this.mercatorMatrix=s.scale([],At,[this.worldSize,this.worldSize,this.worldSize]),s.scale(At,At,[1,1,s.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=At,this.invProjMatrix=s.invert([],this.projMatrix);var re=this.width%2/2,ve=this.height%2/2,Le=Math.cos(this.angle),Fe=Math.sin(this.angle),Ve=He-Math.round(He)+Le*re+Fe*ve,We=Xe-Math.round(Xe)+Le*ve+Fe*re,$e=new Float64Array(At);if(s.translate($e,$e,[Ve>.5?Ve-1:Ve,We>.5?We-1:We,0]),this.alignedProjMatrix=$e,At=s.create(),s.scale(At,At,[this.width/2,-this.height/2,1]),s.translate(At,At,[1,-1,0]),this.labelPlaneMatrix=At,At=s.create(),s.scale(At,At,[1,-1,1]),s.translate(At,At,[-1,-1,0]),s.scale(At,At,[2/this.width,2/this.height,1]),this.glCoordMatrix=At,this.pixelMatrix=s.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(At=s.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=At,this._posMatrixCache={},this._alignedPosMatrixCache={}}},oi.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var q=this.pointCoordinate(new s.Point(0,0)),$=[q.x*this.worldSize,q.y*this.worldSize,0,1];return s.transformMat4($,$,this.pixelMatrix)[3]/this.cameraToCenterDistance},oi.prototype.getCameraPoint=function(){var q=this._pitch,$=Math.tan(q)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new s.Point(0,$))},oi.prototype.getCameraQueryGeometry=function(q){var $=this.getCameraPoint();if(q.length===1)return[q[0],$];for(var W=$.x,ie=$.y,_e=$.x,ze=$.y,He=0,Xe=q;He=3&&!q.some(function(W){return isNaN(W)})){var $=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(q[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+q[2],+q[1]],zoom:+q[0],bearing:$,pitch:+(q[4]||0)}),!0}return!1},es.prototype._updateHashUnthrottled=function(){var q=this.getHashString();try{s.window.history.replaceState(s.window.history.state,"",q)}catch{}};var zo={linearity:.3,easing:s.bezier(0,0,.3,1)},Gl=s.extend({deceleration:2500,maxSpeed:1400},zo),wu=s.extend({deceleration:20,maxSpeed:1400},zo),Fs=s.extend({deceleration:1e3,maxSpeed:360},zo),Tu=s.extend({deceleration:1e3,maxSpeed:90},zo),Bs=function(q){this._map=q,this.clear()};function ts(q,$){(!q.duration||q.duration<$.duration)&&(q.duration=$.duration,q.easing=$.easing)}function Ns(q,$,W){var ie=W.maxSpeed,_e=W.linearity,ze=W.deceleration,He=s.clamp(q*_e/($/1e3),-ie,ie),Xe=Math.abs(He)/(ze*_e);return{easing:W.easing,duration:1e3*Xe,amount:He*(Xe/2)}}Bs.prototype.clear=function(){this._inertiaBuffer=[]},Bs.prototype.record=function(q){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:s.browser.now(),settings:q})},Bs.prototype._drainInertiaBuffer=function(){for(var q=this._inertiaBuffer,$=s.browser.now();q.length>0&&$-q[0].time>160;)q.shift()},Bs.prototype._onMoveEnd=function(q){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var $={zoom:0,bearing:0,pitch:0,pan:new s.Point(0,0),pinchAround:void 0,around:void 0},W=0,ie=this._inertiaBuffer;W=this._clickTolerance||this._map.fire(new Oi(q.type,this._map,q))},$i.prototype.dblclick=function(q){return this._firePreventable(new Oi(q.type,this._map,q))},$i.prototype.mouseover=function(q){this._map.fire(new Oi(q.type,this._map,q))},$i.prototype.mouseout=function(q){this._map.fire(new Oi(q.type,this._map,q))},$i.prototype.touchstart=function(q){return this._firePreventable(new Do(q.type,this._map,q))},$i.prototype.touchmove=function(q){this._map.fire(new Do(q.type,this._map,q))},$i.prototype.touchend=function(q){this._map.fire(new Do(q.type,this._map,q))},$i.prototype.touchcancel=function(q){this._map.fire(new Do(q.type,this._map,q))},$i.prototype._firePreventable=function(q){if(this._map.fire(q),q.defaultPrevented)return{}},$i.prototype.isEnabled=function(){return!0},$i.prototype.isActive=function(){return!1},$i.prototype.enable=function(){},$i.prototype.disable=function(){};var va=function(q){this._map=q};va.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},va.prototype.mousemove=function(q){this._map.fire(new Oi(q.type,this._map,q))},va.prototype.mousedown=function(){this._delayContextMenu=!0},va.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Oi("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},va.prototype.contextmenu=function(q){this._delayContextMenu?this._contextMenuEvent=q:this._map.fire(new Oi(q.type,this._map,q)),this._map.listens("contextmenu")&&q.preventDefault()},va.prototype.isEnabled=function(){return!0},va.prototype.isActive=function(){return!1},va.prototype.enable=function(){},va.prototype.disable=function(){};var ma=function(q,$){this._map=q,this._el=q.getCanvasContainer(),this._container=q.getContainer(),this._clickTolerance=$.clickTolerance||1};function ha(q,$){for(var W={},ie=0;iethis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=q.timeStamp),W.length===this.numTouches&&(this.centroid=function(ie){for(var _e=new s.Point(0,0),ze=0,He=ie;ze30)&&(this.aborted=!0)}}},Ia.prototype.touchend=function(q,$,W){if((!this.centroid||q.timeStamp-this.startTime>500)&&(this.aborted=!0),W.length===0){var ie=!this.aborted&&this.centroid;if(this.reset(),ie)return ie}};var ys=function(q){this.singleTap=new Ia(q),this.numTaps=q.numTaps,this.reset()};ys.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},ys.prototype.touchstart=function(q,$,W){this.singleTap.touchstart(q,$,W)},ys.prototype.touchmove=function(q,$,W){this.singleTap.touchmove(q,$,W)},ys.prototype.touchend=function(q,$,W){var ie=this.singleTap.touchend(q,$,W);if(ie){var _e=q.timeStamp-this.lastTime<500,ze=!this.lastTap||this.lastTap.dist(ie)<30;if(_e&&ze||this.reset(),this.count++,this.lastTime=q.timeStamp,this.lastTap=ie,this.count===this.numTaps)return this.reset(),ie}};var lo=function(){this._zoomIn=new ys({numTouches:1,numTaps:2}),this._zoomOut=new ys({numTouches:2,numTaps:1}),this.reset()};lo.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},lo.prototype.touchstart=function(q,$,W){this._zoomIn.touchstart(q,$,W),this._zoomOut.touchstart(q,$,W)},lo.prototype.touchmove=function(q,$,W){this._zoomIn.touchmove(q,$,W),this._zoomOut.touchmove(q,$,W)},lo.prototype.touchend=function(q,$,W){var ie=this,_e=this._zoomIn.touchend(q,$,W),ze=this._zoomOut.touchend(q,$,W);return _e?(this._active=!0,q.preventDefault(),setTimeout(function(){return ie.reset()},0),{cameraAnimation:function(He){return He.easeTo({duration:300,zoom:He.getZoom()+1,around:He.unproject(_e)},{originalEvent:q})}}):ze?(this._active=!0,q.preventDefault(),setTimeout(function(){return ie.reset()},0),{cameraAnimation:function(He){return He.easeTo({duration:300,zoom:He.getZoom()-1,around:He.unproject(ze)},{originalEvent:q})}}):void 0},lo.prototype.touchcancel=function(){this.reset()},lo.prototype.enable=function(){this._enabled=!0},lo.prototype.disable=function(){this._enabled=!1,this.reset()},lo.prototype.isEnabled=function(){return this._enabled},lo.prototype.isActive=function(){return this._active};var ea=function(q){this.reset(),this._clickTolerance=q.clickTolerance||1};ea.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},ea.prototype._correctButton=function(q,$){return!1},ea.prototype._move=function(q,$){return{}},ea.prototype.mousedown=function(q,$){if(!this._lastPoint){var W=m.mouseButton(q);this._correctButton(q,W)&&(this._lastPoint=$,this._eventButton=W)}},ea.prototype.mousemoveWindow=function(q,$){var W=this._lastPoint;if(W&&(q.preventDefault(),this._moved||!($.dist(W)0&&(this._active=!0);var ie=ha(W,$),_e=new s.Point(0,0),ze=new s.Point(0,0),He=0;for(var Xe in ie){var at=ie[Xe],wt=this._touches[Xe];wt&&(_e._add(at),ze._add(at.sub(wt)),He++,ie[Xe]=at)}if(this._touches=ie,!(HeMath.abs(q.x)}var Or=function(q){function $(){q.apply(this,arguments)}return q&&($.__proto__=q),$.prototype=Object.create(q&&q.prototype),$.prototype.constructor=$,$.prototype.reset=function(){q.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},$.prototype._start=function(W){this._lastPoints=W,al(W[0].sub(W[1]))&&(this._valid=!1)},$.prototype._move=function(W,ie,_e){var ze=W[0].sub(this._lastPoints[0]),He=W[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(ze,He,_e.timeStamp),this._valid)return this._lastPoints=W,this._active=!0,{pitchDelta:(ze.y+He.y)/2*-.5}},$.prototype.gestureBeginsVertically=function(W,ie,_e){if(this._valid!==void 0)return this._valid;var ze=W.mag()>=2,He=ie.mag()>=2;if(ze||He){if(!ze||!He)return this._firstMove===void 0&&(this._firstMove=_e),_e-this._firstMove<100&&void 0;var Xe=W.y>0==ie.y>0;return al(W)&&al(ie)&&Xe}},$}(Cr),ol={panStep:100,bearingStep:15,pitchStep:10},uo=function(){var q=ol;this._panStep=q.panStep,this._bearingStep=q.bearingStep,this._pitchStep=q.pitchStep};function Xl(q){return q*(2-q)}uo.prototype.reset=function(){this._active=!1},uo.prototype.keydown=function(q){var $=this;if(!(q.altKey||q.ctrlKey||q.metaKey)){var W=0,ie=0,_e=0,ze=0,He=0;switch(q.keyCode){case 61:case 107:case 171:case 187:W=1;break;case 189:case 109:case 173:W=-1;break;case 37:q.shiftKey?ie=-1:(q.preventDefault(),ze=-1);break;case 39:q.shiftKey?ie=1:(q.preventDefault(),ze=1);break;case 38:q.shiftKey?_e=1:(q.preventDefault(),He=-1);break;case 40:q.shiftKey?_e=-1:(q.preventDefault(),He=1);break;default:return}return{cameraAnimation:function(Xe){var at=Xe.getZoom();Xe.easeTo({duration:300,easeId:"keyboardHandler",easing:Xl,zoom:W?Math.round(at)+W*(q.shiftKey?2:1):at,bearing:Xe.getBearing()+ie*$._bearingStep,pitch:Xe.getPitch()+_e*$._pitchStep,offset:[-ze*$._panStep,-He*$._panStep],center:Xe.getCenter()},{originalEvent:q})}}}},uo.prototype.enable=function(){this._enabled=!0},uo.prototype.disable=function(){this._enabled=!1,this.reset()},uo.prototype.isEnabled=function(){return this._enabled},uo.prototype.isActive=function(){return this._active};var Cl=4.000244140625,ya=function(q,$){this._map=q,this._el=q.getCanvasContainer(),this._handler=$,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222,s.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};ya.prototype.setZoomRate=function(q){this._defaultZoomRate=q},ya.prototype.setWheelZoomRate=function(q){this._wheelZoomRate=q},ya.prototype.isEnabled=function(){return!!this._enabled},ya.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},ya.prototype.isZooming=function(){return!!this._zooming},ya.prototype.enable=function(q){this.isEnabled()||(this._enabled=!0,this._aroundCenter=q&&q.around==="center")},ya.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},ya.prototype.wheel=function(q){if(this.isEnabled()){var $=q.deltaMode===s.window.WheelEvent.DOM_DELTA_LINE?40*q.deltaY:q.deltaY,W=s.browser.now(),ie=W-(this._lastWheelEventTime||0);this._lastWheelEventTime=W,$!==0&&$%Cl==0?this._type="wheel":$!==0&&Math.abs($)<4?this._type="trackpad":ie>400?(this._type=null,this._lastValue=$,this._timeout=setTimeout(this._onTimeout,40,q)):this._type||(this._type=Math.abs(ie*$)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,$+=this._lastValue)),q.shiftKey&&$&&($/=4),this._type&&(this._lastWheelEvent=q,this._delta-=$,this._active||this._start(q)),q.preventDefault()}},ya.prototype._onTimeout=function(q){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(q)},ya.prototype._start=function(q){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 $=m.mousePos(this._el,q);this._around=s.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject($)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},ya.prototype.renderFrame=function(){return this._onScrollFrame()},ya.prototype._onScrollFrame=function(){var q=this;if(this._frameId&&(this._frameId=null,this.isActive())){var $=this._map.transform;if(this._delta!==0){var W=this._type==="wheel"&&Math.abs(this._delta)>Cl?this._wheelZoomRate:this._defaultZoomRate,ie=2/(1+Math.exp(-Math.abs(this._delta*W)));this._delta<0&&ie!==0&&(ie=1/ie);var _e=typeof this._targetZoom=="number"?$.zoomScale(this._targetZoom):$.scale;this._targetZoom=Math.min($.maxZoom,Math.max($.minZoom,$.scaleZoom(_e*ie))),this._type==="wheel"&&(this._startZoom=$.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var ze,He=typeof this._targetZoom=="number"?this._targetZoom:$.zoom,Xe=this._startZoom,at=this._easing,wt=!1;if(this._type==="wheel"&&Xe&&at){var At=Math.min((s.browser.now()-this._lastWheelEventTime)/200,1),re=at(At);ze=s.number(Xe,He,re),At<1?this._frameId||(this._frameId=!0):wt=!0}else ze=He,wt=!0;return this._active=!0,wt&&(this._active=!1,this._finishTimeout=setTimeout(function(){q._zooming=!1,q._handler._triggerRenderFrame(),delete q._targetZoom,delete q._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!wt,zoomDelta:ze-$.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},ya.prototype._smoothOutEasing=function(q){var $=s.ease;if(this._prevEase){var W=this._prevEase,ie=(s.browser.now()-W.start)/W.duration,_e=W.easing(ie+.01)-W.easing(ie),ze=.27/Math.sqrt(_e*_e+1e-4)*.01,He=Math.sqrt(.0729-ze*ze);$=s.bezier(ze,He,.25,1)}return this._prevEase={start:s.browser.now(),duration:q,easing:$},$},ya.prototype.reset=function(){this._active=!1};var Vs=function(q,$){this._clickZoom=q,this._tapZoom=$};Vs.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Vs.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Vs.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Vs.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var ns=function(){this.reset()};ns.prototype.reset=function(){this._active=!1},ns.prototype.dblclick=function(q,$){return q.preventDefault(),{cameraAnimation:function(W){W.easeTo({duration:300,zoom:W.getZoom()+(q.shiftKey?-1:1),around:W.unproject($)},{originalEvent:q})}}},ns.prototype.enable=function(){this._enabled=!0},ns.prototype.disable=function(){this._enabled=!1,this.reset()},ns.prototype.isEnabled=function(){return this._enabled},ns.prototype.isActive=function(){return this._active};var Wa=function(){this._tap=new ys({numTouches:1,numTaps:1}),this.reset()};Wa.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Wa.prototype.touchstart=function(q,$,W){this._swipePoint||(this._tapTime&&q.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?W.length>0&&(this._swipePoint=$[0],this._swipeTouch=W[0].identifier):this._tap.touchstart(q,$,W))},Wa.prototype.touchmove=function(q,$,W){if(this._tapTime){if(this._swipePoint){if(W[0].identifier!==this._swipeTouch)return;var ie=$[0],_e=ie.y-this._swipePoint.y;return this._swipePoint=ie,q.preventDefault(),this._active=!0,{zoomDelta:_e/128}}}else this._tap.touchmove(q,$,W)},Wa.prototype.touchend=function(q,$,W){this._tapTime?this._swipePoint&&W.length===0&&this.reset():this._tap.touchend(q,$,W)&&(this._tapTime=q.timeStamp)},Wa.prototype.touchcancel=function(){this.reset()},Wa.prototype.enable=function(){this._enabled=!0},Wa.prototype.disable=function(){this._enabled=!1,this.reset()},Wa.prototype.isEnabled=function(){return this._enabled},Wa.prototype.isActive=function(){return this._active};var xs=function(q,$,W){this._el=q,this._mousePan=$,this._touchPan=W};xs.prototype.enable=function(q){this._inertiaOptions=q||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},xs.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},xs.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},xs.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var _o=function(q,$,W){this._pitchWithRotate=q.pitchWithRotate,this._mouseRotate=$,this._mousePitch=W};_o.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},_o.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},_o.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},_o.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var co=function(q,$,W,ie){this._el=q,this._touchZoom=$,this._touchRotate=W,this._tapDragZoom=ie,this._rotationDisabled=!1,this._enabled=!0};co.prototype.enable=function(q){this._touchZoom.enable(q),this._rotationDisabled||this._touchRotate.enable(q),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},co.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},co.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},co.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},co.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},co.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var Hs=function(q){return q.zoom||q.drag||q.pitch||q.rotate},xa=function(q){function $(){q.apply(this,arguments)}return q&&($.__proto__=q),$.prototype=Object.create(q&&q.prototype),$.prototype.constructor=$,$}(s.Event);function fo(q){return q.panDelta&&q.panDelta.mag()||q.zoomDelta||q.bearingDelta||q.pitchDelta}var vi=function(q,$){this._map=q,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Bs(q),this._bearingSnap=$.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers($),s.bindAll(["handleEvent","handleWindowEvent"],this);var W=this._el;this._listeners=[[W,"touchstart",{passive:!1}],[W,"touchmove",{passive:!1}],[W,"touchend",void 0],[W,"touchcancel",void 0],[W,"mousedown",void 0],[W,"mousemove",void 0],[W,"mouseup",void 0],[s.window.document,"mousemove",{capture:!0}],[s.window.document,"mouseup",void 0],[W,"mouseover",void 0],[W,"mouseout",void 0],[W,"dblclick",void 0],[W,"click",void 0],[W,"keydown",{capture:!1}],[W,"keyup",void 0],[W,"wheel",{passive:!1}],[W,"contextmenu",void 0],[s.window,"blur",void 0]];for(var ie=0,_e=this._listeners;ie<_e.length;ie+=1){var ze=_e[ie],He=ze[0],Xe=ze[1],at=ze[2];m.addEventListener(He,Xe,He===s.window.document?this.handleWindowEvent:this.handleEvent,at)}};vi.prototype.destroy=function(){for(var q=0,$=this._listeners;q<$.length;q+=1){var W=$[q],ie=W[0],_e=W[1],ze=W[2];m.removeEventListener(ie,_e,ie===s.window.document?this.handleWindowEvent:this.handleEvent,ze)}},vi.prototype._addDefaultHandlers=function(q){var $=this._map,W=$.getCanvasContainer();this._add("mapEvent",new $i($,q));var ie=$.boxZoom=new ma($,q);this._add("boxZoom",ie);var _e=new lo,ze=new ns;$.doubleClickZoom=new Vs(ze,_e),this._add("tapZoom",_e),this._add("clickZoom",ze);var He=new Wa;this._add("tapDragZoom",He);var Xe=$.touchPitch=new Or;this._add("touchPitch",Xe);var at=new Wl(q),wt=new Zl(q);$.dragRotate=new _o(q,at,wt),this._add("mouseRotate",at,["mousePitch"]),this._add("mousePitch",wt,["mouseRotate"]);var At=new Ga(q),re=new Sa(q);$.dragPan=new xs(W,At,re),this._add("mousePan",At),this._add("touchPan",re,["touchZoom","touchRotate"]);var ve=new il,Le=new Yl;$.touchZoomRotate=new co(W,Le,ve,He),this._add("touchRotate",ve,["touchPan","touchZoom"]),this._add("touchZoom",Le,["touchPan","touchRotate"]);var Fe=$.scrollZoom=new ya($,this);this._add("scrollZoom",Fe,["mousePan"]);var Ve=$.keyboard=new uo;this._add("keyboard",Ve),this._add("blockableMapEvent",new va($));for(var We=0,$e=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];We<$e.length;We+=1){var tt=$e[We];q.interactive&&q[tt]&&$[tt].enable(q[tt])}},vi.prototype._add=function(q,$,W){this._handlers.push({handlerName:q,handler:$,allowed:W}),this._handlersById[q]=$},vi.prototype.stop=function(){if(!this._updatingCamera){for(var q=0,$=this._handlers;q<$.length;q+=1)$[q].handler.reset();this._inertia.clear(),this._fireEvents({},{}),this._changes=[]}},vi.prototype.isActive=function(){for(var q=0,$=this._handlers;q<$.length;q+=1)if($[q].handler.isActive())return!0;return!1},vi.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},vi.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},vi.prototype.isMoving=function(){return!!Hs(this._eventsInProgress)||this.isZooming()},vi.prototype._blockedByActive=function(q,$,W){for(var ie in q)if(ie!==W&&(!$||$.indexOf(ie)<0))return!0;return!1},vi.prototype.handleWindowEvent=function(q){this.handleEvent(q,q.type+"Window")},vi.prototype._getMapTouches=function(q){for(var $=[],W=0,ie=q;WHe?Math.min(2,Ut):Math.max(.5,Ut),sn=Math.pow(en,1-Qt),rn=ze.unproject(gt.add(zt.mult(Qt*sn)).mult(gn));ze.setLocationAtPoint(ze.renderWorldCopies?rn.wrap():rn,Ve)}_e._fireMoveEvents(ie)},function(Qt){_e._afterEase(ie,Qt)},W),this},$.prototype._prepareEase=function(W,ie,_e){_e===void 0&&(_e={}),this._moving=!0,ie||_e.moving||this.fire(new s.Event("movestart",W)),this._zooming&&!_e.zooming&&this.fire(new s.Event("zoomstart",W)),this._rotating&&!_e.rotating&&this.fire(new s.Event("rotatestart",W)),this._pitching&&!_e.pitching&&this.fire(new s.Event("pitchstart",W))},$.prototype._fireMoveEvents=function(W){this.fire(new s.Event("move",W)),this._zooming&&this.fire(new s.Event("zoom",W)),this._rotating&&this.fire(new s.Event("rotate",W)),this._pitching&&this.fire(new s.Event("pitch",W))},$.prototype._afterEase=function(W,ie){if(!this._easeId||!ie||this._easeId!==ie){delete this._easeId;var _e=this._zooming,ze=this._rotating,He=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,_e&&this.fire(new s.Event("zoomend",W)),ze&&this.fire(new s.Event("rotateend",W)),He&&this.fire(new s.Event("pitchend",W)),this.fire(new s.Event("moveend",W))}},$.prototype.flyTo=function(W,ie){var _e=this;if(!W.essential&&s.browser.prefersReducedMotion){var ze=s.pick(W,["center","zoom","bearing","pitch","around"]);return this.jumpTo(ze,ie)}this.stop(),W=s.extend({offset:[0,0],speed:1.2,curve:1.42,easing:s.ease},W);var He=this.transform,Xe=this.getZoom(),at=this.getBearing(),wt=this.getPitch(),At=this.getPadding(),re="zoom"in W?s.clamp(+W.zoom,He.minZoom,He.maxZoom):Xe,ve="bearing"in W?this._normalizeBearing(W.bearing,at):at,Le="pitch"in W?+W.pitch:wt,Fe="padding"in W?W.padding:He.padding,Ve=He.zoomScale(re-Xe),We=s.Point.convert(W.offset),$e=He.centerPoint.add(We),tt=He.pointLocation($e),lt=s.LngLat.convert(W.center||tt);this._normalizeCenter(lt);var gt=He.project(tt),zt=He.project(lt).sub(gt),Ut=W.curve,Vt=Math.max(He.width,He.height),Qt=Vt/Ve,gn=zt.mag();if("minZoom"in W){var en=s.clamp(Math.min(W.minZoom,Xe,re),He.minZoom,He.maxZoom),sn=Vt/He.zoomScale(en-Xe);Ut=Math.sqrt(sn/gn*2)}var rn=Ut*Ut;function Mn(mr){var wr=(Qt*Qt-Vt*Vt+(mr?-1:1)*rn*rn*gn*gn)/(2*(mr?Qt:Vt)*rn*gn);return Math.log(Math.sqrt(wr*wr+1)-wr)}function xn(mr){return(Math.exp(mr)-Math.exp(-mr))/2}function an(mr){return(Math.exp(mr)+Math.exp(-mr))/2}var zn=Mn(0),Vn=function(mr){return an(zn)/an(zn+Ut*mr)},nr=function(mr){return Vt*((an(zn)*(xn(wr=zn+Ut*mr)/an(wr))-xn(zn))/rn)/gn;var wr},rr=(Mn(1)-zn)/Ut;if(Math.abs(gn)<1e-6||!isFinite(rr)){if(Math.abs(Vt-Qt)<1e-6)return this.easeTo(W,ie);var Tr=QtW.maxDuration&&(W.duration=0),this._zooming=!0,this._rotating=at!==ve,this._pitching=Le!==wt,this._padding=!He.isPaddingEqual(Fe),this._prepareEase(ie,!1),this._ease(function(mr){var wr=mr*rr,Rr=1/Vn(wr);He.zoom=mr===1?re:Xe+He.scaleZoom(Rr),_e._rotating&&(He.bearing=s.number(at,ve,mr)),_e._pitching&&(He.pitch=s.number(wt,Le,mr)),_e._padding&&(He.interpolatePadding(At,Fe,mr),$e=He.centerPoint.add(We));var Jr=mr===1?lt:He.unproject(gt.add(zt.mult(nr(wr))).mult(Rr));He.setLocationAtPoint(He.renderWorldCopies?Jr.wrap():Jr,$e),_e._fireMoveEvents(ie)},function(){return _e._afterEase(ie)},W),this},$.prototype.isEasing=function(){return!!this._easeFrameId},$.prototype.stop=function(){return this._stop()},$.prototype._stop=function(W,ie){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var _e=this._onEaseEnd;delete this._onEaseEnd,_e.call(this,ie)}if(!W){var ze=this.handlers;ze&&ze.stop()}return this},$.prototype._ease=function(W,ie,_e){_e.animate===!1||_e.duration===0?(W(1),ie()):(this._easeStart=s.browser.now(),this._easeOptions=_e,this._onEaseFrame=W,this._onEaseEnd=ie,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},$.prototype._renderFrameCallback=function(){var W=Math.min((s.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(W)),W<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},$.prototype._normalizeBearing=function(W,ie){W=s.wrap(W,-180,180);var _e=Math.abs(W-ie);return Math.abs(W-360-ie)<_e&&(W-=360),Math.abs(W+360-ie)<_e&&(W+=360),W},$.prototype._normalizeCenter=function(W){var ie=this.transform;if(ie.renderWorldCopies&&!ie.lngRange){var _e=W.lng-ie.center.lng;W.lng+=_e>180?-360:_e<-180?360:0}},$}(s.Evented),to=function(q){q===void 0&&(q={}),this.options=q,s.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};to.prototype.getDefaultPosition=function(){return"bottom-right"},to.prototype.onAdd=function(q){var $=this.options&&this.options.compact;return this._map=q,this._container=m.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._innerContainer=m.create("div","mapboxgl-ctrl-attrib-inner",this._container),$&&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),$===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},to.prototype.onRemove=function(){m.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},to.prototype._updateEditLink=function(){var q=this._editLink;q||(q=this._editLink=this._container.querySelector(".mapbox-improve-map"));var $=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||s.config.ACCESS_TOKEN}];if(q){var W=$.reduce(function(ie,_e,ze){return _e.value&&(ie+=_e.key+"="+_e.value+(ze<$.length-1?"&":"")),ie},"?");q.href=s.config.FEEDBACK_URL+"/"+W+(this._map._hash?this._map._hash.getHashString(!0):""),q.rel="noopener nofollow"}},to.prototype._updateData=function(q){!q||q.sourceDataType!=="metadata"&&q.dataType!=="style"||(this._updateAttributions(),this._updateEditLink())},to.prototype._updateAttributions=function(){if(this._map.style){var q=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?q=q.concat(this.options.customAttribution.map(function(Xe){return typeof Xe!="string"?"":Xe})):typeof this.options.customAttribution=="string"&&q.push(this.options.customAttribution)),this._map.style.stylesheet){var $=this._map.style.stylesheet;this.styleOwner=$.owner,this.styleId=$.id}var W=this._map.style.sourceCaches;for(var ie in W){var _e=W[ie];if(_e.used){var ze=_e.getSource();ze.attribution&&q.indexOf(ze.attribution)<0&&q.push(ze.attribution)}}q.sort(function(Xe,at){return Xe.length-at.length});var He=(q=q.filter(function(Xe,at){for(var wt=at+1;wt=0)return!1;return!0})).join(" | ");He!==this._attribHTML&&(this._attribHTML=He,q.length?(this._innerContainer.innerHTML=He,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},to.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var ho=function(){s.bindAll(["_updateLogo"],this),s.bindAll(["_updateCompact"],this)};ho.prototype.onAdd=function(q){this._map=q,this._container=m.create("div","mapboxgl-ctrl");var $=m.create("a","mapboxgl-ctrl-logo");return $.target="_blank",$.rel="noopener nofollow",$.href="https://www.mapbox.com/",$.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),$.setAttribute("rel","noopener nofollow"),this._container.appendChild($),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},ho.prototype.onRemove=function(){m.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},ho.prototype.getDefaultPosition=function(){return"bottom-left"},ho.prototype._updateLogo=function(q){q&&q.sourceDataType!=="metadata"||(this._container.style.display=this._logoRequired()?"block":"none")},ho.prototype._logoRequired=function(){if(this._map.style){var q=this._map.style.sourceCaches;for(var $ in q)if(q[$].getSource().mapbox_logo)return!0;return!1}},ho.prototype._updateCompact=function(){var q=this._container.children;if(q.length){var $=q[0];this._map.getCanvasContainer().offsetWidth<250?$.classList.add("mapboxgl-compact"):$.classList.remove("mapboxgl-compact")}};var Fo=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Fo.prototype.add=function(q){var $=++this._id;return this._queue.push({callback:q,id:$,cancelled:!1}),$},Fo.prototype.remove=function(q){for(var $=this._currentlyRunning,W=0,ie=$?this._queue.concat($):this._queue;Wie.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(ie.minPitch!=null&&ie.maxPitch!=null&&ie.minPitch>ie.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(ie.minPitch!=null&&ie.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(ie.maxPitch!=null&&ie.maxPitch>Da)throw new Error("maxPitch must be less than or equal to 60");var ze=new oi(ie.minZoom,ie.maxZoom,ie.minPitch,ie.maxPitch,ie.renderWorldCopies);if(q.call(this,ze,ie),this._interactive=ie.interactive,this._maxTileCacheSize=ie.maxTileCacheSize,this._failIfMajorPerformanceCaveat=ie.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=ie.preserveDrawingBuffer,this._antialias=ie.antialias,this._trackResize=ie.trackResize,this._bearingSnap=ie.bearingSnap,this._refreshExpiredTiles=ie.refreshExpiredTiles,this._fadeDuration=ie.fadeDuration,this._crossSourceCollisions=ie.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=ie.collectResourceTiming,this._renderTaskQueue=new Fo,this._controls=[],this._mapId=s.uniqueId(),this._locale=s.extend({},za,ie.locale),this._requestManager=new s.RequestManager(ie.transformRequest,ie.accessToken),typeof ie.container=="string"){if(this._container=s.window.document.getElementById(ie.container),!this._container)throw new Error("Container '"+ie.container+"' not found.")}else{if(!(ie.container instanceof oa))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=ie.container}if(ie.maxBounds&&this.setMaxBounds(ie.maxBounds),s.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return _e._update(!1)}),this.on("moveend",function(){return _e._update(!1)}),this.on("zoom",function(){return _e._update(!0)}),s.window!==void 0&&(s.window.addEventListener("online",this._onWindowOnline,!1),s.window.addEventListener("resize",this._onWindowResize,!1)),this.handlers=new vi(this,ie);var He=typeof ie.hash=="string"&&ie.hash||void 0;this._hash=ie.hash&&new es(He).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:ie.center,zoom:ie.zoom,bearing:ie.bearing,pitch:ie.pitch}),ie.bounds&&(this.resize(),this.fitBounds(ie.bounds,s.extend({},ie.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=ie.localIdeographFontFamily,ie.style&&this.setStyle(ie.style,{localIdeographFontFamily:ie.localIdeographFontFamily}),ie.attributionControl&&this.addControl(new to({customAttribution:ie.customAttribution})),this.addControl(new ho,ie.logoPosition),this.on("style.load",function(){_e.transform.unmodified&&_e.jumpTo(_e.style.stylesheet)}),this.on("data",function(Xe){_e._update(Xe.dataType==="style"),_e.fire(new s.Event(Xe.dataType+"data",Xe))}),this.on("dataloading",function(Xe){_e.fire(new s.Event(Xe.dataType+"dataloading",Xe))})}q&&($.__proto__=q),$.prototype=Object.create(q&&q.prototype),$.prototype.constructor=$;var W={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return $.prototype._getMapId=function(){return this._mapId},$.prototype.addControl=function(ie,_e){if(_e===void 0&&ie.getDefaultPosition&&(_e=ie.getDefaultPosition()),_e===void 0&&(_e="top-right"),!ie||!ie.onAdd)return this.fire(new s.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var ze=ie.onAdd(this);this._controls.push(ie);var He=this._controlPositions[_e];return _e.indexOf("bottom")!==-1?He.insertBefore(ze,He.firstChild):He.appendChild(ze),this},$.prototype.removeControl=function(ie){if(!ie||!ie.onRemove)return this.fire(new s.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var _e=this._controls.indexOf(ie);return _e>-1&&this._controls.splice(_e,1),ie.onRemove(this),this},$.prototype.resize=function(ie){var _e=this._containerDimensions(),ze=_e[0],He=_e[1];this._resizeCanvas(ze,He),this.transform.resize(ze,He),this.painter.resize(ze,He);var Xe=!this._moving;return Xe&&(this.stop(),this.fire(new s.Event("movestart",ie)).fire(new s.Event("move",ie))),this.fire(new s.Event("resize",ie)),Xe&&this.fire(new s.Event("moveend",ie)),this},$.prototype.getBounds=function(){return this.transform.getBounds()},$.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},$.prototype.setMaxBounds=function(ie){return this.transform.setMaxBounds(s.LngLatBounds.convert(ie)),this._update()},$.prototype.setMinZoom=function(ie){if((ie=ie??-2)>=-2&&ie<=this.transform.maxZoom)return this.transform.minZoom=ie,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=ie,this._update(),this.getZoom()>ie&&this.setZoom(ie),this;throw new Error("maxZoom must be greater than the current minZoom")},$.prototype.getMaxZoom=function(){return this.transform.maxZoom},$.prototype.setMinPitch=function(ie){if((ie=ie??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(ie>=0&&ie<=this.transform.maxPitch)return this.transform.minPitch=ie,this._update(),this.getPitch()Da)throw new Error("maxPitch must be less than or equal to 60");if(ie>=this.transform.minPitch)return this.transform.maxPitch=ie,this._update(),this.getPitch()>ie&&this.setPitch(ie),this;throw new Error("maxPitch must be greater than the current minPitch")},$.prototype.getMaxPitch=function(){return this.transform.maxPitch},$.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},$.prototype.setRenderWorldCopies=function(ie){return this.transform.renderWorldCopies=ie,this._update()},$.prototype.project=function(ie){return this.transform.locationPoint(s.LngLat.convert(ie))},$.prototype.unproject=function(ie){return this.transform.pointLocation(s.Point.convert(ie))},$.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},$.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},$.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},$.prototype._createDelegatedListener=function(ie,_e,ze){var He,Xe=this;if(ie==="mouseenter"||ie==="mouseover"){var at=!1;return{layer:_e,listener:ze,delegates:{mousemove:function(At){var re=Xe.getLayer(_e)?Xe.queryRenderedFeatures(At.point,{layers:[_e]}):[];re.length?at||(at=!0,ze.call(Xe,new Oi(ie,Xe,At.originalEvent,{features:re}))):at=!1},mouseout:function(){at=!1}}}}if(ie==="mouseleave"||ie==="mouseout"){var wt=!1;return{layer:_e,listener:ze,delegates:{mousemove:function(At){(Xe.getLayer(_e)?Xe.queryRenderedFeatures(At.point,{layers:[_e]}):[]).length?wt=!0:wt&&(wt=!1,ze.call(Xe,new Oi(ie,Xe,At.originalEvent)))},mouseout:function(At){wt&&(wt=!1,ze.call(Xe,new Oi(ie,Xe,At.originalEvent)))}}}}return{layer:_e,listener:ze,delegates:(He={},He[ie]=function(At){var re=Xe.getLayer(_e)?Xe.queryRenderedFeatures(At.point,{layers:[_e]}):[];re.length&&(At.features=re,ze.call(Xe,At),delete At.features)},He)}},$.prototype.on=function(ie,_e,ze){if(ze===void 0)return q.prototype.on.call(this,ie,_e);var He=this._createDelegatedListener(ie,_e,ze);for(var Xe in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[ie]=this._delegatedListeners[ie]||[],this._delegatedListeners[ie].push(He),He.delegates)this.on(Xe,He.delegates[Xe]);return this},$.prototype.once=function(ie,_e,ze){if(ze===void 0)return q.prototype.once.call(this,ie,_e);var He=this._createDelegatedListener(ie,_e,ze);for(var Xe in He.delegates)this.once(Xe,He.delegates[Xe]);return this},$.prototype.off=function(ie,_e,ze){var He=this;return ze===void 0?q.prototype.off.call(this,ie,_e):(this._delegatedListeners&&this._delegatedListeners[ie]&&function(Xe){for(var at=Xe[ie],wt=0;wt180;){var He=W.locationPoint(q);if(He.x>=0&&He.y>=0&&He.x<=W.width&&He.y<=W.height)break;q.lng>W.center.lng?q.lng-=360:q.lng+=360}return q}Fr.prototype.down=function(q,$){this.mouseRotate.mousedown(q,$),this.mousePitch&&this.mousePitch.mousedown(q,$),m.disableDrag()},Fr.prototype.move=function(q,$){var W=this.map,ie=this.mouseRotate.mousemoveWindow(q,$);if(ie&&ie.bearingDelta&&W.setBearing(W.getBearing()+ie.bearingDelta),this.mousePitch){var _e=this.mousePitch.mousemoveWindow(q,$);_e&&_e.pitchDelta&&W.setPitch(W.getPitch()+_e.pitchDelta)}},Fr.prototype.off=function(){var q=this.element;m.removeEventListener(q,"mousedown",this.mousedown),m.removeEventListener(q,"touchstart",this.touchstart,{passive:!1}),m.removeEventListener(q,"touchmove",this.touchmove),m.removeEventListener(q,"touchend",this.touchend),m.removeEventListener(q,"touchcancel",this.reset),this.offTemp()},Fr.prototype.offTemp=function(){m.enableDrag(),m.removeEventListener(s.window,"mousemove",this.mousemove),m.removeEventListener(s.window,"mouseup",this.mouseup)},Fr.prototype.mousedown=function(q){this.down(s.extend({},q,{ctrlKey:!0,preventDefault:function(){return q.preventDefault()}}),m.mousePos(this.element,q)),m.addEventListener(s.window,"mousemove",this.mousemove),m.addEventListener(s.window,"mouseup",this.mouseup)},Fr.prototype.mousemove=function(q){this.move(q,m.mousePos(this.element,q))},Fr.prototype.mouseup=function(q){this.mouseRotate.mouseupWindow(q),this.mousePitch&&this.mousePitch.mouseupWindow(q),this.offTemp()},Fr.prototype.touchstart=function(q){q.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=m.touchPos(this.element,q.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return q.preventDefault()}},this._startPos))},Fr.prototype.touchmove=function(q){q.targetTouches.length!==1?this.reset():(this._lastPos=m.touchPos(this.element,q.targetTouches)[0],this.move({preventDefault:function(){return q.preventDefault()}},this._lastPos))},Fr.prototype.touchend=function(q){q.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)ie.getEast()||_e.latitudeie.getNorth())},$.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")}},$.prototype._onSuccess=function(W){if(this._map){if(this._isOutOfMapMaxBounds(W))return this._setErrorState(),this.fire(new s.Event("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("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")}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("mapboxgl-user-location-dot-stale"),this.fire(new s.Event("geolocate",W)),this._finish()}},$.prototype._updateCamera=function(W){var ie=new s.LngLat(W.coords.longitude,W.coords.latitude),_e=W.coords.accuracy,ze=this._map.getBearing(),He=s.extend({bearing:ze},this.options.fitBoundsOptions);this._map.fitBounds(ie.toBounds(_e),He,{geolocateSource:!0})},$.prototype._updateMarker=function(W){if(W){var ie=new s.LngLat(W.coords.longitude,W.coords.latitude);this._accuracyCircleMarker.setLngLat(ie).addTo(this._map),this._userLocationDotMarker.setLngLat(ie).addTo(this._map),this._accuracy=W.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},$.prototype._updateCircleRadius=function(){var W=this._map._container.clientHeight/2,ie=this._map.unproject([0,W]),_e=this._map.unproject([1,W]),ze=ie.distanceTo(_e),He=Math.ceil(2*this._accuracy/ze);this._circleElement.style.width=He+"px",this._circleElement.style.height=He+"px"},$.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},$.prototype._onError=function(W){if(this._map){if(this.options.trackUserLocation)if(W.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 ie=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=ie,this._geolocateButton.setAttribute("aria-label",ie),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(W.code===3&&ll)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new s.Event("error",W)),this._finish()}},$.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},$.prototype._setupUI=function(W){var ie=this;if(this._container.addEventListener("contextmenu",function(He){return He.preventDefault()}),this._geolocateButton=m.create("button","mapboxgl-ctrl-geolocate",this._container),m.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",W===!1){s.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var _e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=_e,this._geolocateButton.setAttribute("aria-label",_e)}else{var ze=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=ze,this._geolocateButton.setAttribute("aria-label",ze)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=m.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new _a(this._dotElement),this._circleElement=m.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new _a({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(He){var Xe=He.originalEvent&&He.originalEvent.type==="resize";He.geolocateSource||ie._watchState!=="ACTIVE_LOCK"||Xe||(ie._watchState="BACKGROUND",ie._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),ie._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),ie.fire(new s.Event("trackuserlocationend")))})},$.prototype.trigger=function(){if(!this._setup)return s.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 s.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Fa--,ll=!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 s.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 s.Event("trackuserlocationstart"))}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")}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){var W;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++Fa>1?(W={maximumAge:6e5,timeout:0},ll=!0):(W=this.options.positionOptions,ll=!1),this._geolocationWatchID=s.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,W)}}else s.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},$.prototype._clearWatch=function(){s.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)},$}(s.Evented),_i={maxWidth:100,unit:"metric"},Si=function(q){this.options=s.extend({},_i,q),s.bindAll(["_onMove","setUnit"],this)};function Jl(q,$,W){var ie=W&&W.maxWidth||100,_e=q._container.clientHeight/2,ze=q.unproject([0,_e]),He=q.unproject([ie,_e]),Xe=ze.distanceTo(He);if(W&&W.unit==="imperial"){var at=3.2808*Xe;at>5280?et($,ie,at/5280,q._getUIString("ScaleControl.Miles")):et($,ie,at,q._getUIString("ScaleControl.Feet"))}else W&&W.unit==="nautical"?et($,ie,Xe/1852,q._getUIString("ScaleControl.NauticalMiles")):Xe>=1e3?et($,ie,Xe/1e3,q._getUIString("ScaleControl.Kilometers")):et($,ie,Xe,q._getUIString("ScaleControl.Meters"))}function et(q,$,W,ie){var _e,ze,He,Xe=(_e=W,(ze=Math.pow(10,(""+Math.floor(_e)).length-1))*((He=_e/ze)>=10?10:He>=5?5:He>=3?3:He>=2?2:He>=1?1:function(wt){var At=Math.pow(10,Math.ceil(-Math.log(wt)/Math.LN10));return Math.round(wt*At)/At}(He))),at=Xe/W;q.style.width=$*at+"px",q.innerHTML=Xe+" "+ie}Si.prototype.getDefaultPosition=function(){return"bottom-left"},Si.prototype._onMove=function(){Jl(this._map,this._container,this.options)},Si.prototype.onAdd=function(q){return this._map=q,this._container=m.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",q.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Si.prototype.onRemove=function(){m.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Si.prototype.setUnit=function(q){this.options.unit=q,Jl(this._map,this._container,this.options)};var rt=function(q){this._fullscreen=!1,q&&q.container&&(q.container instanceof s.window.HTMLElement?this._container=q.container:s.warnOnce("Full screen control 'container' must be a DOM element.")),s.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in s.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in s.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in s.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in s.window.document&&(this._fullscreenchange="MSFullscreenChange")};rt.prototype.onAdd=function(q){return this._map=q,this._container||(this._container=this._map.getContainer()),this._controlContainer=m.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",s.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},rt.prototype.onRemove=function(){m.remove(this._controlContainer),this._map=null,s.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},rt.prototype._checkFullscreenSupport=function(){return!!(s.window.document.fullscreenEnabled||s.window.document.mozFullScreenEnabled||s.window.document.msFullscreenEnabled||s.window.document.webkitFullscreenEnabled)},rt.prototype._setupUI=function(){var q=this._fullscreenButton=m.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);m.create("span","mapboxgl-ctrl-icon",q).setAttribute("aria-hidden",!0),q.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),s.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},rt.prototype._updateTitle=function(){var q=this._getTitle();this._fullscreenButton.setAttribute("aria-label",q),this._fullscreenButton.title=q},rt.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},rt.prototype._isFullscreen=function(){return this._fullscreen},rt.prototype._changeIcon=function(){(s.window.document.fullscreenElement||s.window.document.mozFullScreenElement||s.window.document.webkitFullscreenElement||s.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},rt.prototype._onClickFullscreen=function(){this._isFullscreen()?s.window.document.exitFullscreen?s.window.document.exitFullscreen():s.window.document.mozCancelFullScreen?s.window.document.mozCancelFullScreen():s.window.document.msExitFullscreen?s.window.document.msExitFullscreen():s.window.document.webkitCancelFullScreen&&s.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 ct={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},vt=function(q){function $(W){q.call(this),this.options=s.extend(Object.create(ct),W),s.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return q&&($.__proto__=q),$.prototype=Object.create(q&&q.prototype),$.prototype.constructor=$,$.prototype.addTo=function(W){return this._map&&this.remove(),this._map=W,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._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 s.Event("open")),this},$.prototype.isOpen=function(){return!!this._map},$.prototype.remove=function(){return this._content&&m.remove(this._content),this._container&&(m.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 s.Event("close")),this},$.prototype.getLngLat=function(){return this._lngLat},$.prototype.setLngLat=function(W){return this._lngLat=s.LngLat.convert(W),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},$.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},$.prototype.getElement=function(){return this._container},$.prototype.setText=function(W){return this.setDOMContent(s.window.document.createTextNode(W))},$.prototype.setHTML=function(W){var ie,_e=s.window.document.createDocumentFragment(),ze=s.window.document.createElement("body");for(ze.innerHTML=W;ie=ze.firstChild;)_e.appendChild(ie);return this.setDOMContent(_e)},$.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},$.prototype.setMaxWidth=function(W){return this.options.maxWidth=W,this._update(),this},$.prototype.setDOMContent=function(W){return this._createContent(),this._content.appendChild(W),this._update(),this},$.prototype.addClassName=function(W){this._container&&this._container.classList.add(W)},$.prototype.removeClassName=function(W){this._container&&this._container.classList.remove(W)},$.prototype.toggleClassName=function(W){if(this._container)return this._container.classList.toggle(W)},$.prototype._createContent=function(){this._content&&m.remove(this._content),this._content=m.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=m.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))},$.prototype._onMouseUp=function(W){this._update(W.point)},$.prototype._onMouseMove=function(W){this._update(W.point)},$.prototype._onDrag=function(W){this._update(W.point)},$.prototype._update=function(W){var ie=this,_e=this._lngLat||this._trackPointer;if(this._map&&_e&&this._content&&(this._container||(this._container=m.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=m.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(ve){return ie._container.classList.add(ve)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Ur(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||W)){var ze=this._pos=this._trackPointer&&W?W:this._map.project(this._lngLat),He=this.options.anchor,Xe=Mt(this.options.offset);if(!He){var at,wt=this._container.offsetWidth,At=this._container.offsetHeight;at=ze.y+Xe.bottom.ythis._map.transform.height-At?["bottom"]:[],ze.xthis._map.transform.width-wt/2&&at.push("right"),He=at.length===0?"bottom":at.join("-")}var re=ze.add(Xe[He]).round();m.setTransform(this._container,sl[He]+" translate("+re.x+"px,"+re.y+"px)"),is(this._container,He,"popup")}},$.prototype._onClose=function(){this.remove()},$}(s.Evented);function Mt(q){if(q){if(typeof q=="number"){var $=Math.round(Math.sqrt(.5*Math.pow(q,2)));return{center:new s.Point(0,0),top:new s.Point(0,q),"top-left":new s.Point($,$),"top-right":new s.Point(-$,$),bottom:new s.Point(0,-q),"bottom-left":new s.Point($,-$),"bottom-right":new s.Point(-$,-$),left:new s.Point(q,0),right:new s.Point(-q,0)}}if(q instanceof s.Point||Array.isArray(q)){var W=s.Point.convert(q);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:s.Point.convert(q.center||[0,0]),top:s.Point.convert(q.top||[0,0]),"top-left":s.Point.convert(q["top-left"]||[0,0]),"top-right":s.Point.convert(q["top-right"]||[0,0]),bottom:s.Point.convert(q.bottom||[0,0]),"bottom-left":s.Point.convert(q["bottom-left"]||[0,0]),"bottom-right":s.Point.convert(q["bottom-right"]||[0,0]),left:s.Point.convert(q.left||[0,0]),right:s.Point.convert(q.right||[0,0])}}return Mt(new s.Point(0,0))}var kt={version:s.version,supported:T,setRTLTextPlugin:s.setRTLTextPlugin,getRTLTextPluginStatus:s.getRTLTextPluginStatus,Map:bs,NavigationControl:po,GeolocateControl:as,AttributionControl:to,ScaleControl:Si,FullscreenControl:rt,Popup:vt,Marker:_a,Style:cr,LngLat:s.LngLat,LngLatBounds:s.LngLatBounds,Point:s.Point,MercatorCoordinate:s.MercatorCoordinate,Evented:s.Evented,config:s.config,prewarm:function(){Ct().acquire(ut)},clearPrewarmedResources:function(){var q=bt;q&&(q.isPreloaded()&&q.numActive()===1?(q.release(ut),bt=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()"))},get accessToken(){return s.config.ACCESS_TOKEN},set accessToken(q){s.config.ACCESS_TOKEN=q},get baseApiUrl(){return s.config.API_URL},set baseApiUrl(q){s.config.API_URL=q},get workerCount(){return pt.workerCount},set workerCount(q){pt.workerCount=q},get maxParallelImageRequests(){return s.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(q){s.config.MAX_PARALLEL_IMAGE_REQUESTS=q},clearStorage:function(q){s.clearTileCache(q)},workerUrl:""};return kt}),_}()},27084:function(D){D.exports=Math.log2||function(E){return Math.log(E)*Math.LOG2E}},16825:function(D,E,e){D.exports=function(w,s){s||(s=w,w=window);var T=0,m=0,f=0,l={shift:!1,alt:!1,control:!1,meta:!1},t=!1;function i(v){var x=!1;return"altKey"in v&&(x=x||v.altKey!==l.alt,l.alt=!!v.altKey),"shiftKey"in v&&(x=x||v.shiftKey!==l.shift,l.shift=!!v.shiftKey),"ctrlKey"in v&&(x=x||v.ctrlKey!==l.control,l.control=!!v.ctrlKey),"metaKey"in v&&(x=x||v.metaKey!==l.meta,l.meta=!!v.metaKey),x}function r(v,x){var g=_.x(x),y=_.y(x);"buttons"in x&&(v=0|x.buttons),(v!==T||g!==m||y!==f||i(x))&&(T=0|v,m=g||0,f=y||0,s&&s(T,m,f,l))}function n(v){r(0,v)}function o(){(T||m||f||l.shift||l.alt||l.meta||l.control)&&(m=f=0,T=0,l.shift=l.alt=l.control=l.meta=!1,s&&s(0,0,0,l))}function a(v){i(v)&&s&&s(T,m,f,l)}function u(v){_.buttons(v)===0?r(0,v):r(T,v)}function p(v){r(T|_.buttons(v),v)}function c(v){r(T&~_.buttons(v),v)}function b(){t||(t=!0,w.addEventListener("mousemove",u),w.addEventListener("mousedown",p),w.addEventListener("mouseup",c),w.addEventListener("mouseleave",n),w.addEventListener("mouseenter",n),w.addEventListener("mouseout",n),w.addEventListener("mouseover",n),w.addEventListener("blur",o),w.addEventListener("keyup",a),w.addEventListener("keydown",a),w.addEventListener("keypress",a),w!==window&&(window.addEventListener("blur",o),window.addEventListener("keyup",a),window.addEventListener("keydown",a),window.addEventListener("keypress",a)))}b();var d={element:w};return Object.defineProperties(d,{enabled:{get:function(){return t},set:function(v){v?b():t&&(t=!1,w.removeEventListener("mousemove",u),w.removeEventListener("mousedown",p),w.removeEventListener("mouseup",c),w.removeEventListener("mouseleave",n),w.removeEventListener("mouseenter",n),w.removeEventListener("mouseout",n),w.removeEventListener("mouseover",n),w.removeEventListener("blur",o),w.removeEventListener("keyup",a),w.removeEventListener("keydown",a),w.removeEventListener("keypress",a),w!==window&&(window.removeEventListener("blur",o),window.removeEventListener("keyup",a),window.removeEventListener("keydown",a),window.removeEventListener("keypress",a)))},enumerable:!0},buttons:{get:function(){return T},enumerable:!0},x:{get:function(){return m},enumerable:!0},y:{get:function(){return f},enumerable:!0},mods:{get:function(){return l},enumerable:!0}}),d};var _=e(74311)},48956:function(D){var E={left:0,top:0};D.exports=function(e,_,w){_=_||e.currentTarget||e.srcElement,Array.isArray(w)||(w=[0,0]);var s,T=e.clientX||0,m=e.clientY||0,f=(s=_)===window||s===document||s===document.body?E:s.getBoundingClientRect();return w[0]=T-f.left,w[1]=m-f.top,w}},74311:function(D,E){function e(_){return _.target||_.srcElement||window}E.buttons=function(_){if(typeof _=="object"){if("buttons"in _)return _.buttons;if("which"in _){if((w=_.which)===2)return 4;if(w===3)return 2;if(w>0)return 1<=0)return 1<0&&r(o,k))}catch(h){p.call(new b(k),h)}}}function p(g){var y=this;y.triggered||(y.triggered=!0,y.def&&(y=y.def),y.msg=g,y.state=2,y.chain.length>0&&r(o,y))}function c(g,y,k,h){for(var M=0;M1&&(t*=v=Math.sqrt(v),i*=v);var x=t*t,g=i*i,y=(n==o?-1:1)*Math.sqrt(Math.abs((x*g-x*d*d-g*b*b)/(x*d*d+g*b*b)));y==1/0&&(y=1);var k=y*t*d/i+(f+a)/2,h=y*-i*b/t+(l+u)/2,M=Math.asin(((l-h)/i).toFixed(9)),A=Math.asin(((u-h)/i).toFixed(9));(M=fA&&(M-=2*E),!o&&A>M&&(A-=2*E)}if(Math.abs(A-M)>e){var C=A,L=a,O=u;A=M+e*(o&&A>M?1:-1);var I=s(a=k+t*Math.cos(A),u=h+i*Math.sin(A),t,i,r,0,o,L,O,[A,C,k,h])}var R=Math.tan((A-M)/4),U=4/3*t*R,B=4/3*i*R,G=[2*f-(f+U*Math.sin(M)),2*l-(l-B*Math.cos(M)),a+U*Math.sin(A),u-B*Math.cos(A),a,u];if(p)return G;I&&(G=G.concat(I));for(var N=0;N7&&(t.push(v.splice(0,7)),v.unshift("C"));break;case"S":var g=p,y=c;l!="C"&&l!="S"||(g+=g-i,y+=y-r),v=["C",g,y,v[1],v[2],v[3],v[4]];break;case"T":l=="Q"||l=="T"?(a=2*p-a,u=2*c-u):(a=p,u=c),v=w(p,c,a,u,v[1],v[2]);break;case"Q":a=v[1],u=v[2],v=w(p,c,v[1],v[2],v[3],v[4]);break;case"L":v=_(p,c,v[1],v[2]);break;case"H":v=_(p,c,v[1],c);break;case"V":v=_(p,c,p,v[1]);break;case"Z":v=_(p,c,n,o)}l=x,p=v[v.length-2],c=v[v.length-1],v.length>4?(i=v[v.length-4],r=v[v.length-3]):(i=p,r=c),t.push(v)}return t}},56131:function(D){var E=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;function w(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}D.exports=function(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var T={},m=0;m<10;m++)T["_"+String.fromCharCode(m)]=m;if(Object.getOwnPropertyNames(T).map(function(l){return T[l]}).join("")!=="0123456789")return!1;var f={};return"abcdefghijklmnopqrst".split("").forEach(function(l){f[l]=l}),Object.keys(Object.assign({},f)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}()?Object.assign:function(s,T){for(var m,f,l=w(s),t=1;t"u")return!1;for(var o in window)try{if(!r["$"+o]&&w.call(window,o)&&window[o]!==null&&typeof window[o]=="object")try{i(window[o])}catch{return!0}}catch{return!0}return!1}();_=function(o){var a=o!==null&&typeof o=="object",u=s.call(o)==="[object Function]",p=T(o),c=a&&s.call(o)==="[object String]",b=[];if(!a&&!u&&!p)throw new TypeError("Object.keys called on a non-object");var d=l&&u;if(c&&o.length>0&&!w.call(o,0))for(var v=0;v0)for(var x=0;x"u"||!n)return i(h);try{return i(h)}catch{return!1}}(o),k=0;k=0&&E.call(e.callee)==="[object Function]"),w}},88641:function(D){function E(w,s){if(typeof w!="string")return[w];var T=[w];typeof s=="string"||Array.isArray(s)?s={brackets:s}:s||(s={});var m=s.brackets?Array.isArray(s.brackets)?s.brackets:[s.brackets]:["{}","[]","()"],f=s.escape||"___",l=!!s.flat;m.forEach(function(i){var r=new RegExp(["\\",i[0],"[^\\",i[0],"\\",i[1],"]*\\",i[1]].join("")),n=[];function o(a,u,p){var c=T.push(a.slice(i[0].length,-i[1].length))-1;return n.push(c),f+c+f}T.forEach(function(a,u){for(var p,c=0;a!=p;)if(p=a,a=a.replace(r,o),c++>1e4)throw Error("References have circular dependency. Please, check them.");T[u]=a}),n=n.reverse(),T=T.map(function(a){return n.forEach(function(u){a=a.replace(new RegExp("(\\"+f+u+"\\"+f+")","g"),i[0]+"$1"+i[1])}),a})});var t=new RegExp("\\"+f+"([0-9]+)\\"+f);return l?T:function i(r,n,o){for(var a,u=[],p=0;a=t.exec(r);){if(p++>1e4)throw Error("Circular references in parenthesis");u.push(r.slice(0,a.index)),u.push(i(n[a[1]],n)),r=r.slice(a.index+a[0].length)}return u.push(r),u}(T[0],T)}function e(w,s){if(s&&s.flat){var T,m=s&&s.escape||"___",f=w[0];if(!f)return"";for(var l=new RegExp("\\"+m+"([0-9]+)\\"+m),t=0;f!=T;){if(t++>1e4)throw Error("Circular references in "+w);T=f,f=f.replace(l,i)}return f}return w.reduce(function r(n,o){return Array.isArray(o)&&(o=o.reduce(r,"")),n+o},"");function i(r,n){if(w[n]==null)throw Error("Reference "+n+"is undefined");return w[n]}}function _(w,s){return Array.isArray(w)?e(w,s):E(w,s)}_.parse=E,_.stringify=e,D.exports=_},18863:function(D,E,e){var _=e(71299);D.exports=function(w){var s;return arguments.length>1&&(w=arguments),typeof w=="string"?w=w.split(/\s/).map(parseFloat):typeof w=="number"&&(w=[w]),w.length&&typeof w[0]=="number"?s=w.length===1?{width:w[0],height:w[0],x:0,y:0}:w.length===2?{width:w[0],height:w[1],x:0,y:0}:{x:w[0],y:w[1],width:w[2]-w[0]||0,height:w[3]-w[1]||0}:w&&(s={x:(w=_(w,{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"})).left||0,y:w.top||0},w.width==null?w.right?s.width=w.right-s.x:s.width=0:s.width=w.width,w.height==null?w.bottom?s.height=w.bottom-s.y:s.height=0:s.height=w.height),s}},95616:function(D){D.exports=function(w){var s=[];return w.replace(e,function(T,m,f){var l=m.toLowerCase();for(f=function(t){var i=t.match(_);return i?i.map(Number):[]}(f),l=="m"&&f.length>2&&(s.push([m].concat(f.splice(0,2))),l="l",m=m=="m"?"l":"L");;){if(f.length==E[l])return f.unshift(m),s.push(f);if(f.lengthT!=o>T&&s<(n-i)*(T-r)/(o-r)+i&&(m=!m)}return m}},52142:function(D,E,e){var _,w=e(69444),s=e(29023),T=e(87263),m=e(11328),f=e(55968),l=e(10670),t=!1,i=s();function r(n,o,a){var u=_.segments(n),p=_.segments(o),c=a(_.combine(u,p));return _.polygon(c)}_={buildLog:function(n){return n===!0?t=w():n===!1&&(t=!1),t!==!1&&t.list},epsilon:function(n){return i.epsilon(n)},segments:function(n){var o=T(!0,i,t);return n.regions.forEach(o.addRegion),{segments:o.calculate(n.inverted),inverted:n.inverted}},combine:function(n,o){return{combined:T(!1,i,t).calculate(n.segments,n.inverted,o.segments,o.inverted),inverted1:n.inverted,inverted2:o.inverted}},selectUnion:function(n){return{segments:f.union(n.combined,t),inverted:n.inverted1||n.inverted2}},selectIntersect:function(n){return{segments:f.intersect(n.combined,t),inverted:n.inverted1&&n.inverted2}},selectDifference:function(n){return{segments:f.difference(n.combined,t),inverted:n.inverted1&&!n.inverted2}},selectDifferenceRev:function(n){return{segments:f.differenceRev(n.combined,t),inverted:!n.inverted1&&n.inverted2}},selectXor:function(n){return{segments:f.xor(n.combined,t),inverted:n.inverted1!==n.inverted2}},polygon:function(n){return{regions:m(n.segments,i,t),inverted:n.inverted}},polygonFromGeoJSON:function(n){return l.toPolygon(_,n)},polygonToGeoJSON:function(n){return l.fromPolygon(_,i,n)},union:function(n,o){return r(n,o,_.selectUnion)},intersect:function(n,o){return r(n,o,_.selectIntersect)},difference:function(n,o){return r(n,o,_.selectDifference)},differenceRev:function(n,o){return r(n,o,_.selectDifferenceRev)},xor:function(n,o){return r(n,o,_.selectXor)}},typeof window=="object"&&(window.PolyBool=_),D.exports=_},69444:function(D){D.exports=function(){var E,e=0,_=!1;function w(s,T){return E.list.push({type:s,data:T?JSON.parse(JSON.stringify(T)):void 0}),E}return E={list:[],segmentId:function(){return e++},checkIntersection:function(s,T){return w("check",{seg1:s,seg2:T})},segmentChop:function(s,T){return w("div_seg",{seg:s,pt:T}),w("chop",{seg:s,pt:T})},statusRemove:function(s){return w("pop_seg",{seg:s})},segmentUpdate:function(s){return w("seg_update",{seg:s})},segmentNew:function(s,T){return w("new_seg",{seg:s,primary:T})},segmentRemove:function(s){return w("rem_seg",{seg:s})},tempStatus:function(s,T,m){return w("temp_status",{seg:s,above:T,below:m})},rewind:function(s){return w("rewind",{seg:s})},status:function(s,T,m){return w("status",{seg:s,above:T,below:m})},vert:function(s){return s===_?E:(_=s,w("vert",{x:s}))},log:function(s){return typeof s!="string"&&(s=JSON.stringify(s,!1," ")),w("log",{txt:s})},reset:function(){return w("reset")},selected:function(s){return w("selected",{segs:s})},chainStart:function(s){return w("chain_start",{seg:s})},chainRemoveHead:function(s,T){return w("chain_rem_head",{index:s,pt:T})},chainRemoveTail:function(s,T){return w("chain_rem_tail",{index:s,pt:T})},chainNew:function(s,T){return w("chain_new",{pt1:s,pt2:T})},chainMatch:function(s){return w("chain_match",{index:s})},chainClose:function(s){return w("chain_close",{index:s})},chainAddHead:function(s,T){return w("chain_add_head",{index:s,pt:T})},chainAddTail:function(s,T){return w("chain_add_tail",{index:s,pt:T})},chainConnect:function(s,T){return w("chain_con",{index1:s,index2:T})},chainReverse:function(s){return w("chain_rev",{index:s})},chainJoin:function(s,T){return w("chain_join",{index1:s,index2:T})},done:function(){return w("done")}}}},29023:function(D){D.exports=function(E){typeof E!="number"&&(E=1e-10);var e={epsilon:function(_){return typeof _=="number"&&(E=_),E},pointAboveOrOnLine:function(_,w,s){var T=w[0],m=w[1],f=s[0],l=s[1],t=_[0];return(f-T)*(_[1]-m)-(l-m)*(t-T)>=-E},pointBetween:function(_,w,s){var T=_[1]-w[1],m=s[0]-w[0],f=_[0]-w[0],l=s[1]-w[1],t=f*m+T*l;return!(t-E)},pointsSameX:function(_,w){return Math.abs(_[0]-w[0])E!=f-T>E&&(m-i)*(T-r)/(f-r)+i-s>E&&(l=!l),m=i,f=r}return l}};return e}},10670:function(D){var E={toPolygon:function(e,_){function w(m){if(m.length<=0)return e.segments({inverted:!1,regions:[]});function f(i){var r=i.slice(0,i.length-1);return e.segments({inverted:!1,regions:[r]})}for(var l=f(m[0]),t=1;t0})}function p(C,L){var O=C.seg,I=L.seg,R=O.start,U=O.end,B=I.start,G=I.end;T&&T.checkIntersection(O,I);var N=s.linesIntersect(R,U,B,G);if(N===!1){if(!s.pointsCollinear(R,U,B)||s.pointsSame(R,G)||s.pointsSame(U,B))return!1;var j=s.pointsSame(R,B),V=s.pointsSame(U,G);if(j&&V)return L;var H=!j&&s.pointBetween(R,B,G),ee=!V&&s.pointBetween(U,B,G);if(j)return ee?i(L,U):i(C,G),L;H&&(V||(ee?i(L,U):i(C,G)),i(L,R))}else N.alongA===0&&(N.alongB===-1?i(C,B):N.alongB===0?i(C,N.pt):N.alongB===1&&i(C,G)),N.alongB===0&&(N.alongA===-1?i(L,R):N.alongA===0?i(L,N.pt):N.alongA===1&&i(L,U));return!1}for(var c=[];!f.isEmpty();){var b=f.getHead();if(T&&T.vert(b.pt[0]),b.isStart){let C=function(){if(v){var L=p(b,v);if(L)return L}return!!x&&p(b,x)};var A=C;T&&T.segmentNew(b.seg,b.primary);var d=u(b),v=d.before?d.before.ev:null,x=d.after?d.after.ev:null;T&&T.tempStatus(b.seg,!!v&&v.seg,!!x&&x.seg);var g,y,k=C();if(k&&(w?(y=b.seg.myFill.below===null||b.seg.myFill.above!==b.seg.myFill.below)&&(k.seg.myFill.above=!k.seg.myFill.above):k.seg.otherFill=b.seg.myFill,T&&T.segmentUpdate(k.seg),b.other.remove(),b.remove()),f.getHead()!==b){T&&T.rewind(b.seg);continue}w?(y=b.seg.myFill.below===null||b.seg.myFill.above!==b.seg.myFill.below,b.seg.myFill.below=x?x.seg.myFill.above:n,b.seg.myFill.above=y?!b.seg.myFill.below:b.seg.myFill.below):b.seg.otherFill===null&&(g=x?b.primary===x.primary?x.seg.otherFill.above:x.seg.myFill.above:b.primary?o:n,b.seg.otherFill={above:g,below:g}),T&&T.status(b.seg,!!v&&v.seg,!!x&&x.seg),b.other.status=d.insert(_.node({ev:b}))}else{var h=b.status;if(h===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(a.exists(h.prev)&&a.exists(h.next)&&p(h.prev.ev,h.next.ev),T&&T.statusRemove(h.ev.seg),h.remove(),!b.primary){var M=b.seg.myFill;b.seg.myFill=b.seg.otherFill,b.seg.otherFill=M}c.push(b.seg)}f.getHead().remove()}return T&&T.done(),c}return w?{addRegion:function(n){for(var o,a,u,p=n[n.length-1],c=0;c0&&!this.aborted;){var T=this.ifds_to_read.shift();T.offset&&this.scan_ifd(T.id,T.offset,w)}},_.prototype.read_uint16=function(w){var s=this.input;if(w+2>s.length)throw E("unexpected EOF","EBADDATA");return this.big_endian?256*s[w]+s[w+1]:s[w]+256*s[w+1]},_.prototype.read_uint32=function(w){var s=this.input;if(w+4>s.length)throw E("unexpected EOF","EBADDATA");return this.big_endian?16777216*s[w]+65536*s[w+1]+256*s[w+2]+s[w+3]:s[w]+256*s[w+1]+65536*s[w+2]+16777216*s[w+3]},_.prototype.is_subifd_link=function(w,s){return w===0&&s===34665||w===0&&s===34853||w===34665&&s===40965},_.prototype.exif_format_length=function(w){switch(w){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}},_.prototype.exif_format_read=function(w,s){var T;switch(w){case 1:case 2:return this.input[s];case 6:return(T=this.input[s])|33554430*(128&T);case 3:return this.read_uint16(s);case 8:return(T=this.read_uint16(s))|131070*(32768&T);case 4:return this.read_uint32(s);case 9:return 0|this.read_uint32(s);default:return null}},_.prototype.scan_ifd=function(w,s,T){var m=this.read_uint16(s);s+=2;for(var f=0;fthis.input.length)throw E("unexpected EOF","EBADDATA");for(var u=[],p=o,c=0;c0&&(this.ifds_to_read.push({id:l,offset:u[0]}),a=!0),T({is_big_endian:this.big_endian,ifd:w,tag:l,format:t,count:i,entry_offset:s+this.start,data_length:n,data_offset:o+this.start,value:u,is_subifd_link:a})===!1)return void(this.aborted=!0);s+=12}w===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(s)})},D.exports.ExifParser=_,D.exports.get_orientation=function(w){var s=0;try{return new _(w,0,w.length).each(function(T){if(T.ifd===0&&T.tag===274&&Array.isArray(T.value))return s=T.value[0],!1}),s}catch{return-1}}},76767:function(D,E,e){var _=e(14847).n8,w=e(14847).Ag;function s(i,r){if(i.length<4+r)return null;var n=w(i,r);return i.length>4&15,o=15&i[4],a=i[5]>>4&15,u=_(i,6),p=8,c=0;cd.width||b.width===d.width&&b.height>d.height?b:d}),a=n.reduce(function(b,d){return b.height>d.height||b.height===d.height&&b.width>d.width?b:d}),o.width>a.height||o.width===a.height&&o.height>a.width?o:a),p=1;r.transforms.forEach(function(b){var d={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},v={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(b.type==="imir"&&(p=b.value===0?v[p]:d[p=d[p=v[p]]]),b.type==="irot")for(var x=0;x1&&(u.variants=a.variants),a.orientation&&(u.orientation=a.orientation),a.exif_location&&a.exif_location.offset+a.exif_location.length<=l.length){var p=s(l,a.exif_location.offset),c=l.slice(a.exif_location.offset+p+4,a.exif_location.offset+a.exif_location.length),b=m.get_orientation(c);b>0&&(u.orientation=b)}return u}}}}}}},2504:function(D,E,e){var _=e(14847).eG,w=e(14847).OF,s=e(14847).mP,T=_("BM");D.exports=function(m){if(!(m.length<26)&&w(m,0,T))return{width:s(m,18),height:s(m,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}},47342:function(D,E,e){var _=e(14847).eG,w=e(14847).OF,s=e(14847).mP,T=_("GIF87a"),m=_("GIF89a");D.exports=function(f){if(!(f.length<10)&&(w(f,0,T)||w(f,0,m)))return{width:s(f,6),height:s(f,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}},31355:function(D,E,e){var _=e(14847).mP;D.exports=function(w){var s=_(w,0),T=_(w,2),m=_(w,4);if(s===0&&T===1&&m){for(var f=[],l={width:0,height:0},t=0;tl.width||r>l.height)&&(l=n)}return{width:l.width,height:l.height,variants:f,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}},54261:function(D,E,e){var _=e(14847).n8,w=e(14847).eG,s=e(14847).OF,T=e(71371),m=w("Exif\0\0");D.exports=function(f){if(!(f.length<2)&&f[0]===255&&f[1]===216&&f[2]===255)for(var l=2;;){for(;;){if(f.length-l<2)return;if(f[l++]===255)break}for(var t,i,r=f[l++];r===255;)r=f[l++];if(208<=r&&r<=217||r===1)t=0;else{if(!(192<=r&&r<=254)||f.length-l<2)return;t=_(f,l)-2,l+=2}if(r===217||r===218)return;if(r===225&&t>=10&&s(f,l,m)&&(i=T.get_orientation(f.slice(l+6,l+t))),t>=5&&192<=r&&r<=207&&r!==196&&r!==200&&r!==204){if(f.length-l0&&(n.orientation=i),n}l+=t}}},6303:function(D,E,e){var _=e(14847).eG,w=e(14847).OF,s=e(14847).Ag,T=_(`‰PNG\r  -`),y=_("IHDR");D.exports=function(f){if(!(f.length<24)&&w(f,0,T)&&w(f,12,y))return{width:s(f,16),height:s(f,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}},38689:function(D,E,e){var _=e(14847).eG,w=e(14847).OF,s=e(14847).Ag,T=_("8BPS\0");D.exports=function(y){if(!(y.length<22)&&w(y,0,T))return{width:s(y,18),height:s(y,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}},6881:function(D){function E(l){return typeof l=="number"&&isFinite(l)&&l>0}var e=/<[-_.:a-zA-Z0-9][^>]*>/,_=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,w=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,s=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,T=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,y=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function f(l){return y.test(l)?l.match(y)[0]:"px"}D.exports=function(l){if(function(v){var x,g=0,m=v.length;for(v[0]===239&&v[1]===187&&v[2]===191&&(g=3);g>14&16383),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function r(n,o){return{width:1+(n[o+6]<<16|n[o+5]<<8|n[o+4]),height:1+(n[o+9]<n.length)){for(;o+8=10?a=a||t(n,o+8):c==="VP8L"&&b>=9?a=a||i(n,o+8):c==="VP8X"&&b>=10?a=a||r(n,o+8):c==="EXIF"&&(u=y.get_orientation(n.slice(o+8,o+8+b)),o=1/0),o+=8+b}else o++;if(a)return u>0&&(a.orientation=u),a}}}},91497:function(D,E,e){D.exports={avif:e(24461),bmp:e(2504),gif:e(47342),ico:e(31355),jpeg:e(54261),png:e(6303),psd:e(38689),svg:e(6881),tiff:e(66278),webp:e(90784)}},33575:function(D,E,e){var _=e(91497);D.exports=function(w){return function(s){for(var T=Object.keys(_),y=0;y1)for(var p=1;p"u"?e.g:window,s=["moz","webkit"],T="AnimationFrame",y=w["request"+T],f=w["cancel"+T]||w["cancelRequest"+T],l=0;!y&&l0}var e=/<[-_.:a-zA-Z0-9][^>]*>/,_=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,w=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,s=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,T=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,m=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function f(l){return m.test(l)?l.match(m)[0]:"px"}D.exports=function(l){if(function(v){var x,g=0,y=v.length;for(v[0]===239&&v[1]===187&&v[2]===191&&(g=3);g>14&16383),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function r(n,o){return{width:1+(n[o+6]<<16|n[o+5]<<8|n[o+4]),height:1+(n[o+9]<n.length)){for(;o+8=10?a=a||t(n,o+8):c==="VP8L"&&b>=9?a=a||i(n,o+8):c==="VP8X"&&b>=10?a=a||r(n,o+8):c==="EXIF"&&(u=m.get_orientation(n.slice(o+8,o+8+b)),o=1/0),o+=8+b}else o++;if(a)return u>0&&(a.orientation=u),a}}}},91497:function(D,E,e){D.exports={avif:e(24461),bmp:e(2504),gif:e(47342),ico:e(31355),jpeg:e(54261),png:e(6303),psd:e(38689),svg:e(6881),tiff:e(66278),webp:e(90784)}},33575:function(D,E,e){var _=e(91497);D.exports=function(w){return function(s){for(var T=Object.keys(_),m=0;m1)for(var p=1;p"u"?e.g:window,s=["moz","webkit"],T="AnimationFrame",m=w["request"+T],f=w["cancel"+T]||w["cancelRequest"+T],l=0;!m&&l1&&(C.scaleRatio=[C.scale[0]*C.viewport.width,C.scale[1]*C.viewport.height],a(C),C.after&&C.after(C))}function M(C){if(C){C.length!=null?typeof C[0]=="number"&&(C=[{positions:C}]):Array.isArray(C)||(C=[C]);var L=0,O=0;if(m.groups=g=C.map(function(j,V){var H=g[V];return j&&(typeof j=="function"?j={after:j}:typeof j[0]=="number"&&(j={positions:j}),j=T(j,{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"}),H||(g[V]=H={id:V,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},j=y({},x,j)),s(H,j,[{lineWidth:function(ee){return .5*+ee},capSize:function(ee){return .5*+ee},opacity:parseFloat,errors:function(ee){return ee=f(ee),O+=ee.length,ee},positions:function(ee,Q){return ee=f(ee,"float64"),Q.count=Math.floor(ee.length/2),Q.bounds=_(ee,2),Q.offset=L,L+=Q.count,ee}},{color:function(ee,Q){var X=Q.count;if(ee||(ee="transparent"),!Array.isArray(ee)||typeof ee[0]=="number"){var Y=ee;ee=Array(X);for(var K=0;K1&&(C.scaleRatio=[C.scale[0]*C.viewport.width,C.scale[1]*C.viewport.height],a(C),C.after&&C.after(C))}function M(C){if(C){C.length!=null?typeof C[0]=="number"&&(C=[{positions:C}]):Array.isArray(C)||(C=[C]);var L=0,O=0;if(y.groups=g=C.map(function(j,V){var H=g[V];return j&&(typeof j=="function"?j={after:j}:typeof j[0]=="number"&&(j={positions:j}),j=T(j,{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"}),H||(g[V]=H={id:V,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},j=m({},x,j)),s(H,j,[{lineWidth:function(ee){return .5*+ee},capSize:function(ee){return .5*+ee},opacity:parseFloat,errors:function(ee){return ee=f(ee),O+=ee.length,ee},positions:function(ee,Q){return ee=f(ee,"float64"),Q.count=Math.floor(ee.length/2),Q.bounds=_(ee,2),Q.offset=L,L+=Q.count,ee}},{color:function(ee,Q){var Y=Q.count;if(ee||(ee="transparent"),!Array.isArray(ee)||typeof ee[0]=="number"){var X=ee;ee=Array(Y);for(var K=0;K1&&v.opacity&&(c.regl._refresh(),v.fill&&v.triangles&&v.triangles.length>2&&c.shaders.fill(v),v.thickness&&(v.scale[0]*v.viewport.width>p.precisionThreshold||v.scale[1]*v.viewport.height>p.precisionThreshold||v.join==="rect"||!v.join&&(v.thickness<=2||v.count>=p.maxPoints)?c.shaders.rect(v):c.shaders.miter(v)))}),this},p.prototype.update=function(c){var b=this;if(c){c.length!=null?typeof c[0]=="number"&&(c=[{positions:c}]):Array.isArray(c)||(c=[c]);var d=this.regl,v=this.gl;if(c.forEach(function(h,M){var A=b.passes[M];if(h!==void 0)if(h!==null){if(typeof h[0]=="number"&&(h={positions:h}),h=y(h,{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"}),A||(b.passes[M]=A={id:M,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:d.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:d.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:d.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:d.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},h=s({},p.defaults,h)),h.thickness!=null&&(A.thickness=parseFloat(h.thickness)),h.opacity!=null&&(A.opacity=parseFloat(h.opacity)),h.miterLimit!=null&&(A.miterLimit=parseFloat(h.miterLimit)),h.overlay!=null&&(A.overlay=!!h.overlay,M=te});(X=X.slice(0,ae)).push(te)}for(var oe=function(Tt){var xt=B.slice(2*K,2*X[Tt]).concat(te?B.slice(2*te):[]),Dt=(A.hole||[]).map(function(Ft){return Ft-te+(X[Tt]-K)}),It=l(xt,Dt);It=It.map(function(Ft){return Ft+K+(Ft+Kv.length)&&(x=v.length);for(var g=0,m=new Array(x);g1&&v.opacity&&(c.regl._refresh(),v.fill&&v.triangles&&v.triangles.length>2&&c.shaders.fill(v),v.thickness&&(v.scale[0]*v.viewport.width>p.precisionThreshold||v.scale[1]*v.viewport.height>p.precisionThreshold||v.join==="rect"||!v.join&&(v.thickness<=2||v.count>=p.maxPoints)?c.shaders.rect(v):c.shaders.miter(v)))}),this},p.prototype.update=function(c){var b=this;if(c){c.length!=null?typeof c[0]=="number"&&(c=[{positions:c}]):Array.isArray(c)||(c=[c]);var d=this.regl,v=this.gl;if(c.forEach(function(h,M){var A=b.passes[M];if(h!==void 0)if(h!==null){if(typeof h[0]=="number"&&(h={positions:h}),h=m(h,{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"}),A||(b.passes[M]=A={id:M,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:d.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:d.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:d.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:d.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},h=s({},p.defaults,h)),h.thickness!=null&&(A.thickness=parseFloat(h.thickness)),h.opacity!=null&&(A.opacity=parseFloat(h.opacity)),h.miterLimit!=null&&(A.miterLimit=parseFloat(h.miterLimit)),h.overlay!=null&&(A.overlay=!!h.overlay,M=te});(Y=Y.slice(0,ae)).push(te)}for(var oe=function(Tt){var xt=B.slice(2*K,2*Y[Tt]).concat(te?B.slice(2*te):[]),Dt=(A.hole||[]).map(function(Ft){return Ft-te+(Y[Tt]-K)}),It=l(xt,Dt);It=It.map(function(Ft){return Ft+K+(Ft+Kv.length)&&(x=v.length);for(var g=0,y=new Array(x);gRe)?he.tree=l(de,{bounds:ne}):Re&&Re.length&&(he.tree=Re),he.tree){var ue={primitive:"points",usage:"static",data:he.tree,type:"uint32"};he.elements?he.elements(ue):he.elements=M.elements(ue)}var me=u.float32(de);return we({data:me,usage:"dynamic"}),Ae({data:u.fract32(de,me),usage:"dynamic"}),Me({data:new Uint8Array(Ce),type:"uint8",usage:"stream"}),de}},{marker:function(de,he,xe){var Re=he.activation;if(Re.forEach(function(me){return me&&me.destroy&&me.destroy()}),Re.length=0,de&&typeof de[0]!="number"){for(var we=[],Ae=0,Me=Math.min(de.length,he.count);Ae=0)return h;if(v instanceof Uint8Array||v instanceof Uint8ClampedArray)x=v;else{x=new Uint8Array(v.length);for(var M=0,A=v.length;M4*m&&(this.tooManyColors=!0),this.updatePalette(g),k.length===1?k[0]:k},b.prototype.updatePalette=function(v){if(!this.tooManyColors){var x=this.maxColors,g=this.paletteTexture,m=Math.ceil(.25*v.length/x);if(m>1)for(var k=.25*(v=v.slice()).length%x;k2?(v[0],v[2],p=v[1],c=v[3]):v.length?(p=v[0],c=v[1]):(v.x,p=v.y,v.x,v.width,c=v.y+v.height),x.length>2?(b=x[0],d=x[2],x[1],x[3]):x.length?(b=x[0],d=x[1]):(b=x.x,x.y,d=x.x+x.width,x.y,x.height),[b,p,d,c]}function n(o){if(typeof o=="number")return[o,o,o,o];if(o.length===2)return[o[0],o[1],o[0],o[1]];var a=f(o);return[a.x,a.y,a.x+a.width,a.y+a.height]}D.exports=t,t.prototype.render=function(){for(var o,a=this,u=[],p=arguments.length;p--;)u[p]=arguments[p];return u.length&&(o=this).update.apply(o,u),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=T(function(){a.draw(),a.dirty=!0,a.planned=null})):(this.draw(),this.dirty=!0,T(function(){a.dirty=!1})),this)},t.prototype.update=function(){for(var o,a=[],u=arguments.length;u--;)a[u]=arguments[u];if(a.length){for(var p=0;pO))&&(b.lower||!(L"u"?1:window.devicePixelRatio,Lt=!1,Ct={},mt=function(_t){},Ot=function(){};if(typeof Qe=="string"?nt=document.querySelector(Qe):typeof Qe=="object"&&(typeof Qe.nodeName=="string"&&typeof Qe.appendChild=="function"&&typeof Qe.getBoundingClientRect=="function"?nt=Qe:typeof Qe.drawArrays=="function"||typeof Qe.drawElements=="function"?Oe=(Be=Qe).canvas:("gl"in Qe?Be=Qe.gl:"canvas"in Qe?Oe=s(Qe.canvas):"container"in Qe&&(ht=s(Qe.container)),"attributes"in Qe&&(Ge=Qe.attributes),"extensions"in Qe&&(ut=w(Qe.extensions)),"optionalExtensions"in Qe&&(pt=w(Qe.optionalExtensions)),"onDone"in Qe&&(mt=Qe.onDone),"profile"in Qe&&(Lt=!!Qe.profile),"pixelRatio"in Qe&&(bt=+Qe.pixelRatio),"cachedCode"in Qe&&(Ct=Qe.cachedCode))),nt&&(nt.nodeName.toLowerCase()==="canvas"?Oe=nt:ht=nt),!Be){if(!Oe){if(!(nt=function(_t,Pt,Bt){function Wt(){var Kt=window.innerWidth,nn=window.innerHeight;_t!==document.body&&(Kt=(nn=Xt.getBoundingClientRect()).right-nn.left,nn=nn.bottom-nn.top),Xt.width=Bt*Kt,Xt.height=Bt*nn}var Gt,Xt=document.createElement("canvas");return te(Xt.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),_t.appendChild(Xt),_t===document.body&&(Xt.style.position="absolute",te(_t.style,{margin:0,padding:0})),_t!==document.body&&typeof ResizeObserver=="function"?(Gt=new ResizeObserver(function(){setTimeout(Wt)})).observe(_t):window.addEventListener("resize",Wt,!1),Wt(),{canvas:Xt,onDestroy:function(){Gt?Gt.disconnect():window.removeEventListener("resize",Wt),_t.removeChild(Xt)}}}(ht||document.body,0,bt)))return null;Oe=nt.canvas,Ot=nt.onDestroy}Ge.premultipliedAlpha===void 0&&(Ge.premultipliedAlpha=!0),Be=function(_t,Pt){function Bt(Wt){try{return _t.getContext(Wt,Pt)}catch{return null}}return Bt("webgl")||Bt("experimental-webgl")||Bt("webgl-experimental")}(Oe,Ge)}return Be?{gl:Be,canvas:Oe,container:ht,extensions:ut,optionalExtensions:pt,pixelRatio:bt,profile:Lt,cachedCode:Ct,onDone:mt,onDestroy:Ot}:(Ot(),mt("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function y(Ge,nt){for(var ht=Array(Ge),Oe=0;Oe>>=nt))<<3,(nt|=ht=(15<(Ge>>>=ht))<<2)|(ht=(3<(Ge>>>=ht))<<1)|Ge>>>ht>>1}function l(){function Ge(Oe){e:{for(var Be=16;268435456>=Be;Be*=16)if(Oe<=Be){Oe=Be;break e}Oe=0}return 0<(Be=ht[f(Oe)>>2]).length?Be.pop():new ArrayBuffer(Oe)}function nt(Oe){ht[f(Oe.byteLength)>>2].push(Oe)}var ht=y(8,function(){return[]});return{alloc:Ge,free:nt,allocType:function(Oe,Be){var Qe=null;switch(Oe){case 5120:Qe=new Int8Array(Ge(Be),0,Be);break;case 5121:Qe=new Uint8Array(Ge(Be),0,Be);break;case 5122:Qe=new Int16Array(Ge(2*Be),0,Be);break;case 5123:Qe=new Uint16Array(Ge(2*Be),0,Be);break;case 5124:Qe=new Int32Array(Ge(4*Be),0,Be);break;case 5125:Qe=new Uint32Array(Ge(4*Be),0,Be);break;case 5126:Qe=new Float32Array(Ge(4*Be),0,Be);break;default:return null}return Qe.length!==Be?Qe.subarray(0,Be):Qe},freeType:function(Oe){nt(Oe.buffer)}}}function t(Ge){return!!Ge&&typeof Ge=="object"&&Array.isArray(Ge.shape)&&Array.isArray(Ge.stride)&&typeof Ge.offset=="number"&&Ge.shape.length===Ge.stride.length&&(Array.isArray(Ge.data)||de(Ge.data))}function i(Ge,nt,ht,Oe,Be,Qe){for(var ut=0;ut(Ot=Bt)&&(Ot=mt.buffer.byteLength,Xt===5123?Ot>>=1:Xt===5125&&(Ot>>=2)),mt.vertCount=Ot,Ot=Pt,0>Pt&&(Ot=4,(Pt=mt.buffer.dimension)===1&&(Ot=0),Pt===2&&(Ot=1),Pt===3&&(Ot=4)),mt.primType=Ot}function ut(mt){Oe.elementsCount--,delete pt[mt.id],mt.buffer.destroy(),mt.buffer=null}var pt={},bt=0,Lt={uint8:5121,uint16:5123};nt.oes_element_index_uint&&(Lt.uint32=5125),Be.prototype.bind=function(){this.buffer.bind()};var Ct=[];return{create:function(mt,Ot){function _t(Wt){if(Wt)if(typeof Wt=="number")Pt(Wt),Bt.primType=4,Bt.vertCount=0|Wt,Bt.type=5121;else{var Gt=null,Xt=35044,Kt=-1,nn=-1,yn=0,ln=0;Array.isArray(Wt)||de(Wt)||t(Wt)?Gt=Wt:("data"in Wt&&(Gt=Wt.data),"usage"in Wt&&(Xt=Ae[Wt.usage]),"primitive"in Wt&&(Kt=ue[Wt.primitive]),"count"in Wt&&(nn=0|Wt.count),"type"in Wt&&(ln=Lt[Wt.type]),"length"in Wt?yn=0|Wt.length:(yn=nn,ln===5123||ln===5122?yn*=2:ln!==5125&&ln!==5124||(yn*=4))),Qe(Bt,Gt,Xt,Kt,nn,yn,ln)}else Pt(),Bt.primType=4,Bt.vertCount=0,Bt.type=5121;return _t}var Pt=ht.create(null,34963,!0),Bt=new Be(Pt._buffer);return Oe.elementsCount++,_t(mt),_t._reglType="elements",_t._elements=Bt,_t.subdata=function(Wt,Gt){return Pt.subdata(Wt,Gt),_t},_t.destroy=function(){ut(Bt)},_t},createStream:function(mt){var Ot=Ct.pop();return Ot||(Ot=new Be(ht.create(null,34963,!0,!1)._buffer)),Qe(Ot,mt,35040,-1,-1,0,0),Ot},destroyStream:function(mt){Ct.push(mt)},getElements:function(mt){return typeof mt=="function"&&mt._elements instanceof Be?mt._elements:null},clear:function(){he(pt).forEach(ut)}}}function c(Ge){for(var nt=ye.allocType(5123,Ge.length),ht=0;ht>>31<<15,Be=(Qe<<1>>>24)-127,Qe=Qe>>13&1023;nt[ht]=-24>Be?Oe:-14>Be?Oe+(Qe+1024>>-14-Be):15>=un,jt.height>>=un,Ot(jt,Jt[un]),tn.mipmask|=1<Pn;++Pn)tn.images[Pn]=null;return tn}function yn(tn){for(var Pn=tn.images,jt=0;jttn){for(var Pn=0;Pn=--this.refCount&&fn(this)}}),ut.profile&&(Qe.getTotalTextureSize=function(){var tn=0;return Object.keys(Zn).forEach(function(Pn){tn+=Zn[Pn].stats.size}),tn}),{create2D:function(tn,Pn){function jt(un,Rn){var On=Jt.texInfo;ln.call(On);var Sn=nn();return typeof un=="number"?Gt(Sn,0|un,typeof Rn=="number"?0|Rn:0|un):un?(kn(On,un),Xt(Sn,un)):Gt(Sn,1,1),On.genMipmaps&&(Sn.mipmask=(Sn.width<<1)-1),Jt.mipmask=Sn.mipmask,bt(Jt,Sn),Jt.internalformat=Sn.internalformat,jt.width=Sn.width,jt.height=Sn.height,on(Jt),Kt(Sn,3553),Wn(On,3553),_n(),yn(Sn),ut.profile&&(Jt.stats.size=h(Jt.internalformat,Jt.type,Sn.width,Sn.height,On.genMipmaps,!1)),jt.format=ir[Jt.internalformat],jt.type=dr[Jt.type],jt.mag=yr[On.magFilter],jt.min=$t[On.minFilter],jt.wrapS=mn[On.wrapS],jt.wrapT=mn[On.wrapT],jt}var Jt=new wn(3553);return Zn[Jt.id]=Jt,Qe.textureCount++,jt(tn,Pn),jt.subimage=function(un,Rn,On,Sn){Rn|=0,On|=0,Sn|=0;var pn=Pt();return bt(pn,Jt),pn.width=0,pn.height=0,Ot(pn,un),pn.width=pn.width||(Jt.width>>Sn)-Rn,pn.height=pn.height||(Jt.height>>Sn)-On,on(Jt),_t(pn,3553,Rn,On,Sn),_n(),Bt(pn),jt},jt.resize=function(un,Rn){var On=0|un,Sn=0|Rn||On;if(On===Jt.width&&Sn===Jt.height)return jt;jt.width=Jt.width=On,jt.height=Jt.height=Sn,on(Jt);for(var pn=0;Jt.mipmask>>pn;++pn){var bn=On>>pn,dn=Sn>>pn;if(!bn||!dn)break;Ge.texImage2D(3553,pn,Jt.format,bn,dn,0,Jt.format,Jt.type,null)}return _n(),ut.profile&&(Jt.stats.size=h(Jt.internalformat,Jt.type,On,Sn,!1,!1)),jt},jt._reglType="texture2d",jt._texture=Jt,ut.profile&&(jt.stats=Jt.stats),jt.destroy=function(){Jt.decRef()},jt},createCube:function(tn,Pn,jt,Jt,un,Rn){function On(bn,dn,vn,An,Bn,Xn){var er,Jn=Sn.texInfo;for(ln.call(Jn),er=0;6>er;++er)pn[er]=nn();if(typeof bn!="number"&&bn){if(typeof bn=="object")if(dn)Xt(pn[0],bn),Xt(pn[1],dn),Xt(pn[2],vn),Xt(pn[3],An),Xt(pn[4],Bn),Xt(pn[5],Xn);else if(kn(Jn,bn),Lt(Sn,bn),"faces"in bn)for(bn=bn.faces,er=0;6>er;++er)bt(pn[er],Sn),Xt(pn[er],bn[er]);else for(er=0;6>er;++er)Xt(pn[er],bn)}else for(bn=0|bn||1,er=0;6>er;++er)Gt(pn[er],bn,bn);for(bt(Sn,pn[0]),Sn.mipmask=Jn.genMipmaps?(pn[0].width<<1)-1:pn[0].mipmask,Sn.internalformat=pn[0].internalformat,On.width=pn[0].width,On.height=pn[0].height,on(Sn),er=0;6>er;++er)Kt(pn[er],34069+er);for(Wn(Jn,34067),_n(),ut.profile&&(Sn.stats.size=h(Sn.internalformat,Sn.type,On.width,On.height,Jn.genMipmaps,!0)),On.format=ir[Sn.internalformat],On.type=dr[Sn.type],On.mag=yr[Jn.magFilter],On.min=$t[Jn.minFilter],On.wrapS=mn[Jn.wrapS],On.wrapT=mn[Jn.wrapT],er=0;6>er;++er)yn(pn[er]);return On}var Sn=new wn(34067);Zn[Sn.id]=Sn,Qe.cubeCount++;var pn=Array(6);return On(tn,Pn,jt,Jt,un,Rn),On.subimage=function(bn,dn,vn,An,Bn){vn|=0,An|=0,Bn|=0;var Xn=Pt();return bt(Xn,Sn),Xn.width=0,Xn.height=0,Ot(Xn,dn),Xn.width=Xn.width||(Sn.width>>Bn)-vn,Xn.height=Xn.height||(Sn.height>>Bn)-An,on(Sn),_t(Xn,34069+bn,vn,An,Bn),_n(),Bt(Xn),On},On.resize=function(bn){if((bn|=0)!==Sn.width){On.width=Sn.width=bn,On.height=Sn.height=bn,on(Sn);for(var dn=0;6>dn;++dn)for(var vn=0;Sn.mipmask>>vn;++vn)Ge.texImage2D(34069+dn,vn,Sn.format,bn>>vn,bn>>vn,0,Sn.format,Sn.type,null);return _n(),ut.profile&&(Sn.stats.size=h(Sn.internalformat,Sn.type,On.width,On.height,!1,!0)),On}},On._reglType="textureCube",On._texture=Sn,ut.profile&&(On.stats=Sn.stats),On.destroy=function(){Sn.decRef()},On},clear:function(){for(var tn=0;tnJt;++Jt)if(jt.mipmask&1<>Jt,jt.height>>Jt,0,jt.internalformat,jt.type,null);else for(var un=0;6>un;++un)Ge.texImage2D(34069+un,Jt,jt.internalformat,jt.width>>Jt,jt.height>>Jt,0,jt.internalformat,jt.type,null);Wn(jt.texInfo,jt.target)})},refresh:function(){for(var tn=0;tnhn;++hn){for(qn=0;qnfn;++fn)_n[fn].resize(hn);return on.width=on.height=hn,on},_reglType:"framebufferCube",destroy:function(){_n.forEach(function(fn){fn.destroy()})}})},clear:function(){he(Wn).forEach(Wt)},restore:function(){Kt.cur=null,Kt.next=null,Kt.dirty=!0,he(Wn).forEach(function(wn){wn.framebuffer=Ge.createFramebuffer(),Gt(wn)})}})}function C(){this.w=this.z=this.y=this.x=this.state=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.divisor=this.stride=this.offset=0}function L(Ge,nt,ht,Oe,Be,Qe,ut){function pt(){this.id=++Ct,this.attributes=[],this.elements=null,this.ownsElements=!1,this.offset=this.count=0,this.instances=-1,this.primitive=4;var _t=nt.oes_vertex_array_object;this.vao=_t?_t.createVertexArrayOES():null,mt[this.id]=this,this.buffers=[]}var bt=ht.maxAttributes,Lt=Array(bt);for(ht=0;ht=kn.byteLength?nn.subdata(kn):(nn.destroy(),Bt.buffers[Kt]=null)),Bt.buffers[Kt]||(nn=Bt.buffers[Kt]=Be.create(yn,34962,!1,!0)),ln.buffer=Be.getBuffer(nn),ln.size=0|ln.buffer.dimension,ln.normalized=!1,ln.type=ln.buffer.dtype,ln.offset=0,ln.stride=0,ln.divisor=0,ln.state=1,Wt[Kt]=1):Be.getBuffer(yn)?(ln.buffer=Be.getBuffer(yn),ln.size=0|ln.buffer.dimension,ln.normalized=!1,ln.type=ln.buffer.dtype,ln.offset=0,ln.stride=0,ln.divisor=0,ln.state=1):Be.getBuffer(yn.buffer)?(ln.buffer=Be.getBuffer(yn.buffer),ln.size=0|(+yn.size||ln.buffer.dimension),ln.normalized=!!yn.normalized||!1,ln.type="type"in yn?we[yn.type]:ln.buffer.dtype,ln.offset=0|(yn.offset||0),ln.stride=0|(yn.stride||0),ln.divisor=0|(yn.divisor||0),ln.state=1):"x"in yn&&(ln.x=+yn.x||0,ln.y=+yn.y||0,ln.z=+yn.z||0,ln.w=+yn.w||0,ln.state=2)}for(nn=0;nnPt&&(Pt=Bt.stats.uniformsCount)}),Pt},ht.getMaxAttributesCount=function(){var Pt=0;return Ot.forEach(function(Bt){Bt.stats.attributesCount>Pt&&(Pt=Bt.stats.attributesCount)}),Pt}),{clear:function(){var Pt=Ge.deleteShader.bind(Ge);he(Lt).forEach(Pt),Lt={},he(Ct).forEach(Pt),Ct={},Ot.forEach(function(Bt){Ge.deleteProgram(Bt.program)}),Ot.length=0,mt={},ht.shaderCount=0},program:function(Pt,Bt,Wt,Gt){var Xt=mt[Bt];Xt||(Xt=mt[Bt]={});var Kt=Xt[Pt];if(Kt&&(Kt.refCount++,!Gt))return Kt;var nn=new pt(Bt,Pt);return ht.shaderCount++,bt(nn,Wt,Gt),Kt||(Xt[Pt]=nn),Ot.push(nn),te(nn,{destroy:function(){if(nn.refCount--,0>=nn.refCount){Ge.deleteProgram(nn.program);var yn=Ot.indexOf(nn);Ot.splice(yn,1),ht.shaderCount--}0>=Xt[nn.vertId].refCount&&(Ge.deleteShader(Ct[nn.vertId]),delete Ct[nn.vertId],delete mt[nn.fragId][nn.vertId]),Object.keys(mt[nn.fragId]).length||(Ge.deleteShader(Lt[nn.fragId]),delete Lt[nn.fragId],delete mt[nn.fragId])}})},restore:function(){Lt={},Ct={};for(var Pt=0;Pt>>nt|Ge<<32-nt}function U(Ge,nt){var ht=(65535&Ge)+(65535&nt);return(Ge>>16)+(nt>>16)+(ht>>16)<<16|65535&ht}function B(Ge){return Array.prototype.slice.call(Ge)}function G(Ge){return B(Ge).join("")}function N(Ge){function nt(){var Ct=[],mt=[];return te(function(){Ct.push.apply(Ct,B(arguments))},{def:function(){var Ot="v"+Be++;return mt.push(Ot),0Re)?pe.tree=l(de,{bounds:ne}):Re&&Re.length&&(pe.tree=Re),pe.tree){var ue={primitive:"points",usage:"static",data:pe.tree,type:"uint32"};pe.elements?pe.elements(ue):pe.elements=M.elements(ue)}var me=u.float32(de);return we({data:me,usage:"dynamic"}),Ae({data:u.fract32(de,me),usage:"dynamic"}),Me({data:new Uint8Array(Ce),type:"uint8",usage:"stream"}),de}},{marker:function(de,pe,ye){var Re=pe.activation;if(Re.forEach(function(me){return me&&me.destroy&&me.destroy()}),Re.length=0,de&&typeof de[0]!="number"){for(var we=[],Ae=0,Me=Math.min(de.length,pe.count);Ae=0)return h;if(v instanceof Uint8Array||v instanceof Uint8ClampedArray)x=v;else{x=new Uint8Array(v.length);for(var M=0,A=v.length;M4*y&&(this.tooManyColors=!0),this.updatePalette(g),k.length===1?k[0]:k},b.prototype.updatePalette=function(v){if(!this.tooManyColors){var x=this.maxColors,g=this.paletteTexture,y=Math.ceil(.25*v.length/x);if(y>1)for(var k=.25*(v=v.slice()).length%x;k2?(v[0],v[2],p=v[1],c=v[3]):v.length?(p=v[0],c=v[1]):(v.x,p=v.y,v.x,v.width,c=v.y+v.height),x.length>2?(b=x[0],d=x[2],x[1],x[3]):x.length?(b=x[0],d=x[1]):(b=x.x,x.y,d=x.x+x.width,x.y,x.height),[b,p,d,c]}function n(o){if(typeof o=="number")return[o,o,o,o];if(o.length===2)return[o[0],o[1],o[0],o[1]];var a=f(o);return[a.x,a.y,a.x+a.width,a.y+a.height]}D.exports=t,t.prototype.render=function(){for(var o,a=this,u=[],p=arguments.length;p--;)u[p]=arguments[p];return u.length&&(o=this).update.apply(o,u),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=T(function(){a.draw(),a.dirty=!0,a.planned=null})):(this.draw(),this.dirty=!0,T(function(){a.dirty=!1})),this)},t.prototype.update=function(){for(var o,a=[],u=arguments.length;u--;)a[u]=arguments[u];if(a.length){for(var p=0;pO))&&(b.lower||!(L"u"?1:window.devicePixelRatio,Lt=!1,Ct={},mt=function(_t){},Ot=function(){};if(typeof Qe=="string"?nt=document.querySelector(Qe):typeof Qe=="object"&&(typeof Qe.nodeName=="string"&&typeof Qe.appendChild=="function"&&typeof Qe.getBoundingClientRect=="function"?nt=Qe:typeof Qe.drawArrays=="function"||typeof Qe.drawElements=="function"?Oe=(Be=Qe).canvas:("gl"in Qe?Be=Qe.gl:"canvas"in Qe?Oe=s(Qe.canvas):"container"in Qe&&(ht=s(Qe.container)),"attributes"in Qe&&(Ge=Qe.attributes),"extensions"in Qe&&(ut=w(Qe.extensions)),"optionalExtensions"in Qe&&(pt=w(Qe.optionalExtensions)),"onDone"in Qe&&(mt=Qe.onDone),"profile"in Qe&&(Lt=!!Qe.profile),"pixelRatio"in Qe&&(bt=+Qe.pixelRatio),"cachedCode"in Qe&&(Ct=Qe.cachedCode))),nt&&(nt.nodeName.toLowerCase()==="canvas"?Oe=nt:ht=nt),!Be){if(!Oe){if(!(nt=function(_t,Pt,Bt){function Wt(){var Kt=window.innerWidth,nn=window.innerHeight;_t!==document.body&&(Kt=(nn=Xt.getBoundingClientRect()).right-nn.left,nn=nn.bottom-nn.top),Xt.width=Bt*Kt,Xt.height=Bt*nn}var Gt,Xt=document.createElement("canvas");return te(Xt.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),_t.appendChild(Xt),_t===document.body&&(Xt.style.position="absolute",te(_t.style,{margin:0,padding:0})),_t!==document.body&&typeof ResizeObserver=="function"?(Gt=new ResizeObserver(function(){setTimeout(Wt)})).observe(_t):window.addEventListener("resize",Wt,!1),Wt(),{canvas:Xt,onDestroy:function(){Gt?Gt.disconnect():window.removeEventListener("resize",Wt),_t.removeChild(Xt)}}}(ht||document.body,0,bt)))return null;Oe=nt.canvas,Ot=nt.onDestroy}Ge.premultipliedAlpha===void 0&&(Ge.premultipliedAlpha=!0),Be=function(_t,Pt){function Bt(Wt){try{return _t.getContext(Wt,Pt)}catch{return null}}return Bt("webgl")||Bt("experimental-webgl")||Bt("webgl-experimental")}(Oe,Ge)}return Be?{gl:Be,canvas:Oe,container:ht,extensions:ut,optionalExtensions:pt,pixelRatio:bt,profile:Lt,cachedCode:Ct,onDone:mt,onDestroy:Ot}:(Ot(),mt("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function m(Ge,nt){for(var ht=Array(Ge),Oe=0;Oe>>=nt))<<3,(nt|=ht=(15<(Ge>>>=ht))<<2)|(ht=(3<(Ge>>>=ht))<<1)|Ge>>>ht>>1}function l(){function Ge(Oe){e:{for(var Be=16;268435456>=Be;Be*=16)if(Oe<=Be){Oe=Be;break e}Oe=0}return 0<(Be=ht[f(Oe)>>2]).length?Be.pop():new ArrayBuffer(Oe)}function nt(Oe){ht[f(Oe.byteLength)>>2].push(Oe)}var ht=m(8,function(){return[]});return{alloc:Ge,free:nt,allocType:function(Oe,Be){var Qe=null;switch(Oe){case 5120:Qe=new Int8Array(Ge(Be),0,Be);break;case 5121:Qe=new Uint8Array(Ge(Be),0,Be);break;case 5122:Qe=new Int16Array(Ge(2*Be),0,Be);break;case 5123:Qe=new Uint16Array(Ge(2*Be),0,Be);break;case 5124:Qe=new Int32Array(Ge(4*Be),0,Be);break;case 5125:Qe=new Uint32Array(Ge(4*Be),0,Be);break;case 5126:Qe=new Float32Array(Ge(4*Be),0,Be);break;default:return null}return Qe.length!==Be?Qe.subarray(0,Be):Qe},freeType:function(Oe){nt(Oe.buffer)}}}function t(Ge){return!!Ge&&typeof Ge=="object"&&Array.isArray(Ge.shape)&&Array.isArray(Ge.stride)&&typeof Ge.offset=="number"&&Ge.shape.length===Ge.stride.length&&(Array.isArray(Ge.data)||de(Ge.data))}function i(Ge,nt,ht,Oe,Be,Qe){for(var ut=0;ut(Ot=Bt)&&(Ot=mt.buffer.byteLength,Xt===5123?Ot>>=1:Xt===5125&&(Ot>>=2)),mt.vertCount=Ot,Ot=Pt,0>Pt&&(Ot=4,(Pt=mt.buffer.dimension)===1&&(Ot=0),Pt===2&&(Ot=1),Pt===3&&(Ot=4)),mt.primType=Ot}function ut(mt){Oe.elementsCount--,delete pt[mt.id],mt.buffer.destroy(),mt.buffer=null}var pt={},bt=0,Lt={uint8:5121,uint16:5123};nt.oes_element_index_uint&&(Lt.uint32=5125),Be.prototype.bind=function(){this.buffer.bind()};var Ct=[];return{create:function(mt,Ot){function _t(Wt){if(Wt)if(typeof Wt=="number")Pt(Wt),Bt.primType=4,Bt.vertCount=0|Wt,Bt.type=5121;else{var Gt=null,Xt=35044,Kt=-1,nn=-1,yn=0,ln=0;Array.isArray(Wt)||de(Wt)||t(Wt)?Gt=Wt:("data"in Wt&&(Gt=Wt.data),"usage"in Wt&&(Xt=Ae[Wt.usage]),"primitive"in Wt&&(Kt=ue[Wt.primitive]),"count"in Wt&&(nn=0|Wt.count),"type"in Wt&&(ln=Lt[Wt.type]),"length"in Wt?yn=0|Wt.length:(yn=nn,ln===5123||ln===5122?yn*=2:ln!==5125&&ln!==5124||(yn*=4))),Qe(Bt,Gt,Xt,Kt,nn,yn,ln)}else Pt(),Bt.primType=4,Bt.vertCount=0,Bt.type=5121;return _t}var Pt=ht.create(null,34963,!0),Bt=new Be(Pt._buffer);return Oe.elementsCount++,_t(mt),_t._reglType="elements",_t._elements=Bt,_t.subdata=function(Wt,Gt){return Pt.subdata(Wt,Gt),_t},_t.destroy=function(){ut(Bt)},_t},createStream:function(mt){var Ot=Ct.pop();return Ot||(Ot=new Be(ht.create(null,34963,!0,!1)._buffer)),Qe(Ot,mt,35040,-1,-1,0,0),Ot},destroyStream:function(mt){Ct.push(mt)},getElements:function(mt){return typeof mt=="function"&&mt._elements instanceof Be?mt._elements:null},clear:function(){pe(pt).forEach(ut)}}}function c(Ge){for(var nt=xe.allocType(5123,Ge.length),ht=0;ht>>31<<15,Be=(Qe<<1>>>24)-127,Qe=Qe>>13&1023;nt[ht]=-24>Be?Oe:-14>Be?Oe+(Qe+1024>>-14-Be):15>=un,jt.height>>=un,Ot(jt,Jt[un]),tn.mipmask|=1<Pn;++Pn)tn.images[Pn]=null;return tn}function yn(tn){for(var Pn=tn.images,jt=0;jttn){for(var Pn=0;Pn=--this.refCount&&fn(this)}}),ut.profile&&(Qe.getTotalTextureSize=function(){var tn=0;return Object.keys(Zn).forEach(function(Pn){tn+=Zn[Pn].stats.size}),tn}),{create2D:function(tn,Pn){function jt(un,Rn){var On=Jt.texInfo;ln.call(On);var Sn=nn();return typeof un=="number"?Gt(Sn,0|un,typeof Rn=="number"?0|Rn:0|un):un?(kn(On,un),Xt(Sn,un)):Gt(Sn,1,1),On.genMipmaps&&(Sn.mipmask=(Sn.width<<1)-1),Jt.mipmask=Sn.mipmask,bt(Jt,Sn),Jt.internalformat=Sn.internalformat,jt.width=Sn.width,jt.height=Sn.height,on(Jt),Kt(Sn,3553),Wn(On,3553),_n(),yn(Sn),ut.profile&&(Jt.stats.size=h(Jt.internalformat,Jt.type,Sn.width,Sn.height,On.genMipmaps,!1)),jt.format=ir[Jt.internalformat],jt.type=dr[Jt.type],jt.mag=yr[On.magFilter],jt.min=$t[On.minFilter],jt.wrapS=mn[On.wrapS],jt.wrapT=mn[On.wrapT],jt}var Jt=new wn(3553);return Zn[Jt.id]=Jt,Qe.textureCount++,jt(tn,Pn),jt.subimage=function(un,Rn,On,Sn){Rn|=0,On|=0,Sn|=0;var pn=Pt();return bt(pn,Jt),pn.width=0,pn.height=0,Ot(pn,un),pn.width=pn.width||(Jt.width>>Sn)-Rn,pn.height=pn.height||(Jt.height>>Sn)-On,on(Jt),_t(pn,3553,Rn,On,Sn),_n(),Bt(pn),jt},jt.resize=function(un,Rn){var On=0|un,Sn=0|Rn||On;if(On===Jt.width&&Sn===Jt.height)return jt;jt.width=Jt.width=On,jt.height=Jt.height=Sn,on(Jt);for(var pn=0;Jt.mipmask>>pn;++pn){var bn=On>>pn,dn=Sn>>pn;if(!bn||!dn)break;Ge.texImage2D(3553,pn,Jt.format,bn,dn,0,Jt.format,Jt.type,null)}return _n(),ut.profile&&(Jt.stats.size=h(Jt.internalformat,Jt.type,On,Sn,!1,!1)),jt},jt._reglType="texture2d",jt._texture=Jt,ut.profile&&(jt.stats=Jt.stats),jt.destroy=function(){Jt.decRef()},jt},createCube:function(tn,Pn,jt,Jt,un,Rn){function On(bn,dn,vn,An,Bn,Xn){var er,Jn=Sn.texInfo;for(ln.call(Jn),er=0;6>er;++er)pn[er]=nn();if(typeof bn!="number"&&bn){if(typeof bn=="object")if(dn)Xt(pn[0],bn),Xt(pn[1],dn),Xt(pn[2],vn),Xt(pn[3],An),Xt(pn[4],Bn),Xt(pn[5],Xn);else if(kn(Jn,bn),Lt(Sn,bn),"faces"in bn)for(bn=bn.faces,er=0;6>er;++er)bt(pn[er],Sn),Xt(pn[er],bn[er]);else for(er=0;6>er;++er)Xt(pn[er],bn)}else for(bn=0|bn||1,er=0;6>er;++er)Gt(pn[er],bn,bn);for(bt(Sn,pn[0]),Sn.mipmask=Jn.genMipmaps?(pn[0].width<<1)-1:pn[0].mipmask,Sn.internalformat=pn[0].internalformat,On.width=pn[0].width,On.height=pn[0].height,on(Sn),er=0;6>er;++er)Kt(pn[er],34069+er);for(Wn(Jn,34067),_n(),ut.profile&&(Sn.stats.size=h(Sn.internalformat,Sn.type,On.width,On.height,Jn.genMipmaps,!0)),On.format=ir[Sn.internalformat],On.type=dr[Sn.type],On.mag=yr[Jn.magFilter],On.min=$t[Jn.minFilter],On.wrapS=mn[Jn.wrapS],On.wrapT=mn[Jn.wrapT],er=0;6>er;++er)yn(pn[er]);return On}var Sn=new wn(34067);Zn[Sn.id]=Sn,Qe.cubeCount++;var pn=Array(6);return On(tn,Pn,jt,Jt,un,Rn),On.subimage=function(bn,dn,vn,An,Bn){vn|=0,An|=0,Bn|=0;var Xn=Pt();return bt(Xn,Sn),Xn.width=0,Xn.height=0,Ot(Xn,dn),Xn.width=Xn.width||(Sn.width>>Bn)-vn,Xn.height=Xn.height||(Sn.height>>Bn)-An,on(Sn),_t(Xn,34069+bn,vn,An,Bn),_n(),Bt(Xn),On},On.resize=function(bn){if((bn|=0)!==Sn.width){On.width=Sn.width=bn,On.height=Sn.height=bn,on(Sn);for(var dn=0;6>dn;++dn)for(var vn=0;Sn.mipmask>>vn;++vn)Ge.texImage2D(34069+dn,vn,Sn.format,bn>>vn,bn>>vn,0,Sn.format,Sn.type,null);return _n(),ut.profile&&(Sn.stats.size=h(Sn.internalformat,Sn.type,On.width,On.height,!1,!0)),On}},On._reglType="textureCube",On._texture=Sn,ut.profile&&(On.stats=Sn.stats),On.destroy=function(){Sn.decRef()},On},clear:function(){for(var tn=0;tnJt;++Jt)if(jt.mipmask&1<>Jt,jt.height>>Jt,0,jt.internalformat,jt.type,null);else for(var un=0;6>un;++un)Ge.texImage2D(34069+un,Jt,jt.internalformat,jt.width>>Jt,jt.height>>Jt,0,jt.internalformat,jt.type,null);Wn(jt.texInfo,jt.target)})},refresh:function(){for(var tn=0;tnhn;++hn){for(qn=0;qnfn;++fn)_n[fn].resize(hn);return on.width=on.height=hn,on},_reglType:"framebufferCube",destroy:function(){_n.forEach(function(fn){fn.destroy()})}})},clear:function(){pe(Wn).forEach(Wt)},restore:function(){Kt.cur=null,Kt.next=null,Kt.dirty=!0,pe(Wn).forEach(function(wn){wn.framebuffer=Ge.createFramebuffer(),Gt(wn)})}})}function C(){this.w=this.z=this.y=this.x=this.state=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.divisor=this.stride=this.offset=0}function L(Ge,nt,ht,Oe,Be,Qe,ut){function pt(){this.id=++Ct,this.attributes=[],this.elements=null,this.ownsElements=!1,this.offset=this.count=0,this.instances=-1,this.primitive=4;var _t=nt.oes_vertex_array_object;this.vao=_t?_t.createVertexArrayOES():null,mt[this.id]=this,this.buffers=[]}var bt=ht.maxAttributes,Lt=Array(bt);for(ht=0;ht=kn.byteLength?nn.subdata(kn):(nn.destroy(),Bt.buffers[Kt]=null)),Bt.buffers[Kt]||(nn=Bt.buffers[Kt]=Be.create(yn,34962,!1,!0)),ln.buffer=Be.getBuffer(nn),ln.size=0|ln.buffer.dimension,ln.normalized=!1,ln.type=ln.buffer.dtype,ln.offset=0,ln.stride=0,ln.divisor=0,ln.state=1,Wt[Kt]=1):Be.getBuffer(yn)?(ln.buffer=Be.getBuffer(yn),ln.size=0|ln.buffer.dimension,ln.normalized=!1,ln.type=ln.buffer.dtype,ln.offset=0,ln.stride=0,ln.divisor=0,ln.state=1):Be.getBuffer(yn.buffer)?(ln.buffer=Be.getBuffer(yn.buffer),ln.size=0|(+yn.size||ln.buffer.dimension),ln.normalized=!!yn.normalized||!1,ln.type="type"in yn?we[yn.type]:ln.buffer.dtype,ln.offset=0|(yn.offset||0),ln.stride=0|(yn.stride||0),ln.divisor=0|(yn.divisor||0),ln.state=1):"x"in yn&&(ln.x=+yn.x||0,ln.y=+yn.y||0,ln.z=+yn.z||0,ln.w=+yn.w||0,ln.state=2)}for(nn=0;nnPt&&(Pt=Bt.stats.uniformsCount)}),Pt},ht.getMaxAttributesCount=function(){var Pt=0;return Ot.forEach(function(Bt){Bt.stats.attributesCount>Pt&&(Pt=Bt.stats.attributesCount)}),Pt}),{clear:function(){var Pt=Ge.deleteShader.bind(Ge);pe(Lt).forEach(Pt),Lt={},pe(Ct).forEach(Pt),Ct={},Ot.forEach(function(Bt){Ge.deleteProgram(Bt.program)}),Ot.length=0,mt={},ht.shaderCount=0},program:function(Pt,Bt,Wt,Gt){var Xt=mt[Bt];Xt||(Xt=mt[Bt]={});var Kt=Xt[Pt];if(Kt&&(Kt.refCount++,!Gt))return Kt;var nn=new pt(Bt,Pt);return ht.shaderCount++,bt(nn,Wt,Gt),Kt||(Xt[Pt]=nn),Ot.push(nn),te(nn,{destroy:function(){if(nn.refCount--,0>=nn.refCount){Ge.deleteProgram(nn.program);var yn=Ot.indexOf(nn);Ot.splice(yn,1),ht.shaderCount--}0>=Xt[nn.vertId].refCount&&(Ge.deleteShader(Ct[nn.vertId]),delete Ct[nn.vertId],delete mt[nn.fragId][nn.vertId]),Object.keys(mt[nn.fragId]).length||(Ge.deleteShader(Lt[nn.fragId]),delete Lt[nn.fragId],delete mt[nn.fragId])}})},restore:function(){Lt={},Ct={};for(var Pt=0;Pt>>nt|Ge<<32-nt}function U(Ge,nt){var ht=(65535&Ge)+(65535&nt);return(Ge>>16)+(nt>>16)+(ht>>16)<<16|65535&ht}function B(Ge){return Array.prototype.slice.call(Ge)}function G(Ge){return B(Ge).join("")}function N(Ge){function nt(){var Ct=[],mt=[];return te(function(){Ct.push.apply(Ct,B(arguments))},{def:function(){var Ot="v"+Be++;return mt.push(Ot),0>>4&15)+"0123456789abcdef".charAt(15&Pt);return Bt}(function(_t){for(var Pt=Array(_t.length>>2),Bt=0;Bt>5]|=(255&_t.charCodeAt(Bt/8))<<24-Bt%32;var Wt,Gt,Xt,Kt,nn,yn,ln,kn,Wn,wn,on,_n=8*_t.length;for(_t=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Bt=Array(64),Pt[_n>>5]|=128<<24-_n%32,Pt[15+(_n+64>>9<<4)]=_n,kn=0;knWn;Wn++){var fn;16>Wn?Bt[Wn]=Pt[Wn+kn]:(wn=Wn,on=U(on=R(on=Bt[Wn-2],17)^R(on,19)^on>>>10,Bt[Wn-7]),fn=R(fn=Bt[Wn-15],7)^R(fn,18)^fn>>>3,Bt[wn]=U(U(on,fn),Bt[Wn-16])),wn=U(U(U(U(ln,wn=R(wn=Kt,6)^R(wn,11)^R(wn,25)),Kt&nn^~Kt&yn),xt[Wn]),Bt[Wn]),on=U(ln=R(ln=_n,2)^R(ln,13)^R(ln,22),_n&Wt^_n&Gt^Wt&Gt),ln=yn,yn=nn,nn=Kt,Kt=U(Xt,wn),Xt=Gt,Gt=Wt,Wt=_n,_n=U(wn,on)}_t[0]=U(_n,_t[0]),_t[1]=U(Wt,_t[1]),_t[2]=U(Gt,_t[2]),_t[3]=U(Xt,_t[3]),_t[4]=U(Kt,_t[4]),_t[5]=U(nn,_t[5]),_t[6]=U(yn,_t[6]),_t[7]=U(ln,_t[7])}for(Pt="",Bt=0;Bt<32*_t.length;Bt+=8)Pt+=String.fromCharCode(_t[Bt>>5]>>>24-Bt%32&255);return Pt}(function(_t){for(var Pt,Bt,Wt="",Gt=-1;++Gt<_t.length;)Pt=_t.charCodeAt(Gt),Bt=Gt+1<_t.length?_t.charCodeAt(Gt+1):0,55296<=Pt&&56319>=Pt&&56320<=Bt&&57343>=Bt&&(Pt=65536+((1023&Pt)<<10)+(1023&Bt),Gt++),127>=Pt?Wt+=String.fromCharCode(Pt):2047>=Pt?Wt+=String.fromCharCode(192|Pt>>>6&31,128|63&Pt):65535>=Pt?Wt+=String.fromCharCode(224|Pt>>>12&15,128|Pt>>>6&63,128|63&Pt):2097151>=Pt&&(Wt+=String.fromCharCode(240|Pt>>>18&7,128|Pt>>>12&63,128|Pt>>>6&63,128|63&Pt));return Wt}(Ot))),Oe[mt])?Oe[mt].apply(null,ut):(Ot=Function.apply(null,Qe.concat(Ot)),Oe&&(Oe[mt]=Ot),Ot.apply(null,ut))}}}function j(Ge){return Array.isArray(Ge)||de(Ge)||t(Ge)}function V(Ge){return Ge.sort(function(nt,ht){return nt==="viewport"?-1:ht==="viewport"?1:nt"+vr+"?"+An+".constant["+vr+"]:0;"}).join(""),"}}else{","if(",er,"(",An,".buffer)){",sr,"=",Bn,".createStream(",34962,",",An,".buffer);","}else{",sr,"=",Bn,".getBuffer(",An,".buffer);","}",fr,'="type" in ',An,"?",Xn.glTypes,"[",An,".type]:",sr,".dtype;",Jn.normalized,"=!!",An,".normalized;"),vn("size"),vn("offset"),vn("stride"),vn("divisor"),dn("}}"),dn.exit("if(",Jn.isStream,"){",Bn,".destroyStream(",sr,");","}"),Jn})}),On}function Wn(jt,Jt,un,Rn,On){function Sn(lr){var sr=bn[lr];sr&&(vn[lr]=sr)}var pn=function(lr,sr){if(typeof(fr=lr.static).frag=="string"&&typeof fr.vert=="string"){if(0"u"?"Date.now()":"performance.now()"}function pn(lr){lr(vn=Jt.def(),"=",Sn(),";"),typeof On=="string"?lr(Xn,".count+=",On,";"):lr(Xn,".count++;"),_t&&(Rn?lr(An=Jt.def(),"=",Jn,".getNumPendingQueries();"):lr(Jn,".beginQuery(",Xn,");"))}function bn(lr){lr(Xn,".cpuTime+=",Sn(),"-",vn,";"),_t&&(Rn?lr(Jn,".pushScopeStats(",An,",",Jn,".getNumPendingQueries(),",Xn,");"):lr(Jn,".endQuery();"))}function dn(lr){var sr=Jt.def(er,".profile");Jt(er,".profile=",lr,";"),Jt.exit(er,".profile=",sr,";")}var vn,An,Bn=jt.shared,Xn=jt.stats,er=Bn.current,Jn=Bn.timer;if(un=un.profile){if(ee(un))return void(un.enable?(pn(Jt),bn(Jt.exit),dn("true")):dn("false"));dn(un=un.append(jt,Jt))}else un=Jt.def(er,".profile");pn(Bn=jt.block()),Jt("if(",un,"){",Bn,"}"),bn(jt=jt.block()),Jt.exit("if(",un,"){",jt,"}")}function Cn(jt,Jt,un,Rn,On){function Sn(bn,dn,vn){function An(){Jt("if(!",Jn,".buffer){",Xn,".enableVertexAttribArray(",er,");}");var cr,vr=vn.type;cr=vn.size?Jt.def(vn.size,"||",dn):dn,Jt("if(",Jn,".type!==",vr,"||",Jn,".size!==",cr,"||",fr.map(function(Sr){return Jn+"."+Sr+"!=="+vn[Sr]}).join("||"),"){",Xn,".bindBuffer(",34962,",",lr,".buffer);",Xn,".vertexAttribPointer(",[er,cr,vr,vn.normalized,vn.stride,vn.offset],");",Jn,".type=",vr,";",Jn,".size=",cr,";",fr.map(function(Sr){return Jn+"."+Sr+"="+vn[Sr]+";"}).join(""),"}"),$t&&(vr=vn.divisor,Jt("if(",Jn,".divisor!==",vr,"){",jt.instancing,".vertexAttribDivisorANGLE(",[er,vr],");",Jn,".divisor=",vr,";}"))}function Bn(){Jt("if(",Jn,".buffer){",Xn,".disableVertexAttribArray(",er,");",Jn,".buffer=null;","}if(",Dt.map(function(cr,vr){return Jn+"."+cr+"!=="+sr[vr]}).join("||"),"){",Xn,".vertexAttrib4f(",er,",",sr,");",Dt.map(function(cr,vr){return Jn+"."+cr+"="+sr[vr]+";"}).join(""),"}")}var Xn=pn.gl,er=Jt.def(bn,".location"),Jn=Jt.def(pn.attributes,"[",er,"]");bn=vn.state;var lr=vn.buffer,sr=[vn.x,vn.y,vn.z,vn.w],fr=["buffer","normalized","offset","stride"];bn===1?An():bn===2?Bn():(Jt("if(",bn,"===",1,"){"),An(),Jt("}else{"),Bn(),Jt("}"))}var pn=jt.shared;Rn.forEach(function(bn){var dn,vn=bn.name,An=un.attributes[vn];if(An){if(!On(An))return;dn=An.append(jt,Jt)}else{if(!On(Ke))return;var Bn=jt.scopeAttrib(vn);dn={},Object.keys(new dr).forEach(function(Xn){dn[Xn]=Jt.def(Bn,".",Xn)})}Sn(jt.link(bn),function(Xn){switch(Xn){case 35664:case 35667:case 35671:return 2;case 35665:case 35668:case 35672:return 3;case 35666:case 35669:case 35673:return 4;default:return 1}}(bn.info.type),dn)})}function Nn(jt,Jt,un,Rn,On,Sn){for(var pn,bn=jt.shared,dn=bn.gl,vn=0;vn>1)",bn],");")}function Sr(){un(dn,".drawArraysInstancedANGLE(",[Jn,lr,sr,bn],");")}er&&er!=="null"?cr?vr():(un("if(",er,"){"),vr(),un("}else{"),Sr(),un("}")):Sr()}function pn(){function vr(){un(An+".drawElements("+[Jn,sr,fr,lr+"<<(("+fr+"-5121)>>1)"]+");")}function Sr(){un(An+".drawArrays("+[Jn,lr,sr]+");")}er&&er!=="null"?cr?vr():(un("if(",er,"){"),vr(),un("}else{"),Sr(),un("}")):Sr()}var bn,dn,vn=jt.shared,An=vn.gl,Bn=vn.draw,Xn=Rn.draw,er=function(){var vr=Xn.elements,Sr=Jt;return vr?((vr.contextDep&&Rn.contextDynamic||vr.propDep)&&(Sr=un),vr=vr.append(jt,Sr),Xn.elementsActive&&Sr("if("+vr+")"+An+".bindBuffer(34963,"+vr+".buffer.buffer);")):(vr=Sr.def(),Sr(vr,"=",Bn,".","elements",";","if(",vr,"){",An,".bindBuffer(",34963,",",vr,".buffer.buffer);}","else if(",vn.vao,".currentVAO){",vr,"=",jt.shared.elements+".getElements("+vn.vao,".currentVAO.elements);",Ln?"":"if("+vr+")"+An+".bindBuffer(34963,"+vr+".buffer.buffer);","}")),vr}(),Jn=On("primitive"),lr=On("offset"),sr=function(){var vr=Xn.count,Sr=Jt;return vr?((vr.contextDep&&Rn.contextDynamic||vr.propDep)&&(Sr=un),vr=vr.append(jt,Sr)):vr=Sr.def(Bn,".","count"),vr}();if(typeof sr=="number"){if(sr===0)return}else un("if(",sr,"){"),un.exit("}");$t&&(bn=On("instances"),dn=jt.instancing);var fr=er+".type",cr=Xn.elements&&ee(Xn.elements)&&!Xn.vaoActive;$t&&(typeof bn!="number"||0<=bn)?typeof bn=="string"?(un("if(",bn,">0){"),Sn(),un("}else if(",bn,"<0){"),pn(),un("}")):Sn():pn()}function qn(jt,Jt,un,Rn,On){return On=(Jt=Kt()).proc("body",On),$t&&(Jt.instancing=On.def(Jt.shared.extensions,".angle_instanced_arrays")),jt(Jt,On,un,Rn),Jt.compile().body}function or(jt,Jt,un,Rn){hn(jt,Jt),un.useVAO?un.drawVAO?Jt(jt.shared.vao,".setVAO(",un.drawVAO.append(jt,Jt),");"):Jt(jt.shared.vao,".setVAO(",jt.shared.vao,".targetVAO);"):(Jt(jt.shared.vao,".setVAO(null);"),Cn(jt,Jt,un,Rn.attributes,function(){return!0})),Nn(jt,Jt,un,Rn.uniforms,function(){return!0},!1),Hn(jt,Jt,Jt,un)}function tr(jt,Jt,un,Rn){function On(){return!0}jt.batchId="a1",hn(jt,Jt),Cn(jt,Jt,un,Rn.attributes,On),Nn(jt,Jt,un,Rn.uniforms,On,!1),Hn(jt,Jt,Jt,un)}function kr(jt,Jt,un,Rn){function On(Bn){return Bn.contextDep&&pn||Bn.propDep}function Sn(Bn){return!On(Bn)}hn(jt,Jt);var pn=un.contextDep,bn=Jt.def(),dn=Jt.def();jt.shared.props=dn,jt.batchId=bn;var vn=jt.scope(),An=jt.scope();Jt(vn.entry,"for(",bn,"=0;",bn,"<","a1",";++",bn,"){",dn,"=","a0","[",bn,"];",An,"}",vn.exit),un.needsContext&&wn(jt,An,un.context),un.needsFramebuffer&&on(jt,An,un.framebuffer),fn(jt,An,un.state,On),un.profile&&On(un.profile)&&In(jt,An,un,!1,!0),Rn?(un.useVAO?un.drawVAO?On(un.drawVAO)?An(jt.shared.vao,".setVAO(",un.drawVAO.append(jt,An),");"):vn(jt.shared.vao,".setVAO(",un.drawVAO.append(jt,vn),");"):vn(jt.shared.vao,".setVAO(",jt.shared.vao,".targetVAO);"):(vn(jt.shared.vao,".setVAO(null);"),Cn(jt,vn,un,Rn.attributes,Sn),Cn(jt,An,un,Rn.attributes,On)),Nn(jt,vn,un,Rn.uniforms,Sn,!1),Nn(jt,An,un,Rn.uniforms,On,!0),Hn(jt,vn,An,un)):(Jt=jt.global.def("{}"),Rn=un.shader.progVar.append(jt,An),dn=An.def(Rn,".id"),vn=An.def(Jt,"[",dn,"]"),An(jt.shared.gl,".useProgram(",Rn,".program);","if(!",vn,"){",vn,"=",Jt,"[",dn,"]=",jt.link(function(Bn){return qn(tr,jt,un,Bn,2)}),"(",Rn,");}",vn,".call(this,a0[",bn,"],",bn,");"))}function gr(jt,Jt){function un(bn){var dn=Jt.shader[bn];dn&&(dn=dn.append(jt,Rn),isNaN(dn)?Rn.set(On.shader,"."+bn,dn):Rn.set(On.shader,"."+bn,jt.link(dn,{stable:!0})))}var Rn=jt.proc("scope",3);jt.batchId="a2";var On=jt.shared,Sn=On.current;if(wn(jt,Rn,Jt.context),Jt.framebuffer&&Jt.framebuffer.append(jt,Rn),V(Object.keys(Jt.state)).forEach(function(bn){var dn=Jt.state[bn],vn=dn.append(jt,Rn);b(vn)?vn.forEach(function(An,Bn){isNaN(An)?Rn.set(jt.next[bn],"["+Bn+"]",An):Rn.set(jt.next[bn],"["+Bn+"]",jt.link(An,{stable:!0}))}):ee(dn)?Rn.set(On.next,"."+bn,jt.link(vn,{stable:!0})):Rn.set(On.next,"."+bn,vn)}),In(jt,Rn,Jt,!0,!0),["elements","offset","count","instances","primitive"].forEach(function(bn){var dn=Jt.draw[bn];dn&&(dn=dn.append(jt,Rn),isNaN(dn)?Rn.set(On.draw,"."+bn,dn):Rn.set(On.draw,"."+bn,jt.link(dn),{stable:!0}))}),Object.keys(Jt.uniforms).forEach(function(bn){var dn=Jt.uniforms[bn].append(jt,Rn);Array.isArray(dn)&&(dn="["+dn.map(function(vn){return isNaN(vn)?vn:jt.link(vn,{stable:!0})})+"]"),Rn.set(On.uniforms,"["+jt.link(nt.id(bn),{stable:!0})+"]",dn)}),Object.keys(Jt.attributes).forEach(function(bn){var dn=Jt.attributes[bn].append(jt,Rn),vn=jt.scopeAttrib(bn);Object.keys(new dr).forEach(function(An){Rn.set(vn,"."+An,dn[An])})}),Jt.scopeVAO){var pn=Jt.scopeVAO.append(jt,Rn);isNaN(pn)?Rn.set(On.vao,".targetVAO",pn):Rn.set(On.vao,".targetVAO",jt.link(pn,{stable:!0}))}un("vert"),un("frag"),0=--this.refCount&&ut(this)},Be.profile&&(Oe.getTotalRenderbufferSize=function(){var mt=0;return Object.keys(Ct).forEach(function(Ot){mt+=Ct[Ot].stats.size}),mt}),{create:function(mt,Ot){function _t(Bt,Wt){var Gt=0,Xt=0,Kt=32854;if(typeof Bt=="object"&&Bt?("shape"in Bt?(Gt=0|(Xt=Bt.shape)[0],Xt=0|Xt[1]):("radius"in Bt&&(Gt=Xt=0|Bt.radius),"width"in Bt&&(Gt=0|Bt.width),"height"in Bt&&(Xt=0|Bt.height)),"format"in Bt&&(Kt=pt[Bt.format])):typeof Bt=="number"?(Gt=0|Bt,Xt=typeof Wt=="number"?0|Wt:Gt):Bt||(Gt=Xt=1),Gt!==Pt.width||Xt!==Pt.height||Kt!==Pt.format)return _t.width=Pt.width=Gt,_t.height=Pt.height=Xt,Pt.format=Kt,Ge.bindRenderbuffer(36161,Pt.renderbuffer),Ge.renderbufferStorage(36161,Kt,Gt,Xt),Be.profile&&(Pt.stats.size=ft[Pt.format]*Pt.width*Pt.height),_t.format=bt[Pt.format],_t}var Pt=new Qe(Ge.createRenderbuffer());return Ct[Pt.id]=Pt,Oe.renderbufferCount++,_t(mt,Ot),_t.resize=function(Bt,Wt){var Gt=0|Bt,Xt=0|Wt||Gt;return Gt===Pt.width&&Xt===Pt.height||(_t.width=Pt.width=Gt,_t.height=Pt.height=Xt,Ge.bindRenderbuffer(36161,Pt.renderbuffer),Ge.renderbufferStorage(36161,Pt.format,Gt,Xt),Be.profile&&(Pt.stats.size=ft[Pt.format]*Pt.width*Pt.height)),_t},_t._reglType="renderbuffer",_t._renderbuffer=Pt,Be.profile&&(_t.stats=Pt.stats),_t.destroy=function(){Pt.decRef()},_t},clear:function(){he(Ct).forEach(ut)},restore:function(){he(Ct).forEach(function(mt){mt.renderbuffer=Ge.createRenderbuffer(),Ge.bindRenderbuffer(36161,mt.renderbuffer),Ge.renderbufferStorage(36161,mt.format,mt.width,mt.height)}),Ge.bindRenderbuffer(36161,null)}}},Et=[];Et[6408]=4,Et[6407]=3;var Tt=[];Tt[5121]=1,Tt[5126]=4,Tt[36193]=2;var xt=[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],Dt=["x","y","z","w"],It="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),Ft={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},qt={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},Nt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Je={cw:2304,ccw:2305},Ke=new H(!1,!1,!1,function(){});return function(Ge){function nt(){if(tr.length===0)nn&&nn.update(),dr=null;else{dr=se.next(nt),Ct();for(var $t=tr.length-1;0<=$t;--$t){var mn=tr[$t];mn&&mn(Wn,null,0)}_t.flush(),nn&&nn.update()}}function ht(){!dr&&0=tr.length&&Oe()}}}}function Lt(){var $t=qn.viewport,mn=qn.scissor_box;$t[0]=$t[1]=mn[0]=mn[1]=0,Wn.viewportWidth=Wn.framebufferWidth=Wn.drawingBufferWidth=$t[2]=mn[2]=_t.drawingBufferWidth,Wn.viewportHeight=Wn.framebufferHeight=Wn.drawingBufferHeight=$t[3]=mn[3]=_t.drawingBufferHeight}function Ct(){Wn.tick+=1,Wn.time=Ot(),Lt(),Hn.procs.poll()}function mt(){In.refresh(),Lt(),Hn.procs.refresh(),nn&&nn.update()}function Ot(){return(fe()-yn)/1e3}if(!(Ge=T(Ge)))return null;var _t=Ge.gl,Pt=_t.getContextAttributes();_t.isContextLost();var Bt=function($t,mn){function Ln(Zn){var Qn;Zn=Zn.toLowerCase();try{Qn=En[Zn]=$t.getExtension(Zn)}catch{}return!!Qn}for(var En={},jn=0;jnmn;++mn)yr(te({framebuffer:$t.framebuffer.faces[mn]},$t),pt);else yr($t,pt);else pt(0,$t)},prop:oe.define.bind(null,1),context:oe.define.bind(null,2),this:oe.define.bind(null,3),draw:ut({}),buffer:function($t){return on.create($t,34962,!1,!1)},elements:function($t){return _n.create($t,!1)},texture:In.create2D,cube:In.createCube,renderbuffer:Cn.create,framebuffer:Nn.create,framebufferCube:Nn.createCube,vao:fn.createVAO,attributes:Pt,frame:bt,on:function($t,mn){var Ln;switch($t){case"frame":return bt(mn);case"lost":Ln=kr;break;case"restore":Ln=gr;break;case"destroy":Ln=ir}return Ln.push(mn),{cancel:function(){for(var En=0;En2?"one of ".concat(s," ").concat(w.slice(0,T-1).join(", "),", or ")+w[T-1]:T===2?"one of ".concat(s," ").concat(w[0]," or ").concat(w[1]):"of ".concat(s," ").concat(w[0])}return"of ".concat(s," ").concat(String(w))}e("ERR_INVALID_OPT_VALUE",function(w,s){return'The value "'+s+'" is invalid for option "'+w+'"'},TypeError),e("ERR_INVALID_ARG_TYPE",function(w,s,T){var y,f,l,t,i;if(typeof s=="string"&&(f="not ",s.substr(0,f.length)===f)?(y="must not be",s=s.replace(/^not /,"")):y="must be",function(n,o,a){return(a===void 0||a>n.length)&&(a=n.length),n.substring(a-o.length,a)===o}(w," argument"))l="The ".concat(w," ").concat(y," ").concat(_(s,"type"));else{var r=(typeof i!="number"&&(i=0),i+1>(t=w).length||t.indexOf(".",i)===-1?"argument":"property");l='The "'.concat(w,'" ').concat(r," ").concat(y," ").concat(_(s,"type"))}return l+". Received type ".concat(typeof T)},TypeError),e("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),e("ERR_METHOD_NOT_IMPLEMENTED",function(w){return"The "+w+" method is not implemented"}),e("ERR_STREAM_PREMATURE_CLOSE","Premature close"),e("ERR_STREAM_DESTROYED",function(w){return"Cannot call "+w+" after a stream was destroyed"}),e("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),e("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),e("ERR_STREAM_WRITE_AFTER_END","write after end"),e("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),e("ERR_UNKNOWN_ENCODING",function(w){return"Unknown encoding: "+w},TypeError),e("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),D.exports.q=E},37865:function(D,E,e){var _=e(90386),w=Object.keys||function(n){var o=[];for(var a in n)o.push(a);return o};D.exports=t;var s=e(40410),T=e(37493);e(42018)(t,s);for(var y=w(T.prototype),f=0;f0)if(typeof X=="string"||oe.objectMode||Object.getPrototypeOf(X)===f.prototype||(X=function(se){return f.from(se)}(X)),K)oe.endEmitted?x(Q,new v):M(Q,oe,X,!0);else if(oe.ended)x(Q,new b);else{if(oe.destroyed)return!1;oe.reading=!1,oe.decoder&&!Y?(X=oe.decoder.write(X),oe.objectMode||X.length!==0?M(Q,oe,X,!1):I(Q,oe)):M(Q,oe,X,!1)}else K||(oe.reading=!1,I(Q,oe));return!oe.ended&&(oe.lengthX.highWaterMark&&(X.highWaterMark=function(Y){return Y>=A?Y=A:(Y--,Y|=Y>>>1,Y|=Y>>>2,Y|=Y>>>4,Y|=Y>>>8,Y|=Y>>>16,Y++),Y}(Q)),Q<=X.length?Q:X.ended?X.length:(X.needReadable=!0,0))}function L(Q){var X=Q._readableState;s("emitReadable",X.needReadable,X.emittedReadable),X.needReadable=!1,X.emittedReadable||(s("emitReadable",X.flowing),X.emittedReadable=!0,w.nextTick(O,Q))}function O(Q){var X=Q._readableState;s("emitReadable_",X.destroyed,X.length,X.ended),X.destroyed||!X.length&&!X.ended||(Q.emit("readable"),X.emittedReadable=!1),X.needReadable=!X.flowing&&!X.ended&&X.length<=X.highWaterMark,N(Q)}function I(Q,X){X.readingMore||(X.readingMore=!0,w.nextTick(R,Q,X))}function R(Q,X){for(;!X.reading&&!X.ended&&(X.length0,X.resumeScheduled&&!X.paused?X.flowing=!0:Q.listenerCount("data")>0&&Q.resume()}function B(Q){s("readable nexttick read 0"),Q.read(0)}function G(Q,X){s("resume",X.reading),X.reading||Q.read(0),X.resumeScheduled=!1,Q.emit("resume"),N(Q),X.flowing&&!X.reading&&Q.read(0)}function N(Q){var X=Q._readableState;for(s("flow",X.flowing);X.flowing&&Q.read()!==null;);}function j(Q,X){return X.length===0?null:(X.objectMode?Y=X.buffer.shift():!Q||Q>=X.length?(Y=X.decoder?X.buffer.join(""):X.buffer.length===1?X.buffer.first():X.buffer.concat(X.length),X.buffer.clear()):Y=X.buffer.consume(Q,X.decoder),Y);var Y}function V(Q){var X=Q._readableState;s("endReadable",X.endEmitted),X.endEmitted||(X.ended=!0,w.nextTick(H,X,Q))}function H(Q,X){if(s("endReadableNT",Q.endEmitted,Q.length),!Q.endEmitted&&Q.length===0&&(Q.endEmitted=!0,X.readable=!1,X.emit("end"),Q.autoDestroy)){var Y=X._writableState;(!Y||Y.autoDestroy&&Y.finished)&&X.destroy()}}function ee(Q,X){for(var Y=0,K=Q.length;Y=X.highWaterMark:X.length>0)||X.ended))return s("read: emitReadable",X.length,X.ended),X.length===0&&X.ended?V(this):L(this),null;if((Q=C(Q,X))===0&&X.ended)return X.length===0&&V(this),null;var K,te=X.needReadable;return s("need readable",te),(X.length===0||X.length-Q0?j(Q,X):null)===null?(X.needReadable=X.length<=X.highWaterMark,Q=0):(X.length-=Q,X.awaitDrain=0),X.length===0&&(X.ended||(X.needReadable=!0),Y!==Q&&X.ended&&V(this)),K!==null&&this.emit("data",K),K},k.prototype._read=function(Q){x(this,new d("_read()"))},k.prototype.pipe=function(Q,X){var Y=this,K=this._readableState;switch(K.pipesCount){case 0:K.pipes=Q;break;case 1:K.pipes=[K.pipes,Q];break;default:K.pipes.push(Q)}K.pipesCount+=1,s("pipe count=%d opts=%j",K.pipesCount,X);var te=X&&X.end===!1||Q===w.stdout||Q===w.stderr?he:ae;function ae(){s("onend"),Q.end()}K.endEmitted?w.nextTick(te):Y.once("end",te),Q.on("unpipe",function xe(Re,we){s("onunpipe"),Re===Y&&we&&we.hasUnpiped===!1&&(we.hasUnpiped=!0,s("cleanup"),Q.removeListener("close",pe),Q.removeListener("finish",de),Q.removeListener("drain",oe),Q.removeListener("error",ye),Q.removeListener("unpipe",xe),Y.removeListener("end",ae),Y.removeListener("end",he),Y.removeListener("data",fe),se=!0,!K.awaitDrain||Q._writableState&&!Q._writableState.needDrain||oe())});var oe=function(xe){return function(){var Re=xe._readableState;s("pipeOnDrain",Re.awaitDrain),Re.awaitDrain&&Re.awaitDrain--,Re.awaitDrain===0&&T(xe,"data")&&(Re.flowing=!0,N(xe))}}(Y);Q.on("drain",oe);var se=!1;function fe(xe){s("ondata");var Re=Q.write(xe);s("dest.write",Re),Re===!1&&((K.pipesCount===1&&K.pipes===Q||K.pipesCount>1&&ee(K.pipes,Q)!==-1)&&!se&&(s("false write response, pause",K.awaitDrain),K.awaitDrain++),Y.pause())}function ye(xe){s("onerror",xe),he(),Q.removeListener("error",ye),T(Q,"error")===0&&x(Q,xe)}function pe(){Q.removeListener("finish",de),he()}function de(){s("onfinish"),Q.removeListener("close",pe),he()}function he(){s("unpipe"),Y.unpipe(Q)}return Y.on("data",fe),function(xe,Re,we){if(typeof xe.prependListener=="function")return xe.prependListener(Re,we);xe._events&&xe._events.error?Array.isArray(xe._events.error)?xe._events.error.unshift(we):xe._events.error=[we,xe._events.error]:xe.on(Re,we)}(Q,"error",ye),Q.once("close",pe),Q.once("finish",de),Q.emit("pipe",Y),K.flowing||(s("pipe resume"),Y.resume()),Q},k.prototype.unpipe=function(Q){var X=this._readableState,Y={hasUnpiped:!1};if(X.pipesCount===0)return this;if(X.pipesCount===1)return Q&&Q!==X.pipes||(Q||(Q=X.pipes),X.pipes=null,X.pipesCount=0,X.flowing=!1,Q&&Q.emit("unpipe",this,Y)),this;if(!Q){var K=X.pipes,te=X.pipesCount;X.pipes=null,X.pipesCount=0,X.flowing=!1;for(var ae=0;ae0,K.flowing!==!1&&this.resume()):Q==="readable"&&(K.endEmitted||K.readableListening||(K.readableListening=K.needReadable=!0,K.flowing=!1,K.emittedReadable=!1,s("on readable",K.length,K.reading),K.length?L(this):K.reading||w.nextTick(B,this))),Y},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(Q,X){var Y=y.prototype.removeListener.call(this,Q,X);return Q==="readable"&&w.nextTick(U,this),Y},k.prototype.removeAllListeners=function(Q){var X=y.prototype.removeAllListeners.apply(this,arguments);return Q!=="readable"&&Q!==void 0||w.nextTick(U,this),X},k.prototype.resume=function(){var Q=this._readableState;return Q.flowing||(s("resume"),Q.flowing=!Q.readableListening,function(X,Y){Y.resumeScheduled||(Y.resumeScheduled=!0,w.nextTick(G,X,Y))}(this,Q)),Q.paused=!1,this},k.prototype.pause=function(){return s("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(s("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(Q){var X=this,Y=this._readableState,K=!1;for(var te in Q.on("end",function(){if(s("wrapped end"),Y.decoder&&!Y.ended){var oe=Y.decoder.end();oe&&oe.length&&X.push(oe)}X.push(null)}),Q.on("data",function(oe){s("wrapped data"),Y.decoder&&(oe=Y.decoder.write(oe)),Y.objectMode&&oe==null||(Y.objectMode||oe&&oe.length)&&(X.push(oe)||(K=!0,Q.pause()))}),Q)this[te]===void 0&&typeof Q[te]=="function"&&(this[te]=function(oe){return function(){return Q[oe].apply(Q,arguments)}}(te));for(var ae=0;ae-1))throw new v(I);return this._writableState.defaultEncoding=I,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(I,R,U){U(new a("_write()"))},k.prototype._writev=null,k.prototype.end=function(I,R,U){var B=this._writableState;return typeof I=="function"?(U=I,I=null,R=null):typeof R=="function"&&(U=R,R=null),I!=null&&this.write(I,R),B.corked&&(B.corked=1,this.uncork()),B.ending||function(G,N,j){N.ending=!0,O(G,N),j&&(N.finished?w.nextTick(j):G.once("finish",j)),N.ended=!0,G.writable=!1}(this,B,U),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(I){this._writableState&&(this._writableState.destroyed=I)}}),k.prototype.destroy=i.destroy,k.prototype._undestroy=i.undestroy,k.prototype._destroy=function(I,R){R(I)}},68221:function(D,E,e){var _,w=e(90386);function s(b,d,v){return d in b?Object.defineProperty(b,d,{value:v,enumerable:!0,configurable:!0,writable:!0}):b[d]=v,b}var T=e(12726),y=Symbol("lastResolve"),f=Symbol("lastReject"),l=Symbol("error"),t=Symbol("ended"),i=Symbol("lastPromise"),r=Symbol("handlePromise"),n=Symbol("stream");function o(b,d){return{value:b,done:d}}function a(b){var d=b[y];if(d!==null){var v=b[n].read();v!==null&&(b[i]=null,b[y]=null,b[f]=null,d(o(v,!1)))}}function u(b){w.nextTick(a,b)}var p=Object.getPrototypeOf(function(){}),c=Object.setPrototypeOf((s(_={get stream(){return this[n]},next:function(){var b=this,d=this[l];if(d!==null)return Promise.reject(d);if(this[t])return Promise.resolve(o(void 0,!0));if(this[n].destroyed)return new Promise(function(m,k){w.nextTick(function(){b[l]?k(b[l]):m(o(void 0,!0))})});var v,x=this[i];if(x)v=new Promise(function(m,k){return function(h,M){m.then(function(){k[t]?h(o(void 0,!0)):k[r](h,M)},M)}}(x,this));else{var g=this[n].read();if(g!==null)return Promise.resolve(o(g,!1));v=new Promise(this[r])}return this[i]=v,v}},Symbol.asyncIterator,function(){return this}),s(_,"return",function(){var b=this;return new Promise(function(d,v){b[n].destroy(null,function(x){x?v(x):d(o(void 0,!0))})})}),_),p);D.exports=function(b){var d,v=Object.create(c,(s(d={},n,{value:b,writable:!0}),s(d,y,{value:null,writable:!0}),s(d,f,{value:null,writable:!0}),s(d,l,{value:null,writable:!0}),s(d,t,{value:b._readableState.endEmitted,writable:!0}),s(d,r,{value:function(x,g){var m=v[n].read();m?(v[i]=null,v[y]=null,v[f]=null,x(o(m,!1))):(v[y]=x,v[f]=g)},writable:!0}),d));return v[i]=null,T(b,function(x){if(x&&x.code!=="ERR_STREAM_PREMATURE_CLOSE"){var g=v[f];return g!==null&&(v[i]=null,v[y]=null,v[f]=null,g(x)),void(v[l]=x)}var m=v[y];m!==null&&(v[i]=null,v[y]=null,v[f]=null,m(o(void 0,!0))),v[t]=!0}),b.on("readable",u.bind(null,v)),v}},31125:function(D,E,e){function _(l,t){var i=Object.keys(l);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(l);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(l,n).enumerable})),i.push.apply(i,r)}return i}function w(l,t,i){return t in l?Object.defineProperty(l,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):l[t]=i,l}function s(l,t){for(var i=0;i0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var n=this.head,o=""+n.data;n=n.next;)o+=r+n.data;return o}},{key:"concat",value:function(r){if(this.length===0)return T.alloc(0);for(var n,o,a,u=T.allocUnsafe(r>>>0),p=this.head,c=0;p;)n=p.data,o=u,a=c,T.prototype.copy.call(n,o,a),c+=p.data.length,p=p.next;return u}},{key:"consume",value:function(r,n){var o;return ru.length?u.length:r;if(p===u.length?a+=u:a+=u.slice(0,r),(r-=p)==0){p===u.length?(++o,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=u.slice(p));break}++o}return this.length-=o,a}},{key:"_getBuffer",value:function(r){var n=T.allocUnsafe(r),o=this.head,a=1;for(o.data.copy(n),r-=o.data.length;o=o.next;){var u=o.data,p=r>u.length?u.length:r;if(u.copy(n,n.length-r,0,p),(r-=p)==0){p===u.length?(++a,o.next?this.head=o.next:this.head=this.tail=null):(this.head=o,o.data=u.slice(p));break}++a}return this.length-=a,n}},{key:f,value:function(r,n){return y(this,function(o){for(var a=1;a0,function(v){a||(a=v),v&&p.forEach(l),d||(p.forEach(l),u(a))})});return n.reduce(t)}},56306:function(D,E,e){var _=e(74322).q.ERR_INVALID_OPT_VALUE;D.exports={getHighWaterMark:function(w,s,T,y){var f=function(l,t,i){return l.highWaterMark!=null?l.highWaterMark:t?l[i]:null}(s,y,T);if(f!=null){if(!isFinite(f)||Math.floor(f)!==f||f<0)throw new _(y?T:"highWaterMark",f);return Math.floor(f)}return w.objectMode?16:16384}}},71405:function(D,E,e){D.exports=e(15398).EventEmitter},68019:function(D,E,e){var _=e(71665).Buffer,w=_.isEncoding||function(o){switch((o=""+o)&&o.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 s(o){var a;switch(this.encoding=function(u){var p=function(c){if(!c)return"utf8";for(var b;;)switch(c){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 c;default:if(b)return;c=(""+c).toLowerCase(),b=!0}}(u);if(typeof p!="string"&&(_.isEncoding===w||!w(u)))throw new Error("Unknown encoding: "+u);return p||u}(o),this.encoding){case"utf16le":this.text=f,this.end=l,a=4;break;case"utf8":this.fillLast=y,a=4;break;case"base64":this.text=t,this.end=i,a=3;break;default:return this.write=r,void(this.end=n)}this.lastNeed=0,this.lastTotal=0,this.lastChar=_.allocUnsafe(a)}function T(o){return o<=127?0:o>>5==6?2:o>>4==14?3:o>>3==30?4:o>>6==2?-1:-2}function y(o){var a=this.lastTotal-this.lastNeed,u=function(p,c,b){if((192&c[0])!=128)return p.lastNeed=0,"�";if(p.lastNeed>1&&c.length>1){if((192&c[1])!=128)return p.lastNeed=1,"�";if(p.lastNeed>2&&c.length>2&&(192&c[2])!=128)return p.lastNeed=2,"�"}}(this,o);return u!==void 0?u:this.lastNeed<=o.length?(o.copy(this.lastChar,a,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(o.copy(this.lastChar,a,0,o.length),void(this.lastNeed-=o.length))}function f(o,a){if((o.length-a)%2==0){var u=o.toString("utf16le",a);if(u){var p=u.charCodeAt(u.length-1);if(p>=55296&&p<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=o[o.length-2],this.lastChar[1]=o[o.length-1],u.slice(0,-1)}return u}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=o[o.length-1],o.toString("utf16le",a,o.length-1)}function l(o){var a=o&&o.length?this.write(o):"";if(this.lastNeed){var u=this.lastTotal-this.lastNeed;return a+this.lastChar.toString("utf16le",0,u)}return a}function t(o,a){var u=(o.length-a)%3;return u===0?o.toString("base64",a):(this.lastNeed=3-u,this.lastTotal=3,u===1?this.lastChar[0]=o[o.length-1]:(this.lastChar[0]=o[o.length-2],this.lastChar[1]=o[o.length-1]),o.toString("base64",a,o.length-u))}function i(o){var a=o&&o.length?this.write(o):"";return this.lastNeed?a+this.lastChar.toString("base64",0,3-this.lastNeed):a}function r(o){return o.toString(this.encoding)}function n(o){return o&&o.length?this.write(o):""}E.s=s,s.prototype.write=function(o){if(o.length===0)return"";var a,u;if(this.lastNeed){if((a=this.fillLast(o))===void 0)return"";u=this.lastNeed,this.lastNeed=0}else u=0;return u=0?(x>0&&(c.lastNeed=x-1),x):--v=0?(x>0&&(c.lastNeed=x-2),x):--v=0?(x>0&&(x===2?x=0:c.lastNeed=x-3),x):0}(this,o,a);if(!this.lastNeed)return o.toString("utf8",a);this.lastTotal=u;var p=o.length-(u-this.lastNeed);return o.copy(this.lastChar,0,p),o.toString("utf8",a,p)},s.prototype.fillLast=function(o){if(this.lastNeed<=o.length)return o.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);o.copy(this.lastChar,this.lastTotal-this.lastNeed,0,o.length),this.lastNeed-=o.length}},90715:function(D,E,e){var _=e(32791),w=e(41633)("stream-parser");function s(o){w("initializing parser stream"),o._parserBytesLeft=0,o._parserBuffers=[],o._parserBuffered=0,o._parserState=-1,o._parserCallback=null,typeof o.push=="function"&&(o._parserOutput=o.push.bind(o)),o._parserInit=!0}function T(o,a){_(!this._parserCallback,'there is already a "callback" set!'),_(isFinite(o)&&o>0,'can only buffer a finite number of bytes > 0, got "'+o+'"'),this._parserInit||s(this),w("buffering %o bytes",o),this._parserBytesLeft=o,this._parserCallback=a,this._parserState=0}function y(o,a){_(!this._parserCallback,'there is already a "callback" set!'),_(o>0,'can only skip > 0 bytes, got "'+o+'"'),this._parserInit||s(this),w("skipping %o bytes",o),this._parserBytesLeft=o,this._parserCallback=a,this._parserState=1}function f(o,a){_(!this._parserCallback,'There is already a "callback" set!'),_(o>0,'can only pass through > 0 bytes, got "'+o+'"'),this._parserInit||s(this),w("passing through %o bytes",o),this._parserBytesLeft=o,this._parserCallback=a,this._parserState=2}function l(o,a,u){this._parserInit||s(this),w("write(%o bytes)",o.length),typeof a=="function"&&(u=a),r(this,o,null,u)}function t(o,a,u){this._parserInit||s(this),w("transform(%o bytes)",o.length),typeof a!="function"&&(a=this._parserOutput),r(this,o,a,u)}function i(o,a,u,p){if(o._parserBytesLeft-=a.length,w("%o bytes left for stream piece",o._parserBytesLeft),o._parserState===0?(o._parserBuffers.push(a),o._parserBuffered+=a.length):o._parserState===2&&u(a),o._parserBytesLeft!==0)return p;var c=o._parserCallback;if(c&&o._parserState===0&&o._parserBuffers.length>1&&(a=Buffer.concat(o._parserBuffers,o._parserBuffered)),o._parserState!==0&&(a=null),o._parserCallback=null,o._parserBuffered=0,o._parserState=-1,o._parserBuffers.splice(0),c){var b=[];a&&b.push(a),u&&b.push(u);var d=c.length>b.length;d&&b.push(n(p));var v=c.apply(o,b);if(!d||p===v)return p}}D.exports=function(o){var a=o&&typeof o._transform=="function",u=o&&typeof o._write=="function";if(!a&&!u)throw new Error("must pass a Writable or Transform stream in");w("extending Parser into stream"),o._bytes=T,o._skipBytes=y,a&&(o._passthrough=f),a?o._transform=t:o._write=l};var r=n(function o(a,u,p,c){return a._parserBytesLeft<=0?c(new Error("got data but not currently parsing anything")):u.length<=a._parserBytesLeft?function(){return i(a,u,p,c)}:function(){var b=u.slice(0,a._parserBytesLeft);return i(a,b,p,function(d){return d?c(d):u.length>b.length?function(){return o(a,u.slice(b.length),p,c)}:void 0})}});function n(o){return function(){for(var a=o.apply(this,arguments);typeof a=="function";)a=a();return a}}},41633:function(D,E,e){var _=e(90386);function w(){var s;try{s=E.storage.debug}catch{}return!s&&_!==void 0&&"env"in _&&(s=_.env.DEBUG),s}(E=D.exports=e(74469)).log=function(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},E.formatArgs=function(s){var T=this.useColors;if(s[0]=(T?"%c":"")+this.namespace+(T?" %c":" ")+s[0]+(T?"%c ":" ")+"+"+E.humanize(this.diff),T){var y="color: "+this.color;s.splice(1,0,y,"color: inherit");var f=0,l=0;s[0].replace(/%[a-zA-Z%]/g,function(t){t!=="%%"&&(f++,t==="%c"&&(l=f))}),s.splice(l,0,y)}},E.save=function(s){try{s==null?E.storage.removeItem("debug"):E.storage.debug=s}catch{}},E.load=w,E.useColors=function(){return!(typeof window>"u"||!window.process||window.process.type!=="renderer")||typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},E.storage=typeof chrome<"u"&&chrome.storage!==void 0?chrome.storage.local:function(){try{return window.localStorage}catch{}}(),E.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],E.formatters.j=function(s){try{return JSON.stringify(s)}catch(T){return"[UnexpectedJSONParseError]: "+T.message}},E.enable(w())},74469:function(D,E,e){var _;function w(s){function T(){if(T.enabled){var y=T,f=+new Date,l=f-(_||f);y.diff=l,y.prev=_,y.curr=f,_=f;for(var t=new Array(arguments.length),i=0;i0)return function(t){if(!((t=String(t)).length>100)){var i=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(i){var r=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*r;case"days":case"day":case"d":return r*w;case"hours":case"hour":case"hrs":case"hr":case"h":return r*_;case"minutes":case"minute":case"mins":case"min":case"m":return r*e;case"seconds":case"second":case"secs":case"sec":case"s":return r*E;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}(T);if(l==="number"&&isNaN(T)===!1)return y.long?s(f=T,w,"day")||s(f,_,"hour")||s(f,e,"minute")||s(f,E,"second")||f+" ms":function(t){return t>=w?Math.round(t/w)+"d":t>=_?Math.round(t/_)+"h":t>=e?Math.round(t/e)+"m":t>=E?Math.round(t/E)+"s":t+"ms"}(T);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(T))}},99011:function(D,E,e){var _=e(88641);D.exports=function(w,s,T){if(w==null)throw Error("First argument should be a string");if(s==null)throw Error("Separator should be a string or a RegExp");T?(typeof T=="string"||Array.isArray(T))&&(T={ignore:T}):T={},T.escape==null&&(T.escape=!0),T.ignore==null?T.ignore=["[]","()","{}","<>",'""',"''","``","“”","«»"]:(typeof T.ignore=="string"&&(T.ignore=[T.ignore]),T.ignore=T.ignore.map(function(n){return n.length===1&&(n+=n),n}));var y=_.parse(w,{flat:!0,brackets:T.ignore}),f=y[0].split(s);if(T.escape){for(var l=[],t=0;t0;){p=b[b.length-1];var d=E[p];if(T[p]=0&&f[p].push(y[x])}T[p]=v}else{if(w[p]===_[p]){var g=[],m=[],k=0;for(v=c.length-1;v>=0;--v){var h=c[v];if(s[h]=!1,g.push(h),m.push(f[h]),k+=f[h].length,y[h]=r.length,h===p){c.length=v;break}}r.push(g);var M=new Array(k);for(v=0;v1&&(i=1),i<-1&&(i=-1),(y*t-f*l<0?-1:1)*Math.acos(i)};E.default=function(y){var f=y.px,l=y.py,t=y.cx,i=y.cy,r=y.rx,n=y.ry,o=y.xAxisRotation,a=o===void 0?0:o,u=y.largeArcFlag,p=u===void 0?0:u,c=y.sweepFlag,b=c===void 0?0:c,d=[];if(r===0||n===0)return[];var v=Math.sin(a*_/360),x=Math.cos(a*_/360),g=x*(f-t)/2+v*(l-i)/2,m=-v*(f-t)/2+x*(l-i)/2;if(g===0&&m===0)return[];r=Math.abs(r),n=Math.abs(n);var k=Math.pow(g,2)/Math.pow(r,2)+Math.pow(m,2)/Math.pow(n,2);k>1&&(r*=Math.sqrt(k),n*=Math.sqrt(k));var h=function(B,G,N,j,V,H,ee,Q,X,Y,K,te){var ae=Math.pow(V,2),oe=Math.pow(H,2),se=Math.pow(K,2),fe=Math.pow(te,2),ye=ae*oe-ae*fe-oe*se;ye<0&&(ye=0),ye/=ae*fe+oe*se;var pe=(ye=Math.sqrt(ye)*(ee===Q?-1:1))*V/H*te,de=ye*-H/V*K,he=Y*pe-X*de+(B+N)/2,xe=X*pe+Y*de+(G+j)/2,Re=(K-pe)/V,we=(te-de)/H,Ae=(-K-pe)/V,Me=(-te-de)/H,Ce=T(1,0,Re,we),ne=T(Re,we,Ae,Me);return Q===0&&ne>0&&(ne-=_),Q===1&&ne<0&&(ne+=_),[he,xe,Ce,ne]}(f,l,t,i,r,n,p,b,v,x,g,m),M=function(B,G){if(Array.isArray(B))return B;if(Symbol.iterator in Object(B))return function(N,j){var V=[],H=!0,ee=!1,Q=void 0;try{for(var X,Y=N[Symbol.iterator]();!(H=(X=Y.next()).done)&&(V.push(X.value),!j||V.length!==j);H=!0);}catch(K){ee=!0,Q=K}finally{try{!H&&Y.return&&Y.return()}finally{if(ee)throw Q}}return V}(B,G);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(h,4),A=M[0],C=M[1],L=M[2],O=M[3],I=Math.abs(O)/(_/4);Math.abs(1-I)<1e-7&&(I=1);var R=Math.max(Math.ceil(I),1);O/=R;for(var U=0;Ul[2]&&(l[2]=r[n+0]),r[n+1]>l[3]&&(l[3]=r[n+1]);return l}},29988:function(D,E,e){D.exports=function(T){for(var y,f=[],l=0,t=0,i=0,r=0,n=null,o=null,a=0,u=0,p=0,c=T.length;p4?(l=b[b.length-4],t=b[b.length-3]):(l=a,t=u),f.push(b)}return f};var _=e(7095);function w(T,y,f,l){return["C",T,y,f,l,f,l]}function s(T,y,f,l,t,i){return["C",T/3+.6666666666666666*f,y/3+.6666666666666666*l,t/3+.6666666666666666*f,i/3+.6666666666666666*l,t,i]}},82019:function(D,E,e){var _,w=e(1750),s=e(95616),T=e(31457),y=e(89546),f=e(44781),l=document.createElement("canvas"),t=l.getContext("2d");D.exports=function(i,r){if(!y(i))throw Error("Argument should be valid svg path string");var n,o;r||(r={}),r.shape?(n=r.shape[0],o=r.shape[1]):(n=l.width=r.w||r.width||200,o=l.height=r.h||r.height||200);var a=Math.min(n,o),u=r.stroke||0,p=r.viewbox||r.viewBox||w(i),c=[n/(p[2]-p[0]),o/(p[3]-p[1])],b=Math.min(c[0]||0,c[1]||0)/2;if(t.fillStyle="black",t.fillRect(0,0,n,o),t.fillStyle="white",u&&(typeof u!="number"&&(u=1),t.strokeStyle=u>0?"white":"black",t.lineWidth=Math.abs(u)),t.translate(.5*n,.5*o),t.scale(b,b),function(){if(_!=null)return _;var x=document.createElement("canvas").getContext("2d");if(x.canvas.width=x.canvas.height=1,!window.Path2D)return _=!1;var g=new Path2D("M0,0h1v1h-1v-1Z");x.fillStyle="black",x.fill(g);var m=x.getImageData(0,0,1,1);return _=m&&m.data&&m.data[3]===255}()){var d=new Path2D(i);t.fill(d),u&&t.stroke(d)}else{var v=s(i);T(t,v),t.fill(),u&&t.stroke()}return t.setTransform(1,0,0,1,0,0),f(t,{cutoff:r.cutoff!=null?r.cutoff:.5,radius:r.radius!=null?r.radius:.5*a})}},84267:function(D,E,e){var _;(function(w){var s=/^\s+/,T=/\s+$/,y=0,f=w.round,l=w.min,t=w.max,i=w.random;function r(K,te){if(te=te||{},(K=K||"")instanceof r)return K;if(!(this instanceof r))return new r(K,te);var ae=function(oe){var se,fe,ye,pe={r:0,g:0,b:0},de=1,he=null,xe=null,Re=null,we=!1,Ae=!1;return typeof oe=="string"&&(oe=function(Me){Me=Me.replace(s,"").replace(T,"").toLowerCase();var Ce,ne=!1;if(L[Me])Me=L[Me],ne=!0;else if(Me=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};return(Ce=X.rgb.exec(Me))?{r:Ce[1],g:Ce[2],b:Ce[3]}:(Ce=X.rgba.exec(Me))?{r:Ce[1],g:Ce[2],b:Ce[3],a:Ce[4]}:(Ce=X.hsl.exec(Me))?{h:Ce[1],s:Ce[2],l:Ce[3]}:(Ce=X.hsla.exec(Me))?{h:Ce[1],s:Ce[2],l:Ce[3],a:Ce[4]}:(Ce=X.hsv.exec(Me))?{h:Ce[1],s:Ce[2],v:Ce[3]}:(Ce=X.hsva.exec(Me))?{h:Ce[1],s:Ce[2],v:Ce[3],a:Ce[4]}:(Ce=X.hex8.exec(Me))?{r:B(Ce[1]),g:B(Ce[2]),b:B(Ce[3]),a:V(Ce[4]),format:ne?"name":"hex8"}:(Ce=X.hex6.exec(Me))?{r:B(Ce[1]),g:B(Ce[2]),b:B(Ce[3]),format:ne?"name":"hex"}:(Ce=X.hex4.exec(Me))?{r:B(Ce[1]+""+Ce[1]),g:B(Ce[2]+""+Ce[2]),b:B(Ce[3]+""+Ce[3]),a:V(Ce[4]+""+Ce[4]),format:ne?"name":"hex8"}:!!(Ce=X.hex3.exec(Me))&&{r:B(Ce[1]+""+Ce[1]),g:B(Ce[2]+""+Ce[2]),b:B(Ce[3]+""+Ce[3]),format:ne?"name":"hex"}}(oe)),typeof oe=="object"&&(Y(oe.r)&&Y(oe.g)&&Y(oe.b)?(se=oe.r,fe=oe.g,ye=oe.b,pe={r:255*R(se,255),g:255*R(fe,255),b:255*R(ye,255)},we=!0,Ae=String(oe.r).substr(-1)==="%"?"prgb":"rgb"):Y(oe.h)&&Y(oe.s)&&Y(oe.v)?(he=N(oe.s),xe=N(oe.v),pe=function(Me,Ce,ne){Me=6*R(Me,360),Ce=R(Ce,100),ne=R(ne,100);var ue=w.floor(Me),me=Me-ue,Te=ne*(1-Ce),Ee=ne*(1-me*Ce),Ue=ne*(1-(1-me)*Ce),De=ue%6;return{r:255*[ne,Ee,Te,Te,Ue,ne][De],g:255*[Ue,ne,ne,Ee,Te,Te][De],b:255*[Te,Te,Ue,ne,ne,Ee][De]}}(oe.h,he,xe),we=!0,Ae="hsv"):Y(oe.h)&&Y(oe.s)&&Y(oe.l)&&(he=N(oe.s),Re=N(oe.l),pe=function(Me,Ce,ne){var ue,me,Te;function Ee(je,ge,be){return be<0&&(be+=1),be>1&&(be-=1),be<1/6?je+6*(ge-je)*be:be<.5?ge:be<2/3?je+(ge-je)*(2/3-be)*6:je}if(Me=R(Me,360),Ce=R(Ce,100),ne=R(ne,100),Ce===0)ue=me=Te=ne;else{var Ue=ne<.5?ne*(1+Ce):ne+Ce-ne*Ce,De=2*ne-Ue;ue=Ee(De,Ue,Me+1/3),me=Ee(De,Ue,Me),Te=Ee(De,Ue,Me-1/3)}return{r:255*ue,g:255*me,b:255*Te}}(oe.h,he,Re),we=!0,Ae="hsl"),oe.hasOwnProperty("a")&&(de=oe.a)),de=I(de),{ok:we,format:oe.format||Ae,r:l(255,t(pe.r,0)),g:l(255,t(pe.g,0)),b:l(255,t(pe.b,0)),a:de}}(K);this._originalInput=K,this._r=ae.r,this._g=ae.g,this._b=ae.b,this._a=ae.a,this._roundA=f(100*this._a)/100,this._format=te.format||ae.format,this._gradientType=te.gradientType,this._r<1&&(this._r=f(this._r)),this._g<1&&(this._g=f(this._g)),this._b<1&&(this._b=f(this._b)),this._ok=ae.ok,this._tc_id=y++}function n(K,te,ae){K=R(K,255),te=R(te,255),ae=R(ae,255);var oe,se,fe=t(K,te,ae),ye=l(K,te,ae),pe=(fe+ye)/2;if(fe==ye)oe=se=0;else{var de=fe-ye;switch(se=pe>.5?de/(2-fe-ye):de/(fe+ye),fe){case K:oe=(te-ae)/de+(te>1)+720)%360;--te;)oe.h=(oe.h+se)%360,fe.push(r(oe));return fe}function C(K,te){te=te||6;for(var ae=r(K).toHsv(),oe=ae.h,se=ae.s,fe=ae.v,ye=[],pe=1/te;te--;)ye.push(r({h:oe,s:se,v:fe})),fe=(fe+pe)%1;return ye}r.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 K=this.toRgb();return(299*K.r+587*K.g+114*K.b)/1e3},getLuminance:function(){var K,te,ae,oe=this.toRgb();return K=oe.r/255,te=oe.g/255,ae=oe.b/255,.2126*(K<=.03928?K/12.92:w.pow((K+.055)/1.055,2.4))+.7152*(te<=.03928?te/12.92:w.pow((te+.055)/1.055,2.4))+.0722*(ae<=.03928?ae/12.92:w.pow((ae+.055)/1.055,2.4))},setAlpha:function(K){return this._a=I(K),this._roundA=f(100*this._a)/100,this},toHsv:function(){var K=o(this._r,this._g,this._b);return{h:360*K.h,s:K.s,v:K.v,a:this._a}},toHsvString:function(){var K=o(this._r,this._g,this._b),te=f(360*K.h),ae=f(100*K.s),oe=f(100*K.v);return this._a==1?"hsv("+te+", "+ae+"%, "+oe+"%)":"hsva("+te+", "+ae+"%, "+oe+"%, "+this._roundA+")"},toHsl:function(){var K=n(this._r,this._g,this._b);return{h:360*K.h,s:K.s,l:K.l,a:this._a}},toHslString:function(){var K=n(this._r,this._g,this._b),te=f(360*K.h),ae=f(100*K.s),oe=f(100*K.l);return this._a==1?"hsl("+te+", "+ae+"%, "+oe+"%)":"hsla("+te+", "+ae+"%, "+oe+"%, "+this._roundA+")"},toHex:function(K){return a(this._r,this._g,this._b,K)},toHexString:function(K){return"#"+this.toHex(K)},toHex8:function(K){return function(te,ae,oe,se,fe){var ye=[G(f(te).toString(16)),G(f(ae).toString(16)),G(f(oe).toString(16)),G(j(se))];return fe&&ye[0].charAt(0)==ye[0].charAt(1)&&ye[1].charAt(0)==ye[1].charAt(1)&&ye[2].charAt(0)==ye[2].charAt(1)&&ye[3].charAt(0)==ye[3].charAt(1)?ye[0].charAt(0)+ye[1].charAt(0)+ye[2].charAt(0)+ye[3].charAt(0):ye.join("")}(this._r,this._g,this._b,this._a,K)},toHex8String:function(K){return"#"+this.toHex8(K)},toRgb:function(){return{r:f(this._r),g:f(this._g),b:f(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+f(this._r)+", "+f(this._g)+", "+f(this._b)+")":"rgba("+f(this._r)+", "+f(this._g)+", "+f(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:f(100*R(this._r,255))+"%",g:f(100*R(this._g,255))+"%",b:f(100*R(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+f(100*R(this._r,255))+"%, "+f(100*R(this._g,255))+"%, "+f(100*R(this._b,255))+"%)":"rgba("+f(100*R(this._r,255))+"%, "+f(100*R(this._g,255))+"%, "+f(100*R(this._b,255))+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":!(this._a<1)&&(O[a(this._r,this._g,this._b,!0)]||!1)},toFilter:function(K){var te="#"+u(this._r,this._g,this._b,this._a),ae=te,oe=this._gradientType?"GradientType = 1, ":"";if(K){var se=r(K);ae="#"+u(se._r,se._g,se._b,se._a)}return"progid:DXImageTransform.Microsoft.gradient("+oe+"startColorstr="+te+",endColorstr="+ae+")"},toString:function(K){var te=!!K;K=K||this._format;var ae=!1,oe=this._a<1&&this._a>=0;return te||!oe||K!=="hex"&&K!=="hex6"&&K!=="hex3"&&K!=="hex4"&&K!=="hex8"&&K!=="name"?(K==="rgb"&&(ae=this.toRgbString()),K==="prgb"&&(ae=this.toPercentageRgbString()),K!=="hex"&&K!=="hex6"||(ae=this.toHexString()),K==="hex3"&&(ae=this.toHexString(!0)),K==="hex4"&&(ae=this.toHex8String(!0)),K==="hex8"&&(ae=this.toHex8String()),K==="name"&&(ae=this.toName()),K==="hsl"&&(ae=this.toHslString()),K==="hsv"&&(ae=this.toHsvString()),ae||this.toHexString()):K==="name"&&this._a===0?this.toName():this.toRgbString()},clone:function(){return r(this.toString())},_applyModification:function(K,te){var ae=K.apply(null,[this].concat([].slice.call(te)));return this._r=ae._r,this._g=ae._g,this._b=ae._b,this.setAlpha(ae._a),this},lighten:function(){return this._applyModification(d,arguments)},brighten:function(){return this._applyModification(v,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(p,arguments)},saturate:function(){return this._applyModification(c,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(g,arguments)},_applyCombination:function(K,te){return K.apply(null,[this].concat([].slice.call(te)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(m,arguments)},monochromatic:function(){return this._applyCombination(C,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(k,arguments)},tetrad:function(){return this._applyCombination(h,arguments)}},r.fromRatio=function(K,te){if(typeof K=="object"){var ae={};for(var oe in K)K.hasOwnProperty(oe)&&(ae[oe]=oe==="a"?K[oe]:N(K[oe]));K=ae}return r(K,te)},r.equals=function(K,te){return!(!K||!te)&&r(K).toRgbString()==r(te).toRgbString()},r.random=function(){return r.fromRatio({r:i(),g:i(),b:i()})},r.mix=function(K,te,ae){ae=ae===0?0:ae||50;var oe=r(K).toRgb(),se=r(te).toRgb(),fe=ae/100;return r({r:(se.r-oe.r)*fe+oe.r,g:(se.g-oe.g)*fe+oe.g,b:(se.b-oe.b)*fe+oe.b,a:(se.a-oe.a)*fe+oe.a})},r.readability=function(K,te){var ae=r(K),oe=r(te);return(w.max(ae.getLuminance(),oe.getLuminance())+.05)/(w.min(ae.getLuminance(),oe.getLuminance())+.05)},r.isReadable=function(K,te,ae){var oe,se,fe,ye,pe,de=r.readability(K,te);switch(se=!1,(fe=ae,(ye=((fe=fe||{level:"AA",size:"small"}).level||"AA").toUpperCase())!=="AA"&&ye!=="AAA"&&(ye="AA"),(pe=(fe.size||"small").toLowerCase())!=="small"&&pe!=="large"&&(pe="small"),oe={level:ye,size:pe}).level+oe.size){case"AAsmall":case"AAAlarge":se=de>=4.5;break;case"AAlarge":se=de>=3;break;case"AAAsmall":se=de>=7}return se},r.mostReadable=function(K,te,ae){var oe,se,fe,ye,pe=null,de=0;se=(ae=ae||{}).includeFallbackColors,fe=ae.level,ye=ae.size;for(var he=0;hede&&(de=oe,pe=r(te[he]));return r.isReadable(K,pe,{level:fe,size:ye})||!se?pe:(ae.includeFallbackColors=!1,r.mostReadable(K,["#fff","#000"],ae))};var L=r.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"},O=r.hexNames=function(K){var te={};for(var ae in K)K.hasOwnProperty(ae)&&(te[K[ae]]=ae);return te}(L);function I(K){return K=parseFloat(K),(isNaN(K)||K<0||K>1)&&(K=1),K}function R(K,te){(function(oe){return typeof oe=="string"&&oe.indexOf(".")!=-1&&parseFloat(oe)===1})(K)&&(K="100%");var ae=function(oe){return typeof oe=="string"&&oe.indexOf("%")!=-1}(K);return K=l(te,t(0,parseFloat(K))),ae&&(K=parseInt(K*te,10)/100),w.abs(K-te)<1e-6?1:K%te/parseFloat(te)}function U(K){return l(1,t(0,K))}function B(K){return parseInt(K,16)}function G(K){return K.length==1?"0"+K:""+K}function N(K){return K<=1&&(K=100*K+"%"),K}function j(K){return w.round(255*parseFloat(K)).toString(16)}function V(K){return B(K)/255}var H,ee,Q,X=(ee="[\\s|\\(]+("+(H="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",Q="[\\s|\\(]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",{CSS_UNIT:new RegExp(H),rgb:new RegExp("rgb"+ee),rgba:new RegExp("rgba"+Q),hsl:new RegExp("hsl"+ee),hsla:new RegExp("hsla"+Q),hsv:new RegExp("hsv"+ee),hsva:new RegExp("hsva"+Q),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 Y(K){return!!X.CSS_UNIT.exec(K)}D.exports?D.exports=r:(_=function(){return r}.call(E,e,E,D))===void 0||(D.exports=_)})(Math)},57060:function(D){D.exports=e,D.exports.float32=D.exports.float=e,D.exports.fract32=D.exports.fract=function(_,w){if(_.length){if(_ instanceof Float32Array)return new Float32Array(_.length);w instanceof Float32Array||(w=e(_));for(var s=0,T=w.length;s":(T.length>100&&(T=T.slice(0,99)+"…"),T=T.replace(w,function(y){switch(y){case` -`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}))}},47403:function(D,E,e){var _=e(24582),w={object:!0,function:!0,undefined:!0};D.exports=function(s){return!!_(s)&&hasOwnProperty.call(w,typeof s)}},82527:function(D,E,e){var _=e(69190),w=e(84985);D.exports=function(s){return w(s)?s:_(s,"%v is not a plain function",arguments[1])}},84985:function(D,E,e){var _=e(73116),w=/^\s*class[\s{/}]/,s=Function.prototype.toString;D.exports=function(T){return!!_(T)&&!w.test(s.call(T))}},24511:function(D,E,e){var _=e(47403);D.exports=function(w){if(!_(w))return!1;try{return!!w.constructor&&w.constructor.prototype===w}catch{return!1}}},9234:function(D,E,e){var _=e(24582),w=e(47403),s=Object.prototype.toString;D.exports=function(T){if(!_(T))return null;if(w(T)){var y=T.toString;if(typeof y!="function"||y===s)return null}try{return""+T}catch{return null}}},10424:function(D,E,e){var _=e(69190),w=e(24582);D.exports=function(s){return w(s)?s:_(s,"Cannot use %v",arguments[1])}},24582:function(D){D.exports=function(E){return E!=null}},58404:function(D,E,e){var _=e(13547),w=e(12129),s=e(12856).Buffer;e.g.__TYPEDARRAY_POOL||(e.g.__TYPEDARRAY_POOL={UINT8:w([32,0]),UINT16:w([32,0]),UINT32:w([32,0]),BIGUINT64:w([32,0]),INT8:w([32,0]),INT16:w([32,0]),INT32:w([32,0]),BIGINT64:w([32,0]),FLOAT:w([32,0]),DOUBLE:w([32,0]),DATA:w([32,0]),UINT8C:w([32,0]),BUFFER:w([32,0])});var T=typeof Uint8ClampedArray<"u",y=typeof BigUint64Array<"u",f=typeof BigInt64Array<"u",l=e.g.__TYPEDARRAY_POOL;l.UINT8C||(l.UINT8C=w([32,0])),l.BIGUINT64||(l.BIGUINT64=w([32,0])),l.BIGINT64||(l.BIGINT64=w([32,0])),l.BUFFER||(l.BUFFER=w([32,0]));var t=l.DATA,i=l.BUFFER;function r(M){if(M){var A=M.length||M.byteLength,C=_.log2(A);t[C].push(M)}}function n(M){M=_.nextPow2(M);var A=_.log2(M),C=t[A];return C.length>0?C.pop():new ArrayBuffer(M)}function o(M){return new Uint8Array(n(M),0,M)}function a(M){return new Uint16Array(n(2*M),0,M)}function u(M){return new Uint32Array(n(4*M),0,M)}function p(M){return new Int8Array(n(M),0,M)}function c(M){return new Int16Array(n(2*M),0,M)}function b(M){return new Int32Array(n(4*M),0,M)}function d(M){return new Float32Array(n(4*M),0,M)}function v(M){return new Float64Array(n(8*M),0,M)}function x(M){return T?new Uint8ClampedArray(n(M),0,M):o(M)}function g(M){return y?new BigUint64Array(n(8*M),0,M):null}function m(M){return f?new BigInt64Array(n(8*M),0,M):null}function k(M){return new DataView(n(M),0,M)}function h(M){M=_.nextPow2(M);var A=_.log2(M),C=i[A];return C.length>0?C.pop():new s(M)}E.free=function(M){if(s.isBuffer(M))i[_.log2(M.length)].push(M);else{if(Object.prototype.toString.call(M)!=="[object ArrayBuffer]"&&(M=M.buffer),!M)return;var A=M.length||M.byteLength,C=0|_.log2(A);t[C].push(M)}},E.freeUint8=E.freeUint16=E.freeUint32=E.freeBigUint64=E.freeInt8=E.freeInt16=E.freeInt32=E.freeBigInt64=E.freeFloat32=E.freeFloat=E.freeFloat64=E.freeDouble=E.freeUint8Clamped=E.freeDataView=function(M){r(M.buffer)},E.freeArrayBuffer=r,E.freeBuffer=function(M){i[_.log2(M.length)].push(M)},E.malloc=function(M,A){if(A===void 0||A==="arraybuffer")return n(M);switch(A){case"uint8":return o(M);case"uint16":return a(M);case"uint32":return u(M);case"int8":return p(M);case"int16":return c(M);case"int32":return b(M);case"float":case"float32":return d(M);case"double":case"float64":return v(M);case"uint8_clamped":return x(M);case"bigint64":return m(M);case"biguint64":return g(M);case"buffer":return h(M);case"data":case"dataview":return k(M);default:return null}return null},E.mallocArrayBuffer=n,E.mallocUint8=o,E.mallocUint16=a,E.mallocUint32=u,E.mallocInt8=p,E.mallocInt16=c,E.mallocInt32=b,E.mallocFloat32=E.mallocFloat=d,E.mallocFloat64=E.mallocDouble=v,E.mallocUint8Clamped=x,E.mallocBigUint64=g,E.mallocBigInt64=m,E.mallocDataView=k,E.mallocBuffer=h,E.clearCache=function(){for(var M=0;M<32;++M)l.UINT8[M].length=0,l.UINT16[M].length=0,l.UINT32[M].length=0,l.INT8[M].length=0,l.INT16[M].length=0,l.INT32[M].length=0,l.FLOAT[M].length=0,l.DOUBLE[M].length=0,l.BIGUINT64[M].length=0,l.BIGINT64[M].length=0,l.UINT8C[M].length=0,t[M].length=0,i[M].length=0}},90448:function(D){var E=/[\'\"]/;D.exports=function(e){return e?(E.test(e.charAt(0))&&(e=e.substr(1)),E.test(e.charAt(e.length-1))&&(e=e.substr(0,e.length-1)),e):""}},93447:function(D){D.exports=function(E,e,_){Array.isArray(_)||(_=[].slice.call(arguments,2));for(var w=0,s=_.length;w=N)return H;switch(H){case"%s":return String(G[B++]);case"%d":return Number(G[B++]);case"%j":try{return JSON.stringify(G[B++])}catch{return"[Circular]"}default:return H}}),V=G[B];B=3&&(B.depth=arguments[2]),arguments.length>=4&&(B.colors=arguments[3]),u(U)?B.showHidden=U:U&&E._extend(B,U),d(B.showHidden)&&(B.showHidden=!1),d(B.depth)&&(B.depth=2),d(B.colors)&&(B.colors=!1),d(B.customInspect)&&(B.customInspect=!0),B.colors&&(B.stylize=t),r(B,R,B.depth)}function t(R,U){var B=l.styles[U];return B?"\x1B["+l.colors[B][0]+"m"+R+"\x1B["+l.colors[B][1]+"m":R}function i(R,U){return R}function r(R,U,B){if(R.customInspect&&U&&k(U.inspect)&&U.inspect!==E.inspect&&(!U.constructor||U.constructor.prototype!==U)){var G=U.inspect(B,R);return b(G)||(G=r(R,G,B)),G}var N=function(K,te){if(d(te))return K.stylize("undefined","undefined");if(b(te)){var ae="'"+JSON.stringify(te).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return K.stylize(ae,"string")}return c(te)?K.stylize(""+te,"number"):u(te)?K.stylize(""+te,"boolean"):p(te)?K.stylize("null","null"):void 0}(R,U);if(N)return N;var j=Object.keys(U),V=function(K){var te={};return K.forEach(function(ae,oe){te[ae]=!0}),te}(j);if(R.showHidden&&(j=Object.getOwnPropertyNames(U)),m(U)&&(j.indexOf("message")>=0||j.indexOf("description")>=0))return n(U);if(j.length===0){if(k(U)){var H=U.name?": "+U.name:"";return R.stylize("[Function"+H+"]","special")}if(v(U))return R.stylize(RegExp.prototype.toString.call(U),"regexp");if(g(U))return R.stylize(Date.prototype.toString.call(U),"date");if(m(U))return n(U)}var ee,Q="",X=!1,Y=["{","}"];return a(U)&&(X=!0,Y=["[","]"]),k(U)&&(Q=" [Function"+(U.name?": "+U.name:"")+"]"),v(U)&&(Q=" "+RegExp.prototype.toString.call(U)),g(U)&&(Q=" "+Date.prototype.toUTCString.call(U)),m(U)&&(Q=" "+n(U)),j.length!==0||X&&U.length!=0?B<0?v(U)?R.stylize(RegExp.prototype.toString.call(U),"regexp"):R.stylize("[Object]","special"):(R.seen.push(U),ee=X?function(K,te,ae,oe,se){for(var fe=[],ye=0,pe=te.length;ye>>4&15)+"0123456789abcdef".charAt(15&Pt);return Bt}(function(_t){for(var Pt=Array(_t.length>>2),Bt=0;Bt>5]|=(255&_t.charCodeAt(Bt/8))<<24-Bt%32;var Wt,Gt,Xt,Kt,nn,yn,ln,kn,Wn,wn,on,_n=8*_t.length;for(_t=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Bt=Array(64),Pt[_n>>5]|=128<<24-_n%32,Pt[15+(_n+64>>9<<4)]=_n,kn=0;knWn;Wn++){var fn;16>Wn?Bt[Wn]=Pt[Wn+kn]:(wn=Wn,on=U(on=R(on=Bt[Wn-2],17)^R(on,19)^on>>>10,Bt[Wn-7]),fn=R(fn=Bt[Wn-15],7)^R(fn,18)^fn>>>3,Bt[wn]=U(U(on,fn),Bt[Wn-16])),wn=U(U(U(U(ln,wn=R(wn=Kt,6)^R(wn,11)^R(wn,25)),Kt&nn^~Kt&yn),xt[Wn]),Bt[Wn]),on=U(ln=R(ln=_n,2)^R(ln,13)^R(ln,22),_n&Wt^_n&Gt^Wt&Gt),ln=yn,yn=nn,nn=Kt,Kt=U(Xt,wn),Xt=Gt,Gt=Wt,Wt=_n,_n=U(wn,on)}_t[0]=U(_n,_t[0]),_t[1]=U(Wt,_t[1]),_t[2]=U(Gt,_t[2]),_t[3]=U(Xt,_t[3]),_t[4]=U(Kt,_t[4]),_t[5]=U(nn,_t[5]),_t[6]=U(yn,_t[6]),_t[7]=U(ln,_t[7])}for(Pt="",Bt=0;Bt<32*_t.length;Bt+=8)Pt+=String.fromCharCode(_t[Bt>>5]>>>24-Bt%32&255);return Pt}(function(_t){for(var Pt,Bt,Wt="",Gt=-1;++Gt<_t.length;)Pt=_t.charCodeAt(Gt),Bt=Gt+1<_t.length?_t.charCodeAt(Gt+1):0,55296<=Pt&&56319>=Pt&&56320<=Bt&&57343>=Bt&&(Pt=65536+((1023&Pt)<<10)+(1023&Bt),Gt++),127>=Pt?Wt+=String.fromCharCode(Pt):2047>=Pt?Wt+=String.fromCharCode(192|Pt>>>6&31,128|63&Pt):65535>=Pt?Wt+=String.fromCharCode(224|Pt>>>12&15,128|Pt>>>6&63,128|63&Pt):2097151>=Pt&&(Wt+=String.fromCharCode(240|Pt>>>18&7,128|Pt>>>12&63,128|Pt>>>6&63,128|63&Pt));return Wt}(Ot))),Oe[mt])?Oe[mt].apply(null,ut):(Ot=Function.apply(null,Qe.concat(Ot)),Oe&&(Oe[mt]=Ot),Ot.apply(null,ut))}}}function j(Ge){return Array.isArray(Ge)||de(Ge)||t(Ge)}function V(Ge){return Ge.sort(function(nt,ht){return nt==="viewport"?-1:ht==="viewport"?1:nt"+vr+"?"+An+".constant["+vr+"]:0;"}).join(""),"}}else{","if(",er,"(",An,".buffer)){",sr,"=",Bn,".createStream(",34962,",",An,".buffer);","}else{",sr,"=",Bn,".getBuffer(",An,".buffer);","}",fr,'="type" in ',An,"?",Xn.glTypes,"[",An,".type]:",sr,".dtype;",Jn.normalized,"=!!",An,".normalized;"),vn("size"),vn("offset"),vn("stride"),vn("divisor"),dn("}}"),dn.exit("if(",Jn.isStream,"){",Bn,".destroyStream(",sr,");","}"),Jn})}),On}function Wn(jt,Jt,un,Rn,On){function Sn(lr){var sr=bn[lr];sr&&(vn[lr]=sr)}var pn=function(lr,sr){if(typeof(fr=lr.static).frag=="string"&&typeof fr.vert=="string"){if(0"u"?"Date.now()":"performance.now()"}function pn(lr){lr(vn=Jt.def(),"=",Sn(),";"),typeof On=="string"?lr(Xn,".count+=",On,";"):lr(Xn,".count++;"),_t&&(Rn?lr(An=Jt.def(),"=",Jn,".getNumPendingQueries();"):lr(Jn,".beginQuery(",Xn,");"))}function bn(lr){lr(Xn,".cpuTime+=",Sn(),"-",vn,";"),_t&&(Rn?lr(Jn,".pushScopeStats(",An,",",Jn,".getNumPendingQueries(),",Xn,");"):lr(Jn,".endQuery();"))}function dn(lr){var sr=Jt.def(er,".profile");Jt(er,".profile=",lr,";"),Jt.exit(er,".profile=",sr,";")}var vn,An,Bn=jt.shared,Xn=jt.stats,er=Bn.current,Jn=Bn.timer;if(un=un.profile){if(ee(un))return void(un.enable?(pn(Jt),bn(Jt.exit),dn("true")):dn("false"));dn(un=un.append(jt,Jt))}else un=Jt.def(er,".profile");pn(Bn=jt.block()),Jt("if(",un,"){",Bn,"}"),bn(jt=jt.block()),Jt.exit("if(",un,"){",jt,"}")}function Cn(jt,Jt,un,Rn,On){function Sn(bn,dn,vn){function An(){Jt("if(!",Jn,".buffer){",Xn,".enableVertexAttribArray(",er,");}");var cr,vr=vn.type;cr=vn.size?Jt.def(vn.size,"||",dn):dn,Jt("if(",Jn,".type!==",vr,"||",Jn,".size!==",cr,"||",fr.map(function(Sr){return Jn+"."+Sr+"!=="+vn[Sr]}).join("||"),"){",Xn,".bindBuffer(",34962,",",lr,".buffer);",Xn,".vertexAttribPointer(",[er,cr,vr,vn.normalized,vn.stride,vn.offset],");",Jn,".type=",vr,";",Jn,".size=",cr,";",fr.map(function(Sr){return Jn+"."+Sr+"="+vn[Sr]+";"}).join(""),"}"),$t&&(vr=vn.divisor,Jt("if(",Jn,".divisor!==",vr,"){",jt.instancing,".vertexAttribDivisorANGLE(",[er,vr],");",Jn,".divisor=",vr,";}"))}function Bn(){Jt("if(",Jn,".buffer){",Xn,".disableVertexAttribArray(",er,");",Jn,".buffer=null;","}if(",Dt.map(function(cr,vr){return Jn+"."+cr+"!=="+sr[vr]}).join("||"),"){",Xn,".vertexAttrib4f(",er,",",sr,");",Dt.map(function(cr,vr){return Jn+"."+cr+"="+sr[vr]+";"}).join(""),"}")}var Xn=pn.gl,er=Jt.def(bn,".location"),Jn=Jt.def(pn.attributes,"[",er,"]");bn=vn.state;var lr=vn.buffer,sr=[vn.x,vn.y,vn.z,vn.w],fr=["buffer","normalized","offset","stride"];bn===1?An():bn===2?Bn():(Jt("if(",bn,"===",1,"){"),An(),Jt("}else{"),Bn(),Jt("}"))}var pn=jt.shared;Rn.forEach(function(bn){var dn,vn=bn.name,An=un.attributes[vn];if(An){if(!On(An))return;dn=An.append(jt,Jt)}else{if(!On(Ke))return;var Bn=jt.scopeAttrib(vn);dn={},Object.keys(new dr).forEach(function(Xn){dn[Xn]=Jt.def(Bn,".",Xn)})}Sn(jt.link(bn),function(Xn){switch(Xn){case 35664:case 35667:case 35671:return 2;case 35665:case 35668:case 35672:return 3;case 35666:case 35669:case 35673:return 4;default:return 1}}(bn.info.type),dn)})}function Nn(jt,Jt,un,Rn,On,Sn){for(var pn,bn=jt.shared,dn=bn.gl,vn=0;vn>1)",bn],");")}function Sr(){un(dn,".drawArraysInstancedANGLE(",[Jn,lr,sr,bn],");")}er&&er!=="null"?cr?vr():(un("if(",er,"){"),vr(),un("}else{"),Sr(),un("}")):Sr()}function pn(){function vr(){un(An+".drawElements("+[Jn,sr,fr,lr+"<<(("+fr+"-5121)>>1)"]+");")}function Sr(){un(An+".drawArrays("+[Jn,lr,sr]+");")}er&&er!=="null"?cr?vr():(un("if(",er,"){"),vr(),un("}else{"),Sr(),un("}")):Sr()}var bn,dn,vn=jt.shared,An=vn.gl,Bn=vn.draw,Xn=Rn.draw,er=function(){var vr=Xn.elements,Sr=Jt;return vr?((vr.contextDep&&Rn.contextDynamic||vr.propDep)&&(Sr=un),vr=vr.append(jt,Sr),Xn.elementsActive&&Sr("if("+vr+")"+An+".bindBuffer(34963,"+vr+".buffer.buffer);")):(vr=Sr.def(),Sr(vr,"=",Bn,".","elements",";","if(",vr,"){",An,".bindBuffer(",34963,",",vr,".buffer.buffer);}","else if(",vn.vao,".currentVAO){",vr,"=",jt.shared.elements+".getElements("+vn.vao,".currentVAO.elements);",Ln?"":"if("+vr+")"+An+".bindBuffer(34963,"+vr+".buffer.buffer);","}")),vr}(),Jn=On("primitive"),lr=On("offset"),sr=function(){var vr=Xn.count,Sr=Jt;return vr?((vr.contextDep&&Rn.contextDynamic||vr.propDep)&&(Sr=un),vr=vr.append(jt,Sr)):vr=Sr.def(Bn,".","count"),vr}();if(typeof sr=="number"){if(sr===0)return}else un("if(",sr,"){"),un.exit("}");$t&&(bn=On("instances"),dn=jt.instancing);var fr=er+".type",cr=Xn.elements&&ee(Xn.elements)&&!Xn.vaoActive;$t&&(typeof bn!="number"||0<=bn)?typeof bn=="string"?(un("if(",bn,">0){"),Sn(),un("}else if(",bn,"<0){"),pn(),un("}")):Sn():pn()}function qn(jt,Jt,un,Rn,On){return On=(Jt=Kt()).proc("body",On),$t&&(Jt.instancing=On.def(Jt.shared.extensions,".angle_instanced_arrays")),jt(Jt,On,un,Rn),Jt.compile().body}function or(jt,Jt,un,Rn){hn(jt,Jt),un.useVAO?un.drawVAO?Jt(jt.shared.vao,".setVAO(",un.drawVAO.append(jt,Jt),");"):Jt(jt.shared.vao,".setVAO(",jt.shared.vao,".targetVAO);"):(Jt(jt.shared.vao,".setVAO(null);"),Cn(jt,Jt,un,Rn.attributes,function(){return!0})),Nn(jt,Jt,un,Rn.uniforms,function(){return!0},!1),Hn(jt,Jt,Jt,un)}function tr(jt,Jt,un,Rn){function On(){return!0}jt.batchId="a1",hn(jt,Jt),Cn(jt,Jt,un,Rn.attributes,On),Nn(jt,Jt,un,Rn.uniforms,On,!1),Hn(jt,Jt,Jt,un)}function kr(jt,Jt,un,Rn){function On(Bn){return Bn.contextDep&&pn||Bn.propDep}function Sn(Bn){return!On(Bn)}hn(jt,Jt);var pn=un.contextDep,bn=Jt.def(),dn=Jt.def();jt.shared.props=dn,jt.batchId=bn;var vn=jt.scope(),An=jt.scope();Jt(vn.entry,"for(",bn,"=0;",bn,"<","a1",";++",bn,"){",dn,"=","a0","[",bn,"];",An,"}",vn.exit),un.needsContext&&wn(jt,An,un.context),un.needsFramebuffer&&on(jt,An,un.framebuffer),fn(jt,An,un.state,On),un.profile&&On(un.profile)&&In(jt,An,un,!1,!0),Rn?(un.useVAO?un.drawVAO?On(un.drawVAO)?An(jt.shared.vao,".setVAO(",un.drawVAO.append(jt,An),");"):vn(jt.shared.vao,".setVAO(",un.drawVAO.append(jt,vn),");"):vn(jt.shared.vao,".setVAO(",jt.shared.vao,".targetVAO);"):(vn(jt.shared.vao,".setVAO(null);"),Cn(jt,vn,un,Rn.attributes,Sn),Cn(jt,An,un,Rn.attributes,On)),Nn(jt,vn,un,Rn.uniforms,Sn,!1),Nn(jt,An,un,Rn.uniforms,On,!0),Hn(jt,vn,An,un)):(Jt=jt.global.def("{}"),Rn=un.shader.progVar.append(jt,An),dn=An.def(Rn,".id"),vn=An.def(Jt,"[",dn,"]"),An(jt.shared.gl,".useProgram(",Rn,".program);","if(!",vn,"){",vn,"=",Jt,"[",dn,"]=",jt.link(function(Bn){return qn(tr,jt,un,Bn,2)}),"(",Rn,");}",vn,".call(this,a0[",bn,"],",bn,");"))}function gr(jt,Jt){function un(bn){var dn=Jt.shader[bn];dn&&(dn=dn.append(jt,Rn),isNaN(dn)?Rn.set(On.shader,"."+bn,dn):Rn.set(On.shader,"."+bn,jt.link(dn,{stable:!0})))}var Rn=jt.proc("scope",3);jt.batchId="a2";var On=jt.shared,Sn=On.current;if(wn(jt,Rn,Jt.context),Jt.framebuffer&&Jt.framebuffer.append(jt,Rn),V(Object.keys(Jt.state)).forEach(function(bn){var dn=Jt.state[bn],vn=dn.append(jt,Rn);b(vn)?vn.forEach(function(An,Bn){isNaN(An)?Rn.set(jt.next[bn],"["+Bn+"]",An):Rn.set(jt.next[bn],"["+Bn+"]",jt.link(An,{stable:!0}))}):ee(dn)?Rn.set(On.next,"."+bn,jt.link(vn,{stable:!0})):Rn.set(On.next,"."+bn,vn)}),In(jt,Rn,Jt,!0,!0),["elements","offset","count","instances","primitive"].forEach(function(bn){var dn=Jt.draw[bn];dn&&(dn=dn.append(jt,Rn),isNaN(dn)?Rn.set(On.draw,"."+bn,dn):Rn.set(On.draw,"."+bn,jt.link(dn),{stable:!0}))}),Object.keys(Jt.uniforms).forEach(function(bn){var dn=Jt.uniforms[bn].append(jt,Rn);Array.isArray(dn)&&(dn="["+dn.map(function(vn){return isNaN(vn)?vn:jt.link(vn,{stable:!0})})+"]"),Rn.set(On.uniforms,"["+jt.link(nt.id(bn),{stable:!0})+"]",dn)}),Object.keys(Jt.attributes).forEach(function(bn){var dn=Jt.attributes[bn].append(jt,Rn),vn=jt.scopeAttrib(bn);Object.keys(new dr).forEach(function(An){Rn.set(vn,"."+An,dn[An])})}),Jt.scopeVAO){var pn=Jt.scopeVAO.append(jt,Rn);isNaN(pn)?Rn.set(On.vao,".targetVAO",pn):Rn.set(On.vao,".targetVAO",jt.link(pn,{stable:!0}))}un("vert"),un("frag"),0=--this.refCount&&ut(this)},Be.profile&&(Oe.getTotalRenderbufferSize=function(){var mt=0;return Object.keys(Ct).forEach(function(Ot){mt+=Ct[Ot].stats.size}),mt}),{create:function(mt,Ot){function _t(Bt,Wt){var Gt=0,Xt=0,Kt=32854;if(typeof Bt=="object"&&Bt?("shape"in Bt?(Gt=0|(Xt=Bt.shape)[0],Xt=0|Xt[1]):("radius"in Bt&&(Gt=Xt=0|Bt.radius),"width"in Bt&&(Gt=0|Bt.width),"height"in Bt&&(Xt=0|Bt.height)),"format"in Bt&&(Kt=pt[Bt.format])):typeof Bt=="number"?(Gt=0|Bt,Xt=typeof Wt=="number"?0|Wt:Gt):Bt||(Gt=Xt=1),Gt!==Pt.width||Xt!==Pt.height||Kt!==Pt.format)return _t.width=Pt.width=Gt,_t.height=Pt.height=Xt,Pt.format=Kt,Ge.bindRenderbuffer(36161,Pt.renderbuffer),Ge.renderbufferStorage(36161,Kt,Gt,Xt),Be.profile&&(Pt.stats.size=ft[Pt.format]*Pt.width*Pt.height),_t.format=bt[Pt.format],_t}var Pt=new Qe(Ge.createRenderbuffer());return Ct[Pt.id]=Pt,Oe.renderbufferCount++,_t(mt,Ot),_t.resize=function(Bt,Wt){var Gt=0|Bt,Xt=0|Wt||Gt;return Gt===Pt.width&&Xt===Pt.height||(_t.width=Pt.width=Gt,_t.height=Pt.height=Xt,Ge.bindRenderbuffer(36161,Pt.renderbuffer),Ge.renderbufferStorage(36161,Pt.format,Gt,Xt),Be.profile&&(Pt.stats.size=ft[Pt.format]*Pt.width*Pt.height)),_t},_t._reglType="renderbuffer",_t._renderbuffer=Pt,Be.profile&&(_t.stats=Pt.stats),_t.destroy=function(){Pt.decRef()},_t},clear:function(){pe(Ct).forEach(ut)},restore:function(){pe(Ct).forEach(function(mt){mt.renderbuffer=Ge.createRenderbuffer(),Ge.bindRenderbuffer(36161,mt.renderbuffer),Ge.renderbufferStorage(36161,mt.format,mt.width,mt.height)}),Ge.bindRenderbuffer(36161,null)}}},Et=[];Et[6408]=4,Et[6407]=3;var Tt=[];Tt[5121]=1,Tt[5126]=4,Tt[36193]=2;var xt=[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],Dt=["x","y","z","w"],It="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),Ft={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},qt={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},Nt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Je={cw:2304,ccw:2305},Ke=new H(!1,!1,!1,function(){});return function(Ge){function nt(){if(tr.length===0)nn&&nn.update(),dr=null;else{dr=se.next(nt),Ct();for(var $t=tr.length-1;0<=$t;--$t){var mn=tr[$t];mn&&mn(Wn,null,0)}_t.flush(),nn&&nn.update()}}function ht(){!dr&&0=tr.length&&Oe()}}}}function Lt(){var $t=qn.viewport,mn=qn.scissor_box;$t[0]=$t[1]=mn[0]=mn[1]=0,Wn.viewportWidth=Wn.framebufferWidth=Wn.drawingBufferWidth=$t[2]=mn[2]=_t.drawingBufferWidth,Wn.viewportHeight=Wn.framebufferHeight=Wn.drawingBufferHeight=$t[3]=mn[3]=_t.drawingBufferHeight}function Ct(){Wn.tick+=1,Wn.time=Ot(),Lt(),Hn.procs.poll()}function mt(){In.refresh(),Lt(),Hn.procs.refresh(),nn&&nn.update()}function Ot(){return(fe()-yn)/1e3}if(!(Ge=T(Ge)))return null;var _t=Ge.gl,Pt=_t.getContextAttributes();_t.isContextLost();var Bt=function($t,mn){function Ln(Zn){var Qn;Zn=Zn.toLowerCase();try{Qn=En[Zn]=$t.getExtension(Zn)}catch{}return!!Qn}for(var En={},jn=0;jnmn;++mn)yr(te({framebuffer:$t.framebuffer.faces[mn]},$t),pt);else yr($t,pt);else pt(0,$t)},prop:oe.define.bind(null,1),context:oe.define.bind(null,2),this:oe.define.bind(null,3),draw:ut({}),buffer:function($t){return on.create($t,34962,!1,!1)},elements:function($t){return _n.create($t,!1)},texture:In.create2D,cube:In.createCube,renderbuffer:Cn.create,framebuffer:Nn.create,framebufferCube:Nn.createCube,vao:fn.createVAO,attributes:Pt,frame:bt,on:function($t,mn){var Ln;switch($t){case"frame":return bt(mn);case"lost":Ln=kr;break;case"restore":Ln=gr;break;case"destroy":Ln=ir}return Ln.push(mn),{cancel:function(){for(var En=0;En2?"one of ".concat(s," ").concat(w.slice(0,T-1).join(", "),", or ")+w[T-1]:T===2?"one of ".concat(s," ").concat(w[0]," or ").concat(w[1]):"of ".concat(s," ").concat(w[0])}return"of ".concat(s," ").concat(String(w))}e("ERR_INVALID_OPT_VALUE",function(w,s){return'The value "'+s+'" is invalid for option "'+w+'"'},TypeError),e("ERR_INVALID_ARG_TYPE",function(w,s,T){var m,f,l,t,i;if(typeof s=="string"&&(f="not ",s.substr(0,f.length)===f)?(m="must not be",s=s.replace(/^not /,"")):m="must be",function(n,o,a){return(a===void 0||a>n.length)&&(a=n.length),n.substring(a-o.length,a)===o}(w," argument"))l="The ".concat(w," ").concat(m," ").concat(_(s,"type"));else{var r=(typeof i!="number"&&(i=0),i+1>(t=w).length||t.indexOf(".",i)===-1?"argument":"property");l='The "'.concat(w,'" ').concat(r," ").concat(m," ").concat(_(s,"type"))}return l+". Received type ".concat(typeof T)},TypeError),e("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),e("ERR_METHOD_NOT_IMPLEMENTED",function(w){return"The "+w+" method is not implemented"}),e("ERR_STREAM_PREMATURE_CLOSE","Premature close"),e("ERR_STREAM_DESTROYED",function(w){return"Cannot call "+w+" after a stream was destroyed"}),e("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),e("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),e("ERR_STREAM_WRITE_AFTER_END","write after end"),e("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),e("ERR_UNKNOWN_ENCODING",function(w){return"Unknown encoding: "+w},TypeError),e("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),D.exports.q=E},37865:function(D,E,e){var _=e(90386),w=Object.keys||function(n){var o=[];for(var a in n)o.push(a);return o};D.exports=t;var s=e(40410),T=e(37493);e(42018)(t,s);for(var m=w(T.prototype),f=0;f0)if(typeof Y=="string"||oe.objectMode||Object.getPrototypeOf(Y)===f.prototype||(Y=function(se){return f.from(se)}(Y)),K)oe.endEmitted?x(Q,new v):M(Q,oe,Y,!0);else if(oe.ended)x(Q,new b);else{if(oe.destroyed)return!1;oe.reading=!1,oe.decoder&&!X?(Y=oe.decoder.write(Y),oe.objectMode||Y.length!==0?M(Q,oe,Y,!1):I(Q,oe)):M(Q,oe,Y,!1)}else K||(oe.reading=!1,I(Q,oe));return!oe.ended&&(oe.lengthY.highWaterMark&&(Y.highWaterMark=function(X){return X>=A?X=A:(X--,X|=X>>>1,X|=X>>>2,X|=X>>>4,X|=X>>>8,X|=X>>>16,X++),X}(Q)),Q<=Y.length?Q:Y.ended?Y.length:(Y.needReadable=!0,0))}function L(Q){var Y=Q._readableState;s("emitReadable",Y.needReadable,Y.emittedReadable),Y.needReadable=!1,Y.emittedReadable||(s("emitReadable",Y.flowing),Y.emittedReadable=!0,w.nextTick(O,Q))}function O(Q){var Y=Q._readableState;s("emitReadable_",Y.destroyed,Y.length,Y.ended),Y.destroyed||!Y.length&&!Y.ended||(Q.emit("readable"),Y.emittedReadable=!1),Y.needReadable=!Y.flowing&&!Y.ended&&Y.length<=Y.highWaterMark,N(Q)}function I(Q,Y){Y.readingMore||(Y.readingMore=!0,w.nextTick(R,Q,Y))}function R(Q,Y){for(;!Y.reading&&!Y.ended&&(Y.length0,Y.resumeScheduled&&!Y.paused?Y.flowing=!0:Q.listenerCount("data")>0&&Q.resume()}function B(Q){s("readable nexttick read 0"),Q.read(0)}function G(Q,Y){s("resume",Y.reading),Y.reading||Q.read(0),Y.resumeScheduled=!1,Q.emit("resume"),N(Q),Y.flowing&&!Y.reading&&Q.read(0)}function N(Q){var Y=Q._readableState;for(s("flow",Y.flowing);Y.flowing&&Q.read()!==null;);}function j(Q,Y){return Y.length===0?null:(Y.objectMode?X=Y.buffer.shift():!Q||Q>=Y.length?(X=Y.decoder?Y.buffer.join(""):Y.buffer.length===1?Y.buffer.first():Y.buffer.concat(Y.length),Y.buffer.clear()):X=Y.buffer.consume(Q,Y.decoder),X);var X}function V(Q){var Y=Q._readableState;s("endReadable",Y.endEmitted),Y.endEmitted||(Y.ended=!0,w.nextTick(H,Y,Q))}function H(Q,Y){if(s("endReadableNT",Q.endEmitted,Q.length),!Q.endEmitted&&Q.length===0&&(Q.endEmitted=!0,Y.readable=!1,Y.emit("end"),Q.autoDestroy)){var X=Y._writableState;(!X||X.autoDestroy&&X.finished)&&Y.destroy()}}function ee(Q,Y){for(var X=0,K=Q.length;X=Y.highWaterMark:Y.length>0)||Y.ended))return s("read: emitReadable",Y.length,Y.ended),Y.length===0&&Y.ended?V(this):L(this),null;if((Q=C(Q,Y))===0&&Y.ended)return Y.length===0&&V(this),null;var K,te=Y.needReadable;return s("need readable",te),(Y.length===0||Y.length-Q0?j(Q,Y):null)===null?(Y.needReadable=Y.length<=Y.highWaterMark,Q=0):(Y.length-=Q,Y.awaitDrain=0),Y.length===0&&(Y.ended||(Y.needReadable=!0),X!==Q&&Y.ended&&V(this)),K!==null&&this.emit("data",K),K},k.prototype._read=function(Q){x(this,new d("_read()"))},k.prototype.pipe=function(Q,Y){var X=this,K=this._readableState;switch(K.pipesCount){case 0:K.pipes=Q;break;case 1:K.pipes=[K.pipes,Q];break;default:K.pipes.push(Q)}K.pipesCount+=1,s("pipe count=%d opts=%j",K.pipesCount,Y);var te=Y&&Y.end===!1||Q===w.stdout||Q===w.stderr?pe:ae;function ae(){s("onend"),Q.end()}K.endEmitted?w.nextTick(te):X.once("end",te),Q.on("unpipe",function ye(Re,we){s("onunpipe"),Re===X&&we&&we.hasUnpiped===!1&&(we.hasUnpiped=!0,s("cleanup"),Q.removeListener("close",he),Q.removeListener("finish",de),Q.removeListener("drain",oe),Q.removeListener("error",xe),Q.removeListener("unpipe",ye),X.removeListener("end",ae),X.removeListener("end",pe),X.removeListener("data",fe),se=!0,!K.awaitDrain||Q._writableState&&!Q._writableState.needDrain||oe())});var oe=function(ye){return function(){var Re=ye._readableState;s("pipeOnDrain",Re.awaitDrain),Re.awaitDrain&&Re.awaitDrain--,Re.awaitDrain===0&&T(ye,"data")&&(Re.flowing=!0,N(ye))}}(X);Q.on("drain",oe);var se=!1;function fe(ye){s("ondata");var Re=Q.write(ye);s("dest.write",Re),Re===!1&&((K.pipesCount===1&&K.pipes===Q||K.pipesCount>1&&ee(K.pipes,Q)!==-1)&&!se&&(s("false write response, pause",K.awaitDrain),K.awaitDrain++),X.pause())}function xe(ye){s("onerror",ye),pe(),Q.removeListener("error",xe),T(Q,"error")===0&&x(Q,ye)}function he(){Q.removeListener("finish",de),pe()}function de(){s("onfinish"),Q.removeListener("close",he),pe()}function pe(){s("unpipe"),X.unpipe(Q)}return X.on("data",fe),function(ye,Re,we){if(typeof ye.prependListener=="function")return ye.prependListener(Re,we);ye._events&&ye._events.error?Array.isArray(ye._events.error)?ye._events.error.unshift(we):ye._events.error=[we,ye._events.error]:ye.on(Re,we)}(Q,"error",xe),Q.once("close",he),Q.once("finish",de),Q.emit("pipe",X),K.flowing||(s("pipe resume"),X.resume()),Q},k.prototype.unpipe=function(Q){var Y=this._readableState,X={hasUnpiped:!1};if(Y.pipesCount===0)return this;if(Y.pipesCount===1)return Q&&Q!==Y.pipes||(Q||(Q=Y.pipes),Y.pipes=null,Y.pipesCount=0,Y.flowing=!1,Q&&Q.emit("unpipe",this,X)),this;if(!Q){var K=Y.pipes,te=Y.pipesCount;Y.pipes=null,Y.pipesCount=0,Y.flowing=!1;for(var ae=0;ae0,K.flowing!==!1&&this.resume()):Q==="readable"&&(K.endEmitted||K.readableListening||(K.readableListening=K.needReadable=!0,K.flowing=!1,K.emittedReadable=!1,s("on readable",K.length,K.reading),K.length?L(this):K.reading||w.nextTick(B,this))),X},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(Q,Y){var X=m.prototype.removeListener.call(this,Q,Y);return Q==="readable"&&w.nextTick(U,this),X},k.prototype.removeAllListeners=function(Q){var Y=m.prototype.removeAllListeners.apply(this,arguments);return Q!=="readable"&&Q!==void 0||w.nextTick(U,this),Y},k.prototype.resume=function(){var Q=this._readableState;return Q.flowing||(s("resume"),Q.flowing=!Q.readableListening,function(Y,X){X.resumeScheduled||(X.resumeScheduled=!0,w.nextTick(G,Y,X))}(this,Q)),Q.paused=!1,this},k.prototype.pause=function(){return s("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(s("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(Q){var Y=this,X=this._readableState,K=!1;for(var te in Q.on("end",function(){if(s("wrapped end"),X.decoder&&!X.ended){var oe=X.decoder.end();oe&&oe.length&&Y.push(oe)}Y.push(null)}),Q.on("data",function(oe){s("wrapped data"),X.decoder&&(oe=X.decoder.write(oe)),X.objectMode&&oe==null||(X.objectMode||oe&&oe.length)&&(Y.push(oe)||(K=!0,Q.pause()))}),Q)this[te]===void 0&&typeof Q[te]=="function"&&(this[te]=function(oe){return function(){return Q[oe].apply(Q,arguments)}}(te));for(var ae=0;ae-1))throw new v(I);return this._writableState.defaultEncoding=I,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(I,R,U){U(new a("_write()"))},k.prototype._writev=null,k.prototype.end=function(I,R,U){var B=this._writableState;return typeof I=="function"?(U=I,I=null,R=null):typeof R=="function"&&(U=R,R=null),I!=null&&this.write(I,R),B.corked&&(B.corked=1,this.uncork()),B.ending||function(G,N,j){N.ending=!0,O(G,N),j&&(N.finished?w.nextTick(j):G.once("finish",j)),N.ended=!0,G.writable=!1}(this,B,U),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(I){this._writableState&&(this._writableState.destroyed=I)}}),k.prototype.destroy=i.destroy,k.prototype._undestroy=i.undestroy,k.prototype._destroy=function(I,R){R(I)}},68221:function(D,E,e){var _,w=e(90386);function s(b,d,v){return d in b?Object.defineProperty(b,d,{value:v,enumerable:!0,configurable:!0,writable:!0}):b[d]=v,b}var T=e(12726),m=Symbol("lastResolve"),f=Symbol("lastReject"),l=Symbol("error"),t=Symbol("ended"),i=Symbol("lastPromise"),r=Symbol("handlePromise"),n=Symbol("stream");function o(b,d){return{value:b,done:d}}function a(b){var d=b[m];if(d!==null){var v=b[n].read();v!==null&&(b[i]=null,b[m]=null,b[f]=null,d(o(v,!1)))}}function u(b){w.nextTick(a,b)}var p=Object.getPrototypeOf(function(){}),c=Object.setPrototypeOf((s(_={get stream(){return this[n]},next:function(){var b=this,d=this[l];if(d!==null)return Promise.reject(d);if(this[t])return Promise.resolve(o(void 0,!0));if(this[n].destroyed)return new Promise(function(y,k){w.nextTick(function(){b[l]?k(b[l]):y(o(void 0,!0))})});var v,x=this[i];if(x)v=new Promise(function(y,k){return function(h,M){y.then(function(){k[t]?h(o(void 0,!0)):k[r](h,M)},M)}}(x,this));else{var g=this[n].read();if(g!==null)return Promise.resolve(o(g,!1));v=new Promise(this[r])}return this[i]=v,v}},Symbol.asyncIterator,function(){return this}),s(_,"return",function(){var b=this;return new Promise(function(d,v){b[n].destroy(null,function(x){x?v(x):d(o(void 0,!0))})})}),_),p);D.exports=function(b){var d,v=Object.create(c,(s(d={},n,{value:b,writable:!0}),s(d,m,{value:null,writable:!0}),s(d,f,{value:null,writable:!0}),s(d,l,{value:null,writable:!0}),s(d,t,{value:b._readableState.endEmitted,writable:!0}),s(d,r,{value:function(x,g){var y=v[n].read();y?(v[i]=null,v[m]=null,v[f]=null,x(o(y,!1))):(v[m]=x,v[f]=g)},writable:!0}),d));return v[i]=null,T(b,function(x){if(x&&x.code!=="ERR_STREAM_PREMATURE_CLOSE"){var g=v[f];return g!==null&&(v[i]=null,v[m]=null,v[f]=null,g(x)),void(v[l]=x)}var y=v[m];y!==null&&(v[i]=null,v[m]=null,v[f]=null,y(o(void 0,!0))),v[t]=!0}),b.on("readable",u.bind(null,v)),v}},31125:function(D,E,e){function _(l,t){var i=Object.keys(l);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(l);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(l,n).enumerable})),i.push.apply(i,r)}return i}function w(l,t,i){return t in l?Object.defineProperty(l,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):l[t]=i,l}function s(l,t){for(var i=0;i0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var n=this.head,o=""+n.data;n=n.next;)o+=r+n.data;return o}},{key:"concat",value:function(r){if(this.length===0)return T.alloc(0);for(var n,o,a,u=T.allocUnsafe(r>>>0),p=this.head,c=0;p;)n=p.data,o=u,a=c,T.prototype.copy.call(n,o,a),c+=p.data.length,p=p.next;return u}},{key:"consume",value:function(r,n){var o;return ru.length?u.length:r;if(p===u.length?a+=u:a+=u.slice(0,r),(r-=p)==0){p===u.length?(++o,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=u.slice(p));break}++o}return this.length-=o,a}},{key:"_getBuffer",value:function(r){var n=T.allocUnsafe(r),o=this.head,a=1;for(o.data.copy(n),r-=o.data.length;o=o.next;){var u=o.data,p=r>u.length?u.length:r;if(u.copy(n,n.length-r,0,p),(r-=p)==0){p===u.length?(++a,o.next?this.head=o.next:this.head=this.tail=null):(this.head=o,o.data=u.slice(p));break}++a}return this.length-=a,n}},{key:f,value:function(r,n){return m(this,function(o){for(var a=1;a0,function(v){a||(a=v),v&&p.forEach(l),d||(p.forEach(l),u(a))})});return n.reduce(t)}},56306:function(D,E,e){var _=e(74322).q.ERR_INVALID_OPT_VALUE;D.exports={getHighWaterMark:function(w,s,T,m){var f=function(l,t,i){return l.highWaterMark!=null?l.highWaterMark:t?l[i]:null}(s,m,T);if(f!=null){if(!isFinite(f)||Math.floor(f)!==f||f<0)throw new _(m?T:"highWaterMark",f);return Math.floor(f)}return w.objectMode?16:16384}}},71405:function(D,E,e){D.exports=e(15398).EventEmitter},68019:function(D,E,e){var _=e(71665).Buffer,w=_.isEncoding||function(o){switch((o=""+o)&&o.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 s(o){var a;switch(this.encoding=function(u){var p=function(c){if(!c)return"utf8";for(var b;;)switch(c){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 c;default:if(b)return;c=(""+c).toLowerCase(),b=!0}}(u);if(typeof p!="string"&&(_.isEncoding===w||!w(u)))throw new Error("Unknown encoding: "+u);return p||u}(o),this.encoding){case"utf16le":this.text=f,this.end=l,a=4;break;case"utf8":this.fillLast=m,a=4;break;case"base64":this.text=t,this.end=i,a=3;break;default:return this.write=r,void(this.end=n)}this.lastNeed=0,this.lastTotal=0,this.lastChar=_.allocUnsafe(a)}function T(o){return o<=127?0:o>>5==6?2:o>>4==14?3:o>>3==30?4:o>>6==2?-1:-2}function m(o){var a=this.lastTotal-this.lastNeed,u=function(p,c,b){if((192&c[0])!=128)return p.lastNeed=0,"�";if(p.lastNeed>1&&c.length>1){if((192&c[1])!=128)return p.lastNeed=1,"�";if(p.lastNeed>2&&c.length>2&&(192&c[2])!=128)return p.lastNeed=2,"�"}}(this,o);return u!==void 0?u:this.lastNeed<=o.length?(o.copy(this.lastChar,a,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(o.copy(this.lastChar,a,0,o.length),void(this.lastNeed-=o.length))}function f(o,a){if((o.length-a)%2==0){var u=o.toString("utf16le",a);if(u){var p=u.charCodeAt(u.length-1);if(p>=55296&&p<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=o[o.length-2],this.lastChar[1]=o[o.length-1],u.slice(0,-1)}return u}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=o[o.length-1],o.toString("utf16le",a,o.length-1)}function l(o){var a=o&&o.length?this.write(o):"";if(this.lastNeed){var u=this.lastTotal-this.lastNeed;return a+this.lastChar.toString("utf16le",0,u)}return a}function t(o,a){var u=(o.length-a)%3;return u===0?o.toString("base64",a):(this.lastNeed=3-u,this.lastTotal=3,u===1?this.lastChar[0]=o[o.length-1]:(this.lastChar[0]=o[o.length-2],this.lastChar[1]=o[o.length-1]),o.toString("base64",a,o.length-u))}function i(o){var a=o&&o.length?this.write(o):"";return this.lastNeed?a+this.lastChar.toString("base64",0,3-this.lastNeed):a}function r(o){return o.toString(this.encoding)}function n(o){return o&&o.length?this.write(o):""}E.s=s,s.prototype.write=function(o){if(o.length===0)return"";var a,u;if(this.lastNeed){if((a=this.fillLast(o))===void 0)return"";u=this.lastNeed,this.lastNeed=0}else u=0;return u=0?(x>0&&(c.lastNeed=x-1),x):--v=0?(x>0&&(c.lastNeed=x-2),x):--v=0?(x>0&&(x===2?x=0:c.lastNeed=x-3),x):0}(this,o,a);if(!this.lastNeed)return o.toString("utf8",a);this.lastTotal=u;var p=o.length-(u-this.lastNeed);return o.copy(this.lastChar,0,p),o.toString("utf8",a,p)},s.prototype.fillLast=function(o){if(this.lastNeed<=o.length)return o.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);o.copy(this.lastChar,this.lastTotal-this.lastNeed,0,o.length),this.lastNeed-=o.length}},90715:function(D,E,e){var _=e(32791),w=e(41633)("stream-parser");function s(o){w("initializing parser stream"),o._parserBytesLeft=0,o._parserBuffers=[],o._parserBuffered=0,o._parserState=-1,o._parserCallback=null,typeof o.push=="function"&&(o._parserOutput=o.push.bind(o)),o._parserInit=!0}function T(o,a){_(!this._parserCallback,'there is already a "callback" set!'),_(isFinite(o)&&o>0,'can only buffer a finite number of bytes > 0, got "'+o+'"'),this._parserInit||s(this),w("buffering %o bytes",o),this._parserBytesLeft=o,this._parserCallback=a,this._parserState=0}function m(o,a){_(!this._parserCallback,'there is already a "callback" set!'),_(o>0,'can only skip > 0 bytes, got "'+o+'"'),this._parserInit||s(this),w("skipping %o bytes",o),this._parserBytesLeft=o,this._parserCallback=a,this._parserState=1}function f(o,a){_(!this._parserCallback,'There is already a "callback" set!'),_(o>0,'can only pass through > 0 bytes, got "'+o+'"'),this._parserInit||s(this),w("passing through %o bytes",o),this._parserBytesLeft=o,this._parserCallback=a,this._parserState=2}function l(o,a,u){this._parserInit||s(this),w("write(%o bytes)",o.length),typeof a=="function"&&(u=a),r(this,o,null,u)}function t(o,a,u){this._parserInit||s(this),w("transform(%o bytes)",o.length),typeof a!="function"&&(a=this._parserOutput),r(this,o,a,u)}function i(o,a,u,p){if(o._parserBytesLeft-=a.length,w("%o bytes left for stream piece",o._parserBytesLeft),o._parserState===0?(o._parserBuffers.push(a),o._parserBuffered+=a.length):o._parserState===2&&u(a),o._parserBytesLeft!==0)return p;var c=o._parserCallback;if(c&&o._parserState===0&&o._parserBuffers.length>1&&(a=Buffer.concat(o._parserBuffers,o._parserBuffered)),o._parserState!==0&&(a=null),o._parserCallback=null,o._parserBuffered=0,o._parserState=-1,o._parserBuffers.splice(0),c){var b=[];a&&b.push(a),u&&b.push(u);var d=c.length>b.length;d&&b.push(n(p));var v=c.apply(o,b);if(!d||p===v)return p}}D.exports=function(o){var a=o&&typeof o._transform=="function",u=o&&typeof o._write=="function";if(!a&&!u)throw new Error("must pass a Writable or Transform stream in");w("extending Parser into stream"),o._bytes=T,o._skipBytes=m,a&&(o._passthrough=f),a?o._transform=t:o._write=l};var r=n(function o(a,u,p,c){return a._parserBytesLeft<=0?c(new Error("got data but not currently parsing anything")):u.length<=a._parserBytesLeft?function(){return i(a,u,p,c)}:function(){var b=u.slice(0,a._parserBytesLeft);return i(a,b,p,function(d){return d?c(d):u.length>b.length?function(){return o(a,u.slice(b.length),p,c)}:void 0})}});function n(o){return function(){for(var a=o.apply(this,arguments);typeof a=="function";)a=a();return a}}},41633:function(D,E,e){var _=e(90386);function w(){var s;try{s=E.storage.debug}catch{}return!s&&_!==void 0&&"env"in _&&(s=_.env.DEBUG),s}(E=D.exports=e(74469)).log=function(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},E.formatArgs=function(s){var T=this.useColors;if(s[0]=(T?"%c":"")+this.namespace+(T?" %c":" ")+s[0]+(T?"%c ":" ")+"+"+E.humanize(this.diff),T){var m="color: "+this.color;s.splice(1,0,m,"color: inherit");var f=0,l=0;s[0].replace(/%[a-zA-Z%]/g,function(t){t!=="%%"&&(f++,t==="%c"&&(l=f))}),s.splice(l,0,m)}},E.save=function(s){try{s==null?E.storage.removeItem("debug"):E.storage.debug=s}catch{}},E.load=w,E.useColors=function(){return!(typeof window>"u"||!window.process||window.process.type!=="renderer")||typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},E.storage=typeof chrome<"u"&&chrome.storage!==void 0?chrome.storage.local:function(){try{return window.localStorage}catch{}}(),E.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],E.formatters.j=function(s){try{return JSON.stringify(s)}catch(T){return"[UnexpectedJSONParseError]: "+T.message}},E.enable(w())},74469:function(D,E,e){var _;function w(s){function T(){if(T.enabled){var m=T,f=+new Date,l=f-(_||f);m.diff=l,m.prev=_,m.curr=f,_=f;for(var t=new Array(arguments.length),i=0;i0)return function(t){if(!((t=String(t)).length>100)){var i=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(i){var r=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*r;case"days":case"day":case"d":return r*w;case"hours":case"hour":case"hrs":case"hr":case"h":return r*_;case"minutes":case"minute":case"mins":case"min":case"m":return r*e;case"seconds":case"second":case"secs":case"sec":case"s":return r*E;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}(T);if(l==="number"&&isNaN(T)===!1)return m.long?s(f=T,w,"day")||s(f,_,"hour")||s(f,e,"minute")||s(f,E,"second")||f+" ms":function(t){return t>=w?Math.round(t/w)+"d":t>=_?Math.round(t/_)+"h":t>=e?Math.round(t/e)+"m":t>=E?Math.round(t/E)+"s":t+"ms"}(T);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(T))}},99011:function(D,E,e){var _=e(88641);D.exports=function(w,s,T){if(w==null)throw Error("First argument should be a string");if(s==null)throw Error("Separator should be a string or a RegExp");T?(typeof T=="string"||Array.isArray(T))&&(T={ignore:T}):T={},T.escape==null&&(T.escape=!0),T.ignore==null?T.ignore=["[]","()","{}","<>",'""',"''","``","“”","«»"]:(typeof T.ignore=="string"&&(T.ignore=[T.ignore]),T.ignore=T.ignore.map(function(n){return n.length===1&&(n+=n),n}));var m=_.parse(w,{flat:!0,brackets:T.ignore}),f=m[0].split(s);if(T.escape){for(var l=[],t=0;t0;){p=b[b.length-1];var d=E[p];if(T[p]=0&&f[p].push(m[x])}T[p]=v}else{if(w[p]===_[p]){var g=[],y=[],k=0;for(v=c.length-1;v>=0;--v){var h=c[v];if(s[h]=!1,g.push(h),y.push(f[h]),k+=f[h].length,m[h]=r.length,h===p){c.length=v;break}}r.push(g);var M=new Array(k);for(v=0;v1&&(i=1),i<-1&&(i=-1),(m*t-f*l<0?-1:1)*Math.acos(i)};E.default=function(m){var f=m.px,l=m.py,t=m.cx,i=m.cy,r=m.rx,n=m.ry,o=m.xAxisRotation,a=o===void 0?0:o,u=m.largeArcFlag,p=u===void 0?0:u,c=m.sweepFlag,b=c===void 0?0:c,d=[];if(r===0||n===0)return[];var v=Math.sin(a*_/360),x=Math.cos(a*_/360),g=x*(f-t)/2+v*(l-i)/2,y=-v*(f-t)/2+x*(l-i)/2;if(g===0&&y===0)return[];r=Math.abs(r),n=Math.abs(n);var k=Math.pow(g,2)/Math.pow(r,2)+Math.pow(y,2)/Math.pow(n,2);k>1&&(r*=Math.sqrt(k),n*=Math.sqrt(k));var h=function(B,G,N,j,V,H,ee,Q,Y,X,K,te){var ae=Math.pow(V,2),oe=Math.pow(H,2),se=Math.pow(K,2),fe=Math.pow(te,2),xe=ae*oe-ae*fe-oe*se;xe<0&&(xe=0),xe/=ae*fe+oe*se;var he=(xe=Math.sqrt(xe)*(ee===Q?-1:1))*V/H*te,de=xe*-H/V*K,pe=X*he-Y*de+(B+N)/2,ye=Y*he+X*de+(G+j)/2,Re=(K-he)/V,we=(te-de)/H,Ae=(-K-he)/V,Me=(-te-de)/H,Ce=T(1,0,Re,we),ne=T(Re,we,Ae,Me);return Q===0&&ne>0&&(ne-=_),Q===1&&ne<0&&(ne+=_),[pe,ye,Ce,ne]}(f,l,t,i,r,n,p,b,v,x,g,y),M=function(B,G){if(Array.isArray(B))return B;if(Symbol.iterator in Object(B))return function(N,j){var V=[],H=!0,ee=!1,Q=void 0;try{for(var Y,X=N[Symbol.iterator]();!(H=(Y=X.next()).done)&&(V.push(Y.value),!j||V.length!==j);H=!0);}catch(K){ee=!0,Q=K}finally{try{!H&&X.return&&X.return()}finally{if(ee)throw Q}}return V}(B,G);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(h,4),A=M[0],C=M[1],L=M[2],O=M[3],I=Math.abs(O)/(_/4);Math.abs(1-I)<1e-7&&(I=1);var R=Math.max(Math.ceil(I),1);O/=R;for(var U=0;Ul[2]&&(l[2]=r[n+0]),r[n+1]>l[3]&&(l[3]=r[n+1]);return l}},29988:function(D,E,e){D.exports=function(T){for(var m,f=[],l=0,t=0,i=0,r=0,n=null,o=null,a=0,u=0,p=0,c=T.length;p4?(l=b[b.length-4],t=b[b.length-3]):(l=a,t=u),f.push(b)}return f};var _=e(7095);function w(T,m,f,l){return["C",T,m,f,l,f,l]}function s(T,m,f,l,t,i){return["C",T/3+.6666666666666666*f,m/3+.6666666666666666*l,t/3+.6666666666666666*f,i/3+.6666666666666666*l,t,i]}},82019:function(D,E,e){var _,w=e(1750),s=e(95616),T=e(31457),m=e(89546),f=e(44781),l=document.createElement("canvas"),t=l.getContext("2d");D.exports=function(i,r){if(!m(i))throw Error("Argument should be valid svg path string");var n,o;r||(r={}),r.shape?(n=r.shape[0],o=r.shape[1]):(n=l.width=r.w||r.width||200,o=l.height=r.h||r.height||200);var a=Math.min(n,o),u=r.stroke||0,p=r.viewbox||r.viewBox||w(i),c=[n/(p[2]-p[0]),o/(p[3]-p[1])],b=Math.min(c[0]||0,c[1]||0)/2;if(t.fillStyle="black",t.fillRect(0,0,n,o),t.fillStyle="white",u&&(typeof u!="number"&&(u=1),t.strokeStyle=u>0?"white":"black",t.lineWidth=Math.abs(u)),t.translate(.5*n,.5*o),t.scale(b,b),function(){if(_!=null)return _;var x=document.createElement("canvas").getContext("2d");if(x.canvas.width=x.canvas.height=1,!window.Path2D)return _=!1;var g=new Path2D("M0,0h1v1h-1v-1Z");x.fillStyle="black",x.fill(g);var y=x.getImageData(0,0,1,1);return _=y&&y.data&&y.data[3]===255}()){var d=new Path2D(i);t.fill(d),u&&t.stroke(d)}else{var v=s(i);T(t,v),t.fill(),u&&t.stroke()}return t.setTransform(1,0,0,1,0,0),f(t,{cutoff:r.cutoff!=null?r.cutoff:.5,radius:r.radius!=null?r.radius:.5*a})}},84267:function(D,E,e){var _;(function(w){var s=/^\s+/,T=/\s+$/,m=0,f=w.round,l=w.min,t=w.max,i=w.random;function r(K,te){if(te=te||{},(K=K||"")instanceof r)return K;if(!(this instanceof r))return new r(K,te);var ae=function(oe){var se,fe,xe,he={r:0,g:0,b:0},de=1,pe=null,ye=null,Re=null,we=!1,Ae=!1;return typeof oe=="string"&&(oe=function(Me){Me=Me.replace(s,"").replace(T,"").toLowerCase();var Ce,ne=!1;if(L[Me])Me=L[Me],ne=!0;else if(Me=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};return(Ce=Y.rgb.exec(Me))?{r:Ce[1],g:Ce[2],b:Ce[3]}:(Ce=Y.rgba.exec(Me))?{r:Ce[1],g:Ce[2],b:Ce[3],a:Ce[4]}:(Ce=Y.hsl.exec(Me))?{h:Ce[1],s:Ce[2],l:Ce[3]}:(Ce=Y.hsla.exec(Me))?{h:Ce[1],s:Ce[2],l:Ce[3],a:Ce[4]}:(Ce=Y.hsv.exec(Me))?{h:Ce[1],s:Ce[2],v:Ce[3]}:(Ce=Y.hsva.exec(Me))?{h:Ce[1],s:Ce[2],v:Ce[3],a:Ce[4]}:(Ce=Y.hex8.exec(Me))?{r:B(Ce[1]),g:B(Ce[2]),b:B(Ce[3]),a:V(Ce[4]),format:ne?"name":"hex8"}:(Ce=Y.hex6.exec(Me))?{r:B(Ce[1]),g:B(Ce[2]),b:B(Ce[3]),format:ne?"name":"hex"}:(Ce=Y.hex4.exec(Me))?{r:B(Ce[1]+""+Ce[1]),g:B(Ce[2]+""+Ce[2]),b:B(Ce[3]+""+Ce[3]),a:V(Ce[4]+""+Ce[4]),format:ne?"name":"hex8"}:!!(Ce=Y.hex3.exec(Me))&&{r:B(Ce[1]+""+Ce[1]),g:B(Ce[2]+""+Ce[2]),b:B(Ce[3]+""+Ce[3]),format:ne?"name":"hex"}}(oe)),typeof oe=="object"&&(X(oe.r)&&X(oe.g)&&X(oe.b)?(se=oe.r,fe=oe.g,xe=oe.b,he={r:255*R(se,255),g:255*R(fe,255),b:255*R(xe,255)},we=!0,Ae=String(oe.r).substr(-1)==="%"?"prgb":"rgb"):X(oe.h)&&X(oe.s)&&X(oe.v)?(pe=N(oe.s),ye=N(oe.v),he=function(Me,Ce,ne){Me=6*R(Me,360),Ce=R(Ce,100),ne=R(ne,100);var ue=w.floor(Me),me=Me-ue,Te=ne*(1-Ce),Ee=ne*(1-me*Ce),Ue=ne*(1-(1-me)*Ce),De=ue%6;return{r:255*[ne,Ee,Te,Te,Ue,ne][De],g:255*[Ue,ne,ne,Ee,Te,Te][De],b:255*[Te,Te,Ue,ne,ne,Ee][De]}}(oe.h,pe,ye),we=!0,Ae="hsv"):X(oe.h)&&X(oe.s)&&X(oe.l)&&(pe=N(oe.s),Re=N(oe.l),he=function(Me,Ce,ne){var ue,me,Te;function Ee(je,ge,be){return be<0&&(be+=1),be>1&&(be-=1),be<1/6?je+6*(ge-je)*be:be<.5?ge:be<2/3?je+(ge-je)*(2/3-be)*6:je}if(Me=R(Me,360),Ce=R(Ce,100),ne=R(ne,100),Ce===0)ue=me=Te=ne;else{var Ue=ne<.5?ne*(1+Ce):ne+Ce-ne*Ce,De=2*ne-Ue;ue=Ee(De,Ue,Me+1/3),me=Ee(De,Ue,Me),Te=Ee(De,Ue,Me-1/3)}return{r:255*ue,g:255*me,b:255*Te}}(oe.h,pe,Re),we=!0,Ae="hsl"),oe.hasOwnProperty("a")&&(de=oe.a)),de=I(de),{ok:we,format:oe.format||Ae,r:l(255,t(he.r,0)),g:l(255,t(he.g,0)),b:l(255,t(he.b,0)),a:de}}(K);this._originalInput=K,this._r=ae.r,this._g=ae.g,this._b=ae.b,this._a=ae.a,this._roundA=f(100*this._a)/100,this._format=te.format||ae.format,this._gradientType=te.gradientType,this._r<1&&(this._r=f(this._r)),this._g<1&&(this._g=f(this._g)),this._b<1&&(this._b=f(this._b)),this._ok=ae.ok,this._tc_id=m++}function n(K,te,ae){K=R(K,255),te=R(te,255),ae=R(ae,255);var oe,se,fe=t(K,te,ae),xe=l(K,te,ae),he=(fe+xe)/2;if(fe==xe)oe=se=0;else{var de=fe-xe;switch(se=he>.5?de/(2-fe-xe):de/(fe+xe),fe){case K:oe=(te-ae)/de+(te>1)+720)%360;--te;)oe.h=(oe.h+se)%360,fe.push(r(oe));return fe}function C(K,te){te=te||6;for(var ae=r(K).toHsv(),oe=ae.h,se=ae.s,fe=ae.v,xe=[],he=1/te;te--;)xe.push(r({h:oe,s:se,v:fe})),fe=(fe+he)%1;return xe}r.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 K=this.toRgb();return(299*K.r+587*K.g+114*K.b)/1e3},getLuminance:function(){var K,te,ae,oe=this.toRgb();return K=oe.r/255,te=oe.g/255,ae=oe.b/255,.2126*(K<=.03928?K/12.92:w.pow((K+.055)/1.055,2.4))+.7152*(te<=.03928?te/12.92:w.pow((te+.055)/1.055,2.4))+.0722*(ae<=.03928?ae/12.92:w.pow((ae+.055)/1.055,2.4))},setAlpha:function(K){return this._a=I(K),this._roundA=f(100*this._a)/100,this},toHsv:function(){var K=o(this._r,this._g,this._b);return{h:360*K.h,s:K.s,v:K.v,a:this._a}},toHsvString:function(){var K=o(this._r,this._g,this._b),te=f(360*K.h),ae=f(100*K.s),oe=f(100*K.v);return this._a==1?"hsv("+te+", "+ae+"%, "+oe+"%)":"hsva("+te+", "+ae+"%, "+oe+"%, "+this._roundA+")"},toHsl:function(){var K=n(this._r,this._g,this._b);return{h:360*K.h,s:K.s,l:K.l,a:this._a}},toHslString:function(){var K=n(this._r,this._g,this._b),te=f(360*K.h),ae=f(100*K.s),oe=f(100*K.l);return this._a==1?"hsl("+te+", "+ae+"%, "+oe+"%)":"hsla("+te+", "+ae+"%, "+oe+"%, "+this._roundA+")"},toHex:function(K){return a(this._r,this._g,this._b,K)},toHexString:function(K){return"#"+this.toHex(K)},toHex8:function(K){return function(te,ae,oe,se,fe){var xe=[G(f(te).toString(16)),G(f(ae).toString(16)),G(f(oe).toString(16)),G(j(se))];return fe&&xe[0].charAt(0)==xe[0].charAt(1)&&xe[1].charAt(0)==xe[1].charAt(1)&&xe[2].charAt(0)==xe[2].charAt(1)&&xe[3].charAt(0)==xe[3].charAt(1)?xe[0].charAt(0)+xe[1].charAt(0)+xe[2].charAt(0)+xe[3].charAt(0):xe.join("")}(this._r,this._g,this._b,this._a,K)},toHex8String:function(K){return"#"+this.toHex8(K)},toRgb:function(){return{r:f(this._r),g:f(this._g),b:f(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+f(this._r)+", "+f(this._g)+", "+f(this._b)+")":"rgba("+f(this._r)+", "+f(this._g)+", "+f(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:f(100*R(this._r,255))+"%",g:f(100*R(this._g,255))+"%",b:f(100*R(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+f(100*R(this._r,255))+"%, "+f(100*R(this._g,255))+"%, "+f(100*R(this._b,255))+"%)":"rgba("+f(100*R(this._r,255))+"%, "+f(100*R(this._g,255))+"%, "+f(100*R(this._b,255))+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":!(this._a<1)&&(O[a(this._r,this._g,this._b,!0)]||!1)},toFilter:function(K){var te="#"+u(this._r,this._g,this._b,this._a),ae=te,oe=this._gradientType?"GradientType = 1, ":"";if(K){var se=r(K);ae="#"+u(se._r,se._g,se._b,se._a)}return"progid:DXImageTransform.Microsoft.gradient("+oe+"startColorstr="+te+",endColorstr="+ae+")"},toString:function(K){var te=!!K;K=K||this._format;var ae=!1,oe=this._a<1&&this._a>=0;return te||!oe||K!=="hex"&&K!=="hex6"&&K!=="hex3"&&K!=="hex4"&&K!=="hex8"&&K!=="name"?(K==="rgb"&&(ae=this.toRgbString()),K==="prgb"&&(ae=this.toPercentageRgbString()),K!=="hex"&&K!=="hex6"||(ae=this.toHexString()),K==="hex3"&&(ae=this.toHexString(!0)),K==="hex4"&&(ae=this.toHex8String(!0)),K==="hex8"&&(ae=this.toHex8String()),K==="name"&&(ae=this.toName()),K==="hsl"&&(ae=this.toHslString()),K==="hsv"&&(ae=this.toHsvString()),ae||this.toHexString()):K==="name"&&this._a===0?this.toName():this.toRgbString()},clone:function(){return r(this.toString())},_applyModification:function(K,te){var ae=K.apply(null,[this].concat([].slice.call(te)));return this._r=ae._r,this._g=ae._g,this._b=ae._b,this.setAlpha(ae._a),this},lighten:function(){return this._applyModification(d,arguments)},brighten:function(){return this._applyModification(v,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(p,arguments)},saturate:function(){return this._applyModification(c,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(g,arguments)},_applyCombination:function(K,te){return K.apply(null,[this].concat([].slice.call(te)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(y,arguments)},monochromatic:function(){return this._applyCombination(C,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(k,arguments)},tetrad:function(){return this._applyCombination(h,arguments)}},r.fromRatio=function(K,te){if(typeof K=="object"){var ae={};for(var oe in K)K.hasOwnProperty(oe)&&(ae[oe]=oe==="a"?K[oe]:N(K[oe]));K=ae}return r(K,te)},r.equals=function(K,te){return!(!K||!te)&&r(K).toRgbString()==r(te).toRgbString()},r.random=function(){return r.fromRatio({r:i(),g:i(),b:i()})},r.mix=function(K,te,ae){ae=ae===0?0:ae||50;var oe=r(K).toRgb(),se=r(te).toRgb(),fe=ae/100;return r({r:(se.r-oe.r)*fe+oe.r,g:(se.g-oe.g)*fe+oe.g,b:(se.b-oe.b)*fe+oe.b,a:(se.a-oe.a)*fe+oe.a})},r.readability=function(K,te){var ae=r(K),oe=r(te);return(w.max(ae.getLuminance(),oe.getLuminance())+.05)/(w.min(ae.getLuminance(),oe.getLuminance())+.05)},r.isReadable=function(K,te,ae){var oe,se,fe,xe,he,de=r.readability(K,te);switch(se=!1,(fe=ae,(xe=((fe=fe||{level:"AA",size:"small"}).level||"AA").toUpperCase())!=="AA"&&xe!=="AAA"&&(xe="AA"),(he=(fe.size||"small").toLowerCase())!=="small"&&he!=="large"&&(he="small"),oe={level:xe,size:he}).level+oe.size){case"AAsmall":case"AAAlarge":se=de>=4.5;break;case"AAlarge":se=de>=3;break;case"AAAsmall":se=de>=7}return se},r.mostReadable=function(K,te,ae){var oe,se,fe,xe,he=null,de=0;se=(ae=ae||{}).includeFallbackColors,fe=ae.level,xe=ae.size;for(var pe=0;pede&&(de=oe,he=r(te[pe]));return r.isReadable(K,he,{level:fe,size:xe})||!se?he:(ae.includeFallbackColors=!1,r.mostReadable(K,["#fff","#000"],ae))};var L=r.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"},O=r.hexNames=function(K){var te={};for(var ae in K)K.hasOwnProperty(ae)&&(te[K[ae]]=ae);return te}(L);function I(K){return K=parseFloat(K),(isNaN(K)||K<0||K>1)&&(K=1),K}function R(K,te){(function(oe){return typeof oe=="string"&&oe.indexOf(".")!=-1&&parseFloat(oe)===1})(K)&&(K="100%");var ae=function(oe){return typeof oe=="string"&&oe.indexOf("%")!=-1}(K);return K=l(te,t(0,parseFloat(K))),ae&&(K=parseInt(K*te,10)/100),w.abs(K-te)<1e-6?1:K%te/parseFloat(te)}function U(K){return l(1,t(0,K))}function B(K){return parseInt(K,16)}function G(K){return K.length==1?"0"+K:""+K}function N(K){return K<=1&&(K=100*K+"%"),K}function j(K){return w.round(255*parseFloat(K)).toString(16)}function V(K){return B(K)/255}var H,ee,Q,Y=(ee="[\\s|\\(]+("+(H="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",Q="[\\s|\\(]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",{CSS_UNIT:new RegExp(H),rgb:new RegExp("rgb"+ee),rgba:new RegExp("rgba"+Q),hsl:new RegExp("hsl"+ee),hsla:new RegExp("hsla"+Q),hsv:new RegExp("hsv"+ee),hsva:new RegExp("hsva"+Q),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function X(K){return!!Y.CSS_UNIT.exec(K)}D.exports?D.exports=r:(_=function(){return r}.call(E,e,E,D))===void 0||(D.exports=_)})(Math)},57060:function(D){D.exports=e,D.exports.float32=D.exports.float=e,D.exports.fract32=D.exports.fract=function(_,w){if(_.length){if(_ instanceof Float32Array)return new Float32Array(_.length);w instanceof Float32Array||(w=e(_));for(var s=0,T=w.length;s":(T.length>100&&(T=T.slice(0,99)+"…"),T=T.replace(w,function(m){switch(m){case` +`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}))}},47403:function(D,E,e){var _=e(24582),w={object:!0,function:!0,undefined:!0};D.exports=function(s){return!!_(s)&&hasOwnProperty.call(w,typeof s)}},82527:function(D,E,e){var _=e(69190),w=e(84985);D.exports=function(s){return w(s)?s:_(s,"%v is not a plain function",arguments[1])}},84985:function(D,E,e){var _=e(73116),w=/^\s*class[\s{/}]/,s=Function.prototype.toString;D.exports=function(T){return!!_(T)&&!w.test(s.call(T))}},24511:function(D,E,e){var _=e(47403);D.exports=function(w){if(!_(w))return!1;try{return!!w.constructor&&w.constructor.prototype===w}catch{return!1}}},9234:function(D,E,e){var _=e(24582),w=e(47403),s=Object.prototype.toString;D.exports=function(T){if(!_(T))return null;if(w(T)){var m=T.toString;if(typeof m!="function"||m===s)return null}try{return""+T}catch{return null}}},10424:function(D,E,e){var _=e(69190),w=e(24582);D.exports=function(s){return w(s)?s:_(s,"Cannot use %v",arguments[1])}},24582:function(D){D.exports=function(E){return E!=null}},58404:function(D,E,e){var _=e(13547),w=e(12129),s=e(12856).Buffer;e.g.__TYPEDARRAY_POOL||(e.g.__TYPEDARRAY_POOL={UINT8:w([32,0]),UINT16:w([32,0]),UINT32:w([32,0]),BIGUINT64:w([32,0]),INT8:w([32,0]),INT16:w([32,0]),INT32:w([32,0]),BIGINT64:w([32,0]),FLOAT:w([32,0]),DOUBLE:w([32,0]),DATA:w([32,0]),UINT8C:w([32,0]),BUFFER:w([32,0])});var T=typeof Uint8ClampedArray<"u",m=typeof BigUint64Array<"u",f=typeof BigInt64Array<"u",l=e.g.__TYPEDARRAY_POOL;l.UINT8C||(l.UINT8C=w([32,0])),l.BIGUINT64||(l.BIGUINT64=w([32,0])),l.BIGINT64||(l.BIGINT64=w([32,0])),l.BUFFER||(l.BUFFER=w([32,0]));var t=l.DATA,i=l.BUFFER;function r(M){if(M){var A=M.length||M.byteLength,C=_.log2(A);t[C].push(M)}}function n(M){M=_.nextPow2(M);var A=_.log2(M),C=t[A];return C.length>0?C.pop():new ArrayBuffer(M)}function o(M){return new Uint8Array(n(M),0,M)}function a(M){return new Uint16Array(n(2*M),0,M)}function u(M){return new Uint32Array(n(4*M),0,M)}function p(M){return new Int8Array(n(M),0,M)}function c(M){return new Int16Array(n(2*M),0,M)}function b(M){return new Int32Array(n(4*M),0,M)}function d(M){return new Float32Array(n(4*M),0,M)}function v(M){return new Float64Array(n(8*M),0,M)}function x(M){return T?new Uint8ClampedArray(n(M),0,M):o(M)}function g(M){return m?new BigUint64Array(n(8*M),0,M):null}function y(M){return f?new BigInt64Array(n(8*M),0,M):null}function k(M){return new DataView(n(M),0,M)}function h(M){M=_.nextPow2(M);var A=_.log2(M),C=i[A];return C.length>0?C.pop():new s(M)}E.free=function(M){if(s.isBuffer(M))i[_.log2(M.length)].push(M);else{if(Object.prototype.toString.call(M)!=="[object ArrayBuffer]"&&(M=M.buffer),!M)return;var A=M.length||M.byteLength,C=0|_.log2(A);t[C].push(M)}},E.freeUint8=E.freeUint16=E.freeUint32=E.freeBigUint64=E.freeInt8=E.freeInt16=E.freeInt32=E.freeBigInt64=E.freeFloat32=E.freeFloat=E.freeFloat64=E.freeDouble=E.freeUint8Clamped=E.freeDataView=function(M){r(M.buffer)},E.freeArrayBuffer=r,E.freeBuffer=function(M){i[_.log2(M.length)].push(M)},E.malloc=function(M,A){if(A===void 0||A==="arraybuffer")return n(M);switch(A){case"uint8":return o(M);case"uint16":return a(M);case"uint32":return u(M);case"int8":return p(M);case"int16":return c(M);case"int32":return b(M);case"float":case"float32":return d(M);case"double":case"float64":return v(M);case"uint8_clamped":return x(M);case"bigint64":return y(M);case"biguint64":return g(M);case"buffer":return h(M);case"data":case"dataview":return k(M);default:return null}return null},E.mallocArrayBuffer=n,E.mallocUint8=o,E.mallocUint16=a,E.mallocUint32=u,E.mallocInt8=p,E.mallocInt16=c,E.mallocInt32=b,E.mallocFloat32=E.mallocFloat=d,E.mallocFloat64=E.mallocDouble=v,E.mallocUint8Clamped=x,E.mallocBigUint64=g,E.mallocBigInt64=y,E.mallocDataView=k,E.mallocBuffer=h,E.clearCache=function(){for(var M=0;M<32;++M)l.UINT8[M].length=0,l.UINT16[M].length=0,l.UINT32[M].length=0,l.INT8[M].length=0,l.INT16[M].length=0,l.INT32[M].length=0,l.FLOAT[M].length=0,l.DOUBLE[M].length=0,l.BIGUINT64[M].length=0,l.BIGINT64[M].length=0,l.UINT8C[M].length=0,t[M].length=0,i[M].length=0}},90448:function(D){var E=/[\'\"]/;D.exports=function(e){return e?(E.test(e.charAt(0))&&(e=e.substr(1)),E.test(e.charAt(e.length-1))&&(e=e.substr(0,e.length-1)),e):""}},93447:function(D){D.exports=function(E,e,_){Array.isArray(_)||(_=[].slice.call(arguments,2));for(var w=0,s=_.length;w=N)return H;switch(H){case"%s":return String(G[B++]);case"%d":return Number(G[B++]);case"%j":try{return JSON.stringify(G[B++])}catch{return"[Circular]"}default:return H}}),V=G[B];B=3&&(B.depth=arguments[2]),arguments.length>=4&&(B.colors=arguments[3]),u(U)?B.showHidden=U:U&&E._extend(B,U),d(B.showHidden)&&(B.showHidden=!1),d(B.depth)&&(B.depth=2),d(B.colors)&&(B.colors=!1),d(B.customInspect)&&(B.customInspect=!0),B.colors&&(B.stylize=t),r(B,R,B.depth)}function t(R,U){var B=l.styles[U];return B?"\x1B["+l.colors[B][0]+"m"+R+"\x1B["+l.colors[B][1]+"m":R}function i(R,U){return R}function r(R,U,B){if(R.customInspect&&U&&k(U.inspect)&&U.inspect!==E.inspect&&(!U.constructor||U.constructor.prototype!==U)){var G=U.inspect(B,R);return b(G)||(G=r(R,G,B)),G}var N=function(K,te){if(d(te))return K.stylize("undefined","undefined");if(b(te)){var ae="'"+JSON.stringify(te).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return K.stylize(ae,"string")}return c(te)?K.stylize(""+te,"number"):u(te)?K.stylize(""+te,"boolean"):p(te)?K.stylize("null","null"):void 0}(R,U);if(N)return N;var j=Object.keys(U),V=function(K){var te={};return K.forEach(function(ae,oe){te[ae]=!0}),te}(j);if(R.showHidden&&(j=Object.getOwnPropertyNames(U)),y(U)&&(j.indexOf("message")>=0||j.indexOf("description")>=0))return n(U);if(j.length===0){if(k(U)){var H=U.name?": "+U.name:"";return R.stylize("[Function"+H+"]","special")}if(v(U))return R.stylize(RegExp.prototype.toString.call(U),"regexp");if(g(U))return R.stylize(Date.prototype.toString.call(U),"date");if(y(U))return n(U)}var ee,Q="",Y=!1,X=["{","}"];return a(U)&&(Y=!0,X=["[","]"]),k(U)&&(Q=" [Function"+(U.name?": "+U.name:"")+"]"),v(U)&&(Q=" "+RegExp.prototype.toString.call(U)),g(U)&&(Q=" "+Date.prototype.toUTCString.call(U)),y(U)&&(Q=" "+n(U)),j.length!==0||Y&&U.length!=0?B<0?v(U)?R.stylize(RegExp.prototype.toString.call(U),"regexp"):R.stylize("[Object]","special"):(R.seen.push(U),ee=Y?function(K,te,ae,oe,se){for(var fe=[],xe=0,he=te.length;xe60?ae[0]+(te===""?"":te+` `)+" "+K.join(`, - `)+" "+ae[1]:ae[0]+te+" "+K.join(", ")+" "+ae[1]}(ee,Q,Y)):Y[0]+Q+Y[1]}function n(R){return"["+Error.prototype.toString.call(R)+"]"}function o(R,U,B,G,N,j){var V,H,ee;if((ee=Object.getOwnPropertyDescriptor(U,N)||{value:U[N]}).get?H=ee.set?R.stylize("[Getter/Setter]","special"):R.stylize("[Getter]","special"):ee.set&&(H=R.stylize("[Setter]","special")),L(G,N)||(V="["+N+"]"),H||(R.seen.indexOf(ee.value)<0?(H=p(B)?r(R,ee.value,null):r(R,ee.value,B-1)).indexOf(` + `)+" "+ae[1]:ae[0]+te+" "+K.join(", ")+" "+ae[1]}(ee,Q,X)):X[0]+Q+X[1]}function n(R){return"["+Error.prototype.toString.call(R)+"]"}function o(R,U,B,G,N,j){var V,H,ee;if((ee=Object.getOwnPropertyDescriptor(U,N)||{value:U[N]}).get?H=ee.set?R.stylize("[Getter/Setter]","special"):R.stylize("[Getter]","special"):ee.set&&(H=R.stylize("[Setter]","special")),L(G,N)||(V="["+N+"]"),H||(R.seen.indexOf(ee.value)<0?(H=p(B)?r(R,ee.value,null):r(R,ee.value,B-1)).indexOf(` `)>-1&&(H=j?H.split(` `).map(function(Q){return" "+Q}).join(` `).slice(2):` `+H.split(` `).map(function(Q){return" "+Q}).join(` -`)):H=R.stylize("[Circular]","special")),d(V)){if(j&&N.match(/^\d+$/))return H;(V=JSON.stringify(""+N)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(V=V.slice(1,-1),V=R.stylize(V,"name")):(V=V.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),V=R.stylize(V,"string"))}return V+": "+H}function a(R){return Array.isArray(R)}function u(R){return typeof R=="boolean"}function p(R){return R===null}function c(R){return typeof R=="number"}function b(R){return typeof R=="string"}function d(R){return R===void 0}function v(R){return x(R)&&h(R)==="[object RegExp]"}function x(R){return typeof R=="object"&&R!==null}function g(R){return x(R)&&h(R)==="[object Date]"}function m(R){return x(R)&&(h(R)==="[object Error]"||R instanceof Error)}function k(R){return typeof R=="function"}function h(R){return Object.prototype.toString.call(R)}function M(R){return R<10?"0"+R.toString(10):R.toString(10)}E.debuglog=function(R){if(R=R.toUpperCase(),!T[R])if(y.test(R)){var U=_.pid;T[R]=function(){var B=E.format.apply(E,arguments);console.error("%s %d: %s",R,U,B)}}else T[R]=function(){};return T[R]},E.inspect=l,l.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]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},E.types=e(4936),E.isArray=a,E.isBoolean=u,E.isNull=p,E.isNullOrUndefined=function(R){return R==null},E.isNumber=c,E.isString=b,E.isSymbol=function(R){return typeof R=="symbol"},E.isUndefined=d,E.isRegExp=v,E.types.isRegExp=v,E.isObject=x,E.isDate=g,E.types.isDate=g,E.isError=m,E.types.isNativeError=m,E.isFunction=k,E.isPrimitive=function(R){return R===null||typeof R=="boolean"||typeof R=="number"||typeof R=="string"||typeof R=="symbol"||R===void 0},E.isBuffer=e(45920);var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function C(){var R=new Date,U=[M(R.getHours()),M(R.getMinutes()),M(R.getSeconds())].join(":");return[R.getDate(),A[R.getMonth()],U].join(" ")}function L(R,U){return Object.prototype.hasOwnProperty.call(R,U)}E.log=function(){console.log("%s - %s",C(),E.format.apply(E,arguments))},E.inherits=e(42018),E._extend=function(R,U){if(!U||!x(U))return R;for(var B=Object.keys(U),G=B.length;G--;)R[B[G]]=U[B[G]];return R};var O=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function I(R,U){if(!R){var B=new Error("Promise was rejected with a falsy value");B.reason=R,R=B}return U(R)}E.promisify=function(R){if(typeof R!="function")throw new TypeError('The "original" argument must be of type Function');if(O&&R[O]){var U;if(typeof(U=R[O])!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(U,O,{value:U,enumerable:!1,writable:!1,configurable:!0}),U}function U(){for(var B,G,N=new Promise(function(H,ee){B=H,G=ee}),j=[],V=0;V"u"?e.g:globalThis,t=w(),i=s("String.prototype.slice"),r={},n=Object.getPrototypeOf;f&&T&&n&&_(t,function(a){if(typeof l[a]=="function"){var u=new l[a];if(Symbol.toStringTag in u){var p=n(u),c=T(p,Symbol.toStringTag);if(!c){var b=n(p);c=T(b,Symbol.toStringTag)}r[a]=c.get}}});var o=e(9187);D.exports=function(a){return!!o(a)&&(f&&Symbol.toStringTag in a?function(u){var p=!1;return _(r,function(c,b){if(!p)try{var d=c.call(u);d===b&&(p=d)}catch{}}),p}(a):i(y(a),8,-1))}},3961:function(D,E,e){var _=e(63489),w=e(56131),s=_.instance();function T(n){this.local=this.regionalOptions[n||""]||this.regionalOptions[""]}T.prototype=new _.baseCalendar,w(T.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(n,o){if(typeof n=="string"){var a=n.match(f);return a?a[0]:""}var u=this._validateYear(n),p=n.month(),c=""+this.toChineseMonth(u,p);return o&&c.length<2&&(c="0"+c),this.isIntercalaryMonth(u,p)&&(c+="i"),c},monthNames:function(n){if(typeof n=="string"){var o=n.match(l);return o?o[0]:""}var a=this._validateYear(n),u=n.month(),p=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][this.toChineseMonth(a,u)-1];return this.isIntercalaryMonth(a,u)&&(p="闰"+p),p},monthNamesShort:function(n){if(typeof n=="string"){var o=n.match(t);return o?o[0]:""}var a=this._validateYear(n),u=n.month(),p=["一","二","三","四","五","六","七","八","九","十","十一","十二"][this.toChineseMonth(a,u)-1];return this.isIntercalaryMonth(a,u)&&(p="闰"+p),p},parseMonth:function(n,o){n=this._validateYear(n);var a,u=parseInt(o);if(isNaN(u))o[0]==="闰"&&(a=!0,o=o.substring(1)),o[o.length-1]==="月"&&(o=o.substring(0,o.length-1)),u=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(o);else{var p=o[o.length-1];a=p==="i"||p==="I"}return this.toMonthIndex(n,u,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(n,o){if(n.year&&(n=n.year()),typeof n!="number"||n<1888||n>2111)throw o.replace(/\{0\}/,this.local.name);return n},toMonthIndex:function(n,o,a){var u=this.intercalaryMonth(n);if(a&&o!==u||o<1||o>12)throw _.local.invalidMonth.replace(/\{0\}/,this.local.name);return u?!a&&o<=u?o-1:o:o-1},toChineseMonth:function(n,o){n.year&&(o=(n=n.year()).month());var a=this.intercalaryMonth(n);if(o<0||o>(a?12:11))throw _.local.invalidMonth.replace(/\{0\}/,this.local.name);return a?o>13},isIntercalaryMonth:function(n,o){n.year&&(o=(n=n.year()).month());var a=this.intercalaryMonth(n);return!!a&&a===o},leapYear:function(n){return this.intercalaryMonth(n)!==0},weekOfYear:function(n,o,a){var u,p=this._validateYear(n,_.local.invalidyear),c=r[p-r[0]],b=c>>9&4095,d=c>>5&15,v=31&c;(u=s.newDate(b,d,v)).add(4-(u.dayOfWeek()||7),"d");var x=this.toJD(n,o,a)-u.toJD();return 1+Math.floor(x/7)},monthsInYear:function(n){return this.leapYear(n)?13:12},daysInMonth:function(n,o){n.year&&(o=n.month(),n=n.year()),n=this._validateYear(n);var a=i[n-i[0]];if(o>(a>>13?12:11))throw _.local.invalidMonth.replace(/\{0\}/,this.local.name);return a&1<<12-o?30:29},weekDay:function(n,o,a){return(this.dayOfWeek(n,o,a)||7)<6},toJD:function(n,o,a){var u=this._validate(n,c,a,_.local.invalidDate);n=this._validateYear(u.year()),o=u.month(),a=u.day();var p=this.isIntercalaryMonth(n,o),c=this.toChineseMonth(n,o),b=function(d,v,x,g,m){var k,h,M;if(typeof d=="object")h=d,k=v||{};else{var A;if(!(typeof d=="number"&&d>=1888&&d<=2111))throw new Error("Lunar year outside range 1888-2111");if(!(typeof v=="number"&&v>=1&&v<=12))throw new Error("Lunar month outside range 1 - 12");if(!(typeof x=="number"&&x>=1&&x<=30))throw new Error("Lunar day outside range 1 - 30");typeof g=="object"?(A=!1,k=g):(A=!!g,k={}),h={year:d,month:v,day:x,isIntercalary:A}}M=h.day-1;var C,L=i[h.year-i[0]],O=L>>13;C=O&&(h.month>O||h.isIntercalary)?h.month:h.month-1;for(var I=0;I>9&4095,(R>>5&15)-1,(31&R)+M);return k.year=U.getFullYear(),k.month=1+U.getMonth(),k.day=U.getDate(),k}(n,c,a,p);return s.toJD(b.year,b.month,b.day)},fromJD:function(n){var o=s.fromJD(n),a=function(p,c,b,d){var v,x;if(typeof p=="object")v=p,x=c||{};else{if(!(typeof p=="number"&&p>=1888&&p<=2111))throw new Error("Solar year outside range 1888-2111");if(!(typeof c=="number"&&c>=1&&c<=12))throw new Error("Solar month outside range 1 - 12");if(!(typeof b=="number"&&b>=1&&b<=31))throw new Error("Solar day outside range 1 - 31");v={year:p,month:c,day:b},x={}}var g=r[v.year-r[0]],m=v.year<<9|v.month<<5|v.day;x.year=m>=g?v.year:v.year-1,g=r[x.year-r[0]];var k,h=new Date(g>>9&4095,(g>>5&15)-1,31&g),M=new Date(v.year,v.month-1,v.day);k=Math.round((M-h)/864e5);var A,C=i[x.year-i[0]];for(A=0;A<13;A++){var L=C&1<<12-A?30:29;if(k>13;return!O||A=2&&t<=6},extraInfo:function(y,f,l){var t=this._validate(y,f,l,_.local.invalidDate);return{century:T[Math.floor((t.year()-1)/100)+1]||""}},toJD:function(y,f,l){var t=this._validate(y,f,l,_.local.invalidDate);return y=t.year()+(t.year()<0?1:0),f=t.month(),(l=t.day())+(f>1?16:0)+(f>2?32*(f-2):0)+400*(y-1)+this.jdEpoch-1},fromJD:function(y){y=Math.floor(y+.5)-Math.floor(this.jdEpoch)-1;var f=Math.floor(y/400)+1;y-=400*(f-1),y+=y>15?16:0;var l=Math.floor(y/32)+1,t=y-32*(l-1)+1;return this.newDate(f<=0?f-1:f,l,t)}});var T={20:"Fruitbat",21:"Anchovy"};_.calendars.discworld=s},37715:function(D,E,e){var _=e(63489),w=e(56131);function s(T){this.local=this.regionalOptions[T||""]||this.regionalOptions[""]}s.prototype=new _.baseCalendar,w(s.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 y=this._validate(T,this.minMonth,this.minDay,_.local.invalidYear);return(T=y.year()+(y.year()<0?1:0))%4==3||T%4==-1},monthsInYear:function(T){return this._validate(T,this.minMonth,this.minDay,_.local.invalidYear||_.regionalOptions[""].invalidYear),13},weekOfYear:function(T,y,f){var l=this.newDate(T,y,f);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(T,y){var f=this._validate(T,y,this.minDay,_.local.invalidMonth);return this.daysPerMonth[f.month()-1]+(f.month()===13&&this.leapYear(f.year())?1:0)},weekDay:function(T,y,f){return(this.dayOfWeek(T,y,f)||7)<6},toJD:function(T,y,f){var l=this._validate(T,y,f,_.local.invalidDate);return(T=l.year())<0&&T++,l.day()+30*(l.month()-1)+365*(T-1)+Math.floor(T/4)+this.jdEpoch-1},fromJD:function(T){var y=Math.floor(T)+.5-this.jdEpoch,f=Math.floor((y-Math.floor((y+366)/1461))/365)+1;f<=0&&f--,y=Math.floor(T)+.5-this.newDate(f,1,1).toJD();var l=Math.floor(y/30)+1,t=y-30*(l-1)+1;return this.newDate(f,l,t)}}),_.calendars.ethiopian=s},99384:function(D,E,e){var _=e(63489),w=e(56131);function s(y){this.local=this.regionalOptions[y||""]||this.regionalOptions[""]}function T(y,f){return y-f*Math.floor(y/f)}s.prototype=new _.baseCalendar,w(s.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(y){var f=this._validate(y,this.minMonth,this.minDay,_.local.invalidYear);return this._leapYear(f.year())},_leapYear:function(y){return T(7*(y=y<0?y+1:y)+1,19)<7},monthsInYear:function(y){return this._validate(y,this.minMonth,this.minDay,_.local.invalidYear),this._leapYear(y.year?y.year():y)?13:12},weekOfYear:function(y,f,l){var t=this.newDate(y,f,l);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(y){return y=this._validate(y,this.minMonth,this.minDay,_.local.invalidYear).year(),this.toJD(y===-1?1:y+1,7,1)-this.toJD(y,7,1)},daysInMonth:function(y,f){return y.year&&(f=y.month(),y=y.year()),this._validate(y,f,this.minDay,_.local.invalidMonth),f===12&&this.leapYear(y)||f===8&&T(this.daysInYear(y),10)===5?30:f===9&&T(this.daysInYear(y),10)===3?29:this.daysPerMonth[f-1]},weekDay:function(y,f,l){return this.dayOfWeek(y,f,l)!==6},extraInfo:function(y,f,l){var t=this._validate(y,f,l,_.local.invalidDate);return{yearType:(this.leapYear(t)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(t)%10-3]}},toJD:function(y,f,l){var t=this._validate(y,f,l,_.local.invalidDate);y=t.year(),f=t.month(),l=t.day();var i=y<=0?y+1:y,r=this.jdEpoch+this._delay1(i)+this._delay2(i)+l+1;if(f<7){for(var n=7;n<=this.monthsInYear(y);n++)r+=this.daysInMonth(y,n);for(n=1;n=this.toJD(f===-1?1:f+1,7,1);)f++;for(var l=ythis.toJD(f,l,this.daysInMonth(f,l));)l++;var t=y-this.toJD(f,l,1)+1;return this.newDate(f,l,t)}}),_.calendars.hebrew=s},43805:function(D,E,e){var _=e(63489),w=e(56131);function s(T){this.local=this.regionalOptions[T||""]||this.regionalOptions[""]}s.prototype=new _.baseCalendar,w(s.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īs","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(T){return(11*this._validate(T,this.minMonth,this.minDay,_.local.invalidYear).year()+14)%30<11},weekOfYear:function(T,y,f){var l=this.newDate(T,y,f);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(T){return this.leapYear(T)?355:354},daysInMonth:function(T,y){var f=this._validate(T,y,this.minDay,_.local.invalidMonth);return this.daysPerMonth[f.month()-1]+(f.month()===12&&this.leapYear(f.year())?1:0)},weekDay:function(T,y,f){return this.dayOfWeek(T,y,f)!==5},toJD:function(T,y,f){var l=this._validate(T,y,f,_.local.invalidDate);return T=l.year(),y=l.month(),T=T<=0?T+1:T,(f=l.day())+Math.ceil(29.5*(y-1))+354*(T-1)+Math.floor((3+11*T)/30)+this.jdEpoch-1},fromJD:function(T){T=Math.floor(T)+.5;var y=Math.floor((30*(T-this.jdEpoch)+10646)/10631);y=y<=0?y-1:y;var f=Math.min(12,Math.ceil((T-29-this.toJD(y,1,1))/29.5)+1),l=T-this.toJD(y,f,1)+1;return this.newDate(y,f,l)}}),_.calendars.islamic=s},88874:function(D,E,e){var _=e(63489),w=e(56131);function s(T){this.local=this.regionalOptions[T||""]||this.regionalOptions[""]}s.prototype=new _.baseCalendar,w(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 y=this._validate(T,this.minMonth,this.minDay,_.local.invalidYear);return(T=y.year()<0?y.year()+1:y.year())%4==0},weekOfYear:function(T,y,f){var l=this.newDate(T,y,f);return l.add(4-(l.dayOfWeek()||7),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(T,y){var f=this._validate(T,y,this.minDay,_.local.invalidMonth);return this.daysPerMonth[f.month()-1]+(f.month()===2&&this.leapYear(f.year())?1:0)},weekDay:function(T,y,f){return(this.dayOfWeek(T,y,f)||7)<6},toJD:function(T,y,f){var l=this._validate(T,y,f,_.local.invalidDate);return T=l.year(),y=l.month(),f=l.day(),T<0&&T++,y<=2&&(T--,y+=12),Math.floor(365.25*(T+4716))+Math.floor(30.6001*(y+1))+f-1524.5},fromJD:function(T){var y=Math.floor(T+.5)+1524,f=Math.floor((y-122.1)/365.25),l=Math.floor(365.25*f),t=Math.floor((y-l)/30.6001),i=t-Math.floor(t<14?1:13),r=f-Math.floor(i>2?4716:4715),n=y-l-Math.floor(30.6001*t);return r<=0&&r--,this.newDate(r,i,n)}}),_.calendars.julian=s},83290:function(D,E,e){var _=e(63489),w=e(56131);function s(f){this.local=this.regionalOptions[f||""]||this.regionalOptions[""]}function T(f,l){return f-l*Math.floor(f/l)}function y(f,l){return T(f-1,l)+1}s.prototype=new _.baseCalendar,w(s.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(f){return this._validate(f,this.minMonth,this.minDay,_.local.invalidYear),!1},formatYear:function(f){f=this._validate(f,this.minMonth,this.minDay,_.local.invalidYear).year();var l=Math.floor(f/400);return f%=400,f+=f<0?400:0,l+"."+Math.floor(f/20)+"."+f%20},forYear:function(f){if((f=f.split(".")).length<3)throw"Invalid Mayan year";for(var l=0,t=0;t19||t>0&&i<0)throw"Invalid Mayan year";l=20*l+i}return l},monthsInYear:function(f){return this._validate(f,this.minMonth,this.minDay,_.local.invalidYear),18},weekOfYear:function(f,l,t){return this._validate(f,l,t,_.local.invalidDate),0},daysInYear:function(f){return this._validate(f,this.minMonth,this.minDay,_.local.invalidYear),360},daysInMonth:function(f,l){return this._validate(f,l,this.minDay,_.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(f,l,t){return this._validate(f,l,t,_.local.invalidDate).day()},weekDay:function(f,l,t){return this._validate(f,l,t,_.local.invalidDate),!0},extraInfo:function(f,l,t){var i=this._validate(f,l,t,_.local.invalidDate).toJD(),r=this._toHaab(i),n=this._toTzolkin(i);return{haabMonthName:this.local.haabMonths[r[0]-1],haabMonth:r[0],haabDay:r[1],tzolkinDayName:this.local.tzolkinMonths[n[0]-1],tzolkinDay:n[0],tzolkinTrecena:n[1]}},_toHaab:function(f){var l=T(8+(f-=this.jdEpoch)+340,365);return[Math.floor(l/20)+1,T(l,20)]},_toTzolkin:function(f){return[y(20+(f-=this.jdEpoch),20),y(f+4,13)]},toJD:function(f,l,t){var i=this._validate(f,l,t,_.local.invalidDate);return i.day()+20*i.month()+360*i.year()+this.jdEpoch},fromJD:function(f){f=Math.floor(f)+.5-this.jdEpoch;var l=Math.floor(f/360);f%=360,f+=f<0?360:0;var t=Math.floor(f/20),i=f%20;return this.newDate(l,t,i)}}),_.calendars.mayan=s},29108:function(D,E,e){var _=e(63489),w=e(56131);function s(y){this.local=this.regionalOptions[y||""]||this.regionalOptions[""]}s.prototype=new _.baseCalendar;var T=_.instance("gregorian");w(s.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(y){var f=this._validate(y,this.minMonth,this.minDay,_.local.invalidYear||_.regionalOptions[""].invalidYear);return T.leapYear(f.year()+(f.year()<1?1:0)+1469)},weekOfYear:function(y,f,l){var t=this.newDate(y,f,l);return t.add(1-(t.dayOfWeek()||7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(y,f){var l=this._validate(y,f,this.minDay,_.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(y,f,l){return(this.dayOfWeek(y,f,l)||7)<6},toJD:function(y,f,l){var t=this._validate(y,f,l,_.local.invalidMonth);(y=t.year())<0&&y++;for(var i=t.day(),r=1;r=this.toJD(f+1,1,1);)f++;for(var l=y-Math.floor(this.toJD(f,1,1)+.5)+1,t=1;l>this.daysInMonth(f,t);)l-=this.daysInMonth(f,t),t++;return this.newDate(f,t,l)}}),_.calendars.nanakshahi=s},55422:function(D,E,e){var _=e(63489),w=e(56131);function s(T){this.local=this.regionalOptions[T||""]||this.regionalOptions[""]}s.prototype=new _.baseCalendar,w(s.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(T){return this.daysInYear(T)!==this.daysPerYear},weekOfYear:function(T,y,f){var l=this.newDate(T,y,f);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(T){if(T=this._validate(T,this.minMonth,this.minDay,_.local.invalidYear).year(),this.NEPALI_CALENDAR_DATA[T]===void 0)return this.daysPerYear;for(var y=0,f=this.minMonth;f<=12;f++)y+=this.NEPALI_CALENDAR_DATA[T][f];return y},daysInMonth:function(T,y){return T.year&&(y=T.month(),T=T.year()),this._validate(T,y,this.minDay,_.local.invalidMonth),this.NEPALI_CALENDAR_DATA[T]===void 0?this.daysPerMonth[y-1]:this.NEPALI_CALENDAR_DATA[T][y]},weekDay:function(T,y,f){return this.dayOfWeek(T,y,f)!==6},toJD:function(T,y,f){var l=this._validate(T,y,f,_.local.invalidDate);T=l.year(),y=l.month(),f=l.day();var t=_.instance(),i=0,r=y,n=T;this._createMissingCalendarData(T);var o=T-(r>9||r===9&&f>=this.NEPALI_CALENDAR_DATA[n][0]?56:57);for(y!==9&&(i=f,r--);r!==9;)r<=0&&(r=12,n--),i+=this.NEPALI_CALENDAR_DATA[n][r],r--;return y===9?(i+=f-this.NEPALI_CALENDAR_DATA[n][0])<0&&(i+=t.daysInYear(o)):i+=this.NEPALI_CALENDAR_DATA[n][9]-this.NEPALI_CALENDAR_DATA[n][0],t.newDate(o,1,1).add(i,"d").toJD()},fromJD:function(T){var y=_.instance().fromJD(T),f=y.year(),l=y.dayOfYear(),t=f+56;this._createMissingCalendarData(t);for(var i=9,r=this.NEPALI_CALENDAR_DATA[t][0],n=this.NEPALI_CALENDAR_DATA[t][i]-r+1;l>n;)++i>12&&(i=1,t++),n+=this.NEPALI_CALENDAR_DATA[t][i];var o=this.NEPALI_CALENDAR_DATA[t][i]-(n-l);return this.newDate(t,i,o)},_createMissingCalendarData:function(T){var y=this.daysPerMonth.slice(0);y.unshift(17);for(var f=T-1;f0?474:473))%2820+474+38)%2816<682},weekOfYear:function(y,f,l){var t=this.newDate(y,f,l);return t.add(-(t.dayOfWeek()+1)%7,"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(y,f){var l=this._validate(y,f,this.minDay,_.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(y,f,l){return this.dayOfWeek(y,f,l)!==5},toJD:function(y,f,l){var t=this._validate(y,f,l,_.local.invalidDate);y=t.year(),f=t.month(),l=t.day();var i=y-(y>=0?474:473),r=474+T(i,2820);return l+(f<=7?31*(f-1):30*(f-1)+6)+Math.floor((682*r-110)/2816)+365*(r-1)+1029983*Math.floor(i/2820)+this.jdEpoch-1},fromJD:function(y){var f=(y=Math.floor(y)+.5)-this.toJD(475,1,1),l=Math.floor(f/1029983),t=T(f,1029983),i=2820;if(t!==1029982){var r=Math.floor(t/366),n=T(t,366);i=Math.floor((2134*r+2816*n+2815)/1028522)+r+1}var o=i+2820*l+474;o=o<=0?o-1:o;var a=y-this.toJD(o,1,1)+1,u=a<=186?Math.ceil(a/31):Math.ceil((a-6)/30),p=y-this.toJD(o,u,1)+1;return this.newDate(o,u,p)}}),_.calendars.persian=s,_.calendars.jalali=s},31320:function(D,E,e){var _=e(63489),w=e(56131),s=_.instance();function T(y){this.local=this.regionalOptions[y||""]||this.regionalOptions[""]}T.prototype=new _.baseCalendar,w(T.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(y){var f=this._validate(y,this.minMonth,this.minDay,_.local.invalidYear);return y=this._t2gYear(f.year()),s.leapYear(y)},weekOfYear:function(y,f,l){var t=this._validate(y,this.minMonth,this.minDay,_.local.invalidYear);return y=this._t2gYear(t.year()),s.weekOfYear(y,t.month(),t.day())},daysInMonth:function(y,f){var l=this._validate(y,f,this.minDay,_.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(y,f,l){return(this.dayOfWeek(y,f,l)||7)<6},toJD:function(y,f,l){var t=this._validate(y,f,l,_.local.invalidDate);return y=this._t2gYear(t.year()),s.toJD(y,t.month(),t.day())},fromJD:function(y){var f=s.fromJD(y),l=this._g2tYear(f.year());return this.newDate(l,f.month(),f.day())},_t2gYear:function(y){return y+this.yearsOffset+(y>=-this.yearsOffset&&y<=-1?1:0)},_g2tYear:function(y){return y-this.yearsOffset-(y>=1&&y<=this.yearsOffset?1:0)}}),_.calendars.taiwan=T},51367:function(D,E,e){var _=e(63489),w=e(56131),s=_.instance();function T(y){this.local=this.regionalOptions[y||""]||this.regionalOptions[""]}T.prototype=new _.baseCalendar,w(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(y){var f=this._validate(y,this.minMonth,this.minDay,_.local.invalidYear);return y=this._t2gYear(f.year()),s.leapYear(y)},weekOfYear:function(y,f,l){var t=this._validate(y,this.minMonth,this.minDay,_.local.invalidYear);return y=this._t2gYear(t.year()),s.weekOfYear(y,t.month(),t.day())},daysInMonth:function(y,f){var l=this._validate(y,f,this.minDay,_.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(y,f,l){return(this.dayOfWeek(y,f,l)||7)<6},toJD:function(y,f,l){var t=this._validate(y,f,l,_.local.invalidDate);return y=this._t2gYear(t.year()),s.toJD(y,t.month(),t.day())},fromJD:function(y){var f=s.fromJD(y),l=this._g2tYear(f.year());return this.newDate(l,f.month(),f.day())},_t2gYear:function(y){return y-this.yearsOffset-(y>=1&&y<=this.yearsOffset?1:0)},_g2tYear:function(y){return y+this.yearsOffset+(y>=-this.yearsOffset&&y<=-1?1:0)}}),_.calendars.thai=T},21457:function(D,E,e){var _=e(63489),w=e(56131);function s(y){this.local=this.regionalOptions[y||""]||this.regionalOptions[""]}s.prototype=new _.baseCalendar,w(s.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āthā’","Yawm al-Arba‘ā’","Yawm al-Khamīs","Yawm al-Jum‘a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(y){var f=this._validate(y,this.minMonth,this.minDay,_.local.invalidYear);return this.daysInYear(f.year())===355},weekOfYear:function(y,f,l){var t=this.newDate(y,f,l);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(y){for(var f=0,l=1;l<=12;l++)f+=this.daysInMonth(y,l);return f},daysInMonth:function(y,f){for(var l=this._validate(y,f,this.minDay,_.local.invalidMonth).toJD()-24e5+.5,t=0,i=0;il)return T[t]-T[t-1];t++}return 30},weekDay:function(y,f,l){return this.dayOfWeek(y,f,l)!==5},toJD:function(y,f,l){var t=this._validate(y,f,l,_.local.invalidDate),i=12*(t.year()-1)+t.month()-15292;return t.day()+T[i-1]-1+24e5-.5},fromJD:function(y){for(var f=y-24e5+.5,l=0,t=0;tf);t++)l++;var i=l+15292,r=Math.floor((i-1)/12),n=r+1,o=i-12*r,a=f-T[l-1]+1;return this.newDate(n,o,a)},isValid:function(y,f,l){var t=_.baseCalendar.prototype.isValid.apply(this,arguments);return t&&(t=(y=y.year!=null?y.year:y)>=1276&&y<=1500),t},_validate:function(y,f,l,t){var i=_.baseCalendar.prototype._validate.apply(this,arguments);if(i.year<1276||i.year>1500)throw t.replace(/\{0\}/,this.local.name);return i}}),_.calendars.ummalqura=s;var T=[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]},63489:function(D,E,e){var _=e(56131);function w(){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={}}function s(t,i,r,n){if(this._calendar=t,this._year=i,this._month=r,this._day=n,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(l.local.invalidDate||l.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function T(t,i){return"000000".substring(0,i-(t=""+t).length)+t}function y(){this.shortYearCutoff="+10"}function f(t){this.local=this.regionalOptions[t]||this.regionalOptions[""]}_(w.prototype,{instance:function(t,i){t=(t||"gregorian").toLowerCase(),i=i||"";var r=this._localCals[t+"-"+i];if(!r&&this.calendars[t]&&(r=new this.calendars[t](i),this._localCals[t+"-"+i]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,t);return r},newDate:function(t,i,r,n,o){return(n=(t!=null&&t.year?t.calendar():typeof n=="string"?this.instance(n,o):n)||this.instance()).newDate(t,i,r)},substituteDigits:function(t){return function(i){return(i+"").replace(/[0-9]/g,function(r){return t[r]})}},substituteChineseDigits:function(t,i){return function(r){for(var n="",o=0;r>0;){var a=r%10;n=(a===0?"":t[a]+i[o])+n,o++,r=Math.floor(r/10)}return n.indexOf(t[1]+i[1])===0&&(n=n.substr(1)),n||t[0]}}}),_(s.prototype,{newDate:function(t,i,r){return this._calendar.newDate(t??this,i,r)},year:function(t){return arguments.length===0?this._year:this.set(t,"y")},month:function(t){return arguments.length===0?this._month:this.set(t,"m")},day:function(t){return arguments.length===0?this._day:this.set(t,"d")},date:function(t,i,r){if(!this._calendar.isValid(t,i,r))throw(l.local.invalidDate||l.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=t,this._month=i,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(t,i){return this._calendar.add(this,t,i)},set:function(t,i){return this._calendar.set(this,t,i)},compareTo:function(t){if(this._calendar.name!==t._calendar.name)throw(l.local.differentCalendars||l.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,t._calendar.local.name);var i=this._year!==t._year?this._year-t._year:this._month!==t._month?this.monthOfYear()-t.monthOfYear():this._day-t._day;return i===0?0:i<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(t){return this._calendar.fromJD(t)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(t){return this._calendar.fromJSDate(t)},toString:function(){return(this.year()<0?"-":"")+T(Math.abs(this.year()),4)+"-"+T(this.month(),2)+"-"+T(this.day(),2)}}),_(y.prototype,{_validateLevel:0,newDate:function(t,i,r){return t==null?this.today():(t.year&&(this._validate(t,i,r,l.local.invalidDate||l.regionalOptions[""].invalidDate),r=t.day(),i=t.month(),t=t.year()),new s(this,t,i,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(t){return this._validate(t,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(t){var i=this._validate(t,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear);return(i.year()<0?"-":"")+T(Math.abs(i.year()),4)},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear),12},monthOfYear:function(t,i){var r=this._validate(t,i,this.minDay,l.local.invalidMonth||l.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(t,i){var r=(i+this.firstMonth-2*this.minMonth)%this.monthsInYear(t)+this.minMonth;return this._validate(t,r,this.minDay,l.local.invalidMonth||l.regionalOptions[""].invalidMonth),r},daysInYear:function(t){var i=this._validate(t,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear);return this.leapYear(i)?366:365},dayOfYear:function(t,i,r){var n=this._validate(t,i,r,l.local.invalidDate||l.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(t,i,r){var n=this._validate(t,i,r,l.local.invalidDate||l.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(t,i,r){return this._validate(t,i,r,l.local.invalidDate||l.regionalOptions[""].invalidDate),{}},add:function(t,i,r){return this._validate(t,this.minMonth,this.minDay,l.local.invalidDate||l.regionalOptions[""].invalidDate),this._correctAdd(t,this._add(t,i,r),i,r)},_add:function(t,i,r){if(this._validateLevel++,r==="d"||r==="w"){var n=t.toJD()+i*(r==="w"?this.daysInWeek():1),o=t.calendar().fromJD(n);return this._validateLevel--,[o.year(),o.month(),o.day()]}try{var a=t.year()+(r==="y"?i:0),u=t.monthOfYear()+(r==="m"?i:0);o=t.day(),r==="y"?(t.month()!==this.fromMonthOfYear(a,u)&&(u=this.newDate(a,t.month(),this.minDay).monthOfYear()),u=Math.min(u,this.monthsInYear(a)),o=Math.min(o,this.daysInMonth(a,this.fromMonthOfYear(a,u)))):r==="m"&&(function(c){for(;ub-1+c.minMonth;)a++,u-=b,b=c.monthsInYear(a)}(this),o=Math.min(o,this.daysInMonth(a,this.fromMonthOfYear(a,u))));var p=[a,this.fromMonthOfYear(a,u),o];return this._validateLevel--,p}catch(c){throw this._validateLevel--,c}},_correctAdd:function(t,i,r,n){if(!(this.hasYearZero||n!=="y"&&n!=="m"||i[0]!==0&&t.year()>0==i[0]>0)){var o={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;i=this._add(t,r*o[0]+a*o[1],o[2])}return t.date(i[0],i[1],i[2])},set:function(t,i,r){this._validate(t,this.minMonth,this.minDay,l.local.invalidDate||l.regionalOptions[""].invalidDate);var n=r==="y"?i:t.year(),o=r==="m"?i:t.month(),a=r==="d"?i:t.day();return r!=="y"&&r!=="m"||(a=Math.min(a,this.daysInMonth(n,o))),t.date(n,o,a)},isValid:function(t,i,r){this._validateLevel++;var n=this.hasYearZero||t!==0;if(n){var o=this.newDate(t,i,this.minDay);n=i>=this.minMonth&&i-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),b=o-(c>2.5?4716:4715);return b<=0&&b--,this.newDate(b,c,p)},toJSDate:function(t,i,r){var n=this._validate(t,i,r,l.local.invalidDate||l.regionalOptions[""].invalidDate),o=new Date(n.year(),n.month()-1,n.day());return o.setHours(0),o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0),o.setHours(o.getHours()>12?o.getHours()+2:0),o},fromJSDate:function(t){return this.newDate(t.getFullYear(),t.getMonth()+1,t.getDate())}});var l=D.exports=new w;l.cdate=s,l.baseCalendar=y,l.calendars.gregorian=f},94338:function(D,E,e){var _=e(56131),w=e(63489);_(w.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"}),w.local=w.regionalOptions[""],_(w.cdate.prototype,{formatDate:function(s,T){return typeof s!="string"&&(T=s,s=""),this._calendar.formatDate(s||"",this,T)}}),_(w.baseCalendar.prototype,{UNIX_EPOCH:w.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:w.instance().jdEpoch,TICKS_PER_DAY:864e9,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(s,T,y){if(typeof s!="string"&&(y=T,T=s,s=""),!T)return"";if(T.calendar()!==this)throw w.local.invalidFormat||w.regionalOptions[""].invalidFormat;s=s||this.local.dateFormat;for(var f,l,t,i=(y=y||{}).dayNamesShort||this.local.dayNamesShort,r=y.dayNames||this.local.dayNames,n=y.monthNumbers||this.local.monthNumbers,o=y.monthNamesShort||this.local.monthNamesShort,a=y.monthNames||this.local.monthNames,u=(y.calculateWeek||this.local.calculateWeek,function(h,M){for(var A=1;k+A1}),p=function(h,M,A,C){var L=""+M;if(u(h,C))for(;L.length1},g=function(R,U){var B=x(R,U),G=[2,3,B?4:2,B?4:2,10,11,20]["oyYJ@!".indexOf(R)+1],N=new RegExp("^-?\\d{1,"+G+"}"),j=T.substring(C).match(N);if(!j)throw(w.local.missingNumberAt||w.regionalOptions[""].missingNumberAt).replace(/\{0\}/,C);return C+=j[0].length,parseInt(j[0],10)},m=this,k=function(){if(typeof r=="function"){x("m");var R=r.call(m,T.substring(C));return C+=R.length,R}return g("m")},h=function(R,U,B,G){for(var N=x(R,G)?B:U,j=0;j-1){p=1,c=b;for(var I=this.daysInMonth(u,p);c>I;I=this.daysInMonth(u,p))p++,c-=I}return a>-1?this.fromJD(a):this.newDate(u,p,c)},determineDate:function(s,T,y,f,l){y&&typeof y!="object"&&(l=f,f=y,y=null),typeof f!="string"&&(l=f,f="");var t=this;return T=T?T.newDate():null,s==null?T:typeof s=="string"?function(i){try{return t.parseDate(f,i,l)}catch{}for(var r=((i=i.toLowerCase()).match(/^c/)&&y?y.newDate():null)||t.today(),n=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,o=n.exec(i);o;)r.add(parseInt(o[1],10),o[2]||"d"),o=n.exec(i);return r}(s):typeof s=="number"?isNaN(s)||s===1/0||s===-1/0?T:t.today().add(s,"d"):t.newDate(s)}})},69862:function(){},40964:function(){},72077:function(D,E,e){var _=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],w=typeof globalThis>"u"?e.g:globalThis;D.exports=function(){for(var s=[],T=0;T<_.length;T++)typeof w[_[T]]=="function"&&(s[s.length]=_[T]);return s}},81684:function(D,E,e){function _(pe,de,he){pe.prototype=de.prototype=he,he.constructor=pe}function w(pe,de){var he=Object.create(pe.prototype);for(var xe in de)he[xe]=de[xe];return he}function s(){}e.d(E,{sX:function(){return ye},k4:function(){return X}});var T=.7,y=1/T,f="\\s*([+-]?\\d+)\\s*",l="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",t="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",i=/^#([0-9a-f]{3,8})$/,r=new RegExp("^rgb\\(".concat(f,",").concat(f,",").concat(f,"\\)$")),n=new RegExp("^rgb\\(".concat(t,",").concat(t,",").concat(t,"\\)$")),o=new RegExp("^rgba\\(".concat(f,",").concat(f,",").concat(f,",").concat(l,"\\)$")),a=new RegExp("^rgba\\(".concat(t,",").concat(t,",").concat(t,",").concat(l,"\\)$")),u=new RegExp("^hsl\\(".concat(l,",").concat(t,",").concat(t,"\\)$")),p=new RegExp("^hsla\\(".concat(l,",").concat(t,",").concat(t,",").concat(l,"\\)$")),c={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};function b(){return this.rgb().formatHex()}function d(){return this.rgb().formatRgb()}function v(pe){var de,he;return pe=(pe+"").trim().toLowerCase(),(de=i.exec(pe))?(he=de[1].length,de=parseInt(de[1],16),he===6?x(de):he===3?new h(de>>8&15|de>>4&240,de>>4&15|240&de,(15&de)<<4|15&de,1):he===8?g(de>>24&255,de>>16&255,de>>8&255,(255&de)/255):he===4?g(de>>12&15|de>>8&240,de>>8&15|de>>4&240,de>>4&15|240&de,((15&de)<<4|15&de)/255):null):(de=r.exec(pe))?new h(de[1],de[2],de[3],1):(de=n.exec(pe))?new h(255*de[1]/100,255*de[2]/100,255*de[3]/100,1):(de=o.exec(pe))?g(de[1],de[2],de[3],de[4]):(de=a.exec(pe))?g(255*de[1]/100,255*de[2]/100,255*de[3]/100,de[4]):(de=u.exec(pe))?I(de[1],de[2]/100,de[3]/100,1):(de=p.exec(pe))?I(de[1],de[2]/100,de[3]/100,de[4]):c.hasOwnProperty(pe)?x(c[pe]):pe==="transparent"?new h(NaN,NaN,NaN,0):null}function x(pe){return new h(pe>>16&255,pe>>8&255,255&pe,1)}function g(pe,de,he,xe){return xe<=0&&(pe=de=he=NaN),new h(pe,de,he,xe)}function m(pe){return pe instanceof s||(pe=v(pe)),pe?new h((pe=pe.rgb()).r,pe.g,pe.b,pe.opacity):new h}function k(pe,de,he,xe){return arguments.length===1?m(pe):new h(pe,de,he,xe??1)}function h(pe,de,he,xe){this.r=+pe,this.g=+de,this.b=+he,this.opacity=+xe}function M(){return"#".concat(O(this.r)).concat(O(this.g)).concat(O(this.b))}function A(){var pe=C(this.opacity);return"".concat(pe===1?"rgb(":"rgba(").concat(L(this.r),", ").concat(L(this.g),", ").concat(L(this.b)).concat(pe===1?")":", ".concat(pe,")"))}function C(pe){return isNaN(pe)?1:Math.max(0,Math.min(1,pe))}function L(pe){return Math.max(0,Math.min(255,Math.round(pe)||0))}function O(pe){return((pe=L(pe))<16?"0":"")+pe.toString(16)}function I(pe,de,he,xe){return xe<=0?pe=de=he=NaN:he<=0||he>=1?pe=de=NaN:de<=0&&(pe=NaN),new U(pe,de,he,xe)}function R(pe){if(pe instanceof U)return new U(pe.h,pe.s,pe.l,pe.opacity);if(pe instanceof s||(pe=v(pe)),!pe)return new U;if(pe instanceof U)return pe;var de=(pe=pe.rgb()).r/255,he=pe.g/255,xe=pe.b/255,Re=Math.min(de,he,xe),we=Math.max(de,he,xe),Ae=NaN,Me=we-Re,Ce=(we+Re)/2;return Me?(Ae=de===we?(he-xe)/Me+6*(he0&&Ce<1?0:Ae,new U(Ae,Me,Ce,pe.opacity)}function U(pe,de,he,xe){this.h=+pe,this.s=+de,this.l=+he,this.opacity=+xe}function B(pe){return(pe=(pe||0)%360)<0?pe+360:pe}function G(pe){return Math.max(0,Math.min(1,pe||0))}function N(pe,de,he){return 255*(pe<60?de+(he-de)*pe/60:pe<180?he:pe<240?de+(he-de)*(240-pe)/60:de)}_(s,v,{copy:function(pe){return Object.assign(new this.constructor,this,pe)},displayable:function(){return this.rgb().displayable()},hex:b,formatHex:b,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return R(this).formatHsl()},formatRgb:d,toString:d}),_(h,k,w(s,{brighter:function(pe){return pe=pe==null?y:Math.pow(y,pe),new h(this.r*pe,this.g*pe,this.b*pe,this.opacity)},darker:function(pe){return pe=pe==null?T:Math.pow(T,pe),new h(this.r*pe,this.g*pe,this.b*pe,this.opacity)},rgb:function(){return this},clamp:function(){return new h(L(this.r),L(this.g),L(this.b),C(this.opacity))},displayable:function(){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:M,formatHex:M,formatHex8:function(){return"#".concat(O(this.r)).concat(O(this.g)).concat(O(this.b)).concat(O(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:A,toString:A})),_(U,function(pe,de,he,xe){return arguments.length===1?R(pe):new U(pe,de,he,xe??1)},w(s,{brighter:function(pe){return pe=pe==null?y:Math.pow(y,pe),new U(this.h,this.s,this.l*pe,this.opacity)},darker:function(pe){return pe=pe==null?T:Math.pow(T,pe),new U(this.h,this.s,this.l*pe,this.opacity)},rgb:function(){var pe=this.h%360+360*(this.h<0),de=isNaN(pe)||isNaN(this.s)?0:this.s,he=this.l,xe=he+(he<.5?he:1-he)*de,Re=2*he-xe;return new h(N(pe>=240?pe-240:pe+120,Re,xe),N(pe,Re,xe),N(pe<120?pe+240:pe-120,Re,xe),this.opacity)},clamp:function(){return new U(B(this.h),G(this.s),G(this.l),C(this.opacity))},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var pe=C(this.opacity);return"".concat(pe===1?"hsl(":"hsla(").concat(B(this.h),", ").concat(100*G(this.s),"%, ").concat(100*G(this.l),"%").concat(pe===1?")":", ".concat(pe,")"))}}));var j=function(pe){return function(){return pe}};function V(pe,de){var he=de-pe;return he?function(xe,Re){return function(we){return xe+we*Re}}(pe,he):j(isNaN(pe)?de:pe)}var H=function pe(de){var he=function(Re){return(Re=+Re)==1?V:function(we,Ae){return Ae-we?function(Me,Ce,ne){return Me=Math.pow(Me,ne),Ce=Math.pow(Ce,ne)-Me,ne=1/ne,function(ue){return Math.pow(Me+ue*Ce,ne)}}(we,Ae,Re):j(isNaN(we)?Ae:we)}}(de);function xe(Re,we){var Ae=he((Re=k(Re)).r,(we=k(we)).r),Me=he(Re.g,we.g),Ce=he(Re.b,we.b),ne=V(Re.opacity,we.opacity);return function(ue){return Re.r=Ae(ue),Re.g=Me(ue),Re.b=Ce(ue),Re.opacity=ne(ue),Re+""}}return xe.gamma=pe,xe}(1);function ee(pe,de){var he,xe=de?de.length:0,Re=pe?Math.min(xe,pe.length):0,we=new Array(Re),Ae=new Array(xe);for(he=0;hewe&&(Re=de.slice(we,Re),Me[Ae]?Me[Ae]+=Re:Me[++Ae]=Re),(he=he[0])===(xe=xe[0])?Me[Ae]?Me[Ae]+=xe:Me[++Ae]=xe:(Me[++Ae]=null,Ce.push({i:Ae,x:X(he,xe)})),we=ae.lastIndex;return we"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function i(u){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(c){return c.__proto__||Object.getPrototypeOf(c)},i(u)}var r=["AfterExport","AfterPlot","Animated","AnimatingFrame","AnimationInterrupted","AutoSize","BeforeExport","BeforeHover","ButtonClicked","Click","ClickAnnotation","Deselect","DoubleClick","Framework","Hover","LegendClick","LegendDoubleClick","Relayout","Relayouting","Restyle","Redraw","Selected","Selecting","SliderChange","SliderEnd","SliderStart","SunburstClick","Transitioning","TransitionInterrupted","Unhover","WebGlContextLost"],n=["plotly_restyle","plotly_redraw","plotly_relayout","plotly_relayouting","plotly_doubleclick","plotly_animated","plotly_sunburstclick"],o=typeof window<"u";function a(u){var p=function(c){s(d,c);var b=y(d);function d(v){var x;return e(this,d),x=b.call(this,v),x.p=Promise.resolve(),x.resizeHandler=null,x.handlers={},x.syncWindowResize=x.syncWindowResize.bind(l(x)),x.syncEventHandlers=x.syncEventHandlers.bind(l(x)),x.attachUpdateEvents=x.attachUpdateEvents.bind(l(x)),x.getRef=x.getRef.bind(l(x)),x.handleUpdate=x.handleUpdate.bind(l(x)),x.figureCallback=x.figureCallback.bind(l(x)),x.updatePlotly=x.updatePlotly.bind(l(x)),x}return w(d,[{key:"updatePlotly",value:function(x,g,m){var k=this;this.p=this.p.then(function(){if(!k.unmounting){if(!k.el)throw new Error("Missing element reference");return u.react(k.el,{data:k.props.data,layout:k.props.layout,config:k.props.config,frames:k.props.frames})}}).then(function(){k.unmounting||(k.syncWindowResize(x),k.syncEventHandlers(),k.figureCallback(g),m&&k.attachUpdateEvents())}).catch(function(h){k.props.onError&&k.props.onError(h)})}},{key:"componentDidMount",value:function(){this.unmounting=!1,this.updatePlotly(!0,this.props.onInitialized,!0)}},{key:"componentDidUpdate",value:function(x){this.unmounting=!1;var g=x.frames&&x.frames.length?x.frames.length:0,m=this.props.frames&&this.props.frames.length?this.props.frames.length:0,k=!(x.layout===this.props.layout&&x.data===this.props.data&&x.config===this.props.config&&m===g),h=x.revision!==void 0,M=x.revision!==this.props.revision;!k&&(!h||h&&!M)||this.updatePlotly(!1,this.props.onUpdate,!1)}},{key:"componentWillUnmount",value:function(){this.unmounting=!0,this.figureCallback(this.props.onPurge),this.resizeHandler&&o&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.removeUpdateEvents(),u.purge(this.el)}},{key:"attachUpdateEvents",value:function(){var x=this;!this.el||!this.el.removeListener||n.forEach(function(g){x.el.on(g,x.handleUpdate)})}},{key:"removeUpdateEvents",value:function(){var x=this;!this.el||!this.el.removeListener||n.forEach(function(g){x.el.removeListener(g,x.handleUpdate)})}},{key:"handleUpdate",value:function(){this.figureCallback(this.props.onUpdate)}},{key:"figureCallback",value:function(x){if(typeof x=="function"){var g=this.el,m=g.data,k=g.layout,h=this.el._transitionData?this.el._transitionData._frames:null,M={data:m,layout:k,frames:h};x(M,this.el)}}},{key:"syncWindowResize",value:function(x){var g=this;o&&(this.props.useResizeHandler&&!this.resizeHandler?(this.resizeHandler=function(){return u.Plots.resize(g.el)},window.addEventListener("resize",this.resizeHandler),x&&this.resizeHandler()):!this.props.useResizeHandler&&this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null))}},{key:"getRef",value:function(x){this.el=x,this.props.debug&&o&&(window.gd=this.el)}},{key:"syncEventHandlers",value:function(){var x=this;r.forEach(function(g){var m=x.props["on"+g],k=x.handlers[g],h=!!k;m&&!h?x.addEventHandler(g,m):!m&&h?x.removeEventHandler(g):m&&h&&m!==k&&(x.removeEventHandler(g),x.addEventHandler(g,m))})}},{key:"addEventHandler",value:function(x,g){this.handlers[x]=g,this.el.on(this.getPlotlyEventName(x),this.handlers[x])}},{key:"removeEventHandler",value:function(x){this.el.removeListener(this.getPlotlyEventName(x),this.handlers[x]),delete this.handlers[x]}},{key:"getPlotlyEventName",value:function(x){return"plotly_"+x.toLowerCase()}},{key:"render",value:function(){return J.default.createElement("div",{id:this.props.divId,style:this.props.style,ref:this.getRef,className:this.props.className})}}]),d}(J.Component);return p.propTypes={data:ce.default.arrayOf(ce.default.object),config:ce.default.object,layout:ce.default.object,frames:ce.default.arrayOf(ce.default.object),revision:ce.default.number,onInitialized:ce.default.func,onPurge:ce.default.func,onError:ce.default.func,onUpdate:ce.default.func,debug:ce.default.bool,style:ce.default.object,className:ce.default.string,useResizeHandler:ce.default.bool,divId:ce.default.string},r.forEach(function(c){p.propTypes["on"+c]=ce.default.func}),p.defaultProps={debug:!1,useResizeHandler:!1,data:[],style:{position:"relative",display:"inline-block"}},p}})(pw);const QT=jp(pw),Pu={sunIcon:{viewBox:"0 0 16 16",width:16,height:16,path:"M8 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13zm8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5zM3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8zm10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0zm-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707zM4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708z"},moonIcon:{viewBox:"0 0 25 25",width:25,height:25,path:"M21.752 15.002A9.718 9.718 0 0118 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 003 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 009.002-5.998z"},plotCsv:{width:900,height:900,path:"M170.666667 106.666667l0.192 736H906.666667v64H149.546667c-23.552 0-42.666667-19.093333-42.666667-42.666667L106.666667 106.666667h64z m686.506666 454.144l13.653334 16.362666a21.333333 21.333333 0 0 1-2.666667 30.058667l-171.157333 143.146667a21.333333 21.333333 0 0 1-21.546667 3.477333l-229.973333-91.285333-113.834667 94.997333a21.333333 21.333333 0 0 1-30.037333-2.709333l-13.653334-16.362667a21.333333 21.333333 0 0 1 2.688-30.058667l133.312-111.274666a21.333333 21.333333 0 0 1 21.546667-3.456l229.930667 91.264 151.68-126.826667a21.333333 21.333333 0 0 1 30.037333 2.666667z m-1.621333-417.962667l16.896 13.013333a21.333333 21.333333 0 0 1 3.925333 29.888L685.802667 433.706667a21.333333 21.333333 0 0 1-20.202667 8.085333l-226.794667-35.413333-150.186666 222.357333a21.333333 21.333333 0 0 1-27.477334 7.018667l-2.133333-1.28-17.685333-11.946667a21.333333 21.333333 0 0 1-5.738667-29.610667l165.354667-244.821333a21.333333 21.333333 0 0 1 20.992-9.130667L650.453333 374.613333l175.146667-227.882666a21.333333 21.333333 0 0 1 29.930667-3.904z"},addText:{path:"M896 928H128a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32h768a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32z m-736-64h704v-704h-704z M704 352H320a32 32 0 0 1 0-64h384a32 32 0 0 1 0 64z M512 736a32 32 0 0 1-32-32V320a32 32 0 0 1 64 0v384a32 32 0 0 1-32 32z",width:950,height:950},changeTitle:{path:"M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z M244.736 656.896h534.016v62.464H244.736z M373.76 358.4H307.2v219.136h-45.568V358.4H192v-41.472H373.76V358.4zM403.968 316.928h44.032v50.176h-44.032v-50.176z m0 67.072h44.032v194.048h-44.032V384zM576.512 541.184l8.704 31.744c-13.312 5.12-26.624 8.192-38.912 8.704-32.768 1.024-48.64-15.36-48.128-48.128V422.912h-26.624V384h26.624v-46.592l44.032-21.504V384h36.352v38.912h-36.352V532.48c-1.024 10.24 3.072 14.848 11.264 13.824 5.12 0 12.8-1.536 23.04-5.12zM619.008 316.928h44.032v260.608h-44.032V316.928zM813.056 509.952l41.472 12.8c-11.776 40.96-37.888 61.44-78.336 60.416-52.736-1.536-80.384-34.304-81.92-98.304 2.56-67.072 29.696-102.4 81.92-105.984 52.224 1.536 78.336 36.864 79.36 105.984v13.824h-117.248c3.584 30.208 15.872 45.568 37.888 46.592 19.968 0.512 32.256-11.264 36.864-35.328z m-72.704-51.712h70.656c-1.024-25.088-12.288-38.4-33.792-38.912-21.504 0.512-33.792 13.824-36.864 38.912z",width:920,height:900},changeColor:{path:"M8 3C5.79 3 4 4.79 4 7V14C4 15.1 4.9 16 6 16H9V20C9 21.1 9.9 22 11 22H13C14.1 22 15 21.1 15 20V16H18C19.1 16 20 15.1 20 14V3H8M8 5H12V7H14V5H15V9H17V5H18V10H6V7C6 5.9 6.9 5 8 5M6 14V12H18V14H6Z",width:22,height:22},uploadImage:{path:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5m-13.5-9L12 3m0 0l4.5 4.5M12 3v13.5",width:1024,height:1024},downloadCsv:{path:`M486.2,196.121h-13.164V132.59c0-0.399-0.064-0.795-0.116-1.2c-0.021-2.52-0.824-5-2.551-6.96L364.656,3.677 +`)):H=R.stylize("[Circular]","special")),d(V)){if(j&&N.match(/^\d+$/))return H;(V=JSON.stringify(""+N)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(V=V.slice(1,-1),V=R.stylize(V,"name")):(V=V.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),V=R.stylize(V,"string"))}return V+": "+H}function a(R){return Array.isArray(R)}function u(R){return typeof R=="boolean"}function p(R){return R===null}function c(R){return typeof R=="number"}function b(R){return typeof R=="string"}function d(R){return R===void 0}function v(R){return x(R)&&h(R)==="[object RegExp]"}function x(R){return typeof R=="object"&&R!==null}function g(R){return x(R)&&h(R)==="[object Date]"}function y(R){return x(R)&&(h(R)==="[object Error]"||R instanceof Error)}function k(R){return typeof R=="function"}function h(R){return Object.prototype.toString.call(R)}function M(R){return R<10?"0"+R.toString(10):R.toString(10)}E.debuglog=function(R){if(R=R.toUpperCase(),!T[R])if(m.test(R)){var U=_.pid;T[R]=function(){var B=E.format.apply(E,arguments);console.error("%s %d: %s",R,U,B)}}else T[R]=function(){};return T[R]},E.inspect=l,l.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]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},E.types=e(4936),E.isArray=a,E.isBoolean=u,E.isNull=p,E.isNullOrUndefined=function(R){return R==null},E.isNumber=c,E.isString=b,E.isSymbol=function(R){return typeof R=="symbol"},E.isUndefined=d,E.isRegExp=v,E.types.isRegExp=v,E.isObject=x,E.isDate=g,E.types.isDate=g,E.isError=y,E.types.isNativeError=y,E.isFunction=k,E.isPrimitive=function(R){return R===null||typeof R=="boolean"||typeof R=="number"||typeof R=="string"||typeof R=="symbol"||R===void 0},E.isBuffer=e(45920);var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function C(){var R=new Date,U=[M(R.getHours()),M(R.getMinutes()),M(R.getSeconds())].join(":");return[R.getDate(),A[R.getMonth()],U].join(" ")}function L(R,U){return Object.prototype.hasOwnProperty.call(R,U)}E.log=function(){console.log("%s - %s",C(),E.format.apply(E,arguments))},E.inherits=e(42018),E._extend=function(R,U){if(!U||!x(U))return R;for(var B=Object.keys(U),G=B.length;G--;)R[B[G]]=U[B[G]];return R};var O=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function I(R,U){if(!R){var B=new Error("Promise was rejected with a falsy value");B.reason=R,R=B}return U(R)}E.promisify=function(R){if(typeof R!="function")throw new TypeError('The "original" argument must be of type Function');if(O&&R[O]){var U;if(typeof(U=R[O])!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(U,O,{value:U,enumerable:!1,writable:!1,configurable:!0}),U}function U(){for(var B,G,N=new Promise(function(H,ee){B=H,G=ee}),j=[],V=0;V"u"?e.g:globalThis,t=w(),i=s("String.prototype.slice"),r={},n=Object.getPrototypeOf;f&&T&&n&&_(t,function(a){if(typeof l[a]=="function"){var u=new l[a];if(Symbol.toStringTag in u){var p=n(u),c=T(p,Symbol.toStringTag);if(!c){var b=n(p);c=T(b,Symbol.toStringTag)}r[a]=c.get}}});var o=e(9187);D.exports=function(a){return!!o(a)&&(f&&Symbol.toStringTag in a?function(u){var p=!1;return _(r,function(c,b){if(!p)try{var d=c.call(u);d===b&&(p=d)}catch{}}),p}(a):i(m(a),8,-1))}},3961:function(D,E,e){var _=e(63489),w=e(56131),s=_.instance();function T(n){this.local=this.regionalOptions[n||""]||this.regionalOptions[""]}T.prototype=new _.baseCalendar,w(T.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(n,o){if(typeof n=="string"){var a=n.match(f);return a?a[0]:""}var u=this._validateYear(n),p=n.month(),c=""+this.toChineseMonth(u,p);return o&&c.length<2&&(c="0"+c),this.isIntercalaryMonth(u,p)&&(c+="i"),c},monthNames:function(n){if(typeof n=="string"){var o=n.match(l);return o?o[0]:""}var a=this._validateYear(n),u=n.month(),p=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][this.toChineseMonth(a,u)-1];return this.isIntercalaryMonth(a,u)&&(p="闰"+p),p},monthNamesShort:function(n){if(typeof n=="string"){var o=n.match(t);return o?o[0]:""}var a=this._validateYear(n),u=n.month(),p=["一","二","三","四","五","六","七","八","九","十","十一","十二"][this.toChineseMonth(a,u)-1];return this.isIntercalaryMonth(a,u)&&(p="闰"+p),p},parseMonth:function(n,o){n=this._validateYear(n);var a,u=parseInt(o);if(isNaN(u))o[0]==="闰"&&(a=!0,o=o.substring(1)),o[o.length-1]==="月"&&(o=o.substring(0,o.length-1)),u=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(o);else{var p=o[o.length-1];a=p==="i"||p==="I"}return this.toMonthIndex(n,u,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(n,o){if(n.year&&(n=n.year()),typeof n!="number"||n<1888||n>2111)throw o.replace(/\{0\}/,this.local.name);return n},toMonthIndex:function(n,o,a){var u=this.intercalaryMonth(n);if(a&&o!==u||o<1||o>12)throw _.local.invalidMonth.replace(/\{0\}/,this.local.name);return u?!a&&o<=u?o-1:o:o-1},toChineseMonth:function(n,o){n.year&&(o=(n=n.year()).month());var a=this.intercalaryMonth(n);if(o<0||o>(a?12:11))throw _.local.invalidMonth.replace(/\{0\}/,this.local.name);return a?o>13},isIntercalaryMonth:function(n,o){n.year&&(o=(n=n.year()).month());var a=this.intercalaryMonth(n);return!!a&&a===o},leapYear:function(n){return this.intercalaryMonth(n)!==0},weekOfYear:function(n,o,a){var u,p=this._validateYear(n,_.local.invalidyear),c=r[p-r[0]],b=c>>9&4095,d=c>>5&15,v=31&c;(u=s.newDate(b,d,v)).add(4-(u.dayOfWeek()||7),"d");var x=this.toJD(n,o,a)-u.toJD();return 1+Math.floor(x/7)},monthsInYear:function(n){return this.leapYear(n)?13:12},daysInMonth:function(n,o){n.year&&(o=n.month(),n=n.year()),n=this._validateYear(n);var a=i[n-i[0]];if(o>(a>>13?12:11))throw _.local.invalidMonth.replace(/\{0\}/,this.local.name);return a&1<<12-o?30:29},weekDay:function(n,o,a){return(this.dayOfWeek(n,o,a)||7)<6},toJD:function(n,o,a){var u=this._validate(n,c,a,_.local.invalidDate);n=this._validateYear(u.year()),o=u.month(),a=u.day();var p=this.isIntercalaryMonth(n,o),c=this.toChineseMonth(n,o),b=function(d,v,x,g,y){var k,h,M;if(typeof d=="object")h=d,k=v||{};else{var A;if(!(typeof d=="number"&&d>=1888&&d<=2111))throw new Error("Lunar year outside range 1888-2111");if(!(typeof v=="number"&&v>=1&&v<=12))throw new Error("Lunar month outside range 1 - 12");if(!(typeof x=="number"&&x>=1&&x<=30))throw new Error("Lunar day outside range 1 - 30");typeof g=="object"?(A=!1,k=g):(A=!!g,k={}),h={year:d,month:v,day:x,isIntercalary:A}}M=h.day-1;var C,L=i[h.year-i[0]],O=L>>13;C=O&&(h.month>O||h.isIntercalary)?h.month:h.month-1;for(var I=0;I>9&4095,(R>>5&15)-1,(31&R)+M);return k.year=U.getFullYear(),k.month=1+U.getMonth(),k.day=U.getDate(),k}(n,c,a,p);return s.toJD(b.year,b.month,b.day)},fromJD:function(n){var o=s.fromJD(n),a=function(p,c,b,d){var v,x;if(typeof p=="object")v=p,x=c||{};else{if(!(typeof p=="number"&&p>=1888&&p<=2111))throw new Error("Solar year outside range 1888-2111");if(!(typeof c=="number"&&c>=1&&c<=12))throw new Error("Solar month outside range 1 - 12");if(!(typeof b=="number"&&b>=1&&b<=31))throw new Error("Solar day outside range 1 - 31");v={year:p,month:c,day:b},x={}}var g=r[v.year-r[0]],y=v.year<<9|v.month<<5|v.day;x.year=y>=g?v.year:v.year-1,g=r[x.year-r[0]];var k,h=new Date(g>>9&4095,(g>>5&15)-1,31&g),M=new Date(v.year,v.month-1,v.day);k=Math.round((M-h)/864e5);var A,C=i[x.year-i[0]];for(A=0;A<13;A++){var L=C&1<<12-A?30:29;if(k>13;return!O||A=2&&t<=6},extraInfo:function(m,f,l){var t=this._validate(m,f,l,_.local.invalidDate);return{century:T[Math.floor((t.year()-1)/100)+1]||""}},toJD:function(m,f,l){var t=this._validate(m,f,l,_.local.invalidDate);return m=t.year()+(t.year()<0?1:0),f=t.month(),(l=t.day())+(f>1?16:0)+(f>2?32*(f-2):0)+400*(m-1)+this.jdEpoch-1},fromJD:function(m){m=Math.floor(m+.5)-Math.floor(this.jdEpoch)-1;var f=Math.floor(m/400)+1;m-=400*(f-1),m+=m>15?16:0;var l=Math.floor(m/32)+1,t=m-32*(l-1)+1;return this.newDate(f<=0?f-1:f,l,t)}});var T={20:"Fruitbat",21:"Anchovy"};_.calendars.discworld=s},37715:function(D,E,e){var _=e(63489),w=e(56131);function s(T){this.local=this.regionalOptions[T||""]||this.regionalOptions[""]}s.prototype=new _.baseCalendar,w(s.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 m=this._validate(T,this.minMonth,this.minDay,_.local.invalidYear);return(T=m.year()+(m.year()<0?1:0))%4==3||T%4==-1},monthsInYear:function(T){return this._validate(T,this.minMonth,this.minDay,_.local.invalidYear||_.regionalOptions[""].invalidYear),13},weekOfYear:function(T,m,f){var l=this.newDate(T,m,f);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(T,m){var f=this._validate(T,m,this.minDay,_.local.invalidMonth);return this.daysPerMonth[f.month()-1]+(f.month()===13&&this.leapYear(f.year())?1:0)},weekDay:function(T,m,f){return(this.dayOfWeek(T,m,f)||7)<6},toJD:function(T,m,f){var l=this._validate(T,m,f,_.local.invalidDate);return(T=l.year())<0&&T++,l.day()+30*(l.month()-1)+365*(T-1)+Math.floor(T/4)+this.jdEpoch-1},fromJD:function(T){var m=Math.floor(T)+.5-this.jdEpoch,f=Math.floor((m-Math.floor((m+366)/1461))/365)+1;f<=0&&f--,m=Math.floor(T)+.5-this.newDate(f,1,1).toJD();var l=Math.floor(m/30)+1,t=m-30*(l-1)+1;return this.newDate(f,l,t)}}),_.calendars.ethiopian=s},99384:function(D,E,e){var _=e(63489),w=e(56131);function s(m){this.local=this.regionalOptions[m||""]||this.regionalOptions[""]}function T(m,f){return m-f*Math.floor(m/f)}s.prototype=new _.baseCalendar,w(s.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(m){var f=this._validate(m,this.minMonth,this.minDay,_.local.invalidYear);return this._leapYear(f.year())},_leapYear:function(m){return T(7*(m=m<0?m+1:m)+1,19)<7},monthsInYear:function(m){return this._validate(m,this.minMonth,this.minDay,_.local.invalidYear),this._leapYear(m.year?m.year():m)?13:12},weekOfYear:function(m,f,l){var t=this.newDate(m,f,l);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(m){return m=this._validate(m,this.minMonth,this.minDay,_.local.invalidYear).year(),this.toJD(m===-1?1:m+1,7,1)-this.toJD(m,7,1)},daysInMonth:function(m,f){return m.year&&(f=m.month(),m=m.year()),this._validate(m,f,this.minDay,_.local.invalidMonth),f===12&&this.leapYear(m)||f===8&&T(this.daysInYear(m),10)===5?30:f===9&&T(this.daysInYear(m),10)===3?29:this.daysPerMonth[f-1]},weekDay:function(m,f,l){return this.dayOfWeek(m,f,l)!==6},extraInfo:function(m,f,l){var t=this._validate(m,f,l,_.local.invalidDate);return{yearType:(this.leapYear(t)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(t)%10-3]}},toJD:function(m,f,l){var t=this._validate(m,f,l,_.local.invalidDate);m=t.year(),f=t.month(),l=t.day();var i=m<=0?m+1:m,r=this.jdEpoch+this._delay1(i)+this._delay2(i)+l+1;if(f<7){for(var n=7;n<=this.monthsInYear(m);n++)r+=this.daysInMonth(m,n);for(n=1;n=this.toJD(f===-1?1:f+1,7,1);)f++;for(var l=mthis.toJD(f,l,this.daysInMonth(f,l));)l++;var t=m-this.toJD(f,l,1)+1;return this.newDate(f,l,t)}}),_.calendars.hebrew=s},43805:function(D,E,e){var _=e(63489),w=e(56131);function s(T){this.local=this.regionalOptions[T||""]||this.regionalOptions[""]}s.prototype=new _.baseCalendar,w(s.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īs","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(T){return(11*this._validate(T,this.minMonth,this.minDay,_.local.invalidYear).year()+14)%30<11},weekOfYear:function(T,m,f){var l=this.newDate(T,m,f);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(T){return this.leapYear(T)?355:354},daysInMonth:function(T,m){var f=this._validate(T,m,this.minDay,_.local.invalidMonth);return this.daysPerMonth[f.month()-1]+(f.month()===12&&this.leapYear(f.year())?1:0)},weekDay:function(T,m,f){return this.dayOfWeek(T,m,f)!==5},toJD:function(T,m,f){var l=this._validate(T,m,f,_.local.invalidDate);return T=l.year(),m=l.month(),T=T<=0?T+1:T,(f=l.day())+Math.ceil(29.5*(m-1))+354*(T-1)+Math.floor((3+11*T)/30)+this.jdEpoch-1},fromJD:function(T){T=Math.floor(T)+.5;var m=Math.floor((30*(T-this.jdEpoch)+10646)/10631);m=m<=0?m-1:m;var f=Math.min(12,Math.ceil((T-29-this.toJD(m,1,1))/29.5)+1),l=T-this.toJD(m,f,1)+1;return this.newDate(m,f,l)}}),_.calendars.islamic=s},88874:function(D,E,e){var _=e(63489),w=e(56131);function s(T){this.local=this.regionalOptions[T||""]||this.regionalOptions[""]}s.prototype=new _.baseCalendar,w(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 m=this._validate(T,this.minMonth,this.minDay,_.local.invalidYear);return(T=m.year()<0?m.year()+1:m.year())%4==0},weekOfYear:function(T,m,f){var l=this.newDate(T,m,f);return l.add(4-(l.dayOfWeek()||7),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(T,m){var f=this._validate(T,m,this.minDay,_.local.invalidMonth);return this.daysPerMonth[f.month()-1]+(f.month()===2&&this.leapYear(f.year())?1:0)},weekDay:function(T,m,f){return(this.dayOfWeek(T,m,f)||7)<6},toJD:function(T,m,f){var l=this._validate(T,m,f,_.local.invalidDate);return T=l.year(),m=l.month(),f=l.day(),T<0&&T++,m<=2&&(T--,m+=12),Math.floor(365.25*(T+4716))+Math.floor(30.6001*(m+1))+f-1524.5},fromJD:function(T){var m=Math.floor(T+.5)+1524,f=Math.floor((m-122.1)/365.25),l=Math.floor(365.25*f),t=Math.floor((m-l)/30.6001),i=t-Math.floor(t<14?1:13),r=f-Math.floor(i>2?4716:4715),n=m-l-Math.floor(30.6001*t);return r<=0&&r--,this.newDate(r,i,n)}}),_.calendars.julian=s},83290:function(D,E,e){var _=e(63489),w=e(56131);function s(f){this.local=this.regionalOptions[f||""]||this.regionalOptions[""]}function T(f,l){return f-l*Math.floor(f/l)}function m(f,l){return T(f-1,l)+1}s.prototype=new _.baseCalendar,w(s.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(f){return this._validate(f,this.minMonth,this.minDay,_.local.invalidYear),!1},formatYear:function(f){f=this._validate(f,this.minMonth,this.minDay,_.local.invalidYear).year();var l=Math.floor(f/400);return f%=400,f+=f<0?400:0,l+"."+Math.floor(f/20)+"."+f%20},forYear:function(f){if((f=f.split(".")).length<3)throw"Invalid Mayan year";for(var l=0,t=0;t19||t>0&&i<0)throw"Invalid Mayan year";l=20*l+i}return l},monthsInYear:function(f){return this._validate(f,this.minMonth,this.minDay,_.local.invalidYear),18},weekOfYear:function(f,l,t){return this._validate(f,l,t,_.local.invalidDate),0},daysInYear:function(f){return this._validate(f,this.minMonth,this.minDay,_.local.invalidYear),360},daysInMonth:function(f,l){return this._validate(f,l,this.minDay,_.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(f,l,t){return this._validate(f,l,t,_.local.invalidDate).day()},weekDay:function(f,l,t){return this._validate(f,l,t,_.local.invalidDate),!0},extraInfo:function(f,l,t){var i=this._validate(f,l,t,_.local.invalidDate).toJD(),r=this._toHaab(i),n=this._toTzolkin(i);return{haabMonthName:this.local.haabMonths[r[0]-1],haabMonth:r[0],haabDay:r[1],tzolkinDayName:this.local.tzolkinMonths[n[0]-1],tzolkinDay:n[0],tzolkinTrecena:n[1]}},_toHaab:function(f){var l=T(8+(f-=this.jdEpoch)+340,365);return[Math.floor(l/20)+1,T(l,20)]},_toTzolkin:function(f){return[m(20+(f-=this.jdEpoch),20),m(f+4,13)]},toJD:function(f,l,t){var i=this._validate(f,l,t,_.local.invalidDate);return i.day()+20*i.month()+360*i.year()+this.jdEpoch},fromJD:function(f){f=Math.floor(f)+.5-this.jdEpoch;var l=Math.floor(f/360);f%=360,f+=f<0?360:0;var t=Math.floor(f/20),i=f%20;return this.newDate(l,t,i)}}),_.calendars.mayan=s},29108:function(D,E,e){var _=e(63489),w=e(56131);function s(m){this.local=this.regionalOptions[m||""]||this.regionalOptions[""]}s.prototype=new _.baseCalendar;var T=_.instance("gregorian");w(s.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(m){var f=this._validate(m,this.minMonth,this.minDay,_.local.invalidYear||_.regionalOptions[""].invalidYear);return T.leapYear(f.year()+(f.year()<1?1:0)+1469)},weekOfYear:function(m,f,l){var t=this.newDate(m,f,l);return t.add(1-(t.dayOfWeek()||7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(m,f){var l=this._validate(m,f,this.minDay,_.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(m,f,l){return(this.dayOfWeek(m,f,l)||7)<6},toJD:function(m,f,l){var t=this._validate(m,f,l,_.local.invalidMonth);(m=t.year())<0&&m++;for(var i=t.day(),r=1;r=this.toJD(f+1,1,1);)f++;for(var l=m-Math.floor(this.toJD(f,1,1)+.5)+1,t=1;l>this.daysInMonth(f,t);)l-=this.daysInMonth(f,t),t++;return this.newDate(f,t,l)}}),_.calendars.nanakshahi=s},55422:function(D,E,e){var _=e(63489),w=e(56131);function s(T){this.local=this.regionalOptions[T||""]||this.regionalOptions[""]}s.prototype=new _.baseCalendar,w(s.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(T){return this.daysInYear(T)!==this.daysPerYear},weekOfYear:function(T,m,f){var l=this.newDate(T,m,f);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(T){if(T=this._validate(T,this.minMonth,this.minDay,_.local.invalidYear).year(),this.NEPALI_CALENDAR_DATA[T]===void 0)return this.daysPerYear;for(var m=0,f=this.minMonth;f<=12;f++)m+=this.NEPALI_CALENDAR_DATA[T][f];return m},daysInMonth:function(T,m){return T.year&&(m=T.month(),T=T.year()),this._validate(T,m,this.minDay,_.local.invalidMonth),this.NEPALI_CALENDAR_DATA[T]===void 0?this.daysPerMonth[m-1]:this.NEPALI_CALENDAR_DATA[T][m]},weekDay:function(T,m,f){return this.dayOfWeek(T,m,f)!==6},toJD:function(T,m,f){var l=this._validate(T,m,f,_.local.invalidDate);T=l.year(),m=l.month(),f=l.day();var t=_.instance(),i=0,r=m,n=T;this._createMissingCalendarData(T);var o=T-(r>9||r===9&&f>=this.NEPALI_CALENDAR_DATA[n][0]?56:57);for(m!==9&&(i=f,r--);r!==9;)r<=0&&(r=12,n--),i+=this.NEPALI_CALENDAR_DATA[n][r],r--;return m===9?(i+=f-this.NEPALI_CALENDAR_DATA[n][0])<0&&(i+=t.daysInYear(o)):i+=this.NEPALI_CALENDAR_DATA[n][9]-this.NEPALI_CALENDAR_DATA[n][0],t.newDate(o,1,1).add(i,"d").toJD()},fromJD:function(T){var m=_.instance().fromJD(T),f=m.year(),l=m.dayOfYear(),t=f+56;this._createMissingCalendarData(t);for(var i=9,r=this.NEPALI_CALENDAR_DATA[t][0],n=this.NEPALI_CALENDAR_DATA[t][i]-r+1;l>n;)++i>12&&(i=1,t++),n+=this.NEPALI_CALENDAR_DATA[t][i];var o=this.NEPALI_CALENDAR_DATA[t][i]-(n-l);return this.newDate(t,i,o)},_createMissingCalendarData:function(T){var m=this.daysPerMonth.slice(0);m.unshift(17);for(var f=T-1;f0?474:473))%2820+474+38)%2816<682},weekOfYear:function(m,f,l){var t=this.newDate(m,f,l);return t.add(-(t.dayOfWeek()+1)%7,"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(m,f){var l=this._validate(m,f,this.minDay,_.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(m,f,l){return this.dayOfWeek(m,f,l)!==5},toJD:function(m,f,l){var t=this._validate(m,f,l,_.local.invalidDate);m=t.year(),f=t.month(),l=t.day();var i=m-(m>=0?474:473),r=474+T(i,2820);return l+(f<=7?31*(f-1):30*(f-1)+6)+Math.floor((682*r-110)/2816)+365*(r-1)+1029983*Math.floor(i/2820)+this.jdEpoch-1},fromJD:function(m){var f=(m=Math.floor(m)+.5)-this.toJD(475,1,1),l=Math.floor(f/1029983),t=T(f,1029983),i=2820;if(t!==1029982){var r=Math.floor(t/366),n=T(t,366);i=Math.floor((2134*r+2816*n+2815)/1028522)+r+1}var o=i+2820*l+474;o=o<=0?o-1:o;var a=m-this.toJD(o,1,1)+1,u=a<=186?Math.ceil(a/31):Math.ceil((a-6)/30),p=m-this.toJD(o,u,1)+1;return this.newDate(o,u,p)}}),_.calendars.persian=s,_.calendars.jalali=s},31320:function(D,E,e){var _=e(63489),w=e(56131),s=_.instance();function T(m){this.local=this.regionalOptions[m||""]||this.regionalOptions[""]}T.prototype=new _.baseCalendar,w(T.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(m){var f=this._validate(m,this.minMonth,this.minDay,_.local.invalidYear);return m=this._t2gYear(f.year()),s.leapYear(m)},weekOfYear:function(m,f,l){var t=this._validate(m,this.minMonth,this.minDay,_.local.invalidYear);return m=this._t2gYear(t.year()),s.weekOfYear(m,t.month(),t.day())},daysInMonth:function(m,f){var l=this._validate(m,f,this.minDay,_.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(m,f,l){return(this.dayOfWeek(m,f,l)||7)<6},toJD:function(m,f,l){var t=this._validate(m,f,l,_.local.invalidDate);return m=this._t2gYear(t.year()),s.toJD(m,t.month(),t.day())},fromJD:function(m){var f=s.fromJD(m),l=this._g2tYear(f.year());return this.newDate(l,f.month(),f.day())},_t2gYear:function(m){return m+this.yearsOffset+(m>=-this.yearsOffset&&m<=-1?1:0)},_g2tYear:function(m){return m-this.yearsOffset-(m>=1&&m<=this.yearsOffset?1:0)}}),_.calendars.taiwan=T},51367:function(D,E,e){var _=e(63489),w=e(56131),s=_.instance();function T(m){this.local=this.regionalOptions[m||""]||this.regionalOptions[""]}T.prototype=new _.baseCalendar,w(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(m){var f=this._validate(m,this.minMonth,this.minDay,_.local.invalidYear);return m=this._t2gYear(f.year()),s.leapYear(m)},weekOfYear:function(m,f,l){var t=this._validate(m,this.minMonth,this.minDay,_.local.invalidYear);return m=this._t2gYear(t.year()),s.weekOfYear(m,t.month(),t.day())},daysInMonth:function(m,f){var l=this._validate(m,f,this.minDay,_.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(m,f,l){return(this.dayOfWeek(m,f,l)||7)<6},toJD:function(m,f,l){var t=this._validate(m,f,l,_.local.invalidDate);return m=this._t2gYear(t.year()),s.toJD(m,t.month(),t.day())},fromJD:function(m){var f=s.fromJD(m),l=this._g2tYear(f.year());return this.newDate(l,f.month(),f.day())},_t2gYear:function(m){return m-this.yearsOffset-(m>=1&&m<=this.yearsOffset?1:0)},_g2tYear:function(m){return m+this.yearsOffset+(m>=-this.yearsOffset&&m<=-1?1:0)}}),_.calendars.thai=T},21457:function(D,E,e){var _=e(63489),w=e(56131);function s(m){this.local=this.regionalOptions[m||""]||this.regionalOptions[""]}s.prototype=new _.baseCalendar,w(s.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āthā’","Yawm al-Arba‘ā’","Yawm al-Khamīs","Yawm al-Jum‘a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(m){var f=this._validate(m,this.minMonth,this.minDay,_.local.invalidYear);return this.daysInYear(f.year())===355},weekOfYear:function(m,f,l){var t=this.newDate(m,f,l);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(m){for(var f=0,l=1;l<=12;l++)f+=this.daysInMonth(m,l);return f},daysInMonth:function(m,f){for(var l=this._validate(m,f,this.minDay,_.local.invalidMonth).toJD()-24e5+.5,t=0,i=0;il)return T[t]-T[t-1];t++}return 30},weekDay:function(m,f,l){return this.dayOfWeek(m,f,l)!==5},toJD:function(m,f,l){var t=this._validate(m,f,l,_.local.invalidDate),i=12*(t.year()-1)+t.month()-15292;return t.day()+T[i-1]-1+24e5-.5},fromJD:function(m){for(var f=m-24e5+.5,l=0,t=0;tf);t++)l++;var i=l+15292,r=Math.floor((i-1)/12),n=r+1,o=i-12*r,a=f-T[l-1]+1;return this.newDate(n,o,a)},isValid:function(m,f,l){var t=_.baseCalendar.prototype.isValid.apply(this,arguments);return t&&(t=(m=m.year!=null?m.year:m)>=1276&&m<=1500),t},_validate:function(m,f,l,t){var i=_.baseCalendar.prototype._validate.apply(this,arguments);if(i.year<1276||i.year>1500)throw t.replace(/\{0\}/,this.local.name);return i}}),_.calendars.ummalqura=s;var T=[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]},63489:function(D,E,e){var _=e(56131);function w(){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={}}function s(t,i,r,n){if(this._calendar=t,this._year=i,this._month=r,this._day=n,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(l.local.invalidDate||l.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function T(t,i){return"000000".substring(0,i-(t=""+t).length)+t}function m(){this.shortYearCutoff="+10"}function f(t){this.local=this.regionalOptions[t]||this.regionalOptions[""]}_(w.prototype,{instance:function(t,i){t=(t||"gregorian").toLowerCase(),i=i||"";var r=this._localCals[t+"-"+i];if(!r&&this.calendars[t]&&(r=new this.calendars[t](i),this._localCals[t+"-"+i]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,t);return r},newDate:function(t,i,r,n,o){return(n=(t!=null&&t.year?t.calendar():typeof n=="string"?this.instance(n,o):n)||this.instance()).newDate(t,i,r)},substituteDigits:function(t){return function(i){return(i+"").replace(/[0-9]/g,function(r){return t[r]})}},substituteChineseDigits:function(t,i){return function(r){for(var n="",o=0;r>0;){var a=r%10;n=(a===0?"":t[a]+i[o])+n,o++,r=Math.floor(r/10)}return n.indexOf(t[1]+i[1])===0&&(n=n.substr(1)),n||t[0]}}}),_(s.prototype,{newDate:function(t,i,r){return this._calendar.newDate(t??this,i,r)},year:function(t){return arguments.length===0?this._year:this.set(t,"y")},month:function(t){return arguments.length===0?this._month:this.set(t,"m")},day:function(t){return arguments.length===0?this._day:this.set(t,"d")},date:function(t,i,r){if(!this._calendar.isValid(t,i,r))throw(l.local.invalidDate||l.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=t,this._month=i,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(t,i){return this._calendar.add(this,t,i)},set:function(t,i){return this._calendar.set(this,t,i)},compareTo:function(t){if(this._calendar.name!==t._calendar.name)throw(l.local.differentCalendars||l.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,t._calendar.local.name);var i=this._year!==t._year?this._year-t._year:this._month!==t._month?this.monthOfYear()-t.monthOfYear():this._day-t._day;return i===0?0:i<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(t){return this._calendar.fromJD(t)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(t){return this._calendar.fromJSDate(t)},toString:function(){return(this.year()<0?"-":"")+T(Math.abs(this.year()),4)+"-"+T(this.month(),2)+"-"+T(this.day(),2)}}),_(m.prototype,{_validateLevel:0,newDate:function(t,i,r){return t==null?this.today():(t.year&&(this._validate(t,i,r,l.local.invalidDate||l.regionalOptions[""].invalidDate),r=t.day(),i=t.month(),t=t.year()),new s(this,t,i,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(t){return this._validate(t,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(t){var i=this._validate(t,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear);return(i.year()<0?"-":"")+T(Math.abs(i.year()),4)},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear),12},monthOfYear:function(t,i){var r=this._validate(t,i,this.minDay,l.local.invalidMonth||l.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(t,i){var r=(i+this.firstMonth-2*this.minMonth)%this.monthsInYear(t)+this.minMonth;return this._validate(t,r,this.minDay,l.local.invalidMonth||l.regionalOptions[""].invalidMonth),r},daysInYear:function(t){var i=this._validate(t,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear);return this.leapYear(i)?366:365},dayOfYear:function(t,i,r){var n=this._validate(t,i,r,l.local.invalidDate||l.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(t,i,r){var n=this._validate(t,i,r,l.local.invalidDate||l.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(t,i,r){return this._validate(t,i,r,l.local.invalidDate||l.regionalOptions[""].invalidDate),{}},add:function(t,i,r){return this._validate(t,this.minMonth,this.minDay,l.local.invalidDate||l.regionalOptions[""].invalidDate),this._correctAdd(t,this._add(t,i,r),i,r)},_add:function(t,i,r){if(this._validateLevel++,r==="d"||r==="w"){var n=t.toJD()+i*(r==="w"?this.daysInWeek():1),o=t.calendar().fromJD(n);return this._validateLevel--,[o.year(),o.month(),o.day()]}try{var a=t.year()+(r==="y"?i:0),u=t.monthOfYear()+(r==="m"?i:0);o=t.day(),r==="y"?(t.month()!==this.fromMonthOfYear(a,u)&&(u=this.newDate(a,t.month(),this.minDay).monthOfYear()),u=Math.min(u,this.monthsInYear(a)),o=Math.min(o,this.daysInMonth(a,this.fromMonthOfYear(a,u)))):r==="m"&&(function(c){for(;ub-1+c.minMonth;)a++,u-=b,b=c.monthsInYear(a)}(this),o=Math.min(o,this.daysInMonth(a,this.fromMonthOfYear(a,u))));var p=[a,this.fromMonthOfYear(a,u),o];return this._validateLevel--,p}catch(c){throw this._validateLevel--,c}},_correctAdd:function(t,i,r,n){if(!(this.hasYearZero||n!=="y"&&n!=="m"||i[0]!==0&&t.year()>0==i[0]>0)){var o={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;i=this._add(t,r*o[0]+a*o[1],o[2])}return t.date(i[0],i[1],i[2])},set:function(t,i,r){this._validate(t,this.minMonth,this.minDay,l.local.invalidDate||l.regionalOptions[""].invalidDate);var n=r==="y"?i:t.year(),o=r==="m"?i:t.month(),a=r==="d"?i:t.day();return r!=="y"&&r!=="m"||(a=Math.min(a,this.daysInMonth(n,o))),t.date(n,o,a)},isValid:function(t,i,r){this._validateLevel++;var n=this.hasYearZero||t!==0;if(n){var o=this.newDate(t,i,this.minDay);n=i>=this.minMonth&&i-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),b=o-(c>2.5?4716:4715);return b<=0&&b--,this.newDate(b,c,p)},toJSDate:function(t,i,r){var n=this._validate(t,i,r,l.local.invalidDate||l.regionalOptions[""].invalidDate),o=new Date(n.year(),n.month()-1,n.day());return o.setHours(0),o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0),o.setHours(o.getHours()>12?o.getHours()+2:0),o},fromJSDate:function(t){return this.newDate(t.getFullYear(),t.getMonth()+1,t.getDate())}});var l=D.exports=new w;l.cdate=s,l.baseCalendar=m,l.calendars.gregorian=f},94338:function(D,E,e){var _=e(56131),w=e(63489);_(w.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"}),w.local=w.regionalOptions[""],_(w.cdate.prototype,{formatDate:function(s,T){return typeof s!="string"&&(T=s,s=""),this._calendar.formatDate(s||"",this,T)}}),_(w.baseCalendar.prototype,{UNIX_EPOCH:w.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:w.instance().jdEpoch,TICKS_PER_DAY:864e9,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(s,T,m){if(typeof s!="string"&&(m=T,T=s,s=""),!T)return"";if(T.calendar()!==this)throw w.local.invalidFormat||w.regionalOptions[""].invalidFormat;s=s||this.local.dateFormat;for(var f,l,t,i=(m=m||{}).dayNamesShort||this.local.dayNamesShort,r=m.dayNames||this.local.dayNames,n=m.monthNumbers||this.local.monthNumbers,o=m.monthNamesShort||this.local.monthNamesShort,a=m.monthNames||this.local.monthNames,u=(m.calculateWeek||this.local.calculateWeek,function(h,M){for(var A=1;k+A1}),p=function(h,M,A,C){var L=""+M;if(u(h,C))for(;L.length1},g=function(R,U){var B=x(R,U),G=[2,3,B?4:2,B?4:2,10,11,20]["oyYJ@!".indexOf(R)+1],N=new RegExp("^-?\\d{1,"+G+"}"),j=T.substring(C).match(N);if(!j)throw(w.local.missingNumberAt||w.regionalOptions[""].missingNumberAt).replace(/\{0\}/,C);return C+=j[0].length,parseInt(j[0],10)},y=this,k=function(){if(typeof r=="function"){x("m");var R=r.call(y,T.substring(C));return C+=R.length,R}return g("m")},h=function(R,U,B,G){for(var N=x(R,G)?B:U,j=0;j-1){p=1,c=b;for(var I=this.daysInMonth(u,p);c>I;I=this.daysInMonth(u,p))p++,c-=I}return a>-1?this.fromJD(a):this.newDate(u,p,c)},determineDate:function(s,T,m,f,l){m&&typeof m!="object"&&(l=f,f=m,m=null),typeof f!="string"&&(l=f,f="");var t=this;return T=T?T.newDate():null,s==null?T:typeof s=="string"?function(i){try{return t.parseDate(f,i,l)}catch{}for(var r=((i=i.toLowerCase()).match(/^c/)&&m?m.newDate():null)||t.today(),n=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,o=n.exec(i);o;)r.add(parseInt(o[1],10),o[2]||"d"),o=n.exec(i);return r}(s):typeof s=="number"?isNaN(s)||s===1/0||s===-1/0?T:t.today().add(s,"d"):t.newDate(s)}})},69862:function(){},40964:function(){},72077:function(D,E,e){var _=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],w=typeof globalThis>"u"?e.g:globalThis;D.exports=function(){for(var s=[],T=0;T<_.length;T++)typeof w[_[T]]=="function"&&(s[s.length]=_[T]);return s}},81684:function(D,E,e){function _(he,de,pe){he.prototype=de.prototype=pe,pe.constructor=he}function w(he,de){var pe=Object.create(he.prototype);for(var ye in de)pe[ye]=de[ye];return pe}function s(){}e.d(E,{sX:function(){return xe},k4:function(){return Y}});var T=.7,m=1/T,f="\\s*([+-]?\\d+)\\s*",l="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",t="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",i=/^#([0-9a-f]{3,8})$/,r=new RegExp("^rgb\\(".concat(f,",").concat(f,",").concat(f,"\\)$")),n=new RegExp("^rgb\\(".concat(t,",").concat(t,",").concat(t,"\\)$")),o=new RegExp("^rgba\\(".concat(f,",").concat(f,",").concat(f,",").concat(l,"\\)$")),a=new RegExp("^rgba\\(".concat(t,",").concat(t,",").concat(t,",").concat(l,"\\)$")),u=new RegExp("^hsl\\(".concat(l,",").concat(t,",").concat(t,"\\)$")),p=new RegExp("^hsla\\(".concat(l,",").concat(t,",").concat(t,",").concat(l,"\\)$")),c={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};function b(){return this.rgb().formatHex()}function d(){return this.rgb().formatRgb()}function v(he){var de,pe;return he=(he+"").trim().toLowerCase(),(de=i.exec(he))?(pe=de[1].length,de=parseInt(de[1],16),pe===6?x(de):pe===3?new h(de>>8&15|de>>4&240,de>>4&15|240&de,(15&de)<<4|15&de,1):pe===8?g(de>>24&255,de>>16&255,de>>8&255,(255&de)/255):pe===4?g(de>>12&15|de>>8&240,de>>8&15|de>>4&240,de>>4&15|240&de,((15&de)<<4|15&de)/255):null):(de=r.exec(he))?new h(de[1],de[2],de[3],1):(de=n.exec(he))?new h(255*de[1]/100,255*de[2]/100,255*de[3]/100,1):(de=o.exec(he))?g(de[1],de[2],de[3],de[4]):(de=a.exec(he))?g(255*de[1]/100,255*de[2]/100,255*de[3]/100,de[4]):(de=u.exec(he))?I(de[1],de[2]/100,de[3]/100,1):(de=p.exec(he))?I(de[1],de[2]/100,de[3]/100,de[4]):c.hasOwnProperty(he)?x(c[he]):he==="transparent"?new h(NaN,NaN,NaN,0):null}function x(he){return new h(he>>16&255,he>>8&255,255&he,1)}function g(he,de,pe,ye){return ye<=0&&(he=de=pe=NaN),new h(he,de,pe,ye)}function y(he){return he instanceof s||(he=v(he)),he?new h((he=he.rgb()).r,he.g,he.b,he.opacity):new h}function k(he,de,pe,ye){return arguments.length===1?y(he):new h(he,de,pe,ye??1)}function h(he,de,pe,ye){this.r=+he,this.g=+de,this.b=+pe,this.opacity=+ye}function M(){return"#".concat(O(this.r)).concat(O(this.g)).concat(O(this.b))}function A(){var he=C(this.opacity);return"".concat(he===1?"rgb(":"rgba(").concat(L(this.r),", ").concat(L(this.g),", ").concat(L(this.b)).concat(he===1?")":", ".concat(he,")"))}function C(he){return isNaN(he)?1:Math.max(0,Math.min(1,he))}function L(he){return Math.max(0,Math.min(255,Math.round(he)||0))}function O(he){return((he=L(he))<16?"0":"")+he.toString(16)}function I(he,de,pe,ye){return ye<=0?he=de=pe=NaN:pe<=0||pe>=1?he=de=NaN:de<=0&&(he=NaN),new U(he,de,pe,ye)}function R(he){if(he instanceof U)return new U(he.h,he.s,he.l,he.opacity);if(he instanceof s||(he=v(he)),!he)return new U;if(he instanceof U)return he;var de=(he=he.rgb()).r/255,pe=he.g/255,ye=he.b/255,Re=Math.min(de,pe,ye),we=Math.max(de,pe,ye),Ae=NaN,Me=we-Re,Ce=(we+Re)/2;return Me?(Ae=de===we?(pe-ye)/Me+6*(pe0&&Ce<1?0:Ae,new U(Ae,Me,Ce,he.opacity)}function U(he,de,pe,ye){this.h=+he,this.s=+de,this.l=+pe,this.opacity=+ye}function B(he){return(he=(he||0)%360)<0?he+360:he}function G(he){return Math.max(0,Math.min(1,he||0))}function N(he,de,pe){return 255*(he<60?de+(pe-de)*he/60:he<180?pe:he<240?de+(pe-de)*(240-he)/60:de)}_(s,v,{copy:function(he){return Object.assign(new this.constructor,this,he)},displayable:function(){return this.rgb().displayable()},hex:b,formatHex:b,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return R(this).formatHsl()},formatRgb:d,toString:d}),_(h,k,w(s,{brighter:function(he){return he=he==null?m:Math.pow(m,he),new h(this.r*he,this.g*he,this.b*he,this.opacity)},darker:function(he){return he=he==null?T:Math.pow(T,he),new h(this.r*he,this.g*he,this.b*he,this.opacity)},rgb:function(){return this},clamp:function(){return new h(L(this.r),L(this.g),L(this.b),C(this.opacity))},displayable:function(){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:M,formatHex:M,formatHex8:function(){return"#".concat(O(this.r)).concat(O(this.g)).concat(O(this.b)).concat(O(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:A,toString:A})),_(U,function(he,de,pe,ye){return arguments.length===1?R(he):new U(he,de,pe,ye??1)},w(s,{brighter:function(he){return he=he==null?m:Math.pow(m,he),new U(this.h,this.s,this.l*he,this.opacity)},darker:function(he){return he=he==null?T:Math.pow(T,he),new U(this.h,this.s,this.l*he,this.opacity)},rgb:function(){var he=this.h%360+360*(this.h<0),de=isNaN(he)||isNaN(this.s)?0:this.s,pe=this.l,ye=pe+(pe<.5?pe:1-pe)*de,Re=2*pe-ye;return new h(N(he>=240?he-240:he+120,Re,ye),N(he,Re,ye),N(he<120?he+240:he-120,Re,ye),this.opacity)},clamp:function(){return new U(B(this.h),G(this.s),G(this.l),C(this.opacity))},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var he=C(this.opacity);return"".concat(he===1?"hsl(":"hsla(").concat(B(this.h),", ").concat(100*G(this.s),"%, ").concat(100*G(this.l),"%").concat(he===1?")":", ".concat(he,")"))}}));var j=function(he){return function(){return he}};function V(he,de){var pe=de-he;return pe?function(ye,Re){return function(we){return ye+we*Re}}(he,pe):j(isNaN(he)?de:he)}var H=function he(de){var pe=function(Re){return(Re=+Re)==1?V:function(we,Ae){return Ae-we?function(Me,Ce,ne){return Me=Math.pow(Me,ne),Ce=Math.pow(Ce,ne)-Me,ne=1/ne,function(ue){return Math.pow(Me+ue*Ce,ne)}}(we,Ae,Re):j(isNaN(we)?Ae:we)}}(de);function ye(Re,we){var Ae=pe((Re=k(Re)).r,(we=k(we)).r),Me=pe(Re.g,we.g),Ce=pe(Re.b,we.b),ne=V(Re.opacity,we.opacity);return function(ue){return Re.r=Ae(ue),Re.g=Me(ue),Re.b=Ce(ue),Re.opacity=ne(ue),Re+""}}return ye.gamma=he,ye}(1);function ee(he,de){var pe,ye=de?de.length:0,Re=he?Math.min(ye,he.length):0,we=new Array(Re),Ae=new Array(ye);for(pe=0;pewe&&(Re=de.slice(we,Re),Me[Ae]?Me[Ae]+=Re:Me[++Ae]=Re),(pe=pe[0])===(ye=ye[0])?Me[Ae]?Me[Ae]+=ye:Me[++Ae]=ye:(Me[++Ae]=null,Ce.push({i:Ae,x:Y(pe,ye)})),we=ae.lastIndex;return we"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function i(u){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(c){return c.__proto__||Object.getPrototypeOf(c)},i(u)}var r=["AfterExport","AfterPlot","Animated","AnimatingFrame","AnimationInterrupted","AutoSize","BeforeExport","BeforeHover","ButtonClicked","Click","ClickAnnotation","Deselect","DoubleClick","Framework","Hover","LegendClick","LegendDoubleClick","Relayout","Relayouting","Restyle","Redraw","Selected","Selecting","SliderChange","SliderEnd","SliderStart","SunburstClick","Transitioning","TransitionInterrupted","Unhover","WebGlContextLost"],n=["plotly_restyle","plotly_redraw","plotly_relayout","plotly_relayouting","plotly_doubleclick","plotly_animated","plotly_sunburstclick"],o=typeof window<"u";function a(u){var p=function(c){s(d,c);var b=m(d);function d(v){var x;return e(this,d),x=b.call(this,v),x.p=Promise.resolve(),x.resizeHandler=null,x.handlers={},x.syncWindowResize=x.syncWindowResize.bind(l(x)),x.syncEventHandlers=x.syncEventHandlers.bind(l(x)),x.attachUpdateEvents=x.attachUpdateEvents.bind(l(x)),x.getRef=x.getRef.bind(l(x)),x.handleUpdate=x.handleUpdate.bind(l(x)),x.figureCallback=x.figureCallback.bind(l(x)),x.updatePlotly=x.updatePlotly.bind(l(x)),x}return w(d,[{key:"updatePlotly",value:function(x,g,y){var k=this;this.p=this.p.then(function(){if(!k.unmounting){if(!k.el)throw new Error("Missing element reference");return u.react(k.el,{data:k.props.data,layout:k.props.layout,config:k.props.config,frames:k.props.frames})}}).then(function(){k.unmounting||(k.syncWindowResize(x),k.syncEventHandlers(),k.figureCallback(g),y&&k.attachUpdateEvents())}).catch(function(h){k.props.onError&&k.props.onError(h)})}},{key:"componentDidMount",value:function(){this.unmounting=!1,this.updatePlotly(!0,this.props.onInitialized,!0)}},{key:"componentDidUpdate",value:function(x){this.unmounting=!1;var g=x.frames&&x.frames.length?x.frames.length:0,y=this.props.frames&&this.props.frames.length?this.props.frames.length:0,k=!(x.layout===this.props.layout&&x.data===this.props.data&&x.config===this.props.config&&y===g),h=x.revision!==void 0,M=x.revision!==this.props.revision;!k&&(!h||h&&!M)||this.updatePlotly(!1,this.props.onUpdate,!1)}},{key:"componentWillUnmount",value:function(){this.unmounting=!0,this.figureCallback(this.props.onPurge),this.resizeHandler&&o&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.removeUpdateEvents(),u.purge(this.el)}},{key:"attachUpdateEvents",value:function(){var x=this;!this.el||!this.el.removeListener||n.forEach(function(g){x.el.on(g,x.handleUpdate)})}},{key:"removeUpdateEvents",value:function(){var x=this;!this.el||!this.el.removeListener||n.forEach(function(g){x.el.removeListener(g,x.handleUpdate)})}},{key:"handleUpdate",value:function(){this.figureCallback(this.props.onUpdate)}},{key:"figureCallback",value:function(x){if(typeof x=="function"){var g=this.el,y=g.data,k=g.layout,h=this.el._transitionData?this.el._transitionData._frames:null,M={data:y,layout:k,frames:h};x(M,this.el)}}},{key:"syncWindowResize",value:function(x){var g=this;o&&(this.props.useResizeHandler&&!this.resizeHandler?(this.resizeHandler=function(){return u.Plots.resize(g.el)},window.addEventListener("resize",this.resizeHandler),x&&this.resizeHandler()):!this.props.useResizeHandler&&this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null))}},{key:"getRef",value:function(x){this.el=x,this.props.debug&&o&&(window.gd=this.el)}},{key:"syncEventHandlers",value:function(){var x=this;r.forEach(function(g){var y=x.props["on"+g],k=x.handlers[g],h=!!k;y&&!h?x.addEventHandler(g,y):!y&&h?x.removeEventHandler(g):y&&h&&y!==k&&(x.removeEventHandler(g),x.addEventHandler(g,y))})}},{key:"addEventHandler",value:function(x,g){this.handlers[x]=g,this.el.on(this.getPlotlyEventName(x),this.handlers[x])}},{key:"removeEventHandler",value:function(x){this.el.removeListener(this.getPlotlyEventName(x),this.handlers[x]),delete this.handlers[x]}},{key:"getPlotlyEventName",value:function(x){return"plotly_"+x.toLowerCase()}},{key:"render",value:function(){return J.default.createElement("div",{id:this.props.divId,style:this.props.style,ref:this.getRef,className:this.props.className})}}]),d}(J.Component);return p.propTypes={data:ce.default.arrayOf(ce.default.object),config:ce.default.object,layout:ce.default.object,frames:ce.default.arrayOf(ce.default.object),revision:ce.default.number,onInitialized:ce.default.func,onPurge:ce.default.func,onError:ce.default.func,onUpdate:ce.default.func,debug:ce.default.bool,style:ce.default.object,className:ce.default.string,useResizeHandler:ce.default.bool,divId:ce.default.string},r.forEach(function(c){p.propTypes["on"+c]=ce.default.func}),p.defaultProps={debug:!1,useResizeHandler:!1,data:[],style:{position:"relative",display:"inline-block"}},p}})(pw);const QT=jp(pw),Pu={sunIcon:{viewBox:"0 0 16 16",width:16,height:16,path:"M8 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13zm8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5zM3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8zm10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0zm-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707zM4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708z"},moonIcon:{viewBox:"0 0 25 25",width:25,height:25,path:"M21.752 15.002A9.718 9.718 0 0118 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 003 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 009.002-5.998z"},plotCsv:{width:900,height:900,path:"M170.666667 106.666667l0.192 736H906.666667v64H149.546667c-23.552 0-42.666667-19.093333-42.666667-42.666667L106.666667 106.666667h64z m686.506666 454.144l13.653334 16.362666a21.333333 21.333333 0 0 1-2.666667 30.058667l-171.157333 143.146667a21.333333 21.333333 0 0 1-21.546667 3.477333l-229.973333-91.285333-113.834667 94.997333a21.333333 21.333333 0 0 1-30.037333-2.709333l-13.653334-16.362667a21.333333 21.333333 0 0 1 2.688-30.058667l133.312-111.274666a21.333333 21.333333 0 0 1 21.546667-3.456l229.930667 91.264 151.68-126.826667a21.333333 21.333333 0 0 1 30.037333 2.666667z m-1.621333-417.962667l16.896 13.013333a21.333333 21.333333 0 0 1 3.925333 29.888L685.802667 433.706667a21.333333 21.333333 0 0 1-20.202667 8.085333l-226.794667-35.413333-150.186666 222.357333a21.333333 21.333333 0 0 1-27.477334 7.018667l-2.133333-1.28-17.685333-11.946667a21.333333 21.333333 0 0 1-5.738667-29.610667l165.354667-244.821333a21.333333 21.333333 0 0 1 20.992-9.130667L650.453333 374.613333l175.146667-227.882666a21.333333 21.333333 0 0 1 29.930667-3.904z"},addText:{path:"M896 928H128a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32h768a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32z m-736-64h704v-704h-704z M704 352H320a32 32 0 0 1 0-64h384a32 32 0 0 1 0 64z M512 736a32 32 0 0 1-32-32V320a32 32 0 0 1 64 0v384a32 32 0 0 1-32 32z",width:950,height:950},changeTitle:{path:"M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z M244.736 656.896h534.016v62.464H244.736z M373.76 358.4H307.2v219.136h-45.568V358.4H192v-41.472H373.76V358.4zM403.968 316.928h44.032v50.176h-44.032v-50.176z m0 67.072h44.032v194.048h-44.032V384zM576.512 541.184l8.704 31.744c-13.312 5.12-26.624 8.192-38.912 8.704-32.768 1.024-48.64-15.36-48.128-48.128V422.912h-26.624V384h26.624v-46.592l44.032-21.504V384h36.352v38.912h-36.352V532.48c-1.024 10.24 3.072 14.848 11.264 13.824 5.12 0 12.8-1.536 23.04-5.12zM619.008 316.928h44.032v260.608h-44.032V316.928zM813.056 509.952l41.472 12.8c-11.776 40.96-37.888 61.44-78.336 60.416-52.736-1.536-80.384-34.304-81.92-98.304 2.56-67.072 29.696-102.4 81.92-105.984 52.224 1.536 78.336 36.864 79.36 105.984v13.824h-117.248c3.584 30.208 15.872 45.568 37.888 46.592 19.968 0.512 32.256-11.264 36.864-35.328z m-72.704-51.712h70.656c-1.024-25.088-12.288-38.4-33.792-38.912-21.504 0.512-33.792 13.824-36.864 38.912z",width:920,height:900},changeColor:{path:"M8 3C5.79 3 4 4.79 4 7V14C4 15.1 4.9 16 6 16H9V20C9 21.1 9.9 22 11 22H13C14.1 22 15 21.1 15 20V16H18C19.1 16 20 15.1 20 14V3H8M8 5H12V7H14V5H15V9H17V5H18V10H6V7C6 5.9 6.9 5 8 5M6 14V12H18V14H6Z",width:22,height:22},uploadImage:{path:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5m-13.5-9L12 3m0 0l4.5 4.5M12 3v13.5",width:1024,height:1024},downloadCsv:{path:`M486.2,196.121h-13.164V132.59c0-0.399-0.064-0.795-0.116-1.2c-0.021-2.52-0.824-5-2.551-6.96L364.656,3.677 c-0.031-0.034-0.064-0.044-0.085-0.075c-0.629-0.707-1.364-1.292-2.141-1.796c-0.231-0.157-0.462-0.286-0.704-0.419 c-0.672-0.365-1.386-0.672-2.121-0.893c-0.199-0.052-0.377-0.134-0.576-0.188C358.229,0.118,357.4,0,356.562,0H96.757 C84.893,0,75.256,9.649,75.256,21.502v174.613H62.093c-16.972,0-30.733,13.756-30.733,30.73v159.81 @@ -3654,7 +3654,7 @@ c0,32.158,19.051,52.4,51.456,52.4c10.947,0,23.097-2.378,30.241-5.238l5.483,28.346c-6.672,3.34-21.674,6.919-41.208,6.919 C98.06,382.976,69.474,348.424,69.474,302.692z M451.534,520.962H96.757v-103.57h354.777V520.962z M427.518,380.583h-42.399 l-51.45-160.536h39.787l19.526,67.894c5.479,19.046,10.479,37.386,14.299,57.397h0.709c4.048-19.298,9.045-38.352,14.526-56.693 - l20.487-68.598h38.599L427.518,380.583z`,width:550,height:550,transform:"translate(4, 0)"},downloadImage:{path:"M22.71,6.29a1,1,0,0,0-1.42,0L20,7.59V2a1,1,0,0,0-2,0V7.59l-1.29-1.3a1,1,0,0,0-1.42,1.42l3,3a1,1,0,0,0,.33.21.94.94,0,0,0,.76,0,1,1,0,0,0,.33-.21l3-3A1,1,0,0,0,22.71,6.29ZM19,13a1,1,0,0,0-1,1v.38L16.52,12.9a2.79,2.79,0,0,0-3.93,0l-.7.7L9.41,11.12a2.85,2.85,0,0,0-3.93,0L4,12.6V7A1,1,0,0,1,5,6h8a1,1,0,0,0,0-2H5A3,3,0,0,0,2,7V19a3,3,0,0,0,3,3H17a3,3,0,0,0,3-3V14A1,1,0,0,0,19,13ZM5,20a1,1,0,0,1-1-1V15.43l2.9-2.9a.79.79,0,0,1,1.09,0l3.17,3.17,0,0L15.46,20Zm13-1a.89.89,0,0,1-.18.53L13.31,15l.7-.7a.77.77,0,0,1,1.1,0L18,17.21Z",width:21,height:21,transform:"translate(-2, -2)"}},ek={data:{candlestick:[{decreasing:{fillcolor:"#e4003a",line:{color:"#e4003a"}},increasing:{fillcolor:"#00ACFF",line:{color:"#00ACFF"}},type:"candlestick"}]},layout:{annotationdefaults:{showarrow:!1},autotypenumbers:"strict",colorway:["#ffed00","#ef7d00","#e4003a","#c13246","#822661","#48277c","#005ca9","#00aaff","#9b30d9","#af005f","#5f00af","#af87ff"],dragmode:"pan",font:{family:"Fira Code",size:18},hoverlabel:{align:"left"},mapbox:{style:"dark"},hovermode:"x",legend:{bgcolor:"rgba(0, 0, 0, 0)",x:.01,xanchor:"left",y:.99,yanchor:"top",font:{size:15}},paper_bgcolor:"#000000",plot_bgcolor:"#000000",xaxis:{automargin:!0,autorange:!0,rangeslider:{visible:!1},showgrid:!0,showline:!0,tickfont:{size:14},zeroline:!1,tick0:1,title:{standoff:20},linecolor:"#F5EFF3",mirror:!0,ticks:"outside"},yaxis:{anchor:"x",automargin:!0,fixedrange:!1,zeroline:!1,showgrid:!0,showline:!0,side:"right",tick0:.5,title:{standoff:20},gridcolor:"#283442",linecolor:"#F5EFF3",mirror:!0,ticks:"outside"}}},tk={data:{barpolar:[{marker:{line:{color:"white",width:.5},pattern:{fillmode:"overlay",size:10,solidity:.2}},type:"barpolar"}],bar:[{error_x:{color:"#2a3f5f"},error_y:{color:"#2a3f5f"},marker:{line:{color:"white",width:.5},pattern:{fillmode:"overlay",size:10,solidity:.2}},type:"bar"}],carpet:[{aaxis:{endlinecolor:"#2a3f5f",gridcolor:"#C8D4E3",linecolor:"#C8D4E3",minorgridcolor:"#C8D4E3",startlinecolor:"#2a3f5f"},baxis:{endlinecolor:"#2a3f5f",gridcolor:"#C8D4E3",linecolor:"#C8D4E3",minorgridcolor:"#C8D4E3",startlinecolor:"#2a3f5f"},type:"carpet"}],choropleth:[{colorbar:{outlinewidth:0,ticks:""},type:"choropleth"}],contourcarpet:[{colorbar:{outlinewidth:0,ticks:""},type:"contourcarpet"}],contour:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"contour"}],heatmapgl:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"heatmapgl"}],heatmap:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"heatmap"}],histogram2dcontour:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"histogram2dcontour"}],histogram2d:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"histogram2d"}],histogram:[{marker:{pattern:{fillmode:"overlay",size:10,solidity:.2}},type:"histogram"}],mesh3d:[{colorbar:{outlinewidth:0,ticks:""},type:"mesh3d"}],parcoords:[{line:{colorbar:{outlinewidth:0,ticks:""}},type:"parcoords"}],pie:[{automargin:!0,type:"pie"}],scatter3d:[{line:{colorbar:{outlinewidth:0,ticks:""}},marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scatter3d"}],scattercarpet:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scattercarpet"}],scattergeo:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scattergeo"}],scattergl:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scattergl"}],scattermapbox:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scattermapbox"}],scatterpolargl:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scatterpolargl"}],scatterpolar:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scatterpolar"}],scatter:[{fillpattern:{fillmode:"overlay",size:10,solidity:.2},type:"scatter"}],scatterternary:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scatterternary"}],surface:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"surface"}],table:[{cells:{fill:{color:"#EBF0F8"},line:{color:"white"}},header:{fill:{color:"#C8D4E3"},line:{color:"white"}},type:"table"}],candlestick:[{decreasing:{fillcolor:"#c80000",line:{color:"#990000"}},increasing:{fillcolor:"#009600",line:{color:"#007500"}},type:"candlestick"}]},layout:{annotationdefaults:{arrowcolor:"#2a3f5f",arrowhead:0,arrowwidth:1,showarrow:!1},autotypenumbers:"strict",coloraxis:{colorbar:{outlinewidth:0,ticks:""}},colorscale:{diverging:[[0,"#8e0152"],[.1,"#c51b7d"],[.2,"#de77ae"],[.3,"#f1b6da"],[.4,"#fde0ef"],[.5,"#f7f7f7"],[.6,"#e6f5d0"],[.7,"#b8e186"],[.8,"#7fbc41"],[.9,"#4d9221"],[1,"#276419"]],sequential:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],sequentialminus:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]]},colorway:["#254495","#c13246","#48277c","#e4003a","#ef7d00","#822661","#ffed00","#00aaff","#9b30d9","#af005f","#5f00af","#af87ff"],font:{color:"#2a3f5f"},geo:{bgcolor:"white",lakecolor:"white",landcolor:"white",showlakes:!0,showland:!0,subunitcolor:"#C8D4E3"},hoverlabel:{align:"left"},hovermode:"x",mapbox:{style:"light"},paper_bgcolor:"white",plot_bgcolor:"white",polar:{angularaxis:{gridcolor:"#EBF0F8",linecolor:"#EBF0F8",ticks:""},bgcolor:"white",radialaxis:{gridcolor:"#EBF0F8",linecolor:"#EBF0F8",ticks:""}},scene:{xaxis:{backgroundcolor:"white",gridcolor:"#DFE8F3",gridwidth:2,linecolor:"#EBF0F8",showbackground:!0,ticks:"",zerolinecolor:"#EBF0F8"},yaxis:{backgroundcolor:"white",gridcolor:"#DFE8F3",gridwidth:2,linecolor:"#EBF0F8",showbackground:!0,ticks:"",zerolinecolor:"#EBF0F8"},zaxis:{backgroundcolor:"white",gridcolor:"#DFE8F3",gridwidth:2,linecolor:"#EBF0F8",showbackground:!0,ticks:"",zerolinecolor:"#EBF0F8"}},shapedefaults:{line:{color:"#2a3f5f"}},ternary:{aaxis:{gridcolor:"#DFE8F3",linecolor:"#A2B1C6",ticks:""},baxis:{gridcolor:"#DFE8F3",linecolor:"#A2B1C6",ticks:""},bgcolor:"white",caxis:{gridcolor:"#DFE8F3",linecolor:"#A2B1C6",ticks:""}},title:{x:.05},xaxis:{automargin:!0,ticks:"outside",zerolinewidth:2,rangeslider:{visible:!1},showgrid:!0,showline:!0,tickfont:{size:15},title:{standoff:20},mirror:!0,zeroline:!1},yaxis:{automargin:!0,ticks:"outside",tickfont:{size:15},zerolinewidth:2,fixedrange:!1,title:{standoff:20},nticks:8,showgrid:!0,showline:!0,side:"right",mirror:!0,zeroline:!1},dragmode:"pan",legend:{bgcolor:"rgba(0, 0, 0, 0)",x:1.03,xanchor:"left",y:.99,yanchor:"top"}}};function Io(){return Io=Object.assign?Object.assign.bind():function(P){for(var F=1;FP.forEach(J=>nk(J,F))}function Yp(...P){return Un.useCallback(mw(...P),P)}function rk(P,F=[]){let J=[];function ce(D,E){const e=Un.createContext(E),_=J.length;J=[...J,E];function w(T){const{scope:y,children:f,...l}=T,t=(y==null?void 0:y[P][_])||e,i=Un.useMemo(()=>l,Object.values(l));return Un.createElement(t.Provider,{value:i},f)}function s(T,y){const f=(y==null?void 0:y[P][_])||e,l=Un.useContext(f);if(l)return l;if(E!==void 0)return E;throw new Error(`\`${T}\` must be used within \`${D}\``)}return w.displayName=D+"Provider",[w,s]}const Pe=()=>{const D=J.map(E=>Un.createContext(E));return function(e){const _=(e==null?void 0:e[P])||D;return Un.useMemo(()=>({[`__scope${P}`]:{...e,[P]:_}}),[e,_])}};return Pe.scopeName=P,[ce,ik(Pe,...F)]}function ik(...P){const F=P[0];if(P.length===1)return F;const J=()=>{const ce=P.map(Pe=>({useScope:Pe(),scopeName:Pe.scopeName}));return function(D){const E=ce.reduce((e,{useScope:_,scopeName:w})=>{const T=_(D)[`__scope${w}`];return{...e,...T}},{});return Un.useMemo(()=>({[`__scope${F.scopeName}`]:E}),[E])}};return J.scopeName=F.scopeName,J}const Uv=globalThis!=null&&globalThis.document?Un.useLayoutEffect:()=>{},ak=z4["useId".toString()]||(()=>{});let ok=0;function Pg(P){const[F,J]=Un.useState(ak());return Uv(()=>{P||J(ce=>ce??String(ok++))},[P]),P||(F?`radix-${F}`:"")}function uf(P){const F=Un.useRef(P);return Un.useEffect(()=>{F.current=P}),Un.useMemo(()=>(...J)=>{var ce;return(ce=F.current)===null||ce===void 0?void 0:ce.call(F,...J)},[])}function sk({prop:P,defaultProp:F,onChange:J=()=>{}}){const[ce,Pe]=lk({defaultProp:F,onChange:J}),D=P!==void 0,E=D?P:ce,e=uf(J),_=Un.useCallback(w=>{if(D){const T=typeof w=="function"?w(P):w;T!==P&&e(T)}else Pe(w)},[D,P,Pe,e]);return[E,_]}function lk({defaultProp:P,onChange:F}){const J=Un.useState(P),[ce]=J,Pe=Un.useRef(ce),D=uf(F);return Un.useEffect(()=>{Pe.current!==ce&&(D(ce),Pe.current=ce)},[ce,Pe,D]),J}const Qm=Un.forwardRef((P,F)=>{const{children:J,...ce}=P,Pe=Un.Children.toArray(J),D=Pe.find(ck);if(D){const E=D.props.children,e=Pe.map(_=>_===D?Un.Children.count(E)>1?Un.Children.only(null):Un.isValidElement(E)?E.props.children:null:_);return Un.createElement(Vv,Io({},ce,{ref:F}),Un.isValidElement(E)?Un.cloneElement(E,void 0,e):null)}return Un.createElement(Vv,Io({},ce,{ref:F}),J)});Qm.displayName="Slot";const Vv=Un.forwardRef((P,F)=>{const{children:J,...ce}=P;return Un.isValidElement(J)?Un.cloneElement(J,{...fk(ce,J.props),ref:mw(F,J.ref)}):Un.Children.count(J)>1?Un.Children.only(null):null});Vv.displayName="SlotClone";const uk=({children:P})=>Un.createElement(Un.Fragment,null,P);function ck(P){return Un.isValidElement(P)&&P.type===uk}function fk(P,F){const J={...F};for(const ce in F){const Pe=P[ce],D=F[ce];/^on[A-Z]/.test(ce)?Pe&&D?J[ce]=(...e)=>{D(...e),Pe(...e)}:Pe&&(J[ce]=Pe):ce==="style"?J[ce]={...Pe,...D}:ce==="className"&&(J[ce]=[Pe,D].filter(Boolean).join(" "))}return{...P,...J}}const hk=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],gh=hk.reduce((P,F)=>{const J=Un.forwardRef((ce,Pe)=>{const{asChild:D,...E}=ce,e=D?Qm:F;return Un.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),Un.createElement(e,Io({},E,{ref:Pe}))});return J.displayName=`Primitive.${F}`,{...P,[F]:J}},{});function pk(P,F){P&&qm.flushSync(()=>P.dispatchEvent(F))}function dk(P,F=globalThis==null?void 0:globalThis.document){const J=uf(P);Un.useEffect(()=>{const ce=Pe=>{Pe.key==="Escape"&&J(Pe)};return F.addEventListener("keydown",ce),()=>F.removeEventListener("keydown",ce)},[J,F])}const Hv="dismissableLayer.update",gk="dismissableLayer.pointerDownOutside",vk="dismissableLayer.focusOutside";let kb;const mk=Un.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),yk=Un.forwardRef((P,F)=>{var J;const{disableOutsidePointerEvents:ce=!1,onEscapeKeyDown:Pe,onPointerDownOutside:D,onFocusOutside:E,onInteractOutside:e,onDismiss:_,...w}=P,s=Un.useContext(mk),[T,y]=Un.useState(null),f=(J=T==null?void 0:T.ownerDocument)!==null&&J!==void 0?J:globalThis==null?void 0:globalThis.document,[,l]=Un.useState({}),t=Yp(F,b=>y(b)),i=Array.from(s.layers),[r]=[...s.layersWithOutsidePointerEventsDisabled].slice(-1),n=i.indexOf(r),o=T?i.indexOf(T):-1,a=s.layersWithOutsidePointerEventsDisabled.size>0,u=o>=n,p=xk(b=>{const d=b.target,v=[...s.branches].some(x=>x.contains(d));!u||v||(D==null||D(b),e==null||e(b),b.defaultPrevented||_==null||_())},f),c=bk(b=>{const d=b.target;[...s.branches].some(x=>x.contains(d))||(E==null||E(b),e==null||e(b),b.defaultPrevented||_==null||_())},f);return dk(b=>{o===s.layers.size-1&&(Pe==null||Pe(b),!b.defaultPrevented&&_&&(b.preventDefault(),_()))},f),Un.useEffect(()=>{if(T)return ce&&(s.layersWithOutsidePointerEventsDisabled.size===0&&(kb=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),s.layersWithOutsidePointerEventsDisabled.add(T)),s.layers.add(T),Ab(),()=>{ce&&s.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=kb)}},[T,f,ce,s]),Un.useEffect(()=>()=>{T&&(s.layers.delete(T),s.layersWithOutsidePointerEventsDisabled.delete(T),Ab())},[T,s]),Un.useEffect(()=>{const b=()=>l({});return document.addEventListener(Hv,b),()=>document.removeEventListener(Hv,b)},[]),Un.createElement(gh.div,Io({},w,{ref:t,style:{pointerEvents:a?u?"auto":"none":void 0,...P.style},onFocusCapture:rf(P.onFocusCapture,c.onFocusCapture),onBlurCapture:rf(P.onBlurCapture,c.onBlurCapture),onPointerDownCapture:rf(P.onPointerDownCapture,p.onPointerDownCapture)}))});function xk(P,F=globalThis==null?void 0:globalThis.document){const J=uf(P),ce=Un.useRef(!1),Pe=Un.useRef(()=>{});return Un.useEffect(()=>{const D=e=>{if(e.target&&!ce.current){let s=function(){yw(gk,J,w,{discrete:!0})};var _=s;const w={originalEvent:e};e.pointerType==="touch"?(F.removeEventListener("click",Pe.current),Pe.current=s,F.addEventListener("click",Pe.current,{once:!0})):s()}ce.current=!1},E=window.setTimeout(()=>{F.addEventListener("pointerdown",D)},0);return()=>{window.clearTimeout(E),F.removeEventListener("pointerdown",D),F.removeEventListener("click",Pe.current)}},[F,J]),{onPointerDownCapture:()=>ce.current=!0}}function bk(P,F=globalThis==null?void 0:globalThis.document){const J=uf(P),ce=Un.useRef(!1);return Un.useEffect(()=>{const Pe=D=>{D.target&&!ce.current&&yw(vk,J,{originalEvent:D},{discrete:!1})};return F.addEventListener("focusin",Pe),()=>F.removeEventListener("focusin",Pe)},[F,J]),{onFocusCapture:()=>ce.current=!0,onBlurCapture:()=>ce.current=!1}}function Ab(){const P=new CustomEvent(Hv);document.dispatchEvent(P)}function yw(P,F,J,{discrete:ce}){const Pe=J.originalEvent.target,D=new CustomEvent(P,{bubbles:!1,cancelable:!0,detail:J});F&&Pe.addEventListener(P,F,{once:!0}),ce?pk(Pe,D):Pe.dispatchEvent(D)}const Og="focusScope.autoFocusOnMount",Ig="focusScope.autoFocusOnUnmount",Mb={bubbles:!1,cancelable:!0},_k=Un.forwardRef((P,F)=>{const{loop:J=!1,trapped:ce=!1,onMountAutoFocus:Pe,onUnmountAutoFocus:D,...E}=P,[e,_]=Un.useState(null),w=uf(Pe),s=uf(D),T=Un.useRef(null),y=Yp(F,t=>_(t)),f=Un.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;Un.useEffect(()=>{if(ce){let r=function(o){if(f.paused||!e)return;const a=o.target;e.contains(a)?T.current=a:Zc(T.current,{select:!0})},n=function(o){f.paused||!e||e.contains(o.relatedTarget)||Zc(T.current,{select:!0})};var t=r,i=n;return document.addEventListener("focusin",r),document.addEventListener("focusout",n),()=>{document.removeEventListener("focusin",r),document.removeEventListener("focusout",n)}}},[ce,e,f.paused]),Un.useEffect(()=>{if(e){Eb.add(f);const t=document.activeElement;if(!e.contains(t)){const r=new CustomEvent(Og,Mb);e.addEventListener(Og,w),e.dispatchEvent(r),r.defaultPrevented||(wk(Sk(xw(e)),{select:!0}),document.activeElement===t&&Zc(e))}return()=>{e.removeEventListener(Og,w),setTimeout(()=>{const r=new CustomEvent(Ig,Mb);e.addEventListener(Ig,s),e.dispatchEvent(r),r.defaultPrevented||Zc(t??document.body,{select:!0}),e.removeEventListener(Ig,s),Eb.remove(f)},0)}}},[e,w,s,f]);const l=Un.useCallback(t=>{if(!J&&!ce||f.paused)return;const i=t.key==="Tab"&&!t.altKey&&!t.ctrlKey&&!t.metaKey,r=document.activeElement;if(i&&r){const n=t.currentTarget,[o,a]=Tk(n);o&&a?!t.shiftKey&&r===a?(t.preventDefault(),J&&Zc(o,{select:!0})):t.shiftKey&&r===o&&(t.preventDefault(),J&&Zc(a,{select:!0})):r===n&&t.preventDefault()}},[J,ce,f.paused]);return Un.createElement(gh.div,Io({tabIndex:-1},E,{ref:y,onKeyDown:l}))});function wk(P,{select:F=!1}={}){const J=document.activeElement;for(const ce of P)if(Zc(ce,{select:F}),document.activeElement!==J)return}function Tk(P){const F=xw(P),J=Sb(F,P),ce=Sb(F.reverse(),P);return[J,ce]}function xw(P){const F=[],J=document.createTreeWalker(P,NodeFilter.SHOW_ELEMENT,{acceptNode:ce=>{const Pe=ce.tagName==="INPUT"&&ce.type==="hidden";return ce.disabled||ce.hidden||Pe?NodeFilter.FILTER_SKIP:ce.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;J.nextNode();)F.push(J.currentNode);return F}function Sb(P,F){for(const J of P)if(!kk(J,{upTo:F}))return J}function kk(P,{upTo:F}){if(getComputedStyle(P).visibility==="hidden")return!0;for(;P;){if(F!==void 0&&P===F)return!1;if(getComputedStyle(P).display==="none")return!0;P=P.parentElement}return!1}function Ak(P){return P instanceof HTMLInputElement&&"select"in P}function Zc(P,{select:F=!1}={}){if(P&&P.focus){const J=document.activeElement;P.focus({preventScroll:!0}),P!==J&&Ak(P)&&F&&P.select()}}const Eb=Mk();function Mk(){let P=[];return{add(F){const J=P[0];F!==J&&(J==null||J.pause()),P=Cb(P,F),P.unshift(F)},remove(F){var J;P=Cb(P,F),(J=P[0])===null||J===void 0||J.resume()}}}function Cb(P,F){const J=[...P],ce=J.indexOf(F);return ce!==-1&&J.splice(ce,1),J}function Sk(P){return P.filter(F=>F.tagName!=="A")}function Ek(P,F){return Un.useReducer((J,ce)=>{const Pe=F[J][ce];return Pe??J},P)}const ey=P=>{const{present:F,children:J}=P,ce=Ck(F),Pe=typeof J=="function"?J({present:ce.isPresent}):Un.Children.only(J),D=Yp(ce.ref,Pe.ref);return typeof J=="function"||ce.isPresent?Un.cloneElement(Pe,{ref:D}):null};ey.displayName="Presence";function Ck(P){const[F,J]=Un.useState(),ce=Un.useRef({}),Pe=Un.useRef(P),D=Un.useRef("none"),E=P?"mounted":"unmounted",[e,_]=Ek(E,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Un.useEffect(()=>{const w=Jd(ce.current);D.current=e==="mounted"?w:"none"},[e]),Uv(()=>{const w=ce.current,s=Pe.current;if(s!==P){const y=D.current,f=Jd(w);P?_("MOUNT"):f==="none"||(w==null?void 0:w.display)==="none"?_("UNMOUNT"):_(s&&y!==f?"ANIMATION_OUT":"UNMOUNT"),Pe.current=P}},[P,_]),Uv(()=>{if(F){const w=T=>{const f=Jd(ce.current).includes(T.animationName);T.target===F&&f&&qm.flushSync(()=>_("ANIMATION_END"))},s=T=>{T.target===F&&(D.current=Jd(ce.current))};return F.addEventListener("animationstart",s),F.addEventListener("animationcancel",w),F.addEventListener("animationend",w),()=>{F.removeEventListener("animationstart",s),F.removeEventListener("animationcancel",w),F.removeEventListener("animationend",w)}}else _("ANIMATION_END")},[F,_]),{isPresent:["mounted","unmountSuspended"].includes(e),ref:Un.useCallback(w=>{w&&(ce.current=getComputedStyle(w)),J(w)},[])}}function Jd(P){return(P==null?void 0:P.animationName)||"none"}let Rg=0;function Lk(){Un.useEffect(()=>{var P,F;const J=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(P=J[0])!==null&&P!==void 0?P:Lb()),document.body.insertAdjacentElement("beforeend",(F=J[1])!==null&&F!==void 0?F:Lb()),Rg++,()=>{Rg===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(ce=>ce.remove()),Rg--}},[])}function Lb(){const P=document.createElement("span");return P.setAttribute("data-radix-focus-guard",""),P.tabIndex=0,P.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",P}var iu=function(){return iu=Object.assign||function(F){for(var J,ce=1,Pe=arguments.length;ce"u")return Zk;var F=Yk(P),J=document.documentElement.clientWidth,ce=window.innerWidth;return{left:F[0],top:F[1],right:F[2],gap:Math.max(0,ce-J+F[2]-F[0])}},$k=Tw(),Jk=function(P,F,J,ce){var Pe=P.left,D=P.top,E=P.right,e=P.gap;return J===void 0&&(J="margin"),` + l20.487-68.598h38.599L427.518,380.583z`,width:550,height:550,transform:"translate(4, 0)"},downloadImage:{path:"M22.71,6.29a1,1,0,0,0-1.42,0L20,7.59V2a1,1,0,0,0-2,0V7.59l-1.29-1.3a1,1,0,0,0-1.42,1.42l3,3a1,1,0,0,0,.33.21.94.94,0,0,0,.76,0,1,1,0,0,0,.33-.21l3-3A1,1,0,0,0,22.71,6.29ZM19,13a1,1,0,0,0-1,1v.38L16.52,12.9a2.79,2.79,0,0,0-3.93,0l-.7.7L9.41,11.12a2.85,2.85,0,0,0-3.93,0L4,12.6V7A1,1,0,0,1,5,6h8a1,1,0,0,0,0-2H5A3,3,0,0,0,2,7V19a3,3,0,0,0,3,3H17a3,3,0,0,0,3-3V14A1,1,0,0,0,19,13ZM5,20a1,1,0,0,1-1-1V15.43l2.9-2.9a.79.79,0,0,1,1.09,0l3.17,3.17,0,0L15.46,20Zm13-1a.89.89,0,0,1-.18.53L13.31,15l.7-.7a.77.77,0,0,1,1.1,0L18,17.21Z",width:21,height:21,transform:"translate(-2, -2)"}},ek={data:{candlestick:[{decreasing:{fillcolor:"#e4003a",line:{color:"#e4003a"}},increasing:{fillcolor:"#00ACFF",line:{color:"#00ACFF"}},type:"candlestick"}]},layout:{annotationdefaults:{showarrow:!1},autotypenumbers:"strict",colorway:["#ffed00","#ef7d00","#e4003a","#c13246","#822661","#48277c","#005ca9","#00aaff","#9b30d9","#af005f","#5f00af","#af87ff"],dragmode:"pan",font:{family:"Fira Code",size:18},hoverlabel:{align:"left"},mapbox:{style:"dark"},hovermode:"x",legend:{bgcolor:"rgba(0, 0, 0, 0)",x:.01,xanchor:"left",y:.99,yanchor:"top",font:{size:15}},paper_bgcolor:"#000000",plot_bgcolor:"#000000",xaxis:{automargin:!0,autorange:!0,rangeslider:{visible:!1},showgrid:!0,showline:!0,tickfont:{size:14},zeroline:!1,tick0:1,title:{standoff:20},linecolor:"#F5EFF3",mirror:!0,ticks:"outside"},yaxis:{anchor:"x",automargin:!0,fixedrange:!1,zeroline:!1,showgrid:!0,showline:!0,side:"right",tick0:.5,title:{standoff:20},gridcolor:"#283442",linecolor:"#F5EFF3",mirror:!0,ticks:"outside"}}},tk={data:{barpolar:[{marker:{line:{color:"white",width:.5},pattern:{fillmode:"overlay",size:10,solidity:.2}},type:"barpolar"}],bar:[{error_x:{color:"#2a3f5f"},error_y:{color:"#2a3f5f"},marker:{line:{color:"white",width:.5},pattern:{fillmode:"overlay",size:10,solidity:.2}},type:"bar"}],carpet:[{aaxis:{endlinecolor:"#2a3f5f",gridcolor:"#C8D4E3",linecolor:"#C8D4E3",minorgridcolor:"#C8D4E3",startlinecolor:"#2a3f5f"},baxis:{endlinecolor:"#2a3f5f",gridcolor:"#C8D4E3",linecolor:"#C8D4E3",minorgridcolor:"#C8D4E3",startlinecolor:"#2a3f5f"},type:"carpet"}],choropleth:[{colorbar:{outlinewidth:0,ticks:""},type:"choropleth"}],contourcarpet:[{colorbar:{outlinewidth:0,ticks:""},type:"contourcarpet"}],contour:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"contour"}],heatmapgl:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"heatmapgl"}],heatmap:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"heatmap"}],histogram2dcontour:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"histogram2dcontour"}],histogram2d:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"histogram2d"}],histogram:[{marker:{pattern:{fillmode:"overlay",size:10,solidity:.2}},type:"histogram"}],mesh3d:[{colorbar:{outlinewidth:0,ticks:""},type:"mesh3d"}],parcoords:[{line:{colorbar:{outlinewidth:0,ticks:""}},type:"parcoords"}],pie:[{automargin:!0,type:"pie"}],scatter3d:[{line:{colorbar:{outlinewidth:0,ticks:""}},marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scatter3d"}],scattercarpet:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scattercarpet"}],scattergeo:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scattergeo"}],scattergl:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scattergl"}],scattermapbox:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scattermapbox"}],scatterpolargl:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scatterpolargl"}],scatterpolar:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scatterpolar"}],scatter:[{fillpattern:{fillmode:"overlay",size:10,solidity:.2},type:"scatter"}],scatterternary:[{marker:{colorbar:{outlinewidth:0,ticks:""}},type:"scatterternary"}],surface:[{colorbar:{outlinewidth:0,ticks:""},colorscale:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],type:"surface"}],table:[{cells:{fill:{color:"#EBF0F8"},line:{color:"white"}},header:{fill:{color:"#C8D4E3"},line:{color:"white"}},type:"table"}],candlestick:[{decreasing:{fillcolor:"#c80000",line:{color:"#990000"}},increasing:{fillcolor:"#009600",line:{color:"#007500"}},type:"candlestick"}]},layout:{annotationdefaults:{arrowcolor:"#2a3f5f",arrowhead:0,arrowwidth:1,showarrow:!1},autotypenumbers:"strict",coloraxis:{colorbar:{outlinewidth:0,ticks:""}},colorscale:{diverging:[[0,"#8e0152"],[.1,"#c51b7d"],[.2,"#de77ae"],[.3,"#f1b6da"],[.4,"#fde0ef"],[.5,"#f7f7f7"],[.6,"#e6f5d0"],[.7,"#b8e186"],[.8,"#7fbc41"],[.9,"#4d9221"],[1,"#276419"]],sequential:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]],sequentialminus:[[0,"#0d0887"],[.1111111111111111,"#46039f"],[.2222222222222222,"#7201a8"],[.3333333333333333,"#9c179e"],[.4444444444444444,"#bd3786"],[.5555555555555556,"#d8576b"],[.6666666666666666,"#ed7953"],[.7777777777777778,"#fb9f3a"],[.8888888888888888,"#fdca26"],[1,"#f0f921"]]},colorway:["#254495","#c13246","#48277c","#e4003a","#ef7d00","#822661","#ffed00","#00aaff","#9b30d9","#af005f","#5f00af","#af87ff"],font:{color:"#2a3f5f"},geo:{bgcolor:"white",lakecolor:"white",landcolor:"white",showlakes:!0,showland:!0,subunitcolor:"#C8D4E3"},hoverlabel:{align:"left"},hovermode:"x",mapbox:{style:"light"},paper_bgcolor:"white",plot_bgcolor:"white",polar:{angularaxis:{gridcolor:"#EBF0F8",linecolor:"#EBF0F8",ticks:""},bgcolor:"white",radialaxis:{gridcolor:"#EBF0F8",linecolor:"#EBF0F8",ticks:""}},scene:{xaxis:{backgroundcolor:"white",gridcolor:"#DFE8F3",gridwidth:2,linecolor:"#EBF0F8",showbackground:!0,ticks:"",zerolinecolor:"#EBF0F8"},yaxis:{backgroundcolor:"white",gridcolor:"#DFE8F3",gridwidth:2,linecolor:"#EBF0F8",showbackground:!0,ticks:"",zerolinecolor:"#EBF0F8"},zaxis:{backgroundcolor:"white",gridcolor:"#DFE8F3",gridwidth:2,linecolor:"#EBF0F8",showbackground:!0,ticks:"",zerolinecolor:"#EBF0F8"}},shapedefaults:{line:{color:"#2a3f5f"}},ternary:{aaxis:{gridcolor:"#DFE8F3",linecolor:"#A2B1C6",ticks:""},baxis:{gridcolor:"#DFE8F3",linecolor:"#A2B1C6",ticks:""},bgcolor:"white",caxis:{gridcolor:"#DFE8F3",linecolor:"#A2B1C6",ticks:""}},title:{x:.05},xaxis:{automargin:!0,ticks:"outside",zerolinewidth:2,rangeslider:{visible:!1},showgrid:!0,showline:!0,tickfont:{size:15},title:{standoff:20},mirror:!0,zeroline:!1},yaxis:{automargin:!0,ticks:"outside",tickfont:{size:15},zerolinewidth:2,fixedrange:!1,title:{standoff:20},nticks:8,showgrid:!0,showline:!0,side:"right",mirror:!0,zeroline:!1},dragmode:"pan",legend:{bgcolor:"rgba(0, 0, 0, 0)",x:1.03,xanchor:"left",y:.99,yanchor:"top"}}};function Io(){return Io=Object.assign?Object.assign.bind():function(P){for(var F=1;FP.forEach(J=>nk(J,F))}function Yp(...P){return Un.useCallback(mw(...P),P)}function rk(P,F=[]){let J=[];function ce(D,E){const e=Un.createContext(E),_=J.length;J=[...J,E];function w(T){const{scope:m,children:f,...l}=T,t=(m==null?void 0:m[P][_])||e,i=Un.useMemo(()=>l,Object.values(l));return Un.createElement(t.Provider,{value:i},f)}function s(T,m){const f=(m==null?void 0:m[P][_])||e,l=Un.useContext(f);if(l)return l;if(E!==void 0)return E;throw new Error(`\`${T}\` must be used within \`${D}\``)}return w.displayName=D+"Provider",[w,s]}const Pe=()=>{const D=J.map(E=>Un.createContext(E));return function(e){const _=(e==null?void 0:e[P])||D;return Un.useMemo(()=>({[`__scope${P}`]:{...e,[P]:_}}),[e,_])}};return Pe.scopeName=P,[ce,ik(Pe,...F)]}function ik(...P){const F=P[0];if(P.length===1)return F;const J=()=>{const ce=P.map(Pe=>({useScope:Pe(),scopeName:Pe.scopeName}));return function(D){const E=ce.reduce((e,{useScope:_,scopeName:w})=>{const T=_(D)[`__scope${w}`];return{...e,...T}},{});return Un.useMemo(()=>({[`__scope${F.scopeName}`]:E}),[E])}};return J.scopeName=F.scopeName,J}const Uv=globalThis!=null&&globalThis.document?Un.useLayoutEffect:()=>{},ak=z4["useId".toString()]||(()=>{});let ok=0;function Pg(P){const[F,J]=Un.useState(ak());return Uv(()=>{P||J(ce=>ce??String(ok++))},[P]),P||(F?`radix-${F}`:"")}function uf(P){const F=Un.useRef(P);return Un.useEffect(()=>{F.current=P}),Un.useMemo(()=>(...J)=>{var ce;return(ce=F.current)===null||ce===void 0?void 0:ce.call(F,...J)},[])}function sk({prop:P,defaultProp:F,onChange:J=()=>{}}){const[ce,Pe]=lk({defaultProp:F,onChange:J}),D=P!==void 0,E=D?P:ce,e=uf(J),_=Un.useCallback(w=>{if(D){const T=typeof w=="function"?w(P):w;T!==P&&e(T)}else Pe(w)},[D,P,Pe,e]);return[E,_]}function lk({defaultProp:P,onChange:F}){const J=Un.useState(P),[ce]=J,Pe=Un.useRef(ce),D=uf(F);return Un.useEffect(()=>{Pe.current!==ce&&(D(ce),Pe.current=ce)},[ce,Pe,D]),J}const Qm=Un.forwardRef((P,F)=>{const{children:J,...ce}=P,Pe=Un.Children.toArray(J),D=Pe.find(ck);if(D){const E=D.props.children,e=Pe.map(_=>_===D?Un.Children.count(E)>1?Un.Children.only(null):Un.isValidElement(E)?E.props.children:null:_);return Un.createElement(Vv,Io({},ce,{ref:F}),Un.isValidElement(E)?Un.cloneElement(E,void 0,e):null)}return Un.createElement(Vv,Io({},ce,{ref:F}),J)});Qm.displayName="Slot";const Vv=Un.forwardRef((P,F)=>{const{children:J,...ce}=P;return Un.isValidElement(J)?Un.cloneElement(J,{...fk(ce,J.props),ref:mw(F,J.ref)}):Un.Children.count(J)>1?Un.Children.only(null):null});Vv.displayName="SlotClone";const uk=({children:P})=>Un.createElement(Un.Fragment,null,P);function ck(P){return Un.isValidElement(P)&&P.type===uk}function fk(P,F){const J={...F};for(const ce in F){const Pe=P[ce],D=F[ce];/^on[A-Z]/.test(ce)?Pe&&D?J[ce]=(...e)=>{D(...e),Pe(...e)}:Pe&&(J[ce]=Pe):ce==="style"?J[ce]={...Pe,...D}:ce==="className"&&(J[ce]=[Pe,D].filter(Boolean).join(" "))}return{...P,...J}}const hk=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],gh=hk.reduce((P,F)=>{const J=Un.forwardRef((ce,Pe)=>{const{asChild:D,...E}=ce,e=D?Qm:F;return Un.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),Un.createElement(e,Io({},E,{ref:Pe}))});return J.displayName=`Primitive.${F}`,{...P,[F]:J}},{});function pk(P,F){P&&qm.flushSync(()=>P.dispatchEvent(F))}function dk(P,F=globalThis==null?void 0:globalThis.document){const J=uf(P);Un.useEffect(()=>{const ce=Pe=>{Pe.key==="Escape"&&J(Pe)};return F.addEventListener("keydown",ce),()=>F.removeEventListener("keydown",ce)},[J,F])}const Hv="dismissableLayer.update",gk="dismissableLayer.pointerDownOutside",vk="dismissableLayer.focusOutside";let kb;const mk=Un.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),yk=Un.forwardRef((P,F)=>{var J;const{disableOutsidePointerEvents:ce=!1,onEscapeKeyDown:Pe,onPointerDownOutside:D,onFocusOutside:E,onInteractOutside:e,onDismiss:_,...w}=P,s=Un.useContext(mk),[T,m]=Un.useState(null),f=(J=T==null?void 0:T.ownerDocument)!==null&&J!==void 0?J:globalThis==null?void 0:globalThis.document,[,l]=Un.useState({}),t=Yp(F,b=>m(b)),i=Array.from(s.layers),[r]=[...s.layersWithOutsidePointerEventsDisabled].slice(-1),n=i.indexOf(r),o=T?i.indexOf(T):-1,a=s.layersWithOutsidePointerEventsDisabled.size>0,u=o>=n,p=xk(b=>{const d=b.target,v=[...s.branches].some(x=>x.contains(d));!u||v||(D==null||D(b),e==null||e(b),b.defaultPrevented||_==null||_())},f),c=bk(b=>{const d=b.target;[...s.branches].some(x=>x.contains(d))||(E==null||E(b),e==null||e(b),b.defaultPrevented||_==null||_())},f);return dk(b=>{o===s.layers.size-1&&(Pe==null||Pe(b),!b.defaultPrevented&&_&&(b.preventDefault(),_()))},f),Un.useEffect(()=>{if(T)return ce&&(s.layersWithOutsidePointerEventsDisabled.size===0&&(kb=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),s.layersWithOutsidePointerEventsDisabled.add(T)),s.layers.add(T),Ab(),()=>{ce&&s.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=kb)}},[T,f,ce,s]),Un.useEffect(()=>()=>{T&&(s.layers.delete(T),s.layersWithOutsidePointerEventsDisabled.delete(T),Ab())},[T,s]),Un.useEffect(()=>{const b=()=>l({});return document.addEventListener(Hv,b),()=>document.removeEventListener(Hv,b)},[]),Un.createElement(gh.div,Io({},w,{ref:t,style:{pointerEvents:a?u?"auto":"none":void 0,...P.style},onFocusCapture:rf(P.onFocusCapture,c.onFocusCapture),onBlurCapture:rf(P.onBlurCapture,c.onBlurCapture),onPointerDownCapture:rf(P.onPointerDownCapture,p.onPointerDownCapture)}))});function xk(P,F=globalThis==null?void 0:globalThis.document){const J=uf(P),ce=Un.useRef(!1),Pe=Un.useRef(()=>{});return Un.useEffect(()=>{const D=e=>{if(e.target&&!ce.current){let s=function(){yw(gk,J,w,{discrete:!0})};var _=s;const w={originalEvent:e};e.pointerType==="touch"?(F.removeEventListener("click",Pe.current),Pe.current=s,F.addEventListener("click",Pe.current,{once:!0})):s()}ce.current=!1},E=window.setTimeout(()=>{F.addEventListener("pointerdown",D)},0);return()=>{window.clearTimeout(E),F.removeEventListener("pointerdown",D),F.removeEventListener("click",Pe.current)}},[F,J]),{onPointerDownCapture:()=>ce.current=!0}}function bk(P,F=globalThis==null?void 0:globalThis.document){const J=uf(P),ce=Un.useRef(!1);return Un.useEffect(()=>{const Pe=D=>{D.target&&!ce.current&&yw(vk,J,{originalEvent:D},{discrete:!1})};return F.addEventListener("focusin",Pe),()=>F.removeEventListener("focusin",Pe)},[F,J]),{onFocusCapture:()=>ce.current=!0,onBlurCapture:()=>ce.current=!1}}function Ab(){const P=new CustomEvent(Hv);document.dispatchEvent(P)}function yw(P,F,J,{discrete:ce}){const Pe=J.originalEvent.target,D=new CustomEvent(P,{bubbles:!1,cancelable:!0,detail:J});F&&Pe.addEventListener(P,F,{once:!0}),ce?pk(Pe,D):Pe.dispatchEvent(D)}const Og="focusScope.autoFocusOnMount",Ig="focusScope.autoFocusOnUnmount",Mb={bubbles:!1,cancelable:!0},_k=Un.forwardRef((P,F)=>{const{loop:J=!1,trapped:ce=!1,onMountAutoFocus:Pe,onUnmountAutoFocus:D,...E}=P,[e,_]=Un.useState(null),w=uf(Pe),s=uf(D),T=Un.useRef(null),m=Yp(F,t=>_(t)),f=Un.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;Un.useEffect(()=>{if(ce){let r=function(o){if(f.paused||!e)return;const a=o.target;e.contains(a)?T.current=a:Zc(T.current,{select:!0})},n=function(o){f.paused||!e||e.contains(o.relatedTarget)||Zc(T.current,{select:!0})};var t=r,i=n;return document.addEventListener("focusin",r),document.addEventListener("focusout",n),()=>{document.removeEventListener("focusin",r),document.removeEventListener("focusout",n)}}},[ce,e,f.paused]),Un.useEffect(()=>{if(e){Eb.add(f);const t=document.activeElement;if(!e.contains(t)){const r=new CustomEvent(Og,Mb);e.addEventListener(Og,w),e.dispatchEvent(r),r.defaultPrevented||(wk(Sk(xw(e)),{select:!0}),document.activeElement===t&&Zc(e))}return()=>{e.removeEventListener(Og,w),setTimeout(()=>{const r=new CustomEvent(Ig,Mb);e.addEventListener(Ig,s),e.dispatchEvent(r),r.defaultPrevented||Zc(t??document.body,{select:!0}),e.removeEventListener(Ig,s),Eb.remove(f)},0)}}},[e,w,s,f]);const l=Un.useCallback(t=>{if(!J&&!ce||f.paused)return;const i=t.key==="Tab"&&!t.altKey&&!t.ctrlKey&&!t.metaKey,r=document.activeElement;if(i&&r){const n=t.currentTarget,[o,a]=Tk(n);o&&a?!t.shiftKey&&r===a?(t.preventDefault(),J&&Zc(o,{select:!0})):t.shiftKey&&r===o&&(t.preventDefault(),J&&Zc(a,{select:!0})):r===n&&t.preventDefault()}},[J,ce,f.paused]);return Un.createElement(gh.div,Io({tabIndex:-1},E,{ref:m,onKeyDown:l}))});function wk(P,{select:F=!1}={}){const J=document.activeElement;for(const ce of P)if(Zc(ce,{select:F}),document.activeElement!==J)return}function Tk(P){const F=xw(P),J=Sb(F,P),ce=Sb(F.reverse(),P);return[J,ce]}function xw(P){const F=[],J=document.createTreeWalker(P,NodeFilter.SHOW_ELEMENT,{acceptNode:ce=>{const Pe=ce.tagName==="INPUT"&&ce.type==="hidden";return ce.disabled||ce.hidden||Pe?NodeFilter.FILTER_SKIP:ce.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;J.nextNode();)F.push(J.currentNode);return F}function Sb(P,F){for(const J of P)if(!kk(J,{upTo:F}))return J}function kk(P,{upTo:F}){if(getComputedStyle(P).visibility==="hidden")return!0;for(;P;){if(F!==void 0&&P===F)return!1;if(getComputedStyle(P).display==="none")return!0;P=P.parentElement}return!1}function Ak(P){return P instanceof HTMLInputElement&&"select"in P}function Zc(P,{select:F=!1}={}){if(P&&P.focus){const J=document.activeElement;P.focus({preventScroll:!0}),P!==J&&Ak(P)&&F&&P.select()}}const Eb=Mk();function Mk(){let P=[];return{add(F){const J=P[0];F!==J&&(J==null||J.pause()),P=Cb(P,F),P.unshift(F)},remove(F){var J;P=Cb(P,F),(J=P[0])===null||J===void 0||J.resume()}}}function Cb(P,F){const J=[...P],ce=J.indexOf(F);return ce!==-1&&J.splice(ce,1),J}function Sk(P){return P.filter(F=>F.tagName!=="A")}function Ek(P,F){return Un.useReducer((J,ce)=>{const Pe=F[J][ce];return Pe??J},P)}const ey=P=>{const{present:F,children:J}=P,ce=Ck(F),Pe=typeof J=="function"?J({present:ce.isPresent}):Un.Children.only(J),D=Yp(ce.ref,Pe.ref);return typeof J=="function"||ce.isPresent?Un.cloneElement(Pe,{ref:D}):null};ey.displayName="Presence";function Ck(P){const[F,J]=Un.useState(),ce=Un.useRef({}),Pe=Un.useRef(P),D=Un.useRef("none"),E=P?"mounted":"unmounted",[e,_]=Ek(E,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Un.useEffect(()=>{const w=Jd(ce.current);D.current=e==="mounted"?w:"none"},[e]),Uv(()=>{const w=ce.current,s=Pe.current;if(s!==P){const m=D.current,f=Jd(w);P?_("MOUNT"):f==="none"||(w==null?void 0:w.display)==="none"?_("UNMOUNT"):_(s&&m!==f?"ANIMATION_OUT":"UNMOUNT"),Pe.current=P}},[P,_]),Uv(()=>{if(F){const w=T=>{const f=Jd(ce.current).includes(T.animationName);T.target===F&&f&&qm.flushSync(()=>_("ANIMATION_END"))},s=T=>{T.target===F&&(D.current=Jd(ce.current))};return F.addEventListener("animationstart",s),F.addEventListener("animationcancel",w),F.addEventListener("animationend",w),()=>{F.removeEventListener("animationstart",s),F.removeEventListener("animationcancel",w),F.removeEventListener("animationend",w)}}else _("ANIMATION_END")},[F,_]),{isPresent:["mounted","unmountSuspended"].includes(e),ref:Un.useCallback(w=>{w&&(ce.current=getComputedStyle(w)),J(w)},[])}}function Jd(P){return(P==null?void 0:P.animationName)||"none"}let Rg=0;function Lk(){Un.useEffect(()=>{var P,F;const J=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(P=J[0])!==null&&P!==void 0?P:Lb()),document.body.insertAdjacentElement("beforeend",(F=J[1])!==null&&F!==void 0?F:Lb()),Rg++,()=>{Rg===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(ce=>ce.remove()),Rg--}},[])}function Lb(){const P=document.createElement("span");return P.setAttribute("data-radix-focus-guard",""),P.tabIndex=0,P.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",P}var iu=function(){return iu=Object.assign||function(F){for(var J,ce=1,Pe=arguments.length;ce"u")return Zk;var F=Yk(P),J=document.documentElement.clientWidth,ce=window.innerWidth;return{left:F[0],top:F[1],right:F[2],gap:Math.max(0,ce-J+F[2]-F[0])}},$k=Tw(),Jk=function(P,F,J,ce){var Pe=P.left,D=P.top,E=P.right,e=P.gap;return J===void 0&&(J="margin"),` .`.concat(Ok,` { overflow: hidden `).concat(ce,`; padding-right: `).concat(e,"px ").concat(ce,`; @@ -3691,14 +3691,14 @@ body { `).concat(Ik,": ").concat(e,`px; } -`)},Kk=function(P){var F=P.noRelative,J=P.noImportant,ce=P.gapMode,Pe=ce===void 0?"margin":ce,D=Un.useMemo(function(){return Xk(Pe)},[Pe]);return Un.createElement($k,{styles:Jk(D,!F,Pe,J?"":"!important")})},qv=!1;if(typeof window<"u")try{var Kd=Object.defineProperty({},"passive",{get:function(){return qv=!0,!0}});window.addEventListener("test",Kd,Kd),window.removeEventListener("test",Kd,Kd)}catch{qv=!1}var zf=qv?{passive:!1}:!1,Qk=function(P){return P.tagName==="TEXTAREA"},kw=function(P,F){var J=window.getComputedStyle(P);return J[F]!=="hidden"&&!(J.overflowY===J.overflowX&&!Qk(P)&&J[F]==="visible")},e7=function(P){return kw(P,"overflowY")},t7=function(P){return kw(P,"overflowX")},Ob=function(P,F){var J=F;do{typeof ShadowRoot<"u"&&J instanceof ShadowRoot&&(J=J.host);var ce=Aw(P,J);if(ce){var Pe=Mw(P,J),D=Pe[1],E=Pe[2];if(D>E)return!0}J=J.parentNode}while(J&&J!==document.body);return!1},n7=function(P){var F=P.scrollTop,J=P.scrollHeight,ce=P.clientHeight;return[F,J,ce]},r7=function(P){var F=P.scrollLeft,J=P.scrollWidth,ce=P.clientWidth;return[F,J,ce]},Aw=function(P,F){return P==="v"?e7(F):t7(F)},Mw=function(P,F){return P==="v"?n7(F):r7(F)},i7=function(P,F){return P==="h"&&F==="rtl"?-1:1},a7=function(P,F,J,ce,Pe){var D=i7(P,window.getComputedStyle(F).direction),E=D*ce,e=J.target,_=F.contains(e),w=!1,s=E>0,T=0,y=0;do{var f=Mw(P,e),l=f[0],t=f[1],i=f[2],r=t-i-D*l;(l||r)&&Aw(P,e)&&(T+=r,y+=l),e=e.parentNode}while(!_&&e!==document.body||_&&(F.contains(e)||F===e));return(s&&(Pe&&T===0||!Pe&&E>T)||!s&&(Pe&&y===0||!Pe&&-E>y))&&(w=!0),w},Qd=function(P){return"changedTouches"in P?[P.changedTouches[0].clientX,P.changedTouches[0].clientY]:[0,0]},Ib=function(P){return[P.deltaX,P.deltaY]},Rb=function(P){return P&&"current"in P?P.current:P},o7=function(P,F){return P[0]===F[0]&&P[1]===F[1]},s7=function(P){return` +`)},Kk=function(P){var F=P.noRelative,J=P.noImportant,ce=P.gapMode,Pe=ce===void 0?"margin":ce,D=Un.useMemo(function(){return Xk(Pe)},[Pe]);return Un.createElement($k,{styles:Jk(D,!F,Pe,J?"":"!important")})},qv=!1;if(typeof window<"u")try{var Kd=Object.defineProperty({},"passive",{get:function(){return qv=!0,!0}});window.addEventListener("test",Kd,Kd),window.removeEventListener("test",Kd,Kd)}catch{qv=!1}var zf=qv?{passive:!1}:!1,Qk=function(P){return P.tagName==="TEXTAREA"},kw=function(P,F){var J=window.getComputedStyle(P);return J[F]!=="hidden"&&!(J.overflowY===J.overflowX&&!Qk(P)&&J[F]==="visible")},e7=function(P){return kw(P,"overflowY")},t7=function(P){return kw(P,"overflowX")},Ob=function(P,F){var J=F;do{typeof ShadowRoot<"u"&&J instanceof ShadowRoot&&(J=J.host);var ce=Aw(P,J);if(ce){var Pe=Mw(P,J),D=Pe[1],E=Pe[2];if(D>E)return!0}J=J.parentNode}while(J&&J!==document.body);return!1},n7=function(P){var F=P.scrollTop,J=P.scrollHeight,ce=P.clientHeight;return[F,J,ce]},r7=function(P){var F=P.scrollLeft,J=P.scrollWidth,ce=P.clientWidth;return[F,J,ce]},Aw=function(P,F){return P==="v"?e7(F):t7(F)},Mw=function(P,F){return P==="v"?n7(F):r7(F)},i7=function(P,F){return P==="h"&&F==="rtl"?-1:1},a7=function(P,F,J,ce,Pe){var D=i7(P,window.getComputedStyle(F).direction),E=D*ce,e=J.target,_=F.contains(e),w=!1,s=E>0,T=0,m=0;do{var f=Mw(P,e),l=f[0],t=f[1],i=f[2],r=t-i-D*l;(l||r)&&Aw(P,e)&&(T+=r,m+=l),e=e.parentNode}while(!_&&e!==document.body||_&&(F.contains(e)||F===e));return(s&&(Pe&&T===0||!Pe&&E>T)||!s&&(Pe&&m===0||!Pe&&-E>m))&&(w=!0),w},Qd=function(P){return"changedTouches"in P?[P.changedTouches[0].clientX,P.changedTouches[0].clientY]:[0,0]},Ib=function(P){return[P.deltaX,P.deltaY]},Rb=function(P){return P&&"current"in P?P.current:P},o7=function(P,F){return P[0]===F[0]&&P[1]===F[1]},s7=function(P){return` .block-interactivity-`.concat(P,` {pointer-events: none;} .allow-interactivity-`).concat(P,` {pointer-events: all;} -`)},l7=0,Df=[];function u7(P){var F=Un.useRef([]),J=Un.useRef([0,0]),ce=Un.useRef(),Pe=Un.useState(l7++)[0],D=Un.useState(function(){return Tw()})[0],E=Un.useRef(P);Un.useEffect(function(){E.current=P},[P]),Un.useEffect(function(){if(P.inert){document.body.classList.add("block-interactivity-".concat(Pe));var t=Pk([P.lockRef.current],(P.shards||[]).map(Rb),!0).filter(Boolean);return t.forEach(function(i){return i.classList.add("allow-interactivity-".concat(Pe))}),function(){document.body.classList.remove("block-interactivity-".concat(Pe)),t.forEach(function(i){return i.classList.remove("allow-interactivity-".concat(Pe))})}}},[P.inert,P.lockRef.current,P.shards]);var e=Un.useCallback(function(t,i){if("touches"in t&&t.touches.length===2)return!E.current.allowPinchZoom;var r=Qd(t),n=J.current,o="deltaX"in t?t.deltaX:n[0]-r[0],a="deltaY"in t?t.deltaY:n[1]-r[1],u,p=t.target,c=Math.abs(o)>Math.abs(a)?"h":"v";if("touches"in t&&c==="h"&&p.type==="range")return!1;var b=Ob(c,p);if(!b)return!0;if(b?u=c:(u=c==="v"?"h":"v",b=Ob(c,p)),!b)return!1;if(!ce.current&&"changedTouches"in t&&(o||a)&&(ce.current=u),!u)return!0;var d=ce.current||u;return a7(d,i,t,d==="h"?o:a,!0)},[]),_=Un.useCallback(function(t){var i=t;if(!(!Df.length||Df[Df.length-1]!==D)){var r="deltaY"in i?Ib(i):Qd(i),n=F.current.filter(function(u){return u.name===i.type&&u.target===i.target&&o7(u.delta,r)})[0];if(n&&n.should){i.cancelable&&i.preventDefault();return}if(!n){var o=(E.current.shards||[]).map(Rb).filter(Boolean).filter(function(u){return u.contains(i.target)}),a=o.length>0?e(i,o[0]):!E.current.noIsolation;a&&i.cancelable&&i.preventDefault()}}},[]),w=Un.useCallback(function(t,i,r,n){var o={name:t,delta:i,target:r,should:n};F.current.push(o),setTimeout(function(){F.current=F.current.filter(function(a){return a!==o})},1)},[]),s=Un.useCallback(function(t){J.current=Qd(t),ce.current=void 0},[]),T=Un.useCallback(function(t){w(t.type,Ib(t),t.target,e(t,P.lockRef.current))},[]),y=Un.useCallback(function(t){w(t.type,Qd(t),t.target,e(t,P.lockRef.current))},[]);Un.useEffect(function(){return Df.push(D),P.setCallbacks({onScrollCapture:T,onWheelCapture:T,onTouchMoveCapture:y}),document.addEventListener("wheel",_,zf),document.addEventListener("touchmove",_,zf),document.addEventListener("touchstart",s,zf),function(){Df=Df.filter(function(t){return t!==D}),document.removeEventListener("wheel",_,zf),document.removeEventListener("touchmove",_,zf),document.removeEventListener("touchstart",s,zf)}},[]);var f=P.removeScrollBar,l=P.inert;return Un.createElement(Un.Fragment,null,l?Un.createElement(D,{styles:s7(Pe)}):null,f?Un.createElement(Kk,{gapMode:"margin"}):null)}const c7=jk(ww,u7);var Sw=Un.forwardRef(function(P,F){return Un.createElement(f1,iu({},P,{ref:F,sideCar:c7}))});Sw.classNames=f1.classNames;const f7=Sw;var h7=function(P){if(typeof document>"u")return null;var F=Array.isArray(P)?P[0]:P;return F.ownerDocument.body},Ff=new WeakMap,e0=new WeakMap,t0={},Fg=0,Ew=function(P){return P&&(P.host||Ew(P.parentNode))},p7=function(P,F){return F.map(function(J){if(P.contains(J))return J;var ce=Ew(J);return ce&&P.contains(ce)?ce:(console.error("aria-hidden",J,"in not contained inside",P,". Doing nothing"),null)}).filter(function(J){return!!J})},d7=function(P,F,J,ce){var Pe=p7(F,Array.isArray(P)?P:[P]);t0[J]||(t0[J]=new WeakMap);var D=t0[J],E=[],e=new Set,_=new Set(Pe),w=function(T){!T||e.has(T)||(e.add(T),w(T.parentNode))};Pe.forEach(w);var s=function(T){!T||_.has(T)||Array.prototype.forEach.call(T.children,function(y){if(e.has(y))s(y);else{var f=y.getAttribute(ce),l=f!==null&&f!=="false",t=(Ff.get(y)||0)+1,i=(D.get(y)||0)+1;Ff.set(y,t),D.set(y,i),E.push(y),t===1&&l&&e0.set(y,!0),i===1&&y.setAttribute(J,"true"),l||y.setAttribute(ce,"true")}})};return s(F),e.clear(),Fg++,function(){E.forEach(function(T){var y=Ff.get(T)-1,f=D.get(T)-1;Ff.set(T,y),D.set(T,f),y||(e0.has(T)||T.removeAttribute(ce),e0.delete(T)),f||T.removeAttribute(J)}),Fg--,Fg||(Ff=new WeakMap,Ff=new WeakMap,e0=new WeakMap,t0={})}},g7=function(P,F,J){J===void 0&&(J="data-aria-hidden");var ce=Array.from(Array.isArray(P)?P:[P]),Pe=F||h7(P);return Pe?(ce.push.apply(ce,Array.from(Pe.querySelectorAll("[aria-live]"))),d7(ce,Pe,J,"aria-hidden")):function(){return null}};const Cw="Dialog",[Lw,m9]=rk(Cw),[v7,ju]=Lw(Cw),m7=P=>{const{__scopeDialog:F,children:J,open:ce,defaultOpen:Pe,onOpenChange:D,modal:E=!0}=P,e=Un.useRef(null),_=Un.useRef(null),[w=!1,s]=sk({prop:ce,defaultProp:Pe,onChange:D});return Un.createElement(v7,{scope:F,triggerRef:e,contentRef:_,contentId:Pg(),titleId:Pg(),descriptionId:Pg(),open:w,onOpenChange:s,onOpenToggle:Un.useCallback(()=>s(T=>!T),[s]),modal:E},J)},y7="DialogPortal",[y9,Pw]=Lw(y7,{forceMount:void 0}),Gv="DialogOverlay",x7=Un.forwardRef((P,F)=>{const J=Pw(Gv,P.__scopeDialog),{forceMount:ce=J.forceMount,...Pe}=P,D=ju(Gv,P.__scopeDialog);return D.modal?Un.createElement(ey,{present:ce||D.open},Un.createElement(b7,Io({},Pe,{ref:F}))):null}),b7=Un.forwardRef((P,F)=>{const{__scopeDialog:J,...ce}=P,Pe=ju(Gv,J);return Un.createElement(f7,{as:Qm,allowPinchZoom:!0,shards:[Pe.contentRef]},Un.createElement(gh.div,Io({"data-state":Iw(Pe.open)},ce,{ref:F,style:{pointerEvents:"auto",...ce.style}})))}),Fp="DialogContent",_7=Un.forwardRef((P,F)=>{const J=Pw(Fp,P.__scopeDialog),{forceMount:ce=J.forceMount,...Pe}=P,D=ju(Fp,P.__scopeDialog);return Un.createElement(ey,{present:ce||D.open},D.modal?Un.createElement(w7,Io({},Pe,{ref:F})):Un.createElement(T7,Io({},Pe,{ref:F})))}),w7=Un.forwardRef((P,F)=>{const J=ju(Fp,P.__scopeDialog),ce=Un.useRef(null),Pe=Yp(F,J.contentRef,ce);return Un.useEffect(()=>{const D=ce.current;if(D)return g7(D)},[]),Un.createElement(Ow,Io({},P,{ref:Pe,trapFocus:J.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:rf(P.onCloseAutoFocus,D=>{var E;D.preventDefault(),(E=J.triggerRef.current)===null||E===void 0||E.focus()}),onPointerDownOutside:rf(P.onPointerDownOutside,D=>{const E=D.detail.originalEvent,e=E.button===0&&E.ctrlKey===!0;(E.button===2||e)&&D.preventDefault()}),onFocusOutside:rf(P.onFocusOutside,D=>D.preventDefault())}))}),T7=Un.forwardRef((P,F)=>{const J=ju(Fp,P.__scopeDialog),ce=Un.useRef(!1);return Un.createElement(Ow,Io({},P,{ref:F,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:Pe=>{var D;if((D=P.onCloseAutoFocus)===null||D===void 0||D.call(P,Pe),!Pe.defaultPrevented){var E;ce.current||(E=J.triggerRef.current)===null||E===void 0||E.focus(),Pe.preventDefault()}ce.current=!1},onInteractOutside:Pe=>{var D,E;(D=P.onInteractOutside)===null||D===void 0||D.call(P,Pe),Pe.defaultPrevented||(ce.current=!0);const e=Pe.target;((E=J.triggerRef.current)===null||E===void 0?void 0:E.contains(e))&&Pe.preventDefault()}}))}),Ow=Un.forwardRef((P,F)=>{const{__scopeDialog:J,trapFocus:ce,onOpenAutoFocus:Pe,onCloseAutoFocus:D,...E}=P,e=ju(Fp,J),_=Un.useRef(null),w=Yp(F,_);return Lk(),Un.createElement(Un.Fragment,null,Un.createElement(_k,{asChild:!0,loop:!0,trapped:ce,onMountAutoFocus:Pe,onUnmountAutoFocus:D},Un.createElement(yk,Io({role:"dialog",id:e.contentId,"aria-describedby":e.descriptionId,"aria-labelledby":e.titleId,"data-state":Iw(e.open)},E,{ref:w,onDismiss:()=>e.onOpenChange(!1)}))),!1)}),k7="DialogTitle",A7=Un.forwardRef((P,F)=>{const{__scopeDialog:J,...ce}=P,Pe=ju(k7,J);return Un.createElement(gh.h2,Io({id:Pe.titleId},ce,{ref:F}))}),M7="DialogDescription",S7=Un.forwardRef((P,F)=>{const{__scopeDialog:J,...ce}=P,Pe=ju(M7,J);return Un.createElement(gh.p,Io({id:Pe.descriptionId},ce,{ref:F}))}),E7="DialogClose",C7=Un.forwardRef((P,F)=>{const{__scopeDialog:J,...ce}=P,Pe=ju(E7,J);return Un.createElement(gh.button,Io({type:"button"},ce,{ref:F,onClick:rf(P.onClick,()=>Pe.onOpenChange(!1))}))});function Iw(P){return P?"open":"closed"}const L7=m7,P7=x7,O7=_7,I7=A7,R7=S7,zb=C7,Db=({title:P,titleId:F,...J})=>br("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,...J,children:br("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),Rw={margin:"2px 0px 2px 10px",padding:"5px 2px 2px 5px"};function h1({open:P,close:F,title:J,description:ce,children:Pe}){return ni(L7,{open:P,onOpenChange:F,children:[br(P7,{onClick:F,className:"_modal-overlay"}),ni(O7,{className:"_modal",children:[br(I7,{className:"_modal-title",children:J}),br(R7,{className:"_modal_description",children:ce}),br(zb,{children:br(Db,{})}),Pe,br(zb,{className:"_modal-close",onClick:F,children:br(Db,{className:"w-6 h-6"})})]})]})}const Fb=new FileReader,z7={overlaying:"y",side:"left",tickfont:{size:12},tickpadding:5,showgrid:!1,showline:!1,showticklabels:!0,showlegend:!0,zeroline:!1,anchor:"x",type:"linear",autorange:!0};function D7({open:P,close:F,setLoading:J,addOverlay:ce,plotlyData:Pe}){const[D,E]=Un.useState("scatter"),[e,_]=Un.useState("#FFDD00"),[w,s]=Un.useState("#00ACFF"),[T,y]=Un.useState("#FF0000"),[f,l]=Un.useState(""),[t,i]=Un.useState([]),[r,n]=Un.useState([]),[o,a]=Un.useState({}),[u,p]=Un.useState({}),c=["x","open","high","low","close"];let b={scatter:"Scatter (Line)",candlestick:"Candlestick",bar:"Bar"};const[d,v]=Un.useState({});function x(){F(),E("scatter"),l(""),i([]),n([]),a({}),v({})}function g(){var k,h;if(t.length==0){(k=document.getElementById("csv_file"))==null||k.focus(),(h=document.getElementById("csv_file"))==null||h.style.setProperty("border","1px solid red"),document.getElementById("csv_file_warning").style.display="block";return}const m=F7({csvData:t,plotlyData:Pe,yaxisOptions:u,traceType:D,traceColor:e,traceName:f,options:d,increasingColor:w,decreasingColor:T});ce(m),x()}return br(h1,{title:"Overlay Chart",description:"Upload a CSV file to overlay a chart on the main chart.",open:P,close:F,children:ni("div",{id:"popup_csv",className:"popup_content",children:[ni("div",{children:[ni("label",{htmlFor:"csv_file",children:[br("b",{children:"CSV file:"}),br("div",{id:"csv_file_warning",className:"popup_warning",style:{marginLeft:"80px",marginBottom:"10px"},children:"CSV file is required."})]}),br("input",{onChange:m=>{var k,h;if(m.target.files){if(m.target.files[0].type!=="text/csv"){(k=document.getElementById("csv_file"))==null||k.focus(),(h=document.getElementById("csv_file"))==null||h.style.setProperty("border","1px solid red"),document.getElementById("csv_file_warning").style.display="block";return}}else return;r.length>0&&(n([]),a({}),v({}),E("scatter")),Fb.onload=M=>{var G;if(!((G=M.target)!=null&&G.result)||typeof M.target.result!="string")return;let A=M.target.result.split(` -`).map(N=>N.replace(/\r/g,""));const C=A[0].split(","),L=C.map(N=>N.trim().toLowerCase());let O={};for(let N=0;NL.includes(N))&&E("candlestick"),L.includes("close")&&(v({...d,y:C[L.indexOf("close")]}),O.y=C[L.indexOf("close")]);let U=[];for(let N=1;N2&&(j.test(N[0])?N.splice(0,2):j.test(N[N.length-2])&&N.splice(N.length-2,2),B=N.join("_").replace(/openbb_/g,""))}}catch(N){console.log(N)}l(B),v(O),n(C),i(U)},Fb.readAsText(m.target.files[0])},type:"file",id:"csv_file",accept:".csv",style:{marginLeft:10}})]}),ni("div",{style:{marginTop:15},children:[br("label",{htmlFor:"csv_trace_type",children:br("b",{children:"Display data type:"})}),ni("select",{onChange:m=>{E(m.target.value)},id:"csv_trace_type",style:Rw,defaultValue:b[D],children:[D&&br("option",{value:D,children:b[D]},D),Object.keys(b).map(m=>D!==m&&br("option",{value:m,children:b[m]},m))]})]}),ni("div",{style:{marginTop:12},children:[br("label",{htmlFor:"csv_name",children:br("b",{children:"Trace Name:"})}),br("textarea",{id:"csv_name",value:f,onChange:m=>{l(m.target.value)},style:{padding:"5px 2px 2px 5px",width:"100%",maxWidth:"100%",maxHeight:200,marginTop:2},rows:2,cols:20,placeholder:"Enter a name to give this trace"})]}),r.length>0&&ni(tg,{children:[["scatter","bar"].includes(D)&&br("div",{style:{marginTop:15,marginBottom:10},id:"csv_columns",className:"csv_column_container",children:["x","y"].map(m=>ni("div",{style:{marginTop:10,display:"flex",alignItems:"center",justifyContent:"space-between"},children:[ni("label",{htmlFor:`csv_${m}`,style:{width:"100px"},children:[m.toUpperCase()," Axis"]}),ni("select",{onChange:k=>{a({...o,[m]:k.target.value}),v({...d,[m]:k.target.value})},id:`csv_${m}`,style:{width:"100%"},defaultValue:d[m],children:[d[m]&&br("option",{value:d[m],children:d[m]},m),r.map(k=>br("option",{value:k,children:k},k))]})]},m))}),D==="candlestick"&&br("div",{id:"csv_columns",className:"csv_column_container",style:{marginTop:15},children:["x","open","high","low","close"].map(m=>ni("div",{style:{marginTop:10,display:"flex",alignItems:"center",justifyContent:"space-between"},children:[br("label",{htmlFor:`csv_${m}`,style:{width:"100px"},children:m.charAt(0).toUpperCase()+m.slice(1)}),ni("select",{onChange:k=>{a({...o,[m]:k.target.value}),v({...d,[m]:k.target.value})},id:`csv_${m}`,style:{width:"100%"},children:[d[m]&&br("option",{value:d[m],children:d[m]},m),r.map(k=>k!=d[k]&&br("option",{value:k,children:k},k))]})]},m))}),ni("div",{style:{marginTop:20},id:"csv_colors",children:[["scatter","bar"].includes(D)&&ni("div",{children:[br("label",{htmlFor:"csv_color",children:`${D.charAt(0).toUpperCase()}${D.slice(1)} color`}),br("input",{type:"color",id:"csv_color",defaultValue:"#FFDD00",style:{margin:"2px 2px 2px 10px"},onChange:m=>{console.log(m.target.value),_(m.target.value)}})]}),D==="candlestick"&&ni(tg,{children:[br("label",{htmlFor:"csv_increasing",children:"Increasing color"}),br("input",{type:"color",id:"csv_increasing",defaultValue:"#00ACFF",style:{margin:"2px 0px 2px 10px"},onChange:m=>{s(m.target.value)}}),br("label",{htmlFor:"csv_decreasing",style:{marginLeft:15},children:"Decreasing color"}),br("input",{style:{margin:"2px 0px 2px 10px"},type:"color",id:"csv_decreasing",defaultValue:"#FF0000",onChange:m=>{y(m.target.value)}})]})]}),ni("div",{style:{marginTop:20},id:"csv_plot_yaxis_options",children:[D!=="candlestick"&&ni(tg,{children:[br("input",{type:"checkbox",id:"csv_percent_change",name:"csv_plot_yaxis_check",style:{marginBottom:2},onChange:m=>{p({...u,percentChange:m.target.checked,sameYaxis:!1})},checked:!u.sameYaxis&&u.percentChange}),br("label",{htmlFor:"csv_percent_change",style:{marginLeft:5},children:"Plot as percent change from first value"}),br("br",{})]}),br("input",{style:{marginTop:2},type:"checkbox",id:"csv_same_yaxis",name:"csv_plot_yaxis_check",onChange:m=>{p({...u,sameYaxis:m.target.checked,percentChange:!1})},checked:!u.percentChange&&u.sameYaxis}),br("label",{htmlFor:"csv_same_yaxis",style:{marginLeft:5},children:"Share Y-axis"}),D==="bar"&&ni("div",{style:{marginTop:2},id:"csv_bar_orientation",children:[br("input",{type:"checkbox",id:"csv_bar_horizontal",onChange:m=>{v({...d,orientation:m.target.checked?"h":"v"})}}),br("label",{htmlFor:"csv_bar_horizontal",style:{marginLeft:5},children:"Plot horizontally"})]})]})]}),br("br",{}),ni("div",{style:{float:"right",marginTop:20},children:[br("button",{className:"_btn-tertiary",id:"csv_cancel",onClick:x,children:"Cancel"}),br("button",{className:"_btn",id:"csv_submit",onClick:g,children:"Submit"})]})]})})}function F7({csvData:P,plotlyData:F,yaxisOptions:J,traceType:ce,traceColor:Pe,traceName:D,options:E,increasingColor:e,decreasingColor:_}){let w=F.data[0];w.xaxis==null&&(w.xaxis="x"),w.yaxis==null&&(w.yaxis="y");let s=w.yaxis,T,f=Object.keys(F.layout).filter(r=>r.startsWith("yaxis")).map(r=>F.layout[r]).filter(r=>r.side=="left"&&(r.overlaying=="y"||r.fixedrange!=null&&r.fixedrange==!0)).length>0?" ":"";if(J.sameYaxis!==!0){const r=Object.keys(F.layout).filter(n=>n.startsWith("yaxis")).map(n=>F.layout[n]);T=`y${r.length+1}`,s=`yaxis${r.length+1}`,console.log(`yaxis: ${T} ${s}`),F.layout[s]={...z7,title:{text:D,font:{size:14},standoff:0},ticksuffix:f,layer:"below traces"}}else T=w.yaxis.replace("yaxis","y");const l={type:ce,name:D,showlegend:!0,yaxis:T};let t={};if(["scatter","bar"].includes(ce)){const r=P.findIndex(n=>n[E.y]!=null&&n[E.y]!=0);t={...l,x:P.map(n=>n[E.x]),y:P.map(function(n){return J.percentChange&&ce==="scatter"?(n[E.y]-P[r][E.y])/P[r][E.y]:n[E.y]}),customdata:P.map(n=>n[E.y]),hovertemplate:"%{customdata:.2f}",connectgaps:!0,marker:{color:Pe}},ce==="bar"&&(t.orientation=E.orientation,t.marker.opacity=.7,delete t.connectgaps,delete t.hovertemplate,delete t.customdata)}else ce==="candlestick"&&(t={...l,x:P.map(r=>r[E.x]),open:P.map(r=>r[E.open]),high:P.map(r=>r[E.high]),low:P.map(r=>r[E.low]),close:P.map(r=>r[E.close]),increasing:{line:{color:e}},decreasing:{line:{color:_}}});return{...F,data:[...F.data,t]}}function B7({plotlyData:P,open:F,close:J,defaultTitle:ce,updateTitle:Pe,updateAxesTitles:D}){const[E,e]=Un.useState(ce),_=Object.keys(P.layout||{}).filter(y=>y.startsWith("yaxis")&&P.layout[y].range!=null),w=Object.keys(P.layout||{}).filter(y=>{var f;return y.startsWith("xaxis")&&P.layout[y].showticklabels!=null&&((f=P.layout[y])==null?void 0:f.anchor)}),[s,T]=Un.useState({});return br(h1,{title:"Chart Titles",description:"Change the titles on the chart.",open:F,close:J,children:ni("div",{id:"popup_title",className:"popup_content",children:[ni("div",{style:{display:"flex",flexDirection:"column",gap:0},children:[ni("div",{children:[br("label",{htmlFor:"title_text",children:br("b",{children:"Title:"})}),br("textarea",{id:"title_text",style:{...Rw,width:"100%",maxWidth:"100%",maxHeight:"200px",marginTop:"8px",marginLeft:"0px"},rows:2,cols:20,value:E,onChange:y=>e(y.target.value)})]}),br("div",{id:"xaxis_div",className:"csv_column_container",style:{marginTop:5,marginBottom:-5},children:w.map((y,f)=>{var l,t;return ni("div",{style:{marginTop:5,marginBottom:5},children:[br("label",{htmlFor:`title_${y}`,children:f===0?br("b",{children:"X axis:"}):ni("b",{children:["X axis ",f+1,":"]})}),br("input",{id:`title_${y}`,style:{marginLeft:"0px",padding:"5px 2px 2px 5px"},type:"text",defaultValue:((t=(l=P==null?void 0:P.layout[y])==null?void 0:l.title)==null?void 0:t.text)||"",onChange:i=>{T({...s,[y]:i.target.value})}})]},y)})}),br("div",{id:"yaxis_div",className:"csv_column_container",style:{marginTop:5,marginBottom:5},children:_.map((y,f)=>{var l,t;return ni("div",{style:{marginTop:10},children:[br("label",{htmlFor:`title_${y}`,children:f===0?br("b",{children:"Y axis:"}):ni("b",{children:["Y axis ",f+1,":"]})}),br("input",{id:`title_${y}`,style:{marginLeft:"0px",padding:"5px 2px 2px 5px"},type:"text",defaultValue:((t=(l=P==null?void 0:P.layout[y])==null?void 0:l.title)==null?void 0:t.text)||"",onChange:i=>{T({...s,[y]:i.target.value})}})]},y)})})]}),ni("div",{style:{float:"right",marginTop:20},children:[br("button",{className:"_btn-tertiary ph-capture",id:"title_cancel",onClick:J,children:"Cancel"}),br("button",{className:"_btn ph-capture",id:"title_submit",onClick:()=>{Pe(E),D(s),J()},children:"Submit"})]})]})})}const Bb={padding:"5px 2px 2px 5px",margin:"2px 0"};function N7({open:P,close:F,addAnnotation:J,deleteAnnotation:ce,popupData:Pe}){var l,t,i,r,n;const D={text:"",color:"#0088CC",size:18,bordercolor:"#822661",yanchor:"above"},[E,e]=Un.useState(D),[_,w]=Un.useState(D);Pe&&Pe!==E&&Pe.annotation&&(Pe.annotation=(Pe==null?void 0:Pe.annotation)||{},e(Pe),w(Pe));function s(){console.log("closing"),e(D),w(D),F()}function T(o){console.log(o.target.id.replace("addtext_",""),o.target.value);const a=o.target.id.replace("addtext_",""),u=o.target.value;w({..._,[a]:u})}function y(){console.log("submitting",_),_.text!==""?(E!=null&&E.annotation&&w({..._,annotation:E.annotation}),J(_),F()):(document.getElementById("popup_textarea_warning").style.display="block",document.getElementById("addtext_text").style.border="1px solid red")}function f(){ce(E),s()}return br(h1,{title:"Add Text to Chart",description:"Change the titles on the chart.",open:P,close:s,children:ni("div",{id:"popup_title",className:"popup_content",children:[ni("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[ni("div",{style:{marginBottom:20},children:[ni("label",{htmlFor:"popup_text",children:[br("b",{children:"Text:"}),br("div",{id:"popup_textarea_warning",className:"popup_warning",children:"Text is required"})]}),br("textarea",{id:"addtext_text",style:{...Bb,width:"100%",maxWidth:"100%",maxHeight:"200px",marginTop:"8px"},rows:4,cols:50,placeholder:"Enter text here",onChange:T,defaultValue:((l=E==null?void 0:E.annotation)==null?void 0:l.text)||(_==null?void 0:_.text)})]}),ni("div",{style:{display:"flex",gap:15,alignItems:"center",flexWrap:"wrap",columnCount:2,justifyContent:"space-between",marginBottom:20},children:[br("label",{htmlFor:"addtext_color",children:br("b",{children:"Font color"})}),br("input",{type:"color",id:"addtext_color",style:{margin:"2px 2px 2px 15px"},defaultValue:((t=E==null?void 0:E.annotation)==null?void 0:t.color)||(_==null?void 0:_.color),onChange:T}),br("label",{htmlFor:"addtext_bordercolor",style:{marginLeft:20},children:br("b",{children:"Border color"})}),br("input",{type:"color",id:"addtext_bordercolor",style:{margin:"2px 2px 10px 15px"},defaultValue:((i=E==null?void 0:E.annotation)==null?void 0:i.bordercolor)||(_==null?void 0:_.bordercolor),onChange:T}),br("label",{htmlFor:"addtext_size",children:br("b",{children:"Font size"})}),br("input",{style:{...Bb,width:"52px",margin:"0px 0px 0px 2px"},type:"number",id:"addtext_size",onChange:T,defaultValue:((r=E==null?void 0:E.annotation)==null?void 0:r.size)||(_==null?void 0:_.size)}),ni("div",{children:[br("label",{htmlFor:"addtext_yanchor",style:{marginRight:31},children:br("b",{children:"Position"})}),ni("select",{id:"addtext_yanchor",name:"yanchor",style:{width:"100px"},defaultValue:((n=E==null?void 0:E.annotation)==null?void 0:n.yanchor)||(_==null?void 0:_.yanchor),onChange:T,children:[br("option",{value:"above",children:"Above"}),br("option",{value:"below",children:"Below"})]})]})]})]}),ni("div",{style:{float:"right",marginTop:20},children:[br("button",{className:"_btn-tertiary ph-capture",id:"title_cancel",onClick:s,children:"Cancel"}),br("button",{className:"_btn ph-capture",id:"title_delete",onClick:f,children:"Delete"}),br("button",{className:"_btn ph-capture",id:"title_submit",onClick:y,children:"Submit"})]})]})})}function j7({plotData:P,popup_data:F,current_text:J}){var _;let ce=F.x,Pe=F.y,D=F.yref,E=((_=P==null?void 0:P.layout)==null?void 0:_.annotations)||[],e=-1;for(let w=0;wx!=null)),P.layout.dragmode="pan",J({...P,...a.update}),s.removeAllListeners("plotly_click")};F.text=F.text.replace(/\n/g,"
");let y,f=!1;if(F.annotation){console.log("data",F),y={x:F.annotation.x,y:F.annotation.y,yref:F.annotation.yref,yanchor:F.annotation.yi.x==F.annotation.x&&i.y==F.annotation.y&&i.yref==F.annotation.yref);console.log("ohlcAnnotationIndex",t),t==-1?_([...e,l.annotation]):(e[t]=l.annotation,_(e))}D([...w,l.annotation].filter(t=>t!=null)),P.layout.dragmode="pan",J({...P,...l.update}),Pe({});return}s.on("plotly_clickannotation",l=>{console.log("plotly_clickannotation",l);let t=l.annotation;if(t.text==null){console.log("annotation.text is undefined");return}console.log("annotation.text",t.text),t.text=t.text.replace(/
/g,` -`);let i={x:t.x,y:t.y,high:(t==null?void 0:t.high)??void 0,low:(t==null?void 0:t.low)??void 0,yanchor:t.y'),!0):F?P.some(function(J){return F.includes(J)})||P.includes("*"):!0}var X7=function(F,J,ce){ce===void 0&&(ce=!1);var Pe=J.alt,D=J.meta,E=J.mod,e=J.shift,_=J.ctrl,w=J.keys,s=F.key,T=F.code,y=F.ctrlKey,f=F.metaKey,l=F.shiftKey,t=F.altKey,i=sc(T),r=s.toLowerCase();if(!ce){if(Pe===!t&&r!=="alt"||e===!l&&r!=="shift")return!1;if(E){if(!f&&!y)return!1}else if(D===!f&&r!=="meta"&&r!=="os"||_===!y&&r!=="ctrl"&&r!=="control")return!1}return w&&w.length===1&&(w.includes(r)||w.includes(i))?!0:w?q7(w):!w},$7=Un.createContext(void 0),J7=function(){return Un.useContext($7)};function Nw(P,F){return P&&F&&typeof P=="object"&&typeof F=="object"?Object.keys(P).length===Object.keys(F).length&&Object.keys(P).reduce(function(J,ce){return J&&Nw(P[ce],F[ce])},!0):P===F}var K7=Un.createContext({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),Q7=function(){return Un.useContext(K7)};function e9(P){var F=Un.useRef(void 0);return Nw(F.current,P)||(F.current=P),F.current}var jb=function(F){F.stopPropagation(),F.preventDefault(),F.stopImmediatePropagation()},t9=typeof window<"u"?Un.useLayoutEffect:Un.useEffect;function Ku(P,F,J,ce){var Pe=Un.useRef(null),D=Un.useRef(!1),E=J instanceof Array?ce instanceof Array?void 0:ce:J,e=P instanceof Array?P.join(E==null?void 0:E.splitKey):P,_=J instanceof Array?J:ce instanceof Array?ce:void 0,w=Un.useCallback(F,_??[]),s=Un.useRef(w);_?s.current=w:s.current=F;var T=e9(E),y=Q7(),f=y.enabledScopes,l=J7();return t9(function(){if(!((T==null?void 0:T.enabled)===!1||!Y7(f,T==null?void 0:T.scopes))){var t=function(a,u){var p;if(u===void 0&&(u=!1),!(Z7(a)&&!Bw(a,T==null?void 0:T.enableOnFormTags))&&!(T!=null&&T.ignoreEventWhen!=null&&T.ignoreEventWhen(a))){if(Pe.current!==null&&document.activeElement!==Pe.current&&!Pe.current.contains(document.activeElement)){jb(a);return}(p=a.target)!=null&&p.isContentEditable&&!(T!=null&&T.enableOnContentEditable)||Bg(e,T==null?void 0:T.splitKey).forEach(function(c){var b,d=Ng(c,T==null?void 0:T.combinationKey);if(X7(a,d,T==null?void 0:T.ignoreModifiers)||(b=d.keys)!=null&&b.includes("*")){if(u&&D.current)return;if(G7(a,d,T==null?void 0:T.preventDefault),!W7(a,d,T==null?void 0:T.enabled)){jb(a);return}s.current(a,d),u||(D.current=!0)}})}},i=function(a){a.key!==void 0&&(Dw(sc(a.code)),((T==null?void 0:T.keydown)===void 0&&(T==null?void 0:T.keyup)!==!0||T!=null&&T.keydown)&&t(a))},r=function(a){a.key!==void 0&&(Fw(sc(a.code)),D.current=!1,T!=null&&T.keyup&&t(a,!0))},n=Pe.current||(E==null?void 0:E.document)||document;return n.addEventListener("keyup",r),n.addEventListener("keydown",i),l&&Bg(e,T==null?void 0:T.splitKey).forEach(function(o){return l.addHotkey(Ng(o,T==null?void 0:T.combinationKey,T==null?void 0:T.description))}),function(){n.removeEventListener("keyup",r),n.removeEventListener("keydown",i),l&&Bg(e,T==null?void 0:T.splitKey).forEach(function(o){return l.removeHotkey(Ng(o,T==null?void 0:T.combinationKey,T==null?void 0:T.description))})}}},[e,T,f]),Pe}var jw={exports:{}};(function(P){(function(F){var J=o(),ce=a(),Pe=u(),D=p(),E={imagePlaceholder:void 0,cacheBust:!1},e={toSvg:_,toPng:s,toJpeg:T,toBlob:y,toPixelData:w,impl:{fontFaces:Pe,images:D,util:J,inliner:ce,options:{}}};P.exports=e;function _(c,b){return b=b||{},f(b),Promise.resolve(c).then(function(v){return t(v,b.filter,!0)}).then(i).then(r).then(d).then(function(v){return n(v,b.width||J.width(c),b.height||J.height(c))});function d(v){return b.bgcolor&&(v.style.backgroundColor=b.bgcolor),b.width&&(v.style.width=b.width+"px"),b.height&&(v.style.height=b.height+"px"),b.style&&Object.keys(b.style).forEach(function(x){v.style[x]=b.style[x]}),v}}function w(c,b){return l(c,b||{}).then(function(d){return d.getContext("2d").getImageData(0,0,J.width(c),J.height(c)).data})}function s(c,b){return l(c,b||{}).then(function(d){return d.toDataURL()})}function T(c,b){return b=b||{},l(c,b).then(function(d){return d.toDataURL("image/jpeg",b.quality||1)})}function y(c,b){return l(c,b||{}).then(J.canvasToBlob)}function f(c){typeof c.imagePlaceholder>"u"?e.impl.options.imagePlaceholder=E.imagePlaceholder:e.impl.options.imagePlaceholder=c.imagePlaceholder,typeof c.cacheBust>"u"?e.impl.options.cacheBust=E.cacheBust:e.impl.options.cacheBust=c.cacheBust}function l(c,b){return _(c,b).then(J.makeImage).then(J.delay(100)).then(function(v){var x=d(c);return x.getContext("2d").drawImage(v,0,0),x});function d(v){var x=document.createElement("canvas");if(x.width=b.width||J.width(v),x.height=b.height||J.height(v),b.bgcolor){var g=x.getContext("2d");g.fillStyle=b.bgcolor,g.fillRect(0,0,x.width,x.height)}return x}}function t(c,b,d){if(!d&&b&&!b(c))return Promise.resolve();return Promise.resolve(c).then(v).then(function(m){return x(c,m,b)}).then(function(m){return g(c,m)});function v(m){return m instanceof HTMLCanvasElement?J.makeImage(m.toDataURL()):m.cloneNode(!1)}function x(m,k,h){var M=m.childNodes;if(M.length===0)return Promise.resolve(k);return A(k,J.asArray(M),h).then(function(){return k});function A(C,L,O){var I=Promise.resolve();return L.forEach(function(R){I=I.then(function(){return t(R,O)}).then(function(U){U&&C.appendChild(U)})}),I}}function g(m,k){if(!(k instanceof Element))return k;return Promise.resolve().then(h).then(M).then(A).then(C).then(function(){return k});function h(){L(window.getComputedStyle(m),k.style);function L(O,I){O.cssText?I.cssText=O.cssText:R(O,I);function R(U,B){J.asArray(U).forEach(function(G){B.setProperty(G,U.getPropertyValue(G),U.getPropertyPriority(G))})}}}function M(){[":before",":after"].forEach(function(O){L(O)});function L(O){var I=window.getComputedStyle(m,O),R=I.getPropertyValue("content");if(R===""||R==="none")return;var U=J.uid();k.className=k.className+" "+U;var B=document.createElement("style");B.appendChild(G(U,O,I)),k.appendChild(B);function G(N,j,V){var H="."+N+":"+j,ee=V.cssText?Q(V):X(V);return document.createTextNode(H+"{"+ee+"}");function Q(Y){var K=Y.getPropertyValue("content");return Y.cssText+" content: "+K+";"}function X(Y){return J.asArray(Y).map(K).join("; ")+";";function K(te){return te+": "+Y.getPropertyValue(te)+(Y.getPropertyPriority(te)?" !important":"")}}}}}function A(){m instanceof HTMLTextAreaElement&&(k.innerHTML=m.value),m instanceof HTMLInputElement&&k.setAttribute("value",m.value)}function C(){k instanceof SVGElement&&(k.setAttribute("xmlns","http://www.w3.org/2000/svg"),k instanceof SVGRectElement&&["width","height"].forEach(function(L){var O=k.getAttribute(L);O&&k.style.setProperty(L,O)}))}}}function i(c){return Pe.resolveAll().then(function(b){var d=document.createElement("style");return c.appendChild(d),d.appendChild(document.createTextNode(b)),c})}function r(c){return D.inlineAll(c).then(function(){return c})}function n(c,b,d){return Promise.resolve(c).then(function(v){return v.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),new XMLSerializer().serializeToString(v)}).then(J.escapeXhtml).then(function(v){return''+v+""}).then(function(v){return''+v+""}).then(function(v){return"data:image/svg+xml;charset=utf-8,"+v})}function o(){return{escape:C,parseExtension:b,mimeType:d,dataAsUrl:A,isDataUrl:v,canvasToBlob:g,resolveUrl:m,getAndEncode:M,uid:k(),delay:L,asArray:O,escapeXhtml:I,makeImage:h,width:R,height:U};function c(){var G="application/font-woff",N="image/jpeg";return{woff:G,woff2:G,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:N,jpeg:N,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"}}function b(G){var N=/\.([^\.\/]*?)$/g.exec(G);return N?N[1]:""}function d(G){var N=b(G).toLowerCase();return c()[N]||""}function v(G){return G.search(/^(data:)/)!==-1}function x(G){return new Promise(function(N){for(var j=window.atob(G.toDataURL().split(",")[1]),V=j.length,H=new Uint8Array(V),ee=0;ee{if(P)return i9({fileHandle:P,blob:F})},i9=async({fileHandle:P,blob:F})=>{const J=await P.createWritable();await J.write(F),await J.close()},a9=[{description:"PNG Image",accept:{"image/png":[".png"]}},{description:"JPEG Image",accept:{"image/jpeg":[".jpeg"]}},{description:"SVG Image",accept:{"image/svg+xml":[".svg"]}}],Vw=({filename:P,is_image:F})=>{try{if("showSaveFilePicker"in window){const J={suggestedName:P,types:F?a9:[{description:"CSV File",accept:{"image/csv":[".csv"]}}],excludeAcceptAllOption:!0};return showSaveFilePicker(J)}}catch(J){console.error(J)}return new Promise(J=>{J(null)})},ty=(P,F,J)=>{try{if(J===null)throw new Error("Cannot access filesystem");return r9({fileHandle:J,blob:P})}catch(ce){console.error("oops, something went wrong!",ce);const Pe=URL.createObjectURL(P),D=document.createElement("a");D.setAttribute("href",Pe),D.setAttribute("download",F),D.style.visibility="hidden",document.body.appendChild(D),D.click(),document.body.removeChild(D)}return new Promise(ce=>{ce(!0)})};async function Ub(P,F){const J=P.data;let ce=[];const Pe=[],D="title"in P.layout.xaxis&&P.layout.xaxis.title.text!==void 0?P.layout.xaxis.title.text:"x",E="title"in P.layout.yaxis&&P.layout.yaxis.title.text!==void 0?P.layout.yaxis.title.text:"y";return J.forEach(function(e){e.type==="candlestick"&&(ce.length===0&&(ce=["Date","Open","High","Low","Close"]),e.x.forEach(function(_,w){Pe.push([_,e.open[w],e.high[w],e.low[w],e.close[w]])})),["scatter","bar"].includes(e.type)&&(ce.length===0&&ce.push(D),ce.push(e.name!==void 0?e.name:E),e.x.forEach(function(_,w){Pe[w]===void 0&&(Pe[w]=[_]),Pe[w].push(e.y[w])}))}),await o9(ce,Pe,F)}async function o9(P,F,J){const ce=P,Pe=F.map(w=>w.map(s=>s==null?"":typeof s=="object"?JSON.stringify(s):s.toString().replace(/"/g,'""'))),E=[ce,...Pe].map(w=>w.join(",")).join(` -`),e=new Blob([E],{type:"text/csv;charset=utf-8;"}),_=`${window.title}.csv`;try{const w=await Vw({filename:_});await Bp("Saving CSV"),Np(async function(){ty(e,_,w).then(async function(){await new Promise(s=>setTimeout(s,1500)),w||J(!0),await Bp("",!0)})},2)()}catch(w){console.error(w)}}function Bp(P,F){const J=window.document.getElementById("loading"),ce=window.document.getElementById("loading_text");return new Promise(Pe=>{F?J.classList.remove("show"):(ce.innerHTML=P,J.classList.add("show"));const D=setInterval(function(){(F?!J.classList.contains("show"):J.classList.contains("show"))&&(clearInterval(D),Pe(!0))},.01)})}const Np=(P,F)=>{let J;return function(){const ce=this,Pe=arguments;clearTimeout(J),J=setTimeout(()=>P.apply(ce,Pe),F)}},s9={yref:"paper",xref:"paper",x:1,y:0,text:"OpenBB Terminal",font_size:17,font_color:"gray",opacity:.5,xanchor:"right",yanchor:"bottom",yshift:-80,xshift:40};async function Vb(P,F,J=!1){const ce=document.getElementById("plotlyChart");J&&(ce.layout.annotations.push(s9),ce.globals.cmd_idx!==void 0&&ce.globals.cmd_src!==void 0&&(ce.layout.annotations[ce.globals.cmd_idx].text=ce.globals.cmd_src),Gs.relayout(ce,{"title.text":ce.globals.title,margin:ce.globals.old_margin})),J||(ce.globals.cmd_idx!==void 0&&ce.globals.cmd_src!==void 0&&(ce.layout.annotations[ce.globals.cmd_idx].text=""),ce.layout.annotations.splice(F,1),Gs.relayout(ce,{"title.text":"",margin:P}))}async function Hw(P,F,J){const ce=document.getElementById(P);if(["svg","pdf"].includes(J)){const Pe=document.getElementById("plotlyChart"),D=Pe.layout.margin,E=Pe.layout.annotations.length;await Vb(D,E,!0),Gs.downloadImage(Pe,{format:"svg",height:Pe.clientHeight,width:Pe.clientWidth,filename:window.title}),await Vb(D,E,!1),await Bp("",!0);return}Np(async function(){Uw.toBlob(ce).then(function(Pe){ty(Pe,F,null)})},2)()}async function Hb(P,F,J,ce){const Pe=document.getElementById(P),D=`${window.title}.png`;try{J(!0);const E=await Vw({filename:D,is_image:!0});let e="png";if(E!==null&&(e=E.name.split(".").pop()),await Bp(`Saving ${e.toUpperCase()}`),["svg","pdf"].includes(e)){await Hw(P,D,e),F(!1),J(!1),E||ce(!0);return}Np(async function(){Uw.toBlob(Pe).then(function(_){ty(_,D,E).then(async function(){await Bp("",!0),F(!1),J(!1),E||ce(!0)})})},2)()}catch(E){console.error(E),F(!1),J(!1)}J(!1)}function rc(P=!0){return new Promise(F=>{window.MODEBAR||(window.MODEBAR=window.document.getElementsByClassName("modebar-container")[0],window.MODEBAR.style.cssText=`${window.MODEBAR.style.cssText}; display:flex;`),window.MODEBAR&&(window.MODEBAR.style.cssText.includes("display: none")||!P?window.MODEBAR.style.cssText=`${window.MODEBAR.style.cssText}; display:flex;`:window.MODEBAR.style.cssText=`${window.MODEBAR.style.cssText}; display:none;`,F(!0))})}function l9({setModal:P,changeTheme:F,autoScaling:J,Loading:ce,changeColor:Pe,downloadFinished:D}){return Ku("ctrl+shift+t",()=>{P({name:"titleDialog"})},{preventDefault:!0}),Ku("ctrl+t",()=>{P({name:"textDialog"})},{preventDefault:!0}),Ku("ctrl+o",()=>{P({name:"overlayChart"})},{preventDefault:!0}),Ku(["ctrl+shift+h","ctrl+h"],()=>{rc()},{preventDefault:!0}),Ku("ctrl+e",()=>{Pe(!0)},{preventDefault:!0}),Ku("ctrl+shift+s",async()=>{P({name:"downloadCsv"}),await Ub(document.getElementById("plotlyChart"),D)},{preventDefault:!0}),Ku("ctrl+s",async()=>{rc(),Hb("MainChart",rc,ce,D)},{preventDefault:!0}),Ku("ctrl+w",()=>{window.close()},{preventDefault:!0}),{plotGlPixelRatio:1,scrollZoom:!0,responsive:!0,displaylogo:!1,displayModeBar:!0,modeBarButtonsToRemove:["lasso2d","select2d","downloadImage"],modeBarButtons:[[{name:"Download CSV (Ctrl+Shift+S)",icon:Pu.downloadCsv,click:async function(e){await Ub(e,D)}},{name:"Download Chart as Image (Ctrl+S)",icon:Pu.downloadImage,click:async function(){rc(),await Hb("MainChart",rc,ce,D)}}],[{name:"Edit Color (Ctrl+E)",icon:Pu.changeColor,click:function(){Pe(!0)}},"drawline","drawopenpath","drawcircle","drawrect","eraseshape"],[{name:"Overlay chart from CSV (Ctrl+O)",icon:Pu.plotCsv,click:function(){P({name:"overlayChart"})}},{name:"Add Text (Ctrl+T)",icon:Pu.addText,click:function(){P({name:"textDialog",data:{text:""}})}},{name:"Change Titles (Ctrl+Shift+T)",icon:Pu.changeTitle,click:function(){P({name:"titleDialog"})}},{name:"Change Theme",icon:Pu.sunIcon,click:function(){F(!0)}}],["hoverClosestCartesian","hoverCompareCartesian","toggleSpikelines"],[{name:"Auto Scale (Ctrl+Shift+A)",icon:Gs.Icons.autoscale,click:function(){J(!0)}},"zoomIn2d","zoomOut2d","autoScale2d","zoom2d","pan2d"]]}}async function u9(P,F){try{if(P["xaxis.range[0]"]!=null){const J=P["xaxis.range[0]"],ce=P["xaxis.range[1]"];let Pe={},D,E;const e=F.data.filter(s=>s.yaxis!=null),_=[...new Set(e.map(s=>s.yaxis||s.y!=null||s.type=="candlestick"))],w=s=>F.data.filter(T=>T.yaxis==s&&(T.y||T.type=="candlestick"));return _.forEach(s=>{if(typeof s!="string")return;let T="yaxis"+s.replace("y",""),y=[],f=[],l=F.layout[T].type=="log";w(s).forEach(r=>{let n=r.x;l=F.layout[T].type=="log";let o=r.y!=null?r.y:[],a=r.type=="candlestick"?r.low:[],u=r.type=="candlestick"?r.high:[];l&&(o=o.map(Math.log10),r.type=="candlestick"&&(a=r.low.map(Math.log10),u=r.high.map(Math.log10)));let p=n.map((c,b)=>{let d=null;return c>=J&&c<=ce&&(r.y!=null&&(d=o[b]),r.type=="candlestick"&&(y.push(a[b]),y.push(u[b]))),d});f=f.concat(p)}),f=f.filter(r=>r!=null&&r!=null),D=Math.min(...f),E=Math.max(...f),y.length>0&&(y=y.filter(r=>r!=null&&r!=null),D=Math.min(...y),E=Math.max(...y));let t=E,i=F.layout[T].fixedrange!=null&&F.layout[T].fixedrange==!0;if(D!=null&&E!=null){let r=E-D,n=.15;if(y.length>0&&(n=.3),D-=r*n,E+=r*n,i){if(F.layout[T].tickvals!=null){let a=t,u=-3,p=Math.round(a*.2,u),c=[2,5,6,7,8,9,10],b=[1,4,5,6,7,8,9];for(let x=0;xc[x]&&(u=-b[x],p=Math.round(a*.2,u));let d=[Math.floor(p),Math.floor(p*2),Math.floor(p*3),Math.floor(p*4)],v=[0,Math.floor(a*7)];Pe[T+".tickvals"]=d,Pe[T+".range"]=v,Pe[T+".tickformat"]=".2s";return}D=0,E=F.layout[T].range[1]}Pe[T+".range"]=[D,E]}}),Pe}}catch(J){console.log(`Error in AutoScaling: ${J}`)}return{}}async function c9({plotData:P,volumeBars:F,setMaximizePlot:J}){const ce=Object.keys(P.layout).filter(s=>s.startsWith("xaxis")).filter(s=>P.layout[s].showticklabels||P.layout[s].matches==null),Pe=P.data.filter(s=>{var T;return(T=s==null?void 0:s.name)==null?void 0:T.startsWith("Volume")});let D={},E=F||{old_nticks:{}};const e=window.innerWidth,_=window.innerHeight;let w=_>420&&e<920?8:_>420&&e<500?9:7;return e<750?(Pe.forEach(s=>{s.type=="bar"&&(s.opacity=1,s.marker.line.width=.09,F.yaxis==null&&(E.yaxis="yaxis"+s.yaxis.replace("y",""),D[E.yaxis+".tickfont.size"]=w,E.tickfont=P.layout[E.yaxis].tickfont||{},P.layout.margin.l-=40))}),ce.forEach(s=>{var T;((T=F.old_nticks)==null?void 0:T[s])==null&&(D[s+".nticks"]=6,E.old_nticks[s]=P.layout[s].nticks||10)}),J(!0),await rc()):window.MODEBAR.style.cssText.includes("display: none")&&(await rc(!1),J(!1),F.old_nticks!=null&&ce.forEach(s=>{F.old_nticks[s]!=null&&(D[s+".nticks"]=E.old_nticks[s],E.old_nticks[s]=void 0)}),F.yaxis!=null&&Pe.forEach(s=>{s.type=="bar"&&(s.opacity=.5,s.marker.line.width=.2,D[E.yaxis+".tickfont.size"]=E.tickfont.size+3,P.layout.margin.l+=40,E.yaxis=void 0)})),{volume_update:E,layout_update:D,plotData:P}}function f9({open:P,onColorChange:F}){const[J,ce]=Un.useState(!1);function Pe(D){F(D)}return P&&!J&&ce(!0),!P&&J&&ce(!1),Un.useEffect(()=>{if(J){let D=function(e){let _=0,w=0,s=0,T=0;document.getElementById(e.id+"_header")?document.getElementById(e.id+"_header").onmousedown=y:e.onmousedown=y;function y(t){t=t||window.event,t.preventDefault(),s=t.clientX,T=t.clientY,document.onmouseup=l,document.onmousemove=f}function f(t){t=t||window.event,t.preventDefault(),_=s-t.clientX,w=T-t.clientY,s=t.clientX,T=t.clientY,e.style.top=e.offsetTop-w+"px",e.style.left=e.offsetLeft-_+"px"}function l(){document.onmouseup=null,document.onmousemove=null}},E=document.getElementById("changecolor");E.style.display="block",E.style.width=null,D(E)}else document.getElementById("changecolor").style.display="none"},[J]),br("div",{id:"changecolor",children:br("div",{id:"changecolor_header",children:br("input",{type:"color",id:"picked_color",value:"#00ACFF",onChange:D=>{let E=D.target.value;Pe(E)}})})})}function qw(P){var F,J,ce="";if(typeof P=="string"||typeof P=="number")ce+=P;else if(typeof P=="object")if(Array.isArray(P))for(F=0;F{ce.preventDefault(),window.pywry.open_file(J)},children:J})]})})}),br("div",{style:{float:"right",marginTop:20},children:br("button",{className:"_btn",style:{padding:"8px 16px",width:"100%"},onClick:F,children:"Close"})})]})})}const d9=QT(ZT);function g9({json:P,date:F,cmd:J,title:ce,globals:Pe,info:D}){var se,fe;const E=GT();Un.useEffect(()=>{E&&E.capture("chart",D)},[]),delete P.layout.width,delete P.layout.height,(fe=(se=P.layout)==null?void 0:se.title)!=null&&fe.text&&(P.layout.title.text="");const[e,_]=Un.useState({}),[w,s]=Un.useState(!1),[T,y]=Un.useState(ce),[f,l]=Un.useState({}),[t,i]=Un.useState(!1),[r,n]=Un.useState({name:""}),[o,a]=Un.useState(!1),[u,p]=Un.useState(null),[c,b]=Un.useState({old_nticks:{}}),[d,v]=Un.useState(!1),[x,g]=Un.useState(!1),[m,k]=Un.useState(P),[h,M]=Un.useState([]),[A,C]=Un.useState(!1),[L,O]=Un.useState(!0),[I,R]=Un.useState(!1),[U,B]=Un.useState(!1),[G,N]=Un.useState(!1),[j,V]=Un.useState({}),[H,ee]=Un.useState([]),Q=()=>n({name:""});function X(ye){var de,he,xe,Re,we;console.log("onDeleteAnnotation",ye);const pe=(he=(de=m==null?void 0:m.layout)==null?void 0:de.annotations)==null?void 0:he.findIndex(Ae=>Ae.text===ye.text);console.log("index",pe),pe>-1&&((Re=(xe=m==null?void 0:m.layout)==null?void 0:xe.annotations)==null||Re.splice(pe,1),k({...m}),M((we=m==null?void 0:m.layout)==null?void 0:we.annotations))}function Y(ye){U7({plotData:m,popupData:ye,setPlotData:k,setModal:n,setOnAnnotationClick:V,setAnnotations:M,onAnnotationClick:j,ohlcAnnotation:H,setOhlcAnnotation:ee,annotations:h,plotDiv:u})}Un.useEffect(()=>{x&&(n({name:"downloadFinished"}),g(!1))},[x]),Un.useEffect(()=>{f&&Object.keys(f).length>0&&(Object.keys(f).forEach(ye=>{m.layout[ye].title={...m.layout[ye].title||{},text:f[ye]},m.layout[ye].showticklabels=!0}),l({}))},[f]);function K(ye){let pe=u.layout.shapes;if(!pe||pe.length==0)return;let de=pe[pe.length-1];de.line.color=ye,Gs.update(u,{},{shapes:pe})}function te(ye,pe=!1){let de=e[ye]||document.querySelector(`[data-title="${ye}"]`);pe?(de.style.border="transparent",de.style.boxShadow="none"):(de.style.border="1px solid rgba(0, 151, 222, 1.0)",de.style.borderRadius="5px",de.style.borderpadding="5px",de.style.boxShadow="0 0 5px rgba(0, 151, 222, 1.0)"),_({...e,[ye]:de})}function ae(){let ye="Auto Scale (Ctrl+Shift+A)",pe=e[ye]||document.querySelector(`[data-title="${ye}"]`),de=!0;pe.style.border=="transparent"?(de=!1,u.on("plotly_relayout",Np(async function(he){if(he["xaxis.range[0]"]==null)return;let xe=await u9(he,u);Gs.update(u,{},xe)},100))):u.removeAllListeners("plotly_relayout"),te(ye,de)}function oe(){let ye="Edit Color (Ctrl+E)",pe=e[ye]||document.querySelector(`[data-title="${ye}"]`),de=!0;pe.style.border=="transparent"&&(de=!1),N(!de),te(ye,de)}return Un.useEffect(()=>{I&&(console.log("activateAutoScale",!I),ae(),R(!1))},[I]),Un.useEffect(()=>{U&&(oe(),B(!1))},[U]),Un.useEffect(()=>{if(A)try{console.log("changeTheme",A);const ye=m==null?void 0:m.data.filter(xe=>{var Re;return(Re=xe==null?void 0:xe.name)==null?void 0:Re.startsWith("Volume")});let pe=!L;window.document.body.style.backgroundColor=pe?"#000":"#fff",m.layout.font={...m.layout.font||{},color:pe?"#fff":"#000"};const de=pe?Pu.sunIcon:Pu.moonIcon;document.querySelector('[data-title="Change Theme"]').getElementsByTagName("path")[0].setAttribute("d",de.path),document.querySelector('[data-title="Change Theme"]').getElementsByTagName("svg")[0].setAttribute("viewBox",de.viewBox);const he={"#e4003a":"#c80000","#00ACFF":"#009600","#009600":"#00ACFF","#c80000":"#e4003a"};ye.forEach(xe=>{xe.type=="bar"&&(xe.marker.color=xe.marker.color.map(Re=>he[Re]||Re))}),m.layout.template=pe?ek:tk,k({...m}),Gs.react(u,m.data,m.layout),O(pe),C(!1)}catch(ye){console.log("error",ye)}},[A]),Un.useEffect(()=>{if(t){O(!0),R(!1);const ye=["Download CSV","Download Chart as Image","Overlay chart from CSV","Add Text","Change Titles","Auto Scale (Ctrl+Shift+A)","Reset Axes"],pe=document.querySelector('[data-title="Autoscale"]');pe&&(pe.getElementsByTagName("path")[0].setAttribute("d",Gs.Icons.home.path),pe.setAttribute("data-title","Reset Axes")),window.MODEBAR=document.getElementsByClassName("modebar-container")[0];const de=window.MODEBAR.getElementsByClassName("modebar-btn");if(window.MODEBAR.style.cssText=`${window.MODEBAR.style.cssText}; display:flex;`,de){let he={};for(let xe=0;xe0&&(k(Re),b(we),Gs.relayout(u,xe))})}},[t]),ni("div",{className:"relative h-full",children:[o&&br("div",{className:"absolute inset-0 flex items-center justify-center z-[100]",children:ni("svg",{className:"animate-spin h-20 w-20 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[br("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),br("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8z"})]})}),ni("div",{id:"loading",className:"saving",children:[br("div",{id:"loading_text",className:"loading_text"}),br("div",{id:"loader",className:"loader"})]}),br(D7,{addOverlay:ye=>{console.log(ye),m.layout.showlegend=!0,k(ye),i(!1)},plotlyData:m,setLoading:a,open:r.name==="overlayChart",close:Q}),br(B7,{updateTitle:ye=>y(ye),updateAxesTitles:ye=>l(ye),defaultTitle:T,plotlyData:m,open:r.name==="titleDialog",close:Q}),br(N7,{popupData:r.name==="textDialog"?r==null?void 0:r.data:null,open:r.name==="textDialog",close:Q,addAnnotation:ye=>Y(ye),deleteAnnotation:ye=>X(ye)}),br(f9,{open:G,onColorChange:K}),br(p9,{open:r.name==="downloadFinished",close:Q}),ni("div",{className:"relative h-full",id:"MainChart",children:[ni("div",{className:"_header relative gap-4 py-2 text-center text-xs flex items-center justify-between px-4 text-white",children:[br("div",{className:"w-1/3",children:br("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"40",fill:"none",viewBox:"0 0 64 40",children:br("path",{fill:"#fff",d:"M61.283 3.965H33.608v27.757h25.699V19.826H37.561v-3.965H63.26V3.965h-1.977zM39.538 23.792h15.815v3.965H37.561v-3.965h1.977zM59.306 9.913v1.983H37.561V7.931h21.745v1.982zM33.606 0h-3.954v3.965H33.606V0zM25.7 3.966H0V15.86h25.7v3.965H3.953v11.896h25.7V3.966h-3.955zm0 21.808v1.983H7.907v-3.965h17.791v1.982zm0-15.86v1.982H3.953V7.931h21.745v1.982zM37.039 35.693v2.952l-.246-.246-.245-.245-.245-.247-.245-.246-.246-.246-.245-.245-.245-.247-.247-.246-.245-.246-.245-.246-.245-.246-.246-.246h-.49v3.936h.49v-3.198l.246.246.245.246.245.246.245.246.246.246.246.246.245.247.246.245.245.246.245.247.245.246.246.245.245.246h.245v-3.936h-.49zM44.938 37.17h-.491v-1.477h-2.944v3.937h3.93v-2.46h-.495zm-2.944-.246v-.739h1.962v.984h-1.962v-.245zm2.944.984v1.23h-2.944V37.66h2.944v.247zM52.835 37.17h-.49v-1.477h-2.946v3.937h3.925v-2.46h-.489zm-2.944-.246v-.739h1.963v.984h-1.965l.002-.245zm2.944.984v1.23H49.89V37.66h2.946v.247zM29.174 35.693H25.739v3.936H29.663v-.491H26.229v-.984h2.943v-.493H26.229v-1.476h3.434v-.492h-.489zM13.37 35.693H9.934v3.937h3.925v-3.937h-.49zm0 .738v2.709h-2.945v-2.955h2.943l.001.246zM21.276 35.693h-3.435v3.937h.491v-1.476h3.434v-2.461h-.49zm0 .738v1.23h-2.944v-1.476h2.944v.246z"})})}),br("p",{className:"font-bold w-1/3 flex flex-col gap-0.5 items-center",children:T}),ni("p",{className:"w-1/3 text-right text-xs",children:[new Intl.DateTimeFormat("en-GB",{dateStyle:"full",timeStyle:"long"}).format(F).replace(/:\d\d /," "),br("br",{}),br("span",{className:"text-grey-400",children:J})]})]}),br("div",{className:h9("w-full sm:pb-12",{"h-[calc(100%-10px)]":d,"h-[calc(100%-50px)]":!d}),children:br(d9,{onInitialized:()=>{if(!u){const ye=document.getElementById("plotlyChart");console.log("plot",ye),ye&&p(ye),ye.globals=Pe}t||i(!0)},className:"w-full h-full",divId:"plotlyChart",data:m.data,layout:m.layout,config:l9({setModal:n,changeTheme:C,autoScaling:R,Loading:a,changeColor:B,downloadFinished:g})})})]})]})}function v9(){const[P,F]=Un.useState(null),[J,ce]=Un.useState({});Un.useEffect(()=>{{const E=setInterval(()=>{if(window.json_data){const e=window.json_data;console.log(e),F(e),clearInterval(E)}},100);return()=>clearInterval(E)}},[]);const D=(E=>{var y,f,l,t;if(!E)return null;let e={added_traces:[],csv_yaxis_id:null,cmd_src_idx:null,cmd_idx:null,cmd_src:"",old_margin:null,title:""},_=(f=(y=E.layout)==null?void 0:y.title)==null?void 0:f.text.replace(/ -/g,"").replace(/-/g,"").replace(/|<\/b>/g,"").replace(/ /g,"_"),w=new Date().toISOString().slice(0,10).replace(/-/g,""),s=new Date().toISOString().slice(11,19).replace(/:/g,"");window.title=`openbb_${_}_${w}_${s}`,E.layout.annotations!=null&&E.layout.annotations.forEach(function(i){if(i.text!=null&&i.text[0]=="/"){e.cmd_src=i.text,e.cmd_idx=E.layout.annotations.indexOf(i),i.text="";let r=E.layout.margin;e.old_margin={...r},r.t!=null&&r.t>40&&(r.t=40),E.cmd=="/stocks/candle"&&(r.r-=50)}}),E.data.forEach(function(i){if(i.name!=null){const r=i.name.length;i.name=i.name+" ",i.hoverlabel={namelength:r}}});let T=((t=(l=E.layout)==null?void 0:l.title)==null?void 0:t.text)||"Interactive Chart";return e.title=T,{data:E,date:new Date,globals:e,cmd:E.command_location,posthog:E.posthog,python_version:E.python_version,pywry_version:E.pywry_version,terminal_version:E.terminal_version,title:T}})(P);if(D){D.posthog.collect_logs&&!J&&ce({api_host:"https://app.posthog.com",autocapture:{css_selector_allowlist:[".ph-capture"]},capture_pageview:!1,loaded:function(w){const s=(D==null?void 0:D.log_id)||"";s!=""&&s!="REPLACE_ME"&&w.identify(s),w.onFeatureFlags(function(){w.isFeatureEnabled("record-pywry",{send_event:!1})||w.stopSessionRecording(),w.isFeatureEnabled("collect-logs-pywry",{send_event:!1})?w.has_opted_out_capturing()&&w.opt_in_capturing():w.opt_out_capturing()})}});const E={INFO:{command:D.cmd,title:D.title,date:D.date,python_version:D.python_version,pywry_version:D.pywry_version,terminal_version:D.terminal_version}},e=br(g9,{json:D.data,date:D.date,cmd:D.cmd,title:D.title,globals:D.globals,info:E});return D.posthog.collect_logs&&J?br(qT,{apiKey:"phc_vhssDAMod5qIplznQ75Kdgz4aB1qPFmeVmfEOZ4hkRw",options:J,children:e}):e}else return br("div",{className:"absolute inset-0 flex items-center justify-center z-[100]",children:ni("svg",{className:"animate-spin h-20 w-20 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[br("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),br("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8z"})]})})}z8.render(br(s_.StrictMode,{children:br(v9,{})}),document.getElementById("root")); +`)},l7=0,Df=[];function u7(P){var F=Un.useRef([]),J=Un.useRef([0,0]),ce=Un.useRef(),Pe=Un.useState(l7++)[0],D=Un.useState(function(){return Tw()})[0],E=Un.useRef(P);Un.useEffect(function(){E.current=P},[P]),Un.useEffect(function(){if(P.inert){document.body.classList.add("block-interactivity-".concat(Pe));var t=Pk([P.lockRef.current],(P.shards||[]).map(Rb),!0).filter(Boolean);return t.forEach(function(i){return i.classList.add("allow-interactivity-".concat(Pe))}),function(){document.body.classList.remove("block-interactivity-".concat(Pe)),t.forEach(function(i){return i.classList.remove("allow-interactivity-".concat(Pe))})}}},[P.inert,P.lockRef.current,P.shards]);var e=Un.useCallback(function(t,i){if("touches"in t&&t.touches.length===2)return!E.current.allowPinchZoom;var r=Qd(t),n=J.current,o="deltaX"in t?t.deltaX:n[0]-r[0],a="deltaY"in t?t.deltaY:n[1]-r[1],u,p=t.target,c=Math.abs(o)>Math.abs(a)?"h":"v";if("touches"in t&&c==="h"&&p.type==="range")return!1;var b=Ob(c,p);if(!b)return!0;if(b?u=c:(u=c==="v"?"h":"v",b=Ob(c,p)),!b)return!1;if(!ce.current&&"changedTouches"in t&&(o||a)&&(ce.current=u),!u)return!0;var d=ce.current||u;return a7(d,i,t,d==="h"?o:a,!0)},[]),_=Un.useCallback(function(t){var i=t;if(!(!Df.length||Df[Df.length-1]!==D)){var r="deltaY"in i?Ib(i):Qd(i),n=F.current.filter(function(u){return u.name===i.type&&u.target===i.target&&o7(u.delta,r)})[0];if(n&&n.should){i.cancelable&&i.preventDefault();return}if(!n){var o=(E.current.shards||[]).map(Rb).filter(Boolean).filter(function(u){return u.contains(i.target)}),a=o.length>0?e(i,o[0]):!E.current.noIsolation;a&&i.cancelable&&i.preventDefault()}}},[]),w=Un.useCallback(function(t,i,r,n){var o={name:t,delta:i,target:r,should:n};F.current.push(o),setTimeout(function(){F.current=F.current.filter(function(a){return a!==o})},1)},[]),s=Un.useCallback(function(t){J.current=Qd(t),ce.current=void 0},[]),T=Un.useCallback(function(t){w(t.type,Ib(t),t.target,e(t,P.lockRef.current))},[]),m=Un.useCallback(function(t){w(t.type,Qd(t),t.target,e(t,P.lockRef.current))},[]);Un.useEffect(function(){return Df.push(D),P.setCallbacks({onScrollCapture:T,onWheelCapture:T,onTouchMoveCapture:m}),document.addEventListener("wheel",_,zf),document.addEventListener("touchmove",_,zf),document.addEventListener("touchstart",s,zf),function(){Df=Df.filter(function(t){return t!==D}),document.removeEventListener("wheel",_,zf),document.removeEventListener("touchmove",_,zf),document.removeEventListener("touchstart",s,zf)}},[]);var f=P.removeScrollBar,l=P.inert;return Un.createElement(Un.Fragment,null,l?Un.createElement(D,{styles:s7(Pe)}):null,f?Un.createElement(Kk,{gapMode:"margin"}):null)}const c7=jk(ww,u7);var Sw=Un.forwardRef(function(P,F){return Un.createElement(f1,iu({},P,{ref:F,sideCar:c7}))});Sw.classNames=f1.classNames;const f7=Sw;var h7=function(P){if(typeof document>"u")return null;var F=Array.isArray(P)?P[0]:P;return F.ownerDocument.body},Ff=new WeakMap,e0=new WeakMap,t0={},Fg=0,Ew=function(P){return P&&(P.host||Ew(P.parentNode))},p7=function(P,F){return F.map(function(J){if(P.contains(J))return J;var ce=Ew(J);return ce&&P.contains(ce)?ce:(console.error("aria-hidden",J,"in not contained inside",P,". Doing nothing"),null)}).filter(function(J){return!!J})},d7=function(P,F,J,ce){var Pe=p7(F,Array.isArray(P)?P:[P]);t0[J]||(t0[J]=new WeakMap);var D=t0[J],E=[],e=new Set,_=new Set(Pe),w=function(T){!T||e.has(T)||(e.add(T),w(T.parentNode))};Pe.forEach(w);var s=function(T){!T||_.has(T)||Array.prototype.forEach.call(T.children,function(m){if(e.has(m))s(m);else{var f=m.getAttribute(ce),l=f!==null&&f!=="false",t=(Ff.get(m)||0)+1,i=(D.get(m)||0)+1;Ff.set(m,t),D.set(m,i),E.push(m),t===1&&l&&e0.set(m,!0),i===1&&m.setAttribute(J,"true"),l||m.setAttribute(ce,"true")}})};return s(F),e.clear(),Fg++,function(){E.forEach(function(T){var m=Ff.get(T)-1,f=D.get(T)-1;Ff.set(T,m),D.set(T,f),m||(e0.has(T)||T.removeAttribute(ce),e0.delete(T)),f||T.removeAttribute(J)}),Fg--,Fg||(Ff=new WeakMap,Ff=new WeakMap,e0=new WeakMap,t0={})}},g7=function(P,F,J){J===void 0&&(J="data-aria-hidden");var ce=Array.from(Array.isArray(P)?P:[P]),Pe=F||h7(P);return Pe?(ce.push.apply(ce,Array.from(Pe.querySelectorAll("[aria-live]"))),d7(ce,Pe,J,"aria-hidden")):function(){return null}};const Cw="Dialog",[Lw,m9]=rk(Cw),[v7,ju]=Lw(Cw),m7=P=>{const{__scopeDialog:F,children:J,open:ce,defaultOpen:Pe,onOpenChange:D,modal:E=!0}=P,e=Un.useRef(null),_=Un.useRef(null),[w=!1,s]=sk({prop:ce,defaultProp:Pe,onChange:D});return Un.createElement(v7,{scope:F,triggerRef:e,contentRef:_,contentId:Pg(),titleId:Pg(),descriptionId:Pg(),open:w,onOpenChange:s,onOpenToggle:Un.useCallback(()=>s(T=>!T),[s]),modal:E},J)},y7="DialogPortal",[y9,Pw]=Lw(y7,{forceMount:void 0}),Gv="DialogOverlay",x7=Un.forwardRef((P,F)=>{const J=Pw(Gv,P.__scopeDialog),{forceMount:ce=J.forceMount,...Pe}=P,D=ju(Gv,P.__scopeDialog);return D.modal?Un.createElement(ey,{present:ce||D.open},Un.createElement(b7,Io({},Pe,{ref:F}))):null}),b7=Un.forwardRef((P,F)=>{const{__scopeDialog:J,...ce}=P,Pe=ju(Gv,J);return Un.createElement(f7,{as:Qm,allowPinchZoom:!0,shards:[Pe.contentRef]},Un.createElement(gh.div,Io({"data-state":Iw(Pe.open)},ce,{ref:F,style:{pointerEvents:"auto",...ce.style}})))}),Fp="DialogContent",_7=Un.forwardRef((P,F)=>{const J=Pw(Fp,P.__scopeDialog),{forceMount:ce=J.forceMount,...Pe}=P,D=ju(Fp,P.__scopeDialog);return Un.createElement(ey,{present:ce||D.open},D.modal?Un.createElement(w7,Io({},Pe,{ref:F})):Un.createElement(T7,Io({},Pe,{ref:F})))}),w7=Un.forwardRef((P,F)=>{const J=ju(Fp,P.__scopeDialog),ce=Un.useRef(null),Pe=Yp(F,J.contentRef,ce);return Un.useEffect(()=>{const D=ce.current;if(D)return g7(D)},[]),Un.createElement(Ow,Io({},P,{ref:Pe,trapFocus:J.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:rf(P.onCloseAutoFocus,D=>{var E;D.preventDefault(),(E=J.triggerRef.current)===null||E===void 0||E.focus()}),onPointerDownOutside:rf(P.onPointerDownOutside,D=>{const E=D.detail.originalEvent,e=E.button===0&&E.ctrlKey===!0;(E.button===2||e)&&D.preventDefault()}),onFocusOutside:rf(P.onFocusOutside,D=>D.preventDefault())}))}),T7=Un.forwardRef((P,F)=>{const J=ju(Fp,P.__scopeDialog),ce=Un.useRef(!1);return Un.createElement(Ow,Io({},P,{ref:F,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:Pe=>{var D;if((D=P.onCloseAutoFocus)===null||D===void 0||D.call(P,Pe),!Pe.defaultPrevented){var E;ce.current||(E=J.triggerRef.current)===null||E===void 0||E.focus(),Pe.preventDefault()}ce.current=!1},onInteractOutside:Pe=>{var D,E;(D=P.onInteractOutside)===null||D===void 0||D.call(P,Pe),Pe.defaultPrevented||(ce.current=!0);const e=Pe.target;((E=J.triggerRef.current)===null||E===void 0?void 0:E.contains(e))&&Pe.preventDefault()}}))}),Ow=Un.forwardRef((P,F)=>{const{__scopeDialog:J,trapFocus:ce,onOpenAutoFocus:Pe,onCloseAutoFocus:D,...E}=P,e=ju(Fp,J),_=Un.useRef(null),w=Yp(F,_);return Lk(),Un.createElement(Un.Fragment,null,Un.createElement(_k,{asChild:!0,loop:!0,trapped:ce,onMountAutoFocus:Pe,onUnmountAutoFocus:D},Un.createElement(yk,Io({role:"dialog",id:e.contentId,"aria-describedby":e.descriptionId,"aria-labelledby":e.titleId,"data-state":Iw(e.open)},E,{ref:w,onDismiss:()=>e.onOpenChange(!1)}))),!1)}),k7="DialogTitle",A7=Un.forwardRef((P,F)=>{const{__scopeDialog:J,...ce}=P,Pe=ju(k7,J);return Un.createElement(gh.h2,Io({id:Pe.titleId},ce,{ref:F}))}),M7="DialogDescription",S7=Un.forwardRef((P,F)=>{const{__scopeDialog:J,...ce}=P,Pe=ju(M7,J);return Un.createElement(gh.p,Io({id:Pe.descriptionId},ce,{ref:F}))}),E7="DialogClose",C7=Un.forwardRef((P,F)=>{const{__scopeDialog:J,...ce}=P,Pe=ju(E7,J);return Un.createElement(gh.button,Io({type:"button"},ce,{ref:F,onClick:rf(P.onClick,()=>Pe.onOpenChange(!1))}))});function Iw(P){return P?"open":"closed"}const L7=m7,P7=x7,O7=_7,I7=A7,R7=S7,zb=C7,Db=({title:P,titleId:F,...J})=>br("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,...J,children:br("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),Rw={margin:"2px 0px 2px 10px",padding:"5px 2px 2px 5px"};function h1({open:P,close:F,title:J,description:ce,children:Pe}){return ni(L7,{open:P,onOpenChange:F,children:[br(P7,{onClick:F,className:"_modal-overlay"}),ni(O7,{className:"_modal",children:[br(I7,{className:"_modal-title",children:J}),br(R7,{className:"_modal_description",children:ce}),br(zb,{children:br(Db,{})}),Pe,br(zb,{className:"_modal-close",onClick:F,children:br(Db,{className:"w-6 h-6"})})]})]})}const Fb=new FileReader,z7={overlaying:"y",side:"left",tickfont:{size:12},tickpadding:5,showgrid:!1,showline:!1,showticklabels:!0,showlegend:!0,zeroline:!1,anchor:"x",type:"linear",autorange:!0};function D7({open:P,close:F,setLoading:J,addOverlay:ce,plotlyData:Pe}){const[D,E]=Un.useState("scatter"),[e,_]=Un.useState("#FFDD00"),[w,s]=Un.useState("#00ACFF"),[T,m]=Un.useState("#FF0000"),[f,l]=Un.useState(""),[t,i]=Un.useState([]),[r,n]=Un.useState([]),[o,a]=Un.useState({}),[u,p]=Un.useState({}),c=["x","open","high","low","close"];let b={scatter:"Scatter (Line)",candlestick:"Candlestick",bar:"Bar"};const[d,v]=Un.useState({});function x(){F(),E("scatter"),l(""),i([]),n([]),a({}),v({})}function g(){var k,h;if(t.length==0){(k=document.getElementById("csv_file"))==null||k.focus(),(h=document.getElementById("csv_file"))==null||h.style.setProperty("border","1px solid red"),document.getElementById("csv_file_warning").style.display="block";return}const y=F7({csvData:t,plotlyData:Pe,yaxisOptions:u,traceType:D,traceColor:e,traceName:f,options:d,increasingColor:w,decreasingColor:T});ce(y),x()}return br(h1,{title:"Overlay Chart",description:"Upload a CSV file to overlay a chart on the main chart.",open:P,close:F,children:ni("div",{id:"popup_csv",className:"popup_content",children:[ni("div",{children:[ni("label",{htmlFor:"csv_file",children:[br("b",{children:"CSV file:"}),br("div",{id:"csv_file_warning",className:"popup_warning",style:{marginLeft:"80px",marginBottom:"10px"},children:"CSV file is required."})]}),br("input",{onChange:y=>{var k,h;if(y.target.files){if(y.target.files[0].type!=="text/csv"){(k=document.getElementById("csv_file"))==null||k.focus(),(h=document.getElementById("csv_file"))==null||h.style.setProperty("border","1px solid red"),document.getElementById("csv_file_warning").style.display="block";return}}else return;r.length>0&&(n([]),a({}),v({}),E("scatter")),Fb.onload=M=>{var G;if(!((G=M.target)!=null&&G.result)||typeof M.target.result!="string")return;let A=M.target.result.split(` +`).map(N=>N.replace(/\r/g,""));const C=A[0].split(","),L=C.map(N=>N.trim().toLowerCase());let O={};for(let N=0;NL.includes(N))&&E("candlestick"),L.includes("close")&&(v({...d,y:C[L.indexOf("close")]}),O.y=C[L.indexOf("close")]);let U=[];for(let N=1;N2&&(j.test(N[0])?N.splice(0,2):j.test(N[N.length-2])&&N.splice(N.length-2,2),B=N.join("_").replace(/openbb_/g,""))}}catch(N){console.log(N)}l(B),v(O),n(C),i(U)},Fb.readAsText(y.target.files[0])},type:"file",id:"csv_file",accept:".csv",style:{marginLeft:10}})]}),ni("div",{style:{marginTop:15},children:[br("label",{htmlFor:"csv_trace_type",children:br("b",{children:"Display data type:"})}),ni("select",{onChange:y=>{E(y.target.value)},id:"csv_trace_type",style:Rw,defaultValue:b[D],children:[D&&br("option",{value:D,children:b[D]},D),Object.keys(b).map(y=>D!==y&&br("option",{value:y,children:b[y]},y))]})]}),ni("div",{style:{marginTop:12},children:[br("label",{htmlFor:"csv_name",children:br("b",{children:"Trace Name:"})}),br("textarea",{id:"csv_name",value:f,onChange:y=>{l(y.target.value)},style:{padding:"5px 2px 2px 5px",width:"100%",maxWidth:"100%",maxHeight:200,marginTop:2},rows:2,cols:20,placeholder:"Enter a name to give this trace"})]}),r.length>0&&ni(tg,{children:[["scatter","bar"].includes(D)&&br("div",{style:{marginTop:15,marginBottom:10},id:"csv_columns",className:"csv_column_container",children:["x","y"].map(y=>ni("div",{style:{marginTop:10,display:"flex",alignItems:"center",justifyContent:"space-between"},children:[ni("label",{htmlFor:`csv_${y}`,style:{width:"100px"},children:[y.toUpperCase()," Axis"]}),ni("select",{onChange:k=>{a({...o,[y]:k.target.value}),v({...d,[y]:k.target.value})},id:`csv_${y}`,style:{width:"100%"},defaultValue:d[y],children:[d[y]&&br("option",{value:d[y],children:d[y]},y),r.map(k=>br("option",{value:k,children:k},k))]})]},y))}),D==="candlestick"&&br("div",{id:"csv_columns",className:"csv_column_container",style:{marginTop:15},children:["x","open","high","low","close"].map(y=>ni("div",{style:{marginTop:10,display:"flex",alignItems:"center",justifyContent:"space-between"},children:[br("label",{htmlFor:`csv_${y}`,style:{width:"100px"},children:y.charAt(0).toUpperCase()+y.slice(1)}),ni("select",{onChange:k=>{a({...o,[y]:k.target.value}),v({...d,[y]:k.target.value})},id:`csv_${y}`,style:{width:"100%"},children:[d[y]&&br("option",{value:d[y],children:d[y]},y),r.map(k=>k!=d[k]&&br("option",{value:k,children:k},k))]})]},y))}),ni("div",{style:{marginTop:20},id:"csv_colors",children:[["scatter","bar"].includes(D)&&ni("div",{children:[br("label",{htmlFor:"csv_color",children:`${D.charAt(0).toUpperCase()}${D.slice(1)} color`}),br("input",{type:"color",id:"csv_color",defaultValue:"#FFDD00",style:{margin:"2px 2px 2px 10px"},onChange:y=>{console.log(y.target.value),_(y.target.value)}})]}),D==="candlestick"&&ni(tg,{children:[br("label",{htmlFor:"csv_increasing",children:"Increasing color"}),br("input",{type:"color",id:"csv_increasing",defaultValue:"#00ACFF",style:{margin:"2px 0px 2px 10px"},onChange:y=>{s(y.target.value)}}),br("label",{htmlFor:"csv_decreasing",style:{marginLeft:15},children:"Decreasing color"}),br("input",{style:{margin:"2px 0px 2px 10px"},type:"color",id:"csv_decreasing",defaultValue:"#FF0000",onChange:y=>{m(y.target.value)}})]})]}),ni("div",{style:{marginTop:20},id:"csv_plot_yaxis_options",children:[D!=="candlestick"&&ni(tg,{children:[br("input",{type:"checkbox",id:"csv_percent_change",name:"csv_plot_yaxis_check",style:{marginBottom:2},onChange:y=>{p({...u,percentChange:y.target.checked,sameYaxis:!1})},checked:!u.sameYaxis&&u.percentChange}),br("label",{htmlFor:"csv_percent_change",style:{marginLeft:5},children:"Plot as percent change from first value"}),br("br",{})]}),br("input",{style:{marginTop:2},type:"checkbox",id:"csv_same_yaxis",name:"csv_plot_yaxis_check",onChange:y=>{p({...u,sameYaxis:y.target.checked,percentChange:!1})},checked:!u.percentChange&&u.sameYaxis}),br("label",{htmlFor:"csv_same_yaxis",style:{marginLeft:5},children:"Share Y-axis"}),D==="bar"&&ni("div",{style:{marginTop:2},id:"csv_bar_orientation",children:[br("input",{type:"checkbox",id:"csv_bar_horizontal",onChange:y=>{v({...d,orientation:y.target.checked?"h":"v"})}}),br("label",{htmlFor:"csv_bar_horizontal",style:{marginLeft:5},children:"Plot horizontally"})]})]})]}),br("br",{}),ni("div",{style:{float:"right",marginTop:20},children:[br("button",{className:"_btn-tertiary",id:"csv_cancel",onClick:x,children:"Cancel"}),br("button",{className:"_btn",id:"csv_submit",onClick:g,children:"Submit"})]})]})})}function F7({csvData:P,plotlyData:F,yaxisOptions:J,traceType:ce,traceColor:Pe,traceName:D,options:E,increasingColor:e,decreasingColor:_}){let w=F.data[0];w.xaxis==null&&(w.xaxis="x"),w.yaxis==null&&(w.yaxis="y");let s=w.yaxis,T,f=Object.keys(F.layout).filter(r=>r.startsWith("yaxis")).map(r=>F.layout[r]).filter(r=>r.side=="left"&&(r.overlaying=="y"||r.fixedrange!=null&&r.fixedrange==!0)).length>0?" ":"";if(J.sameYaxis!==!0){const r=Object.keys(F.layout).filter(n=>n.startsWith("yaxis")).map(n=>F.layout[n]);T=`y${r.length+1}`,s=`yaxis${r.length+1}`,console.log(`yaxis: ${T} ${s}`),F.layout[s]={...z7,title:{text:D,font:{size:14},standoff:0},ticksuffix:f,layer:"below traces"}}else T=w.yaxis.replace("yaxis","y");const l={type:ce,name:D,showlegend:!0,yaxis:T};let t={};if(["scatter","bar"].includes(ce)){const r=P.findIndex(n=>n[E.y]!=null&&n[E.y]!=0);t={...l,x:P.map(n=>n[E.x]),y:P.map(function(n){return J.percentChange&&ce==="scatter"?(n[E.y]-P[r][E.y])/P[r][E.y]:n[E.y]}),customdata:P.map(n=>n[E.y]),hovertemplate:"%{customdata:.2f}",connectgaps:!0,marker:{color:Pe}},ce==="bar"&&(t.orientation=E.orientation,t.marker.opacity=.7,delete t.connectgaps,delete t.hovertemplate,delete t.customdata)}else ce==="candlestick"&&(t={...l,x:P.map(r=>r[E.x]),open:P.map(r=>r[E.open]),high:P.map(r=>r[E.high]),low:P.map(r=>r[E.low]),close:P.map(r=>r[E.close]),increasing:{line:{color:e}},decreasing:{line:{color:_}}});return{...F,data:[...F.data,t]}}function B7({plotlyData:P,open:F,close:J,defaultTitle:ce,updateTitle:Pe,updateAxesTitles:D}){const[E,e]=Un.useState(ce),_=Object.keys(P.layout||{}).filter(m=>m.startsWith("yaxis")&&P.layout[m].range!=null),w=Object.keys(P.layout||{}).filter(m=>{var f;return m.startsWith("xaxis")&&P.layout[m].showticklabels!=null&&((f=P.layout[m])==null?void 0:f.anchor)}),[s,T]=Un.useState({});return br(h1,{title:"Chart Titles",description:"Change the titles on the chart.",open:F,close:J,children:ni("div",{id:"popup_title",className:"popup_content",children:[ni("div",{style:{display:"flex",flexDirection:"column",gap:0},children:[ni("div",{children:[br("label",{htmlFor:"title_text",children:br("b",{children:"Title:"})}),br("textarea",{id:"title_text",style:{...Rw,width:"100%",maxWidth:"100%",maxHeight:"200px",marginTop:"8px",marginLeft:"0px"},rows:2,cols:20,value:E,onChange:m=>e(m.target.value)})]}),br("div",{id:"xaxis_div",className:"csv_column_container",style:{marginTop:5,marginBottom:-5},children:w.map((m,f)=>{var l,t;return ni("div",{style:{marginTop:5,marginBottom:5},children:[br("label",{htmlFor:`title_${m}`,children:f===0?br("b",{children:"X axis:"}):ni("b",{children:["X axis ",f+1,":"]})}),br("input",{id:`title_${m}`,style:{marginLeft:"0px",padding:"5px 2px 2px 5px"},type:"text",defaultValue:((t=(l=P==null?void 0:P.layout[m])==null?void 0:l.title)==null?void 0:t.text)||"",onChange:i=>{T({...s,[m]:i.target.value})}})]},m)})}),br("div",{id:"yaxis_div",className:"csv_column_container",style:{marginTop:5,marginBottom:5},children:_.map((m,f)=>{var l,t;return ni("div",{style:{marginTop:10},children:[br("label",{htmlFor:`title_${m}`,children:f===0?br("b",{children:"Y axis:"}):ni("b",{children:["Y axis ",f+1,":"]})}),br("input",{id:`title_${m}`,style:{marginLeft:"0px",padding:"5px 2px 2px 5px"},type:"text",defaultValue:((t=(l=P==null?void 0:P.layout[m])==null?void 0:l.title)==null?void 0:t.text)||"",onChange:i=>{T({...s,[m]:i.target.value})}})]},m)})})]}),ni("div",{style:{float:"right",marginTop:20},children:[br("button",{className:"_btn-tertiary ph-capture",id:"title_cancel",onClick:J,children:"Cancel"}),br("button",{className:"_btn ph-capture",id:"title_submit",onClick:()=>{Pe(E),D(s),J()},children:"Submit"})]})]})})}const Bb={padding:"5px 2px 2px 5px",margin:"2px 0"};function N7({open:P,close:F,addAnnotation:J,deleteAnnotation:ce,popupData:Pe}){var l,t,i,r,n;const D={text:"",color:"#0088CC",size:18,bordercolor:"#822661",yanchor:"above"},[E,e]=Un.useState(D),[_,w]=Un.useState(D);Pe&&Pe!==E&&Pe.annotation&&(Pe.annotation=(Pe==null?void 0:Pe.annotation)||{},e(Pe),w(Pe));function s(){console.log("closing"),e(D),w(D),F()}function T(o){console.log(o.target.id.replace("addtext_",""),o.target.value);const a=o.target.id.replace("addtext_",""),u=o.target.value;w({..._,[a]:u})}function m(){console.log("submitting",_),_.text!==""?(E!=null&&E.annotation&&w({..._,annotation:E.annotation}),J(_),F()):(document.getElementById("popup_textarea_warning").style.display="block",document.getElementById("addtext_text").style.border="1px solid red")}function f(){ce(E),s()}return br(h1,{title:"Add Text to Chart",description:"Change the titles on the chart.",open:P,close:s,children:ni("div",{id:"popup_title",className:"popup_content",children:[ni("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[ni("div",{style:{marginBottom:20},children:[ni("label",{htmlFor:"popup_text",children:[br("b",{children:"Text:"}),br("div",{id:"popup_textarea_warning",className:"popup_warning",children:"Text is required"})]}),br("textarea",{id:"addtext_text",style:{...Bb,width:"100%",maxWidth:"100%",maxHeight:"200px",marginTop:"8px"},rows:4,cols:50,placeholder:"Enter text here",onChange:T,defaultValue:((l=E==null?void 0:E.annotation)==null?void 0:l.text)||(_==null?void 0:_.text)})]}),ni("div",{style:{display:"flex",gap:15,alignItems:"center",flexWrap:"wrap",columnCount:2,justifyContent:"space-between",marginBottom:20},children:[br("label",{htmlFor:"addtext_color",children:br("b",{children:"Font color"})}),br("input",{type:"color",id:"addtext_color",style:{margin:"2px 2px 2px 15px"},defaultValue:((t=E==null?void 0:E.annotation)==null?void 0:t.color)||(_==null?void 0:_.color),onChange:T}),br("label",{htmlFor:"addtext_bordercolor",style:{marginLeft:20},children:br("b",{children:"Border color"})}),br("input",{type:"color",id:"addtext_bordercolor",style:{margin:"2px 2px 10px 15px"},defaultValue:((i=E==null?void 0:E.annotation)==null?void 0:i.bordercolor)||(_==null?void 0:_.bordercolor),onChange:T}),br("label",{htmlFor:"addtext_size",children:br("b",{children:"Font size"})}),br("input",{style:{...Bb,width:"52px",margin:"0px 0px 0px 2px"},type:"number",id:"addtext_size",onChange:T,defaultValue:((r=E==null?void 0:E.annotation)==null?void 0:r.size)||(_==null?void 0:_.size)}),ni("div",{children:[br("label",{htmlFor:"addtext_yanchor",style:{marginRight:31},children:br("b",{children:"Position"})}),ni("select",{id:"addtext_yanchor",name:"yanchor",style:{width:"100px"},defaultValue:((n=E==null?void 0:E.annotation)==null?void 0:n.yanchor)||(_==null?void 0:_.yanchor),onChange:T,children:[br("option",{value:"above",children:"Above"}),br("option",{value:"below",children:"Below"})]})]})]})]}),ni("div",{style:{float:"right",marginTop:20},children:[br("button",{className:"_btn-tertiary ph-capture",id:"title_cancel",onClick:s,children:"Cancel"}),br("button",{className:"_btn ph-capture",id:"title_delete",onClick:f,children:"Delete"}),br("button",{className:"_btn ph-capture",id:"title_submit",onClick:m,children:"Submit"})]})]})})}function j7({plotData:P,popup_data:F,current_text:J}){var _;let ce=F.x,Pe=F.y,D=F.yref,E=((_=P==null?void 0:P.layout)==null?void 0:_.annotations)||[],e=-1;for(let w=0;wx!=null)),P.layout.dragmode="pan",J({...P,...a.update}),s.removeAllListeners("plotly_click")};F.text=F.text.replace(/\n/g,"
");let m,f=!1;if(F.annotation){console.log("data",F),m={x:F.annotation.x,y:F.annotation.y,yref:F.annotation.yref,yanchor:F.annotation.yi.x==F.annotation.x&&i.y==F.annotation.y&&i.yref==F.annotation.yref);console.log("ohlcAnnotationIndex",t),t==-1?_([...e,l.annotation]):(e[t]=l.annotation,_(e))}D([...w,l.annotation].filter(t=>t!=null)),P.layout.dragmode="pan",J({...P,...l.update}),Pe({});return}s.on("plotly_clickannotation",l=>{console.log("plotly_clickannotation",l);let t=l.annotation;if(t.text==null){console.log("annotation.text is undefined");return}console.log("annotation.text",t.text),t.text=t.text.replace(/
/g,` +`);let i={x:t.x,y:t.y,high:(t==null?void 0:t.high)??void 0,low:(t==null?void 0:t.low)??void 0,yanchor:t.y'),!0):F?P.some(function(J){return F.includes(J)})||P.includes("*"):!0}var X7=function(F,J,ce){ce===void 0&&(ce=!1);var Pe=J.alt,D=J.meta,E=J.mod,e=J.shift,_=J.ctrl,w=J.keys,s=F.key,T=F.code,m=F.ctrlKey,f=F.metaKey,l=F.shiftKey,t=F.altKey,i=sc(T),r=s.toLowerCase();if(!ce){if(Pe===!t&&r!=="alt"||e===!l&&r!=="shift")return!1;if(E){if(!f&&!m)return!1}else if(D===!f&&r!=="meta"&&r!=="os"||_===!m&&r!=="ctrl"&&r!=="control")return!1}return w&&w.length===1&&(w.includes(r)||w.includes(i))?!0:w?q7(w):!w},$7=Un.createContext(void 0),J7=function(){return Un.useContext($7)};function Nw(P,F){return P&&F&&typeof P=="object"&&typeof F=="object"?Object.keys(P).length===Object.keys(F).length&&Object.keys(P).reduce(function(J,ce){return J&&Nw(P[ce],F[ce])},!0):P===F}var K7=Un.createContext({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),Q7=function(){return Un.useContext(K7)};function e9(P){var F=Un.useRef(void 0);return Nw(F.current,P)||(F.current=P),F.current}var jb=function(F){F.stopPropagation(),F.preventDefault(),F.stopImmediatePropagation()},t9=typeof window<"u"?Un.useLayoutEffect:Un.useEffect;function Ku(P,F,J,ce){var Pe=Un.useRef(null),D=Un.useRef(!1),E=J instanceof Array?ce instanceof Array?void 0:ce:J,e=P instanceof Array?P.join(E==null?void 0:E.splitKey):P,_=J instanceof Array?J:ce instanceof Array?ce:void 0,w=Un.useCallback(F,_??[]),s=Un.useRef(w);_?s.current=w:s.current=F;var T=e9(E),m=Q7(),f=m.enabledScopes,l=J7();return t9(function(){if(!((T==null?void 0:T.enabled)===!1||!Y7(f,T==null?void 0:T.scopes))){var t=function(a,u){var p;if(u===void 0&&(u=!1),!(Z7(a)&&!Bw(a,T==null?void 0:T.enableOnFormTags))&&!(T!=null&&T.ignoreEventWhen!=null&&T.ignoreEventWhen(a))){if(Pe.current!==null&&document.activeElement!==Pe.current&&!Pe.current.contains(document.activeElement)){jb(a);return}(p=a.target)!=null&&p.isContentEditable&&!(T!=null&&T.enableOnContentEditable)||Bg(e,T==null?void 0:T.splitKey).forEach(function(c){var b,d=Ng(c,T==null?void 0:T.combinationKey);if(X7(a,d,T==null?void 0:T.ignoreModifiers)||(b=d.keys)!=null&&b.includes("*")){if(u&&D.current)return;if(G7(a,d,T==null?void 0:T.preventDefault),!W7(a,d,T==null?void 0:T.enabled)){jb(a);return}s.current(a,d),u||(D.current=!0)}})}},i=function(a){a.key!==void 0&&(Dw(sc(a.code)),((T==null?void 0:T.keydown)===void 0&&(T==null?void 0:T.keyup)!==!0||T!=null&&T.keydown)&&t(a))},r=function(a){a.key!==void 0&&(Fw(sc(a.code)),D.current=!1,T!=null&&T.keyup&&t(a,!0))},n=Pe.current||(E==null?void 0:E.document)||document;return n.addEventListener("keyup",r),n.addEventListener("keydown",i),l&&Bg(e,T==null?void 0:T.splitKey).forEach(function(o){return l.addHotkey(Ng(o,T==null?void 0:T.combinationKey,T==null?void 0:T.description))}),function(){n.removeEventListener("keyup",r),n.removeEventListener("keydown",i),l&&Bg(e,T==null?void 0:T.splitKey).forEach(function(o){return l.removeHotkey(Ng(o,T==null?void 0:T.combinationKey,T==null?void 0:T.description))})}}},[e,T,f]),Pe}var jw={exports:{}};(function(P){(function(F){var J=o(),ce=a(),Pe=u(),D=p(),E={imagePlaceholder:void 0,cacheBust:!1},e={toSvg:_,toPng:s,toJpeg:T,toBlob:m,toPixelData:w,impl:{fontFaces:Pe,images:D,util:J,inliner:ce,options:{}}};P.exports=e;function _(c,b){return b=b||{},f(b),Promise.resolve(c).then(function(v){return t(v,b.filter,!0)}).then(i).then(r).then(d).then(function(v){return n(v,b.width||J.width(c),b.height||J.height(c))});function d(v){return b.bgcolor&&(v.style.backgroundColor=b.bgcolor),b.width&&(v.style.width=b.width+"px"),b.height&&(v.style.height=b.height+"px"),b.style&&Object.keys(b.style).forEach(function(x){v.style[x]=b.style[x]}),v}}function w(c,b){return l(c,b||{}).then(function(d){return d.getContext("2d").getImageData(0,0,J.width(c),J.height(c)).data})}function s(c,b){return l(c,b||{}).then(function(d){return d.toDataURL()})}function T(c,b){return b=b||{},l(c,b).then(function(d){return d.toDataURL("image/jpeg",b.quality||1)})}function m(c,b){return l(c,b||{}).then(J.canvasToBlob)}function f(c){typeof c.imagePlaceholder>"u"?e.impl.options.imagePlaceholder=E.imagePlaceholder:e.impl.options.imagePlaceholder=c.imagePlaceholder,typeof c.cacheBust>"u"?e.impl.options.cacheBust=E.cacheBust:e.impl.options.cacheBust=c.cacheBust}function l(c,b){return _(c,b).then(J.makeImage).then(J.delay(100)).then(function(v){var x=d(c);return x.getContext("2d").drawImage(v,0,0),x});function d(v){var x=document.createElement("canvas");if(x.width=b.width||J.width(v),x.height=b.height||J.height(v),b.bgcolor){var g=x.getContext("2d");g.fillStyle=b.bgcolor,g.fillRect(0,0,x.width,x.height)}return x}}function t(c,b,d){if(!d&&b&&!b(c))return Promise.resolve();return Promise.resolve(c).then(v).then(function(y){return x(c,y,b)}).then(function(y){return g(c,y)});function v(y){return y instanceof HTMLCanvasElement?J.makeImage(y.toDataURL()):y.cloneNode(!1)}function x(y,k,h){var M=y.childNodes;if(M.length===0)return Promise.resolve(k);return A(k,J.asArray(M),h).then(function(){return k});function A(C,L,O){var I=Promise.resolve();return L.forEach(function(R){I=I.then(function(){return t(R,O)}).then(function(U){U&&C.appendChild(U)})}),I}}function g(y,k){if(!(k instanceof Element))return k;return Promise.resolve().then(h).then(M).then(A).then(C).then(function(){return k});function h(){L(window.getComputedStyle(y),k.style);function L(O,I){O.cssText?I.cssText=O.cssText:R(O,I);function R(U,B){J.asArray(U).forEach(function(G){B.setProperty(G,U.getPropertyValue(G),U.getPropertyPriority(G))})}}}function M(){[":before",":after"].forEach(function(O){L(O)});function L(O){var I=window.getComputedStyle(y,O),R=I.getPropertyValue("content");if(R===""||R==="none")return;var U=J.uid();k.className=k.className+" "+U;var B=document.createElement("style");B.appendChild(G(U,O,I)),k.appendChild(B);function G(N,j,V){var H="."+N+":"+j,ee=V.cssText?Q(V):Y(V);return document.createTextNode(H+"{"+ee+"}");function Q(X){var K=X.getPropertyValue("content");return X.cssText+" content: "+K+";"}function Y(X){return J.asArray(X).map(K).join("; ")+";";function K(te){return te+": "+X.getPropertyValue(te)+(X.getPropertyPriority(te)?" !important":"")}}}}}function A(){y instanceof HTMLTextAreaElement&&(k.innerHTML=y.value),y instanceof HTMLInputElement&&k.setAttribute("value",y.value)}function C(){k instanceof SVGElement&&(k.setAttribute("xmlns","http://www.w3.org/2000/svg"),k instanceof SVGRectElement&&["width","height"].forEach(function(L){var O=k.getAttribute(L);O&&k.style.setProperty(L,O)}))}}}function i(c){return Pe.resolveAll().then(function(b){var d=document.createElement("style");return c.appendChild(d),d.appendChild(document.createTextNode(b)),c})}function r(c){return D.inlineAll(c).then(function(){return c})}function n(c,b,d){return Promise.resolve(c).then(function(v){return v.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),new XMLSerializer().serializeToString(v)}).then(J.escapeXhtml).then(function(v){return''+v+""}).then(function(v){return''+v+""}).then(function(v){return"data:image/svg+xml;charset=utf-8,"+v})}function o(){return{escape:C,parseExtension:b,mimeType:d,dataAsUrl:A,isDataUrl:v,canvasToBlob:g,resolveUrl:y,getAndEncode:M,uid:k(),delay:L,asArray:O,escapeXhtml:I,makeImage:h,width:R,height:U};function c(){var G="application/font-woff",N="image/jpeg";return{woff:G,woff2:G,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:N,jpeg:N,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"}}function b(G){var N=/\.([^\.\/]*?)$/g.exec(G);return N?N[1]:""}function d(G){var N=b(G).toLowerCase();return c()[N]||""}function v(G){return G.search(/^(data:)/)!==-1}function x(G){return new Promise(function(N){for(var j=window.atob(G.toDataURL().split(",")[1]),V=j.length,H=new Uint8Array(V),ee=0;ee{if(P)return i9({fileHandle:P,blob:F})},i9=async({fileHandle:P,blob:F})=>{const J=await P.createWritable();await J.write(F),await J.close()},a9=[{description:"PNG Image",accept:{"image/png":[".png"]}},{description:"JPEG Image",accept:{"image/jpeg":[".jpeg"]}},{description:"SVG Image",accept:{"image/svg+xml":[".svg"]}}],Vw=({filename:P,is_image:F})=>{try{if("showSaveFilePicker"in window){const J={suggestedName:P,types:F?a9:[{description:"CSV File",accept:{"image/csv":[".csv"]}}],excludeAcceptAllOption:!0};return showSaveFilePicker(J)}}catch(J){console.error(J)}return new Promise(J=>{J(null)})},ty=(P,F,J)=>{try{if(J===null)throw new Error("Cannot access filesystem");return r9({fileHandle:J,blob:P})}catch(ce){console.error("oops, something went wrong!",ce);const Pe=URL.createObjectURL(P),D=document.createElement("a");D.setAttribute("href",Pe),D.setAttribute("download",F),D.style.visibility="hidden",document.body.appendChild(D),D.click(),document.body.removeChild(D)}return new Promise(ce=>{ce(!0)})};async function Ub(P,F){const J=P.data;let ce=[];const Pe=[],D="title"in P.layout.xaxis&&P.layout.xaxis.title.text!==void 0?P.layout.xaxis.title.text:"x",E="title"in P.layout.yaxis&&P.layout.yaxis.title.text!==void 0?P.layout.yaxis.title.text:"y";return J.forEach(function(e){e.type==="candlestick"&&(ce.length===0&&(ce=["Date","Open","High","Low","Close"]),e.x.forEach(function(_,w){Pe.push([_,e.open[w],e.high[w],e.low[w],e.close[w]])})),["scatter","bar"].includes(e.type)&&(ce.length===0&&ce.push(D),ce.push(e.name!==void 0?e.name:E),e.x.forEach(function(_,w){Pe[w]===void 0&&(Pe[w]=[_]),Pe[w].push(e.y[w])}))}),await o9(ce,Pe,F)}async function o9(P,F,J){const ce=P,Pe=F.map(w=>w.map(s=>s==null?"":typeof s=="object"?JSON.stringify(s):s.toString().replace(/"/g,'""'))),E=[ce,...Pe].map(w=>w.join(",")).join(` +`),e=new Blob([E],{type:"text/csv;charset=utf-8;"}),_=`${window.title}.csv`;try{const w=await Vw({filename:_});await Bp("Saving CSV"),Np(async function(){ty(e,_,w).then(async function(){await new Promise(s=>setTimeout(s,1500)),w||J(!0),await Bp("",!0)})},2)()}catch(w){console.error(w)}}function Bp(P,F){const J=window.document.getElementById("loading"),ce=window.document.getElementById("loading_text");return new Promise(Pe=>{F?J.classList.remove("show"):(ce.innerHTML=P,J.classList.add("show"));const D=setInterval(function(){(F?!J.classList.contains("show"):J.classList.contains("show"))&&(clearInterval(D),Pe(!0))},.01)})}const Np=(P,F)=>{let J;return function(){const ce=this,Pe=arguments;clearTimeout(J),J=setTimeout(()=>P.apply(ce,Pe),F)}},s9={yref:"paper",xref:"paper",x:1,y:0,text:"OpenBB Terminal",font_size:17,font_color:"gray",opacity:.5,xanchor:"right",yanchor:"bottom",yshift:-80,xshift:40};async function Vb(P,F,J=!1){const ce=document.getElementById("plotlyChart");J&&(ce.layout.annotations.push(s9),ce.globals.cmd_idx!==void 0&&ce.globals.cmd_src!==void 0&&(ce.layout.annotations[ce.globals.cmd_idx].text=ce.globals.cmd_src),Gs.relayout(ce,{"title.text":ce.globals.title,margin:ce.globals.old_margin})),J||(ce.globals.cmd_idx!==void 0&&ce.globals.cmd_src!==void 0&&(ce.layout.annotations[ce.globals.cmd_idx].text=""),ce.layout.annotations.splice(F,1),Gs.relayout(ce,{"title.text":"",margin:P}))}async function Hw(P,F,J){const ce=document.getElementById(P);if(["svg","pdf"].includes(J)){const Pe=document.getElementById("plotlyChart"),D=Pe.layout.margin,E=Pe.layout.annotations.length;await Vb(D,E,!0),Gs.downloadImage(Pe,{format:"svg",height:Pe.clientHeight,width:Pe.clientWidth,filename:window.title}),await Vb(D,E,!1),await Bp("",!0);return}Np(async function(){Uw.toBlob(ce).then(function(Pe){ty(Pe,F,null)})},2)()}async function Hb(P,F,J,ce){const Pe=document.getElementById(P),D=`${window.title}.png`;try{J(!0);const E=await Vw({filename:D,is_image:!0});let e="png";if(E!==null&&(e=E.name.split(".").pop()),await Bp(`Saving ${e.toUpperCase()}`),["svg","pdf"].includes(e)){await Hw(P,D,e),F(!1),J(!1),E||ce(!0);return}Np(async function(){Uw.toBlob(Pe).then(function(_){ty(_,D,E).then(async function(){await Bp("",!0),F(!1),J(!1),E||ce(!0)})})},2)()}catch(E){console.error(E),F(!1),J(!1)}J(!1)}function rc(P=!0){return new Promise(F=>{window.MODEBAR||(window.MODEBAR=window.document.getElementsByClassName("modebar-container")[0],window.MODEBAR.style.cssText=`${window.MODEBAR.style.cssText}; display:flex;`),window.MODEBAR&&(window.MODEBAR.style.cssText.includes("display: none")||!P?window.MODEBAR.style.cssText=`${window.MODEBAR.style.cssText}; display:flex;`:window.MODEBAR.style.cssText=`${window.MODEBAR.style.cssText}; display:none;`,F(!0))})}function l9({setModal:P,changeTheme:F,autoScaling:J,Loading:ce,changeColor:Pe,downloadFinished:D}){return Ku("ctrl+shift+t",()=>{P({name:"titleDialog"})},{preventDefault:!0}),Ku("ctrl+t",()=>{P({name:"textDialog"})},{preventDefault:!0}),Ku("ctrl+o",()=>{P({name:"overlayChart"})},{preventDefault:!0}),Ku(["ctrl+shift+h","ctrl+h"],()=>{rc()},{preventDefault:!0}),Ku("ctrl+e",()=>{Pe(!0)},{preventDefault:!0}),Ku("ctrl+shift+s",async()=>{P({name:"downloadCsv"}),await Ub(document.getElementById("plotlyChart"),D)},{preventDefault:!0}),Ku("ctrl+s",async()=>{rc(),Hb("MainChart",rc,ce,D)},{preventDefault:!0}),Ku("ctrl+w",()=>{window.close()},{preventDefault:!0}),{plotGlPixelRatio:1,scrollZoom:!0,responsive:!0,displaylogo:!1,displayModeBar:!0,modeBarButtonsToRemove:["lasso2d","select2d","downloadImage"],modeBarButtons:[[{name:"Download CSV (Ctrl+Shift+S)",icon:Pu.downloadCsv,click:async function(e){await Ub(e,D)}},{name:"Download Chart as Image (Ctrl+S)",icon:Pu.downloadImage,click:async function(){rc(),await Hb("MainChart",rc,ce,D)}}],[{name:"Edit Color (Ctrl+E)",icon:Pu.changeColor,click:function(){Pe(!0)}},"drawline","drawopenpath","drawcircle","drawrect","eraseshape"],[{name:"Overlay chart from CSV (Ctrl+O)",icon:Pu.plotCsv,click:function(){P({name:"overlayChart"})}},{name:"Add Text (Ctrl+T)",icon:Pu.addText,click:function(){P({name:"textDialog",data:{text:""}})}},{name:"Change Titles (Ctrl+Shift+T)",icon:Pu.changeTitle,click:function(){P({name:"titleDialog"})}},{name:"Change Theme",icon:Pu.sunIcon,click:function(){F(!0)}}],["hoverClosestCartesian","hoverCompareCartesian","toggleSpikelines"],[{name:"Auto Scale (Ctrl+Shift+A)",icon:Gs.Icons.autoscale,click:function(){J(!0)}},"zoomIn2d","zoomOut2d","autoScale2d","zoom2d","pan2d"]]}}async function u9(P,F){try{if(P["xaxis.range[0]"]!=null){const J=P["xaxis.range[0]"],ce=P["xaxis.range[1]"];let Pe={},D,E;const e=F.data.filter(s=>s.yaxis!=null),_=[...new Set(e.map(s=>s.yaxis||s.y!=null||s.type=="candlestick"))],w=s=>F.data.filter(T=>T.yaxis==s&&(T.y||T.type=="candlestick"));return _.forEach(s=>{if(typeof s!="string")return;let T="yaxis"+s.replace("y",""),m=[],f=[],l=F.layout[T].type=="log";w(s).forEach(r=>{let n=r.x;l=F.layout[T].type=="log";let o=r.y!=null?r.y:[],a=r.type=="candlestick"?r.low:[],u=r.type=="candlestick"?r.high:[];l&&(o=o.map(Math.log10),r.type=="candlestick"&&(a=r.low.map(Math.log10),u=r.high.map(Math.log10)));let p=n.map((c,b)=>{let d=null;return c>=J&&c<=ce&&(r.y!=null&&(d=o[b]),r.type=="candlestick"&&(m.push(a[b]),m.push(u[b]))),d});f=f.concat(p)}),f=f.filter(r=>r!=null&&r!=null),D=Math.min(...f),E=Math.max(...f),m.length>0&&(m=m.filter(r=>r!=null&&r!=null),D=Math.min(...m),E=Math.max(...m));let t=E,i=F.layout[T].fixedrange!=null&&F.layout[T].fixedrange==!0;if(D!=null&&E!=null){let r=E-D,n=.15;if(m.length>0&&(n=.3),D-=r*n,E+=r*n,i){if(F.layout[T].tickvals!=null){let a=t,u=-3,p=Math.round(a*.2,u),c=[2,5,6,7,8,9,10],b=[1,4,5,6,7,8,9];for(let x=0;xc[x]&&(u=-b[x],p=Math.round(a*.2,u));let d=[Math.floor(p),Math.floor(p*2),Math.floor(p*3),Math.floor(p*4)],v=[0,Math.floor(a*7)];Pe[T+".tickvals"]=d,Pe[T+".range"]=v,Pe[T+".tickformat"]=".2s";return}D=0,E=F.layout[T].range[1]}Pe[T+".range"]=[D,E]}}),Pe}}catch(J){console.log(`Error in AutoScaling: ${J}`)}return{}}async function c9({plotData:P,volumeBars:F,setMaximizePlot:J}){const ce=Object.keys(P.layout).filter(s=>s.startsWith("xaxis")).filter(s=>P.layout[s].showticklabels||P.layout[s].matches==null),Pe=P.data.filter(s=>{var T;return(T=s==null?void 0:s.name)==null?void 0:T.startsWith("Volume")});let D={},E=F||{old_nticks:{}};const e=window.innerWidth,_=window.innerHeight;let w=_>420&&e<920?8:_>420&&e<500?9:7;return e<750?(Pe.forEach(s=>{s.type=="bar"&&(s.opacity=1,s.marker.line.width=.09,F.yaxis==null&&(E.yaxis="yaxis"+s.yaxis.replace("y",""),D[E.yaxis+".tickfont.size"]=w,E.tickfont=P.layout[E.yaxis].tickfont||{},P.layout.margin.l-=40))}),ce.forEach(s=>{var T;((T=F.old_nticks)==null?void 0:T[s])==null&&(D[s+".nticks"]=6,E.old_nticks[s]=P.layout[s].nticks||10)}),J(!0),await rc()):window.MODEBAR.style.cssText.includes("display: none")&&(await rc(!1),J(!1),F.old_nticks!=null&&ce.forEach(s=>{F.old_nticks[s]!=null&&(D[s+".nticks"]=E.old_nticks[s],E.old_nticks[s]=void 0)}),F.yaxis!=null&&Pe.forEach(s=>{s.type=="bar"&&(s.opacity=.5,s.marker.line.width=.2,D[E.yaxis+".tickfont.size"]=E.tickfont.size+3,P.layout.margin.l+=40,E.yaxis=void 0)})),{volume_update:E,layout_update:D,plotData:P}}function f9({open:P,onColorChange:F}){const[J,ce]=Un.useState(!1);function Pe(D){F(D)}return P&&!J&&ce(!0),!P&&J&&ce(!1),Un.useEffect(()=>{if(J){let D=function(e){let _=0,w=0,s=0,T=0;document.getElementById(e.id+"_header")?document.getElementById(e.id+"_header").onmousedown=m:e.onmousedown=m;function m(t){t=t||window.event,t.preventDefault(),s=t.clientX,T=t.clientY,document.onmouseup=l,document.onmousemove=f}function f(t){t=t||window.event,t.preventDefault(),_=s-t.clientX,w=T-t.clientY,s=t.clientX,T=t.clientY,e.style.top=e.offsetTop-w+"px",e.style.left=e.offsetLeft-_+"px"}function l(){document.onmouseup=null,document.onmousemove=null}},E=document.getElementById("changecolor");E.style.display="block",E.style.width=null,D(E)}else document.getElementById("changecolor").style.display="none"},[J]),br("div",{id:"changecolor",children:br("div",{id:"changecolor_header",children:br("input",{type:"color",id:"picked_color",value:"#00ACFF",onChange:D=>{let E=D.target.value;Pe(E)}})})})}function qw(P){var F,J,ce="";if(typeof P=="string"||typeof P=="number")ce+=P;else if(typeof P=="object")if(Array.isArray(P))for(F=0;F{ce.preventDefault(),window.pywry.open_file(J)},children:J})]})})}),br("div",{style:{float:"right",marginTop:20},children:br("button",{className:"_btn",style:{padding:"8px 16px",width:"100%"},onClick:F,children:"Close"})})]})})}const d9=QT(ZT);function g9({json:P,date:F,cmd:J,title:ce,globals:Pe,theme:D,info:E}){var fe,xe;const e=GT();Un.useEffect(()=>{e&&e.capture("chart",E)},[]),delete P.layout.width,delete P.layout.height,(xe=(fe=P.layout)==null?void 0:fe.title)!=null&&xe.text&&(P.layout.title.text="");const[_,w]=Un.useState({}),[s,T]=Un.useState(!1),[m,f]=Un.useState(ce),[l,t]=Un.useState({}),[i,r]=Un.useState(!1),[n,o]=Un.useState({name:""}),[a,u]=Un.useState(!1),[p,c]=Un.useState(null),[b,d]=Un.useState({old_nticks:{}}),[v,x]=Un.useState(!1),[g,y]=Un.useState(!1),[k,h]=Un.useState(P),[M,A]=Un.useState([]),[C,L]=Un.useState(!1),[O,I]=Un.useState(!0),[R,U]=Un.useState(!1),[B,G]=Un.useState(!1),[N,j]=Un.useState(!1),[V,H]=Un.useState({}),[ee,Q]=Un.useState([]),Y=()=>o({name:""});function X(he){var pe,ye,Re,we,Ae;console.log("onDeleteAnnotation",he);const de=(ye=(pe=k==null?void 0:k.layout)==null?void 0:pe.annotations)==null?void 0:ye.findIndex(Me=>Me.text===he.text);console.log("index",de),de>-1&&((we=(Re=k==null?void 0:k.layout)==null?void 0:Re.annotations)==null||we.splice(de,1),h({...k}),A((Ae=k==null?void 0:k.layout)==null?void 0:Ae.annotations))}function K(he){U7({plotData:k,popupData:he,setPlotData:h,setModal:o,setOnAnnotationClick:H,setAnnotations:A,onAnnotationClick:V,ohlcAnnotation:ee,setOhlcAnnotation:Q,annotations:M,plotDiv:p})}Un.useEffect(()=>{g&&(o({name:"downloadFinished"}),y(!1))},[g]),Un.useEffect(()=>{l&&Object.keys(l).length>0&&(Object.keys(l).forEach(he=>{k.layout[he].title={...k.layout[he].title||{},text:l[he]},k.layout[he].showticklabels=!0}),t({}))},[l]);function te(he){let de=p.layout.shapes;if(!de||de.length==0)return;let pe=de[de.length-1];pe.line.color=he,Gs.update(p,{},{shapes:de})}function ae(he,de=!1){let pe=_[he]||document.querySelector(`[data-title="${he}"]`);de?(pe.style.border="transparent",pe.style.boxShadow="none"):(pe.style.border="1px solid rgba(0, 151, 222, 1.0)",pe.style.borderRadius="5px",pe.style.borderpadding="5px",pe.style.boxShadow="0 0 5px rgba(0, 151, 222, 1.0)"),w({..._,[he]:pe})}function oe(){let he="Auto Scale (Ctrl+Shift+A)",de=_[he]||document.querySelector(`[data-title="${he}"]`),pe=!0;de.style.border=="transparent"?(pe=!1,p.on("plotly_relayout",Np(async function(ye){if(ye["xaxis.range[0]"]==null)return;let Re=await u9(ye,p);Gs.update(p,{},Re)},100))):p.removeAllListeners("plotly_relayout"),ae(he,pe)}function se(){let he="Edit Color (Ctrl+E)",de=_[he]||document.querySelector(`[data-title="${he}"]`),pe=!0;de.style.border=="transparent"&&(pe=!1),j(!pe),ae(he,pe)}return Un.useEffect(()=>{R&&(console.log("activateAutoScale",!R),oe(),U(!1))},[R]),Un.useEffect(()=>{B&&(se(),G(!1))},[B]),Un.useEffect(()=>{if(C)try{console.log("changeTheme",C);const he=k==null?void 0:k.data.filter(Ae=>{var Me;return(Me=Ae==null?void 0:Ae.name)==null?void 0:Me.startsWith("Volume")}),de=!O;window.document.body.style.backgroundColor=de?"#000":"#fff",k.layout.font={...k.layout.font||{},color:de?"#fff":"#000"};const pe=de?Pu.sunIcon:Pu.moonIcon;document.querySelector('[data-title="Change Theme"]').getElementsByTagName("path")[0].setAttribute("d",pe.path),document.querySelector('[data-title="Change Theme"]').getElementsByTagName("svg")[0].setAttribute("viewBox",pe.viewBox);const we=de?{"#009600":"#00ACFF","#c80000":"#e4003a"}:{"#e4003a":"#c80000","#00ACFF":"#009600"};he.forEach(Ae=>{Ae.type==="bar"&&(Ae.marker.color=Ae.marker.color.map(Me=>we[Me]||Me))}),k.layout.template=de?ek:tk,h({...k}),Gs.react(p,k.data,k.layout),I(de),L(!1)}catch(he){console.log("error",he)}},[C]),Un.useEffect(()=>{if(i){I(!0),U(!1);const he=["Download CSV","Download Chart as Image","Overlay chart from CSV","Add Text","Change Titles","Auto Scale (Ctrl+Shift+A)","Reset Axes"],de=document.querySelector('[data-title="Autoscale"]');de&&(de.getElementsByTagName("path")[0].setAttribute("d",Gs.Icons.home.path),de.setAttribute("data-title","Reset Axes")),window.MODEBAR=document.getElementsByClassName("modebar-container")[0];const pe=window.MODEBAR.getElementsByClassName("modebar-btn");if(window.MODEBAR.style.cssText=`${window.MODEBAR.style.cssText}; display:flex;`,pe){let ye={};for(let Re=0;Re0&&(h(we),d(Ae),Gs.relayout(p,Re))}),D!=="dark"&&L(!0)}},[i]),ni("div",{className:"relative h-full",children:[a&&br("div",{className:"absolute inset-0 flex items-center justify-center z-[100]",children:ni("svg",{className:"animate-spin h-20 w-20 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[br("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),br("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8z"})]})}),ni("div",{id:"loading",className:"saving",children:[br("div",{id:"loading_text",className:"loading_text"}),br("div",{id:"loader",className:"loader"})]}),br(D7,{addOverlay:he=>{console.log(he),k.layout.showlegend=!0,h(he),r(!1)},plotlyData:k,setLoading:u,open:n.name==="overlayChart",close:Y}),br(B7,{updateTitle:he=>f(he),updateAxesTitles:he=>t(he),defaultTitle:m,plotlyData:k,open:n.name==="titleDialog",close:Y}),br(N7,{popupData:n.name==="textDialog"?n==null?void 0:n.data:null,open:n.name==="textDialog",close:Y,addAnnotation:he=>K(he),deleteAnnotation:he=>X(he)}),br(f9,{open:N,onColorChange:te}),br(p9,{open:n.name==="downloadFinished",close:Y}),ni("div",{className:"relative h-full",id:"MainChart",children:[ni("div",{className:"_header relative gap-4 py-2 text-center text-xs flex items-center justify-between px-4 text-white",children:[br("div",{className:"w-1/3",children:br("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"40",fill:"none",viewBox:"0 0 64 40",children:br("path",{fill:"#fff",d:"M61.283 3.965H33.608v27.757h25.699V19.826H37.561v-3.965H63.26V3.965h-1.977zM39.538 23.792h15.815v3.965H37.561v-3.965h1.977zM59.306 9.913v1.983H37.561V7.931h21.745v1.982zM33.606 0h-3.954v3.965H33.606V0zM25.7 3.966H0V15.86h25.7v3.965H3.953v11.896h25.7V3.966h-3.955zm0 21.808v1.983H7.907v-3.965h17.791v1.982zm0-15.86v1.982H3.953V7.931h21.745v1.982zM37.039 35.693v2.952l-.246-.246-.245-.245-.245-.247-.245-.246-.246-.246-.245-.245-.245-.247-.247-.246-.245-.246-.245-.246-.245-.246-.246-.246h-.49v3.936h.49v-3.198l.246.246.245.246.245.246.245.246.246.246.246.246.245.247.246.245.245.246.245.247.245.246.246.245.245.246h.245v-3.936h-.49zM44.938 37.17h-.491v-1.477h-2.944v3.937h3.93v-2.46h-.495zm-2.944-.246v-.739h1.962v.984h-1.962v-.245zm2.944.984v1.23h-2.944V37.66h2.944v.247zM52.835 37.17h-.49v-1.477h-2.946v3.937h3.925v-2.46h-.489zm-2.944-.246v-.739h1.963v.984h-1.965l.002-.245zm2.944.984v1.23H49.89V37.66h2.946v.247zM29.174 35.693H25.739v3.936H29.663v-.491H26.229v-.984h2.943v-.493H26.229v-1.476h3.434v-.492h-.489zM13.37 35.693H9.934v3.937h3.925v-3.937h-.49zm0 .738v2.709h-2.945v-2.955h2.943l.001.246zM21.276 35.693h-3.435v3.937h.491v-1.476h3.434v-2.461h-.49zm0 .738v1.23h-2.944v-1.476h2.944v.246z"})})}),br("p",{className:"font-bold w-1/3 flex flex-col gap-0.5 items-center",children:m}),ni("p",{className:"w-1/3 text-right text-xs",children:[new Intl.DateTimeFormat("en-GB",{dateStyle:"full",timeStyle:"long"}).format(F).replace(/:\d\d /," "),br("br",{}),br("span",{className:"text-grey-400",children:J})]})]}),br("div",{className:h9("w-full sm:pb-12",{"h-[calc(100%-10px)]":v,"h-[calc(100%-50px)]":!v}),children:br(d9,{onInitialized:()=>{if(!p){const he=document.getElementById("plotlyChart");console.log("plot",he),he&&c(he),he.globals=Pe}i||r(!0)},className:"w-full h-full",divId:"plotlyChart",data:k.data,layout:k.layout,config:l9({setModal:o,changeTheme:L,autoScaling:U,Loading:u,changeColor:G,downloadFinished:y})})})]})]})}function v9(){const[P,F]=Un.useState(null),[J,ce]=Un.useState({});Un.useEffect(()=>{{const E=setInterval(()=>{if(window.json_data){const e=window.json_data;console.log(e),F(e),clearInterval(E)}},100);return()=>clearInterval(E)}},[]);const D=(E=>{var m,f,l,t;if(!E)return null;let e={added_traces:[],csv_yaxis_id:null,cmd_src_idx:null,cmd_idx:null,cmd_src:"",old_margin:null,title:""},_=(f=(m=E.layout)==null?void 0:m.title)==null?void 0:f.text.replace(/ -/g,"").replace(/-/g,"").replace(/|<\/b>/g,"").replace(/ /g,"_"),w=new Date().toISOString().slice(0,10).replace(/-/g,""),s=new Date().toISOString().slice(11,19).replace(/:/g,"");window.title=`openbb_${_}_${w}_${s}`,E.layout.annotations!=null&&E.layout.annotations.forEach(function(i){if(i.text!=null&&i.text[0]=="/"){e.cmd_src=i.text,e.cmd_idx=E.layout.annotations.indexOf(i),i.text="";let r=E.layout.margin;e.old_margin={...r},r.t!=null&&r.t>40&&(r.t=40),E.cmd=="/stocks/candle"&&(r.r-=50)}}),E.data.forEach(function(i){if(i.name!=null){const r=i.name.length;i.name=i.name+" ",i.hoverlabel={namelength:r}}});let T=((t=(l=E.layout)==null?void 0:l.title)==null?void 0:t.text)||"Interactive Chart";return e.title=T,{data:E,date:new Date,globals:e,cmd:E.command_location,posthog:E.posthog,python_version:E.python_version,pywry_version:E.pywry_version,terminal_version:E.terminal_version,theme:E.theme,title:T}})(P);if(D){D.posthog.collect_logs&&!J&&ce({api_host:"https://app.posthog.com",autocapture:{css_selector_allowlist:[".ph-capture"]},capture_pageview:!1,loaded:function(w){const s=(D==null?void 0:D.log_id)||"";s!=""&&s!="REPLACE_ME"&&w.identify(s),w.onFeatureFlags(function(){w.isFeatureEnabled("record-pywry",{send_event:!1})||w.stopSessionRecording(),w.isFeatureEnabled("collect-logs-pywry",{send_event:!1})?w.has_opted_out_capturing()&&w.opt_in_capturing():w.opt_out_capturing()})}});const E={INFO:{command:D.cmd,title:D.title,date:D.date,python_version:D.python_version,pywry_version:D.pywry_version,terminal_version:D.terminal_version}},e=br(g9,{json:D.data,date:D.date,cmd:D.cmd,title:D.title,globals:D.globals,theme:D.theme,info:E});return D.posthog.collect_logs&&J?br(qT,{apiKey:"phc_vhssDAMod5qIplznQ75Kdgz4aB1qPFmeVmfEOZ4hkRw",options:J,children:e}):e}else return br("div",{className:"absolute inset-0 flex items-center justify-center z-[100]",children:ni("svg",{className:"animate-spin h-20 w-20 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[br("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),br("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8z"})]})})}z8.render(br(s_.StrictMode,{children:br(v9,{})}),document.getElementById("root"));