(function(){const W=document.createElement("link").relList;if(W&&W.supports&&W.supports("modulepreload"))return;for(const ke of document.querySelectorAll('link[rel="modulepreload"]'))we(ke);new MutationObserver(ke=>{for(const Xe of ke)if(Xe.type==="childList")for(const G of Xe.addedNodes)G.tagName==="LINK"&&G.rel==="modulepreload"&&we(G)}).observe(document,{childList:!0,subtree:!0});function ue(ke){const Xe={};return ke.integrity&&(Xe.integrity=ke.integrity),ke.referrerPolicy&&(Xe.referrerPolicy=ke.referrerPolicy),ke.crossOrigin==="use-credentials"?Xe.credentials="include":ke.crossOrigin==="anonymous"?Xe.credentials="omit":Xe.credentials="same-origin",Xe}function we(ke){if(ke.ep)return;ke.ep=!0;const Xe=ue(ke);fetch(ke.href,Xe)}})();function fg(F){return F&&F.__esModule&&Object.prototype.hasOwnProperty.call(F,"default")?F.default:F}var Kb={exports:{}},cg={},Jb={exports:{}},hi={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var gp=Symbol.for("react.element"),G4=Symbol.for("react.portal"),W4=Symbol.for("react.fragment"),Y4=Symbol.for("react.strict_mode"),Z4=Symbol.for("react.profiler"),X4=Symbol.for("react.provider"),j4=Symbol.for("react.context"),K4=Symbol.for("react.forward_ref"),J4=Symbol.for("react.suspense"),Q4=Symbol.for("react.memo"),$4=Symbol.for("react.lazy"),b2=Symbol.iterator;function q4(F){return F===null||typeof F!="object"?null:(F=b2&&F[b2]||F["@@iterator"],typeof F=="function"?F:null)}var Qb={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},$b=Object.assign,qb={};function Kv(F,W,ue){this.props=F,this.context=W,this.refs=qb,this.updater=ue||Qb}Kv.prototype.isReactComponent={};Kv.prototype.setState=function(F,W){if(typeof F!="object"&&typeof F!="function"&&F!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,F,W,"setState")};Kv.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function e3(){}e3.prototype=Kv.prototype;function em(F,W,ue){this.props=F,this.context=W,this.refs=qb,this.updater=ue||Qb}var tm=em.prototype=new e3;tm.constructor=em;$b(tm,Kv.prototype);tm.isPureReactComponent=!0;var w2=Array.isArray,t3=Object.prototype.hasOwnProperty,rm={current:null},r3={key:!0,ref:!0,__self:!0,__source:!0};function n3(F,W,ue){var we,ke={},Xe=null,G=null;if(W!=null)for(we in W.ref!==void 0&&(G=W.ref),W.key!==void 0&&(Xe=""+W.key),W)t3.call(W,we)&&!r3.hasOwnProperty(we)&&(ke[we]=W[we]);var V=arguments.length-2;if(V===1)ke.children=ue;else if(1>>1,z=b[y];if(0>>1;yke(k,E))Oke(N,k)?(b[y]=N,b[O]=E,y=O):(b[y]=k,b[B]=E,y=B);else if(Oke(N,E))b[y]=N,b[O]=E,y=O;else break e}}return a}function ke(b,a){var E=b.sortIndex-a.sortIndex;return E!==0?E:b.id-a.id}if(typeof performance=="object"&&typeof performance.now=="function"){var Xe=performance;F.unstable_now=function(){return Xe.now()}}else{var G=Date,V=G.now();F.unstable_now=function(){return G.now()-V}}var e=[],m=[],P=1,i=null,L=3,A=!1,v=!1,p=!1,t=typeof setTimeout=="function"?setTimeout:null,r=typeof clearTimeout=="function"?clearTimeout:null,s=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function n(b){for(var a=ue(m);a!==null;){if(a.callback===null)we(m);else if(a.startTime<=b)we(m),a.sortIndex=a.expirationTime,W(e,a);else break;a=ue(m)}}function l(b){if(p=!1,n(b),!v)if(ue(e)!==null)v=!0,x(c);else{var a=ue(m);a!==null&&S(l,a.startTime-b)}}function c(b,a){v=!1,p&&(p=!1,r(f),f=-1),A=!0;var E=L;try{for(n(a),i=ue(e);i!==null&&(!(i.expirationTime>a)||b&&!o());){var y=i.callback;if(typeof y=="function"){i.callback=null,L=i.priorityLevel;var z=y(i.expirationTime<=a);a=F.unstable_now(),typeof z=="function"?i.callback=z:i===ue(e)&&we(e),n(a)}else we(e);i=ue(e)}if(i!==null)var I=!0;else{var B=ue(m);B!==null&&S(l,B.startTime-a),I=!1}return I}finally{i=null,L=E,A=!1}}var u=!1,g=null,f=-1,w=5,h=-1;function o(){return!(F.unstable_now()-hb||125y?(b.sortIndex=E,W(m,b),ue(e)===null&&b===ue(m)&&(p?(r(f),f=-1):p=!0,S(l,E-y))):(b.sortIndex=z,W(e,b),v||A||(v=!0,x(c))),b},F.unstable_shouldYield=o,F.unstable_wrapCallback=function(b){var a=L;return function(){var E=L;L=a;try{return b.apply(this,arguments)}finally{L=E}}}})(s3);o3.exports=s3;var fM=o3.exports;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var l3=Fn,Rl=fM;function va(F){for(var W="https://reactjs.org/docs/error-decoder.html?invariant="+F,ue=1;ue"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Jy=Object.prototype.hasOwnProperty,cM=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,A2={},M2={};function hM(F){return Jy.call(M2,F)?!0:Jy.call(A2,F)?!1:cM.test(F)?M2[F]=!0:(A2[F]=!0,!1)}function vM(F,W,ue,we){if(ue!==null&&ue.type===0)return!1;switch(typeof W){case"function":case"symbol":return!0;case"boolean":return we?!1:ue!==null?!ue.acceptsBooleans:(F=F.toLowerCase().slice(0,5),F!=="data-"&&F!=="aria-");default:return!1}}function dM(F,W,ue,we){if(W===null||typeof W>"u"||vM(F,W,ue,we))return!0;if(we)return!1;if(ue!==null)switch(ue.type){case 3:return!W;case 4:return W===!1;case 5:return isNaN(W);case 6:return isNaN(W)||1>W}return!1}function Ys(F,W,ue,we,ke,Xe,G){this.acceptsBooleans=W===2||W===3||W===4,this.attributeName=we,this.attributeNamespace=ke,this.mustUseProperty=ue,this.propertyName=F,this.type=W,this.sanitizeURL=Xe,this.removeEmptyString=G}var us={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(F){us[F]=new Ys(F,0,!1,F,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(F){var W=F[0];us[W]=new Ys(W,1,!1,F[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(F){us[F]=new Ys(F,2,!1,F.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(F){us[F]=new Ys(F,2,!1,F,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(F){us[F]=new Ys(F,3,!1,F.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(F){us[F]=new Ys(F,3,!0,F,null,!1,!1)});["capture","download"].forEach(function(F){us[F]=new Ys(F,4,!1,F,null,!1,!1)});["cols","rows","size","span"].forEach(function(F){us[F]=new Ys(F,6,!1,F,null,!1,!1)});["rowSpan","start"].forEach(function(F){us[F]=new Ys(F,5,!1,F.toLowerCase(),null,!1,!1)});var am=/[\-:]([a-z])/g;function im(F){return F[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(F){var W=F.replace(am,im);us[W]=new Ys(W,1,!1,F,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(F){var W=F.replace(am,im);us[W]=new Ys(W,1,!1,F,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(F){var W=F.replace(am,im);us[W]=new Ys(W,1,!1,F,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(F){us[F]=new Ys(F,1,!1,F.toLowerCase(),null,!1,!1)});us.xlinkHref=new Ys("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(F){us[F]=new Ys(F,1,!1,F.toLowerCase(),null,!0,!0)});function om(F,W,ue,we){var ke=us.hasOwnProperty(W)?us[W]:null;(ke!==null?ke.type!==0:we||!(2V||ke[G]!==Xe[V]){var e=` `+ke[G].replace(" at new "," at ");return F.displayName&&e.includes("")&&(e=e.replace("",F.displayName)),e}while(1<=G&&0<=V);break}}}finally{hy=!1,Error.prepareStackTrace=ue}return(F=F?F.displayName||F.name:"")?Id(F):""}function pM(F){switch(F.tag){case 5:return Id(F.type);case 16:return Id("Lazy");case 13:return Id("Suspense");case 19:return Id("SuspenseList");case 0:case 2:case 15:return F=vy(F.type,!1),F;case 11:return F=vy(F.type.render,!1),F;case 1:return F=vy(F.type,!0),F;default:return""}}function e1(F){if(F==null)return null;if(typeof F=="function")return F.displayName||F.name||null;if(typeof F=="string")return F;switch(F){case bv:return"Fragment";case xv:return"Portal";case Qy:return"Profiler";case sm:return"StrictMode";case $y:return"Suspense";case qy:return"SuspenseList"}if(typeof F=="object")switch(F.$$typeof){case c3:return(F.displayName||"Context")+".Consumer";case f3:return(F._context.displayName||"Context")+".Provider";case lm:var W=F.render;return F=F.displayName,F||(F=W.displayName||W.name||"",F=F!==""?"ForwardRef("+F+")":"ForwardRef"),F;case um:return W=F.displayName||null,W!==null?W:e1(F.type)||"Memo";case Ic:W=F._payload,F=F._init;try{return e1(F(W))}catch{}}return null}function gM(F){var W=F.type;switch(F.tag){case 24:return"Cache";case 9:return(W.displayName||"Context")+".Consumer";case 10:return(W._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return F=W.render,F=F.displayName||F.name||"",W.displayName||(F!==""?"ForwardRef("+F+")":"ForwardRef");case 7:return"Fragment";case 5:return W;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return e1(W);case 8:return W===sm?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof W=="function")return W.displayName||W.name||null;if(typeof W=="string")return W}return null}function jc(F){switch(typeof F){case"boolean":case"number":case"string":case"undefined":return F;case"object":return F;default:return""}}function v3(F){var W=F.type;return(F=F.nodeName)&&F.toLowerCase()==="input"&&(W==="checkbox"||W==="radio")}function yM(F){var W=v3(F)?"checked":"value",ue=Object.getOwnPropertyDescriptor(F.constructor.prototype,W),we=""+F[W];if(!F.hasOwnProperty(W)&&typeof ue<"u"&&typeof ue.get=="function"&&typeof ue.set=="function"){var ke=ue.get,Xe=ue.set;return Object.defineProperty(F,W,{configurable:!0,get:function(){return ke.call(this)},set:function(G){we=""+G,Xe.call(this,G)}}),Object.defineProperty(F,W,{enumerable:ue.enumerable}),{getValue:function(){return we},setValue:function(G){we=""+G},stopTracking:function(){F._valueTracker=null,delete F[W]}}}}function e0(F){F._valueTracker||(F._valueTracker=yM(F))}function d3(F){if(!F)return!1;var W=F._valueTracker;if(!W)return!0;var ue=W.getValue(),we="";return F&&(we=v3(F)?F.checked?"true":"false":F.value),F=we,F!==ue?(W.setValue(F),!0):!1}function _0(F){if(F=F||(typeof document<"u"?document:void 0),typeof F>"u")return null;try{return F.activeElement||F.body}catch{return F.body}}function t1(F,W){var ue=W.checked;return fo({},W,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:ue??F._wrapperState.initialChecked})}function E2(F,W){var ue=W.defaultValue==null?"":W.defaultValue,we=W.checked!=null?W.checked:W.defaultChecked;ue=jc(W.value!=null?W.value:ue),F._wrapperState={initialChecked:we,initialValue:ue,controlled:W.type==="checkbox"||W.type==="radio"?W.checked!=null:W.value!=null}}function p3(F,W){W=W.checked,W!=null&&om(F,"checked",W,!1)}function r1(F,W){p3(F,W);var ue=jc(W.value),we=W.type;if(ue!=null)we==="number"?(ue===0&&F.value===""||F.value!=ue)&&(F.value=""+ue):F.value!==""+ue&&(F.value=""+ue);else if(we==="submit"||we==="reset"){F.removeAttribute("value");return}W.hasOwnProperty("value")?n1(F,W.type,ue):W.hasOwnProperty("defaultValue")&&n1(F,W.type,jc(W.defaultValue)),W.checked==null&&W.defaultChecked!=null&&(F.defaultChecked=!!W.defaultChecked)}function C2(F,W,ue){if(W.hasOwnProperty("value")||W.hasOwnProperty("defaultValue")){var we=W.type;if(!(we!=="submit"&&we!=="reset"||W.value!==void 0&&W.value!==null))return;W=""+F._wrapperState.initialValue,ue||W===F.value||(F.value=W),F.defaultValue=W}ue=F.name,ue!==""&&(F.name=""),F.defaultChecked=!!F._wrapperState.initialChecked,ue!==""&&(F.name=ue)}function n1(F,W,ue){(W!=="number"||_0(F.ownerDocument)!==F)&&(ue==null?F.defaultValue=""+F._wrapperState.initialValue:F.defaultValue!==""+ue&&(F.defaultValue=""+ue))}var kd=Array.isArray;function Iv(F,W,ue,we){if(F=F.options,W){W={};for(var ke=0;ke"+W.valueOf().toString()+"",W=t0.firstChild;F.firstChild;)F.removeChild(F.firstChild);for(;W.firstChild;)F.appendChild(W.firstChild)}});function Jd(F,W){if(W){var ue=F.firstChild;if(ue&&ue===F.lastChild&&ue.nodeType===3){ue.nodeValue=W;return}}F.textContent=W}var zd={animationIterationCount:!0,aspectRatio:!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},mM=["Webkit","ms","Moz","O"];Object.keys(zd).forEach(function(F){mM.forEach(function(W){W=W+F.charAt(0).toUpperCase()+F.substring(1),zd[W]=zd[F]})});function x3(F,W,ue){return W==null||typeof W=="boolean"||W===""?"":ue||typeof W!="number"||W===0||zd.hasOwnProperty(F)&&zd[F]?(""+W).trim():W+"px"}function b3(F,W){F=F.style;for(var ue in W)if(W.hasOwnProperty(ue)){var we=ue.indexOf("--")===0,ke=x3(ue,W[ue],we);ue==="float"&&(ue="cssFloat"),we?F.setProperty(ue,ke):F[ue]=ke}}var xM=fo({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 o1(F,W){if(W){if(xM[F]&&(W.children!=null||W.dangerouslySetInnerHTML!=null))throw Error(va(137,F));if(W.dangerouslySetInnerHTML!=null){if(W.children!=null)throw Error(va(60));if(typeof W.dangerouslySetInnerHTML!="object"||!("__html"in W.dangerouslySetInnerHTML))throw Error(va(61))}if(W.style!=null&&typeof W.style!="object")throw Error(va(62))}}function s1(F,W){if(F.indexOf("-")===-1)return typeof W.is=="string";switch(F){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}}var l1=null;function fm(F){return F=F.target||F.srcElement||window,F.correspondingUseElement&&(F=F.correspondingUseElement),F.nodeType===3?F.parentNode:F}var u1=null,kv=null,Fv=null;function R2(F){if(F=xp(F)){if(typeof u1!="function")throw Error(va(280));var W=F.stateNode;W&&(W=gg(W),u1(F.stateNode,F.type,W))}}function w3(F){kv?Fv?Fv.push(F):Fv=[F]:kv=F}function T3(){if(kv){var F=kv,W=Fv;if(Fv=kv=null,R2(F),W)for(F=0;F>>=0,F===0?32:31-(RM(F)/DM|0)|0}var r0=64,n0=4194304;function Fd(F){switch(F&-F){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return F&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return F&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return F}}function B0(F,W){var ue=F.pendingLanes;if(ue===0)return 0;var we=0,ke=F.suspendedLanes,Xe=F.pingedLanes,G=ue&268435455;if(G!==0){var V=G&~ke;V!==0?we=Fd(V):(Xe&=G,Xe!==0&&(we=Fd(Xe)))}else G=ue&~ke,G!==0?we=Fd(G):Xe!==0&&(we=Fd(Xe));if(we===0)return 0;if(W!==0&&W!==we&&!(W&ke)&&(ke=we&-we,Xe=W&-W,ke>=Xe||ke===16&&(Xe&4194240)!==0))return W;if(we&4&&(we|=ue&16),W=F.entangledLanes,W!==0)for(F=F.entanglements,W&=we;0ue;ue++)W.push(F);return W}function yp(F,W,ue){F.pendingLanes|=W,W!==536870912&&(F.suspendedLanes=0,F.pingedLanes=0),F=F.eventTimes,W=31-Du(W),F[W]=ue}function _M(F,W){var ue=F.pendingLanes&~W;F.pendingLanes=W,F.suspendedLanes=0,F.pingedLanes=0,F.expiredLanes&=W,F.mutableReadLanes&=W,F.entangledLanes&=W,W=F.entanglements;var we=F.eventTimes;for(F=F.expirationTimes;0=Nd),B2=String.fromCharCode(32),U2=!1;function H3(F,W){switch(F){case"keyup":return uS.indexOf(W.keyCode)!==-1;case"keydown":return W.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function G3(F){return F=F.detail,typeof F=="object"&&"data"in F?F.data:null}var wv=!1;function cS(F,W){switch(F){case"compositionend":return G3(W);case"keypress":return W.which!==32?null:(U2=!0,B2);case"textInput":return F=W.data,F===B2&&U2?null:F;default:return null}}function hS(F,W){if(wv)return F==="compositionend"||!mm&&H3(F,W)?(F=U3(),S0=pm=Oc=null,wv=!1,F):null;switch(F){case"paste":return null;case"keypress":if(!(W.ctrlKey||W.altKey||W.metaKey)||W.ctrlKey&&W.altKey){if(W.char&&1=W)return{node:ue,offset:W-F};F=we}e:{for(;ue;){if(ue.nextSibling){ue=ue.nextSibling;break e}ue=ue.parentNode}ue=void 0}ue=W2(ue)}}function X3(F,W){return F&&W?F===W?!0:F&&F.nodeType===3?!1:W&&W.nodeType===3?X3(F,W.parentNode):"contains"in F?F.contains(W):F.compareDocumentPosition?!!(F.compareDocumentPosition(W)&16):!1:!1}function j3(){for(var F=window,W=_0();W instanceof F.HTMLIFrameElement;){try{var ue=typeof W.contentWindow.location.href=="string"}catch{ue=!1}if(ue)F=W.contentWindow;else break;W=_0(F.document)}return W}function xm(F){var W=F&&F.nodeName&&F.nodeName.toLowerCase();return W&&(W==="input"&&(F.type==="text"||F.type==="search"||F.type==="tel"||F.type==="url"||F.type==="password")||W==="textarea"||F.contentEditable==="true")}function wS(F){var W=j3(),ue=F.focusedElem,we=F.selectionRange;if(W!==ue&&ue&&ue.ownerDocument&&X3(ue.ownerDocument.documentElement,ue)){if(we!==null&&xm(ue)){if(W=we.start,F=we.end,F===void 0&&(F=W),"selectionStart"in ue)ue.selectionStart=W,ue.selectionEnd=Math.min(F,ue.value.length);else if(F=(W=ue.ownerDocument||document)&&W.defaultView||window,F.getSelection){F=F.getSelection();var ke=ue.textContent.length,Xe=Math.min(we.start,ke);we=we.end===void 0?Xe:Math.min(we.end,ke),!F.extend&&Xe>we&&(ke=we,we=Xe,Xe=ke),ke=Y2(ue,Xe);var G=Y2(ue,we);ke&&G&&(F.rangeCount!==1||F.anchorNode!==ke.node||F.anchorOffset!==ke.offset||F.focusNode!==G.node||F.focusOffset!==G.offset)&&(W=W.createRange(),W.setStart(ke.node,ke.offset),F.removeAllRanges(),Xe>we?(F.addRange(W),F.extend(G.node,G.offset)):(W.setEnd(G.node,G.offset),F.addRange(W)))}}for(W=[],F=ue;F=F.parentNode;)F.nodeType===1&&W.push({element:F,left:F.scrollLeft,top:F.scrollTop});for(typeof ue.focus=="function"&&ue.focus(),ue=0;ue=document.documentMode,Tv=null,p1=null,Ud=null,g1=!1;function Z2(F,W,ue){var we=ue.window===ue?ue.document:ue.nodeType===9?ue:ue.ownerDocument;g1||Tv==null||Tv!==_0(we)||(we=Tv,"selectionStart"in we&&xm(we)?we={start:we.selectionStart,end:we.selectionEnd}:(we=(we.ownerDocument&&we.ownerDocument.defaultView||window).getSelection(),we={anchorNode:we.anchorNode,anchorOffset:we.anchorOffset,focusNode:we.focusNode,focusOffset:we.focusOffset}),Ud&&rp(Ud,we)||(Ud=we,we=H0(p1,"onSelect"),0Sv||(F.current=T1[Sv],T1[Sv]=null,Sv--)}function Gi(F,W){Sv++,T1[Sv]=F.current,F.current=W}var Kc={},Cs=$c(Kc),ll=$c(!1),Bh=Kc;function Uv(F,W){var ue=F.type.contextTypes;if(!ue)return Kc;var we=F.stateNode;if(we&&we.__reactInternalMemoizedUnmaskedChildContext===W)return we.__reactInternalMemoizedMaskedChildContext;var ke={},Xe;for(Xe in ue)ke[Xe]=W[Xe];return we&&(F=F.stateNode,F.__reactInternalMemoizedUnmaskedChildContext=W,F.__reactInternalMemoizedMaskedChildContext=ke),ke}function ul(F){return F=F.childContextTypes,F!=null}function W0(){ji(ll),ji(Cs)}function q2(F,W,ue){if(Cs.current!==Kc)throw Error(va(168));Gi(Cs,W),Gi(ll,ue)}function nw(F,W,ue){var we=F.stateNode;if(W=W.childContextTypes,typeof we.getChildContext!="function")return ue;we=we.getChildContext();for(var ke in we)if(!(ke in W))throw Error(va(108,gM(F)||"Unknown",ke));return fo({},ue,we)}function Y0(F){return F=(F=F.stateNode)&&F.__reactInternalMemoizedMergedChildContext||Kc,Bh=Cs.current,Gi(Cs,F),Gi(ll,ll.current),!0}function eb(F,W,ue){var we=F.stateNode;if(!we)throw Error(va(169));ue?(F=nw(F,W,Bh),we.__reactInternalMemoizedMergedChildContext=F,ji(ll),ji(Cs),Gi(Cs,F)):ji(ll),Gi(ll,ue)}var Hf=null,yg=!1,Cy=!1;function aw(F){Hf===null?Hf=[F]:Hf.push(F)}function kS(F){yg=!0,aw(F)}function qc(){if(!Cy&&Hf!==null){Cy=!0;var F=0,W=ki;try{var ue=Hf;for(ki=1;F>=G,ke-=G,Wf=1<<32-Du(W)+ke|ue<f?(w=g,g=null):w=g.sibling;var h=L(r,g,n[f],l);if(h===null){g===null&&(g=w);break}F&&g&&h.alternate===null&&W(r,g),s=Xe(h,s,f),u===null?c=h:u.sibling=h,u=h,g=w}if(f===n.length)return ue(r,g),qi&&Rh(r,f),c;if(g===null){for(;ff?(w=g,g=null):w=g.sibling;var o=L(r,g,h.value,l);if(o===null){g===null&&(g=w);break}F&&g&&o.alternate===null&&W(r,g),s=Xe(o,s,f),u===null?c=o:u.sibling=o,u=o,g=w}if(h.done)return ue(r,g),qi&&Rh(r,f),c;if(g===null){for(;!h.done;f++,h=n.next())h=i(r,h.value,l),h!==null&&(s=Xe(h,s,f),u===null?c=h:u.sibling=h,u=h);return qi&&Rh(r,f),c}for(g=we(r,g);!h.done;f++,h=n.next())h=A(g,r,f,h.value,l),h!==null&&(F&&h.alternate!==null&&g.delete(h.key===null?f:h.key),s=Xe(h,s,f),u===null?c=h:u.sibling=h,u=h);return F&&g.forEach(function(d){return W(r,d)}),qi&&Rh(r,f),c}function t(r,s,n,l){if(typeof n=="object"&&n!==null&&n.type===bv&&n.key===null&&(n=n.props.children),typeof n=="object"&&n!==null){switch(n.$$typeof){case qp:e:{for(var c=n.key,u=s;u!==null;){if(u.key===c){if(c=n.type,c===bv){if(u.tag===7){ue(r,u.sibling),s=ke(u,n.props.children),s.return=r,r=s;break e}}else if(u.elementType===c||typeof c=="object"&&c!==null&&c.$$typeof===Ic&&sb(c)===u.type){ue(r,u.sibling),s=ke(u,n.props),s.ref=Ld(r,u,n),s.return=r,r=s;break e}ue(r,u);break}else W(r,u);u=u.sibling}n.type===bv?(s=Nh(n.props.children,r.mode,l,n.key),s.return=r,r=s):(l=k0(n.type,n.key,n.props,null,r.mode,l),l.ref=Ld(r,s,n),l.return=r,r=l)}return G(r);case xv:e:{for(u=n.key;s!==null;){if(s.key===u)if(s.tag===4&&s.stateNode.containerInfo===n.containerInfo&&s.stateNode.implementation===n.implementation){ue(r,s.sibling),s=ke(s,n.children||[]),s.return=r,r=s;break e}else{ue(r,s);break}else W(r,s);s=s.sibling}s=_y(n,r.mode,l),s.return=r,r=s}return G(r);case Ic:return u=n._init,t(r,s,u(n._payload),l)}if(kd(n))return v(r,s,n,l);if(Ad(n))return p(r,s,n,l);f0(r,n)}return typeof n=="string"&&n!==""||typeof n=="number"?(n=""+n,s!==null&&s.tag===6?(ue(r,s.sibling),s=ke(s,n),s.return=r,r=s):(ue(r,s),s=Fy(n,r.mode,l),s.return=r,r=s),G(r)):ue(r,s)}return t}var Hv=hw(!0),vw=hw(!1),bp={},ff=$c(bp),op=$c(bp),sp=$c(bp);function zh(F){if(F===bp)throw Error(va(174));return F}function Lm(F,W){switch(Gi(sp,W),Gi(op,F),Gi(ff,bp),F=W.nodeType,F){case 9:case 11:W=(W=W.documentElement)?W.namespaceURI:i1(null,"");break;default:F=F===8?W.parentNode:W,W=F.namespaceURI||null,F=F.tagName,W=i1(W,F)}ji(ff),Gi(ff,W)}function Gv(){ji(ff),ji(op),ji(sp)}function dw(F){zh(sp.current);var W=zh(ff.current),ue=i1(W,F.type);W!==ue&&(Gi(op,F),Gi(ff,ue))}function Pm(F){op.current===F&&(ji(ff),ji(op))}var lo=$c(0);function Q0(F){for(var W=F;W!==null;){if(W.tag===13){var ue=W.memoizedState;if(ue!==null&&(ue=ue.dehydrated,ue===null||ue.data==="$?"||ue.data==="$!"))return W}else if(W.tag===19&&W.memoizedProps.revealOrder!==void 0){if(W.flags&128)return W}else if(W.child!==null){W.child.return=W,W=W.child;continue}if(W===F)break;for(;W.sibling===null;){if(W.return===null||W.return===F)return null;W=W.return}W.sibling.return=W.return,W=W.sibling}return null}var Ly=[];function Rm(){for(var F=0;Fue?ue:4,F(!0);var we=Py.transition;Py.transition={};try{F(!1),W()}finally{ki=ue,Py.transition=we}}function Rw(){return nu().memoizedState}function OS(F,W,ue){var we=Zc(F);if(ue={lane:we,action:ue,hasEagerState:!1,eagerState:null,next:null},Dw(F))Iw(W,ue);else if(ue=lw(F,W,ue,we),ue!==null){var ke=Gs();Iu(ue,F,we,ke),kw(ue,W,we)}}function NS(F,W,ue){var we=Zc(F),ke={lane:we,action:ue,hasEagerState:!1,eagerState:null,next:null};if(Dw(F))Iw(W,ke);else{var Xe=F.alternate;if(F.lanes===0&&(Xe===null||Xe.lanes===0)&&(Xe=W.lastRenderedReducer,Xe!==null))try{var G=W.lastRenderedState,V=Xe(G,ue);if(ke.hasEagerState=!0,ke.eagerState=V,ku(V,G)){var e=W.interleaved;e===null?(ke.next=ke,Em(W)):(ke.next=e.next,e.next=ke),W.interleaved=ke;return}}catch{}finally{}ue=lw(F,W,ke,we),ue!==null&&(ke=Gs(),Iu(ue,F,we,ke),kw(ue,W,we))}}function Dw(F){var W=F.alternate;return F===uo||W!==null&&W===uo}function Iw(F,W){Vd=$0=!0;var ue=F.pending;ue===null?W.next=W:(W.next=ue.next,ue.next=W),F.pending=W}function kw(F,W,ue){if(ue&4194240){var we=W.lanes;we&=F.pendingLanes,ue|=we,W.lanes=ue,hm(F,ue)}}var q0={readContext:ru,useCallback:As,useContext:As,useEffect:As,useImperativeHandle:As,useInsertionEffect:As,useLayoutEffect:As,useMemo:As,useReducer:As,useRef:As,useState:As,useDebugValue:As,useDeferredValue:As,useTransition:As,useMutableSource:As,useSyncExternalStore:As,useId:As,unstable_isNewReconciler:!1},BS={readContext:ru,useCallback:function(F,W){return sf().memoizedState=[F,W===void 0?null:W],F},useContext:ru,useEffect:ub,useImperativeHandle:function(F,W,ue){return ue=ue!=null?ue.concat([F]):null,P0(4194308,4,Sw.bind(null,W,F),ue)},useLayoutEffect:function(F,W){return P0(4194308,4,F,W)},useInsertionEffect:function(F,W){return P0(4,2,F,W)},useMemo:function(F,W){var ue=sf();return W=W===void 0?null:W,F=F(),ue.memoizedState=[F,W],F},useReducer:function(F,W,ue){var we=sf();return W=ue!==void 0?ue(W):W,we.memoizedState=we.baseState=W,F={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:F,lastRenderedState:W},we.queue=F,F=F.dispatch=OS.bind(null,uo,F),[we.memoizedState,F]},useRef:function(F){var W=sf();return F={current:F},W.memoizedState=F},useState:lb,useDebugValue:_m,useDeferredValue:function(F){return sf().memoizedState=F},useTransition:function(){var F=lb(!1),W=F[0];return F=zS.bind(null,F[1]),sf().memoizedState=F,[W,F]},useMutableSource:function(){},useSyncExternalStore:function(F,W,ue){var we=uo,ke=sf();if(qi){if(ue===void 0)throw Error(va(407));ue=ue()}else{if(ue=W(),Qo===null)throw Error(va(349));Vh&30||yw(we,W,ue)}ke.memoizedState=ue;var Xe={value:ue,getSnapshot:W};return ke.queue=Xe,ub(xw.bind(null,we,Xe,F),[F]),we.flags|=2048,fp(9,mw.bind(null,we,Xe,ue,W),void 0,null),ue},useId:function(){var F=sf(),W=Qo.identifierPrefix;if(qi){var ue=Yf,we=Wf;ue=(we&~(1<<32-Du(we)-1)).toString(32)+ue,W=":"+W+"R"+ue,ue=lp++,0<\/script>",F=F.removeChild(F.firstChild)):typeof we.is=="string"?F=G.createElement(ue,{is:we.is}):(F=G.createElement(ue),ue==="select"&&(G=F,we.multiple?G.multiple=!0:we.size&&(G.size=we.size))):F=G.createElementNS(F,ue),F[lf]=W,F[ip]=we,Hw(F,W,!1,!1),W.stateNode=F;e:{switch(G=s1(ue,we),ue){case"dialog":Xi("cancel",F),Xi("close",F),ke=we;break;case"iframe":case"object":case"embed":Xi("load",F),ke=we;break;case"video":case"audio":for(ke=0;ke<_d.length;ke++)Xi(_d[ke],F);ke=we;break;case"source":Xi("error",F),ke=we;break;case"img":case"image":case"link":Xi("error",F),Xi("load",F),ke=we;break;case"details":Xi("toggle",F),ke=we;break;case"input":E2(F,we),ke=t1(F,we),Xi("invalid",F);break;case"option":ke=we;break;case"select":F._wrapperState={wasMultiple:!!we.multiple},ke=fo({},we,{value:void 0}),Xi("invalid",F);break;case"textarea":L2(F,we),ke=a1(F,we),Xi("invalid",F);break;default:ke=we}o1(ue,ke),V=ke;for(Xe in V)if(V.hasOwnProperty(Xe)){var e=V[Xe];Xe==="style"?b3(F,e):Xe==="dangerouslySetInnerHTML"?(e=e?e.__html:void 0,e!=null&&m3(F,e)):Xe==="children"?typeof e=="string"?(ue!=="textarea"||e!=="")&&Jd(F,e):typeof e=="number"&&Jd(F,""+e):Xe!=="suppressContentEditableWarning"&&Xe!=="suppressHydrationWarning"&&Xe!=="autoFocus"&&(Kd.hasOwnProperty(Xe)?e!=null&&Xe==="onScroll"&&Xi("scroll",F):e!=null&&om(F,Xe,e,G))}switch(ue){case"input":e0(F),C2(F,we,!1);break;case"textarea":e0(F),P2(F);break;case"option":we.value!=null&&F.setAttribute("value",""+jc(we.value));break;case"select":F.multiple=!!we.multiple,Xe=we.value,Xe!=null?Iv(F,!!we.multiple,Xe,!1):we.defaultValue!=null&&Iv(F,!!we.multiple,we.defaultValue,!0);break;default:typeof ke.onClick=="function"&&(F.onclick=G0)}switch(ue){case"button":case"input":case"select":case"textarea":we=!!we.autoFocus;break e;case"img":we=!0;break e;default:we=!1}}we&&(W.flags|=4)}W.ref!==null&&(W.flags|=512,W.flags|=2097152)}return Ms(W),null;case 6:if(F&&W.stateNode!=null)Ww(F,W,F.memoizedProps,we);else{if(typeof we!="string"&&W.stateNode===null)throw Error(va(166));if(ue=zh(sp.current),zh(ff.current),u0(W)){if(we=W.stateNode,ue=W.memoizedProps,we[lf]=W,(Xe=we.nodeValue!==ue)&&(F=Pl,F!==null))switch(F.tag){case 3:l0(we.nodeValue,ue,(F.mode&1)!==0);break;case 5:F.memoizedProps.suppressHydrationWarning!==!0&&l0(we.nodeValue,ue,(F.mode&1)!==0)}Xe&&(W.flags|=4)}else we=(ue.nodeType===9?ue:ue.ownerDocument).createTextNode(we),we[lf]=W,W.stateNode=we}return Ms(W),null;case 13:if(ji(lo),we=W.memoizedState,F===null||F.memoizedState!==null&&F.memoizedState.dehydrated!==null){if(qi&&Ll!==null&&W.mode&1&&!(W.flags&128))sw(),Vv(),W.flags|=98560,Xe=!1;else if(Xe=u0(W),we!==null&&we.dehydrated!==null){if(F===null){if(!Xe)throw Error(va(318));if(Xe=W.memoizedState,Xe=Xe!==null?Xe.dehydrated:null,!Xe)throw Error(va(317));Xe[lf]=W}else Vv(),!(W.flags&128)&&(W.memoizedState=null),W.flags|=4;Ms(W),Xe=!1}else Ru!==null&&(V1(Ru),Ru=null),Xe=!0;if(!Xe)return W.flags&65536?W:null}return W.flags&128?(W.lanes=ue,W):(we=we!==null,we!==(F!==null&&F.memoizedState!==null)&&we&&(W.child.flags|=8192,W.mode&1&&(F===null||lo.current&1?Uo===0&&(Uo=3):Hm())),W.updateQueue!==null&&(W.flags|=4),Ms(W),null);case 4:return Gv(),k1(F,W),F===null&&np(W.stateNode.containerInfo),Ms(W),null;case 10:return Sm(W.type._context),Ms(W),null;case 17:return ul(W.type)&&W0(),Ms(W),null;case 19:if(ji(lo),Xe=W.memoizedState,Xe===null)return Ms(W),null;if(we=(W.flags&128)!==0,G=Xe.rendering,G===null)if(we)Pd(Xe,!1);else{if(Uo!==0||F!==null&&F.flags&128)for(F=W.child;F!==null;){if(G=Q0(F),G!==null){for(W.flags|=128,Pd(Xe,!1),we=G.updateQueue,we!==null&&(W.updateQueue=we,W.flags|=4),W.subtreeFlags=0,we=ue,ue=W.child;ue!==null;)Xe=ue,F=we,Xe.flags&=14680066,G=Xe.alternate,G===null?(Xe.childLanes=0,Xe.lanes=F,Xe.child=null,Xe.subtreeFlags=0,Xe.memoizedProps=null,Xe.memoizedState=null,Xe.updateQueue=null,Xe.dependencies=null,Xe.stateNode=null):(Xe.childLanes=G.childLanes,Xe.lanes=G.lanes,Xe.child=G.child,Xe.subtreeFlags=0,Xe.deletions=null,Xe.memoizedProps=G.memoizedProps,Xe.memoizedState=G.memoizedState,Xe.updateQueue=G.updateQueue,Xe.type=G.type,F=G.dependencies,Xe.dependencies=F===null?null:{lanes:F.lanes,firstContext:F.firstContext}),ue=ue.sibling;return Gi(lo,lo.current&1|2),W.child}F=F.sibling}Xe.tail!==null&&Ao()>Yv&&(W.flags|=128,we=!0,Pd(Xe,!1),W.lanes=4194304)}else{if(!we)if(F=Q0(G),F!==null){if(W.flags|=128,we=!0,ue=F.updateQueue,ue!==null&&(W.updateQueue=ue,W.flags|=4),Pd(Xe,!0),Xe.tail===null&&Xe.tailMode==="hidden"&&!G.alternate&&!qi)return Ms(W),null}else 2*Ao()-Xe.renderingStartTime>Yv&&ue!==1073741824&&(W.flags|=128,we=!0,Pd(Xe,!1),W.lanes=4194304);Xe.isBackwards?(G.sibling=W.child,W.child=G):(ue=Xe.last,ue!==null?ue.sibling=G:W.child=G,Xe.last=G)}return Xe.tail!==null?(W=Xe.tail,Xe.rendering=W,Xe.tail=W.sibling,Xe.renderingStartTime=Ao(),W.sibling=null,ue=lo.current,Gi(lo,we?ue&1|2:ue&1),W):(Ms(W),null);case 22:case 23:return Vm(),we=W.memoizedState!==null,F!==null&&F.memoizedState!==null!==we&&(W.flags|=8192),we&&W.mode&1?Cl&1073741824&&(Ms(W),W.subtreeFlags&6&&(W.flags|=8192)):Ms(W),null;case 24:return null;case 25:return null}throw Error(va(156,W.tag))}function XS(F,W){switch(wm(W),W.tag){case 1:return ul(W.type)&&W0(),F=W.flags,F&65536?(W.flags=F&-65537|128,W):null;case 3:return Gv(),ji(ll),ji(Cs),Rm(),F=W.flags,F&65536&&!(F&128)?(W.flags=F&-65537|128,W):null;case 5:return Pm(W),null;case 13:if(ji(lo),F=W.memoizedState,F!==null&&F.dehydrated!==null){if(W.alternate===null)throw Error(va(340));Vv()}return F=W.flags,F&65536?(W.flags=F&-65537|128,W):null;case 19:return ji(lo),null;case 4:return Gv(),null;case 10:return Sm(W.type._context),null;case 22:case 23:return Vm(),null;case 24:return null;default:return null}}var h0=!1,Ss=!1,jS=typeof WeakSet=="function"?WeakSet:Set,Fa=null;function Pv(F,W){var ue=F.ref;if(ue!==null)if(typeof ue=="function")try{ue(null)}catch(we){go(F,W,we)}else ue.current=null}function F1(F,W,ue){try{ue()}catch(we){go(F,W,we)}}var mb=!1;function KS(F,W){if(y1=U0,F=j3(),xm(F)){if("selectionStart"in F)var ue={start:F.selectionStart,end:F.selectionEnd};else e:{ue=(ue=F.ownerDocument)&&ue.defaultView||window;var we=ue.getSelection&&ue.getSelection();if(we&&we.rangeCount!==0){ue=we.anchorNode;var ke=we.anchorOffset,Xe=we.focusNode;we=we.focusOffset;try{ue.nodeType,Xe.nodeType}catch{ue=null;break e}var G=0,V=-1,e=-1,m=0,P=0,i=F,L=null;t:for(;;){for(var A;i!==ue||ke!==0&&i.nodeType!==3||(V=G+ke),i!==Xe||we!==0&&i.nodeType!==3||(e=G+we),i.nodeType===3&&(G+=i.nodeValue.length),(A=i.firstChild)!==null;)L=i,i=A;for(;;){if(i===F)break t;if(L===ue&&++m===ke&&(V=G),L===Xe&&++P===we&&(e=G),(A=i.nextSibling)!==null)break;i=L,L=i.parentNode}i=A}ue=V===-1||e===-1?null:{start:V,end:e}}else ue=null}ue=ue||{start:0,end:0}}else ue=null;for(m1={focusedElem:F,selectionRange:ue},U0=!1,Fa=W;Fa!==null;)if(W=Fa,F=W.child,(W.subtreeFlags&1028)!==0&&F!==null)F.return=W,Fa=F;else for(;Fa!==null;){W=Fa;try{var v=W.alternate;if(W.flags&1024)switch(W.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var p=v.memoizedProps,t=v.memoizedState,r=W.stateNode,s=r.getSnapshotBeforeUpdate(W.elementType===W.type?p:Lu(W.type,p),t);r.__reactInternalSnapshotBeforeUpdate=s}break;case 3:var n=W.stateNode.containerInfo;n.nodeType===1?n.textContent="":n.nodeType===9&&n.documentElement&&n.removeChild(n.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(va(163))}}catch(l){go(W,W.return,l)}if(F=W.sibling,F!==null){F.return=W.return,Fa=F;break}Fa=W.return}return v=mb,mb=!1,v}function Hd(F,W,ue){var we=W.updateQueue;if(we=we!==null?we.lastEffect:null,we!==null){var ke=we=we.next;do{if((ke.tag&F)===F){var Xe=ke.destroy;ke.destroy=void 0,Xe!==void 0&&F1(W,ue,Xe)}ke=ke.next}while(ke!==we)}}function bg(F,W){if(W=W.updateQueue,W=W!==null?W.lastEffect:null,W!==null){var ue=W=W.next;do{if((ue.tag&F)===F){var we=ue.create;ue.destroy=we()}ue=ue.next}while(ue!==W)}}function _1(F){var W=F.ref;if(W!==null){var ue=F.stateNode;switch(F.tag){case 5:F=ue;break;default:F=ue}typeof W=="function"?W(F):W.current=F}}function Yw(F){var W=F.alternate;W!==null&&(F.alternate=null,Yw(W)),F.child=null,F.deletions=null,F.sibling=null,F.tag===5&&(W=F.stateNode,W!==null&&(delete W[lf],delete W[ip],delete W[w1],delete W[DS],delete W[IS])),F.stateNode=null,F.return=null,F.dependencies=null,F.memoizedProps=null,F.memoizedState=null,F.pendingProps=null,F.stateNode=null,F.updateQueue=null}function Zw(F){return F.tag===5||F.tag===3||F.tag===4}function xb(F){e:for(;;){for(;F.sibling===null;){if(F.return===null||Zw(F.return))return null;F=F.return}for(F.sibling.return=F.return,F=F.sibling;F.tag!==5&&F.tag!==6&&F.tag!==18;){if(F.flags&2||F.child===null||F.tag===4)continue e;F.child.return=F,F=F.child}if(!(F.flags&2))return F.stateNode}}function z1(F,W,ue){var we=F.tag;if(we===5||we===6)F=F.stateNode,W?ue.nodeType===8?ue.parentNode.insertBefore(F,W):ue.insertBefore(F,W):(ue.nodeType===8?(W=ue.parentNode,W.insertBefore(F,ue)):(W=ue,W.appendChild(F)),ue=ue._reactRootContainer,ue!=null||W.onclick!==null||(W.onclick=G0));else if(we!==4&&(F=F.child,F!==null))for(z1(F,W,ue),F=F.sibling;F!==null;)z1(F,W,ue),F=F.sibling}function O1(F,W,ue){var we=F.tag;if(we===5||we===6)F=F.stateNode,W?ue.insertBefore(F,W):ue.appendChild(F);else if(we!==4&&(F=F.child,F!==null))for(O1(F,W,ue),F=F.sibling;F!==null;)O1(F,W,ue),F=F.sibling}var ss=null,Pu=!1;function Rc(F,W,ue){for(ue=ue.child;ue!==null;)Xw(F,W,ue),ue=ue.sibling}function Xw(F,W,ue){if(uf&&typeof uf.onCommitFiberUnmount=="function")try{uf.onCommitFiberUnmount(hg,ue)}catch{}switch(ue.tag){case 5:Ss||Pv(ue,W);case 6:var we=ss,ke=Pu;ss=null,Rc(F,W,ue),ss=we,Pu=ke,ss!==null&&(Pu?(F=ss,ue=ue.stateNode,F.nodeType===8?F.parentNode.removeChild(ue):F.removeChild(ue)):ss.removeChild(ue.stateNode));break;case 18:ss!==null&&(Pu?(F=ss,ue=ue.stateNode,F.nodeType===8?Ey(F.parentNode,ue):F.nodeType===1&&Ey(F,ue),ep(F)):Ey(ss,ue.stateNode));break;case 4:we=ss,ke=Pu,ss=ue.stateNode.containerInfo,Pu=!0,Rc(F,W,ue),ss=we,Pu=ke;break;case 0:case 11:case 14:case 15:if(!Ss&&(we=ue.updateQueue,we!==null&&(we=we.lastEffect,we!==null))){ke=we=we.next;do{var Xe=ke,G=Xe.destroy;Xe=Xe.tag,G!==void 0&&(Xe&2||Xe&4)&&F1(ue,W,G),ke=ke.next}while(ke!==we)}Rc(F,W,ue);break;case 1:if(!Ss&&(Pv(ue,W),we=ue.stateNode,typeof we.componentWillUnmount=="function"))try{we.props=ue.memoizedProps,we.state=ue.memoizedState,we.componentWillUnmount()}catch(V){go(ue,W,V)}Rc(F,W,ue);break;case 21:Rc(F,W,ue);break;case 22:ue.mode&1?(Ss=(we=Ss)||ue.memoizedState!==null,Rc(F,W,ue),Ss=we):Rc(F,W,ue);break;default:Rc(F,W,ue)}}function bb(F){var W=F.updateQueue;if(W!==null){F.updateQueue=null;var ue=F.stateNode;ue===null&&(ue=F.stateNode=new jS),W.forEach(function(we){var ke=a6.bind(null,F,we);ue.has(we)||(ue.add(we),we.then(ke,ke))})}}function Cu(F,W){var ue=W.deletions;if(ue!==null)for(var we=0;weke&&(ke=G),we&=~Xe}if(we=ke,we=Ao()-we,we=(120>we?120:480>we?480:1080>we?1080:1920>we?1920:3e3>we?3e3:4320>we?4320:1960*QS(we/1960))-we,10F?16:F,Nc===null)var we=!1;else{if(F=Nc,Nc=null,rg=0,Ai&6)throw Error(va(331));var ke=Ai;for(Ai|=4,Fa=F.current;Fa!==null;){var Xe=Fa,G=Xe.child;if(Fa.flags&16){var V=Xe.deletions;if(V!==null){for(var e=0;eAo()-Bm?Oh(F,0):Nm|=ue),fl(F,W)}function tT(F,W){W===0&&(F.mode&1?(W=n0,n0<<=1,!(n0&130023424)&&(n0=4194304)):W=1);var ue=Gs();F=Jf(F,W),F!==null&&(yp(F,W,ue),fl(F,ue))}function n6(F){var W=F.memoizedState,ue=0;W!==null&&(ue=W.retryLane),tT(F,ue)}function a6(F,W){var ue=0;switch(F.tag){case 13:var we=F.stateNode,ke=F.memoizedState;ke!==null&&(ue=ke.retryLane);break;case 19:we=F.stateNode;break;default:throw Error(va(314))}we!==null&&we.delete(W),tT(F,ue)}var rT;rT=function(F,W,ue){if(F!==null)if(F.memoizedProps!==W.pendingProps||ll.current)sl=!0;else{if(!(F.lanes&ue)&&!(W.flags&128))return sl=!1,YS(F,W,ue);sl=!!(F.flags&131072)}else sl=!1,qi&&W.flags&1048576&&iw(W,X0,W.index);switch(W.lanes=0,W.tag){case 2:var we=W.type;R0(F,W),F=W.pendingProps;var ke=Uv(W,Cs.current);zv(W,ue),ke=Im(null,W,we,F,ke,ue);var Xe=km();return W.flags|=1,typeof ke=="object"&&ke!==null&&typeof ke.render=="function"&&ke.$$typeof===void 0?(W.tag=1,W.memoizedState=null,W.updateQueue=null,ul(we)?(Xe=!0,Y0(W)):Xe=!1,W.memoizedState=ke.state!==null&&ke.state!==void 0?ke.state:null,Cm(W),ke.updater=mg,W.stateNode=ke,ke._reactInternals=W,C1(W,we,F,ue),W=R1(null,W,we,!0,Xe,ue)):(W.tag=0,qi&&Xe&&bm(W),Hs(null,W,ke,ue),W=W.child),W;case 16:we=W.elementType;e:{switch(R0(F,W),F=W.pendingProps,ke=we._init,we=ke(we._payload),W.type=we,ke=W.tag=o6(we),F=Lu(we,F),ke){case 0:W=P1(null,W,we,F,ue);break e;case 1:W=pb(null,W,we,F,ue);break e;case 11:W=vb(null,W,we,F,ue);break e;case 14:W=db(null,W,we,Lu(we.type,F),ue);break e}throw Error(va(306,we,""))}return W;case 0:return we=W.type,ke=W.pendingProps,ke=W.elementType===we?ke:Lu(we,ke),P1(F,W,we,ke,ue);case 1:return we=W.type,ke=W.pendingProps,ke=W.elementType===we?ke:Lu(we,ke),pb(F,W,we,ke,ue);case 3:e:{if(Bw(W),F===null)throw Error(va(387));we=W.pendingProps,Xe=W.memoizedState,ke=Xe.element,uw(F,W),J0(W,we,null,ue);var G=W.memoizedState;if(we=G.element,Xe.isDehydrated)if(Xe={element:we,isDehydrated:!1,cache:G.cache,pendingSuspenseBoundaries:G.pendingSuspenseBoundaries,transitions:G.transitions},W.updateQueue.baseState=Xe,W.memoizedState=Xe,W.flags&256){ke=Wv(Error(va(423)),W),W=gb(F,W,we,ue,ke);break e}else if(we!==ke){ke=Wv(Error(va(424)),W),W=gb(F,W,we,ue,ke);break e}else for(Ll=Gc(W.stateNode.containerInfo.firstChild),Pl=W,qi=!0,Ru=null,ue=vw(W,null,we,ue),W.child=ue;ue;)ue.flags=ue.flags&-3|4096,ue=ue.sibling;else{if(Vv(),we===ke){W=Qf(F,W,ue);break e}Hs(F,W,we,ue)}W=W.child}return W;case 5:return dw(W),F===null&&M1(W),we=W.type,ke=W.pendingProps,Xe=F!==null?F.memoizedProps:null,G=ke.children,x1(we,ke)?G=null:Xe!==null&&x1(we,Xe)&&(W.flags|=32),Nw(F,W),Hs(F,W,G,ue),W.child;case 6:return F===null&&M1(W),null;case 13:return Uw(F,W,ue);case 4:return Lm(W,W.stateNode.containerInfo),we=W.pendingProps,F===null?W.child=Hv(W,null,we,ue):Hs(F,W,we,ue),W.child;case 11:return we=W.type,ke=W.pendingProps,ke=W.elementType===we?ke:Lu(we,ke),vb(F,W,we,ke,ue);case 7:return Hs(F,W,W.pendingProps,ue),W.child;case 8:return Hs(F,W,W.pendingProps.children,ue),W.child;case 12:return Hs(F,W,W.pendingProps.children,ue),W.child;case 10:e:{if(we=W.type._context,ke=W.pendingProps,Xe=W.memoizedProps,G=ke.value,Gi(j0,we._currentValue),we._currentValue=G,Xe!==null)if(ku(Xe.value,G)){if(Xe.children===ke.children&&!ll.current){W=Qf(F,W,ue);break e}}else for(Xe=W.child,Xe!==null&&(Xe.return=W);Xe!==null;){var V=Xe.dependencies;if(V!==null){G=Xe.child;for(var e=V.firstContext;e!==null;){if(e.context===we){if(Xe.tag===1){e=Xf(-1,ue&-ue),e.tag=2;var m=Xe.updateQueue;if(m!==null){m=m.shared;var P=m.pending;P===null?e.next=e:(e.next=P.next,P.next=e),m.pending=e}}Xe.lanes|=ue,e=Xe.alternate,e!==null&&(e.lanes|=ue),S1(Xe.return,ue,W),V.lanes|=ue;break}e=e.next}}else if(Xe.tag===10)G=Xe.type===W.type?null:Xe.child;else if(Xe.tag===18){if(G=Xe.return,G===null)throw Error(va(341));G.lanes|=ue,V=G.alternate,V!==null&&(V.lanes|=ue),S1(G,ue,W),G=Xe.sibling}else G=Xe.child;if(G!==null)G.return=Xe;else for(G=Xe;G!==null;){if(G===W){G=null;break}if(Xe=G.sibling,Xe!==null){Xe.return=G.return,G=Xe;break}G=G.return}Xe=G}Hs(F,W,ke.children,ue),W=W.child}return W;case 9:return ke=W.type,we=W.pendingProps.children,zv(W,ue),ke=ru(ke),we=we(ke),W.flags|=1,Hs(F,W,we,ue),W.child;case 14:return we=W.type,ke=Lu(we,W.pendingProps),ke=Lu(we.type,ke),db(F,W,we,ke,ue);case 15:return zw(F,W,W.type,W.pendingProps,ue);case 17:return we=W.type,ke=W.pendingProps,ke=W.elementType===we?ke:Lu(we,ke),R0(F,W),W.tag=1,ul(we)?(F=!0,Y0(W)):F=!1,zv(W,ue),cw(W,we,ke),C1(W,we,ke,ue),R1(null,W,we,!0,F,ue);case 19:return Vw(F,W,ue);case 22:return Ow(F,W,ue)}throw Error(va(156,W.tag))};function nT(F,W){return P3(F,W)}function i6(F,W,ue,we){this.tag=F,this.key=ue,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=W,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=we,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function eu(F,W,ue,we){return new i6(F,W,ue,we)}function Gm(F){return F=F.prototype,!(!F||!F.isReactComponent)}function o6(F){if(typeof F=="function")return Gm(F)?1:0;if(F!=null){if(F=F.$$typeof,F===lm)return 11;if(F===um)return 14}return 2}function Xc(F,W){var ue=F.alternate;return ue===null?(ue=eu(F.tag,W,F.key,F.mode),ue.elementType=F.elementType,ue.type=F.type,ue.stateNode=F.stateNode,ue.alternate=F,F.alternate=ue):(ue.pendingProps=W,ue.type=F.type,ue.flags=0,ue.subtreeFlags=0,ue.deletions=null),ue.flags=F.flags&14680064,ue.childLanes=F.childLanes,ue.lanes=F.lanes,ue.child=F.child,ue.memoizedProps=F.memoizedProps,ue.memoizedState=F.memoizedState,ue.updateQueue=F.updateQueue,W=F.dependencies,ue.dependencies=W===null?null:{lanes:W.lanes,firstContext:W.firstContext},ue.sibling=F.sibling,ue.index=F.index,ue.ref=F.ref,ue}function k0(F,W,ue,we,ke,Xe){var G=2;if(we=F,typeof F=="function")Gm(F)&&(G=1);else if(typeof F=="string")G=5;else e:switch(F){case bv:return Nh(ue.children,ke,Xe,W);case sm:G=8,ke|=8;break;case Qy:return F=eu(12,ue,W,ke|2),F.elementType=Qy,F.lanes=Xe,F;case $y:return F=eu(13,ue,W,ke),F.elementType=$y,F.lanes=Xe,F;case qy:return F=eu(19,ue,W,ke),F.elementType=qy,F.lanes=Xe,F;case h3:return Tg(ue,ke,Xe,W);default:if(typeof F=="object"&&F!==null)switch(F.$$typeof){case f3:G=10;break e;case c3:G=9;break e;case lm:G=11;break e;case um:G=14;break e;case Ic:G=16,we=null;break e}throw Error(va(130,F==null?F:typeof F,""))}return W=eu(G,ue,W,ke),W.elementType=F,W.type=we,W.lanes=Xe,W}function Nh(F,W,ue,we){return F=eu(7,F,we,W),F.lanes=ue,F}function Tg(F,W,ue,we){return F=eu(22,F,we,W),F.elementType=h3,F.lanes=ue,F.stateNode={isHidden:!1},F}function Fy(F,W,ue){return F=eu(6,F,null,W),F.lanes=ue,F}function _y(F,W,ue){return W=eu(4,F.children!==null?F.children:[],F.key,W),W.lanes=ue,W.stateNode={containerInfo:F.containerInfo,pendingChildren:null,implementation:F.implementation},W}function s6(F,W,ue,we,ke){this.tag=W,this.containerInfo=F,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=py(0),this.expirationTimes=py(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=py(0),this.identifierPrefix=we,this.onRecoverableError=ke,this.mutableSourceEagerHydrationData=null}function Wm(F,W,ue,we,ke,Xe,G,V,e){return F=new s6(F,W,ue,V,e),W===1?(W=1,Xe===!0&&(W|=8)):W=0,Xe=eu(3,null,null,W),F.current=Xe,Xe.stateNode=F,Xe.memoizedState={element:we,isDehydrated:ue,cache:null,transitions:null,pendingSuspenseBoundaries:null},Cm(Xe),F}function l6(F,W,ue){var we=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(sT)}catch(F){console.error(F)}}sT(),i3.exports=Dl;var kh=i3.exports,lT,Lb=kh;lT=Lb.createRoot,Lb.hydrateRoot;function v6(){for(var F=arguments.length,W=new Array(F),ue=0;uewe=>{W.forEach(ke=>ke(we))},W)}const Cg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function $v(F){const W=Object.prototype.toString.call(F);return W==="[object Window]"||W==="[object global]"}function jm(F){return"nodeType"in F}function cl(F){var W,ue;return F?$v(F)?F:jm(F)&&(W=(ue=F.ownerDocument)==null?void 0:ue.defaultView)!=null?W:window:window}function Km(F){const{Document:W}=cl(F);return F instanceof W}function wp(F){return $v(F)?!1:F instanceof cl(F).HTMLElement}function d6(F){return F instanceof cl(F).SVGElement}function qv(F){return F?$v(F)?F.document:jm(F)?Km(F)?F:wp(F)?F.ownerDocument:document:document:document}const Fu=Cg?Fn.useLayoutEffect:Fn.useEffect;function Jm(F){const W=Fn.useRef(F);return Fu(()=>{W.current=F}),Fn.useCallback(function(){for(var ue=arguments.length,we=new Array(ue),ke=0;ke{F.current=setInterval(we,ke)},[]),ue=Fn.useCallback(()=>{F.current!==null&&(clearInterval(F.current),F.current=null)},[]);return[W,ue]}function hp(F,W){W===void 0&&(W=[F]);const ue=Fn.useRef(F);return Fu(()=>{ue.current!==F&&(ue.current=F)},W),ue}function Tp(F,W){const ue=Fn.useRef();return Fn.useMemo(()=>{const we=F(ue.current);return ue.current=we,we},[...W])}function ig(F){const W=Jm(F),ue=Fn.useRef(null),we=Fn.useCallback(ke=>{ke!==ue.current&&(W==null||W(ke,ue.current)),ue.current=ke},[]);return[ue,we]}function H1(F){const W=Fn.useRef();return Fn.useEffect(()=>{W.current=F},[F]),W.current}let zy={};function Ap(F,W){return Fn.useMemo(()=>{if(W)return W;const ue=zy[F]==null?0:zy[F]+1;return zy[F]=ue,F+"-"+ue},[F,W])}function uT(F){return function(W){for(var ue=arguments.length,we=new Array(ue>1?ue-1:0),ke=1;ke{const V=Object.entries(G);for(const[e,m]of V){const P=Xe[e];P!=null&&(Xe[e]=P+F*m)}return Xe},{...W})}}const Nv=uT(1),vp=uT(-1);function g6(F){return"clientX"in F&&"clientY"in F}function Qm(F){if(!F)return!1;const{KeyboardEvent:W}=cl(F.target);return W&&F instanceof W}function y6(F){if(!F)return!1;const{TouchEvent:W}=cl(F.target);return W&&F instanceof W}function G1(F){if(y6(F)){if(F.touches&&F.touches.length){const{clientX:W,clientY:ue}=F.touches[0];return{x:W,y:ue}}else if(F.changedTouches&&F.changedTouches.length){const{clientX:W,clientY:ue}=F.changedTouches[0];return{x:W,y:ue}}}return g6(F)?{x:F.clientX,y:F.clientY}:null}const Zv=Object.freeze({Translate:{toString(F){if(!F)return;const{x:W,y:ue}=F;return"translate3d("+(W?Math.round(W):0)+"px, "+(ue?Math.round(ue):0)+"px, 0)"}},Scale:{toString(F){if(!F)return;const{scaleX:W,scaleY:ue}=F;return"scaleX("+W+") scaleY("+ue+")"}},Transform:{toString(F){if(F)return[Zv.Translate.toString(F),Zv.Scale.toString(F)].join(" ")}},Transition:{toString(F){let{property:W,duration:ue,easing:we}=F;return W+" "+ue+"ms "+we}}}),Pb="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function m6(F){return F.matches(Pb)?F:F.querySelector(Pb)}const x6={display:"none"};function b6(F){let{id:W,value:ue}=F;return Hi.createElement("div",{id:W,style:x6},ue)}const w6={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};function T6(F){let{id:W,announcement:ue}=F;return Hi.createElement("div",{id:W,style:w6,role:"status","aria-live":"assertive","aria-atomic":!0},ue)}function A6(){const[F,W]=Fn.useState("");return{announce:Fn.useCallback(we=>{we!=null&&W(we)},[]),announcement:F}}const fT=Fn.createContext(null);function M6(F){const W=Fn.useContext(fT);Fn.useEffect(()=>{if(!W)throw new Error("useDndMonitor must be used within a children of ");return W(F)},[F,W])}function S6(){const[F]=Fn.useState(()=>new Set),W=Fn.useCallback(we=>(F.add(we),()=>F.delete(we)),[F]);return[Fn.useCallback(we=>{let{type:ke,event:Xe}=we;F.forEach(G=>{var V;return(V=G[ke])==null?void 0:V.call(G,Xe)})},[F]),W]}const E6={draggable:` To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel. `},C6={onDragStart(F){let{active:W}=F;return"Picked up draggable item "+W.id+"."},onDragOver(F){let{active:W,over:ue}=F;return ue?"Draggable item "+W.id+" was moved over droppable area "+ue.id+".":"Draggable item "+W.id+" is no longer over a droppable area."},onDragEnd(F){let{active:W,over:ue}=F;return ue?"Draggable item "+W.id+" was dropped over droppable area "+ue.id:"Draggable item "+W.id+" was dropped."},onDragCancel(F){let{active:W}=F;return"Dragging was cancelled. Draggable item "+W.id+" was dropped."}};function L6(F){let{announcements:W=C6,container:ue,hiddenTextDescribedById:we,screenReaderInstructions:ke=E6}=F;const{announce:Xe,announcement:G}=A6(),V=Ap("DndLiveRegion"),[e,m]=Fn.useState(!1);if(Fn.useEffect(()=>{m(!0)},[]),M6(Fn.useMemo(()=>({onDragStart(i){let{active:L}=i;Xe(W.onDragStart({active:L}))},onDragMove(i){let{active:L,over:A}=i;W.onDragMove&&Xe(W.onDragMove({active:L,over:A}))},onDragOver(i){let{active:L,over:A}=i;Xe(W.onDragOver({active:L,over:A}))},onDragEnd(i){let{active:L,over:A}=i;Xe(W.onDragEnd({active:L,over:A}))},onDragCancel(i){let{active:L,over:A}=i;Xe(W.onDragCancel({active:L,over:A}))}}),[Xe,W])),!e)return null;const P=Hi.createElement(Hi.Fragment,null,Hi.createElement(b6,{id:we,value:ke.draggable}),Hi.createElement(T6,{id:V,announcement:G}));return ue?kh.createPortal(P,ue):P}var Bo;(function(F){F.DragStart="dragStart",F.DragMove="dragMove",F.DragEnd="dragEnd",F.DragCancel="dragCancel",F.DragOver="dragOver",F.RegisterDroppable="registerDroppable",F.SetDroppableDisabled="setDroppableDisabled",F.UnregisterDroppable="unregisterDroppable"})(Bo||(Bo={}));function og(){}function sg(F,W){return Fn.useMemo(()=>({sensor:F,options:W??{}}),[F,W])}function cT(){for(var F=arguments.length,W=new Array(F),ue=0;ue[...W].filter(we=>we!=null),[...W])}const _u=Object.freeze({x:0,y:0});function $m(F,W){return Math.sqrt(Math.pow(F.x-W.x,2)+Math.pow(F.y-W.y,2))}function qm(F,W){let{data:{value:ue}}=F,{data:{value:we}}=W;return ue-we}function P6(F,W){let{data:{value:ue}}=F,{data:{value:we}}=W;return we-ue}function W1(F){let{left:W,top:ue,height:we,width:ke}=F;return[{x:W,y:ue},{x:W+ke,y:ue},{x:W,y:ue+we},{x:W+ke,y:ue+we}]}function ex(F,W){if(!F||F.length===0)return null;const[ue]=F;return W?ue[W]:ue}function Rb(F,W,ue){return W===void 0&&(W=F.left),ue===void 0&&(ue=F.top),{x:W+F.width*.5,y:ue+F.height*.5}}const Db=F=>{let{collisionRect:W,droppableRects:ue,droppableContainers:we}=F;const ke=Rb(W,W.left,W.top),Xe=[];for(const G of we){const{id:V}=G,e=ue.get(V);if(e){const m=$m(Rb(e),ke);Xe.push({id:V,data:{droppableContainer:G,value:m}})}}return Xe.sort(qm)},R6=F=>{let{collisionRect:W,droppableRects:ue,droppableContainers:we}=F;const ke=W1(W),Xe=[];for(const G of we){const{id:V}=G,e=ue.get(V);if(e){const m=W1(e),P=ke.reduce((L,A,v)=>L+$m(m[v],A),0),i=Number((P/4).toFixed(4));Xe.push({id:V,data:{droppableContainer:G,value:i}})}}return Xe.sort(qm)};function D6(F,W){const ue=Math.max(W.top,F.top),we=Math.max(W.left,F.left),ke=Math.min(W.left+W.width,F.left+F.width),Xe=Math.min(W.top+W.height,F.top+F.height),G=ke-we,V=Xe-ue;if(we{let{collisionRect:W,droppableRects:ue,droppableContainers:we}=F;const ke=[];for(const Xe of we){const{id:G}=Xe,V=ue.get(G);if(V){const e=D6(V,W);e>0&&ke.push({id:G,data:{droppableContainer:Xe,value:e}})}}return ke.sort(P6)};function I6(F,W){const{top:ue,left:we,bottom:ke,right:Xe}=W;return ue<=F.y&&F.y<=ke&&we<=F.x&&F.x<=Xe}const k6=F=>{let{droppableContainers:W,droppableRects:ue,pointerCoordinates:we}=F;if(!we)return[];const ke=[];for(const Xe of W){const{id:G}=Xe,V=ue.get(G);if(V&&I6(we,V)){const m=W1(V).reduce((i,L)=>i+$m(we,L),0),P=Number((m/4).toFixed(4));ke.push({id:G,data:{droppableContainer:Xe,value:P}})}}return ke.sort(qm)};function F6(F,W,ue){return{...F,scaleX:W&&ue?W.width/ue.width:1,scaleY:W&&ue?W.height/ue.height:1}}function vT(F,W){return F&&W?{x:F.left-W.left,y:F.top-W.top}:_u}function _6(F){return function(ue){for(var we=arguments.length,ke=new Array(we>1?we-1:0),Xe=1;Xe({...G,top:G.top+F*V.y,bottom:G.bottom+F*V.y,left:G.left+F*V.x,right:G.right+F*V.x}),{...ue})}}const z6=_6(1);function O6(F){if(F.startsWith("matrix3d(")){const W=F.slice(9,-1).split(/, /);return{x:+W[12],y:+W[13],scaleX:+W[0],scaleY:+W[5]}}else if(F.startsWith("matrix(")){const W=F.slice(7,-1).split(/, /);return{x:+W[4],y:+W[5],scaleX:+W[0],scaleY:+W[3]}}return null}function N6(F,W,ue){const we=O6(W);if(!we)return F;const{scaleX:ke,scaleY:Xe,x:G,y:V}=we,e=F.left-G-(1-ke)*parseFloat(ue),m=F.top-V-(1-Xe)*parseFloat(ue.slice(ue.indexOf(" ")+1)),P=ke?F.width/ke:F.width,i=Xe?F.height/Xe:F.height;return{width:P,height:i,top:m,right:e+P,bottom:m+i,left:e}}const B6={ignoreTransform:!1};function ed(F,W){W===void 0&&(W=B6);let ue=F.getBoundingClientRect();if(W.ignoreTransform){const{transform:m,transformOrigin:P}=cl(F).getComputedStyle(F);m&&(ue=N6(ue,m,P))}const{top:we,left:ke,width:Xe,height:G,bottom:V,right:e}=ue;return{top:we,left:ke,width:Xe,height:G,bottom:V,right:e}}function Ib(F){return ed(F,{ignoreTransform:!0})}function U6(F){const W=F.innerWidth,ue=F.innerHeight;return{top:0,left:0,right:W,bottom:ue,width:W,height:ue}}function V6(F,W){return W===void 0&&(W=cl(F).getComputedStyle(F)),W.position==="fixed"}function H6(F,W){W===void 0&&(W=cl(F).getComputedStyle(F));const ue=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(ke=>{const Xe=W[ke];return typeof Xe=="string"?ue.test(Xe):!1})}function Lg(F,W){const ue=[];function we(ke){if(W!=null&&ue.length>=W||!ke)return ue;if(Km(ke)&&ke.scrollingElement!=null&&!ue.includes(ke.scrollingElement))return ue.push(ke.scrollingElement),ue;if(!wp(ke)||d6(ke)||ue.includes(ke))return ue;const Xe=cl(F).getComputedStyle(ke);return ke!==F&&H6(ke,Xe)&&ue.push(ke),V6(ke,Xe)?ue:we(ke.parentNode)}return F?we(F):ue}function dT(F){const[W]=Lg(F,1);return W??null}function Oy(F){return!Cg||!F?null:$v(F)?F:jm(F)?Km(F)||F===qv(F).scrollingElement?window:wp(F)?F:null:null}function pT(F){return $v(F)?F.scrollX:F.scrollLeft}function gT(F){return $v(F)?F.scrollY:F.scrollTop}function Y1(F){return{x:pT(F),y:gT(F)}}var Jo;(function(F){F[F.Forward=1]="Forward",F[F.Backward=-1]="Backward"})(Jo||(Jo={}));function yT(F){return!Cg||!F?!1:F===document.scrollingElement}function mT(F){const W={x:0,y:0},ue=yT(F)?{height:window.innerHeight,width:window.innerWidth}:{height:F.clientHeight,width:F.clientWidth},we={x:F.scrollWidth-ue.width,y:F.scrollHeight-ue.height},ke=F.scrollTop<=W.y,Xe=F.scrollLeft<=W.x,G=F.scrollTop>=we.y,V=F.scrollLeft>=we.x;return{isTop:ke,isLeft:Xe,isBottom:G,isRight:V,maxScroll:we,minScroll:W}}const G6={x:.2,y:.2};function W6(F,W,ue,we,ke){let{top:Xe,left:G,right:V,bottom:e}=ue;we===void 0&&(we=10),ke===void 0&&(ke=G6);const{isTop:m,isBottom:P,isLeft:i,isRight:L}=mT(F),A={x:0,y:0},v={x:0,y:0},p={height:W.height*ke.y,width:W.width*ke.x};return!m&&Xe<=W.top+p.height?(A.y=Jo.Backward,v.y=we*Math.abs((W.top+p.height-Xe)/p.height)):!P&&e>=W.bottom-p.height&&(A.y=Jo.Forward,v.y=we*Math.abs((W.bottom-p.height-e)/p.height)),!L&&V>=W.right-p.width?(A.x=Jo.Forward,v.x=we*Math.abs((W.right-p.width-V)/p.width)):!i&&G<=W.left+p.width&&(A.x=Jo.Backward,v.x=we*Math.abs((W.left+p.width-G)/p.width)),{direction:A,speed:v}}function Y6(F){if(F===document.scrollingElement){const{innerWidth:Xe,innerHeight:G}=window;return{top:0,left:0,right:Xe,bottom:G,width:Xe,height:G}}const{top:W,left:ue,right:we,bottom:ke}=F.getBoundingClientRect();return{top:W,left:ue,right:we,bottom:ke,width:F.clientWidth,height:F.clientHeight}}function xT(F){return F.reduce((W,ue)=>Nv(W,Y1(ue)),_u)}function Z6(F){return F.reduce((W,ue)=>W+pT(ue),0)}function X6(F){return F.reduce((W,ue)=>W+gT(ue),0)}function j6(F,W){if(W===void 0&&(W=ed),!F)return;const{top:ue,left:we,bottom:ke,right:Xe}=W(F);dT(F)&&(ke<=0||Xe<=0||ue>=window.innerHeight||we>=window.innerWidth)&&F.scrollIntoView({block:"center",inline:"center"})}const K6=[["x",["left","right"],Z6],["y",["top","bottom"],X6]];class tx{constructor(W,ue){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const we=Lg(ue),ke=xT(we);this.rect={...W},this.width=W.width,this.height=W.height;for(const[Xe,G,V]of K6)for(const e of G)Object.defineProperty(this,e,{get:()=>{const m=V(we),P=ke[Xe]-m;return this.rect[e]+P},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Yd{constructor(W){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(ue=>{var we;return(we=this.target)==null?void 0:we.removeEventListener(...ue)})},this.target=W}add(W,ue,we){var ke;(ke=this.target)==null||ke.addEventListener(W,ue,we),this.listeners.push([W,ue,we])}}function J6(F){const{EventTarget:W}=cl(F);return F instanceof W?F:qv(F)}function Ny(F,W){const ue=Math.abs(F.x),we=Math.abs(F.y);return typeof W=="number"?Math.sqrt(ue**2+we**2)>W:"x"in W&&"y"in W?ue>W.x&&we>W.y:"x"in W?ue>W.x:"y"in W?we>W.y:!1}var Ql;(function(F){F.Click="click",F.DragStart="dragstart",F.Keydown="keydown",F.ContextMenu="contextmenu",F.Resize="resize",F.SelectionChange="selectionchange",F.VisibilityChange="visibilitychange"})(Ql||(Ql={}));function kb(F){F.preventDefault()}function Q6(F){F.stopPropagation()}var mi;(function(F){F.Space="Space",F.Down="ArrowDown",F.Right="ArrowRight",F.Left="ArrowLeft",F.Up="ArrowUp",F.Esc="Escape",F.Enter="Enter"})(mi||(mi={}));const bT={start:[mi.Space,mi.Enter],cancel:[mi.Esc],end:[mi.Space,mi.Enter]},$6=(F,W)=>{let{currentCoordinates:ue}=W;switch(F.code){case mi.Right:return{...ue,x:ue.x+25};case mi.Left:return{...ue,x:ue.x-25};case mi.Down:return{...ue,y:ue.y+25};case mi.Up:return{...ue,y:ue.y-25}}};class Pg{constructor(W){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=W;const{event:{target:ue}}=W;this.props=W,this.listeners=new Yd(qv(ue)),this.windowListeners=new Yd(cl(ue)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ql.Resize,this.handleCancel),this.windowListeners.add(Ql.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Ql.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:W,onStart:ue}=this.props,we=W.node.current;we&&j6(we),ue(_u)}handleKeyDown(W){if(Qm(W)){const{active:ue,context:we,options:ke}=this.props,{keyboardCodes:Xe=bT,coordinateGetter:G=$6,scrollBehavior:V="smooth"}=ke,{code:e}=W;if(Xe.end.includes(e)){this.handleEnd(W);return}if(Xe.cancel.includes(e)){this.handleCancel(W);return}const{collisionRect:m}=we.current,P=m?{x:m.left,y:m.top}:_u;this.referenceCoordinates||(this.referenceCoordinates=P);const i=G(W,{active:ue,context:we.current,currentCoordinates:P});if(i){const L=vp(i,P),A={x:0,y:0},{scrollableAncestors:v}=we.current;for(const p of v){const t=W.code,{isTop:r,isRight:s,isLeft:n,isBottom:l,maxScroll:c,minScroll:u}=mT(p),g=Y6(p),f={x:Math.min(t===mi.Right?g.right-g.width/2:g.right,Math.max(t===mi.Right?g.left:g.left+g.width/2,i.x)),y:Math.min(t===mi.Down?g.bottom-g.height/2:g.bottom,Math.max(t===mi.Down?g.top:g.top+g.height/2,i.y))},w=t===mi.Right&&!s||t===mi.Left&&!n,h=t===mi.Down&&!l||t===mi.Up&&!r;if(w&&f.x!==i.x){const o=p.scrollLeft+L.x,d=t===mi.Right&&o<=c.x||t===mi.Left&&o>=u.x;if(d&&!L.y){p.scrollTo({left:o,behavior:V});return}d?A.x=p.scrollLeft-o:A.x=t===mi.Right?p.scrollLeft-c.x:p.scrollLeft-u.x,A.x&&p.scrollBy({left:-A.x,behavior:V});break}else if(h&&f.y!==i.y){const o=p.scrollTop+L.y,d=t===mi.Down&&o<=c.y||t===mi.Up&&o>=u.y;if(d&&!L.x){p.scrollTo({top:o,behavior:V});return}d?A.y=p.scrollTop-o:A.y=t===mi.Down?p.scrollTop-c.y:p.scrollTop-u.y,A.y&&p.scrollBy({top:-A.y,behavior:V});break}}this.handleMove(W,Nv(vp(i,this.referenceCoordinates),A))}}}handleMove(W,ue){const{onMove:we}=this.props;W.preventDefault(),we(ue)}handleEnd(W){const{onEnd:ue}=this.props;W.preventDefault(),this.detach(),ue()}handleCancel(W){const{onCancel:ue}=this.props;W.preventDefault(),this.detach(),ue()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Pg.activators=[{eventName:"onKeyDown",handler:(F,W,ue)=>{let{keyboardCodes:we=bT,onActivation:ke}=W,{active:Xe}=ue;const{code:G}=F.nativeEvent;if(we.start.includes(G)){const V=Xe.activatorNode.current;return V&&F.target!==V?!1:(F.preventDefault(),ke==null||ke({event:F.nativeEvent}),!0)}return!1}}];function Fb(F){return!!(F&&"distance"in F)}function _b(F){return!!(F&&"delay"in F)}class rx{constructor(W,ue,we){var ke;we===void 0&&(we=J6(W.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=W,this.events=ue;const{event:Xe}=W,{target:G}=Xe;this.props=W,this.events=ue,this.document=qv(G),this.documentListeners=new Yd(this.document),this.listeners=new Yd(we),this.windowListeners=new Yd(cl(G)),this.initialCoordinates=(ke=G1(Xe))!=null?ke:_u,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:W,props:{options:{activationConstraint:ue}}}=this;if(this.listeners.add(W.move.name,this.handleMove,{passive:!1}),this.listeners.add(W.end.name,this.handleEnd),this.windowListeners.add(Ql.Resize,this.handleCancel),this.windowListeners.add(Ql.DragStart,kb),this.windowListeners.add(Ql.VisibilityChange,this.handleCancel),this.windowListeners.add(Ql.ContextMenu,kb),this.documentListeners.add(Ql.Keydown,this.handleKeydown),ue){if(Fb(ue))return;if(_b(ue)){this.timeoutId=setTimeout(this.handleStart,ue.delay);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:W}=this,{onStart:ue}=this.props;W&&(this.activated=!0,this.documentListeners.add(Ql.Click,Q6,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ql.SelectionChange,this.removeTextSelection),ue(W))}handleMove(W){var ue;const{activated:we,initialCoordinates:ke,props:Xe}=this,{onMove:G,options:{activationConstraint:V}}=Xe;if(!ke)return;const e=(ue=G1(W))!=null?ue:_u,m=vp(ke,e);if(!we&&V){if(_b(V))return Ny(m,V.tolerance)?this.handleCancel():void 0;if(Fb(V))return V.tolerance!=null&&Ny(m,V.tolerance)?this.handleCancel():Ny(m,V.distance)?this.handleStart():void 0}W.cancelable&&W.preventDefault(),G(e)}handleEnd(){const{onEnd:W}=this.props;this.detach(),W()}handleCancel(){const{onCancel:W}=this.props;this.detach(),W()}handleKeydown(W){W.code===mi.Esc&&this.handleCancel()}removeTextSelection(){var W;(W=this.document.getSelection())==null||W.removeAllRanges()}}const q6={move:{name:"pointermove"},end:{name:"pointerup"}};class Rg extends rx{constructor(W){const{event:ue}=W,we=qv(ue.target);super(W,q6,we)}}Rg.activators=[{eventName:"onPointerDown",handler:(F,W)=>{let{nativeEvent:ue}=F,{onActivation:we}=W;return!ue.isPrimary||ue.button!==0?!1:(we==null||we({event:ue}),!0)}}];const e8={move:{name:"mousemove"},end:{name:"mouseup"}};var Z1;(function(F){F[F.RightClick=2]="RightClick"})(Z1||(Z1={}));class t8 extends rx{constructor(W){super(W,e8,qv(W.event.target))}}t8.activators=[{eventName:"onMouseDown",handler:(F,W)=>{let{nativeEvent:ue}=F,{onActivation:we}=W;return ue.button===Z1.RightClick?!1:(we==null||we({event:ue}),!0)}}];const By={move:{name:"touchmove"},end:{name:"touchend"}};class r8 extends rx{constructor(W){super(W,By)}static setup(){return window.addEventListener(By.move.name,W,{capture:!1,passive:!1}),function(){window.removeEventListener(By.move.name,W)};function W(){}}}r8.activators=[{eventName:"onTouchStart",handler:(F,W)=>{let{nativeEvent:ue}=F,{onActivation:we}=W;const{touches:ke}=ue;return ke.length>1?!1:(we==null||we({event:ue}),!0)}}];var Zd;(function(F){F[F.Pointer=0]="Pointer",F[F.DraggableRect=1]="DraggableRect"})(Zd||(Zd={}));var lg;(function(F){F[F.TreeOrder=0]="TreeOrder",F[F.ReversedTreeOrder=1]="ReversedTreeOrder"})(lg||(lg={}));function n8(F){let{acceleration:W,activator:ue=Zd.Pointer,canScroll:we,draggingRect:ke,enabled:Xe,interval:G=5,order:V=lg.TreeOrder,pointerCoordinates:e,scrollableAncestors:m,scrollableAncestorRects:P,delta:i,threshold:L}=F;const A=i8({delta:i,disabled:!Xe}),[v,p]=p6(),t=Fn.useRef({x:0,y:0}),r=Fn.useRef({x:0,y:0}),s=Fn.useMemo(()=>{switch(ue){case Zd.Pointer:return e?{top:e.y,bottom:e.y,left:e.x,right:e.x}:null;case Zd.DraggableRect:return ke}},[ue,ke,e]),n=Fn.useRef(null),l=Fn.useCallback(()=>{const u=n.current;if(!u)return;const g=t.current.x*r.current.x,f=t.current.y*r.current.y;u.scrollBy(g,f)},[]),c=Fn.useMemo(()=>V===lg.TreeOrder?[...m].reverse():m,[V,m]);Fn.useEffect(()=>{if(!Xe||!m.length||!s){p();return}for(const u of c){if((we==null?void 0:we(u))===!1)continue;const g=m.indexOf(u),f=P[g];if(!f)continue;const{direction:w,speed:h}=W6(u,f,s,W,L);for(const o of["x","y"])A[o][w[o]]||(h[o]=0,w[o]=0);if(h.x>0||h.y>0){p(),n.current=u,v(l,G),t.current=h,r.current=w;return}}t.current={x:0,y:0},r.current={x:0,y:0},p()},[W,l,we,p,Xe,G,JSON.stringify(s),JSON.stringify(A),v,m,c,P,JSON.stringify(L)])}const a8={x:{[Jo.Backward]:!1,[Jo.Forward]:!1},y:{[Jo.Backward]:!1,[Jo.Forward]:!1}};function i8(F){let{delta:W,disabled:ue}=F;const we=H1(W);return Tp(ke=>{if(ue||!we||!ke)return a8;const Xe={x:Math.sign(W.x-we.x),y:Math.sign(W.y-we.y)};return{x:{[Jo.Backward]:ke.x[Jo.Backward]||Xe.x===-1,[Jo.Forward]:ke.x[Jo.Forward]||Xe.x===1},y:{[Jo.Backward]:ke.y[Jo.Backward]||Xe.y===-1,[Jo.Forward]:ke.y[Jo.Forward]||Xe.y===1}}},[ue,W,we])}function o8(F,W){const ue=W!==null?F.get(W):void 0,we=ue?ue.node.current:null;return Tp(ke=>{var Xe;return W===null?null:(Xe=we??ke)!=null?Xe:null},[we,W])}function s8(F,W){return Fn.useMemo(()=>F.reduce((ue,we)=>{const{sensor:ke}=we,Xe=ke.activators.map(G=>({eventName:G.eventName,handler:W(G.handler,we)}));return[...ue,...Xe]},[]),[F,W])}var Xv;(function(F){F[F.Always=0]="Always",F[F.BeforeDragging=1]="BeforeDragging",F[F.WhileDragging=2]="WhileDragging"})(Xv||(Xv={}));var X1;(function(F){F.Optimized="optimized"})(X1||(X1={}));const zb=new Map;function l8(F,W){let{dragging:ue,dependencies:we,config:ke}=W;const[Xe,G]=Fn.useState(null),{frequency:V,measure:e,strategy:m}=ke,P=Fn.useRef(F),i=t(),L=hp(i),A=Fn.useCallback(function(r){r===void 0&&(r=[]),!L.current&&G(s=>s===null?r:s.concat(r.filter(n=>!s.includes(n))))},[L]),v=Fn.useRef(null),p=Tp(r=>{if(i&&!ue)return zb;if(!r||r===zb||P.current!==F||Xe!=null){const s=new Map;for(let n of F){if(!n)continue;if(Xe&&Xe.length>0&&!Xe.includes(n.id)&&n.rect.current){s.set(n.id,n.rect.current);continue}const l=n.node.current,c=l?new tx(e(l),l):null;n.rect.current=c,c&&s.set(n.id,c)}return s}return r},[F,Xe,ue,i,e]);return Fn.useEffect(()=>{P.current=F},[F]),Fn.useEffect(()=>{i||A()},[ue,i]),Fn.useEffect(()=>{Xe&&Xe.length>0&&G(null)},[JSON.stringify(Xe)]),Fn.useEffect(()=>{i||typeof V!="number"||v.current!==null||(v.current=setTimeout(()=>{A(),v.current=null},V))},[V,i,A,...we]),{droppableRects:p,measureDroppableContainers:A,measuringScheduled:Xe!=null};function t(){switch(m){case Xv.Always:return!1;case Xv.BeforeDragging:return ue;default:return!ue}}}function wT(F,W){return Tp(ue=>F?ue||(typeof W=="function"?W(F):F):null,[W,F])}function u8(F,W){return wT(F,W)}function f8(F){let{callback:W,disabled:ue}=F;const we=Jm(W),ke=Fn.useMemo(()=>{if(ue||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:Xe}=window;return new Xe(we)},[we,ue]);return Fn.useEffect(()=>()=>ke==null?void 0:ke.disconnect(),[ke]),ke}function Dg(F){let{callback:W,disabled:ue}=F;const we=Jm(W),ke=Fn.useMemo(()=>{if(ue||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:Xe}=window;return new Xe(we)},[ue]);return Fn.useEffect(()=>()=>ke==null?void 0:ke.disconnect(),[ke]),ke}function c8(F){return new tx(ed(F),F)}function Ob(F,W,ue){W===void 0&&(W=c8);const[we,ke]=Fn.useReducer(V,null),Xe=f8({callback(e){if(F)for(const m of e){const{type:P,target:i}=m;if(P==="childList"&&i instanceof HTMLElement&&i.contains(F)){ke();break}}}}),G=Dg({callback:ke});return Fu(()=>{ke(),F?(G==null||G.observe(F),Xe==null||Xe.observe(document.body,{childList:!0,subtree:!0})):(G==null||G.disconnect(),Xe==null||Xe.disconnect())},[F]),we;function V(e){if(!F)return null;if(F.isConnected===!1){var m;return(m=e??ue)!=null?m:null}const P=W(F);return JSON.stringify(e)===JSON.stringify(P)?e:P}}function h8(F){const W=wT(F);return vT(F,W)}const Nb=[];function v8(F){const W=Fn.useRef(F),ue=Tp(we=>F?we&&we!==Nb&&F&&W.current&&F.parentNode===W.current.parentNode?we:Lg(F):Nb,[F]);return Fn.useEffect(()=>{W.current=F},[F]),ue}function d8(F){const[W,ue]=Fn.useState(null),we=Fn.useRef(F),ke=Fn.useCallback(Xe=>{const G=Oy(Xe.target);G&&ue(V=>V?(V.set(G,Y1(G)),new Map(V)):null)},[]);return Fn.useEffect(()=>{const Xe=we.current;if(F!==Xe){G(Xe);const V=F.map(e=>{const m=Oy(e);return m?(m.addEventListener("scroll",ke,{passive:!0}),[m,Y1(m)]):null}).filter(e=>e!=null);ue(V.length?new Map(V):null),we.current=F}return()=>{G(F),G(Xe)};function G(V){V.forEach(e=>{const m=Oy(e);m==null||m.removeEventListener("scroll",ke)})}},[ke,F]),Fn.useMemo(()=>F.length?W?Array.from(W.values()).reduce((Xe,G)=>Nv(Xe,G),_u):xT(F):_u,[F,W])}function Bb(F,W){W===void 0&&(W=[]);const ue=Fn.useRef(null);return Fn.useEffect(()=>{ue.current=null},W),Fn.useEffect(()=>{const we=F!==_u;we&&!ue.current&&(ue.current=F),!we&&ue.current&&(ue.current=null)},[F]),ue.current?vp(F,ue.current):_u}function p8(F){Fn.useEffect(()=>{if(!Cg)return;const W=F.map(ue=>{let{sensor:we}=ue;return we.setup==null?void 0:we.setup()});return()=>{for(const ue of W)ue==null||ue()}},F.map(W=>{let{sensor:ue}=W;return ue}))}function g8(F,W){return Fn.useMemo(()=>F.reduce((ue,we)=>{let{eventName:ke,handler:Xe}=we;return ue[ke]=G=>{Xe(G,W)},ue},{}),[F,W])}function TT(F){return Fn.useMemo(()=>F?U6(F):null,[F])}const Uy=[];function y8(F,W){W===void 0&&(W=ed);const[ue]=F,we=TT(ue?cl(ue):null),[ke,Xe]=Fn.useReducer(V,Uy),G=Dg({callback:Xe});return F.length>0&&ke===Uy&&Xe(),Fu(()=>{F.length?F.forEach(e=>G==null?void 0:G.observe(e)):(G==null||G.disconnect(),Xe())},[F]),ke;function V(){return F.length?F.map(e=>yT(e)?we:new tx(W(e),e)):Uy}}function m8(F){if(!F)return null;if(F.children.length>1)return F;const W=F.children[0];return wp(W)?W:F}function x8(F){let{measure:W}=F;const[ue,we]=Fn.useState(null),ke=Fn.useCallback(m=>{for(const{target:P}of m)if(wp(P)){we(i=>{const L=W(P);return i?{...i,width:L.width,height:L.height}:L});break}},[W]),Xe=Dg({callback:ke}),G=Fn.useCallback(m=>{const P=m8(m);Xe==null||Xe.disconnect(),P&&(Xe==null||Xe.observe(P)),we(P?W(P):null)},[W,Xe]),[V,e]=ig(G);return Fn.useMemo(()=>({nodeRef:V,rect:ue,setRef:e}),[ue,V,e])}const b8=[{sensor:Rg,options:{}},{sensor:Pg,options:{}}],w8={current:{}},F0={draggable:{measure:Ib},droppable:{measure:Ib,strategy:Xv.WhileDragging,frequency:X1.Optimized},dragOverlay:{measure:ed}};class Xd extends Map{get(W){var ue;return W!=null&&(ue=super.get(W))!=null?ue:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(W=>{let{disabled:ue}=W;return!ue})}getNodeFor(W){var ue,we;return(ue=(we=this.get(W))==null?void 0:we.node.current)!=null?ue:void 0}}const T8={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Xd,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:og},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:F0,measureDroppableContainers:og,windowRect:null,measuringScheduled:!1},A8={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:og,draggableNodes:new Map,over:null,measureDroppableContainers:og},Ig=Fn.createContext(A8),AT=Fn.createContext(T8);function M8(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Xd}}}function S8(F,W){switch(W.type){case Bo.DragStart:return{...F,draggable:{...F.draggable,initialCoordinates:W.initialCoordinates,active:W.active}};case Bo.DragMove:return F.draggable.active?{...F,draggable:{...F.draggable,translate:{x:W.coordinates.x-F.draggable.initialCoordinates.x,y:W.coordinates.y-F.draggable.initialCoordinates.y}}}:F;case Bo.DragEnd:case Bo.DragCancel:return{...F,draggable:{...F.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Bo.RegisterDroppable:{const{element:ue}=W,{id:we}=ue,ke=new Xd(F.droppable.containers);return ke.set(we,ue),{...F,droppable:{...F.droppable,containers:ke}}}case Bo.SetDroppableDisabled:{const{id:ue,key:we,disabled:ke}=W,Xe=F.droppable.containers.get(ue);if(!Xe||we!==Xe.key)return F;const G=new Xd(F.droppable.containers);return G.set(ue,{...Xe,disabled:ke}),{...F,droppable:{...F.droppable,containers:G}}}case Bo.UnregisterDroppable:{const{id:ue,key:we}=W,ke=F.droppable.containers.get(ue);if(!ke||we!==ke.key)return F;const Xe=new Xd(F.droppable.containers);return Xe.delete(ue),{...F,droppable:{...F.droppable,containers:Xe}}}default:return F}}function E8(F){let{disabled:W}=F;const{active:ue,activatorEvent:we,draggableNodes:ke}=Fn.useContext(Ig),Xe=H1(we),G=H1(ue==null?void 0:ue.id);return Fn.useEffect(()=>{if(!W&&!we&&Xe&&G!=null){if(!Qm(Xe)||document.activeElement===Xe.target)return;const V=ke.get(G);if(!V)return;const{activatorNode:e,node:m}=V;if(!e.current&&!m.current)return;requestAnimationFrame(()=>{for(const P of[e.current,m.current]){if(!P)continue;const i=m6(P);if(i){i.focus();break}}})}},[we,W,ke,G,Xe]),null}function C8(F,W){let{transform:ue,...we}=W;return F!=null&&F.length?F.reduce((ke,Xe)=>Xe({transform:ke,...we}),ue):ue}function L8(F){return Fn.useMemo(()=>({draggable:{...F0.draggable,...F==null?void 0:F.draggable},droppable:{...F0.droppable,...F==null?void 0:F.droppable},dragOverlay:{...F0.dragOverlay,...F==null?void 0:F.dragOverlay}}),[F==null?void 0:F.draggable,F==null?void 0:F.droppable,F==null?void 0:F.dragOverlay])}function P8(F){let{activeNode:W,measure:ue,initialRect:we,config:ke=!0}=F;const Xe=Fn.useRef(!1),{x:G,y:V}=typeof ke=="boolean"?{x:ke,y:ke}:ke;Fu(()=>{if(!G&&!V||!W){Xe.current=!1;return}if(Xe.current||!we)return;const m=W==null?void 0:W.node.current;if(!m||m.isConnected===!1)return;const P=ue(m),i=vT(P,we);if(G||(i.x=0),V||(i.y=0),Xe.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){const L=dT(m);L&&L.scrollBy({top:i.y,left:i.x})}},[W,G,V,we,ue])}const MT=Fn.createContext({..._u,scaleX:1,scaleY:1});var Fc;(function(F){F[F.Uninitialized=0]="Uninitialized",F[F.Initializing=1]="Initializing",F[F.Initialized=2]="Initialized"})(Fc||(Fc={}));const ST=Fn.memo(function(W){var ue,we,ke,Xe;let{id:G,accessibility:V,autoScroll:e=!0,children:m,sensors:P=b8,collisionDetection:i=hT,measuring:L,modifiers:A,...v}=W;const p=Fn.useReducer(S8,void 0,M8),[t,r]=p,[s,n]=S6(),[l,c]=Fn.useState(Fc.Uninitialized),u=l===Fc.Initialized,{draggable:{active:g,nodes:f,translate:w},droppable:{containers:h}}=t,o=g?f.get(g):null,d=Fn.useRef({initial:null,translated:null}),M=Fn.useMemo(()=>{var et;return g!=null?{id:g,data:(et=o==null?void 0:o.data)!=null?et:w8,rect:d}:null},[g,o]),T=Fn.useRef(null),[C,x]=Fn.useState(null),[S,b]=Fn.useState(null),a=hp(v,Object.values(v)),E=Ap("DndDescribedBy",G),y=Fn.useMemo(()=>h.getEnabled(),[h]),z=L8(L),{droppableRects:I,measureDroppableContainers:B,measuringScheduled:k}=l8(y,{dragging:u,dependencies:[w.x,w.y],config:z.droppable}),O=o8(f,g),N=Fn.useMemo(()=>S?G1(S):null,[S]),_=$e(),U=u8(O,z.draggable.measure);P8({activeNode:g?f.get(g):null,config:_.layoutShiftCompensation,initialRect:U,measure:z.draggable.measure});const Y=Ob(O,z.draggable.measure,U),J=Ob(O?O.parentElement:null),te=Fn.useRef({activatorEvent:null,active:null,activeNode:O,collisionRect:null,collisions:null,droppableRects:I,draggableNodes:f,draggingNode:null,draggingNodeRect:null,droppableContainers:h,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ae=h.getNodeFor((ue=te.current.over)==null?void 0:ue.id),ce=x8({measure:z.dragOverlay.measure}),Q=(we=ce.nodeRef.current)!=null?we:O,Z=u?(ke=ce.rect)!=null?ke:Y:null,j=!!(ce.nodeRef.current&&ce.rect),K=h8(j?null:Y),ee=TT(Q?cl(Q):null),oe=v8(u?ae??O:null),q=y8(oe),$=C8(A,{transform:{x:w.x-K.x,y:w.y-K.y,scaleX:1,scaleY:1},activatorEvent:S,active:M,activeNodeRect:Y,containerNodeRect:J,draggingNodeRect:Z,over:te.current.over,overlayNodeRect:ce.rect,scrollableAncestors:oe,scrollableAncestorRects:q,windowRect:ee}),le=N?Nv(N,w):null,ie=d8(oe),he=Bb(ie),me=Bb(ie,[Y]),Me=Nv($,he),Te=Z?z6(Z,$):null,Oe=M&&Te?i({active:M,collisionRect:Te,droppableRects:I,droppableContainers:y,pointerCoordinates:le}):null,Ne=ex(Oe,"id"),[Ee,xe]=Fn.useState(null),Se=j?$:Nv($,me),Ue=F6(Se,(Xe=Ee==null?void 0:Ee.rect)!=null?Xe:null,Y),He=Fn.useCallback((et,ct)=>{let{sensor:dt,options:pt}=ct;if(T.current==null)return;const At=f.get(T.current);if(!At)return;const Mt=et.nativeEvent,Vt=new dt({active:T.current,activeNode:At,event:Mt,options:pt,context:te,onStart(De){const Ie=T.current;if(Ie==null)return;const ze=f.get(Ie);if(!ze)return;const{onDragStart:Pe}=a.current,be={active:{id:Ie,data:ze.data,rect:d}};kh.unstable_batchedUpdates(()=>{Pe==null||Pe(be),c(Fc.Initializing),r({type:Bo.DragStart,initialCoordinates:De,active:Ie}),s({type:"onDragStart",event:be})})},onMove(De){r({type:Bo.DragMove,coordinates:De})},onEnd:Je(Bo.DragEnd),onCancel:Je(Bo.DragCancel)});kh.unstable_batchedUpdates(()=>{x(Vt),b(et.nativeEvent)});function Je(De){return async function(){const{active:ze,collisions:Pe,over:be,scrollAdjustedTranslate:se}=te.current;let ye=null;if(ze&&se){const{cancelDrop:Le}=a.current;ye={activatorEvent:Mt,active:ze,collisions:Pe,delta:se,over:be},De===Bo.DragEnd&&typeof Le=="function"&&await Promise.resolve(Le(ye))&&(De=Bo.DragCancel)}T.current=null,kh.unstable_batchedUpdates(()=>{r({type:De}),c(Fc.Uninitialized),xe(null),x(null),b(null);const Le=De===Bo.DragEnd?"onDragEnd":"onDragCancel";if(ye){const Be=a.current[Le];Be==null||Be(ye),s({type:Le,event:ye})}})}}},[f]),Fe=Fn.useCallback((et,ct)=>(dt,pt)=>{const At=dt.nativeEvent,Mt=f.get(pt);if(T.current!==null||!Mt||At.dndKit||At.defaultPrevented)return;const Vt={active:Mt};et(dt,ct.options,Vt)===!0&&(At.dndKit={capturedBy:ct.sensor},T.current=pt,He(dt,ct))},[f,He]),Ge=s8(P,Fe);p8(P),Fu(()=>{Y&&l===Fc.Initializing&&c(Fc.Initialized)},[Y,l]),Fn.useEffect(()=>{const{onDragMove:et}=a.current,{active:ct,activatorEvent:dt,collisions:pt,over:At}=te.current;if(!ct||!dt)return;const Mt={active:ct,activatorEvent:dt,collisions:pt,delta:{x:Me.x,y:Me.y},over:At};kh.unstable_batchedUpdates(()=>{et==null||et(Mt),s({type:"onDragMove",event:Mt})})},[Me.x,Me.y]),Fn.useEffect(()=>{const{active:et,activatorEvent:ct,collisions:dt,droppableContainers:pt,scrollAdjustedTranslate:At}=te.current;if(!et||T.current==null||!ct||!At)return;const{onDragOver:Mt}=a.current,Vt=pt.get(Ne),Je=Vt&&Vt.rect.current?{id:Vt.id,rect:Vt.rect.current,data:Vt.data,disabled:Vt.disabled}:null,De={active:et,activatorEvent:ct,collisions:dt,delta:{x:At.x,y:At.y},over:Je};kh.unstable_batchedUpdates(()=>{xe(Je),Mt==null||Mt(De),s({type:"onDragOver",event:De})})},[Ne]),Fu(()=>{te.current={activatorEvent:S,active:M,activeNode:O,collisionRect:Te,collisions:Oe,droppableRects:I,draggableNodes:f,draggingNode:Q,draggingNodeRect:Z,droppableContainers:h,over:Ee,scrollableAncestors:oe,scrollAdjustedTranslate:Me},d.current={initial:Z,translated:Te}},[M,O,Oe,Te,f,Q,Z,I,h,Ee,oe,Me]),n8({..._,delta:w,draggingRect:Te,pointerCoordinates:le,scrollableAncestors:oe,scrollableAncestorRects:q});const nt=Fn.useMemo(()=>({active:M,activeNode:O,activeNodeRect:Y,activatorEvent:S,collisions:Oe,containerNodeRect:J,dragOverlay:ce,draggableNodes:f,droppableContainers:h,droppableRects:I,over:Ee,measureDroppableContainers:B,scrollableAncestors:oe,scrollableAncestorRects:q,measuringConfiguration:z,measuringScheduled:k,windowRect:ee}),[M,O,Y,S,Oe,J,ce,f,h,I,Ee,B,oe,q,z,k,ee]),qe=Fn.useMemo(()=>({activatorEvent:S,activators:Ge,active:M,activeNodeRect:Y,ariaDescribedById:{draggable:E},dispatch:r,draggableNodes:f,over:Ee,measureDroppableContainers:B}),[S,Ge,M,Y,r,E,f,Ee,B]);return Hi.createElement(fT.Provider,{value:n},Hi.createElement(Ig.Provider,{value:qe},Hi.createElement(AT.Provider,{value:nt},Hi.createElement(MT.Provider,{value:Ue},m)),Hi.createElement(E8,{disabled:(V==null?void 0:V.restoreFocus)===!1})),Hi.createElement(L6,{...V,hiddenTextDescribedById:E}));function $e(){const et=(C==null?void 0:C.autoScrollEnabled)===!1,ct=typeof e=="object"?e.enabled===!1:e===!1,dt=u&&!et&&!ct;return typeof e=="object"?{...e,enabled:dt}:{enabled:dt}}}),R8=Fn.createContext(null),Ub="button",D8="Droppable";function ET(F){let{id:W,data:ue,disabled:we=!1,attributes:ke}=F;const Xe=Ap(D8),{activators:G,activatorEvent:V,active:e,activeNodeRect:m,ariaDescribedById:P,draggableNodes:i,over:L}=Fn.useContext(Ig),{role:A=Ub,roleDescription:v="draggable",tabIndex:p=0}=ke??{},t=(e==null?void 0:e.id)===W,r=Fn.useContext(t?MT:R8),[s,n]=ig(),[l,c]=ig(),u=g8(G,W),g=hp(ue);Fu(()=>(i.set(W,{id:W,key:Xe,node:s,activatorNode:l,data:g}),()=>{const w=i.get(W);w&&w.key===Xe&&i.delete(W)}),[i,W]);const f=Fn.useMemo(()=>({role:A,tabIndex:p,"aria-disabled":we,"aria-pressed":t&&A===Ub?!0:void 0,"aria-roledescription":v,"aria-describedby":P.draggable}),[we,A,p,t,v,P.draggable]);return{active:e,activatorEvent:V,activeNodeRect:m,attributes:f,isDragging:t,listeners:we?void 0:u,node:s,over:L,setNodeRef:n,setActivatorNodeRef:c,transform:r}}function I8(){return Fn.useContext(AT)}const k8="Droppable",F8={timeout:25};function CT(F){let{data:W,disabled:ue=!1,id:we,resizeObserverConfig:ke}=F;const Xe=Ap(k8),{active:G,dispatch:V,over:e,measureDroppableContainers:m}=Fn.useContext(Ig),P=Fn.useRef({disabled:ue}),i=Fn.useRef(!1),L=Fn.useRef(null),A=Fn.useRef(null),{disabled:v,updateMeasurementsFor:p,timeout:t}={...F8,...ke},r=hp(p??we),s=Fn.useCallback(()=>{if(!i.current){i.current=!0;return}A.current!=null&&clearTimeout(A.current),A.current=setTimeout(()=>{m(Array.isArray(r.current)?r.current:[r.current]),A.current=null},t)},[t]),n=Dg({callback:s,disabled:v||!G}),l=Fn.useCallback((f,w)=>{n&&(w&&(n.unobserve(w),i.current=!1),f&&n.observe(f))},[n]),[c,u]=ig(l),g=hp(W);return Fn.useEffect(()=>{!n||!c.current||(n.disconnect(),i.current=!1,n.observe(c.current))},[c,n]),Fu(()=>(V({type:Bo.RegisterDroppable,element:{id:we,key:Xe,disabled:ue,node:c,rect:L,data:g}}),()=>V({type:Bo.UnregisterDroppable,key:Xe,id:we})),[we]),Fn.useEffect(()=>{ue!==P.current.disabled&&(V({type:Bo.SetDroppableDisabled,id:we,key:Xe,disabled:ue}),P.current.disabled=ue)},[we,Xe,ue,V]),{active:G,rect:L,isOver:(e==null?void 0:e.id)===we,node:c,over:e,setNodeRef:u}}function nx(F,W,ue){const we=F.slice();return we.splice(ue<0?we.length+ue:ue,0,we.splice(W,1)[0]),we}function _8(F,W){return F.reduce((ue,we,ke)=>{const Xe=W.get(we);return Xe&&(ue[ke]=Xe),ue},Array(F.length))}function p0(F){return F!==null&&F>=0}function z8(F,W){if(F===W)return!0;if(F.length!==W.length)return!1;for(let ue=0;ue{var W;let{rects:ue,activeNodeRect:we,activeIndex:ke,overIndex:Xe,index:G}=F;const V=(W=ue[ke])!=null?W:we;if(!V)return null;const e=B8(ue,G,ke);if(G===ke){const m=ue[Xe];return m?{x:keke&&G<=Xe?{x:-V.width-e,y:0,...g0}:G=Xe?{x:V.width+e,y:0,...g0}:{x:0,y:0,...g0}};function B8(F,W,ue){const we=F[W],ke=F[W-1],Xe=F[W+1];return!we||!ke&&!Xe?0:ue{let{rects:W,activeIndex:ue,overIndex:we,index:ke}=F;const Xe=nx(W,we,ue),G=W[ke],V=Xe[ke];return!V||!G?null:{x:V.left-G.left,y:V.top-G.top,scaleX:V.width/G.width,scaleY:V.height/G.height}},y0={scaleX:1,scaleY:1},U8=F=>{var W;let{activeIndex:ue,activeNodeRect:we,index:ke,rects:Xe,overIndex:G}=F;const V=(W=Xe[ue])!=null?W:we;if(!V)return null;if(ke===ue){const m=Xe[G];return m?{x:0,y:ueue&&ke<=G?{x:0,y:-V.height-e,...y0}:ke=G?{x:0,y:V.height+e,...y0}:{x:0,y:0,...y0}};function V8(F,W,ue){const we=F[W],ke=F[W-1],Xe=F[W+1];return we?uewe.map(u=>typeof u=="object"&&"id"in u?u.id:u),[we]),v=G!=null,p=G?A.indexOf(G.id):-1,t=m?A.indexOf(m.id):-1,r=Fn.useRef(A),s=!z8(A,r.current),n=t!==-1&&p===-1||s,l=O8(Xe);Fu(()=>{s&&v&&P(A)},[s,A,v,P]),Fn.useEffect(()=>{r.current=A},[A]);const c=Fn.useMemo(()=>({activeIndex:p,containerId:i,disabled:l,disableTransforms:n,items:A,overIndex:t,useDragOverlay:L,sortedRects:_8(A,e),strategy:ke}),[p,i,l.draggable,l.droppable,n,A,t,e,L,ke]);return Hi.createElement(RT.Provider,{value:c},W)}const G8=F=>{let{id:W,items:ue,activeIndex:we,overIndex:ke}=F;return nx(ue,we,ke).indexOf(W)},W8=F=>{let{containerId:W,isSorting:ue,wasDragging:we,index:ke,items:Xe,newIndex:G,previousItems:V,previousContainerId:e,transition:m}=F;return!m||!we||V!==Xe&&ke===G?!1:ue?!0:G!==ke&&W===e},Y8={duration:200,easing:"ease"},DT="transform",Z8=Zv.Transition.toString({property:DT,duration:0,easing:"linear"}),X8={roleDescription:"sortable"};function j8(F){let{disabled:W,index:ue,node:we,rect:ke}=F;const[Xe,G]=Fn.useState(null),V=Fn.useRef(ue);return Fu(()=>{if(!W&&ue!==V.current&&we.current){const e=ke.current;if(e){const m=ed(we.current,{ignoreTransform:!0}),P={x:e.left-m.left,y:e.top-m.top,scaleX:e.width/m.width,scaleY:e.height/m.height};(P.x||P.y)&&G(P)}}ue!==V.current&&(V.current=ue)},[W,ue,we,ke]),Fn.useEffect(()=>{Xe&&G(null)},[Xe]),Xe}function K8(F){let{animateLayoutChanges:W=W8,attributes:ue,disabled:we,data:ke,getNewIndex:Xe=G8,id:G,strategy:V,resizeObserverConfig:e,transition:m=Y8}=F;const{items:P,containerId:i,activeIndex:L,disabled:A,disableTransforms:v,sortedRects:p,overIndex:t,useDragOverlay:r,strategy:s}=Fn.useContext(RT),n=J8(we,A),l=P.indexOf(G),c=Fn.useMemo(()=>({sortable:{containerId:i,index:l,items:P},...ke}),[i,ke,l,P]),u=Fn.useMemo(()=>P.slice(P.indexOf(G)),[P,G]),{rect:g,node:f,isOver:w,setNodeRef:h}=CT({id:G,data:c,disabled:n.droppable,resizeObserverConfig:{updateMeasurementsFor:u,...e}}),{active:o,activatorEvent:d,activeNodeRect:M,attributes:T,setNodeRef:C,listeners:x,isDragging:S,over:b,setActivatorNodeRef:a,transform:E}=ET({id:G,data:c,attributes:{...X8,...ue},disabled:n.draggable}),y=v6(h,C),z=!!o,I=z&&!v&&p0(L)&&p0(t),B=!r&&S,k=B&&I?E:null,N=I?k??(V??s)({rects:p,activeNodeRect:M,activeIndex:L,overIndex:t,index:l}):null,_=p0(L)&&p0(t)?Xe({id:G,items:P,activeIndex:L,overIndex:t}):l,U=o==null?void 0:o.id,Y=Fn.useRef({activeId:U,items:P,newIndex:_,containerId:i}),J=P!==Y.current.items,te=W({active:o,containerId:i,isDragging:S,isSorting:z,id:G,index:l,items:P,newIndex:Y.current.newIndex,previousItems:Y.current.items,previousContainerId:Y.current.containerId,transition:m,wasDragging:Y.current.activeId!=null}),ae=j8({disabled:!te,index:l,node:f,rect:g});return Fn.useEffect(()=>{z&&Y.current.newIndex!==_&&(Y.current.newIndex=_),i!==Y.current.containerId&&(Y.current.containerId=i),P!==Y.current.items&&(Y.current.items=P)},[z,_,i,P]),Fn.useEffect(()=>{if(U===Y.current.activeId)return;if(U&&!Y.current.activeId){Y.current.activeId=U;return}const Q=setTimeout(()=>{Y.current.activeId=U},50);return()=>clearTimeout(Q)},[U]),{active:o,activeIndex:L,attributes:T,data:c,rect:g,index:l,newIndex:_,items:P,isOver:w,isSorting:z,isDragging:S,listeners:x,node:f,overIndex:t,over:b,setNodeRef:y,setActivatorNodeRef:a,setDroppableNodeRef:h,setDraggableNodeRef:C,transform:ae??N,transition:ce()};function ce(){if(ae||J&&Y.current.newIndex===l)return Z8;if(!(B&&!Qm(d)||!m)&&(z||te))return Zv.Transition.toString({...m,property:DT})}}function J8(F,W){var ue,we;return typeof F=="boolean"?{draggable:F,droppable:!1}:{draggable:(ue=F==null?void 0:F.draggable)!=null?ue:W.draggable,droppable:(we=F==null?void 0:F.droppable)!=null?we:W.droppable}}function ug(F){if(!F)return!1;const W=F.data.current;return!!(W&&"sortable"in W&&typeof W.sortable=="object"&&"containerId"in W.sortable&&"items"in W.sortable&&"index"in W.sortable)}const Q8=[mi.Down,mi.Right,mi.Up,mi.Left],$8=(F,W)=>{let{context:{active:ue,collisionRect:we,droppableRects:ke,droppableContainers:Xe,over:G,scrollableAncestors:V}}=W;if(Q8.includes(F.code)){if(F.preventDefault(),!ue||!we)return;const e=[];Xe.getEnabled().forEach(i=>{if(!i||i!=null&&i.disabled)return;const L=ke.get(i.id);if(L)switch(F.code){case mi.Down:we.topL.top&&e.push(i);break;case mi.Left:we.left>L.left&&e.push(i);break;case mi.Right:we.left1&&(P=m[1].id),P!=null){const i=Xe.get(ue.id),L=Xe.get(P),A=L?ke.get(L.id):null,v=L==null?void 0:L.node.current;if(v&&A&&i&&L){const t=Lg(v).some((u,g)=>V[g]!==u),r=IT(i,L),s=q8(i,L),n=t||!r?{x:0,y:0}:{x:s?we.width-A.width:0,y:s?we.height-A.height:0},l={x:A.left,y:A.top};return n.x&&n.y?l:vp(l,n)}}}};function IT(F,W){return!ug(F)||!ug(W)?!1:F.data.current.sortable.containerId===W.data.current.sortable.containerId}function q8(F,W){return!ug(F)||!ug(W)||!IT(F,W)?!1:F.data.current.sortable.index"u"&&!Xe.call(f,M))&&(d===f&&(d=i(f)),e(d)==="Map"?d.set(M,C):d[M]=C)}}),d},g}();W.Context=L;var A={$push:function(g,f,w){return p(f,w,"$push"),g.length?f.concat(g):f},$unshift:function(g,f,w){return p(f,w,"$unshift"),g.length?g.concat(f):f},$splice:function(g,f,w,h){return r(f,w),g.forEach(function(o){s(o),f===h&&o.length&&(f=i(h)),G.apply(f,o)}),f},$set:function(g,f,w){return l(w),g},$toggle:function(g,f){t(g,"$toggle");var w=g.length?i(f):f;return g.forEach(function(h){w[h]=!f[h]}),w},$unset:function(g,f,w,h){return t(g,"$unset"),g.forEach(function(o){Object.hasOwnProperty.call(f,o)&&(f===h&&(f=i(h)),delete f[o])}),f},$add:function(g,f,w,h){return u(f,"$add"),t(g,"$add"),e(f)==="Map"?g.forEach(function(o){var d=o[0],M=o[1];f===h&&f.get(d)!==M&&(f=i(h)),f.set(d,M)}):g.forEach(function(o){f===h&&!f.has(o)&&(f=i(h)),f.add(o)}),f},$remove:function(g,f,w,h){return u(f,"$remove"),t(g,"$remove"),g.forEach(function(o){f===h&&f.has(o)&&(f=i(h)),f.delete(o)}),f},$merge:function(g,f,w,h){return c(f,g),P(g).forEach(function(o){g[o]!==f[o]&&(f===h&&(f=i(h)),f[o]=g[o])}),f},$apply:function(g,f){return n(g),g(f)}},v=new L;W.isEquals=v.update.isEquals,W.extend=v.extend,W.default=v.update,W.default.default=F.exports=m(W.default,W);function p(g,f,w){ke(Array.isArray(g),function(){return"update(): expected target of "+ue(w)+" to be an array; got "+ue(g)+"."}),t(f[w],w)}function t(g,f){ke(Array.isArray(g),function(){return"update(): expected spec of "+ue(f)+" to be an array; got "+ue(g)+". Did you forget to wrap your parameter in an array?"})}function r(g,f){ke(Array.isArray(g),function(){return"Expected $splice target to be an array; got "+ue(g)}),s(f.$splice)}function s(g){ke(Array.isArray(g),function(){return"update(): expected spec of $splice to be an array of arrays; got "+ue(g)+". Did you forget to wrap your parameters in an array?"})}function n(g){ke(typeof g=="function",function(){return"update(): expected spec of $apply to be a function; got "+ue(g)+"."})}function l(g){ke(Object.keys(g).length===1,function(){return"Cannot have more than one key in an object with $set"})}function c(g,f){ke(f&&typeof f=="object",function(){return"update(): $merge expects a spec of type 'object'; got "+ue(f)}),ke(g&&typeof g=="object",function(){return"update(): $merge expects a target of type 'object'; got "+ue(g)})}function u(g,f){var w=e(g);ke(w==="Map"||w==="Set",function(){return"update(): "+ue(f)+" expects a target of type Set or Map; got "+ue(w)})}})(j1,j1.exports);var eE=j1.exports;const Vy=fg(eE),tE=function(F,W,ue){const we=String(F).split(".");let ke=we[0];const Xe=we.length>1?ue+we[1]:"",G=/(\d+)(\d{3})/;for(;G.test(ke);)ke=ke.replace(G,`$1${W}$2`);return ke+Xe},ax=function(F){const ue=Object.assign({},{digitsAfterDecimal:2,scaler:1,thousandsSep:",",decimalSep:".",prefix:"",suffix:""},F);return function(we){if(isNaN(we)||!isFinite(we))return"";const ke=tE((ue.scaler*we).toFixed(ue.digitsAfterDecimal),ue.thousandsSep,ue.decimalSep);return`${ue.prefix}${ke}${ue.suffix}`}},Vb=/(\d+)|(\D+)/g,m0=/\d/,Hb=/^0/,Dv=(F,W)=>{if(W!==null&&F===null)return-1;if(F!==null&&W===null)return 1;if(typeof F=="number"&&isNaN(F))return-1;if(typeof W=="number"&&isNaN(W))return 1;const ue=Number(F),we=Number(W);if(uewe)return 1;if(typeof F=="number"&&typeof W!="number")return-1;if(typeof W=="number"&&typeof F!="number")return 1;if(typeof F=="number"&&typeof W=="number")return 0;if(isNaN(we)&&!isNaN(ue))return-1;if(isNaN(ue)&&!isNaN(we))return 1;let ke=String(F),Xe=String(W);if(ke===Xe)return 0;if(!m0.test(ke)||!m0.test(Xe))return ke>Xe?1:-1;for(ke=ke.match(Vb),Xe=Xe.match(Vb);ke.length&&Xe.length;){const G=ke.shift(),V=Xe.shift();if(G!==V)return m0.test(G)&&m0.test(V)?G.replace(Hb,".0")-V.replace(Hb,".0"):G>V?1:-1}return ke.length-Xe.length},rE=function(F){const W={},ue={};for(const we in F){const ke=F[we];W[ke]=we,typeof ke=="string"&&(ue[ke.toLowerCase()]=we)}return function(we,ke){return we in W&&ke in W?W[we]-W[ke]:we in W?-1:ke in W?1:we in ue&&ke in ue?ue[we]-ue[ke]:we in ue?-1:ke in ue?1:Dv(we,ke)}},ix=function(F,W){if(F){if(typeof F=="function"){const ue=F(W);if(typeof ue=="function")return ue}else if(W in F)return F[W]}return Dv},Vs=ax(),jd=ax({digitsAfterDecimal:0}),Ih=ax({digitsAfterDecimal:1,scaler:100,suffix:"%"}),Mo={count(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:jd;return()=>function(){return{count:0,push(){this.count++},value(){return this.count},format:F}}},uniques(F){let W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:jd;return function(ue){let[we]=ue;return function(){return{uniq:[],push(ke){Array.from(this.uniq).includes(ke[we])||this.uniq.push(ke[we])},value(){return F(this.uniq)},format:W,numInputs:typeof we<"u"?0:1}}}},sum(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Vs;return function(W){let[ue]=W;return function(){return{sum:0,push(we){isNaN(parseFloat(we[ue]))||(this.sum+=parseFloat(we[ue]))},value(){return this.sum},format:F,numInputs:typeof ue<"u"?0:1}}}},extremes(F){let W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Vs;return function(ue){let[we]=ue;return function(ke){return{val:null,sorter:ix(typeof ke<"u"?ke.sorters:null,we),push(Xe){let G=Xe[we];["min","max"].includes(F)&&(G=parseFloat(G),isNaN(G)||(this.val=Math[F](G,this.val!==null?this.val:G))),F==="first"&&this.sorter(G,this.val!==null?this.val:G)<=0&&(this.val=G),F==="last"&&this.sorter(G,this.val!==null?this.val:G)>=0&&(this.val=G)},value(){return this.val},format(Xe){return isNaN(Xe)?Xe:W(Xe)},numInputs:typeof we<"u"?0:1}}}},quantile(F){let W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Vs;return function(ue){let[we]=ue;return function(){return{vals:[],push(ke){const Xe=parseFloat(ke[we]);isNaN(Xe)||this.vals.push(Xe)},value(){if(this.vals.length===0)return null;this.vals.sort((Xe,G)=>Xe-G);const ke=(this.vals.length-1)*F;return(this.vals[Math.floor(ke)]+this.vals[Math.ceil(ke)])/2},format:W,numInputs:typeof we<"u"?0:1}}}},runningStat(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"mean",W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ue=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Vs;return function(we){let[ke]=we;return function(){return{n:0,m:0,s:0,push(Xe){const G=parseFloat(Xe[ke]);if(isNaN(G))return;this.n+=1,this.n===1&&(this.m=G);const V=this.m+(G-this.m)/this.n;this.s=this.s+(G-this.m)*(G-V),this.m=V},value(){if(F==="mean")return this.n===0?0/0:this.m;if(this.n<=W)return 0;switch(F){case"var":return this.s/(this.n-W);case"stdev":return Math.sqrt(this.s/(this.n-W));default:throw new Error("unknown mode for runningStat")}},format:ue,numInputs:typeof ke<"u"?0:1}}}},sumOverSum(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Vs;return function(W){let[ue,we]=W;return function(){return{sumNum:0,sumDenom:0,push(ke){isNaN(parseFloat(ke[ue]))||(this.sumNum+=parseFloat(ke[ue])),isNaN(parseFloat(ke[we]))||(this.sumDenom+=parseFloat(ke[we]))},value(){return this.sumNum/this.sumDenom},format:F,numInputs:typeof ue<"u"&&typeof we<"u"?0:2}}}},fractionOf(F){let W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"total",ue=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ih;return function(){for(var we=arguments.length,ke=new Array(we),Xe=0;XeMo.uniques(W=>W.length,F);Mo.listUnique=F=>Mo.uniques(W=>W.join(F),W=>W);Mo.max=F=>Mo.extremes("max",F);Mo.min=F=>Mo.extremes("min",F);Mo.first=F=>Mo.extremes("first",F);Mo.last=F=>Mo.extremes("last",F);Mo.median=F=>Mo.quantile(.5,F);Mo.average=F=>Mo.runningStat("mean",1,F);Mo.var=(F,W)=>Mo.runningStat("var",F,W);Mo.stdev=(F,W)=>Mo.runningStat("stdev",F,W);const nE=(F=>({Count:F.count(jd),"Count Unique Values":F.countUnique(jd),"List Unique Values":F.listUnique(", "),Sum:F.sum(Vs),"Integer Sum":F.sum(jd),Average:F.average(Vs),Median:F.median(Vs),"Sample Variance":F.var(1,Vs),"Sample Standard Deviation":F.stdev(1,Vs),Minimum:F.min(Vs),Maximum:F.max(Vs),First:F.first(Vs),Last:F.last(Vs),"Sum over Sum":F.sumOverSum(Vs),"Sum as Fraction of Total":F.fractionOf(F.sum(),"total",Ih),"Sum as Fraction of Rows":F.fractionOf(F.sum(),"row",Ih),"Sum as Fraction of Columns":F.fractionOf(F.sum(),"col",Ih),"Count as Fraction of Total":F.fractionOf(F.count(),"total",Ih),"Count as Fraction of Rows":F.fractionOf(F.count(),"row",Ih),"Count as Fraction of Columns":F.fractionOf(F.count(),"col",Ih)}))(Mo);class Es{filter(W){for(const ue in this.props.valueFilter)if(W[ue]in this.props.valueFilter[ue])return!1;return!0}forEachMatchingRecord(W,ue){return Es.forEachRecord(this.props.data,this.props.derivedAttributes,we=>{if(this.filter(we)){for(const ke in W)if(W[ke]!==(ke in we?we[ke]:"null"))return;ue(we)}})}arrSort(W){let ue;const we=(()=>{const ke=[];for(ue of Array.from(W))ke.push(ix(this.props.sorters,ue));return ke})();return function(ke,Xe){for(const G of Object.keys(we||{})){const V=we[G],e=V(ke[G],Xe[G]);if(e!==0)return e}return 0}}sortKeys(){if(!this.sorted){this.sorted=!0;const W=(ue,we)=>this.getAggregator(ue,we).value();switch(this.props.rowOrder){case"value_a_to_z":this.rowKeys.sort((ue,we)=>Dv(W(ue,[]),W(we,[])));break;case"value_z_to_a":this.rowKeys.sort((ue,we)=>-Dv(W(ue,[]),W(we,[])));break;default:this.rowKeys.sort(this.arrSort(this.props.rows))}switch(this.props.colOrder){case"value_a_to_z":this.colKeys.sort((ue,we)=>Dv(W([],ue),W([],we)));break;case"value_z_to_a":this.colKeys.sort((ue,we)=>-Dv(W([],ue),W([],we)));break;default:this.colKeys.sort(this.arrSort(this.props.cols))}}}getColKeys(){return this.sortKeys(),this.colKeys}getRowKeys(){return this.sortKeys(),this.rowKeys}processRecord(W){const ue=[],we=[];for(const G of Array.from(this.props.cols))ue.push(G in W?W[G]:"null");for(const G of Array.from(this.props.rows))we.push(G in W?W[G]:"null");const ke=we.join(String.fromCharCode(0)),Xe=ue.join(String.fromCharCode(0));this.allTotal.push(W),we.length!==0&&(this.rowTotals[ke]||(this.rowKeys.push(we),this.rowTotals[ke]=this.aggregator(this,we,[])),this.rowTotals[ke].push(W)),ue.length!==0&&(this.colTotals[Xe]||(this.colKeys.push(ue),this.colTotals[Xe]=this.aggregator(this,[],ue)),this.colTotals[Xe].push(W)),ue.length!==0&&we.length!==0&&(this.tree[ke]||(this.tree[ke]={}),this.tree[ke][Xe]||(this.tree[ke][Xe]=this.aggregator(this,we,ue)),this.tree[ke][Xe].push(W))}getAggregator(W,ue){let we;const ke=W.join(String.fromCharCode(0)),Xe=ue.join(String.fromCharCode(0));return W.length===0&&ue.length===0?we=this.allTotal:W.length===0?we=this.colTotals[Xe]:ue.length===0?we=this.rowTotals[ke]:we=this.tree[ke][Xe],we||{value(){return null},format(){return""}}}constructor(W={}){this.props=Object.assign({},Es.defaultProps,W),this.aggregator=this.props.aggregators[this.props.aggregatorName](this.props.vals),this.tree={},this.rowKeys=[],this.colKeys=[],this.rowTotals={},this.colTotals={},this.allTotal=this.aggregator(this,[],[]),this.sorted=!1,Es.forEachRecord(this.props.data,this.props.derivedAttributes,ue=>{this.filter(ue)&&this.processRecord(ue)})}}Es.forEachRecord=function(F,W,ue){let we,ke;if(Object.getOwnPropertyNames(W).length===0?we=ue:we=function(Xe){for(const G in W){const V=W[G](Xe);V!==null&&(Xe[G]=V)}return ue(Xe)},typeof F=="function")return F(we);if(Array.isArray(F))return Array.isArray(F[0])?(()=>{const Xe=[];for(const G of Object.keys(F||{})){const V=F[G];if(G>0){ke={};for(const e of Object.keys(F[0]||{})){const m=F[0][e];ke[m]=V[e]}Xe.push(we(ke))}}return Xe})():(()=>{const Xe=[];for(ke of Array.from(F))Xe.push(we(ke));return Xe})();throw new Error("unknown input format")};Es.defaultProps={aggregators:nE,cols:[],rows:[],vals:[],aggregatorName:"Count",sorters:{},valueFilter:{},rowOrder:"key_a_to_z",colOrder:"key_a_to_z",derivedAttributes:{}};const Gb=function(F,W,ue){let we;if(W!==0){let Xe,G,V=!0;for(we=0,G=ue,Xe=G>=0;Xe?we<=G:we>=G;Xe?we++:we--)F[W-1][we]!==F[W][we]&&(V=!1);if(V)return-1}let ke=0;for(;W+ke=0;Xe?we<=G:we>=G;Xe?we++:we--)F[W][we]!==F[W+ke][we]&&(V=!0);if(V)break;ke++}return ke};function aE(F){const W=Math.min.apply(Math,F),ue=Math.max.apply(Math,F);return we=>{const ke=255-Math.round(255*(we-W)/(ue-W));return{backgroundColor:`rgb(255,${ke},${ke})`}}}function Hy(){}function x0(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};class W extends Hi.PureComponent{render(){const we=new Es(this.props),ke=we.props.cols,Xe=we.props.rows,G=we.getRowKeys(),V=we.getColKeys(),e=we.getAggregator([],[]);let m=Hy,P=Hy,i=Hy;if(F.heatmapMode){const A=this.props.tableColorScaleGenerator,v=V.map(t=>we.getAggregator([],t).value());P=A(v);const p=G.map(t=>we.getAggregator(t,[]).value());if(i=A(p),F.heatmapMode==="full"){const t=[];G.map(s=>V.map(n=>t.push(we.getAggregator(s,n).value())));const r=A(t);m=(s,n,l)=>r(l)}else if(F.heatmapMode==="row"){const t={};G.forEach(r=>{const s=V.map(n=>we.getAggregator(r,n).value());t[r]=A(s)}),m=(r,s,n)=>t[r](n)}else if(F.heatmapMode==="col"){const t={};V.forEach(r=>{const s=G.map(n=>we.getAggregator(n,r).value());t[r]=A(s)}),m=(r,s,n)=>t[s](n)}}const L=this.props.tableOptions&&this.props.tableOptions.clickCallback?(A,v,p)=>{const t={};for(const r of Object.keys(ke||{})){const s=ke[r];p[r]!==null&&(t[s]=p[r])}for(const r of Object.keys(Xe||{})){const s=Xe[r];v[r]!==null&&(t[s]=v[r])}return r=>this.props.tableOptions.clickCallback(r,A,t,we)}:null;return xa.jsxs("table",{className:"pvtTable",children:[xa.jsxs("thead",{children:[ke.map(function(A,v){return xa.jsxs("tr",{children:[v===0&&Xe.length!==0&&xa.jsx("th",{colSpan:Xe.length,rowSpan:ke.length}),xa.jsx("th",{className:"pvtAxisLabel",children:A}),V.map(function(p,t){const r=Gb(V,t,v);return r===-1?null:xa.jsx("th",{className:"pvtColLabel",colSpan:r,rowSpan:v===ke.length-1&&Xe.length!==0?2:1,children:p[v]},`colKey${t}`)}),v===0&&xa.jsx("th",{className:"pvtTotalLabel",rowSpan:ke.length+(Xe.length===0?0:1),children:"Totals"})]},`colAttr${v}`)}),Xe.length!==0&&xa.jsxs("tr",{children:[Xe.map(function(A,v){return xa.jsx("th",{className:"pvtAxisLabel",children:A},`rowAttr${v}`)}),xa.jsx("th",{className:"pvtTotalLabel",children:ke.length===0?"Totals":null})]})]}),xa.jsxs("tbody",{children:[G.map(function(A,v){const p=we.getAggregator(A,[]);return xa.jsxs("tr",{children:[A.map(function(t,r){const s=Gb(G,v,r);return s===-1?null:xa.jsx("th",{className:"pvtRowLabel",rowSpan:s,colSpan:r===Xe.length-1&&ke.length!==0?2:1,children:t},`rowKeyLabel${v}-${r}`)}),V.map(function(t,r){const s=we.getAggregator(A,t);return xa.jsx("td",{className:"pvtVal",onClick:L&&L(s.value(),A,t),style:m(A,t,s.value()),children:s.format(s.value())},`pvtVal${v}-${r}`)}),xa.jsx("td",{className:"pvtTotal",onClick:L&&L(p.value(),A,[null]),style:i(p.value()),children:p.format(p.value())})]},`rowKeyRow${v}`)}),xa.jsxs("tr",{children:[xa.jsx("th",{className:"pvtTotalLabel",colSpan:Xe.length+(ke.length===0?0:1),children:"Totals"}),V.map(function(A,v){const p=we.getAggregator([],A);return xa.jsx("td",{className:"pvtTotal",onClick:L&&L(p.value(),[null],A),style:P(p.value()),children:p.format(p.value())},`total${v}`)}),xa.jsx("td",{onClick:L&&L(e.value(),[null],[null]),className:"pvtGrandTotal",children:e.format(e.value())})]})]})]})}}return W.defaultProps=Es.defaultProps,W.defaultProps.tableColorScaleGenerator=aE,W.defaultProps.tableOptions={},W}class kT extends Hi.PureComponent{render(){const W=new Es(this.props),ue=W.getRowKeys(),we=W.getColKeys();ue.length===0&&ue.push([]),we.length===0&&we.push([]);const ke=W.props.rows.map(G=>G);we.length===1&&we[0].length===0?ke.push(this.props.aggregatorName):we.map(G=>ke.push(G.join("-")));const Xe=ue.map(G=>{const V=G.map(e=>e);return we.forEach(e=>{const m=W.getAggregator(G,e).value();V.push(m||"")}),V});return Xe.unshift(ke),xa.jsx("textarea",{value:Xe.map(G=>G.join(" ")).join(` `),style:{width:window.innerWidth/2,height:window.innerHeight/2},readOnly:!0})}}kT.defaultProps=Es.defaultProps;var FT={Table:x0(),"Table Heatmap":x0({heatmapMode:"full"}),"Table Col Heatmap":x0({heatmapMode:"col"}),"Table Row Heatmap":x0({heatmapMode:"row"}),"Exportable TSV":kT};class ox extends Hi.PureComponent{render(){const W=this.props.renderers[this.props.rendererName in this.props.renderers?this.props.rendererName:Object.keys(this.props.renderers)[0]];return xa.jsx(W,{...this.props})}}ox.defaultProps=Object.assign({},Es.defaultProps,{rendererName:"Table",renderers:FT});function Wb(F,W,ue){return W in F?Object.defineProperty(F,W,{value:ue,enumerable:!0,configurable:!0,writable:!0}):F[W]=ue,F}function iE(F){let{onClick:W,zIndex:ue,lastDroppedAt:we,children:ke}=F;const{isDragging:Xe,attributes:G,listeners:V,setNodeRef:e,transform:m}=ET({id:"filter-box"}),P=Xe?{x:m.x+we.x,y:m.y+we.y}:we;return xa.jsxs("div",{ref:e,onClick:W,className:"pvtFilterBox",style:{display:"block",cursor:"initial",zIndex:ue,transform:Zv.Translate.toString(P)},children:[xa.jsx("span",{...V,...G,className:"pvtDragHandle",children:"☰"}),ke]})}function _T(F){const[W,ue]=Fn.useState(!1),[we,ke]=Fn.useState(""),[Xe,G]=Fn.useState({x:0,y:0}),{attributes:V,listeners:e,setNodeRef:m,transition:P,transform:i}=K8({id:F.id,disabled:W,data:{group:F.group}}),L=Object.keys(F.valueFilter).length!==0?"pvtFilteredAttribute":"";return xa.jsxs("li",{ref:m,...V,...e,style:{transform:Zv.Translate.toString(i),transition:P},children:[xa.jsxs("span",{className:"pvtAttr "+L,children:[F.name,xa.jsxs("span",{className:"pvtTriangle",onClick:r,children:[" ","▾"]})]}),W?t():null]});function A(s){s in F.valueFilter?F.removeValuesFromFilter(F.name,[s]):F.addValuesToFilter(F.name,[s])}function v(s){return s.toLowerCase().trim().includes(we.toLowerCase().trim())}function p(s,n){s.stopPropagation(),F.setValuesInFilter(F.name,Object.keys(F.attrValues).filter(l=>l!==n))}function t(){const s=Object.keys(F.attrValues||{}),n=s.length{G(u=>{let{x:g,y:f}=u;return{x:g+c.x,y:f+c.y}})},children:xa.jsxs(iE,{zIndex:F.zIndex,lastDroppedAt:Xe,onClick:()=>F.moveFilterBoxToTop(F.name),children:[xa.jsx("a",{role:"button",className:"pvtCloseX",onClick:()=>{ue(!1),G({x:0,y:0})},children:"×"}),xa.jsx("h4",{children:F.name}),n||xa.jsx("p",{children:"(too many values to show)"}),n&&xa.jsxs("p",{children:[xa.jsx("input",{type:"text",placeholder:"Filter values",className:"pvtSearch",value:we,onChange:c=>ke(c.target.value)}),xa.jsx("br",{}),xa.jsxs("a",{role:"button",className:"pvtButton",onClick:()=>F.removeValuesFromFilter(F.name,Object.keys(F.attrValues).filter(v)),children:["Select ",s.length===l.length?"All":l.length]})," ",xa.jsxs("a",{role:"button",className:"pvtButton",onClick:()=>F.addValuesToFilter(F.name,Object.keys(F.attrValues).filter(v)),children:["Deselect ",s.length===l.length?"All":l.length]})]}),n&&xa.jsx("div",{className:"pvtCheckContainer",children:l.map(c=>xa.jsxs("p",{onClick:()=>A(c),className:c in F.valueFilter?"":"selected",children:[xa.jsx("a",{role:"button",className:"pvtOnly",onClick:u=>p(u,c),children:"only"}),xa.jsx("a",{className:"pvtOnlySpacer",children:" "}),c===""?xa.jsx("em",{children:"null"}):c]},c))})]})})}function r(){ue(s=>!s),F.moveFilterBoxToTop(F.name)}}_T.defaultProps={valueFilter:{}};function oE(F){let{onChange:W,children:ue}=F;const we=cT(sg(Rg),sg(Pg));return xa.jsx(ST,{sensors:we,onDragEnd:ke=>{let{delta:Xe}=ke;return W(Xe)},children:ue})}function sE(F){let{groups:W,onSortChanging:ue,onSortChanged:we,children:ke}=F;const Xe=cT(sg(Rg,{activationConstraint:{distance:8}}),sg(Pg,{coordinateGetter:$8})),[G,V]=Fn.useState(null),e=Fn.useRef(null),m=Fn.useRef(!1),P=Fn.useCallback(v=>{var s;if(G&&G in W)return Db({...v,droppableContainers:v.droppableContainers.filter(n=>n.id in W)});const p=k6(v),t=p.length>0?p:hT(v);let r=ex(t,"id");if(r!=null){if(r in W){const n=W[r];n.length>0&&(r=(s=Db({...v,droppableContainers:v.droppableContainers.filter(l=>l.id!==r&&n.includes(l.id))})[0])==null?void 0:s.id)}return e.current=r,[{id:r}]}return m.current&&(e.current=G),e.current?[{id:e.current}]:[]},[G,W]);return Fn.useEffect(()=>{requestAnimationFrame(()=>{m.current=!1})},[W]),xa.jsx(ST,{sensors:Xe,collisionDetection:P,measuring:{droppable:{strategy:Xv.Always}},onDragStart:v=>{let{active:p}=v;V(p.id)},onDragOver:L,onDragEnd:A,children:ke});function i(v){let{active:p,over:t}=v;const r=p.data.current.group,s=t.data.current.group,n=W[r].slice(),l=W[s].slice(),c=n.indexOf(p.id);n.splice(c,1);const u=l.indexOf(t.id);return l.splice(u,0,p.id),{...W,[r]:n,[s]:l}}function L(v){var s;const{active:p,over:t}=v;if(!t||p.id===t.id||!((s=p.data.current)!=null&&s.group)||p.data.current.group===t.data.current.group)return;const r=i({active:p,over:t});m.current=!0,ue(r)}function A(v){var p;try{const{active:t,over:r}=v;if(!r||!((p=t.data.current)!=null&&p.group))return;if(t.id===r.id){we(W);return}if(t.data.current.group===r.data.current.group){const n=t.data.current.group,l=W[n],c=l.indexOf(t.id),u=l.indexOf(r.id);we({...W,[n]:nx(l,c,u)});return}const s=i({active:t,over:r});we(s)}finally{V(null)}}}function lE(F){let{id:W,items:ue,children:we}=F;return xa.jsx(H8,{items:ue,strategy:W==="rows"?U8:N8,children:we})}function uE(F){let{group:W,className:ue,children:we}=F;const{setNodeRef:ke}=CT({id:W,data:{group:W}});return xa.jsx("td",{className:ue,ref:ke,children:we})}class Gy extends Hi.PureComponent{render(){return xa.jsxs("div",{className:"pvtDropdown",style:{zIndex:this.props.zIndex},children:[xa.jsxs("div",{onClick:W=>{W.stopPropagation(),this.props.toggle()},className:"pvtDropdownValue pvtDropdownCurrent "+(this.props.open?"pvtDropdownCurrentOpen":""),role:"button",children:[xa.jsx("div",{className:"pvtDropdownIcon",children:this.props.open?"×":"▾"}),this.props.current||xa.jsx("span",{children:" "})]}),this.props.open&&xa.jsx("div",{className:"pvtDropdownMenu",children:this.props.values.map(W=>xa.jsx("div",{role:"button",onClick:ue=>{ue.stopPropagation(),this.props.current===W?this.props.toggle():this.props.setValue(W)},className:"pvtDropdownValue "+(W===this.props.current?"pvtDropdownActiveValue":""),children:W},W))})]})}}class zT extends Hi.PureComponent{componentDidMount(){this.materializeInput(this.props.data)}componentDidUpdate(){this.materializeInput(this.props.data)}materializeInput(W){if(this.state.data===W)return;const ue={data:W,attrValues:{},materializedInput:[]};let we=0;Es.forEachRecord(ue.data,this.props.derivedAttributes,function(ke){ue.materializedInput.push(ke);for(const Xe of Object.keys(ke))Xe in ue.attrValues||(ue.attrValues[Xe]={},we>0&&(ue.attrValues[Xe].null=we));for(const Xe in ue.attrValues){const G=Xe in ke?ke[Xe]:"null";G in ue.attrValues[Xe]||(ue.attrValues[Xe][G]=0),ue.attrValues[Xe][G]++}we++}),this.setState(ue)}sendPropUpdate(W){this.props.onChange(Vy(this.props,W))}propUpdater(W){return ue=>this.sendPropUpdate({[W]:{$set:ue}})}setValuesInFilter(W,ue){this.sendPropUpdate({valueFilter:{[W]:{$set:ue.reduce((we,ke)=>(we[ke]=!0,we),{})}}})}addValuesToFilter(W,ue){W in this.props.valueFilter?this.sendPropUpdate({valueFilter:{[W]:ue.reduce((we,ke)=>(we[ke]={$set:!0},we),{})}}):this.setValuesInFilter(W,ue)}removeValuesFromFilter(W,ue){this.sendPropUpdate({valueFilter:{[W]:{$unset:ue}}})}moveFilterBoxToTop(W){this.setState(Vy(this.state,{maxZIndex:{$set:this.state.maxZIndex+1},zIndices:{[W]:{$set:this.state.maxZIndex+1}}}))}isOpen(W){return this.state.openDropdown===W}makeDnDCell(W,ue,we){return xa.jsx(uE,{group:ue,className:we,children:xa.jsx(lE,{id:ue,items:W,children:W.map(ke=>xa.jsx(_T,{id:ke,name:ke,group:ue,attrValues:this.state.attrValues[ke],valueFilter:this.props.valueFilter[ke]||{},sorter:ix(this.props.sorters,ke),menuLimit:this.props.menuLimit,setValuesInFilter:this.setValuesInFilter.bind(this),addValuesToFilter:this.addValuesToFilter.bind(this),moveFilterBoxToTop:this.moveFilterBoxToTop.bind(this),removeValuesFromFilter:this.removeValuesFromFilter.bind(this),zIndex:this.state.zIndices[ke]||this.state.maxZIndex},ke))})})}render(){var c,u,g;const W=this.props.aggregators[this.props.aggregatorName]([])().numInputs||0,ue=this.props.aggregators[this.props.aggregatorName]([])().outlet,we=this.props.rendererName in this.props.renderers?this.props.rendererName:Object.keys(this.props.renderers)[0],ke=((c=this.state.tempOrder)==null?void 0:c.cols)??this.props.cols,Xe=((u=this.state.tempOrder)==null?void 0:u.rows)??this.props.rows,G=xa.jsx("td",{className:"pvtRenderers",children:xa.jsx(Gy,{current:we,values:Object.keys(this.props.renderers),open:this.isOpen("renderer"),zIndex:this.isOpen("renderer")?this.state.maxZIndex+1:1,toggle:()=>this.setState({openDropdown:this.isOpen("renderer")?!1:"renderer"}),setValue:this.propUpdater("rendererName")})}),V={key_a_to_z:{rowSymbol:"↕",colSymbol:"↔",next:"value_a_to_z"},value_a_to_z:{rowSymbol:"↓",colSymbol:"→",next:"value_z_to_a"},value_z_to_a:{rowSymbol:"↑",colSymbol:"←",next:"key_a_to_z"}},e=xa.jsxs("td",{className:"pvtVals",children:[xa.jsx(Gy,{current:this.props.aggregatorName,values:Object.keys(this.props.aggregators),open:this.isOpen("aggregators"),zIndex:this.isOpen("aggregators")?this.state.maxZIndex+1:1,toggle:()=>this.setState({openDropdown:this.isOpen("aggregators")?!1:"aggregators"}),setValue:this.propUpdater("aggregatorName")}),xa.jsx("a",{role:"button",className:"pvtRowOrder",onClick:()=>this.propUpdater("rowOrder")(V[this.props.rowOrder].next),children:V[this.props.rowOrder].rowSymbol}),xa.jsx("a",{role:"button",className:"pvtColOrder",onClick:()=>this.propUpdater("colOrder")(V[this.props.colOrder].next),children:V[this.props.colOrder].colSymbol}),W>0&&xa.jsx("br",{}),new Array(W).fill().map((f,w)=>[xa.jsx(Gy,{current:this.props.vals[w],values:Object.keys(this.state.attrValues).filter(h=>!this.props.hiddenAttributes.includes(h)&&!this.props.hiddenFromAggregators.includes(h)),open:this.isOpen(`val${w}`),zIndex:this.isOpen(`val${w}`)?this.state.maxZIndex+1:1,toggle:()=>this.setState({openDropdown:this.isOpen(`val${w}`)?!1:`val${w}`}),setValue:h=>this.sendPropUpdate({vals:{$splice:[[w,1,h]]}})},w),w+1!==W?xa.jsx("br",{},`br${w}`):null]),ue&&ue(this.props.data)]}),m=((g=this.state.tempOrder)==null?void 0:g.unusedOrder)??this.state.unusedOrder,P=Object.keys(this.state.attrValues).filter(f=>!Xe.includes(f)&&!ke.includes(f)&&!this.props.hiddenAttributes.includes(f)&&!this.props.hiddenFromDragDrop.includes(f)).sort(rE(m)),L=P.reduce((f,w)=>f+w.length,0)!this.props.hiddenAttributes.includes(f)&&!this.props.hiddenFromDragDrop.includes(f)),p=this.makeDnDCell(v,"cols","pvtAxisContainer pvtHorizList pvtCols"),t=Xe.filter(f=>!this.props.hiddenAttributes.includes(f)&&!this.props.hiddenFromDragDrop.includes(f)),r=this.makeDnDCell(t,"rows","pvtAxisContainer pvtVertList pvtRows"),s=xa.jsx(ox,{...Vy(this.props,{data:{$set:this.state.materializedInput}})});if(this.props.controlsHidden)return s;const n=xa.jsx("td",{className:"pvtOutput",children:s}),l=L?xa.jsxs(xa.Fragment,{children:[xa.jsxs("tr",{children:[G,A]}),xa.jsxs("tr",{children:[e,p]}),xa.jsxs("tr",{children:[r,n]})]}):xa.jsxs(xa.Fragment,{children:[xa.jsxs("tr",{children:[G,e,p]}),xa.jsxs("tr",{children:[A,r,n]})]});return xa.jsx(sE,{groups:this.state.tempOrder??{unused:this.state.unusedOrder,cols:this.props.cols,rows:this.props.rows},onSortChanging:this.handleSortChanging,onSortChanged:this.handleSortChanged,children:xa.jsx("table",{className:"pvtUi",children:xa.jsx("tbody",{onClick:()=>this.setState({openDropdown:!1}),children:l})})})}constructor(W){super(W),Wb(this,"handleSortChanging",ue=>{let{unused:we,cols:ke,rows:Xe}=ue;this.setState({tempOrder:{unused:we,cols:ke,rows:Xe}})}),Wb(this,"handleSortChanged",ue=>{let{unused:we,cols:ke,rows:Xe}=ue;this.setState({tempOrder:null,unusedOrder:we}),this.sendPropUpdate({cols:{$set:ke},rows:{$set:Xe}})}),this.state={unusedOrder:[],zIndices:{},maxZIndex:1e3,openDropdown:!1,attrValues:{},materializedInput:[]}}}zT.defaultProps=Object.assign({},ox.defaultProps,{hiddenAttributes:[],hiddenFromAggregators:[],hiddenFromDragDrop:[],unusedOrientationCutoff:85,menuLimit:500});function Dc(F){let W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ue=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},we=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;class ke extends Hi.PureComponent{render(){const G=new Es(this.props),V=G.getRowKeys(),e=G.getColKeys(),m=we?e:V;m.length===0&&m.push([]);const P=we?V:e;P.length===0&&P.push([]);let i=this.props.aggregatorName;const L=this.props.aggregators[i]([])().numInputs||0;L!==0&&(i+=` of ${this.props.vals.slice(0,L).join(", ")}`);const A=m.map(s=>{const n=[],l=[];for(const u of P){const g=parseFloat(G.getAggregator(we?u:s,we?s:u).value());n.push(isFinite(g)?g:null),l.push(u.join("-")||" ")}const c={name:s.join("-")||i};return W.type==="pie"?(c.values=n,c.labels=l.length>1?l:[i]):(c.x=we?n:l,c.y=we?l:n),Object.assign(c,W)});let v=i;const p=we?this.props.rows.join("-"):this.props.cols.join("-"),t=we?this.props.cols.join("-"):this.props.rows.join("-");p!==""&&(v+=` vs ${p}`),t!==""&&(v+=` by ${t}`);const r={title:v,hovermode:"closest",width:window.innerWidth/1.5,height:window.innerHeight/1.4-50};if(W.type==="pie"){const s=Math.ceil(Math.sqrt(A.length)),n=Math.ceil(A.length/s);r.grid={columns:s,rows:n},A.forEach((l,c)=>{l.domain={row:Math.floor(c/s),column:c-s*Math.floor(c/s)},A.length>1&&(l.title=l.name)}),A[0].labels.length===1&&(r.showlegend=!1)}else r.xaxis={title:we?i:null,automargin:!0},r.yaxis={title:we?null:i,automargin:!0};return xa.jsx(F,{data:A,layout:Object.assign(r,ue,this.props.plotlyOptions),config:this.props.plotlyConfig,onUpdate:this.props.onRendererUpdate})}}return ke.defaultProps=Object.assign({},Es.defaultProps,{plotlyOptions:{},plotlyConfig:{}}),ke}function fE(F){class W extends Hi.PureComponent{render(){const we=new Es(this.props),ke=we.getRowKeys(),Xe=we.getColKeys();ke.length===0&&ke.push([]),Xe.length===0&&Xe.push([]);const G={x:[],y:[],text:[],type:"scatter",mode:"markers"};ke.forEach(e=>{Xe.forEach(m=>{const P=we.getAggregator(e,m).value();P!==null&&(G.x.push(m.join("-")),G.y.push(e.join("-")),G.text.push(P))})});const V={title:this.props.rows.join("-")+" vs "+this.props.cols.join("-"),hovermode:"closest",xaxis:{title:this.props.cols.join("-"),automargin:!0},yaxis:{title:this.props.rows.join("-"),automargin:!0},width:window.innerWidth/1.5,height:window.innerHeight/1.4-50};return xa.jsx(F,{data:[G],layout:Object.assign(V,this.props.plotlyOptions),config:this.props.plotlyConfig,onUpdate:this.props.onRendererUpdate})}}return W.defaultProps=Object.assign({},Es.defaultProps,{plotlyOptions:{},plotlyConfig:{}}),W}function cE(F){return{"Grouped Column Chart":Dc(F,{type:"bar"},{barmode:"group"}),"Stacked Column Chart":Dc(F,{type:"bar"},{barmode:"relative"}),"Grouped Bar Chart":Dc(F,{type:"bar",orientation:"h"},{barmode:"group"},!0),"Stacked Bar Chart":Dc(F,{type:"bar",orientation:"h"},{barmode:"relative"},!0),"Line Chart":Dc(F),"Dot Chart":Dc(F,{mode:"markers"},{},!0),"Area Chart":Dc(F,{stackgroup:1}),"Scatter Chart":fE(F),"Multiple Pie Chart":Dc(F,{type:"pie",scalegroup:1,hoverinfo:"label+value",textinfo:"none"},{},!0)}}var OT={},NT={exports:{}},hE="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",vE=hE,dE=vE;function BT(){}function UT(){}UT.resetWarningCache=BT;var pE=function(){function F(we,ke,Xe,G,V,e){if(e!==dE){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}F.isRequired=F;function W(){return F}var ue={array:F,bigint:F,bool:F,func:F,number:F,object:F,string:F,symbol:F,any:F,arrayOf:W,element:F,elementType:F,instanceOf:W,node:F,objectOf:W,oneOf:W,oneOfType:W,shape:W,exact:W,checkPropTypes:UT,resetWarningCache:BT};return ue.PropTypes=ue,ue};NT.exports=pE();var gE=NT.exports;(function(F){function W(c){"@babel/helpers - typeof";return W=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},W(c)}Object.defineProperty(F,"__esModule",{value:!0}),F.default=l;var ue=G(Fn),we=ke(gE);function ke(c){return c&&c.__esModule?c:{default:c}}function Xe(c){if(typeof WeakMap!="function")return null;var u=new WeakMap,g=new WeakMap;return(Xe=function(w){return w?g:u})(c)}function G(c,u){if(!u&&c&&c.__esModule)return c;if(c===null||W(c)!=="object"&&typeof c!="function")return{default:c};var g=Xe(u);if(g&&g.has(c))return g.get(c);var f={},w=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var h in c)if(h!=="default"&&Object.prototype.hasOwnProperty.call(c,h)){var o=w?Object.getOwnPropertyDescriptor(c,h):null;o&&(o.get||o.set)?Object.defineProperty(f,h,o):f[h]=c[h]}return f.default=c,g&&g.set(c,f),f}function V(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function e(c,u){for(var g=0;g"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 t(c){return t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(g){return g.__proto__||Object.getPrototypeOf(g)},t(c)}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"],s=["plotly_restyle","plotly_redraw","plotly_relayout","plotly_relayouting","plotly_doubleclick","plotly_animated","plotly_sunburstclick"],n=typeof window<"u";function l(c){var u=function(g){P(w,g);var f=L(w);function w(h){var o;return V(this,w),o=f.call(this,h),o.p=Promise.resolve(),o.resizeHandler=null,o.handlers={},o.syncWindowResize=o.syncWindowResize.bind(v(o)),o.syncEventHandlers=o.syncEventHandlers.bind(v(o)),o.attachUpdateEvents=o.attachUpdateEvents.bind(v(o)),o.getRef=o.getRef.bind(v(o)),o.handleUpdate=o.handleUpdate.bind(v(o)),o.figureCallback=o.figureCallback.bind(v(o)),o.updatePlotly=o.updatePlotly.bind(v(o)),o}return m(w,[{key:"updatePlotly",value:function(o,d,M){var T=this;this.p=this.p.then(function(){if(!T.unmounting){if(!T.el)throw new Error("Missing element reference");return c.react(T.el,{data:T.props.data,layout:T.props.layout,config:T.props.config,frames:T.props.frames})}}).then(function(){T.unmounting||(T.syncWindowResize(o),T.syncEventHandlers(),T.figureCallback(d),M&&T.attachUpdateEvents())}).catch(function(C){T.props.onError&&T.props.onError(C)})}},{key:"componentDidMount",value:function(){this.unmounting=!1,this.updatePlotly(!0,this.props.onInitialized,!0)}},{key:"componentDidUpdate",value:function(o){this.unmounting=!1;var d=o.frames&&o.frames.length?o.frames.length:0,M=this.props.frames&&this.props.frames.length?this.props.frames.length:0,T=!(o.layout===this.props.layout&&o.data===this.props.data&&o.config===this.props.config&&M===d),C=o.revision!==void 0,x=o.revision!==this.props.revision;!T&&(!C||C&&!x)||this.updatePlotly(!1,this.props.onUpdate,!1)}},{key:"componentWillUnmount",value:function(){this.unmounting=!0,this.figureCallback(this.props.onPurge),this.resizeHandler&&n&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.removeUpdateEvents(),c.purge(this.el)}},{key:"attachUpdateEvents",value:function(){var o=this;!this.el||!this.el.removeListener||s.forEach(function(d){o.el.on(d,o.handleUpdate)})}},{key:"removeUpdateEvents",value:function(){var o=this;!this.el||!this.el.removeListener||s.forEach(function(d){o.el.removeListener(d,o.handleUpdate)})}},{key:"handleUpdate",value:function(){this.figureCallback(this.props.onUpdate)}},{key:"figureCallback",value:function(o){if(typeof o=="function"){var d=this.el,M=d.data,T=d.layout,C=this.el._transitionData?this.el._transitionData._frames:null,x={data:M,layout:T,frames:C};o(x,this.el)}}},{key:"syncWindowResize",value:function(o){var d=this;n&&(this.props.useResizeHandler&&!this.resizeHandler?(this.resizeHandler=function(){return c.Plots.resize(d.el)},window.addEventListener("resize",this.resizeHandler),o&&this.resizeHandler()):!this.props.useResizeHandler&&this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null))}},{key:"getRef",value:function(o){this.el=o,this.props.debug&&n&&(window.gd=this.el)}},{key:"syncEventHandlers",value:function(){var o=this;r.forEach(function(d){var M=o.props["on"+d],T=o.handlers[d],C=!!T;M&&!C?o.addEventHandler(d,M):!M&&C?o.removeEventHandler(d):M&&C&&M!==T&&(o.removeEventHandler(d),o.addEventHandler(d,M))})}},{key:"addEventHandler",value:function(o,d){this.handlers[o]=d,this.el.on(this.getPlotlyEventName(o),this.handlers[o])}},{key:"removeEventHandler",value:function(o){this.el.removeListener(this.getPlotlyEventName(o),this.handlers[o]),delete this.handlers[o]}},{key:"getPlotlyEventName",value:function(o){return"plotly_"+o.toLowerCase()}},{key:"render",value:function(){return ue.default.createElement("div",{id:this.props.divId,style:this.props.style,ref:this.getRef,className:this.props.className})}}]),w}(ue.Component);return u.propTypes={data:we.default.arrayOf(we.default.object),config:we.default.object,layout:we.default.object,frames:we.default.arrayOf(we.default.object),revision:we.default.number,onInitialized:we.default.func,onPurge:we.default.func,onError:we.default.func,onUpdate:we.default.func,debug:we.default.bool,style:we.default.object,className:we.default.string,useResizeHandler:we.default.bool,divId:we.default.string},r.forEach(function(g){u.propTypes["on"+g]=we.default.func}),u.defaultProps={debug:!1,useResizeHandler:!1,data:[],style:{position:"relative",display:"inline-block"}},u}})(OT);const yE=fg(OT);var VT={exports:{}};(function(F,W){(function(we,ke){F.exports=ke()})(self,function(){return function(){var ue={98847:function(G,V,e){var m=e(71828),P={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg":"overflow:hidden;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var i in P){var L=i.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");m.addStyleRule(L,P[i])}},98222:function(G,V,e){G.exports=e(82887)},27206:function(G,V,e){G.exports=e(60822)},59893:function(G,V,e){G.exports=e(23381)},5224:function(G,V,e){G.exports=e(83832)},59509:function(G,V,e){G.exports=e(72201)},75557:function(G,V,e){G.exports=e(91815)},40338:function(G,V,e){G.exports=e(21462)},35080:function(G,V,e){G.exports=e(51319)},61396:function(G,V,e){G.exports=e(57516)},40549:function(G,V,e){G.exports=e(98128)},49866:function(G,V,e){G.exports=e(99442)},36089:function(G,V,e){G.exports=e(93740)},19548:function(G,V,e){G.exports=e(8729)},35831:function(G,V,e){G.exports=e(93814)},61039:function(G,V,e){G.exports=e(14382)},97040:function(G,V,e){G.exports=e(51759)},77986:function(G,V,e){G.exports=e(10421)},24296:function(G,V,e){G.exports=e(43102)},58872:function(G,V,e){G.exports=e(92165)},29626:function(G,V,e){G.exports=e(3325)},65591:function(G,V,e){G.exports=e(36071)},69738:function(G,V,e){G.exports=e(43905)},92650:function(G,V,e){G.exports=e(35902)},35630:function(G,V,e){G.exports=e(69816)},73434:function(G,V,e){G.exports=e(94507)},27909:function(G,V,e){var m=e(19548);m.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)]),G.exports=m},46163:function(G,V,e){G.exports=e(15154)},96881:function(G,V,e){G.exports=e(64943)},50581:function(G,V,e){G.exports=e(21164)},55334:function(G,V,e){G.exports=e(54186)},65317:function(G,V,e){G.exports=e(94873)},10021:function(G,V,e){G.exports=e(67618)},54201:function(G,V,e){G.exports=e(58810)},5861:function(G,V,e){G.exports=e(20593)},16122:function(G,V,e){G.exports=e(29396)},83043:function(G,V,e){G.exports=e(13551)},48131:function(G,V,e){G.exports=e(46858)},47582:function(G,V,e){G.exports=e(17988)},21641:function(G,V,e){G.exports=e(68868)},96268:function(G,V,e){G.exports=e(20467)},19440:function(G,V,e){G.exports=e(91271)},99488:function(G,V,e){G.exports=e(21461)},97393:function(G,V,e){G.exports=e(85956)},25743:function(G,V,e){G.exports=e(52979)},66398:function(G,V,e){G.exports=e(32275)},17280:function(G,V,e){G.exports=e(6419)},77900:function(G,V,e){G.exports=e(61510)},81299:function(G,V,e){G.exports=e(87619)},93005:function(G,V,e){G.exports=e(93601)},40344:function(G,V,e){G.exports=e(96595)},47645:function(G,V,e){G.exports=e(70954)},6197:function(G,V,e){G.exports=e(47462)},4534:function(G,V,e){G.exports=e(17659)},85461:function(G,V,e){G.exports=e(19990)},82884:function(G){G.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(G,V,e){var m=e(82884),P=e(41940),i=e(85555),L=e(44467).templatedArray;e(24695),G.exports=L("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:P({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:m.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:m.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",i.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",i.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",i.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:P({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},3749:function(G,V,e){var m=e(71828),P=e(89298),i=e(92605).draw;G.exports=function(p){var t=p._fullLayout,r=m.filterVisible(t.annotations);if(r.length&&p._fullData.length)return m.syncOrAsync([i,L],p)};function L(v){var p=v._fullLayout;m.filterVisible(p.annotations).forEach(function(t){var r=P.getFromId(v,t.xref),s=P.getFromId(v,t.yref),n=P.getRefType(t.xref),l=P.getRefType(t.yref);t._extremes={},n==="range"&&A(t,r),l==="range"&&A(t,s)})}function A(v,p){var t=p._id,r=t.charAt(0),s=v[r],n=v["a"+r],l=v[r+"ref"],c=v["a"+r+"ref"],u=v["_"+r+"padplus"],g=v["_"+r+"padminus"],f={x:1,y:-1}[r]*v[r+"shift"],w=3*v.arrowsize*v.arrowwidth||0,h=w+f,o=w-f,d=3*v.startarrowsize*v.arrowwidth||0,M=d+f,T=d-f,C;if(c===l){var x=P.findExtremes(p,[p.r2c(s)],{ppadplus:h,ppadminus:o}),S=P.findExtremes(p,[p.r2c(n)],{ppadplus:Math.max(u,M),ppadminus:Math.max(g,T)});C={min:[x.min[0],S.min[0]],max:[x.max[0],S.max[0]]}}else M=n?M+n:M,T=n?T-n:T,C=P.findExtremes(p,[p.r2c(s)],{ppadplus:Math.max(u,h,M),ppadminus:Math.max(g,o,T)});v._extremes[t]=C}},44317:function(G,V,e){var m=e(71828),P=e(73972),i=e(44467).arrayEditor;G.exports={hasClickToShow:L,onClick:A};function L(t,r){var s=v(t,r);return s.on.length>0||s.explicitOff.length>0}function A(t,r){var s=v(t,r),n=s.on,l=s.off.concat(s.explicitOff),c={},u=t._fullLayout.annotations,g,f;if(n.length||l.length){for(g=0;g.6666666666666666?hr="right":hr="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[hr]}for(var nt=!1,qe=["x","y"],$e=0;$e1)&&(dt===ct?(ot=pt.r2fraction(d["a"+et]),(ot<0||ot>1)&&(nt=!0)):nt=!0),Pe=pt._offset+pt.r2p(d[et]),ye=.5}else{var at=Be==="domain";et==="x"?(se=d[et],Pe=at?pt._offset+pt._length*se:Pe=b.l+b.w*se):(se=1-d[et],Pe=at?pt._offset+pt._length*se:Pe=b.t+b.h*se),ye=d.showarrow?.5:se}if(d.showarrow){ze.head=Pe;var wt=d["a"+et];if(Le=Mt*Ge(.5,d.xanchor)-Vt*Ge(.5,d.yanchor),dt===ct){var It=v.getRefType(dt);It==="domain"?(et==="y"&&(wt=1-wt),ze.tail=pt._offset+pt._length*wt):It==="paper"?et==="y"?(wt=1-wt,ze.tail=b.t+b.h*wt):ze.tail=b.l+b.w*wt:ze.tail=pt._offset+pt.r2p(wt),be=Le}else ze.tail=Pe+wt,be=Le+wt;ze.text=ze.tail+Le;var Bt=S[et==="x"?"width":"height"];if(ct==="paper"&&(ze.head=L.constrain(ze.head,1,Bt-1)),dt==="pixel"){var Gt=-Math.max(ze.tail-3,ze.text),Lt=Math.min(ze.tail+3,ze.text)-Bt;Gt>0?(ze.tail+=Gt,ze.text+=Gt):Lt>0&&(ze.tail-=Lt,ze.text-=Lt)}ze.tail+=Ie,ze.head+=Ie}else Le=Je*Ge(ye,De),be=Le,ze.text=Pe+Le;ze.text+=Ie,Le+=Ie,be+=Ie,d["_"+et+"padplus"]=Je/2+be,d["_"+et+"padminus"]=Je/2-be,d["_"+et+"size"]=Je,d["_"+et+"shift"]=Le}if(nt){ce.remove();return}var Kt=0,ir=0;if(d.align!=="left"&&(Kt=(Se-Ee)*(d.align==="center"?.5:1)),d.valign!=="top"&&(ir=(Ue-xe)*(d.valign==="middle"?.5:1)),Oe)Te.select("svg").attr({x:j+Kt-1,y:j+ir}).call(t.setClipUrl,ee?O:null,o);else{var _r=j+ir-Ne.top,yt=j+Kt-Ne.left;le.call(s.positionText,yt,_r).call(t.setClipUrl,ee?O:null,o)}oe.select("rect").call(t.setRect,j,j,Se,Ue),K.call(t.setRect,Q/2,Q/2,He-Q,Fe-Q),ce.call(t.setTranslate,Math.round(N.x.text-He/2),Math.round(N.y.text-Fe/2)),Y.attr({transform:"rotate("+_+","+N.x.text+","+N.y.text+")"});var jt=function(br,hr){U.selectAll(".annotation-arrow-g").remove();var ut=N.x.head,lt=N.y.head,xt=N.x.tail+br,Tt=N.y.tail+hr,Ct=N.x.text+br,St=N.y.text+hr,_t=L.rotationXYMatrix(_,Ct,St),Ht=L.apply2DTransform(_t),$t=L.apply2DTransform2(_t),Qt=+K.attr("width"),or=+K.attr("height"),Er=Ct-.5*Qt,Ye=Er+Qt,We=St-.5*or,Dt=We+or,Ft=[[Er,We,Er,Dt],[Er,Dt,Ye,Dt],[Ye,Dt,Ye,We],[Ye,We,Er,We]].map($t);if(!Ft.reduce(function(kr,pn){return kr^!!L.segmentsIntersect(ut,lt,ut+1e6,lt+1e6,pn[0],pn[1],pn[2],pn[3])},!1)){Ft.forEach(function(kr){var pn=L.segmentsIntersect(xt,Tt,ut,lt,kr[0],kr[1],kr[2],kr[3]);pn&&(xt=pn.x,Tt=pn.y)});var Zt=d.arrowwidth,nr=d.arrowcolor,lr=d.arrowside,rr=U.append("g").style({opacity:p.opacity(nr)}).classed("annotation-arrow-g",!0),zt=rr.append("path").attr("d","M"+xt+","+Tt+"L"+ut+","+lt).style("stroke-width",Zt+"px").call(p.stroke,p.rgb(nr));if(u(zt,lr,d),a.annotationPosition&&zt.node().parentNode&&!T){var fr=ut,dr=lt;if(d.standoff){var pr=Math.sqrt(Math.pow(ut-xt,2)+Math.pow(lt-Tt,2));fr+=d.standoff*(xt-ut)/pr,dr+=d.standoff*(Tt-lt)/pr}var vr=rr.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(xt-fr)+","+(Tt-dr),transform:A(fr,dr)}).style("stroke-width",Zt+6+"px").call(p.stroke,"rgba(0,0,0,0)").call(p.fill,"rgba(0,0,0,0)"),Hr,Ir;l.init({element:vr.node(),gd:o,prepFn:function(){var kr=t.getTranslate(ce);Hr=kr.x,Ir=kr.y,C&&C.autorange&&I(C._name+".autorange",!0),x&&x.autorange&&I(x._name+".autorange",!0)},moveFn:function(kr,pn){var jr=Ht(Hr,Ir),In=jr[0]+kr,Dn=jr[1]+pn;ce.call(t.setTranslate,In,Dn),B("x",w(C,kr,"x",b,d)),B("y",w(x,pn,"y",b,d)),d.axref===d.xref&&B("ax",w(C,kr,"ax",b,d)),d.ayref===d.yref&&B("ay",w(x,pn,"ay",b,d)),rr.attr("transform",A(kr,pn)),Y.attr({transform:"rotate("+_+","+In+","+Dn+")"})},doneFn:function(){P.call("_guiRelayout",o,k());var kr=document.querySelector(".js-notes-box-panel");kr&&kr.redraw(kr.selectedObj)}})}}};if(d.showarrow&&jt(0,0),J){var Yt;l.init({element:ce.node(),gd:o,prepFn:function(){Yt=Y.attr("transform")},moveFn:function(br,hr){var ut="pointer";if(d.showarrow)d.axref===d.xref?B("ax",w(C,br,"ax",b,d)):B("ax",d.ax+br),d.ayref===d.yref?B("ay",w(x,hr,"ay",b.w,d)):B("ay",d.ay+hr),jt(br,hr);else{if(T)return;var lt,xt;if(C)lt=w(C,br,"x",b,d);else{var Tt=d._xsize/b.w,Ct=d.x+(d._xshift-d.xshift)/b.w-Tt/2;lt=l.align(Ct+br/b.w,Tt,0,1,d.xanchor)}if(x)xt=w(x,hr,"y",b,d);else{var St=d._ysize/b.h,_t=d.y-(d._yshift+d.yshift)/b.h-St/2;xt=l.align(_t-hr/b.h,St,0,1,d.yanchor)}B("x",lt),B("y",xt),(!C||!x)&&(ut=l.getCursor(C?.5:lt,x?.5:xt,d.xanchor,d.yanchor))}Y.attr({transform:A(br,hr)+Yt}),n(ce,ut)},clickFn:function(br,hr){d.captureevents&&o.emit("plotly_clickannotation",ae(hr))},doneFn:function(){n(ce),P.call("_guiRelayout",o,k());var br=document.querySelector(".js-notes-box-panel");br&&br.redraw(br.selectedObj)}})}}a.annotationText?le.call(s.makeEditable,{delegate:ce,gd:o}).call(ie).on("edit",function(me){d.text=me,this.call(ie),B("text",me),C&&C.autorange&&I(C._name+".autorange",!0),x&&x.autorange&&I(x._name+".autorange",!0),P.call("_guiRelayout",o,k())}):le.call(ie)}},13011:function(G,V,e){var m=e(39898),P=e(7901),i=e(82884),L=e(71828),A=L.strScale,v=L.strRotate,p=L.strTranslate;G.exports=function(r,s,n){var l=r.node(),c=i[n.arrowhead||0],u=i[n.startarrowhead||0],g=(n.arrowwidth||1)*(n.arrowsize||1),f=(n.arrowwidth||1)*(n.startarrowsize||1),w=s.indexOf("start")>=0,h=s.indexOf("end")>=0,o=c.backoff*g+n.standoff,d=u.backoff*f+n.startstandoff,M,T,C,x;if(l.nodeName==="line"){M={x:+r.attr("x1"),y:+r.attr("y1")},T={x:+r.attr("x2"),y:+r.attr("y2")};var S=M.x-T.x,b=M.y-T.y;if(C=Math.atan2(b,S),x=C+Math.PI,o&&d&&o+d>Math.sqrt(S*S+b*b)){Y();return}if(o){if(o*o>S*S+b*b){Y();return}var a=o*Math.cos(C),E=o*Math.sin(C);T.x+=a,T.y+=E,r.attr({x2:T.x,y2:T.y})}if(d){if(d*d>S*S+b*b){Y();return}var y=d*Math.cos(C),z=d*Math.sin(C);M.x-=y,M.y-=z,r.attr({x1:M.x,y1:M.y})}}else if(l.nodeName==="path"){var I=l.getTotalLength(),B="";if(I1){n=!0;break}}n?A.fullLayout._infolayer.select(".annotation-"+A.id+'[data-index="'+r+'"]').remove():(s._pdata=P(A.glplot.cameraParams,[v.xaxis.r2l(s.x)*p[0],v.yaxis.r2l(s.y)*p[1],v.zaxis.r2l(s.z)*p[2]]),m(A.graphDiv,s,r,A.id,s._xa,s._ya))}}},2468:function(G,V,e){var m=e(73972),P=e(71828);G.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:e(26997)}}},layoutAttributes:e(26997),handleDefaults:e(20226),includeBasePlot:i,convert:e(5485),draw:e(82188)};function i(L,A){var v=m.subplotsRegistry.gl3d;if(v)for(var p=v.attrRegex,t=Object.keys(L),r=0;r=0)))return r;if(u===3)l[u]>1&&(l[u]=1);else if(l[u]>=1)return r}var g=Math.round(l[0]*255)+", "+Math.round(l[1]*255)+", "+Math.round(l[2]*255);return c?"rgba("+g+", "+l[3]+")":"rgb("+g+")"}},63583:function(G,V,e){var m=e(13838),P=e(41940),i=e(1426).extendFlat,L=e(30962).overrideAll;G.exports=L({orientation:{valType:"enumerated",values:["h","v"],dflt:"v"},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels"},thickness:{valType:"number",min:0,dflt:30},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["left","center","right"]},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},ypad:{valType:"number",min:0,dflt:10},outlinecolor:m.linecolor,outlinewidth:m.linewidth,bordercolor:m.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:m.minor.tickmode,nticks:m.nticks,tick0:m.tick0,dtick:m.dtick,tickvals:m.tickvals,ticktext:m.ticktext,ticks:i({},m.ticks,{dflt:""}),ticklabeloverflow:i({},m.ticklabeloverflow,{}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside"},ticklen:m.ticklen,tickwidth:m.tickwidth,tickcolor:m.tickcolor,ticklabelstep:m.ticklabelstep,showticklabels:m.showticklabels,labelalias:m.labelalias,tickfont:P({}),tickangle:m.tickangle,tickformat:m.tickformat,tickformatstops:m.tickformatstops,tickprefix:m.tickprefix,showtickprefix:m.showtickprefix,ticksuffix:m.ticksuffix,showticksuffix:m.showticksuffix,separatethousands:m.separatethousands,exponentformat:m.exponentformat,minexponent:m.minexponent,showexponent:m.showexponent,title:{text:{valType:"string"},font:P({}),side:{valType:"enumerated",values:["right","top","bottom"]}},_deprecated:{title:{valType:"string"},titlefont:P({}),titleside:{valType:"enumerated",values:["right","top","bottom"],dflt:"top"}}},"colorbars","from-root")},30939:function(G){G.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}},62499:function(G,V,e){var m=e(71828),P=e(44467),i=e(26218),L=e(38701),A=e(96115),v=e(89426),p=e(63583);G.exports=function(r,s,n){var l=P.newContainer(s,"colorbar"),c=r.colorbar||{};function u(N,_){return m.coerce(c,l,p,N,_)}var g=n.margin||{t:0,b:0,l:0,r:0},f=n.width-g.l-g.r,w=n.height-g.t-g.b,h=u("orientation"),o=h==="v",d=u("thicknessmode");u("thickness",d==="fraction"?30/(o?f:w):30);var M=u("lenmode");u("len",M==="fraction"?1:o?w:f);var T=u("yref"),C=u("xref"),x=T==="paper",S=C==="paper",b,a,E,y="left";o?(E="middle",y=S?"left":"right",b=S?1.02:1,a=.5):(E=x?"bottom":"top",y="center",b=.5,a=x?1.02:1),m.coerce(c,l,{x:{valType:"number",min:S?-2:0,max:S?3:1,dflt:b}},"x"),m.coerce(c,l,{y:{valType:"number",min:x?-2:0,max:x?3:1,dflt:a}},"y"),u("xanchor",y),u("xpad"),u("yanchor",E),u("ypad"),m.noneOrAll(c,l,["x","y"]),u("outlinecolor"),u("outlinewidth"),u("bordercolor"),u("borderwidth"),u("bgcolor");var z=m.coerce(c,l,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:o?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");u("ticklabeloverflow",z.indexOf("inside")!==-1?"hide past domain":"hide past div"),i(c,l,u,"linear");var I=n.font,B={outerTicks:!1,font:I};z.indexOf("inside")!==-1&&(B.bgColor="black"),v(c,l,u,"linear",B),A(c,l,u,"linear",B),L(c,l,u,"linear",B),u("title.text",n._dfltTitle.colorbar);var k=l.showticklabels?l.tickfont:I,O=m.extendFlat({},k,{color:I.color,size:m.bigFont(k.size)});m.coerceFont(u,"title.font",O),u("title.side",o?"top":"right")}},98981:function(G,V,e){var m=e(39898),P=e(84267),i=e(74875),L=e(73972),A=e(89298),v=e(28569),p=e(71828),t=p.strTranslate,r=e(1426).extendFlat,s=e(6964),n=e(91424),l=e(7901),c=e(92998),u=e(63893),g=e(52075).flipScale,f=e(71453),w=e(52830),h=e(13838),o=e(18783),d=o.LINE_SPACING,M=o.FROM_TL,T=o.FROM_BR,C=e(30939).cn;function x(z){var I=z._fullLayout,B=I._infolayer.selectAll("g."+C.colorbar).data(S(z),function(k){return k._id});B.enter().append("g").attr("class",function(k){return k._id}).classed(C.colorbar,!0),B.each(function(k){var O=m.select(this);p.ensureSingle(O,"rect",C.cbbg),p.ensureSingle(O,"g",C.cbfills),p.ensureSingle(O,"g",C.cblines),p.ensureSingle(O,"g",C.cbaxis,function(_){_.classed(C.crisp,!0)}),p.ensureSingle(O,"g",C.cbtitleunshift,function(_){_.append("g").classed(C.cbtitle,!0)}),p.ensureSingle(O,"rect",C.cboutline);var N=b(O,k,z);N&&N.then&&(z._promises||[]).push(N),z._context.edits.colorbarPosition&&a(O,k,z)}),B.exit().each(function(k){i.autoMargin(z,k._id)}).remove(),B.order()}function S(z){var I=z._fullLayout,B=z.calcdata,k=[],O,N,_,U;function Y(q){return r(q,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function J(){typeof U.calc=="function"?U.calc(z,_,O):(O._fillgradient=N.reversescale?g(N.colorscale):N.colorscale,O._zrange=[N[U.min],N[U.max]])}for(var te=0;te1){var ze=Math.pow(10,Math.floor(Math.log(Ie)/Math.LN10));Je*=ze*p.roundUp(Ie/ze,[2,5,10]),(Math.abs(Ne.start)/Ne.size+1e-6)%1<2e-6&&(Mt.tick0=0)}Mt.dtick=Je}Mt.domain=k?[pt+Z/$.h,pt+Ge-Z/$.h]:[pt+Q/$.w,pt+Ge-Q/$.w],Mt.setScale(),z.attr("transform",t(Math.round($.l),Math.round($.t)));var Pe=z.select("."+C.cbtitleunshift).attr("transform",t(-Math.round($.l),-Math.round($.t))),be=Mt.ticklabelposition,se=Mt.title.font.size,ye=z.select("."+C.cbaxis),Le,Be=0,ot=0;function at(Lt,Kt){var ir={propContainer:Mt,propName:I._propPrefix+"title",traceIndex:I._traceIndex,_meta:I._meta,placeholder:q._dfltTitle.colorbar,containerGroup:z.select("."+C.cbtitle)},_r=Lt.charAt(0)==="h"?Lt.substr(1):"h"+Lt;z.selectAll("."+_r+",."+_r+"-math-group").remove(),c.draw(B,Lt,r(ir,Kt||{}))}function wt(){if(k&&Vt||!k&&!Vt){var Lt,Kt;me==="top"&&(Lt=Q+$.l+nt*j,Kt=Z+$.t+qe*(1-pt-Ge)+3+se*.75),me==="bottom"&&(Lt=Q+$.l+nt*j,Kt=Z+$.t+qe*(1-pt)-3-se*.25),me==="right"&&(Kt=Z+$.t+qe*K+3+se*.75,Lt=Q+$.l+nt*pt),at(Mt._id+"title",{attributes:{x:Lt,y:Kt,"text-anchor":k?"start":"middle"}})}}function It(){if(k&&!Vt||!k&&Vt){var Lt=Mt.position||0,Kt=Mt._offset+Mt._length/2,ir,_r;if(me==="right")_r=Kt,ir=$.l+nt*Lt+10+se*(Mt.showticklabels?1:.5);else if(ir=Kt,me==="bottom"&&(_r=$.t+qe*Lt+10+(be.indexOf("inside")===-1?Mt.tickfont.size:0)+(Mt.ticks!=="intside"&&I.ticklen||0)),me==="top"){var yt=he.text.split("
").length;_r=$.t+qe*Lt+10-Ue-d*se*yt}at((k?"h":"v")+Mt._id+"title",{avoid:{selection:m.select(B).selectAll("g."+Mt._id+"tick"),side:me,offsetTop:k?0:$.t,offsetLeft:k?$.l:0,maxShift:k?q.width:q.height},attributes:{x:ir,y:_r,"text-anchor":"middle"},transform:{rotate:k?-90:0,offset:0}})}}function Bt(){if(!k&&!Vt||k&&Vt){var Lt=z.select("."+C.cbtitle),Kt=Lt.select("text"),ir=[-Y/2,Y/2],_r=Lt.select(".h"+Mt._id+"title-math-group").node(),yt=15.6;Kt.node()&&(yt=parseInt(Kt.node().style.fontSize,10)*d);var jt;if(_r?(jt=n.bBox(_r),ot=jt.width,Be=jt.height,Be>yt&&(ir[1]-=(Be-yt)/2)):Kt.node()&&!Kt.classed(C.jsPlaceholder)&&(jt=n.bBox(Kt.node()),ot=jt.width,Be=jt.height),k){if(Be){if(Be+=5,me==="top")Mt.domain[1]-=Be/$.h,ir[1]*=-1;else{Mt.domain[0]+=Be/$.h;var Yt=u.lineCount(Kt);ir[1]+=(1-Yt)*yt}Lt.attr("transform",t(ir[0],ir[1])),Mt.setScale()}}else ot&&(me==="right"&&(Mt.domain[0]+=(ot+se/2)/$.w),Lt.attr("transform",t(ir[0],ir[1])),Mt.setScale())}z.selectAll("."+C.cbfills+",."+C.cblines).attr("transform",k?t(0,Math.round($.h*(1-Mt.domain[1]))):t(Math.round($.w*Mt.domain[0]),0)),ye.attr("transform",k?t(0,Math.round(-$.t)):t(Math.round(-$.l),0));var br=z.select("."+C.cbfills).selectAll("rect."+C.cbfill).attr("style","").data(xe);br.enter().append("rect").classed(C.cbfill,!0).attr("style",""),br.exit().remove();var hr=Me.map(Mt.c2p).map(Math.round).sort(function(Ct,St){return Ct-St});br.each(function(Ct,St){var _t=[St===0?Me[0]:(xe[St]+xe[St-1])/2,St===xe.length-1?Me[1]:(xe[St]+xe[St+1])/2].map(Mt.c2p).map(Math.round);k&&(_t[1]=p.constrain(_t[1]+(_t[1]>_t[0])?1:-1,hr[0],hr[1]));var Ht=m.select(this).attr(k?"x":"y",$e).attr(k?"y":"x",m.min(_t)).attr(k?"width":"height",Math.max(Ue,2)).attr(k?"height":"width",Math.max(m.max(_t)-m.min(_t),2));if(I._fillgradient)n.gradient(Ht,B,I._id,k?"vertical":"horizontalreversed",I._fillgradient,"fill");else{var $t=Oe(Ct).replace("e-","");Ht.attr("fill",P($t).toHexString())}});var ut=z.select("."+C.cblines).selectAll("path."+C.cbline).data(ie.color&&ie.width?Se:[]);ut.enter().append("path").classed(C.cbline,!0),ut.exit().remove(),ut.each(function(Ct){var St=$e,_t=Math.round(Mt.c2p(Ct))+ie.width/2%1;m.select(this).attr("d","M"+(k?St+","+_t:_t+","+St)+(k?"h":"v")+Ue).call(n.lineGroupStyle,ie.width,Te(Ct),ie.dash)}),ye.selectAll("g."+Mt._id+"tick,path").remove();var lt=$e+Ue+(Y||0)/2-(I.ticks==="outside"?1:0),xt=A.calcTicks(Mt),Tt=A.getTickSigns(Mt)[2];return A.drawTicks(B,Mt,{vals:Mt.ticks==="inside"?A.clipEnds(Mt,xt):xt,layer:ye,path:A.makeTickPath(Mt,lt,Tt),transFn:A.makeTransTickFn(Mt)}),A.drawLabels(B,Mt,{vals:xt,layer:ye,transFn:A.makeTransTickLabelFn(Mt),labelFns:A.makeLabelFns(Mt,lt)})}function Gt(){var Lt,Kt=Ue+Y/2;be.indexOf("inside")===-1&&(Lt=n.bBox(ye.node()),Kt+=k?Lt.width:Lt.height),Le=Pe.select("text");var ir=0,_r=k&&me==="top",yt=!k&&me==="right",jt=0;if(Le.node()&&!Le.classed(C.jsPlaceholder)){var Yt,br=Pe.select(".h"+Mt._id+"title-math-group").node();br&&(k&&Vt||!k&&!Vt)?(Lt=n.bBox(br),ir=Lt.width,Yt=Lt.height):(Lt=n.bBox(Pe.node()),ir=Lt.right-$.l-(k?$e:At),Yt=Lt.bottom-$.t-(k?At:$e),!k&&me==="top"&&(Kt+=Lt.height,jt=Lt.height)),yt&&(Le.attr("transform",t(ir/2+se/2,0)),ir*=2),Kt=Math.max(Kt,k?ir:Yt)}var hr=(k?Q:Z)*2+Kt+J+Y/2,ut=0;!k&&he.text&&ce==="bottom"&&K<=0&&(ut=hr/2,hr+=ut,jt+=ut),q._hColorbarMoveTitle=ut,q._hColorbarMoveCBTitle=jt;var lt=J+Y,xt=(k?$e:At)-lt/2-(k?Q:0),Tt=(k?At:$e)-(k?Fe:Z+jt-ut);z.select("."+C.cbbg).attr("x",xt).attr("y",Tt).attr(k?"width":"height",Math.max(hr-ut,2)).attr(k?"height":"width",Math.max(Fe+lt,2)).call(l.fill,te).call(l.stroke,I.bordercolor).style("stroke-width",J);var Ct=yt?Math.max(ir-10,0):0;z.selectAll("."+C.cboutline).attr("x",(k?$e:At+Q)+Ct).attr("y",(k?At+Z-Fe:$e)+(_r?Be:0)).attr(k?"width":"height",Math.max(Ue,2)).attr(k?"height":"width",Math.max(Fe-(k?2*Z+Be:2*Q+Ct),2)).call(l.stroke,I.outlinecolor).style({fill:"none","stroke-width":Y});var St=k?et*hr:0,_t=k?0:(1-ct)*hr-jt;if(St=oe?$.l-St:-St,_t=ee?$.t-_t:-_t,z.attr("transform",t(St,_t)),!k&&(J||P(te).getAlpha()&&!P.equals(q.paper_bgcolor,te))){var Ht=ye.selectAll("text"),$t=Ht[0].length,Qt=z.select("."+C.cbbg).node(),or=n.bBox(Qt),Er=n.getTranslate(z),Ye=2;Ht.each(function(dr,pr){var vr=0,Hr=$t-1;if(pr===vr||pr===Hr){var Ir=n.bBox(this),kr=n.getTranslate(this),pn;if(pr===Hr){var jr=Ir.right+kr.x,In=or.right+Er.x+At-J-Ye+j;pn=In-jr,pn>0&&(pn=0)}else if(pr===vr){var Dn=Ir.left+kr.x,xr=or.left+Er.x+At+J+Ye;pn=xr-Dn,pn<0&&(pn=0)}pn&&($t<3?this.setAttribute("transform","translate("+pn+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var We={},Dt=M[ae],Ft=T[ae],Zt=M[ce],nr=T[ce],lr=hr-Ue;k?(N==="pixels"?(We.y=K,We.t=Fe*Zt,We.b=Fe*nr):(We.t=We.b=0,We.yt=K+O*Zt,We.yb=K-O*nr),U==="pixels"?(We.x=j,We.l=hr*Dt,We.r=hr*Ft):(We.l=lr*Dt,We.r=lr*Ft,We.xl=j-_*Dt,We.xr=j+_*Ft)):(N==="pixels"?(We.x=j,We.l=Fe*Dt,We.r=Fe*Ft):(We.l=We.r=0,We.xl=j+O*Dt,We.xr=j-O*Ft),U==="pixels"?(We.y=1-K,We.t=hr*Zt,We.b=hr*nr):(We.t=lr*Zt,We.b=lr*nr,We.yt=K-_*Zt,We.yb=K+_*nr));var rr=I.y<.5?"b":"t",zt=I.x<.5?"l":"r";B._fullLayout._reservedMargin[I._id]={};var fr={r:q.width-xt-St,l:xt+We.r,b:q.height-Tt-_t,t:Tt+We.b};oe&&ee?i.autoMargin(B,I._id,We):oe?B._fullLayout._reservedMargin[I._id][rr]=fr[rr]:ee||k?B._fullLayout._reservedMargin[I._id][zt]=fr[zt]:B._fullLayout._reservedMargin[I._id][rr]=fr[rr]}return p.syncOrAsync([i.previousPromises,wt,Bt,It,i.previousPromises,Gt],B)}function a(z,I,B){var k=I.orientation==="v",O=B._fullLayout,N=O._size,_,U,Y;v.init({element:z.node(),gd:B,prepFn:function(){_=z.attr("transform"),s(z)},moveFn:function(J,te){z.attr("transform",_+t(J,te)),U=v.align((k?I._uFrac:I._vFrac)+J/N.w,k?I._thickFrac:I._lenFrac,0,1,I.xanchor),Y=v.align((k?I._vFrac:1-I._uFrac)-te/N.h,k?I._lenFrac:I._thickFrac,0,1,I.yanchor);var ae=v.getCursor(U,Y,I.xanchor,I.yanchor);s(z,ae)},doneFn:function(){if(s(z),U!==void 0&&Y!==void 0){var J={};J[I._propPrefix+"x"]=U,J[I._propPrefix+"y"]=Y,I._traceIndex!==void 0?L.call("_guiRestyle",B,J,I._traceIndex):L.call("_guiRelayout",B,J)}}})}function E(z,I,B){var k=I._levels,O=[],N=[],_,U,Y=k.end+k.size/100,J=k.size,te=1.001*B[0]-.001*B[1],ae=1.001*B[1]-.001*B[0];for(U=0;U<1e5&&(_=k.start+U*J,!(J>0?_>=Y:_<=Y));U++)_>te&&_0?_>=Y:_<=Y));U++)_>B[0]&&_f-u?u=f-(g-f):g-f=0?o=t.colorscale.sequential:o=t.colorscale.sequentialminus,l._sync("colorscale",o)}}},33046:function(G,V,e){var m=e(71828),P=e(52075).hasColorscale,i=e(52075).extractOpts;G.exports=function(A,v){function p(u,g){var f=u["_"+g];f!==void 0&&(u[g]=f)}function t(u,g){var f=g.container?m.nestedProperty(u,g.container).get():u;if(f)if(f.coloraxis)f._colorAx=v[f.coloraxis];else{var w=i(f),h=w.auto;(h||w.min===void 0)&&p(f,g.min),(h||w.max===void 0)&&p(f,g.max),w.autocolorscale&&p(f,"colorscale")}}for(var r=0;r=0;o--,d++){var M=f[o];h[d]=[1-M[0],M[1]]}return h}function c(f,w){w=w||{};for(var h=f.domain,o=f.range,d=o.length,M=new Array(d),T=0;T1.3333333333333333-p?v:p}},70461:function(G,V,e){var m=e(71828),P=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];G.exports=function(L,A,v,p){return v==="left"?L=0:v==="center"?L=1:v==="right"?L=2:L=m.constrain(Math.floor(L*3),0,2),p==="bottom"?A=0:p==="middle"?A=1:p==="top"?A=2:A=m.constrain(Math.floor(A*3),0,2),P[A][L]}},64505:function(G,V){V.selectMode=function(e){return e==="lasso"||e==="select"},V.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"},V.openMode=function(e){return e==="drawline"||e==="drawopenpath"},V.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"},V.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"},V.selectingOrDrawing=function(e){return V.freeMode(e)||V.rectMode(e)}},28569:function(G,V,e){var m=e(48956),P=e(57035),i=e(38520),L=e(71828).removeElement,A=e(85555),v=G.exports={};v.align=e(92807),v.getCursor=e(70461);var p=e(26041);v.unhover=p.wrapped,v.unhoverRaw=p.raw,v.init=function(n){var l=n.gd,c=1,u=l._context.doubleClickDelay,g=n.element,f,w,h,o,d,M,T,C;l._mouseDownTime||(l._mouseDownTime=0),g.style.pointerEvents="all",g.onmousedown=b,i?(g._ontouchstart&&g.removeEventListener("touchstart",g._ontouchstart),g._ontouchstart=b,g.addEventListener("touchstart",b,{passive:!1})):g.ontouchstart=b;function x(y,z,I){return Math.abs(y)"u"&&typeof y.clientY>"u"&&(y.clientX=f,y.clientY=w),h=new Date().getTime(),h-l._mouseDownTimeu&&(c=Math.max(c-1,1)),l._dragged)n.doneFn&&n.doneFn();else if(n.clickFn&&n.clickFn(c,M),!C){var z;try{z=new MouseEvent("click",y)}catch{var I=r(y);z=document.createEvent("MouseEvents"),z.initMouseEvent("click",y.bubbles,y.cancelable,y.view,y.detail,y.screenX,y.screenY,I[0],I[1],y.ctrlKey,y.altKey,y.shiftKey,y.metaKey,y.button,y.relatedTarget)}T.dispatchEvent(z)}l._dragging=!1,l._dragged=!1}};function t(){var s=document.createElement("div");s.className="dragcover";var n=s.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(s),s}v.coverSlip=t;function r(s){return m(s.changedTouches?s.changedTouches[0]:s,document.body)}},26041:function(G,V,e){var m=e(11086),P=e(79990),i=e(24401).getGraphDiv,L=e(26675),A=G.exports={};A.wrapped=function(v,p,t){v=i(v),v._fullLayout&&P.clear(v._fullLayout._uid+L.HOVERID),A.raw(v,p,t)},A.raw=function(p,t){var r=p._fullLayout,s=p._hoverdata;t||(t={}),!(t.target&&!p._dragged&&m.triggerHandler(p,"plotly_beforehover",t)===!1)&&(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),p._hoverdata=void 0,t.target&&s&&p.emit("plotly_unhover",{event:t,points:s}))}},79952:function(G,V){V.P={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},V.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(G,V,e){var m=e(39898),P=e(71828),i=P.numberFormat,L=e(92770),A=e(84267),v=e(73972),p=e(7901),t=e(21081),r=P.strTranslate,s=e(63893),n=e(77922),l=e(18783),c=l.LINE_SPACING,u=e(37822).DESELECTDIM,g=e(34098),f=e(39984),w=e(23469).appendArrayPointValue,h=G.exports={};h.font=function(Ee,xe,Se,Ue){P.isPlainObject(xe)&&(Ue=xe.color,Se=xe.size,xe=xe.family),xe&&Ee.style("font-family",xe),Se+1&&Ee.style("font-size",Se+"px"),Ue&&Ee.call(p.fill,Ue)},h.setPosition=function(Ee,xe,Se){Ee.attr("x",xe).attr("y",Se)},h.setSize=function(Ee,xe,Se){Ee.attr("width",xe).attr("height",Se)},h.setRect=function(Ee,xe,Se,Ue,He){Ee.call(h.setPosition,xe,Se).call(h.setSize,Ue,He)},h.translatePoint=function(Ee,xe,Se,Ue){var He=Se.c2p(Ee.x),Fe=Ue.c2p(Ee.y);if(L(He)&&L(Fe)&&xe.node())xe.node().nodeName==="text"?xe.attr("x",He).attr("y",Fe):xe.attr("transform",r(He,Fe));else return!1;return!0},h.translatePoints=function(Ee,xe,Se){Ee.each(function(Ue){var He=m.select(this);h.translatePoint(Ue,He,xe,Se)})},h.hideOutsideRangePoint=function(Ee,xe,Se,Ue,He,Fe){xe.attr("display",Se.isPtWithinRange(Ee,He)&&Ue.isPtWithinRange(Ee,Fe)?null:"none")},h.hideOutsideRangePoints=function(Ee,xe){if(xe._hasClipOnAxisFalse){var Se=xe.xaxis,Ue=xe.yaxis;Ee.each(function(He){var Fe=He[0].trace,Ge=Fe.xcalendar,nt=Fe.ycalendar,qe=v.traceIs(Fe,"bar-like")?".bartext":".point,.textpoint";Ee.selectAll(qe).each(function($e){h.hideOutsideRangePoint($e,m.select(this),Se,Ue,Ge,nt)})})}},h.crispRound=function(Ee,xe,Se){return!xe||!L(xe)?Se||0:Ee._context.staticPlot?xe:xe<1?1:Math.round(xe)},h.singleLineStyle=function(Ee,xe,Se,Ue,He){xe.style("fill","none");var Fe=(((Ee||[])[0]||{}).trace||{}).line||{},Ge=Se||Fe.width||0,nt=He||Fe.dash||"";p.stroke(xe,Ue||Fe.color),h.dashLine(xe,nt,Ge)},h.lineGroupStyle=function(Ee,xe,Se,Ue){Ee.style("fill","none").each(function(He){var Fe=(((He||[])[0]||{}).trace||{}).line||{},Ge=xe||Fe.width||0,nt=Ue||Fe.dash||"";m.select(this).call(p.stroke,Se||Fe.color).call(h.dashLine,nt,Ge)})},h.dashLine=function(Ee,xe,Se){Se=+Se||0,xe=h.dashStyle(xe,Se),Ee.style({"stroke-dasharray":xe,"stroke-width":Se+"px"})},h.dashStyle=function(Ee,xe){xe=+xe||1;var Se=Math.max(xe,3);return Ee==="solid"?Ee="":Ee==="dot"?Ee=Se+"px,"+Se+"px":Ee==="dash"?Ee=3*Se+"px,"+3*Se+"px":Ee==="longdash"?Ee=5*Se+"px,"+5*Se+"px":Ee==="dashdot"?Ee=3*Se+"px,"+Se+"px,"+Se+"px,"+Se+"px":Ee==="longdashdot"&&(Ee=5*Se+"px,"+2*Se+"px,"+Se+"px,"+2*Se+"px"),Ee};function o(Ee,xe,Se){var Ue=xe.fillpattern,He=Ue&&h.getPatternAttr(Ue.shape,0,"");if(He){var Fe=h.getPatternAttr(Ue.bgcolor,0,null),Ge=h.getPatternAttr(Ue.fgcolor,0,null),nt=Ue.fgopacity,qe=h.getPatternAttr(Ue.size,0,8),$e=h.getPatternAttr(Ue.solidity,0,.3),et=xe.uid;h.pattern(Ee,"point",Se,et,He,qe,$e,void 0,Ue.fillmode,Fe,Ge,nt)}else xe.fillcolor&&Ee.call(p.fill,xe.fillcolor)}h.singleFillStyle=function(Ee,xe){var Se=m.select(Ee.node()),Ue=Se.data(),He=((Ue[0]||[])[0]||{}).trace||{};o(Ee,He,xe)},h.fillGroupStyle=function(Ee,xe){Ee.style("stroke-width",0).each(function(Se){var Ue=m.select(this);Se[0].trace&&o(Ue,Se[0].trace,xe)})};var d=e(90998);h.symbolNames=[],h.symbolFuncs=[],h.symbolBackOffs=[],h.symbolNeedLines={},h.symbolNoDot={},h.symbolNoFill={},h.symbolList=[],Object.keys(d).forEach(function(Ee){var xe=d[Ee],Se=xe.n;h.symbolList.push(Se,String(Se),Ee,Se+100,String(Se+100),Ee+"-open"),h.symbolNames[Se]=Ee,h.symbolFuncs[Se]=xe.f,h.symbolBackOffs[Se]=xe.backoff||0,xe.needLine&&(h.symbolNeedLines[Se]=!0),xe.noDot?h.symbolNoDot[Se]=!0:h.symbolList.push(Se+200,String(Se+200),Ee+"-dot",Se+300,String(Se+300),Ee+"-open-dot"),xe.noFill&&(h.symbolNoFill[Se]=!0)});var M=h.symbolNames.length,T="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";h.symbolNumber=function(Ee){if(L(Ee))Ee=+Ee;else if(typeof Ee=="string"){var xe=0;Ee.indexOf("-open")>0&&(xe=100,Ee=Ee.replace("-open","")),Ee.indexOf("-dot")>0&&(xe+=200,Ee=Ee.replace("-dot","")),Ee=h.symbolNames.indexOf(Ee),Ee>=0&&(Ee+=xe)}return Ee%100>=M||Ee>=400?0:Math.floor(Math.max(Ee,0))};function C(Ee,xe,Se,Ue){var He=Ee%100;return h.symbolFuncs[He](xe,Se,Ue)+(Ee>=200?T:"")}var x={x1:1,x2:0,y1:0,y2:0},S={x1:0,x2:0,y1:1,y2:0},b=i("~f"),a={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:x},horizontalreversed:{node:"linearGradient",attrs:x,reversed:!0},vertical:{node:"linearGradient",attrs:S},verticalreversed:{node:"linearGradient",attrs:S,reversed:!0}};h.gradient=function(Ee,xe,Se,Ue,He,Fe){for(var Ge=He.length,nt=a[Ue],qe=new Array(Ge),$e=0;$e=0&&Ee.i===void 0&&(Ee.i=Fe.i),xe.style("opacity",Ue.selectedOpacityFn?Ue.selectedOpacityFn(Ee):Ee.mo===void 0?Ge.opacity:Ee.mo),Ue.ms2mrc){var qe;Ee.ms==="various"||Ge.size==="various"?qe=3:qe=Ue.ms2mrc(Ee.ms),Ee.mrc=qe,Ue.selectedSizeFn&&(qe=Ee.mrc=Ue.selectedSizeFn(Ee));var $e=h.symbolNumber(Ee.mx||Ge.symbol)||0;Ee.om=$e%200>=100;var et=Ne(Ee,Se),ct=ee(Ee,Se);xe.attr("d",C($e,qe,et,ct))}var dt=!1,pt,At,Mt;if(Ee.so)Mt=nt.outlierwidth,At=nt.outliercolor,pt=Ge.outliercolor;else{var Vt=(nt||{}).width;Mt=(Ee.mlw+1||Vt+1||(Ee.trace?(Ee.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in Ee?At=Ee.mlcc=Ue.lineScale(Ee.mlc):P.isArrayOrTypedArray(nt.color)?At=p.defaultLine:At=nt.color,P.isArrayOrTypedArray(Ge.color)&&(pt=p.defaultLine,dt=!0),"mc"in Ee?pt=Ee.mcc=Ue.markerScale(Ee.mc):pt=Ge.color||Ge.colors||"rgba(0,0,0,0)",Ue.selectedColorFn&&(pt=Ue.selectedColorFn(Ee))}if(Ee.om)xe.call(p.stroke,pt).style({"stroke-width":(Mt||1)+"px",fill:"none"});else{xe.style("stroke-width",(Ee.isBlank?0:Mt)+"px");var Je=Ge.gradient,De=Ee.mgt;De?dt=!0:De=Je&&Je.type,P.isArrayOrTypedArray(De)&&(De=De[0],a[De]||(De=0));var Ie=Ge.pattern,ze=Ie&&h.getPatternAttr(Ie.shape,Ee.i,"");if(De&&De!=="none"){var Pe=Ee.mgc;Pe?dt=!0:Pe=Je.color;var be=Se.uid;dt&&(be+="-"+Ee.i),h.gradient(xe,He,be,De,[[0,Pe],[1,pt]],"fill")}else if(ze){var se=!1,ye=Ie.fgcolor;!ye&&Fe&&Fe.color&&(ye=Fe.color,se=!0);var Le=h.getPatternAttr(ye,Ee.i,Fe&&Fe.color||null),Be=h.getPatternAttr(Ie.bgcolor,Ee.i,null),ot=Ie.fgopacity,at=h.getPatternAttr(Ie.size,Ee.i,8),wt=h.getPatternAttr(Ie.solidity,Ee.i,.3);se=se||Ee.mcc||P.isArrayOrTypedArray(Ie.shape)||P.isArrayOrTypedArray(Ie.bgcolor)||P.isArrayOrTypedArray(Ie.fgcolor)||P.isArrayOrTypedArray(Ie.size)||P.isArrayOrTypedArray(Ie.solidity);var It=Se.uid;se&&(It+="-"+Ee.i),h.pattern(xe,"point",He,It,ze,at,wt,Ee.mcc,Ie.fillmode,Be,Le,ot)}else P.isArrayOrTypedArray(pt)?p.fill(xe,pt[Ee.i]):p.fill(xe,pt);Mt&&p.stroke(xe,At)}},h.makePointStyleFns=function(Ee){var xe={},Se=Ee.marker;return xe.markerScale=h.tryColorscale(Se,""),xe.lineScale=h.tryColorscale(Se,"line"),v.traceIs(Ee,"symbols")&&(xe.ms2mrc=g.isBubble(Ee)?f(Ee):function(){return(Se.size||6)/2}),Ee.selectedpoints&&P.extendFlat(xe,h.makeSelectedPointStyleFns(Ee)),xe},h.makeSelectedPointStyleFns=function(Ee){var xe={},Se=Ee.selected||{},Ue=Ee.unselected||{},He=Ee.marker||{},Fe=Se.marker||{},Ge=Ue.marker||{},nt=He.opacity,qe=Fe.opacity,$e=Ge.opacity,et=qe!==void 0,ct=$e!==void 0;(P.isArrayOrTypedArray(nt)||et||ct)&&(xe.selectedOpacityFn=function(ze){var Pe=ze.mo===void 0?He.opacity:ze.mo;return ze.selected?et?qe:Pe:ct?$e:u*Pe});var dt=He.color,pt=Fe.color,At=Ge.color;(pt||At)&&(xe.selectedColorFn=function(ze){var Pe=ze.mcc||dt;return ze.selected?pt||Pe:At||Pe});var Mt=He.size,Vt=Fe.size,Je=Ge.size,De=Vt!==void 0,Ie=Je!==void 0;return v.traceIs(Ee,"symbols")&&(De||Ie)&&(xe.selectedSizeFn=function(ze){var Pe=ze.mrc||Mt/2;return ze.selected?De?Vt/2:Pe:Ie?Je/2:Pe}),xe},h.makeSelectedTextStyleFns=function(Ee){var xe={},Se=Ee.selected||{},Ue=Ee.unselected||{},He=Ee.textfont||{},Fe=Se.textfont||{},Ge=Ue.textfont||{},nt=He.color,qe=Fe.color,$e=Ge.color;return xe.selectedTextColorFn=function(et){var ct=et.tc||nt;return et.selected?qe||ct:$e||(qe?ct:p.addOpacity(ct,u))},xe},h.selectedPointStyle=function(Ee,xe){if(!(!Ee.size()||!xe.selectedpoints)){var Se=h.makeSelectedPointStyleFns(xe),Ue=xe.marker||{},He=[];Se.selectedOpacityFn&&He.push(function(Fe,Ge){Fe.style("opacity",Se.selectedOpacityFn(Ge))}),Se.selectedColorFn&&He.push(function(Fe,Ge){p.fill(Fe,Se.selectedColorFn(Ge))}),Se.selectedSizeFn&&He.push(function(Fe,Ge){var nt=Ge.mx||Ue.symbol||0,qe=Se.selectedSizeFn(Ge);Fe.attr("d",C(h.symbolNumber(nt),qe,Ne(Ge,xe),ee(Ge,xe))),Ge.mrc2=qe}),He.length&&Ee.each(function(Fe){for(var Ge=m.select(this),nt=0;nt0?Se:0}h.textPointStyle=function(Ee,xe,Se){if(Ee.size()){var Ue;if(xe.selectedpoints){var He=h.makeSelectedTextStyleFns(xe);Ue=He.selectedTextColorFn}var Fe=xe.texttemplate,Ge=Se._fullLayout;Ee.each(function(nt){var qe=m.select(this),$e=Fe?P.extractOption(nt,xe,"txt","texttemplate"):P.extractOption(nt,xe,"tx","text");if(!$e&&$e!==0){qe.remove();return}if(Fe){var et=xe._module.formatLabels,ct=et?et(nt,xe,Ge):{},dt={};w(dt,xe,nt.i);var pt=xe._meta||{};$e=P.texttemplateString($e,ct,Ge._d3locale,dt,nt,pt)}var At=nt.tp||xe.textposition,Mt=z(nt,xe),Vt=Ue?Ue(nt):nt.tc||xe.textfont.color;qe.call(h.font,nt.tf||xe.textfont.family,Mt,Vt).text($e).call(s.convertToTspans,Se).call(y,At,Mt,nt.mrc)})}},h.selectedTextStyle=function(Ee,xe){if(!(!Ee.size()||!xe.selectedpoints)){var Se=h.makeSelectedTextStyleFns(xe);Ee.each(function(Ue){var He=m.select(this),Fe=Se.selectedTextColorFn(Ue),Ge=Ue.tp||xe.textposition,nt=z(Ue,xe);p.fill(He,Fe);var qe=v.traceIs(xe,"bar-like");y(He,Ge,nt,Ue.mrc2||Ue.mrc,qe)})}};var I=.5;h.smoothopen=function(Ee,xe){if(Ee.length<3)return"M"+Ee.join("L");var Se="M"+Ee[0],Ue=[],He;for(He=1;He=qe||ze>=et&&ze<=qe)&&(Pe<=ct&&Pe>=$e||Pe>=ct&&Pe<=$e)&&(Ee=[ze,Pe])}return Ee}h.applyBackoff=te,h.makeTester=function(){var Ee=P.ensureSingleById(m.select("body"),"svg","js-plotly-tester",function(Se){Se.attr(n.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),xe=P.ensureSingle(Ee,"path","js-reference-point",function(Se){Se.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});h.tester=Ee,h.testref=xe},h.savedBBoxes={};var ae=0,ce=1e4;h.bBox=function(Ee,xe,Se){Se||(Se=Q(Ee));var Ue;if(Se){if(Ue=h.savedBBoxes[Se],Ue)return P.extendFlat({},Ue)}else if(Ee.childNodes.length===1){var He=Ee.childNodes[0];if(Se=Q(He),Se){var Fe=+He.getAttribute("x")||0,Ge=+He.getAttribute("y")||0,nt=He.getAttribute("transform");if(!nt){var qe=h.bBox(He,!1,Se);return Fe&&(qe.left+=Fe,qe.right+=Fe),Ge&&(qe.top+=Ge,qe.bottom+=Ge),qe}if(Se+="~"+Fe+"~"+Ge+"~"+nt,Ue=h.savedBBoxes[Se],Ue)return P.extendFlat({},Ue)}}var $e,et;xe?$e=Ee:(et=h.tester.node(),$e=Ee.cloneNode(!0),et.appendChild($e)),m.select($e).attr("transform",null).call(s.positionText,0,0);var ct=$e.getBoundingClientRect(),dt=h.testref.node().getBoundingClientRect();xe||et.removeChild($e);var pt={height:ct.height,width:ct.width,left:ct.left-dt.left,top:ct.top-dt.top,right:ct.right-dt.left,bottom:ct.bottom-dt.top};return ae>=ce&&(h.savedBBoxes={},ae=0),Se&&(h.savedBBoxes[Se]=pt),ae++,P.extendFlat({},pt)};function Q(Ee){var xe=Ee.getAttribute("data-unformatted");if(xe!==null)return xe+Ee.getAttribute("data-math")+Ee.getAttribute("text-anchor")+Ee.getAttribute("style")}h.setClipUrl=function(Ee,xe,Se){Ee.attr("clip-path",Z(xe,Se))};function Z(Ee,xe){if(!Ee)return null;var Se=xe._context,Ue=Se._exportedPlot?"":Se._baseUrl||"";return Ue?"url('"+Ue+"#"+Ee+"')":"url(#"+Ee+")"}h.getTranslate=function(Ee){var xe=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,Se=Ee.attr?"attr":"getAttribute",Ue=Ee[Se]("transform")||"",He=Ue.replace(xe,function(Fe,Ge,nt){return[Ge,nt].join(" ")}).split(" ");return{x:+He[0]||0,y:+He[1]||0}},h.setTranslate=function(Ee,xe,Se){var Ue=/(\btranslate\(.*?\);?)/,He=Ee.attr?"attr":"getAttribute",Fe=Ee.attr?"attr":"setAttribute",Ge=Ee[He]("transform")||"";return xe=xe||0,Se=Se||0,Ge=Ge.replace(Ue,"").trim(),Ge+=r(xe,Se),Ge=Ge.trim(),Ee[Fe]("transform",Ge),Ge},h.getScale=function(Ee){var xe=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,Se=Ee.attr?"attr":"getAttribute",Ue=Ee[Se]("transform")||"",He=Ue.replace(xe,function(Fe,Ge,nt){return[Ge,nt].join(" ")}).split(" ");return{x:+He[0]||1,y:+He[1]||1}},h.setScale=function(Ee,xe,Se){var Ue=/(\bscale\(.*?\);?)/,He=Ee.attr?"attr":"getAttribute",Fe=Ee.attr?"attr":"setAttribute",Ge=Ee[He]("transform")||"";return xe=xe||1,Se=Se||1,Ge=Ge.replace(Ue,"").trim(),Ge+="scale("+xe+","+Se+")",Ge=Ge.trim(),Ee[Fe]("transform",Ge),Ge};var j=/\s*sc.*/;h.setPointGroupScale=function(Ee,xe,Se){if(xe=xe||1,Se=Se||1,!!Ee){var Ue=xe===1&&Se===1?"":"scale("+xe+","+Se+")";Ee.each(function(){var He=(this.getAttribute("transform")||"").replace(j,"");He+=Ue,He=He.trim(),this.setAttribute("transform",He)})}};var K=/translate\([^)]*\)\s*$/;h.setTextPointsScale=function(Ee,xe,Se){Ee&&Ee.each(function(){var Ue,He=m.select(this),Fe=He.select("text");if(Fe.node()){var Ge=parseFloat(Fe.attr("x")||0),nt=parseFloat(Fe.attr("y")||0),qe=(He.attr("transform")||"").match(K);xe===1&&Se===1?Ue=[]:Ue=[r(Ge,nt),"scale("+xe+","+Se+")",r(-Ge,-nt)],qe&&Ue.push(qe),He.attr("transform",Ue.join(""))}})};function ee(Ee,xe){var Se;return Ee&&(Se=Ee.mf),Se===void 0&&(Se=xe.marker&&xe.marker.standoff||0),!xe._geo&&!xe._xA?-Se:Se}h.getMarkerStandoff=ee;var oe=Math.atan2,q=Math.cos,$=Math.sin;function le(Ee,xe){var Se=xe[0],Ue=xe[1];return[Se*q(Ee)-Ue*$(Ee),Se*$(Ee)+Ue*q(Ee)]}var ie,he,me,Me,Te,Oe;function Ne(Ee,xe){var Se=Ee.ma;Se===void 0&&(Se=xe.marker.angle||0);var Ue,He,Fe=xe.marker.angleref;if(Fe==="previous"||Fe==="north"){if(xe._geo){var Ge=xe._geo.project(Ee.lonlat);Ue=Ge[0],He=Ge[1]}else{var nt=xe._xA,qe=xe._yA;if(nt&&qe)Ue=nt.c2p(Ee.x),He=qe.c2p(Ee.y);else return 90}if(xe._geo){var $e=Ee.lonlat[0],et=Ee.lonlat[1],ct=xe._geo.project([$e,et+1e-5]),dt=xe._geo.project([$e+1e-5,et]),pt=oe(dt[1]-He,dt[0]-Ue),At=oe(ct[1]-He,ct[0]-Ue),Mt;if(Fe==="north")Mt=Se/180*Math.PI;else if(Fe==="previous"){var Vt=$e/180*Math.PI,Je=et/180*Math.PI,De=ie/180*Math.PI,Ie=he/180*Math.PI,ze=De-Vt,Pe=q(Ie)*$(ze),be=$(Ie)*q(Je)-q(Ie)*$(Je)*q(ze);Mt=-oe(Pe,be)-Math.PI,ie=$e,he=et}var se=le(pt,[q(Mt),0]),ye=le(At,[$(Mt),0]);Se=oe(se[1]+ye[1],se[0]+ye[0])/Math.PI*180,Fe==="previous"&&!(Oe===xe.uid&&Ee.i===Te+1)&&(Se=null)}if(Fe==="previous"&&!xe._geo)if(Oe===xe.uid&&Ee.i===Te+1&&L(Ue)&&L(He)){var Le=Ue-me,Be=He-Me,ot=xe.line&&xe.line.shape||"",at=ot.slice(ot.length-1);at==="h"&&(Be=0),at==="v"&&(Le=0),Se+=oe(Be,Le)/Math.PI*180+90}else Se=null}return me=Ue,Me=He,Te=Ee.i,Oe=xe.uid,Se}h.getMarkerAngle=Ne},90998:function(G,V,e){var m=e(95616),P=e(39898).round,i="M0,0Z",L=Math.sqrt(2),A=Math.sqrt(3),v=Math.PI,p=Math.cos,t=Math.sin;G.exports={circle:{n:0,f:function(g,f,w){if(r(f))return i;var h=P(g,2),o="M"+h+",0A"+h+","+h+" 0 1,1 0,-"+h+"A"+h+","+h+" 0 0,1 "+h+",0Z";return w?u(f,w,o):o}},square:{n:1,f:function(g,f,w){if(r(f))return i;var h=P(g,2);return u(f,w,"M"+h+","+h+"H-"+h+"V-"+h+"H"+h+"Z")}},diamond:{n:2,f:function(g,f,w){if(r(f))return i;var h=P(g*1.3,2);return u(f,w,"M"+h+",0L0,"+h+"L-"+h+",0L0,-"+h+"Z")}},cross:{n:3,f:function(g,f,w){if(r(f))return i;var h=P(g*.4,2),o=P(g*1.2,2);return u(f,w,"M"+o+","+h+"H"+h+"V"+o+"H-"+h+"V"+h+"H-"+o+"V-"+h+"H-"+h+"V-"+o+"H"+h+"V-"+h+"H"+o+"Z")}},x:{n:4,f:function(g,f,w){if(r(f))return i;var h=P(g*.8/L,2),o="l"+h+","+h,d="l"+h+",-"+h,M="l-"+h+",-"+h,T="l-"+h+","+h;return u(f,w,"M0,"+h+o+d+M+d+M+T+M+T+o+T+o+"Z")}},"triangle-up":{n:5,f:function(g,f,w){if(r(f))return i;var h=P(g*2/A,2),o=P(g/2,2),d=P(g,2);return u(f,w,"M-"+h+","+o+"H"+h+"L0,-"+d+"Z")}},"triangle-down":{n:6,f:function(g,f,w){if(r(f))return i;var h=P(g*2/A,2),o=P(g/2,2),d=P(g,2);return u(f,w,"M-"+h+",-"+o+"H"+h+"L0,"+d+"Z")}},"triangle-left":{n:7,f:function(g,f,w){if(r(f))return i;var h=P(g*2/A,2),o=P(g/2,2),d=P(g,2);return u(f,w,"M"+o+",-"+h+"V"+h+"L-"+d+",0Z")}},"triangle-right":{n:8,f:function(g,f,w){if(r(f))return i;var h=P(g*2/A,2),o=P(g/2,2),d=P(g,2);return u(f,w,"M-"+o+",-"+h+"V"+h+"L"+d+",0Z")}},"triangle-ne":{n:9,f:function(g,f,w){if(r(f))return i;var h=P(g*.6,2),o=P(g*1.2,2);return u(f,w,"M-"+o+",-"+h+"H"+h+"V"+o+"Z")}},"triangle-se":{n:10,f:function(g,f,w){if(r(f))return i;var h=P(g*.6,2),o=P(g*1.2,2);return u(f,w,"M"+h+",-"+o+"V"+h+"H-"+o+"Z")}},"triangle-sw":{n:11,f:function(g,f,w){if(r(f))return i;var h=P(g*.6,2),o=P(g*1.2,2);return u(f,w,"M"+o+","+h+"H-"+h+"V-"+o+"Z")}},"triangle-nw":{n:12,f:function(g,f,w){if(r(f))return i;var h=P(g*.6,2),o=P(g*1.2,2);return u(f,w,"M-"+h+","+o+"V-"+h+"H"+o+"Z")}},pentagon:{n:13,f:function(g,f,w){if(r(f))return i;var h=P(g*.951,2),o=P(g*.588,2),d=P(-g,2),M=P(g*-.309,2),T=P(g*.809,2);return u(f,w,"M"+h+","+M+"L"+o+","+T+"H-"+o+"L-"+h+","+M+"L0,"+d+"Z")}},hexagon:{n:14,f:function(g,f,w){if(r(f))return i;var h=P(g,2),o=P(g/2,2),d=P(g*A/2,2);return u(f,w,"M"+d+",-"+o+"V"+o+"L0,"+h+"L-"+d+","+o+"V-"+o+"L0,-"+h+"Z")}},hexagon2:{n:15,f:function(g,f,w){if(r(f))return i;var h=P(g,2),o=P(g/2,2),d=P(g*A/2,2);return u(f,w,"M-"+o+","+d+"H"+o+"L"+h+",0L"+o+",-"+d+"H-"+o+"L-"+h+",0Z")}},octagon:{n:16,f:function(g,f,w){if(r(f))return i;var h=P(g*.924,2),o=P(g*.383,2);return u(f,w,"M-"+o+",-"+h+"H"+o+"L"+h+",-"+o+"V"+o+"L"+o+","+h+"H-"+o+"L-"+h+","+o+"V-"+o+"Z")}},star:{n:17,f:function(g,f,w){if(r(f))return i;var h=g*1.4,o=P(h*.225,2),d=P(h*.951,2),M=P(h*.363,2),T=P(h*.588,2),C=P(-h,2),x=P(h*-.309,2),S=P(h*.118,2),b=P(h*.809,2),a=P(h*.382,2);return u(f,w,"M"+o+","+x+"H"+d+"L"+M+","+S+"L"+T+","+b+"L0,"+a+"L-"+T+","+b+"L-"+M+","+S+"L-"+d+","+x+"H-"+o+"L0,"+C+"Z")}},hexagram:{n:18,f:function(g,f,w){if(r(f))return i;var h=P(g*.66,2),o=P(g*.38,2),d=P(g*.76,2);return u(f,w,"M-"+d+",0l-"+o+",-"+h+"h"+d+"l"+o+",-"+h+"l"+o+","+h+"h"+d+"l-"+o+","+h+"l"+o+","+h+"h-"+d+"l-"+o+","+h+"l-"+o+",-"+h+"h-"+d+"Z")}},"star-triangle-up":{n:19,f:function(g,f,w){if(r(f))return i;var h=P(g*A*.8,2),o=P(g*.8,2),d=P(g*1.6,2),M=P(g*4,2),T="A "+M+","+M+" 0 0 1 ";return u(f,w,"M-"+h+","+o+T+h+","+o+T+"0,-"+d+T+"-"+h+","+o+"Z")}},"star-triangle-down":{n:20,f:function(g,f,w){if(r(f))return i;var h=P(g*A*.8,2),o=P(g*.8,2),d=P(g*1.6,2),M=P(g*4,2),T="A "+M+","+M+" 0 0 1 ";return u(f,w,"M"+h+",-"+o+T+"-"+h+",-"+o+T+"0,"+d+T+h+",-"+o+"Z")}},"star-square":{n:21,f:function(g,f,w){if(r(f))return i;var h=P(g*1.1,2),o=P(g*2,2),d="A "+o+","+o+" 0 0 1 ";return u(f,w,"M-"+h+",-"+h+d+"-"+h+","+h+d+h+","+h+d+h+",-"+h+d+"-"+h+",-"+h+"Z")}},"star-diamond":{n:22,f:function(g,f,w){if(r(f))return i;var h=P(g*1.4,2),o=P(g*1.9,2),d="A "+o+","+o+" 0 0 1 ";return u(f,w,"M-"+h+",0"+d+"0,"+h+d+h+",0"+d+"0,-"+h+d+"-"+h+",0Z")}},"diamond-tall":{n:23,f:function(g,f,w){if(r(f))return i;var h=P(g*.7,2),o=P(g*1.4,2);return u(f,w,"M0,"+o+"L"+h+",0L0,-"+o+"L-"+h+",0Z")}},"diamond-wide":{n:24,f:function(g,f,w){if(r(f))return i;var h=P(g*1.4,2),o=P(g*.7,2);return u(f,w,"M0,"+o+"L"+h+",0L0,-"+o+"L-"+h+",0Z")}},hourglass:{n:25,f:function(g,f,w){if(r(f))return i;var h=P(g,2);return u(f,w,"M"+h+","+h+"H-"+h+"L"+h+",-"+h+"H-"+h+"Z")},noDot:!0},bowtie:{n:26,f:function(g,f,w){if(r(f))return i;var h=P(g,2);return u(f,w,"M"+h+","+h+"V-"+h+"L-"+h+","+h+"V-"+h+"Z")},noDot:!0},"circle-cross":{n:27,f:function(g,f,w){if(r(f))return i;var h=P(g,2);return u(f,w,"M0,"+h+"V-"+h+"M"+h+",0H-"+h+"M"+h+",0A"+h+","+h+" 0 1,1 0,-"+h+"A"+h+","+h+" 0 0,1 "+h+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(g,f,w){if(r(f))return i;var h=P(g,2),o=P(g/L,2);return u(f,w,"M"+o+","+o+"L-"+o+",-"+o+"M"+o+",-"+o+"L-"+o+","+o+"M"+h+",0A"+h+","+h+" 0 1,1 0,-"+h+"A"+h+","+h+" 0 0,1 "+h+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(g,f,w){if(r(f))return i;var h=P(g,2);return u(f,w,"M0,"+h+"V-"+h+"M"+h+",0H-"+h+"M"+h+","+h+"H-"+h+"V-"+h+"H"+h+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(g,f,w){if(r(f))return i;var h=P(g,2);return u(f,w,"M"+h+","+h+"L-"+h+",-"+h+"M"+h+",-"+h+"L-"+h+","+h+"M"+h+","+h+"H-"+h+"V-"+h+"H"+h+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(g,f,w){if(r(f))return i;var h=P(g*1.3,2);return u(f,w,"M"+h+",0L0,"+h+"L-"+h+",0L0,-"+h+"ZM0,-"+h+"V"+h+"M-"+h+",0H"+h)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(g,f,w){if(r(f))return i;var h=P(g*1.3,2),o=P(g*.65,2);return u(f,w,"M"+h+",0L0,"+h+"L-"+h+",0L0,-"+h+"ZM-"+o+",-"+o+"L"+o+","+o+"M-"+o+","+o+"L"+o+",-"+o)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(g,f,w){if(r(f))return i;var h=P(g*1.4,2);return u(f,w,"M0,"+h+"V-"+h+"M"+h+",0H-"+h)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(g,f,w){if(r(f))return i;var h=P(g,2);return u(f,w,"M"+h+","+h+"L-"+h+",-"+h+"M"+h+",-"+h+"L-"+h+","+h)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(g,f,w){if(r(f))return i;var h=P(g*1.2,2),o=P(g*.85,2);return u(f,w,"M0,"+h+"V-"+h+"M"+h+",0H-"+h+"M"+o+","+o+"L-"+o+",-"+o+"M"+o+",-"+o+"L-"+o+","+o)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(g,f,w){if(r(f))return i;var h=P(g/2,2),o=P(g,2);return u(f,w,"M"+h+","+o+"V-"+o+"M"+(h-o)+",-"+o+"V"+o+"M"+o+","+h+"H-"+o+"M-"+o+","+(h-o)+"H"+o)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(g,f,w){if(r(f))return i;var h=P(g*1.2,2),o=P(g*1.6,2),d=P(g*.8,2);return u(f,w,"M-"+h+","+d+"L0,0M"+h+","+d+"L0,0M0,-"+o+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(g,f,w){if(r(f))return i;var h=P(g*1.2,2),o=P(g*1.6,2),d=P(g*.8,2);return u(f,w,"M-"+h+",-"+d+"L0,0M"+h+",-"+d+"L0,0M0,"+o+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(g,f,w){if(r(f))return i;var h=P(g*1.2,2),o=P(g*1.6,2),d=P(g*.8,2);return u(f,w,"M"+d+","+h+"L0,0M"+d+",-"+h+"L0,0M-"+o+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(g,f,w){if(r(f))return i;var h=P(g*1.2,2),o=P(g*1.6,2),d=P(g*.8,2);return u(f,w,"M-"+d+","+h+"L0,0M-"+d+",-"+h+"L0,0M"+o+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(g,f,w){if(r(f))return i;var h=P(g*1.4,2);return u(f,w,"M"+h+",0H-"+h)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(g,f,w){if(r(f))return i;var h=P(g*1.4,2);return u(f,w,"M0,"+h+"V-"+h)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(g,f,w){if(r(f))return i;var h=P(g,2);return u(f,w,"M"+h+",-"+h+"L-"+h+","+h)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(g,f,w){if(r(f))return i;var h=P(g,2);return u(f,w,"M"+h+","+h+"L-"+h+",-"+h)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(g,f,w){if(r(f))return i;var h=P(g,2),o=P(g*2,2);return u(f,w,"M0,0L-"+h+","+o+"H"+h+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(g,f,w){if(r(f))return i;var h=P(g,2),o=P(g*2,2);return u(f,w,"M0,0L-"+h+",-"+o+"H"+h+"Z")},noDot:!0},"arrow-left":{n:47,f:function(g,f,w){if(r(f))return i;var h=P(g*2,2),o=P(g,2);return u(f,w,"M0,0L"+h+",-"+o+"V"+o+"Z")},noDot:!0},"arrow-right":{n:48,f:function(g,f,w){if(r(f))return i;var h=P(g*2,2),o=P(g,2);return u(f,w,"M0,0L-"+h+",-"+o+"V"+o+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(g,f,w){if(r(f))return i;var h=P(g,2),o=P(g*2,2);return u(f,w,"M-"+h+",0H"+h+"M0,0L-"+h+","+o+"H"+h+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(g,f,w){if(r(f))return i;var h=P(g,2),o=P(g*2,2);return u(f,w,"M-"+h+",0H"+h+"M0,0L-"+h+",-"+o+"H"+h+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(g,f,w){if(r(f))return i;var h=P(g*2,2),o=P(g,2);return u(f,w,"M0,-"+o+"V"+o+"M0,0L"+h+",-"+o+"V"+o+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(g,f,w){if(r(f))return i;var h=P(g*2,2),o=P(g,2);return u(f,w,"M0,-"+o+"V"+o+"M0,0L-"+h+",-"+o+"V"+o+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(g,f,w){if(r(f))return i;var h=v/2.5,o=2*g*p(h),d=2*g*t(h);return u(f,w,"M0,0L"+-o+","+d+"L"+o+","+d+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(g,f,w){if(r(f))return i;var h=v/4,o=2*g*p(h),d=2*g*t(h);return u(f,w,"M0,0L"+-o+","+d+"A "+2*g+","+2*g+" 0 0 1 "+o+","+d+"Z")},backoff:.4,noDot:!0}};function r(g){return g===null}var s,n,l,c;function u(g,f,w){if((!g||g%360===0)&&!f)return w;if(l===g&&c===f&&s===w)return n;l=g,c=f,s=w;function h(I,B){var k=p(I),O=t(I),N=B[0],_=B[1]+(f||0);return[N*k-_*O,N*O+_*k]}for(var o=g/180*v,d=0,M=0,T=m(w),C="",x=0;x0,g=p._context.staticPlot;t.each(function(f){var w=f[0].trace,h=w.error_x||{},o=w.error_y||{},d;w.ids&&(d=function(x){return x.id});var M=L.hasMarkers(w)&&w.marker.maxdisplayed>0;!o.visible&&!h.visible&&(f=[]);var T=m.select(this).selectAll("g.errorbar").data(f,d);if(T.exit().remove(),!!f.length){h.visible||T.selectAll("path.xerror").remove(),o.visible||T.selectAll("path.yerror").remove(),T.style("opacity",1);var C=T.enter().append("g").classed("errorbar",!0);u&&C.style("opacity",0).transition().duration(s.duration).style("opacity",1),i.setClipUrl(T,r.layerClipId,p),T.each(function(x){var S=m.select(this),b=A(x,l,c);if(!(M&&!x.vis)){var a,E=S.select("path.yerror");if(o.visible&&P(b.x)&&P(b.yh)&&P(b.ys)){var y=o.width;a="M"+(b.x-y)+","+b.yh+"h"+2*y+"m-"+y+",0V"+b.ys,b.noYS||(a+="m-"+y+",0h"+2*y),n=!E.size(),n?E=S.append("path").style("vector-effect",g?"none":"non-scaling-stroke").classed("yerror",!0):u&&(E=E.transition().duration(s.duration).ease(s.easing)),E.attr("d",a)}else E.remove();var z=S.select("path.xerror");if(h.visible&&P(b.y)&&P(b.xh)&&P(b.xs)){var I=(h.copy_ystyle?o:h).width;a="M"+b.xh+","+(b.y-I)+"v"+2*I+"m0,-"+I+"H"+b.xs,b.noXS||(a+="m0,-"+I+"v"+2*I),n=!z.size(),n?z=S.append("path").style("vector-effect",g?"none":"non-scaling-stroke").classed("xerror",!0):u&&(z=z.transition().duration(s.duration).ease(s.easing)),z.attr("d",a)}else z.remove()}})}})};function A(v,p,t){var r={x:p.c2p(v.x),y:t.c2p(v.y)};return v.yh!==void 0&&(r.yh=t.c2p(v.yh),r.ys=t.c2p(v.ys),P(r.ys)||(r.noYS=!0,r.ys=t.c2p(v.ys,!0))),v.xh!==void 0&&(r.xh=p.c2p(v.xh),r.xs=p.c2p(v.xs),P(r.xs)||(r.noXS=!0,r.xs=p.c2p(v.xs,!0))),r}},62662:function(G,V,e){var m=e(39898),P=e(7901);G.exports=function(L){L.each(function(A){var v=A[0].trace,p=v.error_y||{},t=v.error_x||{},r=m.select(this);r.selectAll("path.yerror").style("stroke-width",p.thickness+"px").call(P.stroke,p.color),t.copy_ystyle&&(t=p),r.selectAll("path.xerror").style("stroke-width",t.thickness+"px").call(P.stroke,t.color)})}},77914:function(G,V,e){var m=e(41940),P=e(528).hoverlabel,i=e(1426).extendFlat;G.exports={hoverlabel:{bgcolor:i({},P.bgcolor,{arrayOk:!0}),bordercolor:i({},P.bordercolor,{arrayOk:!0}),font:m({arrayOk:!0,editType:"none"}),align:i({},P.align,{arrayOk:!0}),namelength:i({},P.namelength,{arrayOk:!0}),editType:"none"}}},30732:function(G,V,e){var m=e(71828),P=e(73972);G.exports=function(A){var v=A.calcdata,p=A._fullLayout;function t(c){return function(u){return m.coerceHoverinfo({hoverinfo:u},{_module:c._module},p)}}for(var r=0;r=0&&r.indexEe[0]._length||at<0||at>xe[0]._length)return l.unhoverRaw(ee,oe)}if(oe.pointerX=ot+Ee[0]._offset,oe.pointerY=at+xe[0]._offset,"xval"in oe?ct=g.flat(ie,oe.xval):ct=g.p2c(Ee,ot),"yval"in oe?dt=g.flat(ie,oe.yval):dt=g.p2c(xe,at),!P(ct[0])||!P(dt[0]))return L.warn("Fx.hover failed",oe,ee),l.unhoverRaw(ee,oe)}var Bt=1/0;function Gt(Ar,Or){for(At=0;Atse&&($e.splice(0,se),Bt=$e[0].distance),Te&&qe!==0&&$e.length===0){be.distance=qe,be.index=!1;var Tn=Vt._module.hoverPoints(be,ze,Pe,"closest",{hoverLayer:he._hoverlayer});if(Tn&&(Tn=Tn.filter(function(ea){return ea.spikeDistance<=qe})),Tn&&Tn.length){var Pn,jn=Tn.filter(function(ea){return ea.xa.showspikes&&ea.xa.spikesnap!=="hovered data"});if(jn.length){var qn=jn[0];P(qn.x0)&&P(qn.y0)&&(Pn=Kt(qn),(!ye.vLinePoint||ye.vLinePoint.spikeDistance>Pn.spikeDistance)&&(ye.vLinePoint=Pn))}var sa=Tn.filter(function(ea){return ea.ya.showspikes&&ea.ya.spikesnap!=="hovered data"});if(sa.length){var ta=sa[0];P(ta.x0)&&P(ta.y0)&&(Pn=Kt(ta),(!ye.hLinePoint||ye.hLinePoint.spikeDistance>Pn.spikeDistance)&&(ye.hLinePoint=Pn))}}}}}Gt();function Lt(Ar,Or,Nr){for(var qr=null,vn=1/0,fn,Tn=0;Tn0&&Math.abs(Ar.distance)St-1;Ye--)Er($e[Ye]);$e=$t,jt()}var We=ee._hoverdata,Dt=[],Ft=Z(ee),Zt=j(ee);for(pt=0;pt<$e.length;pt++){var nr=$e[pt],lr=g.makeEventData(nr,nr.trace,nr.cd);if(nr.hovertemplate!==!1){var rr=!1;nr.cd[nr.index]&&nr.cd[nr.index].ht&&(rr=nr.cd[nr.index].ht),nr.hovertemplate=rr||nr.trace.hovertemplate||!1}if(nr.xa&&nr.ya){var zt=nr.x0+nr.xa._offset,fr=nr.x1+nr.xa._offset,dr=nr.y0+nr.ya._offset,pr=nr.y1+nr.ya._offset,vr=Math.min(zt,fr),Hr=Math.max(zt,fr),Ir=Math.min(dr,pr),kr=Math.max(dr,pr);lr.bbox={x0:vr+Zt,x1:Hr+Zt,y0:Ir+Ft,y1:kr+Ft}}nr.eventData=[lr],Dt.push(lr)}ee._hoverdata=Dt;var pn=Ge==="y"&&(et.length>1||$e.length>1)||Ge==="closest"&&Le&&$e.length>1,jr=n.combine(he.plot_bgcolor||n.background,he.paper_bgcolor),In=I($e,{gd:ee,hovermode:Ge,rotateLabels:pn,bgColor:jr,container:he._hoverlayer,outerContainer:he._paper.node(),commonLabelOpts:he.hoverlabel,hoverdistance:he.hoverdistance}),Dn=In.hoverLabels;if(g.isUnifiedHover(Ge)||(k(Dn,pn,he,In.commonLabelBoundingBox),_(Dn,pn,he._invScaleX,he._invScaleY)),le&&le.tagName){var xr=u.getComponentMethod("annotations","hasClickToShow")(ee,Dt);r(m.select(le),xr?"pointer":"")}!le||$||!J(ee,oe,We)||(We&&ee.emit("plotly_unhover",{event:oe,points:We}),ee.emit("plotly_hover",{event:oe,points:ee._hoverdata,xaxes:Ee,yaxes:xe,xvals:ct,yvals:dt}))}function y(ee){return[ee.trace.index,ee.index,ee.x0,ee.y0,ee.name,ee.attr,ee.xa?ee.xa._id:"",ee.ya?ee.ya._id:""].join(",")}var z=/([\s\S]*)<\/extra>/;function I(ee,oe){var q=oe.gd,$=q._fullLayout,le=oe.hovermode,ie=oe.rotateLabels,he=oe.bgColor,me=oe.container,Me=oe.outerContainer,Te=oe.commonLabelOpts||{};if(ee.length===0)return[[]];var Oe=oe.fontFamily||f.HOVERFONT,Ne=oe.fontSize||f.HOVERFONTSIZE,Ee=ee[0],xe=Ee.xa,Se=Ee.ya,Ue=le.charAt(0),He=Ue+"Label",Fe=Ee[He];if(Fe===void 0&&xe.type==="multicategory")for(var Ge=0;Ge$.width-Zt?(We=$.width-Zt,_t.attr("d","M"+(Zt-x)+",0L"+Zt+","+Ft+x+"v"+Ft+(S*2+Ye.height)+"H-"+Zt+"V"+Ft+x+"H"+(Zt-x*2)+"Z")):_t.attr("d","M0,0L"+x+","+Ft+x+"H"+Zt+"v"+Ft+(S*2+Ye.height)+"H-"+Zt+"V"+Ft+x+"H-"+x+"Z"),Je.minX=We-Zt,Je.maxX=We+Zt,xe.side==="top"?(Je.minY=Dt-(S*2+Ye.height),Je.maxY=Dt-S):(Je.minY=Dt+S,Je.maxY=Dt+(S*2+Ye.height))}else{var nr,lr,rr;Se.side==="right"?(nr="start",lr=1,rr="",We=xe._offset+xe._length):(nr="end",lr=-1,rr="-",We=xe._offset),Dt=Se._offset+(Ee.y0+Ee.y1)/2,Ht.attr("text-anchor",nr),_t.attr("d","M0,0L"+rr+x+","+x+"V"+(S+Ye.height/2)+"h"+rr+(S*2+Ye.width)+"V-"+(S+Ye.height/2)+"H"+rr+x+"V-"+x+"Z"),Je.minY=Dt-(S+Ye.height/2),Je.maxY=Dt+(S+Ye.height/2),Se.side==="right"?(Je.minX=We+x,Je.maxX=We+x+(S*2+Ye.width)):(Je.minX=We-x-(S*2+Ye.width),Je.maxX=We-x);var zt=Ye.height/2,fr=qe-Ye.top-zt,dr="clip"+$._uid+"commonlabel"+Se._id,pr;if(We=0?xt=br:hr+Gt<$e&&hr>=0?xt=hr:ut+Gt<$e?xt=ut:br-ir=0?Tt=jt:Yt+Lt=0?Tt=Yt:lt+Lt=0,(St.idealAlign==="top"||!pn)&&jr?(fr-=pr/2,St.anchor="end"):pn?(fr+=pr/2,St.anchor="start"):St.anchor="middle",St.crossPos=fr;else{if(St.pos=fr,pn=zt+dr/2+kr<=$e,jr=zt-dr/2-kr>=0,(St.idealAlign==="left"||!pn)&&jr)zt-=dr/2,St.anchor="end";else if(pn)zt+=dr/2,St.anchor="start";else{St.anchor="middle";var In=kr/2,Dn=zt+In-$e,xr=zt-In;Dn>0&&(zt-=Dn),xr<0&&(zt+=-xr)}St.crossPos=zt}Ft.attr("text-anchor",St.anchor),nr&&Zt.attr("text-anchor",St.anchor),_t.attr("transform",A(zt,fr)+(ie?v(o):""))}),{hoverLabels:Ct,commonLabelBoundingBox:Je}}function B(ee,oe,q,$,le,ie){var he="",me="";ee.nameOverride!==void 0&&(ee.name=ee.nameOverride),ee.name&&(ee.trace._meta&&(ee.name=L.templateString(ee.name,ee.trace._meta)),he=ae(ee.name,ee.nameLength));var Me=q.charAt(0),Te=Me==="x"?"y":"x";ee.zLabel!==void 0?(ee.xLabel!==void 0&&(me+="x: "+ee.xLabel+"
"),ee.yLabel!==void 0&&(me+="y: "+ee.yLabel+"
"),ee.trace.type!=="choropleth"&&ee.trace.type!=="choroplethmapbox"&&(me+=(me?"z: ":"")+ee.zLabel)):oe&&ee[Me+"Label"]===le?me=ee[Te+"Label"]||"":ee.xLabel===void 0?ee.yLabel!==void 0&&ee.trace.type!=="scattercarpet"&&(me=ee.yLabel):ee.yLabel===void 0?me=ee.xLabel:me="("+ee.xLabel+", "+ee.yLabel+")",(ee.text||ee.text===0)&&!Array.isArray(ee.text)&&(me+=(me?"
":"")+ee.text),ee.extraText!==void 0&&(me+=(me?"
":"")+ee.extraText),ie&&me===""&&!ee.hovertemplate&&(he===""&&ie.remove(),me=he);var Oe=ee.hovertemplate||!1;if(Oe){var Ne=ee.hovertemplateLabels||ee;ee[Me+"Label"]!==le&&(Ne[Me+"other"]=Ne[Me+"Val"],Ne[Me+"otherLabel"]=Ne[Me+"Label"]),me=L.hovertemplateString(Oe,Ne,$._d3locale,ee.eventData[0]||{},ee.trace._meta),me=me.replace(z,function(Ee,xe){return he=ae(xe,ee.nameLength),""})}return[me,he]}function k(ee,oe,q,$){var le=oe?"xa":"ya",ie=oe?"ya":"xa",he=0,me=1,Me=ee.size(),Te=new Array(Me),Oe=0,Ne=$.minX,Ee=$.maxX,xe=$.minY,Se=$.maxY,Ue=function(ze){return ze*q._invScaleX},He=function(ze){return ze*q._invScaleY};ee.each(function(ze){var Pe=ze[le],be=ze[ie],se=Pe._id.charAt(0)==="x",ye=Pe.range;Oe===0&&ye&&ye[0]>ye[1]!==se&&(me=-1);var Le=0,Be=se?q.width:q.height;if(q.hovermode==="x"||q.hovermode==="y"){var ot=O(ze,oe),at=ze.anchor,wt=at==="end"?-1:1,It,Bt;if(at==="middle")It=ze.crossPos+(se?He(ot.y-ze.by/2):Ue(ze.bx/2+ze.tx2width/2)),Bt=It+(se?He(ze.by):Ue(ze.bx));else if(se)It=ze.crossPos+He(x+ot.y)-He(ze.by/2-x),Bt=It+He(ze.by);else{var Gt=Ue(wt*x+ot.x),Lt=Gt+Ue(wt*ze.bx);It=ze.crossPos+Math.min(Gt,Lt),Bt=ze.crossPos+Math.max(Gt,Lt)}se?xe!==void 0&&Se!==void 0&&Math.min(Bt,Se)-Math.max(It,xe)>1&&(be.side==="left"?(Le=be._mainLinePosition,Be=q.width):Be=be._mainLinePosition):Ne!==void 0&&Ee!==void 0&&Math.min(Bt,Ee)-Math.max(It,Ne)>1&&(be.side==="top"?(Le=be._mainLinePosition,Be=q.height):Be=be._mainLinePosition)}Te[Oe++]=[{datum:ze,traceIndex:ze.trace.index,dp:0,pos:ze.pos,posref:ze.posref,size:ze.by*(se?M:1)/2,pmin:Le,pmax:Be}]}),Te.sort(function(ze,Pe){return ze[0].posref-Pe[0].posref||me*(Pe[0].traceIndex-ze[0].traceIndex)});var Fe,Ge,nt,qe,$e,et,ct;function dt(ze){var Pe=ze[0],be=ze[ze.length-1];if(Ge=Pe.pmin-Pe.pos-Pe.dp+Pe.size,nt=be.pos+be.dp+be.size-Pe.pmax,Ge>.01){for($e=ze.length-1;$e>=0;$e--)ze[$e].dp+=Ge;Fe=!1}if(!(nt<.01)){if(Ge<-.01){for($e=ze.length-1;$e>=0;$e--)ze[$e].dp-=nt;Fe=!1}if(Fe){var se=0;for(qe=0;qePe.pmax&&se++;for(qe=ze.length-1;qe>=0&&!(se<=0);qe--)et=ze[qe],et.pos>Pe.pmax-1&&(et.del=!0,se--);for(qe=0;qe=0;$e--)ze[$e].dp-=nt;for(qe=ze.length-1;qe>=0&&!(se<=0);qe--)et=ze[qe],et.pos+et.dp+et.size>Pe.pmax&&(et.del=!0,se--)}}}for(;!Fe&&he<=Me;){for(he++,Fe=!0,qe=0;qe.01&&Mt.pmin===Vt.pmin&&Mt.pmax===Vt.pmax){for($e=At.length-1;$e>=0;$e--)At[$e].dp+=Ge;for(pt.push.apply(pt,At),Te.splice(qe+1,1),ct=0,$e=pt.length-1;$e>=0;$e--)ct+=pt[$e].dp;for(nt=ct/pt.length,$e=pt.length-1;$e>=0;$e--)pt[$e].dp-=nt;Fe=!1}else qe++}Te.forEach(dt)}for(qe=Te.length-1;qe>=0;qe--){var Je=Te[qe];for($e=Je.length-1;$e>=0;$e--){var De=Je[$e],Ie=De.datum;Ie.offset=De.dp,Ie.del=De.del}}}function O(ee,oe){var q=0,$=ee.offset;return oe&&($*=-C,q=ee.offset*T),{x:q,y:$}}function N(ee){var oe={start:1,end:-1,middle:0}[ee.anchor],q=oe*(x+S),$=q+oe*(ee.txwidth+S),le=ee.anchor==="middle";return le&&(q-=ee.tx2width/2,$+=ee.txwidth/2+S),{alignShift:oe,textShiftX:q,text2ShiftX:$}}function _(ee,oe,q,$){var le=function(he){return he*q},ie=function(he){return he*$};ee.each(function(he){var me=m.select(this);if(he.del)return me.remove();var Me=me.select("text.nums"),Te=he.anchor,Oe=Te==="end"?-1:1,Ne=N(he),Ee=O(he,oe),xe=Ee.x,Se=Ee.y,Ue=Te==="middle";me.select("path").attr("d",Ue?"M-"+le(he.bx/2+he.tx2width/2)+","+ie(Se-he.by/2)+"h"+le(he.bx)+"v"+ie(he.by)+"h-"+le(he.bx)+"Z":"M0,0L"+le(Oe*x+xe)+","+ie(x+Se)+"v"+ie(he.by/2-x)+"h"+le(Oe*he.bx)+"v-"+ie(he.by)+"H"+le(Oe*x+xe)+"V"+ie(Se-x)+"Z");var He=xe+Ne.textShiftX,Fe=Se+he.ty0-he.by/2+S,Ge=he.textAlign||"auto";Ge!=="auto"&&(Ge==="left"&&Te!=="start"?(Me.attr("text-anchor","start"),He=Ue?-he.bx/2-he.tx2width/2+S:-he.bx-S):Ge==="right"&&Te!=="end"&&(Me.attr("text-anchor","end"),He=Ue?he.bx/2-he.tx2width/2-S:he.bx+S)),Me.call(t.positionText,le(He),ie(Fe)),he.tx2width&&(me.select("text.name").call(t.positionText,le(Ne.text2ShiftX+Ne.alignShift*S+xe),ie(Se+he.ty0-he.by/2+S)),me.select("rect").call(s.setRect,le(Ne.text2ShiftX+(Ne.alignShift-1)*he.tx2width/2+xe),ie(Se-he.by/2-1),le(he.tx2width),ie(he.by+2)))})}function U(ee,oe){var q=ee.index,$=ee.trace||{},le=ee.cd[0],ie=ee.cd[q]||{};function he(Ee){return Ee||P(Ee)&&Ee===0}var me=Array.isArray(q)?function(Ee,xe){var Se=L.castOption(le,q,Ee);return he(Se)?Se:L.extractOption({},$,"",xe)}:function(Ee,xe){return L.extractOption(ie,$,Ee,xe)};function Me(Ee,xe,Se){var Ue=me(xe,Se);he(Ue)&&(ee[Ee]=Ue)}if(Me("hoverinfo","hi","hoverinfo"),Me("bgcolor","hbg","hoverlabel.bgcolor"),Me("borderColor","hbc","hoverlabel.bordercolor"),Me("fontFamily","htf","hoverlabel.font.family"),Me("fontSize","hts","hoverlabel.font.size"),Me("fontColor","htc","hoverlabel.font.color"),Me("nameLength","hnl","hoverlabel.namelength"),Me("textAlign","hta","hoverlabel.align"),ee.posref=oe==="y"||oe==="closest"&&$.orientation==="h"?ee.xa._offset+(ee.x0+ee.x1)/2:ee.ya._offset+(ee.y0+ee.y1)/2,ee.x0=L.constrain(ee.x0,0,ee.xa._length),ee.x1=L.constrain(ee.x1,0,ee.xa._length),ee.y0=L.constrain(ee.y0,0,ee.ya._length),ee.y1=L.constrain(ee.y1,0,ee.ya._length),ee.xLabelVal!==void 0&&(ee.xLabel="xLabel"in ee?ee.xLabel:c.hoverLabelText(ee.xa,ee.xLabelVal,$.xhoverformat),ee.xVal=ee.xa.c2d(ee.xLabelVal)),ee.yLabelVal!==void 0&&(ee.yLabel="yLabel"in ee?ee.yLabel:c.hoverLabelText(ee.ya,ee.yLabelVal,$.yhoverformat),ee.yVal=ee.ya.c2d(ee.yLabelVal)),ee.zLabelVal!==void 0&&ee.zLabel===void 0&&(ee.zLabel=String(ee.zLabelVal)),!isNaN(ee.xerr)&&!(ee.xa.type==="log"&&ee.xerr<=0)){var Te=c.tickText(ee.xa,ee.xa.c2l(ee.xerr),"hover").text;ee.xerrneg!==void 0?ee.xLabel+=" +"+Te+" / -"+c.tickText(ee.xa,ee.xa.c2l(ee.xerrneg),"hover").text:ee.xLabel+=" ± "+Te,oe==="x"&&(ee.distance+=1)}if(!isNaN(ee.yerr)&&!(ee.ya.type==="log"&&ee.yerr<=0)){var Oe=c.tickText(ee.ya,ee.ya.c2l(ee.yerr),"hover").text;ee.yerrneg!==void 0?ee.yLabel+=" +"+Oe+" / -"+c.tickText(ee.ya,ee.ya.c2l(ee.yerrneg),"hover").text:ee.yLabel+=" ± "+Oe,oe==="y"&&(ee.distance+=1)}var Ne=ee.hoverinfo||ee.trace.hoverinfo;return Ne&&Ne!=="all"&&(Ne=Array.isArray(Ne)?Ne:Ne.split("+"),Ne.indexOf("x")===-1&&(ee.xLabel=void 0),Ne.indexOf("y")===-1&&(ee.yLabel=void 0),Ne.indexOf("z")===-1&&(ee.zLabel=void 0),Ne.indexOf("text")===-1&&(ee.text=void 0),Ne.indexOf("name")===-1&&(ee.name=void 0)),ee}function Y(ee,oe,q){var $=q.container,le=q.fullLayout,ie=le._size,he=q.event,me=!!oe.hLinePoint,Me=!!oe.vLinePoint,Te,Oe;if($.selectAll(".spikeline").remove(),!!(Me||me)){var Ne=n.combine(le.plot_bgcolor,le.paper_bgcolor);if(me){var Ee=oe.hLinePoint,xe,Se;Te=Ee&&Ee.xa,Oe=Ee&&Ee.ya;var Ue=Oe.spikesnap;Ue==="cursor"?(xe=he.pointerX,Se=he.pointerY):(xe=Te._offset+Ee.x,Se=Oe._offset+Ee.y);var He=i.readability(Ee.color,Ne)<1.5?n.contrast(Ne):Ee.color,Fe=Oe.spikemode,Ge=Oe.spikethickness,nt=Oe.spikecolor||He,qe=c.getPxPosition(ee,Oe),$e,et;if(Fe.indexOf("toaxis")!==-1||Fe.indexOf("across")!==-1){if(Fe.indexOf("toaxis")!==-1&&($e=qe,et=xe),Fe.indexOf("across")!==-1){var ct=Oe._counterDomainMin,dt=Oe._counterDomainMax;Oe.anchor==="free"&&(ct=Math.min(ct,Oe.position),dt=Math.max(dt,Oe.position)),$e=ie.l+ct*ie.w,et=ie.l+dt*ie.w}$.insert("line",":first-child").attr({x1:$e,x2:et,y1:Se,y2:Se,"stroke-width":Ge,stroke:nt,"stroke-dasharray":s.dashStyle(Oe.spikedash,Ge)}).classed("spikeline",!0).classed("crisp",!0),$.insert("line",":first-child").attr({x1:$e,x2:et,y1:Se,y2:Se,"stroke-width":Ge+2,stroke:Ne}).classed("spikeline",!0).classed("crisp",!0)}Fe.indexOf("marker")!==-1&&$.insert("circle",":first-child").attr({cx:qe+(Oe.side!=="right"?Ge:-Ge),cy:Se,r:Ge,fill:nt}).classed("spikeline",!0)}if(Me){var pt=oe.vLinePoint,At,Mt;Te=pt&&pt.xa,Oe=pt&&pt.ya;var Vt=Te.spikesnap;Vt==="cursor"?(At=he.pointerX,Mt=he.pointerY):(At=Te._offset+pt.x,Mt=Oe._offset+pt.y);var Je=i.readability(pt.color,Ne)<1.5?n.contrast(Ne):pt.color,De=Te.spikemode,Ie=Te.spikethickness,ze=Te.spikecolor||Je,Pe=c.getPxPosition(ee,Te),be,se;if(De.indexOf("toaxis")!==-1||De.indexOf("across")!==-1){if(De.indexOf("toaxis")!==-1&&(be=Pe,se=Mt),De.indexOf("across")!==-1){var ye=Te._counterDomainMin,Le=Te._counterDomainMax;Te.anchor==="free"&&(ye=Math.min(ye,Te.position),Le=Math.max(Le,Te.position)),be=ie.t+(1-Le)*ie.h,se=ie.t+(1-ye)*ie.h}$.insert("line",":first-child").attr({x1:At,x2:At,y1:be,y2:se,"stroke-width":Ie,stroke:ze,"stroke-dasharray":s.dashStyle(Te.spikedash,Ie)}).classed("spikeline",!0).classed("crisp",!0),$.insert("line",":first-child").attr({x1:At,x2:At,y1:be,y2:se,"stroke-width":Ie+2,stroke:Ne}).classed("spikeline",!0).classed("crisp",!0)}De.indexOf("marker")!==-1&&$.insert("circle",":first-child").attr({cx:At,cy:Pe-(Te.side!=="top"?Ie:-Ie),r:Ie,fill:ze}).classed("spikeline",!0)}}}function J(ee,oe,q){if(!q||q.length!==ee._hoverdata.length)return!0;for(var $=q.length-1;$>=0;$--){var le=q[$],ie=ee._hoverdata[$];if(le.curveNumber!==ie.curveNumber||String(le.pointNumber)!==String(ie.pointNumber)||String(le.pointNumbers)!==String(ie.pointNumbers))return!0}return!1}function te(ee,oe){return!oe||oe.vLinePoint!==ee._spikepoints.vLinePoint||oe.hLinePoint!==ee._spikepoints.hLinePoint}function ae(ee,oe){return t.plainText(ee||"",{len:oe,allowedTags:["br","sub","sup","b","i","em"]})}function ce(ee,oe){for(var q=oe.charAt(0),$=[],le=[],ie=[],he=0;he1)){delete c.grid;return}if(!w&&!h&&!o){var a=x("pattern")==="independent";a&&(w=!0)}C._hasSubplotGrid=w;var E=x("roworder"),y=E==="top to bottom",z=w?.2:.1,I=w?.3:.1,B,k;d&&c._splomGridDflt&&(B=c._splomGridDflt.xside,k=c._splomGridDflt.yside),C._domains={x:r("x",x,z,B,b),y:r("y",x,I,k,S,y)}}function r(l,c,u,g,f,w){var h=c(l+"gap",u),o=c("domain."+l);c(l+"side",g);for(var d=new Array(f),M=o[0],T=(o[1]-M)/(f-h),C=T*(1-h),x=0;x(r==="legend"?1:0));if(y===!1&&(n[r]=void 0),!(y===!1&&!c.uirevision)&&(g("uirevision",n.uirevision),y!==!1)){g("borderwidth");var z=g("orientation"),I=g("yref"),B=g("xref"),k=z==="h",O=I==="paper",N=B==="paper",_,U,Y,J="left";k?(_=0,m.getComponentMethod("rangeslider","isVisible")(s.xaxis)?O?(U=1.1,Y="bottom"):(U=1,Y="top"):O?(U=-.1,Y="top"):(U=0,Y="bottom")):(U=1,Y="auto",N?_=1.02:(_=1,J="right")),P.coerce(c,u,{x:{valType:"number",editType:"legend",min:N?-2:0,max:N?3:1,dflt:_}},"x"),P.coerce(c,u,{y:{valType:"number",editType:"legend",min:O?-2:0,max:O?3:1,dflt:U}},"y"),g("traceorder",x),p.isGrouped(n[r])&&g("tracegroupgap"),g("entrywidth"),g("entrywidthmode"),g("itemsizing"),g("itemwidth"),g("itemclick"),g("itemdoubleclick"),g("groupclick"),g("xanchor",J),g("yanchor",Y),g("valign"),P.noneOrAll(c,u,["x","y"]);var te=g("title.text");if(te){g("title.side",k?"left":"top");var ae=P.extendFlat({},f,{size:P.bigFont(f.size)});P.coerceFont(g,"title.font",ae)}}}}G.exports=function(s,n,l){var c,u=l.slice(),g=n.shapes;if(g)for(c=0;c1)}var $=J.hiddenlabels||[];if(!Q&&(!J.showlegend||!Z.length))return ce.selectAll("."+te).remove(),J._topdefs.select("#"+ae).remove(),i.autoMargin(_,te);var le=P.ensureSingle(ce,"g",te,function(xe){Q||xe.attr("pointer-events","all")}),ie=P.ensureSingleById(J._topdefs,"clipPath",ae,function(xe){xe.append("rect")}),he=P.ensureSingle(le,"rect","bg",function(xe){xe.attr("shape-rendering","crispEdges")});he.call(t.stroke,Y.bordercolor).call(t.fill,Y.bgcolor).style("stroke-width",Y.borderwidth+"px");var me=P.ensureSingle(le,"g","scrollbox"),Me=Y.title;Y._titleWidth=0,Y._titleHeight=0;var Te;Me.text?(Te=P.ensureSingle(me,"text",te+"titletext"),Te.attr("text-anchor","start").call(p.font,Me.font).text(Me.text),E(Te,me,_,Y,o)):me.selectAll("."+te+"titletext").remove();var Oe=P.ensureSingle(le,"rect","scrollbar",function(xe){xe.attr(n.scrollBarEnterAttrs).call(t.fill,n.scrollBarColor)}),Ne=me.selectAll("g.groups").data(Z);Ne.enter().append("g").attr("class","groups"),Ne.exit().remove();var Ee=Ne.selectAll("g.traces").data(P.identity);Ee.enter().append("g").attr("class","traces"),Ee.exit().remove(),Ee.style("opacity",function(xe){var Se=xe[0].trace;return L.traceIs(Se,"pie-like")?$.indexOf(xe[0].label)!==-1?.5:1:Se.visible==="legendonly"?.5:1}).each(function(){m.select(this).call(S,_,Y)}).call(w,_,Y).each(function(){Q||m.select(this).call(a,_,te)}),P.syncOrAsync([i.previousPromises,function(){return I(_,Ne,Ee,Y)},function(){var xe=J._size,Se=Y.borderwidth,Ue=Y.xref==="paper",He=Y.yref==="paper";if(Me.text&&M(Te,Y,Se),!Q){var Fe,Ge;Ue?Fe=xe.l+xe.w*Y.x-u[k(Y)]*Y._width:Fe=J.width*Y.x-u[k(Y)]*Y._width,He?Ge=xe.t+xe.h*(1-Y.y)-u[O(Y)]*Y._effHeight:Ge=J.height*(1-Y.y)-u[O(Y)]*Y._effHeight;var nt=B(_,te,Fe,Ge);if(nt)return;if(J.margin.autoexpand){var qe=Fe,$e=Ge;Fe=Ue?P.constrain(Fe,0,J.width-Y._width):qe,Ge=He?P.constrain(Ge,0,J.height-Y._effHeight):$e,Fe!==qe&&P.log("Constrain "+te+".x to make legend fit inside graph"),Ge!==$e&&P.log("Constrain "+te+".y to make legend fit inside graph")}p.setTranslate(le,Fe,Ge)}if(Oe.on(".drag",null),le.on("wheel",null),Q||Y._height<=Y._maxHeight||_._context.staticPlot){var et=Y._effHeight;Q&&(et=Y._height),he.attr({width:Y._width-Se,height:et-Se,x:Se/2,y:Se/2}),p.setTranslate(me,0,0),ie.select("rect").attr({width:Y._width-2*Se,height:et-2*Se,x:Se,y:Se}),p.setClipUrl(me,ae,_),p.setRect(Oe,0,0,0,0),delete Y._scrollY}else{var ct=Math.max(n.scrollBarMinHeight,Y._effHeight*Y._effHeight/Y._height),dt=Y._effHeight-ct-2*n.scrollBarMargin,pt=Y._height-Y._effHeight,At=dt/pt,Mt=Math.min(Y._scrollY||0,pt);he.attr({width:Y._width-2*Se+n.scrollBarWidth+n.scrollBarMargin,height:Y._effHeight-Se,x:Se/2,y:Se/2}),ie.select("rect").attr({width:Y._width-2*Se+n.scrollBarWidth+n.scrollBarMargin,height:Y._effHeight-2*Se,x:Se,y:Se+Mt}),p.setClipUrl(me,ae,_),se(Mt,ct,At),le.on("wheel",function(){Mt=P.constrain(Y._scrollY+m.event.deltaY/dt*pt,0,pt),se(Mt,ct,At),Mt!==0&&Mt!==pt&&m.event.preventDefault()});var Vt,Je,De,Ie=function(at,wt,It){var Bt=(It-wt)/At+at;return P.constrain(Bt,0,pt)},ze=function(at,wt,It){var Bt=(wt-It)/At+at;return P.constrain(Bt,0,pt)},Pe=m.behavior.drag().on("dragstart",function(){var at=m.event.sourceEvent;at.type==="touchstart"?Vt=at.changedTouches[0].clientY:Vt=at.clientY,De=Mt}).on("drag",function(){var at=m.event.sourceEvent;at.buttons===2||at.ctrlKey||(at.type==="touchmove"?Je=at.changedTouches[0].clientY:Je=at.clientY,Mt=Ie(De,Vt,Je),se(Mt,ct,At))});Oe.call(Pe);var be=m.behavior.drag().on("dragstart",function(){var at=m.event.sourceEvent;at.type==="touchstart"&&(Vt=at.changedTouches[0].clientY,De=Mt)}).on("drag",function(){var at=m.event.sourceEvent;at.type==="touchmove"&&(Je=at.changedTouches[0].clientY,Mt=ze(De,Vt,Je),se(Mt,ct,At))});me.call(be)}function se(at,wt,It){Y._scrollY=_._fullLayout[te]._scrollY=at,p.setTranslate(me,0,-at),p.setRect(Oe,Y._width,n.scrollBarMargin+at*It,n.scrollBarWidth,wt),ie.select("rect").attr("y",Se+at)}if(_._context.edits.legendPosition){var ye,Le,Be,ot;le.classed("cursor-move",!0),v.init({element:le.node(),gd:_,prepFn:function(){var at=p.getTranslate(le);Be=at.x,ot=at.y},moveFn:function(at,wt){var It=Be+at,Bt=ot+wt;p.setTranslate(le,It,Bt),ye=v.align(It,Y._width,xe.l,xe.l+xe.w,Y.xanchor),Le=v.align(Bt+Y._height,-Y._height,xe.t+xe.h,xe.t,Y.yanchor)},doneFn:function(){if(ye!==void 0&&Le!==void 0){var at={};at[te+".x"]=ye,at[te+".y"]=Le,L.call("_guiRelayout",_,at)}},clickFn:function(at,wt){var It=ce.selectAll("g.traces").filter(function(){var Bt=this.getBoundingClientRect();return wt.clientX>=Bt.left&&wt.clientX<=Bt.right&&wt.clientY>=Bt.top&&wt.clientY<=Bt.bottom});It.size()>0&&x(_,le,It,at,wt)}})}}],_)}}function C(_,U,Y){var J=_[0],te=J.width,ae=U.entrywidthmode,ce=J.trace.legendwidth||U.entrywidth;return ae==="fraction"?U._maxWidth*ce:Y+(ce||te)}function x(_,U,Y,J,te){var ae=Y.data()[0][0].trace,ce={event:te,node:Y.node(),curveNumber:ae.index,expandedIndex:ae._expandedIndex,data:_.data,layout:_.layout,frames:_._transitionData._frames,config:_._context,fullData:_._fullData,fullLayout:_._fullLayout};ae._group&&(ce.group=ae._group),L.traceIs(ae,"pie-like")&&(ce.label=Y.datum()[0].label);var Q=A.triggerHandler(_,"plotly_legendclick",ce);if(J===1){if(Q===!1)return;U._clickTimeout=setTimeout(function(){_._fullLayout&&s(Y,_,J)},_._context.doubleClickDelay)}else if(J===2){U._clickTimeout&&clearTimeout(U._clickTimeout),_._legendMouseDownTime=0;var Z=A.triggerHandler(_,"plotly_legenddoubleclick",ce);Z!==!1&&Q!==!1&&s(Y,_,J)}}function S(_,U,Y){var J=N(Y),te=_.data()[0][0],ae=te.trace,ce=L.traceIs(ae,"pie-like"),Q=!Y._inHover&&U._context.edits.legendText&&!ce,Z=Y._maxNameLength,j,K;te.groupTitle?(j=te.groupTitle.text,K=te.groupTitle.font):(K=Y.font,Y.entries?j=te.text:(j=ce?te.label:ae.name,ae._meta&&(j=P.templateString(j,ae._meta))));var ee=P.ensureSingle(_,"text",J+"text");ee.attr("text-anchor","start").call(p.font,K).text(Q?b(j,Z):j);var oe=Y.itemwidth+n.itemGap*2;r.positionText(ee,oe,0),Q?ee.call(r.makeEditable,{gd:U,text:j}).call(E,_,U,Y).on("edit",function(q){this.text(b(q,Z)).call(E,_,U,Y);var $=te.trace._fullInput||{},le={};if(L.hasTransform($,"groupby")){var ie=L.getTransformIndices($,"groupby"),he=ie[ie.length-1],me=P.keyedContainer($,"transforms["+he+"].styles","target","value.name");me.set(te.trace._group,q),le=me.constructUpdate()}else le.name=q;return $._isShape?L.call("_guiRelayout",U,"shapes["+ae.index+"].name",le.name):L.call("_guiRestyle",U,le,ae.index)}):E(ee,_,U,Y)}function b(_,U){var Y=Math.max(4,U);if(_&&_.trim().length>=Y/2)return _;_=_||"";for(var J=Y-_.length;J>0;J--)_+=" ";return _}function a(_,U,Y){var J=U._context.doubleClickDelay,te,ae=1,ce=P.ensureSingle(_,"rect",Y+"toggle",function(Q){U._context.staticPlot||Q.style("cursor","pointer").attr("pointer-events","all"),Q.call(t.fill,"rgba(0,0,0,0)")});U._context.staticPlot||(ce.on("mousedown",function(){te=new Date().getTime(),te-U._legendMouseDownTimeJ&&(ae=Math.max(ae-1,1)),x(U,Q,_,ae,m.event)}}))}function E(_,U,Y,J,te){J._inHover&&_.attr("data-notex",!0),r.convertToTspans(_,Y,function(){y(U,Y,J,te)})}function y(_,U,Y,J){var te=_.data()[0][0];if(!Y._inHover&&te&&!te.trace.showlegend){_.remove();return}var ae=_.select("g[class*=math-group]"),ce=ae.node(),Q=N(Y);Y||(Y=U._fullLayout[Q]);var Z=Y.borderwidth,j;J===o?j=Y.title.font:te.groupTitle?j=te.groupTitle.font:j=Y.font;var K=j.size*c,ee,oe;if(ce){var q=p.bBox(ce);ee=q.height,oe=q.width,J===o?p.setTranslate(ae,Z,Z+ee*.75):p.setTranslate(ae,0,ee*.25)}else{var $="."+Q+(J===o?"title":"")+"text",le=_.select($),ie=r.lineCount(le),he=le.node();if(ee=K*ie,oe=he?p.bBox(he).width:0,J===o)Y.title.side==="left"&&(oe+=n.itemGap*2),r.positionText(le,Z+n.titlePad,Z+K);else{var me=n.itemGap*2+Y.itemwidth;te.groupTitle&&(me=n.itemGap,oe-=Y.itemwidth),r.positionText(le,me,-K*((ie-1)/2-.3))}}J===o?(Y._titleWidth=oe,Y._titleHeight=ee):(te.lineHeight=K,te.height=Math.max(ee,16)+3,te.width=oe)}function z(_){var U=0,Y=0,J=_.title.side;return J&&(J.indexOf("left")!==-1&&(U=_._titleWidth),J.indexOf("top")!==-1&&(Y=_._titleHeight)),[U,Y]}function I(_,U,Y,J){var te=_._fullLayout,ae=N(J);J||(J=te[ae]);var ce=te._size,Q=h.isVertical(J),Z=h.isGrouped(J),j=J.entrywidthmode==="fraction",K=J.borderwidth,ee=2*K,oe=n.itemGap,q=J.itemwidth+oe*2,$=2*(K+oe),le=O(J),ie=J.y<0||J.y===0&&le==="top",he=J.y>1||J.y===1&&le==="bottom",me=J.tracegroupgap,Me={};J._maxHeight=Math.max(ie||he?te.height/2:ce.h,30);var Te=0;J._width=0,J._height=0;var Oe=z(J);if(Q)Y.each(function(De){var Ie=De[0].height;p.setTranslate(this,K+Oe[0],K+Oe[1]+J._height+Ie/2+oe),J._height+=Ie,J._width=Math.max(J._width,De[0].width)}),Te=q+J._width,J._width+=oe+q+ee,J._height+=$,Z&&(U.each(function(De,Ie){p.setTranslate(this,0,Ie*J.tracegroupgap)}),J._height+=(J._lgroupsLength-1)*J.tracegroupgap);else{var Ne=k(J),Ee=J.x<0||J.x===0&&Ne==="right",xe=J.x>1||J.x===1&&Ne==="left",Se=he||ie,Ue=te.width/2;J._maxWidth=Math.max(Ee?Se&&Ne==="left"?ce.l+ce.w:Ue:xe?Se&&Ne==="right"?ce.r+ce.w:Ue:ce.w,2*q);var He=0,Fe=0;Y.each(function(De){var Ie=C(De,J,q);He=Math.max(He,Ie),Fe+=Ie}),Te=null;var Ge=0;if(Z){var nt=0,qe=0,$e=0;U.each(function(){var De=0,Ie=0;m.select(this).selectAll("g.traces").each(function(Pe){var be=C(Pe,J,q),se=Pe[0].height;p.setTranslate(this,Oe[0],Oe[1]+K+oe+se/2+Ie),Ie+=se,De=Math.max(De,be),Me[Pe[0].trace.legendgroup]=De});var ze=De+oe;qe>0&&ze+K+qe>J._maxWidth?(Ge=Math.max(Ge,qe),qe=0,$e+=nt+me,nt=Ie):nt=Math.max(nt,Ie),p.setTranslate(this,qe,$e),qe+=ze}),J._width=Math.max(Ge,qe)+K,J._height=$e+nt+$}else{var et=Y.size(),ct=Fe+ee+(et-1)*oe=J._maxWidth&&(Ge=Math.max(Ge,Mt),pt=0,At+=dt,J._height+=dt,dt=0),p.setTranslate(this,Oe[0]+K+pt,Oe[1]+K+At+Ie/2+oe),Mt=pt+ze+oe,pt+=Pe,dt=Math.max(dt,Ie)}),ct?(J._width=pt+ee,J._height=dt+$):(J._width=Math.max(Ge,Mt)+ee,J._height+=dt+$)}}J._width=Math.ceil(Math.max(J._width+Oe[0],J._titleWidth+2*(K+n.titlePad))),J._height=Math.ceil(Math.max(J._height+Oe[1],J._titleHeight+2*(K+n.itemGap))),J._effHeight=Math.min(J._height,J._maxHeight);var Vt=_._context.edits,Je=Vt.legendText||Vt.legendPosition;Y.each(function(De){var Ie=m.select(this).select("."+ae+"toggle"),ze=De[0].height,Pe=De[0].trace.legendgroup,be=C(De,J,q);Z&&Pe!==""&&(be=Me[Pe]);var se=Je?q:Te||be;!Q&&!j&&(se+=oe/2),p.setRect(Ie,0,-ze/2,se,ze)})}function B(_,U,Y,J){var te=_._fullLayout,ae=te[U],ce=k(ae),Q=O(ae),Z=ae.xref==="paper",j=ae.yref==="paper";_._fullLayout._reservedMargin[U]={};var K=ae.y<.5?"b":"t",ee=ae.x<.5?"l":"r",oe={r:te.width-Y,l:Y+ae._width,b:te.height-J,t:J+ae._effHeight};if(Z&&j)return i.autoMargin(_,U,{x:ae.x,y:ae.y,l:ae._width*u[ce],r:ae._width*g[ce],b:ae._effHeight*g[Q],t:ae._effHeight*u[Q]});Z?_._fullLayout._reservedMargin[U][K]=oe[K]:j||ae.orientation==="v"?_._fullLayout._reservedMargin[U][ee]=oe[ee]:_._fullLayout._reservedMargin[U][K]=oe[K]}function k(_){return P.isRightAnchor(_)?"right":P.isCenterAnchor(_)?"center":"left"}function O(_){return P.isBottomAnchor(_)?"bottom":P.isMiddleAnchor(_)?"middle":"top"}function N(_){return _._id||"legend"}},82424:function(G,V,e){var m=e(73972),P=e(10130);G.exports=function(L,A,v){var p=A._inHover,t=P.isGrouped(A),r=P.isReversed(A),s={},n=[],l=!1,c={},u=0,g=0,f,w;function h(_,U,Y){if(A.visible!==!1&&!(v&&_!==A._id))if(U===""||!P.isGrouped(A)){var J="~~i"+u;n.push(J),s[J]=[Y],u++}else n.indexOf(U)===-1?(n.push(U),l=!0,s[U]=[Y]):s[U].push(Y)}for(f=0;fy&&(E=y)}b[f][0]._groupMinRank=E,b[f][0]._preGroupSort=f}var z=function(_,U){return _[0]._groupMinRank-U[0]._groupMinRank||_[0]._preGroupSort-U[0]._preGroupSort},I=function(_,U){return _.trace.legendrank-U.trace.legendrank||_._preSort-U._preSort};for(b.forEach(function(_,U){_[0]._preGroupSort=U}),b.sort(z),f=0;f0)ee=Z.width;else return 0;return S?K:Math.min(ee,j)};M.each(function(Q){var Z=m.select(this),j=i.ensureSingle(Z,"g","layers");j.style("opacity",Q[0].trace.opacity);var K=C.valign,ee=Q[0].lineHeight,oe=Q[0].height;if(K==="middle"||!ee||!oe)j.attr("transform",null);else{var q={top:1,bottom:-1}[K],$=q*(.5*(ee-oe+3));j.attr("transform",L(0,$))}var le=j.selectAll("g.legendfill").data([Q]);le.enter().append("g").classed("legendfill",!0);var ie=j.selectAll("g.legendlines").data([Q]);ie.enter().append("g").classed("legendlines",!0);var he=j.selectAll("g.legendsymbols").data([Q]);he.enter().append("g").classed("legendsymbols",!0),he.selectAll("g.legendpoints").data([Q]).enter().append("g").classed("legendpoints",!0)}).each(ce).each(B).each(O).each(k).each(_).each(te).each(J).each(z).each(I).each(U).each(Y);function z(Q){var Z=h(Q),j=Z.showFill,K=Z.showLine,ee=Z.showGradientLine,oe=Z.showGradientFill,q=Z.anyFill,$=Z.anyLine,le=Q[0],ie=le.trace,he,me,Me=p(ie),Te=Me.colorscale,Oe=Me.reversescale,Ne=function(Ge){if(Ge.size())if(j)A.fillGroupStyle(Ge,T);else{var nt="legendfill-"+ie.uid;A.gradient(Ge,T,nt,w(Oe),Te,"fill")}},Ee=function(Ge){if(Ge.size()){var nt="legendline-"+ie.uid;A.lineGroupStyle(Ge),A.gradient(Ge,T,nt,w(Oe),Te,"stroke")}},xe=t.hasMarkers(ie)||!q?"M5,0":$?"M5,-2":"M5,-3",Se=m.select(this),Ue=Se.select(".legendfill").selectAll("path").data(j||oe?[Q]:[]);if(Ue.enter().append("path").classed("js-fill",!0),Ue.exit().remove(),Ue.attr("d",xe+"h"+b+"v6h-"+b+"z").call(Ne),K||ee){var He=y(void 0,ie.line,g,c);me=i.minExtend(ie,{line:{width:He}}),he=[i.minExtend(le,{trace:me})]}var Fe=Se.select(".legendlines").selectAll("path").data(K||ee?[he]:[]);Fe.enter().append("path").classed("js-line",!0),Fe.exit().remove(),Fe.attr("d",xe+(ee?"l"+b+",0.0001":"h"+b)).call(K?A.lineGroupStyle:Ee)}function I(Q){var Z=h(Q),j=Z.anyFill,K=Z.anyLine,ee=Z.showLine,oe=Z.showMarker,q=Q[0],$=q.trace,le=!oe&&!K&&!j&&t.hasText($),ie,he;function me(Ue,He,Fe,Ge){var nt=i.nestedProperty($,Ue).get(),qe=i.isArrayOrTypedArray(nt)&&He?He(nt):nt;if(S&&qe&&Ge!==void 0&&(qe=Ge),Fe){if(qeFe[1])return Fe[1]}return qe}function Me(Ue){return q._distinct&&q.index&&Ue[q.index]?Ue[q.index]:Ue[0]}if(oe||le||ee){var Te={},Oe={};if(oe){Te.mc=me("marker.color",Me),Te.mx=me("marker.symbol",Me),Te.mo=me("marker.opacity",i.mean,[.2,1]),Te.mlc=me("marker.line.color",Me),Te.mlw=me("marker.line.width",i.mean,[0,5],u),Oe.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var Ne=me("marker.size",i.mean,[2,16],l);Te.ms=Ne,Oe.marker.size=Ne}ee&&(Oe.line={width:me("line.width",Me,[0,10],c)}),le&&(Te.tx="Aa",Te.tp=me("textposition",Me),Te.ts=10,Te.tc=me("textfont.color",Me),Te.tf=me("textfont.family",Me)),ie=[i.minExtend(q,Te)],he=i.minExtend($,Oe),he.selectedpoints=null,he.texttemplate=null}var Ee=m.select(this).select("g.legendpoints"),xe=Ee.selectAll("path.scatterpts").data(oe?ie:[]);xe.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",E),xe.exit().remove(),xe.call(A.pointStyle,he,T),oe&&(ie[0].mrc=3);var Se=Ee.selectAll("g.pointtext").data(le?ie:[]);Se.enter().append("g").classed("pointtext",!0).append("text").attr("transform",E),Se.exit().remove(),Se.selectAll("text").call(A.textPointStyle,he,T)}function B(Q){var Z=Q[0].trace,j=Z.type==="waterfall";if(Q[0]._distinct&&j){var K=Q[0].trace[Q[0].dir].marker;return Q[0].mc=K.color,Q[0].mlw=K.line.width,Q[0].mlc=K.line.color,N(Q,this,"waterfall")}var ee=[];Z.visible&&j&&(ee=Q[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 oe=m.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(ee);oe.enter().append("path").classed("legendwaterfall",!0).attr("transform",E).style("stroke-miterlimit",1),oe.exit().remove(),oe.each(function(q){var $=m.select(this),le=Z[q[0]].marker,ie=y(void 0,le.line,f,u);$.attr("d",q[1]).style("stroke-width",ie+"px").call(v.fill,le.color),ie&&$.call(v.stroke,le.line.color)})}function k(Q){N(Q,this)}function O(Q){N(Q,this,"funnel")}function N(Q,Z,j){var K=Q[0].trace,ee=K.marker||{},oe=ee.line||{},q=j?K.visible&&K.type===j:P.traceIs(K,"bar"),$=m.select(Z).select("g.legendpoints").selectAll("path.legend"+j).data(q?[Q]:[]);$.enter().append("path").classed("legend"+j,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",E),$.exit().remove(),$.each(function(le){var ie=m.select(this),he=le[0],me=y(he.mlw,ee.line,f,u);ie.style("stroke-width",me+"px");var Me=he.mcc;if(!C._inHover&&"mc"in he){var Te=p(ee),Oe=Te.mid;Oe===void 0&&(Oe=(Te.max+Te.min)/2),Me=A.tryColorscale(ee,"")(Oe)}var Ne=Me||he.mc||ee.color,Ee=ee.pattern,xe=Ee&&A.getPatternAttr(Ee.shape,0,"");if(xe){var Se=A.getPatternAttr(Ee.bgcolor,0,null),Ue=A.getPatternAttr(Ee.fgcolor,0,null),He=Ee.fgopacity,Fe=o(Ee.size,8,10),Ge=o(Ee.solidity,.5,1),nt="legend-"+K.uid;ie.call(A.pattern,"legend",T,nt,xe,Fe,Ge,Me,Ee.fillmode,Se,Ue,He)}else ie.call(v.fill,Ne);me&&v.stroke(ie,he.mlc||oe.color)})}function _(Q){var Z=Q[0].trace,j=m.select(this).select("g.legendpoints").selectAll("path.legendbox").data(Z.visible&&P.traceIs(Z,"box-violin")?[Q]:[]);j.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",E),j.exit().remove(),j.each(function(){var K=m.select(this);if((Z.boxpoints==="all"||Z.points==="all")&&v.opacity(Z.fillcolor)===0&&v.opacity((Z.line||{}).color)===0){var ee=i.minExtend(Z,{marker:{size:S?l:i.constrain(Z.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});j.call(A.pointStyle,ee,T)}else{var oe=y(void 0,Z.line,f,u);K.style("stroke-width",oe+"px").call(v.fill,Z.fillcolor),oe&&v.stroke(K,Z.line.color)}})}function U(Q){var Z=Q[0].trace,j=m.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(Z.visible&&Z.type==="candlestick"?[Q,Q]:[]);j.enter().append("path").classed("legendcandle",!0).attr("d",function(K,ee){return ee?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",E).style("stroke-miterlimit",1),j.exit().remove(),j.each(function(K,ee){var oe=m.select(this),q=Z[ee?"increasing":"decreasing"],$=y(void 0,q.line,f,u);oe.style("stroke-width",$+"px").call(v.fill,q.fillcolor),$&&v.stroke(oe,q.line.color)})}function Y(Q){var Z=Q[0].trace,j=m.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(Z.visible&&Z.type==="ohlc"?[Q,Q]:[]);j.enter().append("path").classed("legendohlc",!0).attr("d",function(K,ee){return ee?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",E).style("stroke-miterlimit",1),j.exit().remove(),j.each(function(K,ee){var oe=m.select(this),q=Z[ee?"increasing":"decreasing"],$=y(void 0,q.line,f,u);oe.style("fill","none").call(A.dashLine,q.line.dash,$),$&&v.stroke(oe,q.line.color)})}function J(Q){ae(Q,this,"pie")}function te(Q){ae(Q,this,"funnelarea")}function ae(Q,Z,j){var K=Q[0],ee=K.trace,oe=j?ee.visible&&ee.type===j:P.traceIs(ee,j),q=m.select(Z).select("g.legendpoints").selectAll("path.legend"+j).data(oe?[Q]:[]);if(q.enter().append("path").classed("legend"+j,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",E),q.exit().remove(),q.size()){var $=ee.marker||{},le=y(s($.line.width,K.pts),$.line,f,u),ie="pieLike",he=i.minExtend(ee,{marker:{line:{width:le}}},ie),me=i.minExtend(K,{trace:he},ie);r(q,me,he,T)}}function ce(Q){var Z=Q[0].trace,j,K=[];if(Z.visible)switch(Z.type){case"histogram2d":case"heatmap":K=[["M-15,-2V4H15V-2Z"]],j=!0;break;case"choropleth":case"choroplethmapbox":K=[["M-6,-6V6H6V-6Z"]],j=!0;break;case"densitymapbox":K=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],j="radial";break;case"cone":K=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],j=!1;break;case"streamtube":K=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],j=!1;break;case"surface":K=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],j=!0;break;case"mesh3d":K=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],j=!1;break;case"volume":K=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],j=!0;break;case"isosurface":K=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],j=!1;break}var ee=m.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(K);ee.enter().append("path").classed("legend3dandfriends",!0).attr("transform",E).style("stroke-miterlimit",1),ee.exit().remove(),ee.each(function(oe,q){var $=m.select(this),le=p(Z),ie=le.colorscale,he=le.reversescale,me=function(Ne){if(Ne.size()){var Ee="legendfill-"+Z.uid;A.gradient(Ne,T,Ee,w(he,j==="radial"),ie,"fill")}},Me;if(ie){if(!j){var Oe=ie.length;Me=q===0?ie[he?Oe-1:0][1]:q===1?ie[he?0:Oe-1][1]:ie[Math.floor((Oe-1)/2)][1]}}else{var Te=Z.vertexcolor||Z.facecolor||Z.color;Me=i.isArrayOrTypedArray(Te)?Te[q]||Te[0]:Te}$.attr("d",oe[0]),Me?$.call(v.fill,Me):$.call(me)})}};function w(d,M){var T=M?"radial":"horizontal";return T+(d?"":"reversed")}function h(d){var M=d[0].trace,T=M.contours,C=t.hasLines(M),x=t.hasMarkers(M),S=M.visible&&M.fill&&M.fill!=="none",b=!1,a=!1;if(T){var E=T.coloring;E==="lines"?b=!0:C=E==="none"||E==="heatmap"||T.showlines,T.type==="constraint"?S=T._operation!=="=":(E==="fill"||E==="heatmap")&&(a=!0)}return{showMarker:x,showLine:C,showFill:S,showGradientLine:b,showGradientFill:a,anyLine:C||b,anyFill:S||a}}function o(d,M,T){return d&&i.isArrayOrTypedArray(d)?M:d>T?T:d}},42068:function(G,V,e){e(93348),G.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(G,V,e){var m=e(73972),P=e(74875),i=e(41675),L=e(24255),A=e(34031).eraseActiveShape,v=e(71828),p=v._,t=G.exports={};t.toImage={name:"toImage",title:function(d){var M=d._context.toImageButtonOptions||{},T=M.format||"png";return T==="png"?p(d,"Download plot as a png"):p(d,"Download plot")},icon:L.camera,click:function(d){var M=d._context.toImageButtonOptions,T={format:M.format||"png"};v.notifier(p(d,"Taking snapshot - this may take a few seconds"),"long"),T.format!=="svg"&&v.isIE()&&(v.notifier(p(d,"IE only supports svg. Changing format to svg."),"long"),T.format="svg"),["filename","width","height","scale"].forEach(function(C){C in M&&(T[C]=M[C])}),m.call("downloadImage",d,T).then(function(C){v.notifier(p(d,"Snapshot succeeded")+" - "+C,"long")}).catch(function(){v.notifier(p(d,"Sorry, there was a problem downloading your snapshot!"),"long")})}},t.sendDataToCloud={name:"sendDataToCloud",title:function(d){return p(d,"Edit in Chart Studio")},icon:L.disk,click:function(d){P.sendDataToCloud(d)}},t.editInChartStudio={name:"editInChartStudio",title:function(d){return p(d,"Edit in Chart Studio")},icon:L.pencil,click:function(d){P.sendDataToCloud(d)}},t.zoom2d={name:"zoom2d",_cat:"zoom",title:function(d){return p(d,"Zoom")},attr:"dragmode",val:"zoom",icon:L.zoombox,click:r},t.pan2d={name:"pan2d",_cat:"pan",title:function(d){return p(d,"Pan")},attr:"dragmode",val:"pan",icon:L.pan,click:r},t.select2d={name:"select2d",_cat:"select",title:function(d){return p(d,"Box Select")},attr:"dragmode",val:"select",icon:L.selectbox,click:r},t.lasso2d={name:"lasso2d",_cat:"lasso",title:function(d){return p(d,"Lasso Select")},attr:"dragmode",val:"lasso",icon:L.lasso,click:r},t.drawclosedpath={name:"drawclosedpath",title:function(d){return p(d,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:L.drawclosedpath,click:r},t.drawopenpath={name:"drawopenpath",title:function(d){return p(d,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:L.drawopenpath,click:r},t.drawline={name:"drawline",title:function(d){return p(d,"Draw line")},attr:"dragmode",val:"drawline",icon:L.drawline,click:r},t.drawrect={name:"drawrect",title:function(d){return p(d,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:L.drawrect,click:r},t.drawcircle={name:"drawcircle",title:function(d){return p(d,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:L.drawcircle,click:r},t.eraseshape={name:"eraseshape",title:function(d){return p(d,"Erase active shape")},icon:L.eraseshape,click:A},t.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(d){return p(d,"Zoom in")},attr:"zoom",val:"in",icon:L.zoom_plus,click:r},t.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(d){return p(d,"Zoom out")},attr:"zoom",val:"out",icon:L.zoom_minus,click:r},t.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(d){return p(d,"Autoscale")},attr:"zoom",val:"auto",icon:L.autoscale,click:r},t.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(d){return p(d,"Reset axes")},attr:"zoom",val:"reset",icon:L.home,click:r},t.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(d){return p(d,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:L.tooltip_basic,gravity:"ne",click:r},t.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(d){return p(d,"Compare data on hover")},attr:"hovermode",val:function(d){return d._fullLayout._isHoriz?"y":"x"},icon:L.tooltip_compare,gravity:"ne",click:r};function r(d,M){var T=M.currentTarget,C=T.getAttribute("data-attr"),x=T.getAttribute("data-val")||!0,S=d._fullLayout,b={},a=i.list(d,null,!0),E=S._cartesianSpikesEnabled,y,z;if(C==="zoom"){var I=x==="in"?.5:2,B=(1+I)/2,k=(1-I)/2,O;for(z=0;z1?(ae=["toggleHover"],ce=["resetViews"]):b?(te=["zoomInGeo","zoomOutGeo"],ae=["hoverClosestGeo"],ce=["resetGeo"]):S?(ae=["hoverClosest3d"],ce=["resetCameraDefault3d","resetCameraLastSave3d"]):I?(te=["zoomInMapbox","zoomOutMapbox"],ae=["toggleHover"],ce=["resetViewMapbox"]):y?ae=["hoverClosestGl2d"]:a?ae=["hoverClosestPie"]:O?(ae=["hoverClosestCartesian","hoverCompareCartesian"],ce=["resetViewSankey"]):ae=["toggleHover"],x&&(ae=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(l(w)||_)&&(ae=[]),(x||y)&&!N&&(te=["zoomIn2d","zoomOut2d","autoScale2d"],ce[0]!=="resetViews"&&(ce=["resetScale2d"])),S?Q=["zoom3d","pan3d","orbitRotation","tableRotation"]:(x||y)&&!N||z?Q=["zoom2d","pan2d"]:I||b?Q=["pan2d"]:B&&(Q=["zoom2d"]),n(w)&&Q.push("select2d","lasso2d");var Z=[],j=function(q){Z.indexOf(q)===-1&&ae.indexOf(q)!==-1&&Z.push(q)};if(Array.isArray(T)){for(var K=[],ee=0;ee0);if(o){var d=t(n,l,c);w("x",d[0]),w("y",d[1]),m.noneOrAll(s,n,["x","y"]),w("xanchor"),w("yanchor"),m.coerceFont(w,"font",l.font);var M=w("bgcolor");w("activecolor",P.contrast(M,v.lightAmount,v.darkAmount)),w("bordercolor"),w("borderwidth")}};function p(r,s,n,l){var c=l.calendar;function u(w,h){return m.coerce(r,s,A.buttons,w,h)}var g=u("visible");if(g){var f=u("step");f!=="all"&&(c&&c!=="gregorian"&&(f==="month"||f==="year")?s.stepmode="backward":u("stepmode"),u("count")),u("label")}}function t(r,s,n){for(var l=n.filter(function(f){return s[f].anchor===r._id}),c=0,u=0;u=Ne.max)Te=le[Oe+1];else if(Me=Ne.pmax)Te=le[Oe+1];else if(Meb._length||U+Q<0)return;Z=_+Q,j=U+Q;break;case y:if(K="col-resize",_+Q>b._length)return;Z=_+Q,j=U;break;case z:if(K="col-resize",U+Q<0)return;Z=_,j=U+Q;break;default:K="ew-resize",Z=N,j=N+Q;break}if(j=0;B--){var k=T.append("path").attr(x).style("opacity",B?.1:S).call(L.stroke,a).call(L.fill,b).call(A.dashLine,B?"solid":y,B?4+E:E);if(l(k,f,o),z){var O=v(f.layout,"selections",o);k.style({cursor:"move"});var N={element:k.node(),plotinfo:d,gd:f,editHelpers:O,isActiveSelection:!0},_=m(C,f);P(_,k,N)}else k.style("pointer-events",B?"all":"none");I[B]=k}var U=I[0],Y=I[1];Y.node().addEventListener("click",function(){return c(f,U)})}}function l(f,w,h){var o=h.xref+h.yref;A.setClipUrl(f,"clip"+w._fullLayout._uid+o,w)}function c(f,w){if(s(f)){var h=w.node(),o=+h.getAttribute("data-index");if(o>=0){if(o===f._fullLayout._activeSelectionIndex){g(f);return}f._fullLayout._activeSelectionIndex=o,f._fullLayout._deactivateSelection=g,r(f)}}}function u(f){if(s(f)){var w=f._fullLayout.selections.length-1;f._fullLayout._activeSelectionIndex=w,f._fullLayout._deactivateSelection=g,r(f)}}function g(f){if(s(f)){var w=f._fullLayout._activeSelectionIndex;w>=0&&(i(f),delete f._fullLayout._activeSelectionIndex,r(f))}}},53777:function(G,V,e){var m=e(79952).P,P=e(1426).extendFlat;G.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:P({},m,{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(G){G.exports=function(e,m,P){P("newselection.mode");var i=P("newselection.line.width");i&&(P("newselection.line.color"),P("newselection.line.dash")),P("activeselection.fillcolor"),P("activeselection.opacity")}},35855:function(G,V,e){var m=e(64505),P=m.selectMode,i=e(51873),L=i.clearOutline,A=e(60165),v=A.readPaths,p=A.writePaths,t=A.fixDatesForPaths;G.exports=function(s,n){if(s.length){var l=s[0][0];if(l){var c=l.getAttribute("d"),u=n.gd,g=u._fullLayout.newselection,f=n.plotinfo,w=f.xaxis,h=f.yaxis,o=n.isActiveSelection,d=n.dragmode,M=(u.layout||{}).selections||[];if(!P(d)&&o!==void 0){var T=u._fullLayout._activeSelectionIndex;if(T=0){Kt._fullLayout._deactivateShape(Kt);return}if(!wt){var Dn=ir.clickmode;a.done(Hr).then(function(){if(a.clear(Hr),jr===2){for(rr.remove(),Zt=0;Zt-1&&ae(In,Kt,se.xaxes,se.yaxes,se.subplot,se,rr),Dn==="event"&&De(Kt,void 0);v.click(Kt,In)}).catch(x.error)}},se.doneFn=function(){pr.remove(),a.done(Hr).then(function(){a.clear(Hr),!_r&&Ft&&se.selectionDefs&&(Ft.subtract=Er,se.selectionDefs.push(Ft),se.mergedPolygons.length=0,[].push.apply(se.mergedPolygons,Dt)),(_r||wt)&&q(se,_r),se.doneFnCompleted&&se.doneFnCompleted(Ir),It&&De(Kt,lr)}).catch(x.error)}}function ae(ze,Pe,be,se,ye,Le,Be){var ot=Pe._hoverdata,at=Pe._fullLayout,wt=at.clickmode,It=wt.indexOf("event")>-1,Bt=[],Gt,Lt,Kt,ir,_r,yt,jt,Yt,br,hr;if(he(ot)){K(ze,Pe,Le),Gt=le(Pe,be,se,ye);var ut=me(ot,Gt),lt=ut.pointNumbers.length>0;if(lt?Te(Gt,ut):Oe(Gt)&&(jt=Me(ut))){for(Be&&Be.remove(),hr=0;hr=0}function oe(ze){return ze._fullLayout._activeSelectionIndex>=0}function q(ze,Pe){var be=ze.dragmode,se=ze.plotinfo,ye=ze.gd;ee(ye)&&ye._fullLayout._deactivateShape(ye),oe(ye)&&ye._fullLayout._deactivateSelection(ye);var Le=ye._fullLayout,Be=Le._zoomlayer,ot=n(be),at=c(be);if(ot||at){var wt=Be.selectAll(".select-outline-"+se.id);if(wt&&ye._fullLayout._outlining){var It;ot&&(It=M(wt,ze)),It&&i.call("_guiRelayout",ye,{shapes:It});var Bt;at&&!J(ze)&&(Bt=T(wt,ze)),Bt&&(ye._fullLayout._noEmitSelectedAtStart=!0,i.call("_guiRelayout",ye,{selections:Bt}).then(function(){Pe&&C(ye)})),ye._fullLayout._outlining=!1}}se.selection={},se.selection.selectionDefs=ze.selectionDefs=[],se.selection.mergedPolygons=ze.mergedPolygons=[]}function $(ze){return ze._id}function le(ze,Pe,be,se){if(!ze.calcdata)return[];var ye=[],Le=Pe.map($),Be=be.map($),ot,at,wt;for(wt=0;wt0,Le=ye?se[0]:be;return Pe.selectedpoints?Pe.selectedpoints.indexOf(Le)>-1:!1}function Te(ze,Pe){var be=[],se,ye,Le,Be;for(Be=0;Be0&&be.push(se);if(be.length===1&&(Le=be[0]===Pe.searchInfo,Le&&(ye=Pe.searchInfo.cd[0].trace,ye.selectedpoints.length===Pe.pointNumbers.length))){for(Be=0;Be1||(Pe+=se.selectedpoints.length,Pe>1)))return!1;return Pe===1}function Ne(ze,Pe,be){var se;for(se=0;se-1&&Pe;if(!Be&&Pe){var jr=et(ze,!0);if(jr.length){var In=jr[0].xref,Dn=jr[0].yref;if(In&&Dn){var xr=pt(jr),Ar=Mt([E(ze,In,"x"),E(ze,Dn,"y")]);Ar(Ir,xr)}}ze._fullLayout._noEmitSelectedAtStart?ze._fullLayout._noEmitSelectedAtStart=!1:pn&&De(ze,Ir),Gt._reselect=!1}if(!Be&&Gt._deselect){var Or=Gt._deselect;ot=Or.xref,at=Or.yref,nt(ot,at,It)||qe(ze,ot,at,se),pn&&(Ir.points.length?De(ze,Ir):Ie(ze)),Gt._deselect=!1}return{eventData:Ir,selectionTesters:be}}function Ge(ze){var Pe=ze.calcdata;if(Pe)for(var be=0;be0?h+g:g;return{ppad:g,ppadplus:f?d:M,ppadminus:f?M:d}}else return{ppad:g}}function t(r,s,n,l,c){var u=r.type==="category"||r.type==="multicategory"?r.r2c:r.d2c;if(s!==void 0)return[u(s),u(n)];if(l){var g=1/0,f=-1/0,w=l.match(i.segmentRE),h,o,d,M,T;for(r.type==="date"&&(u=L.decodeDate(u)),h=0;hf&&(f=T)));if(f>=g)return[g,f]}}},21459:function(G){G.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}},84726:function(G,V,e){var m=e(71828),P=e(89298),i=e(85501),L=e(89827),A=e(30477);G.exports=function(r,s){i(r,s,{name:"shapes",handleItemDefaults:p})};function v(t,r){return t?"bottom":r.indexOf("top")!==-1?"top":r.indexOf("bottom")!==-1?"bottom":"middle"}function p(t,r,s){function n(Q,Z){return m.coerce(t,r,L,Q,Z)}r._isShape=!0;var l=n("visible");if(l){var c=n("showlegend");c&&(n("legend"),n("legendwidth"),n("legendgroup"),n("legendgrouptitle.text"),m.coerceFont(n,"legendgrouptitle.font"),n("legendrank"));var u=n("path"),g=u?"path":"rect",f=n("type",g),w=f!=="path";w&&delete r.path,n("editable"),n("layer"),n("opacity"),n("fillcolor"),n("fillrule");var h=n("line.width");h&&(n("line.color"),n("line.dash"));for(var o=n("xsizemode"),d=n("ysizemode"),M=["x","y"],T=0;T<2;T++){var C=M[T],x=C+"anchor",S=C==="x"?o:d,b={_fullLayout:s},a,E,y,z=P.coerceRef(t,r,b,C,void 0,"paper"),I=P.getRefType(z);if(I==="range"?(a=P.getFromId(b,z),a._shapeIndices.push(r._index),y=A.rangeToShapePosition(a),E=A.shapePositionToRange(a)):E=y=m.identity,w){var B=.25,k=.75,O=C+"0",N=C+"1",_=t[O],U=t[N];t[O]=E(t[O],!0),t[N]=E(t[N],!0),S==="pixel"?(n(O,0),n(N,10)):(P.coercePosition(r,b,n,z,O,B),P.coercePosition(r,b,n,z,N,k)),r[O]=y(r[O]),r[N]=y(r[N]),t[O]=_,t[N]=U}if(S==="pixel"){var Y=t[x];t[x]=E(t[x],!0),P.coercePosition(r,b,n,z,x,.25),r[x]=y(r[x]),t[x]=Y}}w&&m.noneOrAll(t,r,["x0","x1","y0","y1"]);var J=f==="line",te,ae;if(w&&(te=n("label.texttemplate")),te||(ae=n("label.text")),ae||te){n("label.textangle");var ce=n("label.textposition",J?"middle":"middle center");n("label.xanchor"),n("label.yanchor",v(J,ce)),n("label.padding"),m.coerceFont(n,"label.font",s.font)}}}},48100:function(G,V,e){var m=e(71828),P=e(89298),i=e(63893),L=e(91424),A=e(60165).readPaths,v=e(30477),p=v.getPathString,t=e(37281),r=e(18783).FROM_TL;G.exports=function(c,u,g,f){if(f.selectAll(".shape-label").remove(),!!(g.label.text||g.label.texttemplate)){var w;if(g.label.texttemplate){var h={};if(g.type!=="path"){var o=P.getFromId(c,g.xref),d=P.getFromId(c,g.yref);for(var M in t){var T=t[M](g,o,d);T!==void 0&&(h[M]=T)}}w=m.texttemplateStringForShapes(g.label.texttemplate,{},c._fullLayout._d3locale,h)}else w=g.label.text;var C={"data-index":u},x=g.label.font,S={"data-notex":1},b=f.append("g").attr(C).classed("shape-label",!0),a=b.append("text").attr(S).classed("shape-label-text",!0).text(w),E,y,z,I;if(g.path){var B=p(c,g),k=A(B,c);E=1/0,z=1/0,y=-1/0,I=-1/0;for(var O=0;O=l?f=c-g:f=g-c,-180/Math.PI*Math.atan2(f,w)}function n(l,c,u,g,f,w,h){var o=f.label.textposition,d=f.label.textangle,M=f.label.padding,T=f.type,C=Math.PI/180*w,x=Math.sin(C),S=Math.cos(C),b=f.label.xanchor,a=f.label.yanchor,E,y,z,I;if(T==="line"){o==="start"?(E=l,y=c):o==="end"?(E=u,y=g):(E=(l+u)/2,y=(c+g)/2),b==="auto"&&(o==="start"?d==="auto"?u>l?b="left":ul?b="right":ul?b="right":ul?b="left":u1&&!(xe.length===2&&xe[1][0]==="Z")&&(Q===0&&(xe[0][0]="M"),E[ce]=xe,k(),O())}}function ie(xe,Se){if(xe===2){ce=+Se.srcElement.getAttribute("data-i"),Q=+Se.srcElement.getAttribute("data-j");var Ue=E[ce];!w(Ue)&&!h(Ue)&&le()}}function he(xe){te=[];for(var Se=0;Sek&&be>O&&!Ie.shiftKey?l.getCursor(se/Pe,1-ye/be):"move";c(E,Le),nt=Le.split("-")[0]}}function ct(Ie){h(a)||(N&&(Z=xe(y.xanchor)),_&&(j=Se(y.yanchor)),y.type==="path"?me=y.path:(te=N?y.x0:xe(y.x0),ae=_?y.y0:Se(y.y0),ce=N?y.x1:xe(y.x1),Q=_?y.y1:Se(y.y1)),teQ?(K=ae,$="y0",ee=Q,le="y1"):(K=Q,$="y1",ee=ae,le="y0"),et(Ie),Vt(I,y),De(E,y,a),Ge.moveFn=nt==="move"?At:Mt,Ge.altKey=Ie.altKey)}function dt(){h(a)||(c(E),Je(I),M(E,a,y),P.call("_guiRelayout",a,B.getUpdateObj()))}function pt(){h(a)||Je(I)}function At(Ie,ze){if(y.type==="path"){var Pe=function(ye){return ye},be=Pe,se=Pe;N?J("xanchor",y.xanchor=Ue(Z+Ie)):(be=function(Le){return Ue(xe(Le)+Ie)},Te&&Te.type==="date"&&(be=g.encodeDate(be))),_?J("yanchor",y.yanchor=He(j+ze)):(se=function(Le){return He(Se(Le)+ze)},Ne&&Ne.type==="date"&&(se=g.encodeDate(se))),J("path",y.path=C(me,be,se))}else N?J("xanchor",y.xanchor=Ue(Z+Ie)):(J("x0",y.x0=Ue(te+Ie)),J("x1",y.x1=Ue(ce+Ie))),_?J("yanchor",y.yanchor=He(j+ze)):(J("y0",y.y0=He(ae+ze)),J("y1",y.y1=He(Q+ze)));E.attr("d",f(a,y)),Vt(I,y),p(a,z,y,Me)}function Mt(Ie,ze){if(Y){var Pe=function(yt){return yt},be=Pe,se=Pe;N?J("xanchor",y.xanchor=Ue(Z+Ie)):(be=function(jt){return Ue(xe(jt)+Ie)},Te&&Te.type==="date"&&(be=g.encodeDate(be))),_?J("yanchor",y.yanchor=He(j+ze)):(se=function(jt){return He(Se(jt)+ze)},Ne&&Ne.type==="date"&&(se=g.encodeDate(se))),J("path",y.path=C(me,be,se))}else if(U){if(nt==="resize-over-start-point"){var ye=te+Ie,Le=_?ae-ze:ae+ze;J("x0",y.x0=N?ye:Ue(ye)),J("y0",y.y0=_?Le:He(Le))}else if(nt==="resize-over-end-point"){var Be=ce+Ie,ot=_?Q-ze:Q+ze;J("x1",y.x1=N?Be:Ue(Be)),J("y1",y.y1=_?ot:He(ot))}}else{var at=function(yt){return nt.indexOf(yt)!==-1},wt=at("n"),It=at("s"),Bt=at("w"),Gt=at("e"),Lt=wt?K+ze:K,Kt=It?ee+ze:ee,ir=Bt?oe+Ie:oe,_r=Gt?q+Ie:q;_&&(wt&&(Lt=K-ze),It&&(Kt=ee-ze)),(!_&&Kt-Lt>O||_&&Lt-Kt>O)&&(J($,y[$]=_?Lt:He(Lt)),J(le,y[le]=_?Kt:He(Kt))),_r-ir>k&&(J(ie,y[ie]=N?ir:Ue(ir)),J(he,y[he]=N?_r:Ue(_r)))}E.attr("d",f(a,y)),Vt(I,y),p(a,z,y,Me)}function Vt(Ie,ze){(N||_)&&Pe();function Pe(){var be=ze.type!=="path",se=Ie.selectAll(".visual-cue").data([0]),ye=1;se.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":ye}).classed("visual-cue",!0);var Le=xe(N?ze.xanchor:i.midRange(be?[ze.x0,ze.x1]:g.extractPathCoords(ze.path,u.paramIsX))),Be=Se(_?ze.yanchor:i.midRange(be?[ze.y0,ze.y1]:g.extractPathCoords(ze.path,u.paramIsY)));if(Le=g.roundPositionForSharpStrokeRendering(Le,ye),Be=g.roundPositionForSharpStrokeRendering(Be,ye),N&&_){var ot="M"+(Le-1-ye)+","+(Be-1-ye)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";se.attr("d",ot)}else if(N){var at="M"+(Le-1-ye)+","+(Be-9-ye)+"v18 h2 v-18 Z";se.attr("d",at)}else{var wt="M"+(Le-9-ye)+","+(Be-1-ye)+"h18 v2 h-18 Z";se.attr("d",wt)}}}function Je(Ie){Ie.selectAll(".visual-cue").remove()}function De(Ie,ze,Pe){var be=ze.xref,se=ze.yref,ye=L.getFromId(Pe,be),Le=L.getFromId(Pe,se),Be="";be!=="paper"&&!ye.autorange&&(Be+=be),se!=="paper"&&!Le.autorange&&(Be+=se),s.setClipUrl(Ie,Be?"clip"+Pe._fullLayout._uid+Be:null,Pe)}}function C(a,E,y){return a.replace(u.segmentRE,function(z){var I=0,B=z.charAt(0),k=u.paramIsX[B],O=u.paramIsY[B],N=u.numParams[B],_=z.substr(1).replace(u.paramRE,function(U){return I>=N||(k[I]?U=E(U):O[I]&&(U=y(U)),I++),U});return B+_})}function x(a,E){if(o(a)){var y=E.node(),z=+y.getAttribute("data-index");if(z>=0){if(z===a._fullLayout._activeShapeIndex){S(a);return}a._fullLayout._activeShapeIndex=z,a._fullLayout._deactivateShape=S,w(a)}}}function S(a){if(o(a)){var E=a._fullLayout._activeShapeIndex;E>=0&&(t(a),delete a._fullLayout._activeShapeIndex,w(a))}}function b(a){if(o(a)){t(a);var E=a._fullLayout._activeShapeIndex,y=(a.layout||{}).shapes||[];if(E0&&dh&&(d="X"),d});return u>h&&(o=o.replace(/[\s,]*X.*/,""),P.log("Ignoring extra params in segment "+c)),g+o})}},89853:function(G,V,e){var m=e(34031);G.exports={moduleType:"component",name:"shapes",layoutAttributes:e(89827),supplyLayoutDefaults:e(84726),supplyDrawNewShapeDefaults:e(45547),includeBasePlot:e(76325)("shapes"),calcAutorange:e(5627),draw:m.draw,drawOne:m.drawOne}},37281:function(G){function V(c,u){return u?u.d2l(c):c}function e(c,u){return u?u.l2d(c):c}function m(c){return c.x0}function P(c){return c.x1}function i(c){return c.y0}function L(c){return c.y1}function A(c,u){return V(c.x1,u)-V(c.x0,u)}function v(c,u,g){return V(c.y1,g)-V(c.y0,g)}function p(c,u){return Math.abs(A(c,u))}function t(c,u,g){return Math.abs(v(c,u,g))}function r(c,u,g){return c.type!=="line"?void 0:Math.sqrt(Math.pow(A(c,u),2)+Math.pow(v(c,u,g),2))}function s(c,u){return e((V(c.x1,u)+V(c.x0,u))/2,u)}function n(c,u,g){return e((V(c.y1,g)+V(c.y0,g))/2,g)}function l(c,u,g){return c.type!=="line"?void 0:v(c,u,g)/A(c,u)}G.exports={x0:m,x1:P,y0:i,y1:L,slope:l,dx:A,dy:v,width:p,height:t,length:r,xcenter:s,ycenter:n}},75067:function(G,V,e){var m=e(41940),P=e(35025),i=e(1426).extendDeepAll,L=e(30962).overrideAll,A=e(85594),v=e(44467).templatedArray,p=e(98292),t=v("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}});G.exports=L(v("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:i(P({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:A.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:m({})},font:m({}),activebgcolor:{valType:"color",dflt:p.gripBgActiveColor},bgcolor:{valType:"color",dflt:p.railBgColor},bordercolor:{valType:"color",dflt:p.railBorderColor},borderwidth:{valType:"number",min:0,dflt:p.railBorderWidth},ticklen:{valType:"number",min:0,dflt:p.tickLength},tickcolor:{valType:"color",dflt:p.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:p.minorTickLength}}),"arraydraw","from-root")},98292:function(G){G.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(G,V,e){var m=e(71828),P=e(85501),i=e(75067),L=e(98292),A=L.name,v=i.steps;G.exports=function(s,n){P(s,n,{name:A,handleItemDefaults:p})};function p(r,s,n){function l(d,M){return m.coerce(r,s,i,d,M)}for(var c=P(r,s,{name:"steps",handleItemDefaults:t}),u=0,g=0;g0?[0]:[]);Y.enter().append("g").classed(r.containerClassName,!0).style("cursor",N?null:"ew-resize");function J(Q){Q._commandObserver&&(Q._commandObserver.remove(),delete Q._commandObserver),P.autoMargin(O,u(Q))}if(Y.exit().each(function(){m.select(this).selectAll("g."+r.groupClassName).each(J)}).remove(),U.length!==0){var te=Y.selectAll("g."+r.groupClassName).data(U,f);te.enter().append("g").classed(r.groupClassName,!0),te.exit().each(J).remove();for(var ae=0;ae0&&(te=te.transition().duration(O.transition.duration).ease(O.transition.easing)),te.attr("transform",v(J-r.gripWidth*.5,O._dims.currentValueTotalHeight))}}function y(k,O){var N=k._dims;return N.inputAreaStart+r.stepInset+(N.inputAreaLength-2*r.stepInset)*Math.min(1,Math.max(0,O))}function z(k,O){var N=k._dims;return Math.min(1,Math.max(0,(O-r.stepInset-N.inputAreaStart)/(N.inputAreaLength-2*r.stepInset-2*N.inputAreaStart)))}function I(k,O,N){var _=N._dims,U=A.ensureSingle(k,"rect",r.railTouchRectClass,function(Y){Y.call(S,O,k,N).style("pointer-events","all")});U.attr({width:_.inputAreaLength,height:Math.max(_.inputAreaWidth,r.tickOffset+N.ticklen+_.labelHeight)}).call(i.fill,N.bgcolor).attr("opacity",0),L.setTranslate(U,0,_.currentValueTotalHeight)}function B(k,O){var N=O._dims,_=N.inputAreaLength-r.railInset*2,U=A.ensureSingle(k,"rect",r.railRectClass);U.attr({width:_,height:r.railWidth,rx:r.railRadius,ry:r.railRadius,"shape-rendering":"crispEdges"}).call(i.stroke,O.bordercolor).call(i.fill,O.bgcolor).style("stroke-width",O.borderwidth+"px"),L.setTranslate(U,r.railInset,(N.inputAreaWidth-r.railWidth)*.5+N.currentValueTotalHeight)}},23243:function(G,V,e){var m=e(98292);G.exports={moduleType:"component",name:m.name,layoutAttributes:e(75067),supplyLayoutDefaults:e(12343),draw:e(44504)}},92998:function(G,V,e){var m=e(39898),P=e(92770),i=e(74875),L=e(73972),A=e(71828),v=A.strTranslate,p=e(91424),t=e(7901),r=e(63893),s=e(37822),n=e(18783).OPPOSITE_SIDE,l=/ [XY][0-9]* /;function c(u,g,f){var w=f.propContainer,h=f.propName,o=f.placeholder,d=f.traceIndex,M=f.avoid||{},T=f.attributes,C=f.transform,x=f.containerGroup,S=u._fullLayout,b=1,a=!1,E=w.title,y=(E&&E.text?E.text:"").trim(),z=E&&E.font?E.font:{},I=z.family,B=z.size,k=z.color,O;h==="title.text"?O="titleText":h.indexOf("axis")!==-1?O="axisTitleText":h.indexOf("colorbar"!==-1)&&(O="colorbarTitleText");var N=u._context.edits[O];y===""?b=0:y.replace(l," % ")===o.replace(l," % ")&&(b=.2,a=!0,N||(y="")),f._meta?y=A.templateString(y,f._meta):S._meta&&(y=A.templateString(y,S._meta));var _=y||N,U;x||(x=A.ensureSingle(S._infolayer,"g","g-"+g),U=S._hColorbarMoveTitle);var Y=x.selectAll("text").data(_?[0]:[]);if(Y.enter().append("text"),Y.text(y).attr("class",g),Y.exit().remove(),!_)return x;function J(Q){A.syncOrAsync([te,ae],Q)}function te(Q){var Z;return!C&&U&&(C={}),C?(Z="",C.rotate&&(Z+="rotate("+[C.rotate,T.x,T.y]+")"),(C.offset||U)&&(Z+=v(0,(C.offset||0)-(U||0)))):Z=null,Q.attr("transform",Z),Q.style({"font-family":I,"font-size":m.round(B,2)+"px",fill:t.rgb(k),opacity:b*t.opacity(k),"font-weight":i.fontWeight}).attr(T).call(r.convertToTspans,u),i.previousPromises(u)}function ae(Q){var Z=m.select(Q.node().parentNode);if(M&&M.selection&&M.side&&y){Z.attr("transform",null);var j=n[M.side],K=M.side==="left"||M.side==="top"?-1:1,ee=P(M.pad)?M.pad:2,oe=p.bBox(Z.node()),q={t:0,b:0,l:0,r:0},$=u._fullLayout._reservedMargin;for(var le in $)for(var ie in $[le]){var he=$[le][ie];q[ie]=Math.max(q[ie],he)}var me={left:q.l,top:q.t,right:S.width-q.r,bottom:S.height-q.b},Me=M.maxShift||K*(me[M.side]-oe[M.side]),Te=0;if(Me<0)Te=Me;else{var Oe=M.offsetLeft||0,Ne=M.offsetTop||0;oe.left-=Oe,oe.right-=Oe,oe.top-=Ne,oe.bottom-=Ne,M.selection.each(function(){var xe=p.bBox(this);A.bBoxIntersect(oe,xe,ee)&&(Te=Math.max(Te,K*(xe[M.side]-oe[j])+ee))}),Te=Math.min(Me,Te),w._titleScoot=Math.abs(Te)}if(Te>0||Me<0){var Ee={left:[-Te,0],right:[Te,0],top:[0,-Te],bottom:[0,Te]}[M.side];Z.attr("transform",v(Ee[0],Ee[1]))}}}Y.call(J);function ce(){b=0,a=!0,Y.text(o).on("mouseover.opacity",function(){m.select(this).transition().duration(s.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){m.select(this).transition().duration(s.HIDE_PLACEHOLDER).style("opacity",0)})}return N&&(y?Y.on(".opacity",null):ce(),Y.call(r.makeEditable,{gd:u}).on("edit",function(Q){d!==void 0?L.call("_guiRestyle",u,h,Q,d):L.call("_guiRelayout",u,h,Q)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(J)}).on("input",function(Q){this.text(Q||" ").call(r.positionText,T.x,T.y)})),Y.classed("js-placeholder",a),x}G.exports={draw:c}},7163:function(G,V,e){var m=e(41940),P=e(22399),i=e(1426).extendFlat,L=e(30962).overrideAll,A=e(35025),v=e(44467).templatedArray,p=v("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}});G.exports=L(v("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:p,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:i(A({editType:"arraydraw"}),{}),font:m({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:P.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},75909:function(G){G.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(G,V,e){var m=e(71828),P=e(85501),i=e(7163),L=e(75909),A=L.name,v=i.buttons;G.exports=function(s,n){var l={name:A,handleItemDefaults:p};P(s,n,l)};function p(r,s,n){function l(g,f){return m.coerce(r,s,i,g,f)}var c=P(r,s,{name:"buttons",handleItemDefaults:t}),u=l("visible",c.length>0);u&&(l("active"),l("direction"),l("type"),l("showactive"),l("x"),l("y"),m.noneOrAll(r,s,["x","y"]),l("xanchor"),l("yanchor"),l("pad.t"),l("pad.r"),l("pad.b"),l("pad.l"),m.coerceFont(l,"font",n.font),l("bgcolor",n.paper_bgcolor),l("bordercolor"),l("borderwidth"))}function t(r,s){function n(c,u){return m.coerce(r,s,v,c,u)}var l=n("visible",r.method==="skip"||Array.isArray(r.args));l&&(n("method"),n("args"),n("args2"),n("label"),n("execute"))}},13689:function(G,V,e){var m=e(39898),P=e(74875),i=e(7901),L=e(91424),A=e(71828),v=e(63893),p=e(44467).arrayEditor,t=e(18783).LINE_SPACING,r=e(75909),s=e(25849);G.exports=function(z){var I=z._fullLayout,B=A.filterVisible(I[r.name]);function k(ae){P.autoMargin(z,b(ae))}var O=I._menulayer.selectAll("g."+r.containerClassName).data(B.length>0?[0]:[]);if(O.enter().append("g").classed(r.containerClassName,!0).style("cursor","pointer"),O.exit().each(function(){m.select(this).selectAll("g."+r.headerGroupClassName).each(k)}).remove(),B.length!==0){var N=O.selectAll("g."+r.headerGroupClassName).data(B,n);N.enter().append("g").classed(r.headerGroupClassName,!0);for(var _=A.ensureSingle(O,"g",r.dropdownButtonGroupClassName,function(ae){ae.style("pointer-events","all")}),U=0;UT,z=A.barLength+2*A.barPad,I=A.barWidth+2*A.barPad,B=c,k=g+f;k+I>l&&(k=l-I);var O=this.container.selectAll("rect.scrollbar-horizontal").data(y?[0]:[]);O.exit().on(".drag",null).remove(),O.enter().append("rect").classed("scrollbar-horizontal",!0).call(P.fill,A.barColor),y?(this.hbar=O.attr({rx:A.barRadius,ry:A.barRadius,x:B,y:k,width:z,height:I}),this._hbarXMin=B+z/2,this._hbarTranslateMax=T-z):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var N=f>C,_=A.barWidth+2*A.barPad,U=A.barLength+2*A.barPad,Y=c+u,J=g;Y+_>n&&(Y=n-_);var te=this.container.selectAll("rect.scrollbar-vertical").data(N?[0]:[]);te.exit().on(".drag",null).remove(),te.enter().append("rect").classed("scrollbar-vertical",!0).call(P.fill,A.barColor),N?(this.vbar=te.attr({rx:A.barRadius,ry:A.barRadius,x:Y,y:J,width:_,height:U}),this._vbarYMin=J+U/2,this._vbarTranslateMax=C-U):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var ae=this.id,ce=x-.5,Q=N?S+_+.5:S+.5,Z=b-.5,j=y?a+I+.5:a+.5,K=s._topdefs.selectAll("#"+ae).data(y||N?[0]:[]);if(K.exit().remove(),K.enter().append("clipPath").attr("id",ae).append("rect"),y||N?(this._clipRect=K.select("rect").attr({x:Math.floor(ce),y:Math.floor(Z),width:Math.ceil(Q)-Math.floor(ce),height:Math.ceil(j)-Math.floor(Z)}),this.container.call(i.setClipUrl,ae,this.gd),this.bg.attr({x:c,y:g,width:u,height:f})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),y||N){var ee=m.behavior.drag().on("dragstart",function(){m.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(ee);var oe=m.behavior.drag().on("dragstart",function(){m.event.sourceEvent.preventDefault(),m.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));y&&this.hbar.on(".drag",null).call(oe),N&&this.vbar.on(".drag",null).call(oe)}this.setTranslate(t,r)},A.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},A.prototype._onBoxDrag=function(){var p=this.translateX,t=this.translateY;this.hbar&&(p-=m.event.dx),this.vbar&&(t-=m.event.dy),this.setTranslate(p,t)},A.prototype._onBoxWheel=function(){var p=this.translateX,t=this.translateY;this.hbar&&(p+=m.event.deltaY),this.vbar&&(t+=m.event.deltaY),this.setTranslate(p,t)},A.prototype._onBarDrag=function(){var p=this.translateX,t=this.translateY;if(this.hbar){var r=p+this._hbarXMin,s=r+this._hbarTranslateMax,n=L.constrain(m.event.x,r,s),l=(n-r)/(s-r),c=this.position.w-this._box.w;p=l*c}if(this.vbar){var u=t+this._vbarYMin,g=u+this._vbarTranslateMax,f=L.constrain(m.event.y,u,g),w=(f-u)/(g-u),h=this.position.h-this._box.h;t=w*h}this.setTranslate(p,t)},A.prototype.setTranslate=function(p,t){var r=this.position.w-this._box.w,s=this.position.h-this._box.h;if(p=L.constrain(p||0,0,r),t=L.constrain(t||0,0,s),this.translateX=p,this.translateY=t,this.container.call(i.setTranslate,this._box.l-this.position.l-p,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+p-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var n=p/r;this.hbar.call(i.setTranslate,p+n*this._hbarTranslateMax,t)}if(this.vbar){var l=t/s;this.vbar.call(i.setTranslate,p,t+l*this._vbarTranslateMax)}}},18783:function(G){G.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(G){G.exports={axisRefDescription:function(V,e,m){return["If set to a",V,"axis id (e.g. *"+V+"* or","*"+V+"2*), the `"+V+"` position refers to a",V,"coordinate. If set to *paper*, the `"+V+"`","position refers to the distance from the",e,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",e,"("+m+"). If set to a",V,"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.,","*"+V+"2 domain* refers to the domain of the second",V," axis and a",V,"position of 0.5 refers to the","point between the",e,"and the",m,"of the domain of the","second",V,"axis."].join(" ")}}},22372:function(G){G.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}},31562:function(G){G.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(G){G.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},29659:function(G){G.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(G){G.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}},37822:function(G){G.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},50606:function(G){G.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:24405875e-1,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"−"}},32396:function(G,V){V.CSS_DECLARATIONS=[["image-rendering","optimizeSpeed"],["image-rendering","-moz-crisp-edges"],["image-rendering","-o-crisp-edges"],["image-rendering","-webkit-optimize-contrast"],["image-rendering","optimize-contrast"],["image-rendering","crisp-edges"],["image-rendering","pixelated"]],V.STYLE=V.CSS_DECLARATIONS.map(function(e){return e.join(": ")+"; "}).join("")},77922:function(G,V){V.xmlns="http://www.w3.org/2000/xmlns/",V.svg="http://www.w3.org/2000/svg",V.xlink="http://www.w3.org/1999/xlink",V.svgAttrs={xmlns:V.svg,"xmlns:xlink":V.xlink}},8729:function(G,V,e){V.version=e(11506).version,e(7417),e(98847);for(var m=e(73972),P=V.register=m.register,i=e(10641),L=Object.keys(i),A=0;A",""," ",""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},99863:function(G,V){V.isLeftAnchor=function(m){return m.xanchor==="left"||m.xanchor==="auto"&&m.x<=.3333333333333333},V.isCenterAnchor=function(m){return m.xanchor==="center"||m.xanchor==="auto"&&m.x>.3333333333333333&&m.x<.6666666666666666},V.isRightAnchor=function(m){return m.xanchor==="right"||m.xanchor==="auto"&&m.x>=.6666666666666666},V.isTopAnchor=function(m){return m.yanchor==="top"||m.yanchor==="auto"&&m.y>=.6666666666666666},V.isMiddleAnchor=function(m){return m.yanchor==="middle"||m.yanchor==="auto"&&m.y>.3333333333333333&&m.y<.6666666666666666},V.isBottomAnchor=function(m){return m.yanchor==="bottom"||m.yanchor==="auto"&&m.y<=.3333333333333333}},26348:function(G,V,e){var m=e(64872),P=m.mod,i=m.modHalf,L=Math.PI,A=2*L;function v(w){return w/180*L}function p(w){return w/L*180}function t(w){return Math.abs(w[1]-w[0])>A-1e-14}function r(w,h){return i(h-w,A)}function s(w,h){return Math.abs(r(w,h))}function n(w,h){if(t(h))return!0;var o,d;h[0]d&&(d+=A);var M=P(w,A),T=M+A;return M>=o&&M<=d||T>=o&&T<=d}function l(w,h,o,d){if(!n(h,d))return!1;var M,T;return o[0]=M&&w<=T}function c(w,h,o,d,M,T,C){M=M||0,T=T||0;var x=t([o,d]),S,b,a,E,y;x?(S=0,b=L,a=A):og.max?c.set(u):c.set(+l)}},integer:{coerceFunction:function(l,c,u,g){l%1||!m(l)||g.min!==void 0&&lg.max?c.set(u):c.set(+l)}},string:{coerceFunction:function(l,c,u,g){if(typeof l!="string"){var f=typeof l=="number";g.strict===!0||!f?c.set(u):c.set(String(l))}else g.noBlank&&!l?c.set(u):c.set(l)}},color:{coerceFunction:function(l,c,u){P(l).isValid()?c.set(l):c.set(u)}},colorlist:{coerceFunction:function(l,c,u){function g(f){return P(f).isValid()}!Array.isArray(l)||!l.length?c.set(u):l.every(g)?c.set(l):c.set(u)}},colorscale:{coerceFunction:function(l,c,u){c.set(L.get(l,u))}},angle:{coerceFunction:function(l,c,u){l==="auto"?c.set("auto"):m(l)?c.set(r(+l,360)):c.set(u)}},subplotid:{coerceFunction:function(l,c,u,g){var f=g.regex||t(u);if(typeof l=="string"&&f.test(l)){c.set(l);return}c.set(u)},validateFunction:function(l,c){var u=c.dflt;return l===u?!0:typeof l!="string"?!1:!!t(u).test(l)}},flaglist:{coerceFunction:function(l,c,u,g){if((g.extras||[]).indexOf(l)!==-1){c.set(l);return}if(typeof l!="string"){c.set(u);return}for(var f=l.split("+"),w=0;w=o&&k<=d?k:v}if(typeof k!="string"&&typeof k!="number")return v;k=String(k);var Y=w(O),J=k.charAt(0);Y&&(J==="G"||J==="g")&&(k=k.substr(1),O="");var te=Y&&O.substr(0,7)==="chinese",ae=k.match(te?g:u);if(!ae)return v;var ce=ae[1],Q=ae[3]||"1",Z=Number(ae[5]||1),j=Number(ae[7]||0),K=Number(ae[9]||0),ee=Number(ae[11]||0);if(Y){if(ce.length===2)return v;ce=Number(ce);var oe;try{var q=l.getComponentMethod("calendars","getCal")(O);if(te){var $=Q.charAt(Q.length-1)==="i";Q=parseInt(Q,10),oe=q.newDate(ce,q.toMonthIndex(ce,Q,$),Z)}else oe=q.newDate(ce,Number(Q),Z)}catch{return v}return oe?(oe.toJD()-n)*p+j*t+K*r+ee*s:v}ce.length===2?ce=(Number(ce)+2e3-f)%100+f:ce=Number(ce),Q-=1;var le=new Date(Date.UTC(2e3,Q,Z,j,K));return le.setUTCFullYear(ce),le.getUTCMonth()!==Q||le.getUTCDate()!==Z?v:le.getTime()+ee*s},o=V.MIN_MS=V.dateTime2ms("-9999"),d=V.MAX_MS=V.dateTime2ms("9999-12-31 23:59:59.9999"),V.isDateTime=function(k,O){return V.dateTime2ms(k,O)!==v};function M(k,O){return String(k+Math.pow(10,O)).substr(1)}var T=90*p,C=3*t,x=5*r;V.ms2DateTime=function(k,O,N){if(typeof k!="number"||!(k>=o&&k<=d))return v;O||(O=0);var _=Math.floor(L(k+.05,1)*10),U=Math.round(k-_/10),Y,J,te,ae,ce,Q;if(w(N)){var Z=Math.floor(U/p)+n,j=Math.floor(L(k,p));try{Y=l.getComponentMethod("calendars","getCal")(N).fromJD(Z).formatDate("yyyy-mm-dd")}catch{Y=c("G%Y-%m-%d")(new Date(U))}if(Y.charAt(0)==="-")for(;Y.length<11;)Y="-0"+Y.substr(1);else for(;Y.length<10;)Y="0"+Y;J=O=o+p&&k<=d-p))return v;var O=Math.floor(L(k+.05,1)*10),N=new Date(Math.round(k-O/10)),_=m("%Y-%m-%d")(N),U=N.getHours(),Y=N.getMinutes(),J=N.getSeconds(),te=N.getUTCMilliseconds()*10+O;return S(_,U,Y,J,te)};function S(k,O,N,_,U){if((O||N||_||U)&&(k+=" "+M(O,2)+":"+M(N,2),(_||U)&&(k+=":"+M(_,2),U))){for(var Y=4;U%10===0;)Y-=1,U/=10;k+="."+M(U,Y)}return k}V.cleanDate=function(k,O,N){if(k===v)return O;if(V.isJSDate(k)||typeof k=="number"&&isFinite(k)){if(w(N))return i.error("JS Dates and milliseconds are incompatible with world calendars",k),O;if(k=V.ms2DateTimeLocal(+k),!k&&O!==void 0)return O}else if(!V.isDateTime(k,N))return i.error("unrecognized date",k),O;return k};var b=/%\d?f/g,a=/%h/g,E={1:"1",2:"1",3:"2",4:"2"};function y(k,O,N,_){k=k.replace(b,function(Y){var J=Math.min(+Y.charAt(1)||6,6),te=(O/1e3%1+2).toFixed(J).substr(2).replace(/0+$/,"")||"0";return te});var U=new Date(Math.floor(O+.05));if(k=k.replace(a,function(){return E[N("%q")(U)]}),w(_))try{k=l.getComponentMethod("calendars","worldCalFmt")(k,O,_)}catch{return"Invalid"}return N(k)(U)}var z=[59,59.9,59.99,59.999,59.9999];function I(k,O){var N=L(k+.05,p),_=M(Math.floor(N/t),2)+":"+M(L(Math.floor(N/r),60),2);if(O!=="M"){P(O)||(O=0);var U=Math.min(L(k/s,60),z[O]),Y=(100+U).toFixed(O).substr(1);O>0&&(Y=Y.replace(/0+$/,"").replace(/[\.]$/,"")),_+=":"+Y}return _}V.formatDate=function(k,O,N,_,U,Y){if(U=w(U)&&U,!O)if(N==="y")O=Y.year;else if(N==="m")O=Y.month;else if(N==="d")O=Y.dayMonth+` `+Y.year;else return I(k,N)+` `+y(Y.dayMonthYear,k,_,U);return y(O,k,_,U)};var B=3*p;V.incrementMonth=function(k,O,N){N=w(N)&&N;var _=L(k,p);if(k=Math.round(k-_),N)try{var U=Math.round(k/p)+n,Y=l.getComponentMethod("calendars","getCal")(N),J=Y.fromJD(U);return O%12?Y.add(J,O,"m"):Y.add(J,O/12,"y"),(J.toJD()-n)*p+_}catch{i.error("invalid ms "+k+" in calendar "+N)}var te=new Date(k+B);return te.setUTCMonth(te.getUTCMonth()+O)+_-B},V.findExactDates=function(k,O){for(var N=0,_=0,U=0,Y=0,J,te,ae=w(O)&&l.getComponentMethod("calendars","getCal")(O),ce=0;ce0&&I[B+1][0]<0)return B;return null}switch(x==="RUS"||x==="FJI"?b=function(I){var B;if(z(I)===null)B=I;else for(B=new Array(I.length),y=0;yB?k[O++]=[I[y][0]+360,I[y][1]]:y===B?(k[O++]=I[y],k[O++]=[I[y][0],-90]):k[O++]=I[y];var N=s.tester(k);N.pts.pop(),S.push(N)}:b=function(I){S.push(s.tester(I))},T.type){case"MultiPolygon":for(a=0;aS&&(S=E,C=a)}else C=T;return L.default(C).geometry.coordinates}function o(M){var T=window.PlotlyGeoAssets||{},C=[];function x(y){return new Promise(function(z,I){m.json(y,function(B,k){if(B){delete T[y];var O=B.status===404?'GeoJSON at URL "'+y+'" does not exist.':"Unexpected error while fetching from "+y;return I(new Error(O))}return T[y]=k,z(k)})})}function S(y){return new Promise(function(z,I){var B=0,k=setInterval(function(){if(T[y]&&T[y]!=="pending")return clearInterval(k),z(T[y]);if(B>100)return clearInterval(k),I("Unexpected error while fetching from "+y);B++},50)})}for(var b=0;b0&&(A.push(v),v=[])}return v.length>0&&A.push(v),A},V.makeLine=function(P){return P.length===1?{type:"LineString",coordinates:P[0]}:{type:"MultiLineString",coordinates:P}},V.makePolygon=function(P){if(P.length===1)return{type:"Polygon",coordinates:P};for(var i=new Array(P.length),L=0;L1||T<0||T>1?null:{x:p+g*T,y:t+h*T}}V.segmentDistance=function(t,r,s,n,l,c,u,g){if(P(t,r,s,n,l,c,u,g))return 0;var f=s-t,w=n-r,h=u-l,o=g-c,d=f*f+w*w,M=h*h+o*o,T=Math.min(i(f,w,d,l-t,c-r),i(f,w,d,u-t,g-r),i(h,o,M,t-l,r-c),i(h,o,M,s-l,n-c));return Math.sqrt(T)};function i(p,t,r,s,n){var l=s*p+n*t;if(l<0)return s*s+n*n;if(l>r){var c=s-p,u=n-t;return c*c+u*u}else{var g=s*t-n*p;return g*g/r}}var L,A,v;V.getTextLocation=function(t,r,s,n){if((t!==A||n!==v)&&(L={},A=t,v=n),L[s])return L[s];var l=t.getPointAtLength(m(s-n/2,r)),c=t.getPointAtLength(m(s+n/2,r)),u=Math.atan((c.y-l.y)/(c.x-l.x)),g=t.getPointAtLength(m(s,r)),f=(g.x*4+l.x+c.x)/6,w=(g.y*4+l.y+c.y)/6,h={x:f,y:w,theta:u};return L[s]=h,h},V.clearLocationCache=function(){A=null},V.getVisibleSegment=function(t,r,s){var n=r.left,l=r.right,c=r.top,u=r.bottom,g=0,f=t.getTotalLength(),w=f,h,o;function d(T){var C=t.getPointAtLength(T);T===0?h=C:T===f&&(o=C);var x=C.xl?C.x-l:0,S=C.yu?C.y-u:0;return Math.sqrt(x*x+S*S)}for(var M=d(g);M;){if(g+=M+s,g>w)return;M=d(g)}for(M=d(w);M;){if(w-=M+s,g>w)return;M=d(w)}return{min:g,max:w,len:w-g,total:f,isClosed:g===0&&w===f&&Math.abs(h.x-o.x)<.1&&Math.abs(h.y-o.y)<.1}},V.findPointOnPath=function(t,r,s,n){n=n||{};for(var l=n.pathLength||t.getTotalLength(),c=n.tolerance||.001,u=n.iterationLimit||30,g=t.getPointAtLength(0)[s]>t.getPointAtLength(l)[s]?-1:1,f=0,w=0,h=l,o,d,M;f0?h=o:w=o,f++}return d}},81697:function(G,V,e){var m=e(92770),P=e(84267),i=e(25075),L=e(21081),A=e(22399).defaultLine,v=e(73627).isArrayOrTypedArray,p=i(A),t=1;function r(u,g){var f=u;return f[3]*=g,f}function s(u){if(m(u))return p;var g=i(u);return g.length?g:p}function n(u){return m(u)?u:t}function l(u,g,f){var w=u.color,h=v(w),o=v(g),d=L.extractOpts(u),M=[],T,C,x,S,b;if(d.colorscale!==void 0?T=L.makeColorScaleFuncFromTrace(u):T=s,h?C=function(E,y){return E[y]===void 0?p:i(T(E[y]))}:C=s,o?x=function(E,y){return E[y]===void 0?t:n(E[y])}:x=n,h||o)for(var a=0;a1?(P*e+P*m)/P:e+m,L=String(i).length;if(L>16){var A=String(m).length,v=String(e).length;if(L>=v+A){var p=parseFloat(i).toPrecision(12);p.indexOf("e+")===-1&&(i=+p)}}return i}},71828:function(G,V,e){var m=e(39898),P=e(84096).g0,i=e(60721).WU,L=e(92770),A=e(50606),v=A.FP_SAFE,p=-v,t=A.BADNUM,r=G.exports={};r.adjustFormat=function(oe){return!oe||/^\d[.]\df/.test(oe)||/[.]\d%/.test(oe)?oe:oe==="0.f"?"~f":/^\d%/.test(oe)?"~%":/^\ds/.test(oe)?"~s":!/^[~,.0$]/.test(oe)&&/[&fps]/.test(oe)?"~"+oe:oe};var s={};r.warnBadFormat=function(ee){var oe=String(ee);s[oe]||(s[oe]=1,r.warn('encountered bad format: "'+oe+'"'))},r.noFormat=function(ee){return String(ee)},r.numberFormat=function(ee){var oe;try{oe=i(r.adjustFormat(ee))}catch{return r.warnBadFormat(ee),r.noFormat}return oe},r.nestedProperty=e(65487),r.keyedContainer=e(66636),r.relativeAttr=e(6962),r.isPlainObject=e(41965),r.toLogRange=e(58163),r.relinkPrivateKeys=e(51332);var n=e(73627);r.isTypedArray=n.isTypedArray,r.isArrayOrTypedArray=n.isArrayOrTypedArray,r.isArray1D=n.isArray1D,r.ensureArray=n.ensureArray,r.concat=n.concat,r.maxRowLength=n.maxRowLength,r.minRowLength=n.minRowLength;var l=e(64872);r.mod=l.mod,r.modHalf=l.modHalf;var c=e(96554);r.valObjectMeta=c.valObjectMeta,r.coerce=c.coerce,r.coerce2=c.coerce2,r.coerceFont=c.coerceFont,r.coercePattern=c.coercePattern,r.coerceHoverinfo=c.coerceHoverinfo,r.coerceSelectionMarkerOpacity=c.coerceSelectionMarkerOpacity,r.validate=c.validate;var u=e(41631);r.dateTime2ms=u.dateTime2ms,r.isDateTime=u.isDateTime,r.ms2DateTime=u.ms2DateTime,r.ms2DateTimeLocal=u.ms2DateTimeLocal,r.cleanDate=u.cleanDate,r.isJSDate=u.isJSDate,r.formatDate=u.formatDate,r.incrementMonth=u.incrementMonth,r.dateTick0=u.dateTick0,r.dfltRange=u.dfltRange,r.findExactDates=u.findExactDates,r.MIN_MS=u.MIN_MS,r.MAX_MS=u.MAX_MS;var g=e(65888);r.findBin=g.findBin,r.sorterAsc=g.sorterAsc,r.sorterDes=g.sorterDes,r.distinctVals=g.distinctVals,r.roundUp=g.roundUp,r.sort=g.sort,r.findIndexOfMin=g.findIndexOfMin,r.sortObjectKeys=e(78607);var f=e(80038);r.aggNums=f.aggNums,r.len=f.len,r.mean=f.mean,r.median=f.median,r.midRange=f.midRange,r.variance=f.variance,r.stdev=f.stdev,r.interp=f.interp;var w=e(35657);r.init2dArray=w.init2dArray,r.transposeRagged=w.transposeRagged,r.dot=w.dot,r.translationMatrix=w.translationMatrix,r.rotationMatrix=w.rotationMatrix,r.rotationXYMatrix=w.rotationXYMatrix,r.apply3DTransform=w.apply3DTransform,r.apply2DTransform=w.apply2DTransform,r.apply2DTransform2=w.apply2DTransform2,r.convertCssMatrix=w.convertCssMatrix,r.inverseTransformMatrix=w.inverseTransformMatrix;var h=e(26348);r.deg2rad=h.deg2rad,r.rad2deg=h.rad2deg,r.angleDelta=h.angleDelta,r.angleDist=h.angleDist,r.isFullCircle=h.isFullCircle,r.isAngleInsideSector=h.isAngleInsideSector,r.isPtInsideSector=h.isPtInsideSector,r.pathArc=h.pathArc,r.pathSector=h.pathSector,r.pathAnnulus=h.pathAnnulus;var o=e(99863);r.isLeftAnchor=o.isLeftAnchor,r.isCenterAnchor=o.isCenterAnchor,r.isRightAnchor=o.isRightAnchor,r.isTopAnchor=o.isTopAnchor,r.isMiddleAnchor=o.isMiddleAnchor,r.isBottomAnchor=o.isBottomAnchor;var d=e(87642);r.segmentsIntersect=d.segmentsIntersect,r.segmentDistance=d.segmentDistance,r.getTextLocation=d.getTextLocation,r.clearLocationCache=d.clearLocationCache,r.getVisibleSegment=d.getVisibleSegment,r.findPointOnPath=d.findPointOnPath;var M=e(1426);r.extendFlat=M.extendFlat,r.extendDeep=M.extendDeep,r.extendDeepAll=M.extendDeepAll,r.extendDeepNoArrays=M.extendDeepNoArrays;var T=e(47769);r.log=T.log,r.warn=T.warn,r.error=T.error;var C=e(30587);r.counterRegex=C.counter;var x=e(79990);r.throttle=x.throttle,r.throttleDone=x.done,r.clearThrottle=x.clear;var S=e(24401);r.getGraphDiv=S.getGraphDiv,r.isPlotDiv=S.isPlotDiv,r.removeElement=S.removeElement,r.addStyleRule=S.addStyleRule,r.addRelatedStyleRule=S.addRelatedStyleRule,r.deleteRelatedStyleRule=S.deleteRelatedStyleRule,r.getFullTransformMatrix=S.getFullTransformMatrix,r.getElementTransformMatrix=S.getElementTransformMatrix,r.getElementAndAncestors=S.getElementAndAncestors,r.equalDomRects=S.equalDomRects,r.clearResponsive=e(86367),r.preserveDrawingBuffer=e(45142),r.makeTraceGroups=e(77310),r._=e(15867),r.notifier=e(75046),r.filterUnique=e(75744),r.filterVisible=e(76756),r.pushUnique=e(75138),r.increment=e(39240),r.cleanNumber=e(95218),r.ensureNumber=function(oe){return L(oe)?(oe=Number(oe),oe>v||oe=oe?!1:L(ee)&&ee>=0&&ee%1===0},r.noop=e(64213),r.identity=e(23389),r.repeat=function(ee,oe){for(var q=new Array(oe),$=0;$q?Math.max(q,Math.min(oe,ee)):Math.max(oe,Math.min(q,ee))},r.bBoxIntersect=function(ee,oe,q){return q=q||0,ee.left<=oe.right+q&&oe.left<=ee.right+q&&ee.top<=oe.bottom+q&&oe.top<=ee.bottom+q},r.simpleMap=function(ee,oe,q,$,le){for(var ie=ee.length,he=new Array(ie),me=0;me=Math.pow(2,q)?le>10?(r.warn("randstr failed uniqueness"),he):ee(oe,q,$,(le||0)+1):he},r.OptionControl=function(ee,oe){ee||(ee={}),oe||(oe="opt");var q={};return q.optionList=[],q._newoption=function($){$[oe]=ee,q[$.name]=$,q.optionList.push($)},q["_"+oe]=ee,q},r.smooth=function(ee,oe){if(oe=Math.round(oe)||0,oe<2)return ee;var q=ee.length,$=2*q,le=2*oe-1,ie=new Array(le),he=new Array(q),me,Me,Te,Oe;for(me=0;me=$&&(Te-=$*Math.floor(Te/$)),Te<0?Te=-1-Te:Te>=q&&(Te=$-1-Te),Oe+=ee[Te]*ie[Me];he[me]=Oe}return he},r.syncOrAsync=function(ee,oe,q){var $,le;function ie(){return r.syncOrAsync(ee,oe,q)}for(;ee.length;)if(le=ee.splice(0,1)[0],$=le(oe),$&&$.then)return $.then(ie);return q&&q(oe)},r.stripTrailingSlash=function(ee){return ee.substr(-1)==="/"?ee.substr(0,ee.length-1):ee},r.noneOrAll=function(ee,oe,q){if(ee){var $=!1,le=!0,ie,he;for(ie=0;ie0?le:0})},r.fillArray=function(ee,oe,q,$){if($=$||r.identity,r.isArrayOrTypedArray(ee))for(var le=0;le1?le+he[1]:"";if(ie&&(he.length>1||me.length>4||q))for(;$.test(me);)me=me.replace($,"$1"+ie+"$2");return me+Me},r.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var O=/^\w*$/;r.templateString=function(ee,oe){var q={};return ee.replace(r.TEMPLATE_STRING_REGEX,function($,le){var ie;return O.test(le)?ie=oe[le]:(q[le]=q[le]||r.nestedProperty(oe,le).get,ie=q[le]()),r.isValidTextValue(ie)?ie:""})};var N={max:10,count:0,name:"hovertemplate"};r.hovertemplateString=function(){return ae.apply(N,arguments)};var _={max:10,count:0,name:"texttemplate"};r.texttemplateString=function(){return ae.apply(_,arguments)};var U=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function Y(ee){var oe=ee.match(U);return oe?{key:oe[1],op:oe[2],number:Number(oe[3])}:{key:ee,op:null,number:null}}var J={max:10,count:0,name:"texttemplate",parseMultDiv:!0};r.texttemplateStringForShapes=function(){return ae.apply(J,arguments)};var te=/^[:|\|]/;function ae(ee,oe,q){var $=this,le=arguments;oe||(oe={});var ie={};return ee.replace(r.TEMPLATE_STRING_REGEX,function(he,me,Me){var Te=me==="xother"||me==="yother",Oe=me==="_xother"||me==="_yother",Ne=me==="_xother_"||me==="_yother_",Ee=me==="xother_"||me==="yother_",xe=Te||Oe||Ee||Ne,Se=me;(Oe||Ne)&&(Se=Se.substring(1)),(Ee||Ne)&&(Se=Se.substring(0,Se.length-1));var Ue=null,He=null;if($.parseMultDiv){var Fe=Y(Se);Se=Fe.key,Ue=Fe.op,He=Fe.number}var Ge;if(xe){if(Ge=oe[Se],Ge===void 0)return""}else{var nt,qe;for(qe=3;qe=ce&&he<=Q,Te=me>=ce&&me<=Q;if(Me&&($=10*$+he-ce),Te&&(le=10*le+me-ce),!Me||!Te){if($!==le)return $-le;if(he!==me)return he-me}}return le-$};var Z=2e9;r.seedPseudoRandom=function(){Z=2e9},r.pseudoRandom=function(){var ee=Z;return Z=(69069*Z+1)%4294967296,Math.abs(Z-ee)<429496729?r.pseudoRandom():Z/4294967296},r.fillText=function(ee,oe,q){var $=Array.isArray(q)?function(he){q.push(he)}:function(he){q.text=he},le=r.extractOption(ee,oe,"htx","hovertext");if(r.isValidTextValue(le))return $(le);var ie=r.extractOption(ee,oe,"tx","text");if(r.isValidTextValue(ie))return $(ie)},r.isValidTextValue=function(ee){return ee||ee===0},r.formatPercent=function(ee,oe){oe=oe||0;for(var q=(Math.round(100*ee*Math.pow(10,oe))*Math.pow(.1,oe)).toFixed(oe)+"%",$=0;$1&&(Te=1):Te=0,r.strTranslate(le-Te*(q+he),ie-Te*($+me))+r.strScale(Te)+(Me?"rotate("+Me+(oe?"":" "+q+" "+$)+")":"")},r.setTransormAndDisplay=function(ee,oe){ee.attr("transform",r.getTextTransform(oe)),ee.style("display",oe.scale?null:"none")},r.ensureUniformFontSize=function(ee,oe){var q=r.extendFlat({},oe);return q.size=Math.max(oe.size,ee._fullLayout.uniformtext.minsize||0),q},r.join2=function(ee,oe,q){var $=ee.length;return $>1?ee.slice(0,-1).join(oe)+q+ee[$-1]:ee.join(oe)},r.bigFont=function(ee){return Math.round(1.2*ee)};var j=r.getFirefoxVersion(),K=j!==null&&j<86;r.getPositionFromD3Event=function(){return K?[m.event.layerX,m.event.layerY]:[m.event.offsetX,m.event.offsetY]}},41965:function(G){G.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(G,V,e){var m=e(65487),P=/^\w*$/,i=0,L=1,A=2,v=3,p=4;G.exports=function(r,s,n,l){n=n||"name",l=l||"value";var c,u,g,f={};s&&s.length?(g=m(r,s),u=g.get()):u=r,s=s||"";var w={};if(u)for(c=0;c2)return f[M]=f[M]|A,o.set(d,null);if(h){for(c=M;c1){var A=["LOG:"];for(L=0;L1){var v=[];for(L=0;L"),"long")}},i.warn=function(){var L;if(m.logging>0){var A=["WARN:"];for(L=0;L0){var v=[];for(L=0;L"),"stick")}},i.error=function(){var L;if(m.logging>0){var A=["ERROR:"];for(L=0;L0){var v=[];for(L=0;L"),"stick")}}},77310:function(G,V,e){var m=e(39898);G.exports=function(i,L,A){var v=i.selectAll("g."+A.replace(/\s/g,".")).data(L,function(t){return t[0].trace.uid});v.exit().remove(),v.enter().append("g").attr("class",A),v.order();var p=i.classed("rangeplot")?"nodeRangePlot3":"node3";return v.each(function(t){t[0][p]=m.select(this)}),v}},35657:function(G,V,e){var m=e(79576);V.init2dArray=function(P,i){for(var L=new Array(P),A=0;AP/2?m-Math.round(m/P)*P:m}G.exports={mod:V,modHalf:e}},65487:function(G,V,e){var m=e(92770),P=e(73627).isArrayOrTypedArray;G.exports=function(l,c){if(m(c))c=String(c);else if(typeof c!="string"||c.substr(c.length-4)==="[-1]")throw"bad property string";var u=c.split("."),g,f,w,h;for(h=0;h/g),u=0;ut||M===P||Ms||o&&c(h))}function g(h,o){var d=h[0],M=h[1];if(d===P||dt||M===P||Ms)return!1;var T=v.length,C=v[0][0],x=v[0][1],S=0,b,a,E,y,z;for(b=1;bMath.max(a,C)||M>Math.max(E,x)))if(Mn||Math.abs(m(g,c))>t)return!0;return!1},i.filter=function(A,v){var p=[A[0]],t=0,r=0;function s(l){A.push(l);var c=p.length,u=t;p.splice(r+1);for(var g=u+1;g1){var n=A.pop();s(n)}return{addPt:s,raw:A,filtered:p}}},79749:function(G,V,e){var m=e(58617),P=e(98580);G.exports=function(L,A,v){var p=L._fullLayout,t=!0;return p._glcanvas.each(function(r){if(r.regl){r.regl.preloadCachedCode(v);return}if(!(r.pick&&!p._has("parcoords"))){try{r.regl=P({canvas:this,attributes:{antialias:!r.pick,preserveDrawingBuffer:!0},pixelRatio:L._context.plotGlPixelRatio||e.g.devicePixelRatio,extensions:A||[],cachedCode:v||{}})}catch{t=!1}r.regl||(t=!1),t&&this.addEventListener("webglcontextlost",function(s){L&&L.emit&&L.emit("plotly_webglcontextlost",{event:s,layer:r.key})},!1)}}),t||m({container:p._glcontainer.node()}),t}},45142:function(G,V,e){var m=e(92770),P=e(35791);G.exports=function(A){var v;if(A&&A.hasOwnProperty("userAgent")?v=A.userAgent:v=i(),typeof v!="string")return!0;var p=P({ua:{headers:{"user-agent":v}},tablet:!0,featureDetect:!1});if(!p)for(var t=v.split(" "),r=1;r-1;n--){var l=t[n];if(l.substr(0,8)==="Version/"){var c=l.substr(8).split(".")[0];if(m(c)&&(c=+c),c>=13)return!0}}}return p};function i(){var L;return typeof navigator<"u"&&(L=navigator.userAgent),L&&L.headers&&typeof L.headers["user-agent"]=="string"&&(L=L.headers["user-agent"]),L}},75138:function(G){G.exports=function(e,m){if(m instanceof RegExp){for(var P=m.toString(),i=0;iP.queueLength&&(A.undoQueue.queue.shift(),A.undoQueue.index--)},L.startSequence=function(A){A.undoQueue=A.undoQueue||{index:0,queue:[],sequence:!1},A.undoQueue.sequence=!0,A.undoQueue.beginSequence=!0},L.stopSequence=function(A){A.undoQueue=A.undoQueue||{index:0,queue:[],sequence:!1},A.undoQueue.sequence=!1,A.undoQueue.beginSequence=!1},L.undo=function(v){var p,t;if(!(v.undoQueue===void 0||isNaN(v.undoQueue.index)||v.undoQueue.index<=0)){for(v.undoQueue.index--,p=v.undoQueue.queue[v.undoQueue.index],v.undoQueue.inSequence=!0,t=0;t=v.undoQueue.queue.length)){for(p=v.undoQueue.queue[v.undoQueue.index],v.undoQueue.inSequence=!0,t=0;t1?(n[u-1]-n[0])/(u-1):1,w,h;for(f>=0?h=l?v:p:h=l?r:t,s+=f*A*(l?-1:1)*(f>=0?1:-1);c90&&P.log("Long binary search..."),c-1};function v(s,n){return sn}function r(s,n){return s>=n}V.sorterAsc=function(s,n){return s-n},V.sorterDes=function(s,n){return n-s},V.distinctVals=function(s){var n=s.slice();n.sort(V.sorterAsc);var l;for(l=n.length-1;l>-1&&n[l]===L;l--);for(var c=n[l]-n[0]||1,u=c/(l||1)/1e4,g=[],f,w=0;w<=l;w++){var h=n[w],o=h-f;f===void 0?(g.push(h),f=h):o>u&&(c=Math.min(c,o),g.push(h),f=h)}return{vals:g,minDiff:c}},V.roundUp=function(s,n,l){for(var c=0,u=n.length-1,g,f=0,w=l?0:1,h=l?1:0,o=l?Math.ceil:Math.floor;c0&&(c=1),l&&c)return s.sort(n)}return c?s:s.reverse()},V.findIndexOfMin=function(s,n){n=n||i;for(var l=1/0,c,u=0;uA.length)&&(v=A.length),m(L)||(L=!1),P(A[0])){for(t=new Array(v),p=0;pi.length-1)return i[i.length-1];var A=L%1;return A*i[Math.ceil(L)]+(1-A)*i[Math.floor(L)]}},78614:function(G,V,e){var m=e(25075);function P(i){return i?m(i):[0,0,0,1]}G.exports=P},3883:function(G,V,e){var m=e(32396),P=e(91424),i=e(71828),L=null;function A(){if(L!==null)return L;L=!1;var v=i.isIE()||i.isSafari()||i.isIOS();if(window.navigator.userAgent&&!v){var p=Array.from(m.CSS_DECLARATIONS).reverse(),t=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof t=="function")L=p.some(function(l){return t.apply(null,l)});else{var r=P.tester.append("image").attr("style",m.STYLE),s=window.getComputedStyle(r.node()),n=s.imageRendering;L=p.some(function(l){var c=l[1];return n===c||n===c.toLowerCase()}),r.remove()}}return L}G.exports=A},63893:function(G,V,e){var m=e(39898),P=e(71828),i=P.strTranslate,L=e(77922),A=e(18783).LINE_SPACING,v=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;V.convertToTspans=function(N,_,U){var Y=N.text(),J=!N.attr("data-notex")&&_&&_._context.typesetMath&&typeof MathJax<"u"&&Y.match(v),te=m.select(N.node().parentNode);if(te.empty())return;var ae=N.attr("class")?N.attr("class").split(" ")[0]:"text";ae+="-math",te.selectAll("svg."+ae).remove(),te.selectAll("g."+ae+"-group").remove(),N.style("display",null).attr({"data-unformatted":Y,"data-math":"N"});function ce(){te.empty()||(ae=N.attr("class")+"-math",te.select("svg."+ae).remove()),N.text("").style("white-space","pre");var Q=I(N.node(),Y);Q&&N.style("pointer-events","all"),V.positionText(N),U&&U.call(N)}return J?(_&&_._promises||[]).push(new Promise(function(Q){N.style("display","none");var Z=parseInt(N.node().style.fontSize,10),j={fontSize:Z};n(J[2],j,function(K,ee,oe){te.selectAll("svg."+ae).remove(),te.selectAll("g."+ae+"-group").remove();var q=K&&K.select("svg");if(!q||!q.node()){ce(),Q();return}var $=te.append("g").classed(ae+"-group",!0).attr({"pointer-events":"none","data-unformatted":Y,"data-math":"Y"});$.node().appendChild(q.node()),ee&&ee.node()&&q.node().insertBefore(ee.node().cloneNode(!0),q.node().firstChild);var le=oe.width,ie=oe.height;q.attr({class:ae,height:ie,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var he=N.node().style.fill||"black",me=q.select("g");me.attr({fill:he,stroke:he});var Me=me.node().getBoundingClientRect(),Te=Me.width,Oe=Me.height;(Te>le||Oe>ie)&&(q.style("overflow","hidden"),Me=q.node().getBoundingClientRect(),Te=Me.width,Oe=Me.height);var Ne=+N.attr("x"),Ee=+N.attr("y"),xe=Z||N.node().getBoundingClientRect().height,Se=-xe/4;if(ae[0]==="y")$.attr({transform:"rotate("+[-90,Ne,Ee]+")"+i(-Te/2,Se-Oe/2)});else if(ae[0]==="l")Ee=Se-Oe/2;else if(ae[0]==="a"&&ae.indexOf("atitle")!==0)Ne=0,Ee=Se;else{var Ue=N.attr("text-anchor");Ne=Ne-Te*(Ue==="middle"?.5:Ue==="end"?1:0),Ee=Ee+Se-Oe/2}q.attr({x:Ne,y:Ee}),U&&U.call(N,$),Q($)})})):ce(),N};var p=/(<|<|<)/g,t=/(>|>|>)/g;function r(N){return N.replace(p,"\\lt ").replace(t,"\\gt ")}var s=[["$","$"],["\\(","\\)"]];function n(N,_,U){var Y=parseInt((MathJax.version||"").split(".")[0]);if(Y!==2&&Y!==3){P.warn("No MathJax version:",MathJax.version);return}var J,te,ae,ce,Q=function(){return te=P.extendDeepAll({},MathJax.Hub.config),ae=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:s},displayAlign:"left"})},Z=function(){te=P.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=s},j=function(){if(J=MathJax.Hub.config.menuSettings.renderer,J!=="SVG")return MathJax.Hub.setRenderer("SVG")},K=function(){J=MathJax.config.startup.output,J!=="svg"&&(MathJax.config.startup.output="svg")},ee=function(){var he="math-output-"+P.randstr({},64);ce=m.select("body").append("div").attr({id:he}).style({visibility:"hidden",position:"absolute","font-size":_.fontSize+"px"}).text(r(N));var me=ce.node();return Y===2?MathJax.Hub.Typeset(me):MathJax.typeset([me])},oe=function(){var he=ce.select(Y===2?".MathJax_SVG":".MathJax"),me=!he.empty()&&ce.select("svg").node();if(!me)P.log("There was an error in the tex syntax.",N),U();else{var Me=me.getBoundingClientRect(),Te;Y===2?Te=m.select("body").select("#MathJax_SVG_glyphs"):Te=he.select("defs"),U(he,Te,Me)}ce.remove()},q=function(){if(J!=="SVG")return MathJax.Hub.setRenderer(J)},$=function(){J!=="svg"&&(MathJax.config.startup.output=J)},le=function(){return ae!==void 0&&(MathJax.Hub.processSectionDelay=ae),MathJax.Hub.Config(te)},ie=function(){MathJax.config=te};Y===2?MathJax.Hub.Queue(Q,j,ee,oe,q,le):Y===3&&(Z(),K(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){ee(),oe(),$(),ie()}))}var l={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"},c={sub:"0.3em",sup:"-0.6em"},u={sub:"-0.21em",sup:"0.42em"},g="​",f=["http:","https:","mailto:","",void 0,":"],w=V.NEWLINES=/(\r\n?|\n)/g,h=/(<[^<>]*>)/,o=/<(\/?)([^ >]*)(\s+(.*))?>/i,d=//i;V.BR_TAG_ALL=//gi;var M=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,T=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,C=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,x=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function S(N,_){if(!N)return null;var U=N.match(_),Y=U&&(U[3]||U[4]);return Y&&y(Y)}var b=/(^|;)\s*color:/;V.plainText=function(N,_){_=_||{};for(var U=_.len!==void 0&&_.len!==-1?_.len:1/0,Y=_.allowedTags!==void 0?_.allowedTags:["br"],J="...",te=J.length,ae=N.split(h),ce=[],Q="",Z=0,j=0;jte?ce.push(K.substr(0,$-te)+J):ce.push(K.substr(0,$));break}Q=""}}return ce.join("")};var a={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},E=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function y(N){return N.replace(E,function(_,U){var Y;return U.charAt(0)==="#"?Y=z(U.charAt(1)==="x"?parseInt(U.substr(2),16):parseInt(U.substr(1),10)):Y=a[U],Y||_})}V.convertEntities=y;function z(N){if(!(N>1114111)){var _=String.fromCodePoint;if(_)return _(N);var U=String.fromCharCode;return N<=65535?U(N):U((N>>10)+55232,N%1024+56320)}}function I(N,_){_=_.replace(w," ");var U=!1,Y=[],J,te=-1;function ae(){te++;var Oe=document.createElementNS(L.svg,"tspan");m.select(Oe).attr({class:"line",dy:te*A+"em"}),N.appendChild(Oe),J=Oe;var Ne=Y;if(Y=[{node:Oe}],Ne.length>1)for(var Ee=1;Ee.",_);return}var Ne=Y.pop();Oe!==Ne.type&&P.log("Start tag <"+Ne.type+"> doesnt match end tag <"+Oe+">. Pretending it did match.",_),J=Y[Y.length-1].node}var j=d.test(_);j?ae():(J=N,Y=[{node:N}]);for(var K=_.split(h),ee=0;eev.ts+L){r();return}v.timer=setTimeout(function(){r(),v.timer=null},L)},V.done=function(P){var i=e[P];return!i||!i.timer?Promise.resolve():new Promise(function(L){var A=i.onDone;i.onDone=function(){A&&A(),L(),i.onDone=null}})},V.clear=function(P){if(P)m(e[P]),delete e[P];else for(var i in e)V.clear(i)};function m(P){P&&P.timer!==null&&(clearTimeout(P.timer),P.timer=null)}},58163:function(G,V,e){var m=e(92770);G.exports=function(i,L){if(i>0)return Math.log(i)/Math.LN10;var A=Math.log(Math.min(L[0],L[1]))/Math.LN10;return m(A)||(A=Math.log(Math.max(L[0],L[1]))/Math.LN10-6),A}},90973:function(G,V,e){var m=G.exports={},P=e(78776).locationmodeToLayer,i=e(96892).zL;m.getTopojsonName=function(L){return[L.scope.replace(/ /g,"-"),"_",L.resolution.toString(),"m"].join("")},m.getTopojsonPath=function(L,A){return L+A+".json"},m.getTopojsonFeatures=function(L,A){var v=P[L.locationmode],p=A.objects[v];return i(A,p).features}},37815:function(G){G.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},92177:function(G){G.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(G,V,e){var m=e(73972);G.exports=function(i){for(var L=m.layoutArrayContainers,A=m.layoutArrayRegexes,v=i.split("[")[0],p,t,r=0;r0&&L.log("Clearing previous rejected promises from queue."),d._promises=[]},V.cleanLayout=function(d){var M,T;d||(d={}),d.xaxis1&&(d.xaxis||(d.xaxis=d.xaxis1),delete d.xaxis1),d.yaxis1&&(d.yaxis||(d.yaxis=d.yaxis1),delete d.yaxis1),d.scene1&&(d.scene||(d.scene=d.scene1),delete d.scene1);var C=(A.subplotsRegistry.cartesian||{}).attrRegex,x=(A.subplotsRegistry.polar||{}).attrRegex,S=(A.subplotsRegistry.ternary||{}).attrRegex,b=(A.subplotsRegistry.gl3d||{}).attrRegex,a=Object.keys(d);for(M=0;M3?(j.x=1.02,j.xanchor="left"):j.x<-2&&(j.x=-.02,j.xanchor="right"),j.y>3?(j.y=1.02,j.yanchor="bottom"):j.y<-2&&(j.y=-.02,j.yanchor="top")),l(d),d.dragmode==="rotate"&&(d.dragmode="orbit"),p.clean(d),d.template&&d.template.layout&&V.cleanLayout(d.template.layout),d};function n(d,M){var T=d[M],C=M.charAt(0);T&&T!=="paper"&&(d[M]=t(T,C,!0))}function l(d){d&&((typeof d.title=="string"||typeof d.title=="number")&&(d.title={text:d.title}),M("titlefont","font"),M("titleposition","position"),M("titleside","side"),M("titleoffset","offset"));function M(T,C){var x=d[T],S=d.title&&d.title[C];x&&!S&&(d.title||(d.title={}),d.title[C]=d[T],delete d[T])}}V.cleanData=function(d){for(var M=0;M0)return d.substr(0,M)}V.hasParent=function(d,M){for(var T=h(M);T;){if(T in d)return!0;T=h(T)}return!1};var o=["x","y","z"];V.clearAxisTypes=function(d,M,T){for(var C=0;C1&&i.warn("Full array edits are incompatible with other edits",u);var M=n[""][""];if(p(M))s.set(null);else if(Array.isArray(M))s.set(M);else return i.warn("Unrecognized full array edit value",u,M),!0;return h?!1:(g(o,d),f(r),!0)}var T=Object.keys(n).map(Number).sort(L),C=s.get(),x=C||[],S=c(d,u).get(),b=[],a=-1,E=x.length,y,z,I,B,k,O,N,_;for(y=0;yx.length-(N?0:1)){i.warn("index out of range",u,I);continue}if(O!==void 0)k.length>1&&i.warn("Insertion & removal are incompatible with edits to the same index.",u,I),p(O)?b.push(I):N?(O==="add"&&(O={}),x.splice(I,0,O),S&&S.splice(I,0,{})):i.warn("Unrecognized full object edit value",u,I,O),a===-1&&(a=I);else for(z=0;z=0;y--)x.splice(b[y],1),S&&S.splice(b[y],1);if(x.length?C||s.set(x):s.set(null),h)return!1;if(g(o,d),w!==P){var U;if(a===-1)U=T;else{for(E=Math.max(x.length,E),U=[],y=0;y=a));y++)U.push(I);for(y=a;y=se.data.length||ot<-se.data.length)throw new Error(Le+" must be valid indices for gd.data.");if(ye.indexOf(ot,Be+1)>-1||ot>=0&&ye.indexOf(-se.data.length+ot)>-1||ot<0&&ye.indexOf(se.data.length+ot)>-1)throw new Error("each index in "+Le+" must be unique.")}}function N(se,ye,Le){if(!Array.isArray(se.data))throw new Error("gd.data must be an array.");if(typeof ye>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(ye)||(ye=[ye]),O(se,ye,"currentIndices"),typeof Le<"u"&&!Array.isArray(Le)&&(Le=[Le]),typeof Le<"u"&&O(se,Le,"newIndices"),typeof Le<"u"&&ye.length!==Le.length)throw new Error("current and new indices must be of equal length.")}function _(se,ye,Le){var Be,ot;if(!Array.isArray(se.data))throw new Error("gd.data must be an array.");if(typeof ye>"u")throw new Error("traces must be defined.");for(Array.isArray(ye)||(ye=[ye]),Be=0;Be"u")throw new Error("indices must be an integer or array of integers");O(se,Le,"indices");for(var at in ye){if(!Array.isArray(ye[at])||ye[at].length!==Le.length)throw new Error("attribute "+at+" must be an array of length equal to indices array length");if(ot&&(!(at in Be)||!Array.isArray(Be[at])||Be[at].length!==ye[at].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")}}function Y(se,ye,Le,Be){var ot=L.isPlainObject(Be),at=[],wt,It,Bt,Gt,Lt;Array.isArray(Le)||(Le=[Le]),Le=k(Le,se.data.length-1);for(var Kt in ye)for(var ir=0;ir=0&&Lt=0&&Lt"u")return Gt=V.redraw(se),p.add(se,ot,wt,at,It),Gt;Array.isArray(Le)||(Le=[Le]);try{N(se,Be,Le)}catch(Lt){throw se.data.splice(se.data.length-ye.length,ye.length),Lt}return p.startSequence(se),p.add(se,ot,wt,at,It),Gt=V.moveTraces(se,Be,Le),p.stopSequence(se),Gt}function Z(se,ye){se=L.getGraphDiv(se);var Le=[],Be=V.addTraces,ot=Z,at=[se,Le,ye],wt=[se,ye],It,Bt;if(typeof ye>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(ye)||(ye=[ye]),O(se,ye,"indices"),ye=k(ye,se.data.length-1),ye.sort(L.sorterDes),It=0;It"u")for(Le=[],Gt=0;Gt-1&&at.indexOf("grouptitlefont")===-1?It(at,at.replace("titlefont","title.font")):at.indexOf("titleposition")>-1?It(at,at.replace("titleposition","title.position")):at.indexOf("titleside")>-1?It(at,at.replace("titleside","title.side")):at.indexOf("titleoffset")>-1&&It(at,at.replace("titleoffset","title.offset"));function It(Bt,Gt){se[Gt]=se[Bt],delete se[Bt]}}function he(se,ye,Le){se=L.getGraphDiv(se),o.clearPromiseQueue(se);var Be={};if(typeof ye=="string")Be[ye]=Le;else if(L.isPlainObject(ye))Be=L.extendFlat({},ye);else return L.warn("Relayout fail.",ye,Le),Promise.reject();Object.keys(Be).length&&(se.changed=!0);var ot=Ee(se,Be),at=ot.flags;at.calc&&(se.calcdata=void 0);var wt=[s.previousPromises];at.layoutReplot?wt.push(d.layoutReplot):Object.keys(Be).length&&(me(se,at,ot)||s.supplyDefaults(se),at.legend&&wt.push(d.doLegend),at.layoutstyle&&wt.push(d.layoutStyles),at.axrange&&Me(wt,ot.rangesAltered),at.ticks&&wt.push(d.doTicksRelayout),at.modebar&&wt.push(d.doModeBar),at.camera&&wt.push(d.doCamera),at.colorbars&&wt.push(d.doColorBars),wt.push(b)),wt.push(s.rehover,s.redrag,s.reselect),p.add(se,he,[se,ot.undoit],he,[se,ot.redoit]);var It=L.syncOrAsync(wt,se);return(!It||!It.then)&&(It=Promise.resolve(se)),It.then(function(){return se.emit("plotly_relayout",ot.eventData),se})}function me(se,ye,Le){var Be=se._fullLayout;if(!ye.axrange)return!1;for(var ot in ye)if(ot!=="axrange"&&ye[ot])return!1;for(var at in Le.rangesAltered){var wt=n.id2name(at),It=se.layout[wt],Bt=Be[wt];Bt.autorange=It.autorange;var Gt=Bt._rangeInitial0,Lt=Bt._rangeInitial1;if(Gt===void 0&&Lt!==void 0||Gt!==void 0&&Lt===void 0)return!1;if(It.range&&(Bt.range=It.range.slice()),Bt.cleanRange(),Bt._matchGroup){for(var Kt in Bt._matchGroup)if(Kt!==at){var ir=Be[n.id2name(Kt)];ir.autorange=Bt.autorange,ir.range=Bt.range.slice(),ir._input.range=Bt.range.slice()}}}return!0}function Me(se,ye){var Le=ye?function(Be){var ot=[],at=!0;for(var wt in ye){var It=n.getFromId(Be,wt);if(ot.push(wt),(It.ticklabelposition||"").indexOf("inside")!==-1&&It._anchorAxis&&ot.push(It._anchorAxis._id),It._matchGroup)for(var Bt in It._matchGroup)ye[Bt]||ot.push(Bt)}return n.draw(Be,ot,{skipTitle:at})}:function(Be){return n.draw(Be,"redraw")};se.push(f,d.doAutoRangeAndConstraints,Le,d.drawData,d.finalDraw)}var Te=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,Oe=/^[xyz]axis[0-9]*\.autorange$/,Ne=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function Ee(se,ye){var Le=se.layout,Be=se._fullLayout,ot=Be._guiEditing,at=oe(Be._preGUI,ot),wt=Object.keys(ye),It=n.list(se),Bt=L.extendDeepAll({},ye),Gt={},Lt,Kt,ir;for(ie(ye),wt=Object.keys(ye),Kt=0;Kt0&&typeof St.parts[$t]!="string";)$t--;var Qt=St.parts[$t],or=St.parts[$t-1]+"."+Qt,Er=St.parts.slice(0,$t).join("."),Ye=A(se.layout,Er).get(),We=A(Be,Er).get(),Dt=St.get();if(_t!==void 0){br[Ct]=_t,hr[Ct]=Qt==="reverse"?_t:ee(Dt);var Ft=r.getLayoutValObject(Be,St.parts);if(Ft&&Ft.impliedEdits&&_t!==null)for(var Zt in Ft.impliedEdits)ut(L.relativeAttr(Ct,Zt),Ft.impliedEdits[Zt]);if(["width","height"].indexOf(Ct)!==-1)if(_t){ut("autosize",null);var nr=Ct==="height"?"width":"height";ut(nr,Be[nr])}else Be[Ct]=se._initialAutoSize[Ct];else if(Ct==="autosize")ut("width",_t?null:Be.width),ut("height",_t?null:Be.height);else if(or.match(Te))Tt(or),A(Be,Er+"._inputRange").set(null);else if(or.match(Oe)){Tt(or),A(Be,Er+"._inputRange").set(null);var lr=A(Be,Er).get();lr._inputDomain&&(lr._input.domain=lr._inputDomain.slice())}else or.match(Ne)&&A(Be,Er+"._inputDomain").set(null);if(Qt==="type"){xt=Ye;var rr=We.type==="linear"&&_t==="log",zt=We.type==="log"&&_t==="linear";if(rr||zt){if(!xt||!xt.range)ut(Er+".autorange",!0);else if(We.autorange)rr&&(xt.range=xt.range[1]>xt.range[0]?[1,2]:[2,1]);else{var fr=xt.range[0],dr=xt.range[1];rr?(fr<=0&&dr<=0&&ut(Er+".autorange",!0),fr<=0?fr=dr/1e6:dr<=0&&(dr=fr/1e6),ut(Er+".range[0]",Math.log(fr)/Math.LN10),ut(Er+".range[1]",Math.log(dr)/Math.LN10)):(ut(Er+".range[0]",Math.pow(10,fr)),ut(Er+".range[1]",Math.pow(10,dr)))}Array.isArray(Be._subplots.polar)&&Be._subplots.polar.length&&Be[St.parts[0]]&&St.parts[1]==="radialaxis"&&delete Be[St.parts[0]]._subplot.viewInitial["radialaxis.range"],t.getComponentMethod("annotations","convertCoords")(se,We,_t,ut),t.getComponentMethod("images","convertCoords")(se,We,_t,ut)}else ut(Er+".autorange",!0),ut(Er+".range",null);A(Be,Er+"._inputRange").set(null)}else if(Qt.match(T)){var pr=A(Be,Ct).get(),vr=(_t||{}).type;(!vr||vr==="-")&&(vr="linear"),t.getComponentMethod("annotations","convertCoords")(se,pr,vr,ut),t.getComponentMethod("images","convertCoords")(se,pr,vr,ut)}var Hr=h.containerArrayMatch(Ct);if(Hr){Lt=Hr.array,Kt=Hr.index;var Ir=Hr.property,kr=Ft||{editType:"calc"};Kt!==""&&Ir===""&&(h.isAddVal(_t)?hr[Ct]=null:h.isRemoveVal(_t)?hr[Ct]=(A(Le,Lt).get()||[])[Kt]:L.warn("unrecognized full object value",ye)),M.update(Yt,kr),Gt[Lt]||(Gt[Lt]={});var pn=Gt[Lt][Kt];pn||(pn=Gt[Lt][Kt]={}),pn[Ir]=_t,delete ye[Ct]}else Qt==="reverse"?(Ye.range?Ye.range.reverse():(ut(Er+".autorange",!0),Ye.range=[1,0]),We.autorange?Yt.calc=!0:Yt.plot=!0):(Ct==="dragmode"&&(_t===!1&&Dt!==!1||_t!==!1&&Dt===!1)||Be._has("scatter-like")&&Be._has("regl")&&Ct==="dragmode"&&(_t==="lasso"||_t==="select")&&!(Dt==="lasso"||Dt==="select")||Be._has("gl2d")?Yt.plot=!0:Ft?M.update(Yt,Ft):Yt.calc=!0,St.set(_t))}}for(Lt in Gt){var jr=h.applyContainerArrayChanges(se,at(Le,Lt),Gt[Lt],Yt,at);jr||(Yt.plot=!0)}for(var In in lt){xt=n.getFromId(se,In);var Dn=xt&&xt._constraintGroup;if(Dn){Yt.calc=!0;for(var xr in Dn)lt[xr]||(n.getFromId(se,xr)._constraintShrinkable=!0)}}(xe(se)||ye.height||ye.width)&&(Yt.plot=!0);var Ar=Be.shapes;for(Kt=0;Kt1;)if(Be.pop(),Le=A(ye,Be.join(".")+".uirevision").get(),Le!==void 0)return Le;return ye.uirevision}function qe(se,ye){for(var Le=0;Le=ot.length?ot[0]:ot[Gt]:ot}function It(Gt){return Array.isArray(at)?Gt>=at.length?at[0]:at[Gt]:at}function Bt(Gt,Lt){var Kt=0;return function(){if(Gt&&++Kt===Lt)return Gt()}}return new Promise(function(Gt,Lt){function Kt(){if(Be._frameQueue.length!==0){for(;Be._frameQueue.length;){var Qt=Be._frameQueue.pop();Qt.onInterrupt&&Qt.onInterrupt()}se.emit("plotly_animationinterrupted",[])}}function ir(Qt){if(Qt.length!==0){for(var or=0;orBe._timeToNext&&yt()};Qt()}var Yt=0;function br(Qt){return Array.isArray(ot)?Yt>=ot.length?Qt.transitionOpts=ot[Yt]:Qt.transitionOpts=ot[0]:Qt.transitionOpts=ot,Yt++,Qt}var hr,ut,lt=[],xt=ye==null,Tt=Array.isArray(ye),Ct=!xt&&!Tt&&L.isPlainObject(ye);if(Ct)lt.push({type:"object",data:br(L.extendFlat({},ye))});else if(xt||["string","number"].indexOf(typeof ye)!==-1)for(hr=0;hr0&&HtHt)&&$t.push(ut);lt=$t}}lt.length>0?ir(lt):(se.emit("plotly_animated"),Gt())})}function De(se,ye,Le){if(se=L.getGraphDiv(se),ye==null)return Promise.resolve();if(!L.isPlotDiv(se))throw new Error("This element is not a Plotly plot: "+se+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var Be,ot,at,wt,It=se._transitionData._frames,Bt=se._transitionData._frameHash;if(!Array.isArray(ye))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+ye);var Gt=It.length+ye.length*2,Lt=[],Kt={};for(Be=ye.length-1;Be>=0;Be--)if(L.isPlainObject(ye[Be])){var ir=ye[Be].name,_r=(Bt[ir]||Kt[ir]||{}).name,yt=ye[Be].name,jt=Bt[_r]||Kt[_r];_r&&yt&&typeof yt=="number"&&jt&&CSt.index?-1:Ct.index=0;Be--){if(ot=Lt[Be].frame,typeof ot.name=="number"&&L.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!ot.name)for(;Bt[ot.name="frame "+se._transitionData._counter++];);if(Bt[ot.name]){for(at=0;at=0;Le--)Be=ye[Le],at.push({type:"delete",index:Be}),wt.unshift({type:"insert",index:Be,value:ot[Be]});var It=s.modifyFrames,Bt=s.modifyFrames,Gt=[se,wt],Lt=[se,at];return p&&p.add(se,It,Gt,Bt,Lt),s.modifyFrames(se,at)}function ze(se){se=L.getGraphDiv(se);var ye=se._fullLayout||{},Le=se._fullData||[];return s.cleanPlot([],{},Le,ye),s.purge(se),v.purge(se),ye._container&&ye._container.remove(),delete se._context,se}function Pe(se){var ye=se._fullLayout,Le=se.getBoundingClientRect();if(!L.equalDomRects(Le,ye._lastBBox)){var Be=ye._invTransform=L.inverseTransformMatrix(L.getFullTransformMatrix(se));ye._invScaleX=Math.sqrt(Be[0][0]*Be[0][0]+Be[0][1]*Be[0][1]+Be[0][2]*Be[0][2]),ye._invScaleY=Math.sqrt(Be[1][0]*Be[1][0]+Be[1][1]*Be[1][1]+Be[1][2]*Be[1][2]),ye._lastBBox=Le}}function be(se){var ye=m.select(se),Le=se._fullLayout;if(Le._calcInverseTransform=Pe,Le._calcInverseTransform(se),Le._container=ye.selectAll(".plot-container").data([0]),Le._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),Le._paperdiv=Le._container.selectAll(".svg-container").data([0]),Le._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),Le._glcontainer=Le._paperdiv.selectAll(".gl-container").data([{}]),Le._glcontainer.enter().append("div").classed("gl-container",!0),Le._paperdiv.selectAll(".main-svg").remove(),Le._paperdiv.select(".modebar-container").remove(),Le._paper=Le._paperdiv.insert("svg",":first-child").classed("main-svg",!0),Le._toppaper=Le._paperdiv.append("svg").classed("main-svg",!0),Le._modebardiv=Le._paperdiv.append("div"),delete Le._modeBar,Le._hoverpaper=Le._paperdiv.append("svg").classed("main-svg",!0),!Le._uid){var Be={};m.selectAll("defs").each(function(){this.id&&(Be[this.id.split("-")[1]]=1)}),Le._uid=L.randstr(Be)}Le._paperdiv.selectAll(".main-svg").attr(g.svgAttrs),Le._defs=Le._paper.append("defs").attr("id","defs-"+Le._uid),Le._clips=Le._defs.append("g").classed("clips",!0),Le._topdefs=Le._toppaper.append("defs").attr("id","topdefs-"+Le._uid),Le._topclips=Le._topdefs.append("g").classed("clips",!0),Le._bgLayer=Le._paper.append("g").classed("bglayer",!0),Le._draggers=Le._paper.append("g").classed("draglayer",!0);var ot=Le._paper.append("g").classed("layer-below",!0);Le._imageLowerLayer=ot.append("g").classed("imagelayer",!0),Le._shapeLowerLayer=ot.append("g").classed("shapelayer",!0),Le._cartesianlayer=Le._paper.append("g").classed("cartesianlayer",!0),Le._polarlayer=Le._paper.append("g").classed("polarlayer",!0),Le._smithlayer=Le._paper.append("g").classed("smithlayer",!0),Le._ternarylayer=Le._paper.append("g").classed("ternarylayer",!0),Le._geolayer=Le._paper.append("g").classed("geolayer",!0),Le._funnelarealayer=Le._paper.append("g").classed("funnelarealayer",!0),Le._pielayer=Le._paper.append("g").classed("pielayer",!0),Le._iciclelayer=Le._paper.append("g").classed("iciclelayer",!0),Le._treemaplayer=Le._paper.append("g").classed("treemaplayer",!0),Le._sunburstlayer=Le._paper.append("g").classed("sunburstlayer",!0),Le._indicatorlayer=Le._toppaper.append("g").classed("indicatorlayer",!0),Le._glimages=Le._paper.append("g").classed("glimages",!0);var at=Le._toppaper.append("g").classed("layer-above",!0);Le._imageUpperLayer=at.append("g").classed("imagelayer",!0),Le._shapeUpperLayer=at.append("g").classed("shapelayer",!0),Le._selectionLayer=Le._toppaper.append("g").classed("selectionlayer",!0),Le._infolayer=Le._toppaper.append("g").classed("infolayer",!0),Le._menulayer=Le._toppaper.append("g").classed("menulayer",!0),Le._zoomlayer=Le._toppaper.append("g").classed("zoomlayer",!0),Le._hoverlayer=Le._hoverpaper.append("g").classed("hoverlayer",!0),Le._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),se.emit("plotly_framework")}V.animate=Je,V.addFrames=De,V.deleteFrames=Ie,V.addTraces=Q,V.deleteTraces=Z,V.extendTraces=ae,V.moveTraces=j,V.prependTraces=ce,V.newPlot=B,V._doPlot=S,V.purge=ze,V.react=dt,V.redraw=I,V.relayout=he,V.restyle=K,V.setPlotConfig=a,V.update=Se,V._guiRelayout=Ue(he),V._guiRestyle=Ue(K),V._guiUpdate=Ue(Se),V._storeDirectGUIEdit=$},72075:function(G){var V={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:""},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox"],extras:[!0,!1],dflt:"gl3d+geo+mapbox"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},showLink:{valType:"boolean",dflt:!1},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0},sendData:{valType:"boolean",dflt:!0},showSources:{valType:"any",dflt:!1},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!1},showEditInChartStudio:{valType:"boolean",dflt:!1},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/"},mapboxAccessToken:{valType:"string",dflt:null},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},globalTransforms:{valType:"any",dflt:[]},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},e={};function m(P,i){for(var L in P){var A=P[L];A.valType?i[L]=A.dflt:(i[L]||(i[L]={}),m(A,i[L]))}}m(V,e),G.exports={configAttributes:V,dfltConfig:e}},86281:function(G,V,e){var m=e(73972),P=e(71828),i=e(9012),L=e(10820),A=e(31391),v=e(85594),p=e(72075).configAttributes,t=e(30962),r=P.extendDeepAll,s=P.isPlainObject,n=P.isArrayOrTypedArray,l=P.nestedProperty,c=P.valObjectMeta,u="_isSubplotObj",g="_isLinkedToArray",f="_arrayAttrRegexps",w="_deprecated",h=[u,g,f,w];V.IS_SUBPLOT_OBJ=u,V.IS_LINKED_TO_ARRAY=g,V.DEPRECATED=w,V.UNDERSCORE_ATTRS=h,V.get=function(){var B={};m.allTypes.forEach(function(O){B[O]=T(O)});var k={};return Object.keys(m.transformsRegistry).forEach(function(O){k[O]=x(O)}),{defs:{valObjects:c,metaKeys:h.concat(["description","role","editType","impliedEdits"]),editType:{traces:t.traces,layout:t.layout},impliedEdits:{}},traces:B,layout:C(),transforms:k,frames:S(),animation:b(v),config:b(p)}},V.crawl=function(B,k,O,N){var _=O||0;N=N||"",Object.keys(B).forEach(function(U){var Y=B[U];if(h.indexOf(U)===-1){var J=(N?N+".":"")+U;k(Y,U,B,_,J),!V.isValObject(Y)&&s(Y)&&U!=="impliedEdits"&&V.crawl(Y,k,_+1,J)}})},V.isValObject=function(B){return B&&B.valType!==void 0},V.findArrayAttributes=function(B){var k=[],O=[],N=[],_,U;function Y(Z,j,K,ee){O=O.slice(0,ee).concat([j]),N=N.slice(0,ee).concat([Z&&Z._isLinkedToArray]);var oe=Z&&(Z.valType==="data_array"||Z.arrayOk===!0)&&!(O[ee-1]==="colorbar"&&(j==="ticktext"||j==="tickvals"));oe&&J(_,0,"")}function J(Z,j,K){var ee=Z[O[j]],oe=K+O[j];if(j===O.length-1)n(ee)&&k.push(U+oe);else if(N[j]){if(Array.isArray(ee))for(var q=0;q=Y.length)return!1;_=(m.transformsRegistry[Y[J].type]||{}).attributes,U=_&&_[k[2]],N=3}else{var te=B._module;if(te||(te=(m.modules[B.type||i.type.dflt]||{})._module),!te)return!1;if(_=te.attributes,U=_&&_[O],!U){var ae=te.basePlotModule;ae&&ae.attributes&&(U=ae.attributes[O])}U||(U=i[O])}return d(U,k,N)},V.getLayoutValObject=function(B,k){var O=o(B,k[0]);return d(O,k,1)};function o(B,k){var O,N,_,U,Y=B._basePlotModules;if(Y){var J;for(O=0;O=U.length)return!1;if(B.dimensions===2){if(O++,k.length===O)return B;var Y=k[O];if(!M(Y))return!1;B=U[_][Y]}else B=U[_]}else B=U}}return B}function M(B){return B===Math.round(B)&&B>=0}function T(B){var k,O;k=m.modules[B]._module,O=k.basePlotModule;var N={};N.type=null;var _=r({},i),U=r({},k.attributes);V.crawl(U,function(te,ae,ce,Q,Z){l(_,Z).set(void 0),te===void 0&&l(U,Z).set(void 0)}),r(N,_),m.traceIs(B,"noOpacity")&&delete N.opacity,m.traceIs(B,"showLegend")||(delete N.showlegend,delete N.legendgroup),m.traceIs(B,"noHover")&&(delete N.hoverinfo,delete N.hoverlabel),k.selectPoints||delete N.selectedpoints,r(N,U),O.attributes&&r(N,O.attributes),N.type=B;var Y={meta:k.meta||{},categories:k.categories||{},animatable:!!k.animatable,type:B,attributes:b(N)};if(k.layoutAttributes){var J={};r(J,k.layoutAttributes),Y.layoutAttributes=b(J)}return k.animatable||V.crawl(Y,function(te){V.isValObject(te)&&"anim"in te&&delete te.anim}),Y}function C(){var B={},k,O;r(B,L);for(k in m.subplotsRegistry)if(O=m.subplotsRegistry[k],!!O.layoutAttributes)if(Array.isArray(O.attr))for(var N=0;N=s&&(r._input||{})._templateitemname;l&&(n=s);var c=t+"["+n+"]",u;function g(){u={},l&&(u[c]={},u[c][i]=l)}g();function f(d,M){u[d]=M}function w(d,M){l?m.nestedProperty(u[c],d).set(M):u[c+"."+d]=M}function h(){var d=u;return g(),d}function o(d,M){d&&w(d,M);var T=h();for(var C in T)m.nestedProperty(p,C).set(T[C])}return{modifyBase:f,modifyItem:w,getUpdateObj:h,applyUpdate:o}}},61549:function(G,V,e){var m=e(39898),P=e(73972),i=e(74875),L=e(71828),A=e(63893),v=e(33306),p=e(7901),t=e(91424),r=e(92998),s=e(64168),n=e(89298),l=e(18783),c=e(99082),u=c.enforce,g=c.clean,f=e(71739).doAutoRange,w="start",h="middle",o="end";V.layoutStyles=function(O){return L.syncOrAsync([i.doAutoMargin,M],O)};function d(O,N,_){for(var U=0;U<_.length;U++){var Y=_[U][0],J=_[U][1];if(!(Y[0]>=O[1]||Y[1]<=O[0])&&J[0]N[0])return!0}return!1}function M(O){var N=O._fullLayout,_=N._size,U=_.p,Y=n.list(O,"",!0),J,te,ae,ce,Q,Z;if(N._paperdiv.style({width:O._context.responsive&&N.autosize&&!O._context._hasZeroWidth&&!O.layout.width?"100%":N.width+"px",height:O._context.responsive&&N.autosize&&!O._context._hasZeroHeight&&!O.layout.height?"100%":N.height+"px"}).selectAll(".main-svg").call(t.setSize,N.width,N.height),O._context.setBackground(O,N.paper_bgcolor),V.drawMainTitle(O),s.manage(O),!N._has("cartesian"))return i.previousPromises(O);function j(be,se,ye){var Le=be._lw/2;if(be._id.charAt(0)==="x"){if(se){if(ye==="top")return se._offset-U-Le}else return _.t+_.h*(1-(be.position||0))+Le%1;return se._offset+se._length+U+Le}if(se){if(ye==="right")return se._offset+se._length+U+Le}else return _.l+_.w*(be.position||0)+Le%1;return se._offset-U-Le}for(J=0;J0&&(E(O,J,Q,ce),ae.attr({x:te,y:J,"text-anchor":U,dy:I(N.yanchor)}).call(A.positionText,te,J))}};function S(O,N,_,U,Y){var J=N.yref==="paper"?O._fullLayout._size.h:O._fullLayout.height,te=L.isTopAnchor(N)?U:U-Y,ae=_==="b"?J-te:te;return L.isTopAnchor(N)&&_==="t"||L.isBottomAnchor(N)&&_==="b"?!1:ae.5?"t":"b",te=O._fullLayout.margin[J],ae=0;return N.yref==="paper"?ae=_+N.pad.t+N.pad.b:N.yref==="container"&&(ae=b(J,U,Y,O._fullLayout.height,_)+N.pad.t+N.pad.b),ae>te?ae:0}function E(O,N,_,U){var Y="title.automargin",J=O._fullLayout.title,te=J.y>.5?"t":"b",ae={x:J.x,y:J.y,t:0,b:0},ce={};J.yref==="paper"&&S(O,J,te,N,U)?ae[te]=_:J.yref==="container"&&(ce[te]=_,O._fullLayout._reservedMargin[Y]=ce),i.allowAutoMargin(O,Y),i.autoMargin(O,Y,ae)}function y(O,N){var _=O.title,U=O._size,Y=0;switch(N===w?Y=_.pad.l:N===o&&(Y=-_.pad.r),_.xref){case"paper":return U.l+U.w*_.x+Y;case"container":default:return O.width*_.x+Y}}function z(O,N){var _=O.title,U=O._size,Y=0;if(N==="0em"||!N?Y=-_.pad.b:N===l.CAP_SHIFT+"em"&&(Y=_.pad.t),_.y==="auto")return U.t/2;switch(_.yref){case"paper":return U.t+U.h-U.h*_.y+Y;case"container":default:return O.height-O.height*_.y+Y}}function I(O){return O==="top"?l.CAP_SHIFT+.3+"em":O==="bottom"?"-0.3em":l.MID_SHIFT+"em"}function B(O){var N=O.title,_=h;return L.isRightAnchor(N)?_=o:L.isLeftAnchor(N)&&(_=w),_}function k(O){var N=O.title,_="0em";return L.isTopAnchor(N)?_=l.CAP_SHIFT+"em":L.isMiddleAnchor(N)&&(_=l.MID_SHIFT+"em"),_}V.doTraceStyle=function(O){var N=O.calcdata,_=[],U;for(U=0;Uk?T.push({code:"unused",traceType:y,templateCount:B,dataCount:k}):k>B&&T.push({code:"reused",traceType:y,templateCount:B,dataCount:k})}}function O(N,_){for(var U in N)if(U.charAt(0)!=="_"){var Y=N[U],J=c(N,U,_);P(Y)?(Array.isArray(N)&&Y._template===!1&&Y.templateitemname&&T.push({code:"missing",path:J,templateitemname:Y.templateitemname}),O(Y,J)):Array.isArray(Y)&&u(Y)&&O(Y,J)}}if(O({data:x,layout:C},""),T.length)return T.map(g)};function u(f){for(var w=0;w1&&T.push(l("object","layout"))),P.supplyDefaults(C);for(var b=C._fullData,a=x.length,E=0;Ey.length&&M.push(l("unused",T,a.concat(y.length)));var N=y.length,_=Array.isArray(O);_&&(N=Math.min(N,O.length));var U,Y,J,te,ae;if(z.dimensions===2)for(Y=0;Yy[Y].length&&M.push(l("unused",T,a.concat(Y,y[Y].length)));var ce=y[Y].length;for(U=0;U<(_?Math.min(ce,O[Y].length):ce);U++)J=_?O[Y][U]:O,te=E[Y][U],ae=y[Y][U],m.validate(te,J)?ae!==te&&ae!==+te&&M.push(l("dynamic",T,a.concat(Y,U),te,ae)):M.push(l("value",T,a.concat(Y,U),te))}else M.push(l("array",T,a.concat(Y),E[Y]));else for(Y=0;Y0&&Math.round(g)===g)u=g;else return{vals:n}}for(var f=r.calendar,w=l==="start",h=l==="end",o=t[s+"period0"],d=i(o,f)||0,M=[],T=[],C=[],x=n.length,S=0;Sb;)y=L(y,-u,f);for(;y<=b;)y=L(y,u,f);E=L(y,-u,f)}else{for(a=Math.round((b-d)/c),y=d+a*c;y>b;)y-=c;for(;y<=b;)y+=c;E=y-c}M[S]=w?E:h?y:(E+y)/2,T[S]=E,C[S]=y}return{vals:M,starts:T,ends:C}}},89502:function(G){G.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},71739:function(G,V,e){var m=e(39898),P=e(92770),i=e(71828),L=e(50606).FP_SAFE,A=e(73972),v=e(91424),p=e(41675),t=p.getFromId,r=p.isLinked;G.exports={applyAutorangeOptions:a,getAutoRange:s,makePadFn:l,doAutoRange:f,findExtremes:w,concatExtremes:g};function s(E,y){var z,I,B=[],k=E._fullLayout,O=l(k,y,0),N=l(k,y,1),_=g(E,y),U=_.min,Y=_.max;if(U.length===0||Y.length===0)return i.simpleMap(y.range,y.r2l);var J=U[0].val,te=Y[0].val;for(z=1;z0&&(me=ee-O($)-N(le),me>oe?Me/me>q&&(ie=$,he=le,q=Me/me):Me/ee>q&&(ie={val:$.val,nopad:1},he={val:le.val,nopad:1},q=Me/ee));function Te(Se,Ue){return Math.max(Se,N(Ue))}if(J===te){var Oe=J-1,Ne=J+1;if(j)if(J===0)B=[0,1];else{var Ee=(J>0?Y:U).reduce(Te,0),xe=J/(1-Math.min(.5,Ee/ee));B=J>0?[0,xe]:[xe,0]}else K?B=[Math.max(0,Oe),Math.max(1,Ne)]:B=[Oe,Ne]}else j?(ie.val>=0&&(ie={val:0,nopad:1}),he.val<=0&&(he={val:0,nopad:1})):K&&(ie.val-q*O(ie)<0&&(ie={val:0,nopad:1}),he.val<=0&&(he={val:1,nopad:1})),q=(he.val-ie.val-n(y,$.val,le.val))/(ee-O(ie)-N(he)),B=[ie.val-q*O(ie),he.val+q*N(he)];return B=a(B,y),y.limitRange&&y.limitRange(),ce&&B.reverse(),i.simpleMap(B,y.l2r||Number)}function n(E,y,z){var I=0;if(E.rangebreaks)for(var B=E.locateBreaks(y,z),k=0;k0?z.ppadplus:z.ppadminus)||z.ppad||0),$=oe((E._m>0?z.ppadminus:z.ppadplus)||z.ppad||0),le=oe(z.vpadplus||z.vpad),ie=oe(z.vpadminus||z.vpad);if(!U){if(K=1/0,ee=-1/0,_)for(J=0;J0&&(K=te),te>ee&&te-L&&(K=te),te>ee&&te=Me;J--)me(J);return{min:I,max:B,opts:z}}function h(E,y,z,I){d(E,y,z,I,T)}function o(E,y,z,I){d(E,y,z,I,C)}function d(E,y,z,I,B){for(var k=I.tozero,O=I.extrapad,N=!0,_=0;_=z&&(U.extrapad||!O)){N=!1;break}else B(y,U.val)&&U.pad<=z&&(O||!U.extrapad)&&(E.splice(_,1),_--)}if(N){var Y=k&&y===0;E.push({val:y,pad:Y?0:z,extrapad:Y?!1:O})}}function M(E){return P(E)&&Math.abs(E)=y}function x(E,y){var z=y.autorangeoptions;return z&&z.minallowed!==void 0&&b(y,z.minallowed,z.maxallowed)?z.minallowed:z&&z.clipmin!==void 0&&b(y,z.clipmin,z.clipmax)?Math.max(E,y.d2l(z.clipmin)):E}function S(E,y){var z=y.autorangeoptions;return z&&z.maxallowed!==void 0&&b(y,z.minallowed,z.maxallowed)?z.maxallowed:z&&z.clipmax!==void 0&&b(y,z.clipmin,z.clipmax)?Math.min(E,y.d2l(z.clipmax)):E}function b(E,y,z){return y!==void 0&&z!==void 0?(y=E.d2l(y),z=E.d2l(z),y=_&&(k=_,z=_),O<=_&&(O=_,I=_)}}return z=x(z,y),I=S(I,y),[z,I]}},23074:function(G){G.exports=function(e,m,P){var i,L;if(P){var A=m==="reversed"||m==="min reversed"||m==="max reversed";i=P[A?1:0],L=P[A?0:1]}var v=e("autorangeoptions.minallowed",L===null?i:void 0),p=e("autorangeoptions.maxallowed",i===null?L:void 0);v===void 0&&e("autorangeoptions.clipmin"),p===void 0&&e("autorangeoptions.clipmax"),e("autorangeoptions.include")}},89298:function(G,V,e){var m=e(39898),P=e(92770),i=e(74875),L=e(73972),A=e(71828),v=A.strTranslate,p=e(63893),t=e(92998),r=e(7901),s=e(91424),n=e(13838),l=e(66287),c=e(50606),u=c.ONEMAXYEAR,g=c.ONEAVGYEAR,f=c.ONEMINYEAR,w=c.ONEMAXQUARTER,h=c.ONEAVGQUARTER,o=c.ONEMINQUARTER,d=c.ONEMAXMONTH,M=c.ONEAVGMONTH,T=c.ONEMINMONTH,C=c.ONEWEEK,x=c.ONEDAY,S=x/2,b=c.ONEHOUR,a=c.ONEMIN,E=c.ONESEC,y=c.MINUS_SIGN,z=c.BADNUM,I={K:"zeroline"},B={K:"gridline",L:"path"},k={K:"minor-gridline",L:"path"},O={K:"tick",L:"path"},N={K:"tick",L:"text"},_={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},U=e(18783),Y=U.MID_SHIFT,J=U.CAP_SHIFT,te=U.LINE_SPACING,ae=U.OPPOSITE_SIDE,ce=3,Q=G.exports={};Q.setConvert=e(21994);var Z=e(4322),j=e(41675),K=j.idSort,ee=j.isLinked;Q.id2name=j.id2name,Q.name2id=j.name2id,Q.cleanId=j.cleanId,Q.list=j.list,Q.listIds=j.listIds,Q.getFromId=j.getFromId,Q.getFromTrace=j.getFromTrace;var oe=e(71739);Q.getAutoRange=oe.getAutoRange,Q.findExtremes=oe.findExtremes;var q=1e-4;function $(Ye){var We=(Ye[1]-Ye[0])*q;return[Ye[0]-We,Ye[1]+We]}Q.coerceRef=function(Ye,We,Dt,Ft,Zt,nr){var lr=Ft.charAt(Ft.length-1),rr=Dt._fullLayout._subplots[lr+"axis"],zt=Ft+"ref",fr={};return Zt||(Zt=rr[0]||(typeof nr=="string"?nr:nr[0])),nr||(nr=Zt),rr=rr.concat(rr.map(function(dr){return dr+" domain"})),fr[zt]={valType:"enumerated",values:rr.concat(nr?typeof nr=="string"?[nr]:nr:[]),dflt:Zt},A.coerce(Ye,We,fr,zt)},Q.getRefType=function(Ye){return Ye===void 0?Ye:Ye==="paper"?"paper":Ye==="pixel"?"pixel":/( domain)$/.test(Ye)?"domain":"range"},Q.coercePosition=function(Ye,We,Dt,Ft,Zt,nr){var lr,rr,zt=Q.getRefType(Ft);if(zt!=="range")lr=A.ensureNumber,rr=Dt(Zt,nr);else{var fr=Q.getFromId(We,Ft);nr=fr.fraction2r(nr),rr=Dt(Zt,nr),lr=fr.cleanPos}Ye[Zt]=lr(rr)},Q.cleanPosition=function(Ye,We,Dt){var Ft=Dt==="paper"||Dt==="pixel"?A.ensureNumber:Q.getFromId(We,Dt).cleanPos;return Ft(Ye)},Q.redrawComponents=function(Ye,We){We=We||Q.listIds(Ye);var Dt=Ye._fullLayout;function Ft(Zt,nr,lr,rr){for(var zt=L.getComponentMethod(Zt,nr),fr={},dr=0;dr2e-6||((Dt-Ye._forceTick0)/Ye._minDtick%1+1.000001)%1>2e-6)&&(Ye._minDtick=0))},Q.saveRangeInitial=function(Ye,We){for(var Dt=Q.list(Ye,"",!0),Ft=!1,Zt=0;Ztpr*.3||fr(Ft)||fr(Zt))){var vr=Dt.dtick/2;Ye+=Ye+vrlr){var rr=Number(Dt.substr(1));nr.exactYears>lr&&rr%12===0?Ye=Q.tickIncrement(Ye,"M6","reverse")+x*1.5:nr.exactMonths>lr?Ye=Q.tickIncrement(Ye,"M1","reverse")+x*15.5:Ye-=S;var zt=Q.tickIncrement(Ye,Dt);if(zt<=Ft)return zt}return Ye}Q.prepMinorTicks=function(Ye,We,Dt){if(!We.minor.dtick){delete Ye.dtick;var Ft=We.dtick&&P(We._tmin),Zt;if(Ft){var nr=Q.tickIncrement(We._tmin,We.dtick,!0);Zt=[We._tmin,nr*.99+We._tmin*.01]}else{var lr=A.simpleMap(We.range,We.r2l);Zt=[lr[0],.8*lr[0]+.2*lr[1]]}if(Ye.range=A.simpleMap(Zt,We.l2r),Ye._isMinor=!0,Q.prepTicks(Ye,Dt),Ft){var rr=P(We.dtick),zt=P(Ye.dtick),fr=rr?We.dtick:+We.dtick.substring(1),dr=zt?Ye.dtick:+Ye.dtick.substring(1);rr&&zt?Te(fr,dr)?fr===2*C&&dr===2*x&&(Ye.dtick=C):fr===2*C&&dr===3*x?Ye.dtick=C:fr===C&&!(We._input.minor||{}).nticks?Ye.dtick=x:Oe(fr/dr,2.5)?Ye.dtick=fr/2:Ye.dtick=fr:String(We.dtick).charAt(0)==="M"?zt?Ye.dtick="M1":Te(fr,dr)?fr>=12&&dr===2&&(Ye.dtick="M3"):Ye.dtick=We.dtick:String(Ye.dtick).charAt(0)==="L"?String(We.dtick).charAt(0)==="L"?Te(fr,dr)||(Ye.dtick=Oe(fr/dr,2.5)?We.dtick/2:We.dtick):Ye.dtick="D1":Ye.dtick==="D2"&&+We.dtick>1&&(Ye.dtick=1)}Ye.range=We.range}We.minor._tick0Init===void 0&&(Ye.tick0=We.tick0)};function Te(Ye,We){return Math.abs((Ye/We+.5)%1-.5)<.001}function Oe(Ye,We){return Math.abs(Ye/We-1)<.001}Q.prepTicks=function(Ye,We){var Dt=A.simpleMap(Ye.range,Ye.r2l,void 0,void 0,We);if(Ye.tickmode==="auto"||!Ye.dtick){var Ft=Ye.nticks,Zt;Ft||(Ye.type==="category"||Ye.type==="multicategory"?(Zt=Ye.tickfont?A.bigFont(Ye.tickfont.size||12):15,Ft=Ye._length/Zt):(Zt=Ye._id.charAt(0)==="y"?40:80,Ft=A.constrain(Ye._length/Zt,4,9)+1),Ye._name==="radialaxis"&&(Ft*=2)),Ye.minor&&Ye.minor.tickmode!=="array"||Ye.tickmode==="array"&&(Ft*=100),Ye._roughDTick=Math.abs(Dt[1]-Dt[0])/Ft,Q.autoTicks(Ye,Ye._roughDTick),Ye._minDtick>0&&Ye.dtick0?(nr=Ft-1,lr=Ft):(nr=Ft,lr=Ft);var rr=Ye[nr].value,zt=Ye[lr].value,fr=Math.abs(zt-rr),dr=Dt||fr,pr=0;dr>=f?fr>=f&&fr<=u?pr=fr:pr=g:Dt===h&&dr>=o?fr>=o&&fr<=w?pr=fr:pr=h:dr>=T?fr>=T&&fr<=d?pr=fr:pr=M:Dt===C&&dr>=C?pr=C:dr>=x?pr=x:Dt===S&&dr>=S?pr=S:Dt===b&&dr>=b&&(pr=b);var vr;pr>=fr&&(pr=fr,vr=!0);var Hr=Zt+pr;if(We.rangebreaks&&pr>0){for(var Ir=84,kr=0,pn=0;pnC&&(pr=fr)}(pr>0||Ft===0)&&(Ye[Ft].periodX=Zt+pr/2)}}Q.calcTicks=function(We,Dt){for(var Ft=We.type,Zt=We.calendar,nr=We.ticklabelstep,lr=We.ticklabelmode==="period",rr=A.simpleMap(We.range,We.r2l,void 0,void 0,Dt),zt=rr[1]=(pn?0:1);jr--){var In=!jr;jr?(We._dtickInit=We.dtick,We._tick0Init=We.tick0):(We.minor._dtickInit=We.minor.dtick,We.minor._tick0Init=We.minor.tick0);var Dn=jr?We:A.extendFlat({},We,We.minor);if(In?Q.prepMinorTicks(Dn,We,Dt):Q.prepTicks(Dn,Dt),Dn.tickmode==="array"){jr?(Ir=[],vr=He(We)):(kr=[],Hr=He(We));continue}if(Dn.tickmode==="sync"){Ir=[],vr=Ue(We);continue}var xr=$(rr),Ar=xr[0],Or=xr[1],Nr=P(Dn.dtick),qr=Ft==="log"&&!(Nr||Dn.dtick.charAt(0)==="L"),vn=Q.tickFirst(Dn,Dt);if(jr){if(We._tmin=vn,vn=Or:Tn<=Or;Tn=Q.tickIncrement(Tn,qn,zt,Zt)){if(jr&&Pn++,Dn.rangebreaks&&!zt){if(Tn=dr)break}if(Ir.length>pr||Tn===fn)break;fn=Tn;var sa={value:Tn};jr?(qr&&Tn!==(Tn|0)&&(sa.simpleLabel=!0),nr>1&&Pn%nr&&(sa.skipLabel=!0),Ir.push(sa)):(sa.minor=!0,kr.push(sa))}}if(pn){var ta=We.minor.ticks==="inside"&&We.ticks==="outside"||We.minor.ticks==="outside"&&We.ticks==="inside";if(!ta){for(var ea=Ir.map(function(wn){return wn.value}),Mr=[],on=0;on-1;Cn--){if(Ir[Cn].drop){Ir.splice(Cn,1);continue}Ir[Cn].value=Ht(Ir[Cn].value,We);var Za=We.c2p(Ir[Cn].value);(Hn?Pa>Za-aa:Padr||cndr&&(an.periodX=dr),cnFt&&prg)We/=g,Ft=Zt(10),Ye.dtick="M"+12*dt(We,Ft,Fe);else if(nr>M)We/=M,Ye.dtick="M"+dt(We,1,Ge);else if(nr>x){if(Ye.dtick=dt(We,x,Ye._hasDayOfWeekBreaks?[1,2,7,14]:qe),!Dt){var lr=Q.getTickFormat(Ye),rr=Ye.ticklabelmode==="period";rr&&(Ye._rawTick0=Ye.tick0),/%[uVW]/.test(lr)?Ye.tick0=A.dateTick0(Ye.calendar,2):Ye.tick0=A.dateTick0(Ye.calendar,1),rr&&(Ye._dowTick0=Ye.tick0)}}else nr>b?Ye.dtick=dt(We,b,Ge):nr>a?Ye.dtick=dt(We,a,nt):nr>E?Ye.dtick=dt(We,E,nt):(Ft=Zt(10),Ye.dtick=dt(We,Ft,Fe))}else if(Ye.type==="log"){Ye.tick0=0;var zt=A.simpleMap(Ye.range,Ye.r2l);if(Ye._isMinor&&(We*=1.5),We>.7)Ye.dtick=Math.ceil(We);else if(Math.abs(zt[1]-zt[0])<1){var fr=1.5*Math.abs((zt[1]-zt[0])/We);We=Math.abs(Math.pow(10,zt[1])-Math.pow(10,zt[0]))/fr,Ft=Zt(10),Ye.dtick="L"+dt(We,Ft,Fe)}else Ye.dtick=We>.3?"D2":"D1"}else Ye.type==="category"||Ye.type==="multicategory"?(Ye.tick0=0,Ye.dtick=Math.ceil(Math.max(We,1))):_t(Ye)?(Ye.tick0=0,Ft=1,Ye.dtick=dt(We,Ft,ct)):(Ye.tick0=0,Ft=Zt(10),Ye.dtick=dt(We,Ft,Fe));if(Ye.dtick===0&&(Ye.dtick=1),!P(Ye.dtick)&&typeof Ye.dtick!="string"){var dr=Ye.dtick;throw Ye.dtick=1,"ax.dtick error: "+String(dr)}};function pt(Ye){var We=Ye.dtick;if(Ye._tickexponent=0,!P(We)&&typeof We!="string"&&(We=1),(Ye.type==="category"||Ye.type==="multicategory")&&(Ye._tickround=null),Ye.type==="date"){var Dt=Ye.r2l(Ye.tick0),Ft=Ye.l2r(Dt).replace(/(^-|i)/g,""),Zt=Ft.length;if(String(We).charAt(0)==="M")Zt>10||Ft.substr(5)!=="01-01"?Ye._tickround="d":Ye._tickround=+We.substr(1)%12===0?"y":"m";else if(We>=x&&Zt<=10||We>=x*15)Ye._tickround="d";else if(We>=a&&Zt<=16||We>=b)Ye._tickround="M";else if(We>=E&&Zt<=19||We>=a)Ye._tickround="S";else{var nr=Ye.l2r(Dt+We).replace(/^-/,"").length;Ye._tickround=Math.max(Zt,nr)-20,Ye._tickround<0&&(Ye._tickround=4)}}else if(P(We)||We.charAt(0)==="L"){var lr=Ye.range.map(Ye.r2d||Number);P(We)||(We=Number(We.substr(1))),Ye._tickround=2-Math.floor(Math.log(We)/Math.LN10+.01);var rr=Math.max(Math.abs(lr[0]),Math.abs(lr[1])),zt=Math.floor(Math.log(rr)/Math.LN10+.01),fr=Ye.minexponent===void 0?3:Ye.minexponent;Math.abs(zt)>fr&&(se(Ye.exponentformat)&&!ye(zt)?Ye._tickexponent=3*Math.round((zt-1)/3):Ye._tickexponent=zt)}else Ye._tickround=null}Q.tickIncrement=function(Ye,We,Dt,Ft){var Zt=Dt?-1:1;if(P(We))return A.increment(Ye,Zt*We);var nr=We.charAt(0),lr=Zt*Number(We.substr(1));if(nr==="M")return A.incrementMonth(Ye,lr,Ft);if(nr==="L")return Math.log(Math.pow(10,Ye)+lr)/Math.LN10;if(nr==="D"){var rr=We==="D2"?et:$e,zt=Ye+Zt*.01,fr=A.roundUp(A.mod(zt,1),rr,Dt);return Math.floor(zt)+Math.log(m.round(Math.pow(10,fr),1))/Math.LN10}throw"unrecognized dtick "+String(We)},Q.tickFirst=function(Ye,We){var Dt=Ye.r2l||Number,Ft=A.simpleMap(Ye.range,Dt,void 0,void 0,We),Zt=Ft[1]=0&&jr<=Ye._length?pn:null};Zt.xbnd=[kr(Zt.x-.5),kr(Zt.x+Ye.dtick-.5)]}return Zt},Q.hoverLabelText=function(Ye,We,Dt){Dt&&(Ye=A.extendFlat({},Ye,{hoverformat:Dt}));var Ft=Array.isArray(We)?We[0]:We,Zt=Array.isArray(We)?We[1]:void 0;if(Zt!==void 0&&Zt!==Ft)return Q.hoverLabelText(Ye,Ft,Dt)+" - "+Q.hoverLabelText(Ye,Zt,Dt);var nr=Ye.type==="log"&&Ft<=0,lr=Q.tickText(Ye,Ye.c2l(nr?-Ft:Ft),"hover").text;return nr?Ft===0?"0":y+lr:lr};function At(Ye,We,Dt){var Ft=Ye.tickfont||{};return{x:We,dx:0,dy:0,text:Dt||"",fontSize:Ft.size,font:Ft.family,fontColor:Ft.color}}function Mt(Ye,We,Dt,Ft){var Zt=Ye._tickround,nr=Dt&&Ye.hoverformat||Q.getTickFormat(Ye);Ft&&(P(Zt)?Zt=4:Zt={y:"m",m:"d",d:"M",M:"S",S:4}[Zt]);var lr=A.formatDate(We.x,nr,Zt,Ye._dateFormat,Ye.calendar,Ye._extraFormat),rr,zt=lr.indexOf(` `);if(zt!==-1&&(rr=lr.substr(zt+1),lr=lr.substr(0,zt)),Ft&&(lr==="00:00:00"||lr==="00:00"?(lr=rr,rr=""):lr.length===8&&(lr=lr.replace(/:00$/,""))),rr)if(Dt)Zt==="d"?lr+=", "+rr:lr=rr+(lr?", "+lr:"");else if(!Ye._inCalcTicks||Ye._prevDateHead!==rr)Ye._prevDateHead=rr,lr+="
"+rr;else{var fr=$t(Ye),dr=Ye._trueSide||Ye.side;(!fr&&dr==="top"||fr&&dr==="bottom")&&(lr+="
")}We.text=lr}function Vt(Ye,We,Dt,Ft,Zt){var nr=Ye.dtick,lr=We.x,rr=Ye.tickformat,zt=typeof nr=="string"&&nr.charAt(0);if(Zt==="never"&&(Zt=""),Ft&&zt!=="L"&&(nr="L3",zt="L"),rr||zt==="L")We.text=Le(Math.pow(10,lr),Ye,Zt,Ft);else if(P(nr)||zt==="D"&&A.mod(lr+.01,1)<.1){var fr=Math.round(lr),dr=Math.abs(fr),pr=Ye.exponentformat;pr==="power"||se(pr)&&ye(fr)?(fr===0?We.text=1:fr===1?We.text="10":We.text="10"+(fr>1?"":y)+dr+"",We.fontSize*=1.25):(pr==="e"||pr==="E")&&dr>2?We.text="1"+pr+(fr>0?"+":y)+dr:(We.text=Le(Math.pow(10,lr),Ye,"","fakehover"),nr==="D1"&&Ye._id.charAt(0)==="y"&&(We.dy-=We.fontSize/6))}else if(zt==="D")We.text=String(Math.round(Math.pow(10,A.mod(lr,1)))),We.fontSize*=.75;else throw"unrecognized dtick "+String(nr);if(Ye.dtick==="D1"){var vr=String(We.text).charAt(0);(vr==="0"||vr==="1")&&(Ye._id.charAt(0)==="y"?We.dx-=We.fontSize/4:(We.dy+=We.fontSize/2,We.dx+=(Ye.range[1]>Ye.range[0]?1:-1)*We.fontSize*(lr<0?.5:.25)))}}function Je(Ye,We){var Dt=Ye._categories[Math.round(We.x)];Dt===void 0&&(Dt=""),We.text=String(Dt)}function De(Ye,We,Dt){var Ft=Math.round(We.x),Zt=Ye._categories[Ft]||[],nr=Zt[1]===void 0?"":String(Zt[1]),lr=Zt[0]===void 0?"":String(Zt[0]);Dt?We.text=lr+" - "+nr:(We.text=nr,We.text2=lr)}function Ie(Ye,We,Dt,Ft,Zt){Zt==="never"?Zt="":Ye.showexponent==="all"&&Math.abs(We.x/Ye.dtick)<1e-6&&(Zt="hide"),We.text=Le(We.x,Ye,Zt,Ft)}function ze(Ye,We,Dt,Ft,Zt){if(Ye.thetaunit==="radians"&&!Dt){var nr=We.x/180;if(nr===0)We.text="0";else{var lr=Pe(nr);if(lr[1]>=100)We.text=Le(A.deg2rad(We.x),Ye,Zt,Ft);else{var rr=We.x<0;lr[1]===1?lr[0]===1?We.text="π":We.text=lr[0]+"π":We.text=["",lr[0],"","⁄","",lr[1],"","π"].join(""),rr&&(We.text=y+We.text)}}}else We.text=Le(We.x,Ye,Zt,Ft)}function Pe(Ye){function We(rr,zt){return Math.abs(rr-zt)<=1e-6}function Dt(rr,zt){return We(zt,0)?rr:Dt(zt,rr%zt)}function Ft(rr){for(var zt=1;!We(Math.round(rr*zt)/zt,rr);)zt*=10;return zt}var Zt=Ft(Ye),nr=Ye*Zt,lr=Math.abs(Dt(nr,Zt));return[Math.round(nr/lr),Math.round(Zt/lr)]}var be=["f","p","n","μ","m","","k","M","G","T"];function se(Ye){return Ye==="SI"||Ye==="B"}function ye(Ye){return Ye>14||Ye<-15}function Le(Ye,We,Dt,Ft){var Zt=Ye<0,nr=We._tickround,lr=Dt||We.exponentformat||"B",rr=We._tickexponent,zt=Q.getTickFormat(We),fr=We.separatethousands;if(Ft){var dr={exponentformat:lr,minexponent:We.minexponent,dtick:We.showexponent==="none"?We.dtick:P(Ye)&&Math.abs(Ye)||1,range:We.showexponent==="none"?We.range.map(We.r2d):[0,Ye||1]};pt(dr),nr=(Number(dr._tickround)||0)+4,rr=dr._tickexponent,We.hoverformat&&(zt=We.hoverformat)}if(zt)return We._numFormat(zt)(Ye).replace(/-/g,y);var pr=Math.pow(10,-nr)/2;if(lr==="none"&&(rr=0),Ye=Math.abs(Ye),Ye"+Ir+"":lr==="B"&&rr===9?Ye+="B":se(lr)&&(Ye+=be[rr/3+5])}return Zt?y+Ye:Ye}Q.getTickFormat=function(Ye){var We;function Dt(zt){return typeof zt!="string"?zt:Number(zt.replace("M",""))*M}function Ft(zt,fr){var dr=["L","D"];if(typeof zt==typeof fr){if(typeof zt=="number")return zt-fr;var pr=dr.indexOf(zt.charAt(0)),vr=dr.indexOf(fr.charAt(0));return pr===vr?Number(zt.replace(/(L|D)/g,""))-Number(fr.replace(/(L|D)/g,"")):pr-vr}else return typeof zt=="number"?1:-1}function Zt(zt,fr,dr){var pr=dr||function(Ir){return Ir},vr=fr[0],Hr=fr[1];return(!vr&&typeof vr!="number"||pr(vr)<=pr(zt))&&(!Hr&&typeof Hr!="number"||pr(Hr)>=pr(zt))}function nr(zt,fr){var dr=fr[0]===null,pr=fr[1]===null,vr=Ft(zt,fr[0])>=0,Hr=Ft(zt,fr[1])<=0;return(dr||vr)&&(pr||Hr)}var lr,rr;if(Ye.tickformatstops&&Ye.tickformatstops.length>0)switch(Ye.type){case"date":case"linear":{for(We=0;We=0&&Zt.unshift(Zt.splice(dr,1).shift())}});var rr={false:{left:0,right:0}};return A.syncOrAsync(Zt.map(function(zt){return function(){if(zt){var fr=Q.getFromId(Ye,zt);Dt||(Dt={}),Dt.axShifts=rr,Dt.overlayingShiftedAx=lr;var dr=Q.drawOne(Ye,fr,Dt);return fr._shiftPusher&&or(fr,fr._fullDepth||0,rr,!0),fr._r=fr.range.slice(),fr._rl=A.simpleMap(fr._r,fr.r2l),dr}}}))},Q.drawOne=function(Ye,We,Dt){Dt=Dt||{};var Ft=Dt.axShifts||{},Zt=Dt.overlayingShiftedAx||[],nr,lr,rr;We.setScale();var zt=Ye._fullLayout,fr=We._id,dr=fr.charAt(0),pr=Q.counterLetter(fr),vr=zt._plots[We._mainSubplot];if(!vr)return;if(We._shiftPusher=We.autoshift||Zt.indexOf(We._id)!==-1||Zt.indexOf(We.overlaying)!==-1,We._shiftPusher&We.anchor==="free"){var Hr=We.linewidth/2||0;We.ticks==="inside"&&(Hr+=We.ticklen),or(We,Hr,Ft,!0),or(We,We.shift||0,Ft,!1)}(Dt.skipTitle!==!0||We._shift===void 0)&&(We._shift=Er(We,Ft));var Ir=vr[dr+"axislayer"],kr=We._mainLinePosition,pn=kr+=We._shift,jr=We._mainMirrorPosition,In=We._vals=Q.calcTicks(We),Dn=[We.mirror,pn,jr].join("_");for(nr=0;nr0?yn.bottom-_n:0,Wn))));var ia=0,oa=0;if(We._shiftPusher&&(ia=Math.max(Wn,yn.height>0?zr==="l"?_n-yn.left:yn.right-_n:0),We.title.text!==zt._dfltTitle[dr]&&(oa=(We._titleStandoff||0)+(We._titleScoot||0),zr==="l"&&(oa+=ir(We))),We._fullDepth=Math.max(ia,oa)),We.automargin){On={x:0,y:0,r:0,l:0,t:0,b:0};var da=[0,1],Ki=typeof We._shift=="number"?We._shift:0;if(dr==="x"){if(zr==="b"?On[zr]=We._depth:(On[zr]=We._depth=Math.max(yn.width>0?_n-yn.top:0,Wn),da.reverse()),yn.width>0){var co=yn.right-(We._offset+We._length);co>0&&(On.xr=1,On.r=co);var yo=We._offset-yn.left;yo>0&&(On.xl=0,On.l=yo)}}else if(zr==="l"?(We._depth=Math.max(yn.height>0?_n-yn.left:0,Wn),On[zr]=We._depth-Ki):(We._depth=Math.max(yn.height>0?yn.right-_n:0,Wn),On[zr]=We._depth+Ki,da.reverse()),yn.height>0){var So=yn.bottom-(We._offset+We._length);So>0&&(On.yb=0,On.b=So);var mo=We._offset-yn.top;mo>0&&(On.yt=1,On.t=mo)}On[pr]=We.anchor==="free"?We.position:We._anchorAxis.domain[da[0]],We.title.text!==zt._dfltTitle[dr]&&(On[zr]+=ir(We)+(We.title.standoff||0)),We.mirror&&We.anchor!=="free"&&($n={x:0,y:0,r:0,l:0,t:0,b:0},$n[dn]=We.linewidth,We.mirror&&We.mirror!==!0&&($n[dn]+=Wn),We.mirror===!0||We.mirror==="ticks"?$n[pr]=We._anchorAxis.domain[da[1]]:(We.mirror==="all"||We.mirror==="allticks")&&($n[pr]=[We._counterDomainMin,We._counterDomainMax][da[1]]))}Cr&&(la=L.getComponentMethod("rangeslider","autoMarginOpts")(Ye,We)),typeof We.automargin=="string"&&(Be(On,We.automargin),Be($n,We.automargin)),i.autoMargin(Ye,hr(We),On),i.autoMargin(Ye,ut(We),$n),i.autoMargin(Ye,lt(We),la)}),A.syncOrAsync(un)}};function Be(Ye,We){if(Ye){var Dt=Object.keys(_).reduce(function(Ft,Zt){return We.indexOf(Zt)!==-1&&_[Zt].forEach(function(nr){Ft[nr]=1}),Ft},{});Object.keys(Ye).forEach(function(Ft){Dt[Ft]||(Ft.length===1?Ye[Ft]=0:delete Ye[Ft])})}}function ot(Ye,We){var Dt=[],Ft,Zt=function(nr,lr){var rr=nr.xbnd[lr];rr!==null&&Dt.push(A.extendFlat({},nr,{x:rr}))};if(We.length){for(Ft=0;Ft60?-.5*qn:Ye.side==="top"!==dr?-qn:0};else if(Nr==="y"){if(vn=!dr&&Or==="left"||dr&&Or==="right",xr=vn?1:-1,dr&&(xr*=-1),jr=vr,In=Hr*xr,Dn=0,!dr&&Math.abs(qr)===90&&(qr===-90&&Or==="left"||qr===90&&Or==="right"?Dn=J:Dn=.5),dr){var fn=P(qr)?+qr:0;if(fn!==0){var Tn=A.deg2rad(fn);Ar=Math.abs(Math.sin(Tn))*J*xr,Dn=0}}pn.xFn=function(Pn){return Pn.dx+We-(jr+Pn.fontSize*Dn)*xr+Ar*Pn.fontSize},pn.yFn=function(Pn){return Pn.dy+In+Pn.fontSize*Y},pn.anchorFn=function(Pn,jn){return P(jn)&&Math.abs(jn)===90?"middle":vn?"end":"start"},pn.heightFn=function(Pn,jn,qn){return Ye.side==="right"&&(jn*=-1),jn<-30?-qn:jn<30?-.5*qn:0}}return pn};function Lt(Ye){return[Ye.text,Ye.x,Ye.axInfo,Ye.font,Ye.fontSize,Ye.fontColor].join("_")}Q.drawTicks=function(Ye,We,Dt){Dt=Dt||{};var Ft=We._id+"tick",Zt=[].concat(We.minor&&We.minor.ticks?Dt.vals.filter(function(lr){return lr.minor&&!lr.noTick}):[]).concat(We.ticks?Dt.vals.filter(function(lr){return!lr.minor&&!lr.noTick}):[]),nr=Dt.layer.selectAll("path."+Ft).data(Zt,Lt);nr.exit().remove(),nr.enter().append("path").classed(Ft,1).classed("ticks",1).classed("crisp",Dt.crisp!==!1).each(function(lr){return r.stroke(m.select(this),lr.minor?We.minor.tickcolor:We.tickcolor)}).style("stroke-width",function(lr){return s.crispRound(Ye,lr.minor?We.minor.tickwidth:We.tickwidth,1)+"px"}).attr("d",Dt.path).style("display",null),Qt(We,[O]),nr.attr("transform",Dt.transFn)},Q.drawGrid=function(Ye,We,Dt){if(Dt=Dt||{},We.tickmode!=="sync"){var Ft=We._id+"grid",Zt=We.minor&&We.minor.showgrid,nr=Zt?Dt.vals.filter(function(jr){return jr.minor}):[],lr=We.showgrid?Dt.vals.filter(function(jr){return!jr.minor}):[],rr=Dt.counterAxis;if(rr&&Q.shouldShowZeroLine(Ye,We,rr))for(var zt=We.tickmode==="array",fr=0;fr=0;Ir--){var kr=Ir?vr:Hr;if(kr){var pn=kr.selectAll("path."+Ft).data(Ir?lr:nr,Lt);pn.exit().remove(),pn.enter().append("path").classed(Ft,1).classed("crisp",Dt.crisp!==!1),pn.attr("transform",Dt.transFn).attr("d",Dt.path).each(function(jr){return r.stroke(m.select(this),jr.minor?We.minor.gridcolor:We.gridcolor||"#ddd")}).style("stroke-dasharray",function(jr){return s.dashStyle(jr.minor?We.minor.griddash:We.griddash,jr.minor?We.minor.gridwidth:We.gridwidth)}).style("stroke-width",function(jr){return(jr.minor?pr:We._gw)+"px"}).style("display",null),typeof Dt.path=="function"&&pn.attr("d",Dt.path)}}Qt(We,[B,k])}},Q.drawZeroLine=function(Ye,We,Dt){Dt=Dt||Dt;var Ft=We._id+"zl",Zt=Q.shouldShowZeroLine(Ye,We,Dt.counterAxis),nr=Dt.layer.selectAll("path."+Ft).data(Zt?[{x:0,id:We._id}]:[]);nr.exit().remove(),nr.enter().append("path").classed(Ft,1).classed("zl",1).classed("crisp",Dt.crisp!==!1).each(function(){Dt.layer.selectAll("path").sort(function(lr,rr){return K(lr.id,rr.id)})}),nr.attr("transform",Dt.transFn).attr("d",Dt.path).call(r.stroke,We.zerolinecolor||r.defaultLine).style("stroke-width",s.crispRound(Ye,We.zerolinewidth,We._gw||1)+"px").style("display",null),Qt(We,[I])},Q.drawLabels=function(Ye,We,Dt){Dt=Dt||{};var Ft=Ye._fullLayout,Zt=We._id,nr=Zt.charAt(0),lr=Dt.cls||Zt+"tick",rr=Dt.vals.filter(function(xr){return xr.text}),zt=Dt.labelFns,fr=Dt.secondary?0:We.tickangle,dr=(We._prevTickAngles||{})[lr],pr=Dt.layer.selectAll("g."+lr).data(We.showticklabels?rr:[],Lt),vr=[];pr.enter().append("g").classed(lr,1).append("text").attr("text-anchor","middle").each(function(xr){var Ar=m.select(this),Or=Ye._promises.length;Ar.call(p.positionText,zt.xFn(xr),zt.yFn(xr)).call(s.font,xr.font,xr.fontSize,xr.fontColor).text(xr.text).call(p.convertToTspans,Ye),Ye._promises[Or]?vr.push(Ye._promises.pop().then(function(){Hr(Ar,fr)})):Hr(Ar,fr)}),Qt(We,[N]),pr.exit().remove(),Dt.repositionOnUpdate&&pr.each(function(xr){m.select(this).select("text").call(p.positionText,zt.xFn(xr),zt.yFn(xr))});function Hr(xr,Ar){xr.each(function(Or){var Nr=m.select(this),qr=Nr.select(".text-math-group"),vn=zt.anchorFn(Or,Ar),fn=Dt.transFn.call(Nr.node(),Or)+(P(Ar)&&+Ar!=0?" rotate("+Ar+","+zt.xFn(Or)+","+(zt.yFn(Or)-Or.fontSize/2)+")":""),Tn=p.lineCount(Nr),Pn=te*Or.fontSize,jn=zt.heightFn(Or,P(Ar)?+Ar:0,(Tn-1)*Pn);if(jn&&(fn+=v(0,jn)),qr.empty()){var qn=Nr.select("text");qn.attr({transform:fn,"text-anchor":vn}),qn.style("opacity",1),We._adjustTickLabelsOverflow&&We._adjustTickLabelsOverflow()}else{var sa=s.bBox(qr.node()).width,ta=sa*{end:-.5,start:.5}[vn];qr.attr("transform",fn+v(ta,0))}})}We._adjustTickLabelsOverflow=function(){var xr=We.ticklabeloverflow;if(!(!xr||xr==="allow")){var Ar=xr.indexOf("hide")!==-1,Or=We._id.charAt(0)==="x",Nr=0,qr=Or?Ye._fullLayout.width:Ye._fullLayout.height;if(xr.indexOf("domain")!==-1){var vn=A.simpleMap(We.range,We.r2l);Nr=We.l2p(vn[0])+We._offset,qr=We.l2p(vn[1])+We._offset}var fn=Math.min(Nr,qr),Tn=Math.max(Nr,qr),Pn=We.side,jn=1/0,qn=-1/0;pr.each(function(Mr){var on=m.select(this),nn=on.select(".text-math-group");if(nn.empty()){var gn=s.bBox(on.node()),Un=0;Or?(gn.right>Tn||gn.leftTn||gn.top+(We.tickangle?0:Mr.fontSize/4)We["_visibleLabelMin_"+vn._id]?Mr.style("display","none"):Tn.K==="tick"&&!fn&&Mr.style("display",null)})})})})},Hr(pr,dr+1?dr:fr);function Ir(){return vr.length&&Promise.all(vr)}var kr=null;function pn(){if(Hr(pr,fr),rr.length&&nr==="x"&&!P(fr)&&(We.type!=="log"||String(We.dtick).charAt(0)!=="D")){kr=0;var xr=0,Ar=[],Or;if(pr.each(function(gn){xr=Math.max(xr,gn.fontSize);var Un=We.l2p(gn.x),En=br(this),Cn=s.bBox(En.node());Ar.push({top:0,bottom:10,height:10,left:Un-Cn.width/2,right:Un+Cn.width/2+2,width:Cn.width+2})}),(We.tickson==="boundaries"||We.showdividers)&&!Dt.secondary){var Nr=2;for(We.ticks&&(Nr+=We.tickwidth/2),Or=0;Or1&&Dt1)for(Zt=1;Zt=Zt.min&&Yeo*2}function n(u){return Math.max(1,(u-1)/1e3)}function l(u,g){for(var f=u.length,w=n(f),h=0,o=0,d={},M=0;Mh*2}function c(u){return L(u[0])&&L(u[1])}},71453:function(G,V,e){var m=e(92770),P=e(73972),i=e(71828),L=e(44467),A=e(85501),v=e(13838),p=e(26218),t=e(38701),r=e(96115),s=e(89426),n=e(15258),l=e(92128),c=e(23074),u=e(21994),g=e(85555).WEEKDAY_PATTERN,f=e(85555).HOUR_PATTERN;G.exports=function(M,T,C,x,S){var b=x.letter,a=x.font||{},E=x.splomStash||{},y=C("visible",!x.visibleDflt),z=T._template||{},I=T.type||z.type||"-",B;if(I==="date"){var k=P.getComponentMethod("calendars","handleDefaults");k(M,T,"calendar",x.calendar),x.noTicklabelmode||(B=C("ticklabelmode"))}var O="";(!x.noTicklabelposition||I==="multicategory")&&(O=i.coerce(M,T,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:B==="period"?["outside","inside"]:b==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),x.noTicklabeloverflow||C("ticklabeloverflow",O.indexOf("inside")!==-1?"hide past domain":I==="category"||I==="multicategory"?"allow":"hide past div"),u(T,S),C("minallowed"),C("maxallowed");var N=C("range"),_=T.getAutorangeDflt(N,x),U=C("autorange",_),Y;N&&(N[0]===null&&N[1]===null||(N[0]===null||N[1]===null)&&(U==="reversed"||U===!0)||N[0]!==null&&(U==="min"||U==="max reversed")||N[1]!==null&&(U==="max"||U==="min reversed"))&&(N=void 0,delete T.range,T.autorange=!0,Y=!0),Y||(_=T.getAutorangeDflt(N,x),U=C("autorange",_)),U&&(c(C,U,N),(I==="linear"||I==="-")&&C("rangemode")),T.cleanRange(),n(M,T,C,x),I!=="category"&&!x.noHover&&C("hoverformat");var J=C("color"),te=J!==v.color.dflt?J:a.color,ae=E.label||S._dfltTitle[b];if(s(M,T,C,I,x),!y)return T;C("title.text",ae),i.coerceFont(C,"title.font",{family:a.family,size:i.bigFont(a.size),color:te}),p(M,T,C,I);var ce=x.hasMinor;if(ce&&(L.newContainer(T,"minor"),p(M,T,C,I,{isMinor:!0})),r(M,T,C,I,x),t(M,T,C,x),ce){var Q=x.isMinor;x.isMinor=!0,t(M,T,C,x),x.isMinor=Q}l(M,T,C,{dfltColor:J,bgColor:x.bgColor,showGrid:x.showGrid,hasMinor:ce,attributes:v}),ce&&!T.minor.ticks&&!T.minor.showgrid&&delete T.minor,(T.showline||T.ticks)&&C("mirror");var Z=I==="multicategory";if(!x.noTickson&&(I==="category"||Z)&&(T.ticks||T.showgrid)){var j;Z&&(j="boundaries");var K=C("tickson",j);K==="boundaries"&&delete T.ticklabelposition}if(Z){var ee=C("showdividers");ee&&(C("dividercolor"),C("dividerwidth"))}if(I==="date")if(A(M,T,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:w}),!T.rangebreaks.length)delete T.rangebreaks;else{for(var oe=0;oe=2){var b="",a,E;if(S.length===2){for(a=0;a<2;a++)if(E=o(S[a]),E){b=g;break}}var y=C("pattern",b);if(y===g)for(a=0;a<2;a++)E=o(S[a]),E&&(M.bounds[a]=S[a]=E-1);if(y)for(a=0;a<2;a++)switch(E=S[a],y){case g:if(!m(E)){M.enabled=!1;return}if(E=+E,E!==Math.floor(E)||E<0||E>=7){M.enabled=!1;return}M.bounds[a]=S[a]=E;break;case f:if(!m(E)){M.enabled=!1;return}if(E=+E,E<0||E>24){M.enabled=!1;return}M.bounds[a]=S[a]=E;break}if(T.autorange===!1){var z=T.range;if(z[0]z[1]){M.enabled=!1;return}}else if(S[0]>z[0]&&S[1]p?1:-1:+(L.substr(1)||1)-+(A.substr(1)||1)},V.ref2id=function(L){return/^[xyz]/.test(L)?L.split(" ")[0]:!1};function i(L,A){if(A&&A.length){for(var v=0;v0,p;v&&(p="array");var t=i("categoryorder",p),r;t==="array"&&(r=i("categoryarray")),!v&&t==="array"&&(t=P.categoryorder="trace"),t==="trace"?P._initialCategories=[]:t==="array"?P._initialCategories=r.slice():(r=V(P,L).sort(),t==="category ascending"?P._initialCategories=r:t==="category descending"&&(P._initialCategories=r.reverse()))}}},66287:function(G,V,e){var m=e(92770),P=e(71828),i=e(50606),L=i.ONEDAY,A=i.ONEWEEK;V.dtick=function(v,p){var t=p==="log",r=p==="date",s=p==="category",n=r?L:1;if(!v)return n;if(m(v))return v=Number(v),v<=0?n:s?Math.max(1,Math.round(v)):r?Math.max(.1,v):v;if(typeof v!="string"||!(r||t))return n;var l=v.charAt(0),c=v.substr(1);return c=m(c)?Number(c):0,c<=0||!(r&&l==="M"&&c===Math.round(c)||t&&l==="L"||t&&l==="D"&&(c===1||c===2))?n:v},V.tick0=function(v,p,t,r){if(p==="date")return P.cleanDate(v,P.dateTick0(t,r%A===0?1:0));if(!(r==="D1"||r==="D2"))return m(v)?Number(v):0}},85555:function(G,V,e){var m=e(30587).counter;G.exports={idRegex:{x:m("x","( domain)?"),y:m("y","( domain)?")},attrRegex:m("[xy]axis"),xAxisMatch:m("xaxis"),yAxisMatch:m("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"}}},99082:function(G,V,e){var m=e(71828),P=e(71739),i=e(41675).id2name,L=e(13838),A=e(42449),v=e(21994),p=e(50606).ALMOST_EQUAL,t=e(18783).FROM_BL;V.handleDefaults=function(f,w,h){var o=h.axIds,d=h.axHasImage,M=w._axisConstraintGroups=[],T=w._axisMatchGroups=[],C,x,S,b,a,E,y,z;for(C=0;CM?h.substr(M):o.substr(d))+T}function u(f,w){for(var h=w._size,o=h.h/h.w,d={},M=Object.keys(f),T=0;Tp*z&&!O)){for(M=0;MZ&&iece&&(ce=ie);var me=(ce-ae)/(2*Q);a/=me,ae=x.l2r(ae),ce=x.l2r(ce),x.range=x._input.range=Y=0){fr._fullLayout._deactivateShape(fr);return}var dr=fr._fullLayout.clickmode;if(Z(fr),rr===2&&!Ue&&We(),Se)dr.indexOf("select")>-1&&S(zt,fr,qe,$e,he.id,It),dr.indexOf("event")>-1&&n.click(fr,zt,he.id);else if(rr===1&&Ue){var pr=Ne?Fe:He,vr=Ne==="s"||Ee==="w"?0:1,Hr=pr._name+".range["+vr+"]",Ir=N(pr,vr),kr="left",pn="middle";if(pr.fixedrange)return;Ne?(pn=Ne==="n"?"top":"bottom",pr.side==="right"&&(kr="right")):Ee==="e"&&(kr="right"),fr._context.showAxisRangeEntryBoxes&&m.select(wt).call(t.makeEditable,{gd:fr,immediate:!0,background:fr._fullLayout.paper_bgcolor,text:String(Ir),fill:pr.tickfont?pr.tickfont.color:"#444",horizontalAlign:kr,verticalAlign:pn}).on("edit",function(jr){var In=pr.d2r(jr);In!==void 0&&v.call("_guiRelayout",fr,Hr,In)})}}u.init(It);var Lt,Kt,ir,_r,yt,jt,Yt,br,hr,ut;function lt(rr,zt,fr){var dr=wt.getBoundingClientRect();Lt=zt-dr.left,Kt=fr-dr.top,ie._fullLayout._calcInverseTransform(ie);var pr=P.apply3DTransform(ie._fullLayout._invTransform)(Lt,Kt);Lt=pr[0],Kt=pr[1],ir={l:Lt,r:Lt,w:0,t:Kt,b:Kt,h:0},_r=ie._hmpixcount?ie._hmlumcount/ie._hmpixcount:L(ie._fullLayout.plot_bgcolor).getLuminance(),yt="M0,0H"+dt+"V"+pt+"H0V0",jt=!1,Yt="xy",ut=!1,br=te(xe,_r,et,ct,yt),hr=ae(xe,et,ct)}function xt(rr,zt){if(ie._transitioningWithDuration)return!1;var fr=Math.max(0,Math.min(dt,Le*rr+Lt)),dr=Math.max(0,Math.min(pt,Be*zt+Kt)),pr=Math.abs(fr-Lt),vr=Math.abs(dr-Kt);ir.l=Math.min(Lt,fr),ir.r=Math.max(Lt,fr),ir.t=Math.min(Kt,dr),ir.b=Math.max(Kt,dr);function Hr(){Yt="",ir.r=ir.l,ir.t=ir.b,hr.attr("d","M0,0Z")}if(At.isSubplotConstrained)pr>y||vr>y?(Yt="xy",pr/dt>vr/pt?(vr=pr*pt/dt,Kt>dr?ir.t=Kt-vr:ir.b=Kt+vr):(pr=vr*dt/pt,Lt>fr?ir.l=Lt-pr:ir.r=Lt+pr),hr.attr("d",oe(ir))):Hr();else if(Mt.isSubplotConstrained)if(pr>y||vr>y){Yt="xy";var Ir=Math.min(ir.l/dt,(pt-ir.b)/pt),kr=Math.max(ir.r/dt,(pt-ir.t)/pt);ir.l=Ir*dt,ir.r=kr*dt,ir.b=(1-Ir)*pt,ir.t=(1-kr)*pt,hr.attr("d",oe(ir))}else Hr();else!Je||vr0){var jr;if(Mt.isSubplotConstrained||!Vt&&Je.length===1){for(jr=0;jr1&&(Hr.maxallowed!==void 0&&Ie===(Hr.range[0]1&&(Ir.maxallowed!==void 0&&ze===(Ir.range[0]=0?Math.min(ie,.9):1/(1/Math.max(ie,-.3)+3.222))}function J(ie,he,me){return ie?ie==="nsew"?me?"":he==="pan"?"move":"crosshair":ie.toLowerCase()+"-resize":"pointer"}function te(ie,he,me,Me,Te){return ie.append("path").attr("class","zoombox").style({fill:he>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",p(me,Me)).attr("d",Te+"Z")}function ae(ie,he,me){return ie.append("path").attr("class","zoombox-corners").style({fill:r.background,stroke:r.defaultLine,"stroke-width":1,opacity:0}).attr("transform",p(he,me)).attr("d","M0,0Z")}function ce(ie,he,me,Me,Te,Oe){ie.attr("d",Me+"M"+me.l+","+me.t+"v"+me.h+"h"+me.w+"v-"+me.h+"h-"+me.w+"Z"),Q(ie,he,Te,Oe)}function Q(ie,he,me,Me){me||(ie.transition().style("fill",Me>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),he.transition().style("opacity",1).duration(200))}function Z(ie){m.select(ie).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function j(ie){z&&ie.data&&ie._context.showTips&&(P.notifier(P._(ie,"Double-click to zoom back out"),"long"),z=!1)}function K(ie,he){return"M"+(ie.l-.5)+","+(he-y-.5)+"h-3v"+(2*y+1)+"h3ZM"+(ie.r+.5)+","+(he-y-.5)+"h3v"+(2*y+1)+"h-3Z"}function ee(ie,he){return"M"+(he-y-.5)+","+(ie.t-.5)+"v-3h"+(2*y+1)+"v3ZM"+(he-y-.5)+","+(ie.b+.5)+"v3h"+(2*y+1)+"v-3Z"}function oe(ie){var he=Math.floor(Math.min(ie.b-ie.t,ie.r-ie.l,y)/2);return"M"+(ie.l-3.5)+","+(ie.t-.5+he)+"h3v"+-he+"h"+he+"v-3h-"+(he+3)+"ZM"+(ie.r+3.5)+","+(ie.t-.5+he)+"h-3v"+-he+"h"+-he+"v-3h"+(he+3)+"ZM"+(ie.r+3.5)+","+(ie.b+.5-he)+"h-3v"+he+"h"+-he+"v3h"+(he+3)+"ZM"+(ie.l-3.5)+","+(ie.b+.5-he)+"h3v"+he+"h"+he+"v3h-"+(he+3)+"Z"}function q(ie,he,me,Me,Te){for(var Oe=!1,Ne={},Ee={},xe,Se,Ue,He,Fe=(Te||{}).xaHash,Ge=(Te||{}).yaHash,nt=0;ntC[1]-.000244140625&&(A.domain=u),P.noneOrAll(L.domain,A.domain,u),A.tickmode==="sync"&&(A.tickmode="auto")}return v("layer"),A}},89426:function(G,V,e){var m=e(59652);G.exports=function(i,L,A,v,p){p||(p={});var t=p.tickSuffixDflt,r=m(i),s=A("tickprefix");s&&A("showtickprefix",r);var n=A("ticksuffix",t);n&&A("showticksuffix",r)}},42449:function(G,V,e){var m=e(18783).FROM_BL;G.exports=function(i,L,A){A===void 0&&(A=m[i.constraintoward||"center"]);var v=[i.r2l(i.range[0]),i.r2l(i.range[1])],p=v[0]+(v[1]-v[0])*A;i.range=i._input.range=[i.l2r(p+(v[0]-p)*L),i.l2r(p+(v[1]-p)*L)],i.setScale()}},21994:function(G,V,e){var m=e(39898),P=e(84096).g0,i=e(71828),L=i.numberFormat,A=e(92770),v=i.cleanNumber,p=i.ms2DateTime,t=i.dateTime2ms,r=i.ensureNumber,s=i.isArrayOrTypedArray,n=e(50606),l=n.FP_SAFE,c=n.BADNUM,u=n.LOG_CLIP,g=n.ONEWEEK,f=n.ONEDAY,w=n.ONEHOUR,h=n.ONEMIN,o=n.ONESEC,d=e(41675),M=e(85555),T=M.HOUR_PATTERN,C=M.WEEKDAY_PATTERN;function x(b){return Math.pow(10,b)}function S(b){return b!=null}G.exports=function(a,E){E=E||{};var y=a._id||"x",z=y.charAt(0);function I(K,ee){if(K>0)return Math.log(K)/Math.LN10;if(K<=0&&ee&&a.range&&a.range.length===2){var oe=a.range[0],q=a.range[1];return .5*(oe+q-2*u*Math.abs(oe-q))}else return c}function B(K,ee,oe,q){if((q||{}).msUTC&&A(K))return+K;var $=t(K,oe||a.calendar);if($===c)if(A(K)){K=+K;var le=Math.floor(i.mod(K+.05,1)*10),ie=Math.round(K-le/10);$=t(new Date(ie))+le/10}else return c;return $}function k(K,ee,oe){return p(K,ee,oe||a.calendar)}function O(K){return a._categories[Math.round(K)]}function N(K){if(S(K)){if(a._categoriesMap===void 0&&(a._categoriesMap={}),a._categoriesMap[K]!==void 0)return a._categoriesMap[K];a._categories.push(typeof K=="number"?String(K):K);var ee=a._categories.length-1;return a._categoriesMap[K]=ee,ee}return c}function _(K,ee){for(var oe=new Array(ee),q=0;qa.range[1]&&(oe=!oe);for(var q=oe?-1:1,$=q*K,le=0,ie=0;ieme)le=ie+1;else{le=$<(he+me)/2?ie:ie+1;break}}var Me=a._B[le]||0;return isFinite(Me)?te(K,a._m2,Me):0},Q=function(K){var ee=a._rangebreaks.length;if(!ee)return ae(K,a._m,a._b);for(var oe=0,q=0;qa._rangebreaks[q].pmax&&(oe=q+1);return ae(K,a._m2,a._B[oe])}}a.c2l=a.type==="log"?I:r,a.l2c=a.type==="log"?x:r,a.l2p=ce,a.p2l=Q,a.c2p=a.type==="log"?function(K,ee){return ce(I(K,ee))}:ce,a.p2c=a.type==="log"?function(K){return x(Q(K))}:Q,["linear","-"].indexOf(a.type)!==-1?(a.d2r=a.r2d=a.d2c=a.r2c=a.d2l=a.r2l=v,a.c2d=a.c2r=a.l2d=a.l2r=r,a.d2p=a.r2p=function(K){return a.l2p(v(K))},a.p2d=a.p2r=Q,a.cleanPos=r):a.type==="log"?(a.d2r=a.d2l=function(K,ee){return I(v(K),ee)},a.r2d=a.r2c=function(K){return x(v(K))},a.d2c=a.r2l=v,a.c2d=a.l2r=r,a.c2r=I,a.l2d=x,a.d2p=function(K,ee){return a.l2p(a.d2r(K,ee))},a.p2d=function(K){return x(Q(K))},a.r2p=function(K){return a.l2p(v(K))},a.p2r=Q,a.cleanPos=r):a.type==="date"?(a.d2r=a.r2d=i.identity,a.d2c=a.r2c=a.d2l=a.r2l=B,a.c2d=a.c2r=a.l2d=a.l2r=k,a.d2p=a.r2p=function(K,ee,oe){return a.l2p(B(K,0,oe))},a.p2d=a.p2r=function(K,ee,oe){return k(Q(K),ee,oe)},a.cleanPos=function(K){return i.cleanDate(K,c,a.calendar)}):a.type==="category"?(a.d2c=a.d2l=N,a.r2d=a.c2d=a.l2d=O,a.d2r=a.d2l_noadd=Y,a.r2c=function(K){var ee=J(K);return ee!==void 0?ee:a.fraction2r(.5)},a.l2r=a.c2r=r,a.r2l=J,a.d2p=function(K){return a.l2p(a.r2c(K))},a.p2d=function(K){return O(Q(K))},a.r2p=a.d2p,a.p2r=Q,a.cleanPos=function(K){return typeof K=="string"&&K!==""?K:r(K)}):a.type==="multicategory"&&(a.r2d=a.c2d=a.l2d=O,a.d2r=a.d2l_noadd=Y,a.r2c=function(K){var ee=Y(K);return ee!==void 0?ee:a.fraction2r(.5)},a.r2c_just_indices=U,a.l2r=a.c2r=r,a.r2l=Y,a.d2p=function(K){return a.l2p(a.r2c(K))},a.p2d=function(K){return O(Q(K))},a.r2p=a.d2p,a.p2r=Q,a.cleanPos=function(K){return Array.isArray(K)||typeof K=="string"&&K!==""?K:r(K)},a.setupMultiCategory=function(K){var ee=a._traceIndices,oe,q,$=a._matchGroup;if($&&a._categories.length===0){for(var le in $)if(le!==y){var ie=E[d.id2name(le)];ee=ee.concat(ie._traceIndices)}}var he=[[0,{}],[0,{}]],me=[];for(oe=0;oeie[1]&&(q[le?0:1]=oe)}},a.cleanRange=function(K,ee){a._cleanRange(K,ee),a.limitRange(K)},a._cleanRange=function(K,ee){ee||(ee={}),K||(K="range");var oe=i.nestedProperty(a,K).get(),q,$;if(a.type==="date"?$=i.dfltRange(a.calendar):z==="y"?$=M.DFLTRANGEY:a._name==="realaxis"?$=[0,1]:$=ee.dfltRange||M.DFLTRANGEX,$=$.slice(),(a.rangemode==="tozero"||a.rangemode==="nonnegative")&&($[0]=0),!oe||oe.length!==2){i.nestedProperty(a,K).set($);return}var le=oe[0]===null,ie=oe[1]===null;for(a.type==="date"&&!a.autorange&&(oe[0]=i.cleanDate(oe[0],c,a.calendar),oe[1]=i.cleanDate(oe[1],c,a.calendar)),q=0;q<2;q++)if(a.type==="date"){if(!i.isDateTime(oe[q],a.calendar)){a[K]=$;break}if(a.r2l(oe[0])===a.r2l(oe[1])){var he=i.constrain(a.r2l(oe[0]),i.MIN_MS+1e3,i.MAX_MS-1e3);oe[0]=a.l2r(he-1e3),oe[1]=a.l2r(he+1e3);break}}else{if(!A(oe[q]))if(!(le||ie)&&A(oe[1-q]))oe[q]=oe[1-q]*(q?10:.1);else{a[K]=$;break}if(oe[q]<-l?oe[q]=-l:oe[q]>l&&(oe[q]=l),oe[0]===oe[1]){var me=Math.max(1,Math.abs(oe[0]*1e-6));oe[0]-=me,oe[1]+=me}}},a.setScale=function(K){var ee=E._size;if(a.overlaying){var oe=d.getFromId({_fullLayout:E},a.overlaying);a.domain=oe.domain}var q=K&&a._r?"_r":"range",$=a.calendar;a.cleanRange(q);var le=a.r2l(a[q][0],$),ie=a.r2l(a[q][1],$),he=z==="y";if(he?(a._offset=ee.t+(1-a.domain[1])*ee.h,a._length=ee.h*(a.domain[1]-a.domain[0]),a._m=a._length/(le-ie),a._b=-a._m*ie):(a._offset=ee.l+a.domain[0]*ee.w,a._length=ee.w*(a.domain[1]-a.domain[0]),a._m=a._length/(ie-le),a._b=-a._m*le),a._rangebreaks=[],a._lBreaks=0,a._m2=0,a._B=[],a.rangebreaks){var me,Me;if(a._rangebreaks=a.locateBreaks(Math.min(le,ie),Math.max(le,ie)),a._rangebreaks.length){for(me=0;meie&&(Te=!Te),Te&&a._rangebreaks.reverse();var Oe=Te?-1:1;for(a._m2=Oe*a._length/(Math.abs(ie-le)-a._lBreaks),a._B.push(-a._m2*(he?ie:le)),me=0;me$&&($+=7,le$&&($+=24,le=q&&le<$)return c}else for(var xe=ee._cachedValues[he],Se=0;Se=q&&K<$)return c}}return K},a.locateBreaks=function(K,ee){var oe,q,$,le,ie=[];if(!a.rangebreaks)return ie;var he=a.rangebreaks.slice().sort(function(Fe,Ge){return Fe.pattern===C&&Ge.pattern===T?-1:Ge.pattern===C&&Fe.pattern===T?1:0}),me=function(Fe,Ge){if(Fe=i.constrain(Fe,K,ee),Ge=i.constrain(Ge,K,ee),Fe!==Ge){for(var nt=!0,qe=0;qe=$e.min&&(Fe<$e.min&&($e.min=Fe),Ge>$e.max&&($e.max=Ge),nt=!1)}nt&&ie.push({min:Fe,max:Ge})}};for(oe=0;oe rect").call(L.setTranslate,0,0).call(L.setScale,1,1),T.plot.call(L.setTranslate,C._offset,x._offset).call(L.setScale,1,1);var S=T.plot.selectAll(".scatterlayer .trace");S.selectAll(".point").call(L.setPointGroupScale,1,1),S.selectAll(".textpoint").call(L.setTextPointsScale,1,1),S.call(L.hideOutsideRangePoints,T)}function c(T,C){var x=T.plotinfo,S=x.xaxis,b=x.yaxis,a=S._length,E=b._length,y=!!T.xr1,z=!!T.yr1,I=[];if(y){var B=i.simpleMap(T.xr0,S.r2l),k=i.simpleMap(T.xr1,S.r2l),O=B[1]-B[0],N=k[1]-k[0];I[0]=(B[0]*(1-C)+C*k[0]-B[0])/(B[1]-B[0])*a,I[2]=a*(1-C+C*N/O),S.range[0]=S.l2r(B[0]*(1-C)+C*k[0]),S.range[1]=S.l2r(B[1]*(1-C)+C*k[1])}else I[0]=0,I[2]=a;if(z){var _=i.simpleMap(T.yr0,b.r2l),U=i.simpleMap(T.yr1,b.r2l),Y=_[1]-_[0],J=U[1]-U[0];I[1]=(_[1]*(1-C)+C*U[1]-_[1])/(_[0]-_[1])*E,I[3]=E*(1-C+C*J/Y),b.range[0]=S.l2r(_[0]*(1-C)+C*U[0]),b.range[1]=b.l2r(_[1]*(1-C)+C*U[1])}else I[1]=0,I[3]=E;A.drawOne(p,S,{skipTitle:!0}),A.drawOne(p,b,{skipTitle:!0}),A.redrawComponents(p,[S._id,b._id]);var te=y?a/I[2]:1,ae=z?E/I[3]:1,ce=y?I[0]:0,Q=z?I[1]:0,Z=y?I[0]/I[2]*a:0,j=z?I[1]/I[3]*E:0,K=S._offset-Z,ee=b._offset-j;x.clipRect.call(L.setTranslate,ce,Q).call(L.setScale,1/te,1/ae),x.plot.call(L.setTranslate,K,ee).call(L.setScale,te,ae),L.setPointGroupScale(x.zoomScalePts,1/te,1/ae),L.setTextPointsScale(x.zoomScaleTxt,1/te,1/ae)}var u;s&&(u=s());function g(){for(var T={},C=0;Cr.duration?(g(),o=window.cancelAnimationFrame(M)):o=window.requestAnimationFrame(M)}return w=Date.now(),o=window.requestAnimationFrame(M),Promise.resolve()}},951:function(G,V,e){var m=e(73972).traceIs,P=e(4322);G.exports=function(t,r,s,n){s("autotypenumbers",n.autotypenumbersDflt);var l=s("type",(n.splomStash||{}).type);l==="-"&&(i(r,n.data),r.type==="-"?r.type="linear":t.type=r.type)};function i(p,t){if(p.type==="-"){var r=p._id,s=r.charAt(0),n;r.indexOf("scene")!==-1&&(r=s);var l=L(t,r,s);if(l){if(l.type==="histogram"&&s==={v:"y",h:"x"}[l.orientation||"v"]){p.type="linear";return}var c=s+"calendar",u=l[c],g={noMultiCategory:!m(l,"cartesian")||m(l,"noMultiCategory")};if(l.type==="box"&&l._hasPreCompStats&&s==={h:"x",v:"y"}[l.orientation||"v"]&&(g.noMultiCategory=!0),g.autotypenumbers=p.autotypenumbers,v(l,s)){var f=A(l),w=[];for(n=0;n0&&(n["_"+r+"axes"]||{})[t])return n;if((n[r+"axis"]||r)===t){if(v(n,r))return n;if((n[r]||[]).length||n[r+"0"])return n}}}function A(p){return{v:"x",h:"y"}[p.orientation||"v"]}function v(p,t){var r=A(p),s=m(p,"box-violin"),n=m(p._fullInput||{},"candlestick");return s&&!n&&t===r&&p[r]===void 0&&p[r+"0"]===void 0}},31137:function(G,V,e){var m=e(73972),P=e(71828);V.manageCommandObserver=function(t,r,s,n){var l={},c=!0;r&&r._commandObserver&&(l=r._commandObserver),l.cache||(l.cache={}),l.lookupTable={};var u=V.hasSimpleAPICommandBindings(t,s,l.lookupTable);if(r&&r._commandObserver){if(u)return l;if(r._commandObserver.remove)return r._commandObserver.remove(),r._commandObserver=null,l}if(u){i(t,u,l.cache),l.check=function(){if(c){var h=i(t,u,l.cache);return h.changed&&n&&l.lookupTable[h.value]!==void 0&&(l.disable(),Promise.resolve(n({value:h.value,type:u.type,prop:u.prop,traces:u.traces,index:l.lookupTable[h.value]})).then(l.enable,l.enable)),h.changed}};for(var g=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],f=0;f0?".":"")+l;P.isPlainObject(c)?p(c,r,u,n+1):r(u,l,c)}})}},27670:function(G,V,e){var m=e(1426).extendFlat;V.Y=function(P,i){P=P||{},i=i||{};var L={valType:"info_array",editType:P.editType,items:[{valType:"number",min:0,max:1,editType:P.editType},{valType:"number",min:0,max:1,editType:P.editType}],dflt:[0,1]};P.name&&P.name+"",P.trace,i.description&&""+i.description;var A={x:m({},L,{}),y:m({},L,{}),editType:P.editType};return P.noGridCell||(A.row={valType:"integer",min:0,dflt:0,editType:P.editType},A.column={valType:"integer",min:0,dflt:0,editType:P.editType}),A},V.c=function(P,i,L,A){var v=A&&A.x||[0,1],p=A&&A.y||[0,1],t=i.grid;if(t){var r=L("domain.column");r!==void 0&&(r0&&N._module.calcGeoJSON(O,z)}if(!I){var _=this.updateProjection(y,z);if(_)return;(!this.viewInitial||this.scope!==B.scope)&&this.saveViewInitial(B)}this.scope=B.scope,this.updateBaseLayers(z,B),this.updateDims(z,B),this.updateFx(z,B),l.generalUpdatePerTraceModule(this.graphDiv,this,y,B);var U=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=U.selectAll(".point"),this.dataPoints.text=U.selectAll("text"),this.dataPaths.line=U.selectAll(".js-line");var Y=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=Y.selectAll("path"),this._render()},S.updateProjection=function(y,z){var I=this.graphDiv,B=z[this.id],k=z._size,O=B.domain,N=B.projection,_=B.lonaxis,U=B.lataxis,Y=_._ax,J=U._ax,te=this.projection=b(B),ae=[[k.l+k.w*O.x[0],k.t+k.h*(1-O.y[1])],[k.l+k.w*O.x[1],k.t+k.h*(1-O.y[0])]],ce=B.center||{},Q=N.rotation||{},Z=_.range||[],j=U.range||[];if(B.fitbounds){Y._length=ae[1][0]-ae[0][0],J._length=ae[1][1]-ae[0][1],Y.range=u(I,Y),J.range=u(I,J);var K=(Y.range[0]+Y.range[1])/2,ee=(J.range[0]+J.range[1])/2;if(B._isScoped)ce={lon:K,lat:ee};else if(B._isClipped){ce={lon:K,lat:ee},Q={lon:K,lat:ee,roll:Q.roll};var oe=N.type,q=d.lonaxisSpan[oe]/2||180,$=d.lataxisSpan[oe]/2||90;Z=[K-q,K+q],j=[ee-$,ee+$]}else ce={lon:K,lat:ee},Q={lon:K,lat:Q.lat,roll:Q.roll}}te.center([ce.lon-Q.lon,ce.lat-Q.lat]).rotate([-Q.lon,-Q.lat,Q.roll]).parallels(N.parallels);var le=E(Z,j);te.fitExtent(ae,le);var ie=this.bounds=te.getBounds(le),he=this.fitScale=te.scale(),me=te.translate();if(B.fitbounds){var Me=te.getBounds(E(Y.range,J.range)),Te=Math.min((ie[1][0]-ie[0][0])/(Me[1][0]-Me[0][0]),(ie[1][1]-ie[0][1])/(Me[1][1]-Me[0][1]));isFinite(Te)?te.scale(Te*he):p.warn("Something went wrong during"+this.id+"fitbounds computations.")}else te.scale(N.scale*he);var Oe=this.midPt=[(ie[0][0]+ie[1][0])/2,(ie[0][1]+ie[1][1])/2];if(te.translate([me[0]+(Oe[0]-me[0]),me[1]+(Oe[1]-me[1])]).clipExtent(ie),B._isAlbersUsa){var Ne=te([ce.lon,ce.lat]),Ee=te.translate();te.translate([Ee[0]-(Ne[0]-Ee[0]),Ee[1]-(Ne[1]-Ee[1])])}},S.updateBaseLayers=function(y,z){var I=this,B=I.topojson,k=I.layers,O=I.basePaths;function N(ae){return ae==="lonaxis"||ae==="lataxis"}function _(ae){return!!d.lineLayers[ae]}function U(ae){return!!d.fillLayers[ae]}var Y=this.hasChoropleth?d.layersForChoropleth:d.layers,J=Y.filter(function(ae){return _(ae)||U(ae)?z["show"+ae]:N(ae)?z[ae].showgrid:!0}),te=I.framework.selectAll(".layer").data(J,String);te.exit().each(function(ae){delete k[ae],delete O[ae],m.select(this).remove()}),te.enter().append("g").attr("class",function(ae){return"layer "+ae}).each(function(ae){var ce=k[ae]=m.select(this);ae==="bg"?I.bgRect=ce.append("rect").style("pointer-events","all"):N(ae)?O[ae]=ce.append("path").style("fill","none"):ae==="backplot"?ce.append("g").classed("choroplethlayer",!0):ae==="frontplot"?ce.append("g").classed("scatterlayer",!0):_(ae)?O[ae]=ce.append("path").style("fill","none").style("stroke-miterlimit",2):U(ae)&&(O[ae]=ce.append("path").style("stroke","none"))}),te.order(),te.each(function(ae){var ce=O[ae],Q=d.layerNameToAdjective[ae];ae==="frame"?ce.datum(d.sphereSVG):_(ae)||U(ae)?ce.datum(C(B,B.objects[ae])):N(ae)&&ce.datum(a(ae,z,y)).call(r.stroke,z[ae].gridcolor).call(s.dashLine,z[ae].griddash,z[ae].gridwidth),_(ae)?ce.call(r.stroke,z[Q+"color"]).call(s.dashLine,"",z[Q+"width"]):U(ae)&&ce.call(r.fill,z[Q+"color"])})},S.updateDims=function(y,z){var I=this.bounds,B=(z.framewidth||0)/2,k=I[0][0]-B,O=I[0][1]-B,N=I[1][0]-k+B,_=I[1][1]-O+B;s.setRect(this.clipRect,k,O,N,_),this.bgRect.call(s.setRect,k,O,N,_).call(r.fill,z.bgcolor),this.xaxis._offset=k,this.xaxis._length=N,this.yaxis._offset=O,this.yaxis._length=_},S.updateFx=function(y,z){var I=this,B=I.graphDiv,k=I.bgRect,O=y.dragmode,N=y.clickmode;if(I.isStatic)return;function _(){var te=I.viewInitial,ae={};for(var ce in te)ae[I.id+"."+ce]=te[ce];v.call("_guiRelayout",B,ae),B.emit("plotly_doubleclick",null)}function U(te){return I.projection.invert([te[0]+I.xaxis._offset,te[1]+I.yaxis._offset])}var Y=function(te,ae){if(ae.isRect){var ce=te.range={};ce[I.id]=[U([ae.xmin,ae.ymin]),U([ae.xmax,ae.ymax])]}else{var Q=te.lassoPoints={};Q[I.id]=ae.map(U)}},J={element:I.bgRect.node(),gd:B,plotinfo:{id:I.id,xaxis:I.xaxis,yaxis:I.yaxis,fillRangeItems:Y},xaxes:[I.xaxis],yaxes:[I.yaxis],subplot:I.id,clickFn:function(te){te===2&&w(B)}};O==="pan"?(k.node().onmousedown=null,k.call(o(I,z)),k.on("dblclick.zoom",_),B._context._scrollZoom.geo||k.on("wheel.zoom",null)):(O==="select"||O==="lasso")&&(k.on(".zoom",null),J.prepFn=function(te,ae,ce){f(te,ae,ce,J,O)},g.init(J)),k.on("mousemove",function(){var te=I.projection.invert(p.getPositionFromD3Event());if(!te)return g.unhover(B,m.event);I.xaxis.p2c=function(){return te[0]},I.yaxis.p2c=function(){return te[1]},n.hover(B,m.event,I.id)}),k.on("mouseout",function(){B._dragging||g.unhover(B,m.event)}),k.on("click",function(){O!=="select"&&O!=="lasso"&&(N.indexOf("select")>-1&&h(m.event,B,[I.xaxis],[I.yaxis],I.id,J),N.indexOf("event")>-1&&n.click(B,m.event))})},S.makeFramework=function(){var y=this,z=y.graphDiv,I=z._fullLayout,B="clip"+I._uid+y.id;y.clipDef=I._clips.append("clipPath").attr("id",B),y.clipRect=y.clipDef.append("rect"),y.framework=m.select(y.container).append("g").attr("class","geo "+y.id).call(s.setClipUrl,B,z),y.project=function(k){var O=y.projection(k);return O?[O[0]-y.xaxis._offset,O[1]-y.yaxis._offset]:[null,null]},y.xaxis={_id:"x",c2p:function(k){return y.project(k)[0]}},y.yaxis={_id:"y",c2p:function(k){return y.project(k)[1]}},y.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},c.setConvert(y.mockAxis,I)},S.saveViewInitial=function(y){var z=y.center||{},I=y.projection,B=I.rotation||{};this.viewInitial={fitbounds:y.fitbounds,"projection.scale":I.scale};var k;y._isScoped?k={"center.lon":z.lon,"center.lat":z.lat}:y._isClipped?k={"projection.rotation.lon":B.lon,"projection.rotation.lat":B.lat}:k={"center.lon":z.lon,"center.lat":z.lat,"projection.rotation.lon":B.lon},p.extendFlat(this.viewInitial,k)},S.render=function(y){this._hasMarkerAngles&&y?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},S._render=function(){var y=this.projection,z=y.getPath(),I;function B(O){var N=y(O.lonlat);return N?t(N[0],N[1]):null}function k(O){return y.isLonLatOverEdges(O.lonlat)?"none":null}for(I in this.basePaths)this.basePaths[I].attr("d",z);for(I in this.dataPaths)this.dataPaths[I].attr("d",function(O){return z(O.geojson)});for(I in this.dataPoints)this.dataPoints[I].attr("display",k).attr("transform",B)};function b(y){var z=y.projection,I=z.type,B=d.projNames[I];B="geo"+p.titleCase(B);for(var k=P[B]||A[B],O=k(),N=y._isSatellite?Math.acos(1/z.distance)*180/Math.PI:y._isClipped?d.lonaxisSpan[I]/2:null,_=["center","rotate","parallels","clipExtent"],U=function(te){return te?O:[]},Y=0;Y<_.length;Y++){var J=_[Y];typeof O[J]!="function"&&(O[J]=U)}return O.isLonLatOverEdges=function(te){if(O(te)===null)return!0;if(N){var ae=O.rotate(),ce=L(te,[-ae[0],-ae[1]]),Q=N*Math.PI/180;return ce>Q}else return!1},O.getPath=function(){return i().projection(O)},O.getBounds=function(te){return O.getPath().bounds(te)},O.precision(d.precision),y._isSatellite&&O.tilt(z.tilt).distance(z.distance),N&&O.clipAngle(N-d.clipPad),O}function a(y,z,I){var B=1e-6,k=2.5,O=z[y],N=d.scopeDefaults[z.scope],_,U,Y;y==="lonaxis"?(_=N.lonaxisRange,U=N.lataxisRange,Y=function(ee,oe){return[ee,oe]}):y==="lataxis"&&(_=N.lataxisRange,U=N.lonaxisRange,Y=function(ee,oe){return[oe,ee]});var J={type:"linear",range:[_[0],_[1]-B],tick0:O.tick0,dtick:O.dtick};c.setConvert(J,I);var te=c.calcTicks(J);!z.isScoped&&y==="lonaxis"&&te.pop();for(var ae=te.length,ce=new Array(ae),Q=0;Q0&&k<0&&(k+=360);var _=(k-B)/4;return{type:"Polygon",coordinates:[[[B,O],[B,N],[B+_,N],[B+2*_,N],[B+3*_,N],[k,N],[k,O],[k-_,O],[k-2*_,O],[k-3*_,O],[B,O]]]}}},44622:function(G,V,e){var m=e(27659).AU,P=e(71828).counterRegex,i=e(69082),L="geo",A=P(L),v={};v[L]={valType:"subplotid",dflt:L,editType:"calc"};function p(s){for(var n=s._fullLayout,l=s.calcdata,c=n._subplots[L],u=0;u0&&U<0&&(U+=360);var Y=(_+U)/2,J;if(!h){var te=o?f.projRotate:[Y,0,0];J=s("projection.rotation.lon",te[0]),s("projection.rotation.lat",te[1]),s("projection.rotation.roll",te[2]),S=s("showcoastlines",!o&&x),S&&(s("coastlinecolor"),s("coastlinewidth")),S=s("showocean",x?void 0:!1),S&&s("oceancolor")}var ae,ce;if(h?(ae=-96.6,ce=38.7):(ae=o?Y:J,ce=(N[0]+N[1])/2),s("center.lon",ae),s("center.lat",ce),d&&(s("projection.tilt"),s("projection.distance")),M){var Q=f.projParallels||[0,60];s("projection.parallels",Q)}s("projection.scale"),S=s("showland",x?void 0:!1),S&&s("landcolor"),S=s("showlakes",x?void 0:!1),S&&s("lakecolor"),S=s("showrivers",x?void 0:!1),S&&(s("rivercolor"),s("riverwidth")),S=s("showcountries",o&&g!=="usa"&&x),S&&(s("countrycolor"),s("countrywidth")),(g==="usa"||g==="north america"&&u===50)&&(s("showsubunits",x),s("subunitcolor"),s("subunitwidth")),o||(S=s("showframe",x),S&&(s("framecolor"),s("framewidth"))),s("bgcolor");var Z=s("fitbounds");Z&&(delete r.projection.scale,o?(delete r.center.lon,delete r.center.lat):T?(delete r.center.lon,delete r.center.lat,delete r.projection.rotation.lon,delete r.projection.rotation.lat,delete r.lonaxis.range,delete r.lataxis.range):(delete r.center.lon,delete r.center.lat,delete r.projection.rotation.lon))}},74455:function(G,V,e){var m=e(39898),P=e(71828),i=e(73972),L=Math.PI/180,A=180/Math.PI,v={cursor:"pointer"},p={cursor:"auto"};function t(a,E){var y=a.projection,z;return E._isScoped?z=n:E._isClipped?z=c:z=l,z(a,y)}G.exports=t;function r(a,E){return m.behavior.zoom().translate(E.translate()).scale(E.scale())}function s(a,E,y){var z=a.id,I=a.graphDiv,B=I.layout,k=B[z],O=I._fullLayout,N=O[z],_={},U={};function Y(J,te){_[z+"."+J]=P.nestedProperty(k,J).get(),i.call("_storeDirectGUIEdit",B,O._preGUI,_);var ae=P.nestedProperty(N,J);ae.get()!==te&&(ae.set(te),P.nestedProperty(k,J).set(te),U[z+"."+J]=te)}y(Y),Y("projection.scale",E.scale()/a.fitScale),Y("fitbounds",!1),I.emit("plotly_relayout",U)}function n(a,E){var y=r(a,E);function z(){m.select(this).style(v)}function I(){E.scale(m.event.scale).translate(m.event.translate),a.render(!0);var O=E.invert(a.midPt);a.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":E.scale()/a.fitScale,"geo.center.lon":O[0],"geo.center.lat":O[1]})}function B(O){var N=E.invert(a.midPt);O("center.lon",N[0]),O("center.lat",N[1])}function k(){m.select(this).style(p),s(a,E,B)}return y.on("zoomstart",z).on("zoom",I).on("zoomend",k),y}function l(a,E){var y=r(a,E),z=2,I,B,k,O,N,_,U,Y,J;function te(K){return E.invert(K)}function ae(K){var ee=te(K);if(!ee)return!0;var oe=E(ee);return Math.abs(oe[0]-K[0])>z||Math.abs(oe[1]-K[1])>z}function ce(){m.select(this).style(v),I=m.mouse(this),B=E.rotate(),k=E.translate(),O=B,N=te(I)}function Q(){if(_=m.mouse(this),ae(I)){y.scale(E.scale()),y.translate(E.translate());return}E.scale(m.event.scale),E.translate([k[0],m.event.translate[1]]),N?te(_)&&(Y=te(_),U=[O[0]+(Y[0]-N[0]),B[1],B[2]],E.rotate(U),O=U):(I=_,N=te(I)),J=!0,a.render(!0);var K=E.rotate(),ee=E.invert(a.midPt);a.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":E.scale()/a.fitScale,"geo.center.lon":ee[0],"geo.center.lat":ee[1],"geo.projection.rotation.lon":-K[0]})}function Z(){m.select(this).style(p),J&&s(a,E,j)}function j(K){var ee=E.rotate(),oe=E.invert(a.midPt);K("projection.rotation.lon",-ee[0]),K("center.lon",oe[0]),K("center.lat",oe[1])}return y.on("zoomstart",ce).on("zoom",Q).on("zoomend",Z),y}function c(a,E){E.rotate(),E.scale();var y=r(a,E),z=b(y,"zoomstart","zoom","zoomend"),I=0,B=y.on,k;y.on("zoomstart",function(){m.select(this).style(v);var Y=m.mouse(this),J=E.rotate(),te=J,ae=E.translate(),ce=g(J);k=u(E,Y),B.call(y,"zoom",function(){var Q=m.mouse(this);if(E.scale(m.event.scale),!k)Y=Q,k=u(E,Y);else if(u(E,Q)){E.rotate(J).translate(ae);var Z=u(E,Q),j=w(k,Z),K=T(f(ce,j)),ee=h(K,k,te);(!isFinite(ee[0])||!isFinite(ee[1])||!isFinite(ee[2]))&&(ee=te),E.rotate(ee),te=ee}N(z.of(this,arguments))}),O(z.of(this,arguments))}).on("zoomend",function(){m.select(this).style(p),B.call(y,"zoom",null),_(z.of(this,arguments)),s(a,E,U)}).on("zoom.redraw",function(){a.render(!0);var Y=E.rotate();a.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":E.scale()/a.fitScale,"geo.projection.rotation.lon":-Y[0],"geo.projection.rotation.lat":-Y[1]})});function O(Y){I++||Y({type:"zoomstart"})}function N(Y){Y({type:"zoom"})}function _(Y){--I||Y({type:"zoomend"})}function U(Y){var J=E.rotate();Y("projection.rotation.lon",-J[0]),Y("projection.rotation.lat",-J[1])}return m.rebind(y,z,"on")}function u(a,E){var y=a.invert(E);return y&&isFinite(y[0])&&isFinite(y[1])&&C(y)}function g(a){var E=.5*a[0]*L,y=.5*a[1]*L,z=.5*a[2]*L,I=Math.sin(E),B=Math.cos(E),k=Math.sin(y),O=Math.cos(y),N=Math.sin(z),_=Math.cos(z);return[B*O*_+I*k*N,I*O*_-B*k*N,B*k*_+I*O*N,B*O*N-I*k*_]}function f(a,E){var y=a[0],z=a[1],I=a[2],B=a[3],k=E[0],O=E[1],N=E[2],_=E[3];return[y*k-z*O-I*N-B*_,y*O+z*k+I*_-B*N,y*N-z*_+I*k+B*O,y*_+z*N-I*O+B*k]}function w(a,E){if(!(!a||!E)){var y=S(a,E),z=Math.sqrt(x(y,y)),I=.5*Math.acos(Math.max(-1,Math.min(1,x(a,E)))),B=Math.sin(I)/z;return z&&[Math.cos(I),y[2]*B,-y[1]*B,y[0]*B]}}function h(a,E,y){var z=M(E,2,a[0]);z=M(z,1,a[1]),z=M(z,0,a[2]-y[2]);var I=E[0],B=E[1],k=E[2],O=z[0],N=z[1],_=z[2],U=Math.atan2(B,I)*A,Y=Math.sqrt(I*I+B*B),J,te;Math.abs(N)>Y?(te=(N>0?90:-90)-U,J=0):(te=Math.asin(N/Y)*A-U,J=Math.sqrt(Y*Y-N*N));var ae=180-te-2*U,ce=(Math.atan2(_,O)-Math.atan2(k,J))*A,Q=(Math.atan2(_,O)-Math.atan2(k,-J))*A,Z=o(y[0],y[1],te,ce),j=o(y[0],y[1],ae,Q);return Z<=j?[te,ce,y[2]]:[ae,Q,y[2]]}function o(a,E,y,z){var I=d(y-a),B=d(z-E);return Math.sqrt(I*I+B*B)}function d(a){return(a%360+540)%360-180}function M(a,E,y){var z=y*L,I=a.slice(),B=E===0?1:0,k=E===2?1:2,O=Math.cos(z),N=Math.sin(z);return I[B]=a[B]*O-a[k]*N,I[k]=a[k]*O+a[B]*N,I}function T(a){return[Math.atan2(2*(a[0]*a[1]+a[2]*a[3]),1-2*(a[1]*a[1]+a[2]*a[2]))*A,Math.asin(Math.max(-1,Math.min(1,2*(a[0]*a[2]-a[3]*a[1]))))*A,Math.atan2(2*(a[0]*a[3]+a[1]*a[2]),1-2*(a[2]*a[2]+a[3]*a[3]))*A]}function C(a){var E=a[0]*L,y=a[1]*L,z=Math.cos(y);return[z*Math.cos(E),z*Math.sin(E),Math.sin(y)]}function x(a,E){for(var y=0,z=0,I=a.length;zMath.abs(S)?(n.boxEnd[1]=n.boxStart[1]+Math.abs(x)*I*(S>=0?1:-1),n.boxEnd[1]h[3]&&(n.boxEnd[1]=h[3],n.boxEnd[0]=n.boxStart[0]+(h[3]-n.boxStart[1])/Math.abs(I))):(n.boxEnd[0]=n.boxStart[0]+Math.abs(S)/I*(x>=0?1:-1),n.boxEnd[0]h[2]&&(n.boxEnd[0]=h[2],n.boxEnd[1]=n.boxStart[1]+(h[2]-n.boxStart[0])*Math.abs(I)))}else y&&(n.boxEnd[0]=n.boxStart[0]),z&&(n.boxEnd[1]=n.boxStart[1])}else n.boxEnabled?(x=n.boxStart[0]!==n.boxEnd[0],S=n.boxStart[1]!==n.boxEnd[1],x||S?(x&&(b(0,n.boxStart[0],n.boxEnd[0]),t.xaxis.autorange=!1),S&&(b(1,n.boxStart[1],n.boxEnd[1]),t.yaxis.autorange=!1),t.relayoutCallback()):t.glplot.setDirty(),n.boxEnabled=!1,n.boxInited=!1):n.boxInited&&(n.boxInited=!1);break;case"pan":n.boxEnabled=!1,n.boxInited=!1,g?(n.panning||(n.dragStart[0]=f,n.dragStart[1]=w),Math.abs(n.dragStart[0]-f)1;function g(f){if(!u){var w=m.validate(n[f],v[f]);if(w)return n[f]}}L(n,l,c,{type:t,attributes:v,handleDefaults:r,fullLayout:l,font:l.font,fullData:c,getDfltFromLayout:g,autotypenumbersDflt:l.autotypenumbers,paper_bgcolor:l.paper_bgcolor,calendar:l.calendar})};function r(s,n,l,c){for(var u=l("bgcolor"),g=P.combine(u,c.paper_bgcolor),f=["up","center","eye"],w=0;w.999)&&(T="turntable")}else T="turntable";l("dragmode",T),l("hovermode",c.getDfltFromLayout("hovermode"))}},65500:function(G,V,e){var m=e(77894),P=e(27670).Y,i=e(1426).extendFlat,L=e(71828).counterRegex;function A(v,p,t){return{x:{valType:"number",dflt:v,editType:"camera"},y:{valType:"number",dflt:p,editType:"camera"},z:{valType:"number",dflt:t,editType:"camera"},editType:"camera"}}G.exports={_arrayAttrRegexps:[L("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:i(A(0,0,1),{}),center:i(A(0,0,0),{}),eye:i(A(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:P({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:m,yaxis:m,zaxis:m,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(G,V,e){var m=e(78614),P=["xaxis","yaxis","zaxis"];function i(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}var L=i.prototype;L.merge=function(v){for(var p=0;p<3;++p){var t=v[P[p]];if(!t.visible){this.enabled[p]=!1,this.drawSides[p]=!1;continue}this.enabled[p]=t.showspikes,this.colors[p]=m(t.spikecolor),this.drawSides[p]=t.spikesides,this.lineWidth[p]=t.spikethickness}};function A(v){var p=new i;return p.merge(v),p}G.exports=A},96085:function(G,V,e){G.exports=A;var m=e(89298),P=e(71828),i=["xaxis","yaxis","zaxis"];function L(v){for(var p=new Array(3),t=0;t<3;++t){for(var r=v[t],s=new Array(r.length),n=0;n/g," "));s[n]=g,l.tickmode=c}}p.ticks=s;for(var n=0;n<3;++n){.5*(v.glplot.bounds[0][n]+v.glplot.bounds[1][n]);for(var f=0;f<2;++f)p.bounds[f][n]=v.glplot.bounds[f][n]}v.contourLevels=L(s)}},63538:function(G){function V(m,P){var i=[0,0,0,0],L,A;for(L=0;L<4;++L)for(A=0;A<4;++A)i[A]+=m[4*L+A]*P[L];return i}function e(m,P){var i=V(m.projection,V(m.view,V(m.model,[P[0],P[1],P[2],1])));return i}G.exports=e},33539:function(G,V,e){var m=e(9330).gl_plot3d,P=m.createCamera,i=m.createScene,L=e(40372),A=e(38520),v=e(73972),p=e(71828),t=p.preserveDrawingBuffer(),r=e(89298),s=e(30211),n=e(78614),l=e(58617),c=e(63538),u=e(30422),g=e(13133),f=e(96085),w=e(71739).applyAutorangeOptions,h,o,d=!1;function M(I,B){var k=document.createElement("div"),O=I.container;this.graphDiv=I.graphDiv;var N=document.createElementNS("http://www.w3.org/2000/svg","svg");N.style.position="absolute",N.style.top=N.style.left="0px",N.style.width=N.style.height="100%",N.style["z-index"]=20,N.style["pointer-events"]="none",k.appendChild(N),this.svgContainer=N,k.id=I.id,k.style.position="absolute",k.style.top=k.style.left="0px",k.style.width=k.style.height="100%",O.appendChild(k),this.fullLayout=B,this.id=I.id||"scene",this.fullSceneLayout=B[this.id],this.plotArgs=[[],{},{}],this.axesOptions=u(B,B[this.id]),this.spikeOptions=g(B[this.id]),this.container=k,this.staticMode=!!I.staticPlot,this.pixelRatio=this.pixelRatio||I.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=v.getComponentMethod("annotations3d","convert"),this.drawAnnotations=v.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var T=M.prototype;T.prepareOptions=function(){var I=this,B={canvas:I.canvas,gl:I.gl,glOptions:{preserveDrawingBuffer:t,premultipliedAlpha:!0,antialias:!0},container:I.container,axes:I.axesOptions,spikes:I.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:I.camera,pixelRatio:I.pixelRatio};if(I.staticMode){if(!o&&(h=document.createElement("canvas"),o=L({canvas:h,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!o))throw new Error("error creating static canvas/context for image server");B.gl=o,B.canvas=h}return B};var C=!0;T.tryCreatePlot=function(){var I=this,B=I.prepareOptions(),k=!0;try{I.glplot=i(B)}catch{if(I.staticMode||!C||t)k=!1;else{p.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{t=B.glOptions.preserveDrawingBuffer=!0,I.glplot=i(B)}catch{t=B.glOptions.preserveDrawingBuffer=!1,k=!1}}}return C=!1,k},T.initializeGLCamera=function(){var I=this,B=I.fullSceneLayout.camera,k=B.projection.type==="orthographic";I.camera=P(I.container,{center:[B.center.x,B.center.y,B.center.z],eye:[B.eye.x,B.eye.y,B.eye.z],up:[B.up.x,B.up.y,B.up.z],_ortho:k,zoomMin:.01,zoomMax:100,mode:"orbit"})},T.initializeGLPlot=function(){var I=this;I.initializeGLCamera();var B=I.tryCreatePlot();if(!B)return l(I);I.traces={},I.make4thDimension();var k=I.graphDiv,O=k.layout,N=function(){var U={};return I.isCameraChanged(O)&&(U[I.id+".camera"]=I.getCamera()),I.isAspectChanged(O)&&(U[I.id+".aspectratio"]=I.glplot.getAspectratio(),O[I.id].aspectmode!=="manual"&&(I.fullSceneLayout.aspectmode=O[I.id].aspectmode=U[I.id+".aspectmode"]="manual")),U},_=function(U){if(U.fullSceneLayout.dragmode!==!1){var Y=N();U.saveLayout(O),U.graphDiv.emit("plotly_relayout",Y)}};return I.glplot.canvas&&(I.glplot.canvas.addEventListener("mouseup",function(){_(I)}),I.glplot.canvas.addEventListener("touchstart",function(){d=!0}),I.glplot.canvas.addEventListener("wheel",function(U){if(k._context._scrollZoom.gl3d){if(I.camera._ortho){var Y=U.deltaX>U.deltaY?1.1:.9090909090909091,J=I.glplot.getAspectratio();I.glplot.setAspectratio({x:Y*J.x,y:Y*J.y,z:Y*J.z})}_(I)}},A?{passive:!1}:!1),I.glplot.canvas.addEventListener("mousemove",function(){if(I.fullSceneLayout.dragmode!==!1&&I.camera.mouseListener.buttons!==0){var U=N();I.graphDiv.emit("plotly_relayouting",U)}}),I.staticMode||I.glplot.canvas.addEventListener("webglcontextlost",function(U){k&&k.emit&&k.emit("plotly_webglcontextlost",{event:U,layer:I.id})},!1)),I.glplot.oncontextloss=function(){I.recoverContext()},I.glplot.onrender=function(){I.render()},!0},T.render=function(){var I=this,B=I.graphDiv,k,O=I.svgContainer,N=I.container.getBoundingClientRect();B._fullLayout._calcInverseTransform(B);var _=B._fullLayout._invScaleX,U=B._fullLayout._invScaleY,Y=N.width*_,J=N.height*U;O.setAttributeNS(null,"viewBox","0 0 "+Y+" "+J),O.setAttributeNS(null,"width",Y),O.setAttributeNS(null,"height",J),f(I),I.glplot.axes.update(I.axesOptions);for(var te=Object.keys(I.traces),ae=null,ce=I.glplot.selection,Q=0;Q")):k.type==="isosurface"||k.type==="volume"?(oe.valueLabel=r.hoverLabelText(I._mockAxis,I._mockAxis.d2l(ce.traceCoordinate[3]),k.valuehoverformat),he.push("value: "+oe.valueLabel),ce.textLabel&&he.push(ce.textLabel),ie=he.join("
")):ie=ce.textLabel;var me={x:ce.traceCoordinate[0],y:ce.traceCoordinate[1],z:ce.traceCoordinate[2],data:K._input,fullData:K,curveNumber:K.index,pointNumber:ee};s.appendArrayPointValue(me,K,ee),k._module.eventData&&(me=K._module.eventData(me,ce,K,{},ee));var Me={points:[me]};if(I.fullSceneLayout.hovermode){var Te=[];s.loneHover({trace:K,x:(.5+.5*j[0]/j[3])*Y,y:(.5-.5*j[1]/j[3])*J,xLabel:oe.xLabel,yLabel:oe.yLabel,zLabel:oe.zLabel,text:ie,name:ae.name,color:s.castHoverOption(K,ee,"bgcolor")||ae.color,borderColor:s.castHoverOption(K,ee,"bordercolor"),fontFamily:s.castHoverOption(K,ee,"font.family"),fontSize:s.castHoverOption(K,ee,"font.size"),fontColor:s.castHoverOption(K,ee,"font.color"),nameLength:s.castHoverOption(K,ee,"namelength"),textAlign:s.castHoverOption(K,ee,"align"),hovertemplate:p.castOption(K,ee,"hovertemplate"),hovertemplateLabels:p.extendFlat({},me,oe),eventData:[me]},{container:O,gd:B,inOut_bbox:Te}),me.bbox=Te[0]}ce.distance<5&&(ce.buttons||d)?B.emit("plotly_click",Me):B.emit("plotly_hover",Me),this.oldEventData=Me}else s.loneUnhover(O),this.oldEventData&&B.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;I.drawAnnotations(I)},T.recoverContext=function(){var I=this;I.glplot.dispose();var B=function(){if(I.glplot.gl.isContextLost()){requestAnimationFrame(B);return}if(!I.initializeGLPlot()){p.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}I.plot.apply(I,I.plotArgs)};requestAnimationFrame(B)};var x=["xaxis","yaxis","zaxis"];function S(I,B,k){for(var O=I.fullSceneLayout,N=0;N<3;N++){var _=x[N],U=_.charAt(0),Y=O[_],J=B[U],te=B[U+"calendar"],ae=B["_"+U+"length"];if(!p.isArrayOrTypedArray(J))k[0][N]=Math.min(k[0][N],0),k[1][N]=Math.max(k[1][N],ae-1);else for(var ce,Q=0;Q<(ae||J.length);Q++)if(p.isArrayOrTypedArray(J[Q]))for(var Z=0;ZK[1][U])K[0][U]=-1,K[1][U]=1;else{var Oe=K[1][U]-K[0][U];K[0][U]-=Oe/32,K[1][U]+=Oe/32}if(oe=[K[0][U],K[1][U]],oe=w(oe,J),K[0][U]=oe[0],K[1][U]=oe[1],J.isReversed()){var Ne=K[0][U];K[0][U]=K[1][U],K[1][U]=Ne}}else oe=J.range,K[0][U]=J.r2l(oe[0]),K[1][U]=J.r2l(oe[1]);K[0][U]===K[1][U]&&(K[0][U]-=1,K[1][U]+=1),J.range=[K[0][U],K[1][U]],J.limitRange(),O.glplot.setBounds(U,{min:J.range[0]*Z[U],max:J.range[1]*Z[U]})}var Ee,xe=ae.aspectmode;if(xe==="cube")Ee=[1,1,1];else if(xe==="manual"){var Se=ae.aspectratio;Ee=[Se.x,Se.y,Se.z]}else if(xe==="auto"||xe==="data"){var Ue=[1,1,1];for(U=0;U<3;++U){J=ae[x[U]],te=J.type;var He=ee[te];Ue[U]=Math.pow(He.acc,1/He.count)/Z[U]}xe==="data"||Math.max.apply(null,Ue)/Math.min.apply(null,Ue)<=4?Ee=Ue:Ee=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");ae.aspectratio.x=ce.aspectratio.x=Ee[0],ae.aspectratio.y=ce.aspectratio.y=Ee[1],ae.aspectratio.z=ce.aspectratio.z=Ee[2],O.glplot.setAspectratio(ae.aspectratio),O.viewInitial.aspectratio||(O.viewInitial.aspectratio={x:ae.aspectratio.x,y:ae.aspectratio.y,z:ae.aspectratio.z}),O.viewInitial.aspectmode||(O.viewInitial.aspectmode=ae.aspectmode);var Fe=ae.domain||null,Ge=B._size||null;if(Fe&&Ge){var nt=O.container.style;nt.position="absolute",nt.left=Ge.l+Fe.x[0]*Ge.w+"px",nt.top=Ge.t+(1-Fe.y[1])*Ge.h+"px",nt.width=Ge.w*(Fe.x[1]-Fe.x[0])+"px",nt.height=Ge.h*(Fe.y[1]-Fe.y[0])+"px"}O.glplot.redraw()}},T.destroy=function(){var I=this;I.glplot&&(I.camera.mouseListener.enabled=!1,I.container.removeEventListener("wheel",I.camera.wheelListener),I.camera=null,I.glplot.dispose(),I.container.parentNode.removeChild(I.container),I.glplot=null)};function a(I){return[[I.eye.x,I.eye.y,I.eye.z],[I.center.x,I.center.y,I.center.z],[I.up.x,I.up.y,I.up.z]]}function E(I){return{up:{x:I.up[0],y:I.up[1],z:I.up[2]},center:{x:I.center[0],y:I.center[1],z:I.center[2]},eye:{x:I.eye[0],y:I.eye[1],z:I.eye[2]},projection:{type:I._ortho===!0?"orthographic":"perspective"}}}T.getCamera=function(){var I=this;return I.camera.view.recalcMatrix(I.camera.view.lastT()),E(I.camera)},T.setViewport=function(I){var B=this,k=I.camera;B.camera.lookAt.apply(this,a(k)),B.glplot.setAspectratio(I.aspectratio);var O=k.projection.type==="orthographic",N=B.camera._ortho;O!==N&&(B.glplot.redraw(),B.glplot.clearRGBA(),B.glplot.dispose(),B.initializeGLPlot())},T.isCameraChanged=function(I){var B=this,k=B.getCamera(),O=p.nestedProperty(I,B.id+".camera"),N=O.get();function _(te,ae,ce,Q){var Z=["up","center","eye"],j=["x","y","z"];return ae[Z[ce]]&&te[Z[ce]][j[Q]]===ae[Z[ce]][j[Q]]}var U=!1;if(N===void 0)U=!0;else{for(var Y=0;Y<3;Y++)for(var J=0;J<3;J++)if(!_(k,N,Y,J)){U=!0;break}(!N.projection||k.projection&&k.projection.type!==N.projection.type)&&(U=!0)}return U},T.isAspectChanged=function(I){var B=this,k=B.glplot.getAspectratio(),O=p.nestedProperty(I,B.id+".aspectratio"),N=O.get();return N===void 0||N.x!==k.x||N.y!==k.y||N.z!==k.z},T.saveLayout=function(I){var B=this,k=B.fullLayout,O,N,_,U,Y,J,te=B.isCameraChanged(I),ae=B.isAspectChanged(I),ce=te||ae;if(ce){var Q={};if(te&&(O=B.getCamera(),N=p.nestedProperty(I,B.id+".camera"),_=N.get(),Q[B.id+".camera"]=_),ae&&(U=B.glplot.getAspectratio(),Y=p.nestedProperty(I,B.id+".aspectratio"),J=Y.get(),Q[B.id+".aspectratio"]=J),v.call("_storeDirectGUIEdit",I,k._preGUI,Q),te){N.set(O);var Z=p.nestedProperty(k,B.id+".camera");Z.set(O)}if(ae){Y.set(U);var j=p.nestedProperty(k,B.id+".aspectratio");j.set(U),B.glplot.redraw()}}return ce},T.updateFx=function(I,B){var k=this,O=k.camera;if(O)if(I==="orbit")O.mode="orbit",O.keyBindingMode="rotate";else if(I==="turntable"){O.up=[0,0,1],O.mode="turntable",O.keyBindingMode="rotate";var N=k.graphDiv,_=N._fullLayout,U=k.fullSceneLayout.camera,Y=U.up.x,J=U.up.y,te=U.up.z;if(te/Math.sqrt(Y*Y+J*J+te*te)<.999){var ae=k.id+".camera.up",ce={x:0,y:0,z:1},Q={};Q[ae]=ce;var Z=N.layout;v.call("_storeDirectGUIEdit",Z,_._preGUI,Q),U.up=ce,p.nestedProperty(Z,ae).set(ce)}}else O.keyBindingMode=I;k.fullSceneLayout.hovermode=B};function y(I,B,k){for(var O=0,N=k-1;O0)for(var Y=255/U,J=0;J<3;++J)I[_+J]=Math.min(Y*I[_+J],255)}}T.toImage=function(I){var B=this;I||(I="png"),B.staticMode&&B.container.appendChild(h),B.glplot.redraw();var k=B.glplot.gl,O=k.drawingBufferWidth,N=k.drawingBufferHeight;k.bindFramebuffer(k.FRAMEBUFFER,null);var _=new Uint8Array(O*N*4);k.readPixels(0,0,O,N,k.RGBA,k.UNSIGNED_BYTE,_),y(_,O,N),z(_,O,N);var U=document.createElement("canvas");U.width=O,U.height=N;var Y=U.getContext("2d",{willReadFrequently:!0}),J=Y.createImageData(O,N);J.data.set(_),Y.putImageData(J,0,0);var te;switch(I){case"jpeg":te=U.toDataURL("image/jpeg");break;case"webp":te=U.toDataURL("image/webp");break;default:te=U.toDataURL("image/png")}return B.staticMode&&B.container.removeChild(h),te},T.setConvert=function(){for(var I=this,B=0;B<3;B++){var k=I.fullSceneLayout[x[B]];r.setConvert(k,I.fullLayout),k.setScale=p.noop}},T.make4thDimension=function(){var I=this,B=I.graphDiv,k=B._fullLayout;I._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},r.setConvert(I._mockAxis,k)},G.exports=M},90060:function(G){G.exports=function(e,m,P,i){i=i||e.length;for(var L=new Array(i),A=0;AOpenStreetMap contributors',L=['© Carto',i].join(" "),A=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),v=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),p={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:i,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:L,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:L,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:A,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}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:A,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}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:v,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}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"}},t=m(p);G.exports={requiredVersion:P,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:p,styleValuesNonMapbox:t,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@"+P+"."].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:",t.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(G,V,e){var m=e(71828);G.exports=function(i,L){var A=i.split(" "),v=A[0],p=A[1],t=m.isArrayOrTypedArray(L)?m.mean(L):L,r=.5+t/100,s=1.5+t/100,n=["",""],l=[0,0];switch(v){case"top":n[0]="top",l[1]=-s;break;case"bottom":n[0]="bottom",l[1]=s;break}switch(p){case"left":n[1]="right",l[0]=-r;break;case"right":n[1]="left",l[0]=r;break}var c;return n[0]&&n[1]?c=n.join("-"):n[0]?c=n[0]:n[1]?c=n[1]:c="center",{anchor:c,offset:l}}},50101:function(G,V,e){var m=e(44517),P=e(71828),i=P.strTranslate,L=P.strScale,A=e(27659).AU,v=e(77922),p=e(39898),t=e(91424),r=e(63893),s=e(10481),n="mapbox",l=V.constants=e(77734);V.name=n,V.attr="subplot",V.idRoot=n,V.idRegex=V.attrRegex=P.counterRegex(n),V.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},V.layoutAttributes=e(23585),V.supplyLayoutDefaults=e(77882),V.plot=function(f){var w=f._fullLayout,h=f.calcdata,o=w._subplots[n];if(m.version!==l.requiredVersion)throw new Error(l.wrongVersionErrorMsg);var d=c(f,o);m.accessToken=d;for(var M=0;MB/2){var k=E.split("|").join("
");z.text(k).attr("data-unformatted",k).call(r.convertToTspans,g),I=t.bBox(z.node())}z.attr("transform",i(-3,-I.height+8)),y.insert("rect",".static-attribution").attr({x:-I.width-6,y:-I.height-3,width:I.width+6,height:I.height+3,fill:"rgba(255, 255, 255, 0.75)"});var O=1;I.width+6>B&&(O=B/(I.width+6));var N=[h.l+h.w*M.x[1],h.t+h.h*(1-M.y[0])];y.attr("transform",i(N[0],N[1])+L(O))}};function c(g,f){var w=g._fullLayout,h=g._context;if(h.mapboxAccessToken==="")return"";for(var o=[],d=[],M=!1,T=!1,C=0;C1&&P.warn(l.multipleTokensErrorMsg),o[0]):(d.length&&P.log(["Listed mapbox access token(s)",d.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function u(g){return typeof g=="string"&&(l.styleValuesMapbox.indexOf(g)!==-1||g.indexOf("mapbox://")===0)}V.updateFx=function(g){for(var f=g._fullLayout,w=f._subplots[n],h=0;h0){for(var l=0;l0}function t(s){var n={},l={};switch(s.type){case"circle":m.extendFlat(l,{"circle-radius":s.circle.radius,"circle-color":s.color,"circle-opacity":s.opacity});break;case"line":m.extendFlat(l,{"line-width":s.line.width,"line-color":s.color,"line-opacity":s.opacity,"line-dasharray":s.line.dash});break;case"fill":m.extendFlat(l,{"fill-color":s.color,"fill-outline-color":s.fill.outlinecolor,"fill-opacity":s.opacity});break;case"symbol":var c=s.symbol,u=i(c.textposition,c.iconsize);m.extendFlat(n,{"icon-image":c.icon+"-15","icon-size":c.iconsize/10,"text-field":c.text,"text-size":c.textfont.size,"text-anchor":u.anchor,"text-offset":u.offset,"symbol-placement":c.placement}),m.extendFlat(l,{"icon-color":s.color,"text-color":c.textfont.color,"text-opacity":s.opacity});break;case"raster":m.extendFlat(l,{"raster-fade-duration":0,"raster-opacity":s.opacity});break}return{layout:n,paint:l}}function r(s){var n=s.sourcetype,l=s.source,c={type:n},u;return n==="geojson"?u="data":n==="vector"?u=typeof l=="string"?"url":"tiles":n==="raster"?(u="tiles",c.tileSize=256):n==="image"&&(u="url",c.coordinates=s.coordinates),c[u]=l,s.sourceattribution&&(c.attribution=P(s.sourceattribution)),c}G.exports=function(n,l,c){var u=new A(n,l);return u.update(c),u}},23585:function(G,V,e){var m=e(71828),P=e(7901).defaultLine,i=e(27670).Y,L=e(41940),A=e(82196).textposition,v=e(30962).overrideAll,p=e(44467).templatedArray,t=e(77734),r=L({});r.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var s=G.exports=v({_arrayAttrRegexps:[m.counterRegex("mapbox",".layers",!0)],domain:i({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:t.styleValuesMapbox.concat(t.styleValuesNonMapbox),dflt:t.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:p("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:P},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:P}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:r,textposition:m.extendFlat({},A,{arrayOk:!1})}})},"plot","from-root");s.uirevision={valType:"any",editType:"none"}},77882:function(G,V,e){var m=e(71828),P=e(49119),i=e(85501),L=e(23585);G.exports=function(t,r,s){P(t,r,s,{type:"mapbox",attributes:L,handleDefaults:A,partition:"y",accessToken:r._mapboxAccessToken})};function A(p,t,r,s){r("accesstoken",s.accessToken),r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch");var n=r("bounds.west"),l=r("bounds.east"),c=r("bounds.south"),u=r("bounds.north");(n===void 0||l===void 0||c===void 0||u===void 0)&&delete t.bounds,i(p,t,{name:"layers",handleItemDefaults:v}),t._input=p}function v(p,t){function r(g,f){return m.coerce(p,t,L.layers,g,f)}var s=r("visible");if(s){var n=r("sourcetype"),l=n==="raster"||n==="image";r("source"),r("sourceattribution"),n==="vector"&&r("sourcelayer"),n==="image"&&r("coordinates");var c;l&&(c="raster");var u=r("type",c);l&&u!=="raster"&&(u=t.type="raster",m.log("Source types *raster* and *image* must drawn *raster* layer type.")),r("below"),r("color"),r("opacity"),r("minzoom"),r("maxzoom"),u==="circle"&&r("circle.radius"),u==="line"&&(r("line.width"),r("line.dash")),u==="fill"&&r("fill.outlinecolor"),u==="symbol"&&(r("symbol.icon"),r("symbol.iconsize"),r("symbol.text"),m.coerceFont(r,"symbol.textfont"),r("symbol.textposition"),r("symbol.placement"))}}},10481:function(G,V,e){var m=e(44517),P=e(71828),i=e(41327),L=e(73972),A=e(89298),v=e(28569),p=e(30211),t=e(64505),r=t.drawMode,s=t.selectMode,n=e(47322).prepSelect,l=e(47322).clearOutline,c=e(47322).clearSelectionsCache,u=e(47322).selectOnClick,g=e(77734),f=e(67911);function w(C,x){this.id=x,this.gd=C;var S=C._fullLayout,b=C._context;this.container=S._glcontainer.node(),this.isStatic=b.staticPlot,this.uid=S._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(S),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var h=w.prototype;h.plot=function(C,x,S){var b=this,a=x[b.id];b.map&&a.accesstoken!==b.accessToken&&(b.map.remove(),b.map=null,b.styleObj=null,b.traceHash={},b.layerList=[]);var E;b.map?E=new Promise(function(y,z){b.updateMap(C,x,y,z)}):E=new Promise(function(y,z){b.createMap(C,x,y,z)}),S.push(E)},h.createMap=function(C,x,S,b){var a=this,E=x[a.id],y=a.styleObj=d(E.style);a.accessToken=E.accesstoken;var z=E.bounds,I=z?[[z.west,z.south],[z.east,z.north]]:null,B=a.map=new m.Map({container:a.div,style:y.style,center:T(E.center),zoom:E.zoom,bearing:E.bearing,pitch:E.pitch,maxBounds:I,interactive:!a.isStatic,preserveDrawingBuffer:a.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new m.AttributionControl({compact:!0}));B._canvas.style.left="0px",B._canvas.style.top="0px",a.rejectOnError(b),a.isStatic||a.initFx(C,x);var k=[];k.push(new Promise(function(O){B.once("load",O)})),k=k.concat(i.fetchTraceGeoData(C)),Promise.all(k).then(function(){a.fillBelowLookup(C,x),a.updateData(C),a.updateLayout(x),a.resolveOnRender(S)}).catch(b)},h.updateMap=function(C,x,S,b){var a=this,E=a.map,y=x[this.id];a.rejectOnError(b);var z=[],I=d(y.style);JSON.stringify(a.styleObj)!==JSON.stringify(I)&&(a.styleObj=I,E.setStyle(I.style),a.traceHash={},z.push(new Promise(function(B){E.once("styledata",B)}))),z=z.concat(i.fetchTraceGeoData(C)),Promise.all(z).then(function(){a.fillBelowLookup(C,x),a.updateData(C),a.updateLayout(x),a.resolveOnRender(S)}).catch(b)},h.fillBelowLookup=function(C,x){var S=x[this.id],b=S.layers,a,E,y=this.belowLookup={},z=!1;for(a=0;a1)for(a=0;a-1&&u(I.originalEvent,b,[S.xaxis],[S.yaxis],S.id,z),B.indexOf("event")>-1&&p.click(b,I.originalEvent)}}},h.updateFx=function(C){var x=this,S=x.map,b=x.gd;if(x.isStatic)return;function a(I){var B=x.map.unproject(I);return[B.lng,B.lat]}var E=C.dragmode,y;y=function(I,B){if(B.isRect){var k=I.range={};k[x.id]=[a([B.xmin,B.ymin]),a([B.xmax,B.ymax])]}else{var O=I.lassoPoints={};O[x.id]=B.map(a)}};var z=x.dragOptions;x.dragOptions=P.extendDeep(z||{},{dragmode:C.dragmode,element:x.div,gd:b,plotinfo:{id:x.id,domain:C[x.id].domain,xaxis:x.xaxis,yaxis:x.yaxis,fillRangeItems:y},xaxes:[x.xaxis],yaxes:[x.yaxis],subplot:x.id}),S.off("click",x.onClickInPanHandler),s(E)||r(E)?(S.dragPan.disable(),S.on("zoomstart",x.clearOutline),x.dragOptions.prepFn=function(I,B,k){n(I,B,k,x.dragOptions,E)},v.init(x.dragOptions)):(S.dragPan.enable(),S.off("zoomstart",x.clearOutline),x.div.onmousedown=null,x.div.ontouchstart=null,x.div.removeEventListener("touchstart",x.div._ontouchstart),x.onClickInPanHandler=x.onClickInPanFn(x.dragOptions),S.on("click",x.onClickInPanHandler))},h.updateFramework=function(C){var x=C[this.id].domain,S=C._size,b=this.div.style;b.width=S.w*(x.x[1]-x.x[0])+"px",b.height=S.h*(x.y[1]-x.y[0])+"px",b.left=S.l+x.x[0]*S.w+"px",b.top=S.t+(1-x.y[1])*S.h+"px",this.xaxis._offset=S.l+x.x[0]*S.w,this.xaxis._length=S.w*(x.x[1]-x.x[0]),this.yaxis._offset=S.t+(1-x.y[1])*S.h,this.yaxis._length=S.h*(x.y[1]-x.y[0])},h.updateLayers=function(C){var x=C[this.id],S=x.layers,b=this.layerList,a;if(S.length!==b.length){for(a=0;a=K.width-20?(q["text-anchor"]="start",q.x=5):(q["text-anchor"]="end",q.x=K._paper.attr("width")-7),ee.attr(q);var $=ee.select(".js-link-to-tool"),le=ee.select(".js-link-spacer"),ie=ee.select(".js-sourcelinks");j._context.showSources&&j._context.showSources(j),j._context.showLink&&T(j,$),le.text($.text()&&ie.text()?" - ":"")}};function T(j,K){K.text("");var ee=K.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(j._context.linkText+" "+String.fromCharCode(187));if(j._context.sendData)ee.on("click",function(){o.sendDataToCloud(j)});else{var oe=window.location.pathname.split("/"),q=window.location.search;ee.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+oe[2].split(".")[0]+"/"+oe[1]+q})}}o.sendDataToCloud=function(j){var K=(window.PLOTLYENV||{}).BASE_URL||j._context.plotlyServerURL;if(K){j.emit("plotly_beforeexport");var ee=m.select(j).append("div").attr("id","hiddenform").style("display","none"),oe=ee.append("form").attr({action:K+"/external",method:"post",target:"_blank"}),q=oe.append("input").attr({type:"text",name:"data"});return q.node().value=o.graphJson(j,!1,"keepdata"),oe.node().submit(),ee.remove(),j.emit("plotly_afterexport"),!1}};var C=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],x=["year","month","dayMonth","dayMonthYear"];o.supplyDefaults=function(j,K){var ee=K&&K.skipUpdateCalc,oe=j._fullLayout||{};if(oe._skipDefaults){delete oe._skipDefaults;return}var q=j._fullLayout={},$=j.layout||{},le=j._fullData||[],ie=j._fullData=[],he=j.data||[],me=j.calcdata||[],Me=j._context||{},Te;j._transitionData||o.createTransitionData(j),q._dfltTitle={plot:h(j,"Click to enter Plot title"),x:h(j,"Click to enter X axis title"),y:h(j,"Click to enter Y axis title"),colorbar:h(j,"Click to enter Colorscale title"),annotation:h(j,"new text")},q._traceWord=h(j,"trace");var Oe=a(j,C);if(q._mapboxAccessToken=Me.mapboxAccessToken,oe._initialAutoSizeIsDone){var Ne=oe.width,Ee=oe.height;o.supplyLayoutGlobalDefaults($,q,Oe),$.width||(q.width=Ne),$.height||(q.height=Ee),o.sanitizeMargins(q)}else{o.supplyLayoutGlobalDefaults($,q,Oe);var xe=!$.width||!$.height,Se=q.autosize,Ue=Me.autosizable,He=xe&&(Se||Ue);He?o.plotAutoSize(j,$,q):xe&&o.sanitizeMargins(q),!Se&&xe&&($.width=q.width,$.height=q.height)}q._d3locale=E(Oe,q.separators),q._extraFormat=a(j,x),q._initialAutoSizeIsDone=!0,q._dataLength=he.length,q._modules=[],q._visibleModules=[],q._basePlotModules=[];var Fe=q._subplots=b(),Ge=q._splomAxes={x:{},y:{}},nt=q._splomSubplots={};q._splomGridDflt={},q._scatterStackOpts={},q._firstScatter={},q._alignmentOpts={},q._colorAxes={},q._requestRangeslider={},q._traceUids=S(le,he),q._globalTransforms=(j._context||{}).globalTransforms,o.supplyDataDefaults(he,ie,$,q);var qe=Object.keys(Ge.x),$e=Object.keys(Ge.y);if(qe.length>1&&$e.length>1){for(A.getComponentMethod("grid","sizeDefaults")($,q),Te=0;Te15&&$e.length>15&&q.shapes.length===0&&q.images.length===0,o.linkSubplots(ie,q,le,oe),o.cleanPlot(ie,q,le,oe);var At=!!(oe._has&&oe._has("gl2d")),Mt=!!(q._has&&q._has("gl2d")),Vt=!!(oe._has&&oe._has("cartesian")),Je=!!(q._has&&q._has("cartesian")),De=Vt||At,Ie=Je||Mt;De&&!Ie?oe._bgLayer.remove():Ie&&!De&&(q._shouldCreateBgLayer=!0),oe._zoomlayer&&!j._dragging&&l({_fullLayout:oe}),y(ie,q),w(q,oe),A.getComponentMethod("colorscale","crossTraceDefaults")(ie,q),q._preGUI||(q._preGUI={}),q._tracePreGUI||(q._tracePreGUI={});var ze=q._tracePreGUI,Pe={},be;for(be in ze)Pe[be]="old";for(Te=0;Te0){var Me=1-2*$;le=Math.round(Me*le),ie=Math.round(Me*ie)}}var Te=o.layoutAttributes.width.min,Oe=o.layoutAttributes.height.min;le1,Ee=!ee.height&&Math.abs(oe.height-ie)>1;(Ee||Ne)&&(Ne&&(oe.width=le),Ee&&(oe.height=ie)),K._initialAutoSize||(K._initialAutoSize={width:le,height:ie}),o.sanitizeMargins(oe)},o.supplyLayoutModuleDefaults=function(j,K,ee,oe){var q=A.componentsRegistry,$=K._basePlotModules,le,ie,he,me=A.subplotsRegistry.cartesian;for(le in q)he=q[le],he.includeBasePlot&&he.includeBasePlot(j,K);$.length||$.push(me),K._has("cartesian")&&(A.getComponentMethod("grid","contentDefaults")(j,K),me.finalizeSubplots(j,K));for(var Me in K._subplots)K._subplots[Me].sort(t.subplotSort);for(ie=0;ie<$.length;ie++)he=$[ie],he.supplyLayoutDefaults&&he.supplyLayoutDefaults(j,K,ee);var Te=K._modules;for(ie=0;ie1&&(ee.l/=Se,ee.r/=Se)}if(Oe){var Ue=(ee.t+ee.b)/Oe;Ue>1&&(ee.t/=Ue,ee.b/=Ue)}var He=ee.xl!==void 0?ee.xl:ee.x,Fe=ee.xr!==void 0?ee.xr:ee.x,Ge=ee.yt!==void 0?ee.yt:ee.y,nt=ee.yb!==void 0?ee.yb:ee.y;Ne[K]={l:{val:He,size:ee.l+xe},r:{val:Fe,size:ee.r+xe},b:{val:nt,size:ee.b+xe},t:{val:Ge,size:ee.t+xe}},Ee[K]=1}if(!oe._replotting)return o.doAutoMargin(j)}};function U(j){if("_redrawFromAutoMarginCount"in j._fullLayout)return!1;var K=n.list(j,"",!0);for(var ee in K)if(K[ee].autoshift||K[ee].shift)return!0;return!1}o.doAutoMargin=function(j){var K=j._fullLayout,ee=K.width,oe=K.height;K._size||(K._size={}),O(K);var q=K._size,$=K.margin,le={t:0,b:0,l:0,r:0},ie=t.extendFlat({},q),he=$.l,me=$.r,Me=$.t,Te=$.b,Oe=K._pushmargin,Ne=K._pushmarginIds,Ee=K.minreducedwidth,xe=K.minreducedheight;if($.autoexpand!==!1){for(var Se in Oe)Ne[Se]||delete Oe[Se];var Ue=j._fullLayout._reservedMargin;for(var He in Ue)for(var Fe in Ue[He]){var Ge=Ue[He][Fe];le[Fe]=Math.max(le[Fe],Ge)}Oe.base={l:{val:0,size:he},r:{val:1,size:me},t:{val:1,size:Me},b:{val:0,size:Te}};for(var nt in le){var qe=0;for(var $e in Oe)$e!=="base"&&L(Oe[$e][nt].size)&&(qe=Oe[$e][nt].size>qe?Oe[$e][nt].size:qe);var et=Math.max(0,$[nt]-qe);le[nt]=Math.max(0,le[nt]-et)}for(var ct in Oe){var dt=Oe[ct].l||{},pt=Oe[ct].b||{},At=dt.val,Mt=dt.size,Vt=pt.val,Je=pt.size,De=ee-le.r-le.l,Ie=oe-le.t-le.b;for(var ze in Oe){if(L(Mt)&&Oe[ze].r){var Pe=Oe[ze].r.val,be=Oe[ze].r.size;if(Pe>At){var se=(Mt*Pe+(be-De)*At)/(Pe-At),ye=(be*(1-At)+(Mt-De)*(1-Pe))/(Pe-At);se+ye>he+me&&(he=se,me=ye)}}if(L(Je)&&Oe[ze].t){var Le=Oe[ze].t.val,Be=Oe[ze].t.size;if(Le>Vt){var ot=(Je*Le+(Be-Ie)*Vt)/(Le-Vt),at=(Be*(1-Vt)+(Je-Ie)*(1-Le))/(Le-Vt);ot+at>Te+Me&&(Te=ot,Me=at)}}}}}var wt=t.constrain(ee-$.l-$.r,N,Ee),It=t.constrain(oe-$.t-$.b,_,xe),Bt=Math.max(0,ee-wt),Gt=Math.max(0,oe-It);if(Bt){var Lt=(he+me)/Bt;Lt>1&&(he/=Lt,me/=Lt)}if(Gt){var Kt=(Te+Me)/Gt;Kt>1&&(Te/=Kt,Me/=Kt)}if(q.l=Math.round(he)+le.l,q.r=Math.round(me)+le.r,q.t=Math.round(Me)+le.t,q.b=Math.round(Te)+le.b,q.p=Math.round($.pad),q.w=Math.round(ee)-q.l-q.r,q.h=Math.round(oe)-q.t-q.b,!K._replotting&&(o.didMarginChange(ie,q)||U(j))){"_redrawFromAutoMarginCount"in K?K._redrawFromAutoMarginCount++:K._redrawFromAutoMarginCount=1;var ir=3*(1+Object.keys(Ne).length);if(K._redrawFromAutoMarginCount1)return!0}return!1},o.graphJson=function(j,K,ee,oe,q,$){(q&&K&&!j._fullData||q&&!K&&!j._fullLayout)&&o.supplyDefaults(j);var le=q?j._fullData:j.data,ie=q?j._fullLayout:j.layout,he=(j._transitionData||{})._frames;function me(Oe,Ne){if(typeof Oe=="function")return Ne?"_function_":null;if(t.isPlainObject(Oe)){var Ee={},xe;return Object.keys(Oe).sort().forEach(function(Se){if(["_","["].indexOf(Se.charAt(0))===-1){if(typeof Oe[Se]=="function"){Ne&&(Ee[Se]="_function");return}if(ee==="keepdata"){if(Se.substr(Se.length-3)==="src")return}else if(ee==="keepstream"){if(xe=Oe[Se+"src"],typeof xe=="string"&&xe.indexOf(":")>0&&!t.isPlainObject(Oe.stream))return}else if(ee!=="keepall"&&(xe=Oe[Se+"src"],typeof xe=="string"&&xe.indexOf(":")>0))return;Ee[Se]=me(Oe[Se],Ne)}}),Ee}return Array.isArray(Oe)?Oe.map(function(Se){return me(Se,Ne)}):t.isTypedArray(Oe)?t.simpleMap(Oe,t.identity):t.isJSDate(Oe)?t.ms2DateTimeLocal(+Oe):Oe}var Me={data:(le||[]).map(function(Oe){var Ne=me(Oe);return K&&delete Ne.fit,Ne})};if(!K&&(Me.layout=me(ie),q)){var Te=ie._size;Me.layout.computed={margin:{b:Te.b,l:Te.l,r:Te.r,t:Te.t}}}return he&&(Me.frames=me(he)),$&&(Me.config=me(j._context,!0)),oe==="object"?Me:JSON.stringify(Me)},o.modifyFrames=function(j,K){var ee,oe,q,$=j._transitionData._frames,le=j._transitionData._frameHash;for(ee=0;ee0&&(j._transitioningWithDuration=!0),j._transitionData._interruptCallbacks.push(function(){oe=!0}),ee.redraw&&j._transitionData._interruptCallbacks.push(function(){return A.call("redraw",j)}),j._transitionData._interruptCallbacks.push(function(){j.emit("plotly_transitioninterrupted",[])});var Oe=0,Ne=0;function Ee(){return Oe++,function(){Ne++,!oe&&Ne===Oe&&ie(Te)}}ee.runFn(Ee),setTimeout(Ee())})}function ie(Te){if(j._transitionData)return $(j._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(ee.redraw)return A.call("redraw",j)}).then(function(){j._transitioning=!1,j._transitioningWithDuration=!1,j.emit("plotly_transitioned",[])}).then(Te)}function he(){if(j._transitionData)return j._transitioning=!1,q(j._transitionData._interruptCallbacks)}var me=[o.previousPromises,he,ee.prepareFn,o.rehover,o.reselect,le],Me=t.syncOrAsync(me,j);return(!Me||!Me.then)&&(Me=Promise.resolve()),Me.then(function(){return j})}o.doCalcdata=function(j,K){var ee=n.list(j),oe=j._fullData,q=j._fullLayout,$,le,ie,he,me=new Array(oe.length),Me=(j.calcdata||[]).slice();for(j.calcdata=me,q._numBoxes=0,q._numViolins=0,q._violinScaleGroupStats={},j._hmpixcount=0,j._hmlumcount=0,q._piecolormap={},q._sunburstcolormap={},q._treemapcolormap={},q._iciclecolormap={},q._funnelareacolormap={},ie=0;ie=0;he--)if(nt[he].enabled){$._indexToPoints=nt[he]._indexToPoints;break}le&&le.calc&&(Ge=le.calc(j,$))}(!Array.isArray(Ge)||!Ge[0])&&(Ge=[{x:s,y:s}]),Ge[0].t||(Ge[0].t={}),Ge[0].trace=$,me[He]=Ge}}for(Q(ee,oe,q),ie=0;ie0?S:1/0},T=i(d,M),C=m.mod(T+1,d.length);return[d[T],d[C]]}function g(o){return Math.abs(o)>1e-10?o:0}function f(o,d,M){d=d||0,M=M||0;for(var T=o.length,C=new Array(T),x=0;xNe?(Ee=le,xe=le*Ne,He=(ie-xe)/K.h/2,Se=[q[0],q[1]],Ue=[$[0]+He,$[1]-He]):(Ee=ie/Ne,xe=ie,He=(le-Ee)/K.w/2,Se=[q[0]+He,q[1]-He],Ue=[$[0],$[1]]),Z.xLength2=Ee,Z.yLength2=xe,Z.xDomain2=Se,Z.yDomain2=Ue;var Fe=Z.xOffset2=K.l+K.w*Se[0],Ge=Z.yOffset2=K.t+K.h*(1-Ue[1]),nt=Z.radius=Ee/Me,qe=Z.innerRadius=Z.getHole(Q)*nt,$e=Z.cx=Fe-nt*me[0],et=Z.cy=Ge+nt*me[3],ct=Z.cxx=$e-Fe,dt=Z.cyy=et-Ge,pt=ee.side,At;pt==="counterclockwise"?(At=pt,pt="top"):pt==="clockwise"&&(At=pt,pt="bottom"),Z.radialAxis=Z.mockAxis(ce,Q,ee,{_id:"x",side:pt,_trueSide:At,domain:[qe/K.w,nt/K.w]}),Z.angularAxis=Z.mockAxis(ce,Q,oe,{side:"right",domain:[0,Math.PI],autorange:!1}),Z.doAutoRange(ce,Q),Z.updateAngularAxis(ce,Q),Z.updateRadialAxis(ce,Q),Z.updateRadialAxisTitle(ce,Q),Z.xaxis=Z.mockCartesianAxis(ce,Q,{_id:"x",domain:Se}),Z.yaxis=Z.mockCartesianAxis(ce,Q,{_id:"y",domain:Ue});var Mt=Z.pathSubplot();Z.clipPaths.forTraces.select("path").attr("d",Mt).attr("transform",v(ct,dt)),j.frontplot.attr("transform",v(Fe,Ge)).call(t.setClipUrl,Z._hasClipOnAxisFalse?null:Z.clipIds.forTraces,Z.gd),j.bg.attr("d",Mt).attr("transform",v($e,et)).call(p.fill,Q.bgcolor)},U.mockAxis=function(ce,Q,Z,j){var K=L.extendFlat({},Z,j);return l(K,Q,ce),K},U.mockCartesianAxis=function(ce,Q,Z){var j=this,K=j.isSmith,ee=Z._id,oe=L.extendFlat({type:"linear"},Z);n(oe,ce);var q={x:[0,2],y:[1,3]};return oe.setRange=function(){var $=j.sectorBBox,le=q[ee],ie=j.radialAxis._rl,he=(ie[1]-ie[0])/(1-j.getHole(Q));oe.range=[$[le[0]]*he,$[le[1]]*he]},oe.isPtWithinRange=ee==="x"&&!K?function($){return j.isPtInside($)}:function(){return!0},oe.setRange(),oe.setScale(),oe},U.doAutoRange=function(ce,Q){var Z=this,j=Z.gd,K=Z.radialAxis,ee=Z.getRadial(Q);c(j,K);var oe=K.range;ee.range=oe.slice(),ee._input.range=oe.slice(),K._rl=[K.r2l(oe[0],null,"gregorian"),K.r2l(oe[1],null,"gregorian")]},U.updateRadialAxis=function(ce,Q){var Z=this,j=Z.gd,K=Z.layers,ee=Z.radius,oe=Z.innerRadius,q=Z.cx,$=Z.cy,le=Z.getRadial(Q),ie=k(Z.getSector(Q)[0],360),he=Z.radialAxis,me=oe90&&ie<=270&&(he.tickangle=180);var Te=Me?function(nt){var qe=I(Z,E([nt.x,0]));return v(qe[0]-q,qe[1]-$)}:function(nt){return v(he.l2p(nt.x)+oe,0)},Oe=Me?function(nt){return z(Z,nt.x,-1/0,1/0)}:function(nt){return Z.pathArc(he.r2p(nt.x)+oe)},Ne=Y(le);if(Z.radialTickLayout!==Ne&&(K["radial-axis"].selectAll(".xtick").remove(),Z.radialTickLayout=Ne),me){he.setScale();var Ee=0,xe=Me?(he.tickvals||[]).filter(function(nt){return nt>=0}).map(function(nt){return s.tickText(he,nt,!0,!1)}):s.calcTicks(he),Se=Me?xe:s.clipEnds(he,xe),Ue=s.getTickSigns(he)[2];Me&&((he.ticks==="top"&&he.side==="bottom"||he.ticks==="bottom"&&he.side==="top")&&(Ue=-Ue),he.ticks==="top"&&he.side==="top"&&(Ee=-he.ticklen),he.ticks==="bottom"&&he.side==="bottom"&&(Ee=he.ticklen)),s.drawTicks(j,he,{vals:xe,layer:K["radial-axis"],path:s.makeTickPath(he,0,Ue),transFn:Te,crisp:!1}),s.drawGrid(j,he,{vals:Se,layer:K["radial-grid"],path:Oe,transFn:L.noop,crisp:!1}),s.drawLabels(j,he,{vals:xe,layer:K["radial-axis"],transFn:Te,labelFns:s.makeLabelFns(he,Ee)})}var He=Z.radialAxisAngle=Z.vangles?N(te(O(le.angle),Z.vangles)):le.angle,Fe=v(q,$),Ge=Fe+A(-He);ae(K["radial-axis"],me&&(le.showticklabels||le.ticks),{transform:Ge}),ae(K["radial-grid"],me&&le.showgrid,{transform:Me?"":Fe}),ae(K["radial-line"].select("line"),me&&le.showline,{x1:Me?-ee:oe,y1:0,x2:ee,y2:0,transform:Ge}).attr("stroke-width",le.linewidth).call(p.stroke,le.linecolor)},U.updateRadialAxisTitle=function(ce,Q,Z){if(!this.isSmith){var j=this,K=j.gd,ee=j.radius,oe=j.cx,q=j.cy,$=j.getRadial(Q),le=j.id+"title",ie=0;if($.title){var he=t.bBox(j.layers["radial-axis"].node()).height,me=$.title.font.size,Me=$.side;ie=Me==="top"?me:Me==="counterclockwise"?-(he+me*.4):he+me*.8}var Te=Z!==void 0?Z:j.radialAxisAngle,Oe=O(Te),Ne=Math.cos(Oe),Ee=Math.sin(Oe),xe=oe+ee/2*Ne+ie*Ee,Se=q-ee/2*Ee+ie*Ne;j.layers["radial-axis-title"]=w.draw(K,le,{propContainer:$,propName:j.id+".radialaxis.title",placeholder:B(K,"Click to enter radial axis title"),attributes:{x:xe,y:Se,"text-anchor":"middle"},transform:{rotate:-Te}})}},U.updateAngularAxis=function(ce,Q){var Z=this,j=Z.gd,K=Z.layers,ee=Z.radius,oe=Z.innerRadius,q=Z.cx,$=Z.cy,le=Z.getAngular(Q),ie=Z.angularAxis,he=Z.isSmith;he||(Z.fillViewInitialKey("angularaxis.rotation",le.rotation),ie.setGeometry(),ie.setScale());var me=he?function(qe){var $e=I(Z,E([0,qe.x]));return Math.atan2($e[0]-q,$e[1]-$)-Math.PI/2}:function(qe){return ie.t2g(qe.x)};ie.type==="linear"&&ie.thetaunit==="radians"&&(ie.tick0=N(ie.tick0),ie.dtick=N(ie.dtick));var Me=function(qe){return v(q+ee*Math.cos(qe),$-ee*Math.sin(qe))},Te=he?function(qe){var $e=I(Z,E([0,qe.x]));return v($e[0],$e[1])}:function(qe){return Me(me(qe))},Oe=he?function(qe){var $e=I(Z,E([0,qe.x])),et=Math.atan2($e[0]-q,$e[1]-$)-Math.PI/2;return v($e[0],$e[1])+A(-N(et))}:function(qe){var $e=me(qe);return Me($e)+A(-N($e))},Ne=he?function(qe){return y(Z,qe.x,0,1/0)}:function(qe){var $e=me(qe),et=Math.cos($e),ct=Math.sin($e);return"M"+[q+oe*et,$-oe*ct]+"L"+[q+ee*et,$-ee*ct]},Ee=s.makeLabelFns(ie,0),xe=Ee.labelStandoff,Se={};Se.xFn=function(qe){var $e=me(qe);return Math.cos($e)*xe},Se.yFn=function(qe){var $e=me(qe),et=Math.sin($e)>0?.2:1;return-Math.sin($e)*(xe+qe.fontSize*et)+Math.abs(Math.cos($e))*(qe.fontSize*x)},Se.anchorFn=function(qe){var $e=me(qe),et=Math.cos($e);return Math.abs(et)<.1?"middle":et>0?"start":"end"},Se.heightFn=function(qe,$e,et){var ct=me(qe);return-.5*(1+Math.sin(ct))*et};var Ue=Y(le);Z.angularTickLayout!==Ue&&(K["angular-axis"].selectAll("."+ie._id+"tick").remove(),Z.angularTickLayout=Ue);var He=he?[1/0].concat(ie.tickvals||[]).map(function(qe){return s.tickText(ie,qe,!0,!1)}):s.calcTicks(ie);he&&(He[0].text="∞",He[0].fontSize*=1.75);var Fe;if(Q.gridshape==="linear"?(Fe=He.map(me),L.angleDelta(Fe[0],Fe[1])<0&&(Fe=Fe.slice().reverse())):Fe=null,Z.vangles=Fe,ie.type==="category"&&(He=He.filter(function(qe){return L.isAngleInsideSector(me(qe),Z.sectorInRad)})),ie.visible){var Ge=ie.ticks==="inside"?-1:1,nt=(ie.linewidth||1)/2;s.drawTicks(j,ie,{vals:He,layer:K["angular-axis"],path:"M"+Ge*nt+",0h"+Ge*ie.ticklen,transFn:Oe,crisp:!1}),s.drawGrid(j,ie,{vals:He,layer:K["angular-grid"],path:Ne,transFn:L.noop,crisp:!1}),s.drawLabels(j,ie,{vals:He,layer:K["angular-axis"],repositionOnUpdate:!0,transFn:Te,labelFns:Se})}ae(K["angular-line"].select("path"),le.showline,{d:Z.pathSubplot(),transform:v(q,$)}).attr("stroke-width",le.linewidth).call(p.stroke,le.linecolor)},U.updateFx=function(ce,Q){if(!this.gd._context.staticPlot){var Z=!this.isSmith;Z&&(this.updateAngularDrag(ce),this.updateRadialDrag(ce,Q,0),this.updateRadialDrag(ce,Q,1)),this.updateHoverAndMainDrag(ce)}},U.updateHoverAndMainDrag=function(ce){var Q=this,Z=Q.isSmith,j=Q.gd,K=Q.layers,ee=ce._zoomlayer,oe=S.MINZOOM,q=S.OFFEDGE,$=Q.radius,le=Q.innerRadius,ie=Q.cx,he=Q.cy,me=Q.cxx,Me=Q.cyy,Te=Q.sectorInRad,Oe=Q.vangles,Ne=Q.radialAxis,Ee=b.clampTiny,xe=b.findXYatLength,Se=b.findEnclosingVertexAngles,Ue=S.cornerHalfWidth,He=S.cornerLen/2,Fe,Ge,nt=u.makeDragger(K,"path","maindrag",ce.dragmode===!1?"none":"crosshair");m.select(nt).attr("d",Q.pathSubplot()).attr("transform",v(ie,he)),nt.onmousemove=function(Lt){f.hover(j,Lt,Q.id),j._fullLayout._lasthover=nt,j._fullLayout._hoversubplot=Q.id},nt.onmouseout=function(Lt){j._dragging||g.unhover(j,Lt)};var qe={element:nt,gd:j,subplot:Q.id,plotinfo:{id:Q.id,xaxis:Q.xaxis,yaxis:Q.yaxis},xaxes:[Q.xaxis],yaxes:[Q.yaxis]},$e,et,ct,dt,pt,At,Mt,Vt,Je;function De(Lt,Kt){return Math.sqrt(Lt*Lt+Kt*Kt)}function Ie(Lt,Kt){return De(Lt-me,Kt-Me)}function ze(Lt,Kt){return Math.atan2(Me-Kt,Lt-me)}function Pe(Lt,Kt){return[Lt*Math.cos(Kt),Lt*Math.sin(-Kt)]}function be(Lt,Kt){if(Lt===0)return Q.pathSector(2*Ue);var ir=He/Lt,_r=Kt-ir,yt=Kt+ir,jt=Math.max(0,Math.min(Lt,$)),Yt=jt-Ue,br=jt+Ue;return"M"+Pe(Yt,_r)+"A"+[Yt,Yt]+" 0,0,0 "+Pe(Yt,yt)+"L"+Pe(br,yt)+"A"+[br,br]+" 0,0,1 "+Pe(br,_r)+"Z"}function se(Lt,Kt,ir){if(Lt===0)return Q.pathSector(2*Ue);var _r=Pe(Lt,Kt),yt=Pe(Lt,ir),jt=Ee((_r[0]+yt[0])/2),Yt=Ee((_r[1]+yt[1])/2),br,hr;if(jt&&Yt){var ut=Yt/jt,lt=-1/ut,xt=xe(Ue,ut,jt,Yt);br=xe(He,lt,xt[0][0],xt[0][1]),hr=xe(He,lt,xt[1][0],xt[1][1])}else{var Tt,Ct;Yt?(Tt=He,Ct=Ue):(Tt=Ue,Ct=He),br=[[jt-Tt,Yt-Ct],[jt+Tt,Yt-Ct]],hr=[[jt-Tt,Yt+Ct],[jt+Tt,Yt+Ct]]}return"M"+br.join("L")+"L"+hr.reverse().join("L")+"Z"}function ye(){ct=null,dt=null,pt=Q.pathSubplot(),At=!1;var Lt=j._fullLayout[Q.id];Mt=P(Lt.bgcolor).getLuminance(),Vt=u.makeZoombox(ee,Mt,ie,he,pt),Vt.attr("fill-rule","evenodd"),Je=u.makeCorners(ee,ie,he),d(j)}function Le(Lt,Kt){return Kt=Math.max(Math.min(Kt,$),le),Ltoe?(Lt-1&&Lt===1&&o(Kt,j,[Q.xaxis],[Q.yaxis],Q.id,qe),ir.indexOf("event")>-1&&f.click(j,Kt,Q.id)}qe.prepFn=function(Lt,Kt,ir){var _r=j._fullLayout.dragmode,yt=nt.getBoundingClientRect();j._fullLayout._calcInverseTransform(j);var jt=j._fullLayout._invTransform;Fe=j._fullLayout._invScaleX,Ge=j._fullLayout._invScaleY;var Yt=L.apply3DTransform(jt)(Kt-yt.left,ir-yt.top);if($e=Yt[0],et=Yt[1],Oe){var br=b.findPolygonOffset($,Te[0],Te[1],Oe);$e+=me+br[0],et+=Me+br[1]}switch(_r){case"zoom":qe.clickFn=Gt,Z||(Oe?qe.moveFn=wt:qe.moveFn=ot,qe.doneFn=It,ye());break;case"select":case"lasso":h(Lt,Kt,ir,qe,_r);break}},g.init(qe)},U.updateRadialDrag=function(ce,Q,Z){var j=this,K=j.gd,ee=j.layers,oe=j.radius,q=j.innerRadius,$=j.cx,le=j.cy,ie=j.radialAxis,he=S.radialDragBoxSize,me=he/2;if(!ie.visible)return;var Me=O(j.radialAxisAngle),Te=ie._rl,Oe=Te[0],Ne=Te[1],Ee=Te[Z],xe=.75*(Te[1]-Te[0])/(1-j.getHole(Q))/oe,Se,Ue,He;Z?(Se=$+(oe+me)*Math.cos(Me),Ue=le-(oe+me)*Math.sin(Me),He="radialdrag"):(Se=$+(q-me)*Math.cos(Me),Ue=le-(q-me)*Math.sin(Me),He="radialdrag-inner");var Fe=u.makeRectDragger(ee,He,"crosshair",-me,-me,he,he),Ge={element:Fe,gd:K};ce.dragmode===!1&&(Ge.dragmode=!1),ae(m.select(Fe),ie.visible&&q0!=(Z?$e>Oe:$e=90||K>90&&ee>=450?Me=1:q<=0&&le<=0?Me=0:Me=Math.max(q,le),K<=180&&ee>=180||K>180&&ee>=540?ie=-1:oe>=0&&$>=0?ie=0:ie=Math.min(oe,$),K<=270&&ee>=270||K>270&&ee>=630?he=-1:q>=0&&le>=0?he=0:he=Math.min(q,le),ee>=360?me=1:oe<=0&&$<=0?me=0:me=Math.max(oe,$),[ie,he,me,Me]}function te(ce,Q){var Z=function(K){return L.angleDist(ce,K)},j=L.findIndexOfMin(Q,Z);return Q[j]}function ae(ce,Q,Z){return Q?(ce.attr("display",null),ce.attr(Z)):ce&&ce.attr("display","none"),ce}},12101:function(G,V,e){var m=e(71828),P=e(21994),i=m.deg2rad,L=m.rad2deg;G.exports=function(s,n,l){switch(P(s,l),s._id){case"x":case"radialaxis":A(s,n);break;case"angularaxis":t(s,n);break}};function A(r,s){var n=s._subplot;r.setGeometry=function(){var l=r._rl[0],c=r._rl[1],u=n.innerRadius,g=(n.radius-u)/(c-l),f=u/g,w=l>c?function(h){return h<=0}:function(h){return h>=0};r.c2g=function(h){var o=r.c2l(h)-l;return(w(o)?o:0)+f},r.g2c=function(h){return r.l2c(h+l-f)},r.g2p=function(h){return h*g},r.c2p=function(h){return r.g2p(r.c2g(h))}}}function v(r,s){return s==="degrees"?i(r):r}function p(r,s){return s==="degrees"?L(r):r}function t(r,s){var n=r.type;if(n==="linear"){var l=r.d2c,c=r.c2d;r.d2c=function(u,g){return v(l(u),g)},r.c2d=function(u,g){return c(p(u,g))}}r.makeCalcdata=function(u,g){var f=u[g],w=u._length,h,o,d=function(S){return r.d2c(S,u.thetaunit)};if(f){if(m.isTypedArray(f)&&n==="linear"){if(w===f.length)return f;if(f.subarray)return f.subarray(0,w)}for(h=new Array(w),o=0;o0?1:0}function e(A){var v=A[0],p=A[1];if(!isFinite(v)||!isFinite(p))return[1,0];var t=(v+1)*(v+1)+p*p;return[(v*v+p*p-1)/t,2*p/t]}function m(A,v){var p=v[0],t=v[1];return[p*A.radius+A.cx,-t*A.radius+A.cy]}function P(A,v){return v*A.radius}function i(A,v,p,t){var r=m(A,e([p,v])),s=r[0],n=r[1],l=m(A,e([t,v])),c=l[0],u=l[1];if(v===0)return["M"+s+","+n,"L"+c+","+u].join(" ");var g=P(A,1/Math.abs(v));return["M"+s+","+n,"A"+g+","+g+" 0 0,"+(v<0?1:0)+" "+c+","+u].join(" ")}function L(A,v,p,t){var r=P(A,1/(v+1)),s=m(A,e([v,p])),n=s[0],l=s[1],c=m(A,e([v,t])),u=c[0],g=c[1];if(V(p)!==V(t)){var f=m(A,e([v,0])),w=f[0],h=f[1];return["M"+n+","+l,"A"+r+","+r+" 0 0,"+(00){for(var v=[],p=0;p=o&&(x.min=0,S.min=0,b.min=0,u.aaxis&&delete u.aaxis.min,u.baxis&&delete u.baxis.min,u.caxis&&delete u.caxis.min)}function c(u,g,f,w){var h=s[g._name];function o(a,E){return i.coerce(u,g,h,a,E)}o("uirevision",w.uirevision),g.type="linear";var d=o("color"),M=d!==h.color.dflt?d:f.font.color,T=g._name,C=T.charAt(0).toUpperCase(),x="Component "+C,S=o("title.text",x);g._hovertitle=S===x?S:C,i.coerceFont(o,"title.font",{family:f.font.family,size:i.bigFont(f.font.size),color:M}),o("min"),t(u,g,o,"linear"),v(u,g,o,"linear"),A(u,g,o,"linear"),p(u,g,o,{outerTicks:!0});var b=o("showticklabels");b&&(i.coerceFont(o,"tickfont",{family:f.font.family,size:f.font.size,color:M}),o("tickangle"),o("tickformat")),r(u,g,o,{dfltColor:d,bgColor:f.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:h}),o("hoverformat"),o("layer")}},64380:function(G,V,e){var m=e(39898),P=e(84267),i=e(73972),L=e(71828),A=L.strTranslate,v=L._,p=e(7901),t=e(91424),r=e(21994),s=e(1426).extendFlat,n=e(74875),l=e(89298),c=e(28569),u=e(30211),g=e(64505),f=g.freeMode,w=g.rectMode,h=e(92998),o=e(47322).prepSelect,d=e(47322).selectOnClick,M=e(47322).clearOutline,T=e(47322).clearSelectionsCache,C=e(85555);function x(N,_){this.id=N.id,this.graphDiv=N.graphDiv,this.init(_),this.makeFramework(_),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}G.exports=x;var S=x.prototype;S.init=function(N){this.container=N._ternarylayer,this.defs=N._defs,this.layoutId=N._uid,this.traceHash={},this.layers={}},S.plot=function(N,_){var U=this,Y=_[U.id],J=_._size;U._hasClipOnAxisFalse=!1;for(var te=0;teb*Z?(ie=Z,le=ie*b):(le=Q,ie=le/b),he=ae*le/Q,me=ce*ie/Z,q=_.l+_.w*J-le/2,$=_.t+_.h*(1-te)-ie/2,U.x0=q,U.y0=$,U.w=le,U.h=ie,U.sum=j,U.xaxis={type:"linear",range:[K+2*oe-j,j-K-2*ee],domain:[J-he/2,J+he/2],_id:"x"},r(U.xaxis,U.graphDiv._fullLayout),U.xaxis.setScale(),U.xaxis.isPtWithinRange=function(Ge){return Ge.a>=U.aaxis.range[0]&&Ge.a<=U.aaxis.range[1]&&Ge.b>=U.baxis.range[1]&&Ge.b<=U.baxis.range[0]&&Ge.c>=U.caxis.range[1]&&Ge.c<=U.caxis.range[0]},U.yaxis={type:"linear",range:[K,j-ee-oe],domain:[te-me/2,te+me/2],_id:"y"},r(U.yaxis,U.graphDiv._fullLayout),U.yaxis.setScale(),U.yaxis.isPtWithinRange=function(){return!0};var Me=U.yaxis.domain[0],Te=U.aaxis=s({},N.aaxis,{range:[K,j-ee-oe],side:"left",tickangle:(+N.aaxis.tickangle||0)-30,domain:[Me,Me+me*b],anchor:"free",position:0,_id:"y",_length:le});r(Te,U.graphDiv._fullLayout),Te.setScale();var Oe=U.baxis=s({},N.baxis,{range:[j-K-oe,ee],side:"bottom",domain:U.xaxis.domain,anchor:"free",position:0,_id:"x",_length:le});r(Oe,U.graphDiv._fullLayout),Oe.setScale();var Ne=U.caxis=s({},N.caxis,{range:[j-K-ee,oe],side:"right",tickangle:(+N.caxis.tickangle||0)+30,domain:[Me,Me+me*b],anchor:"free",position:0,_id:"y",_length:le});r(Ne,U.graphDiv._fullLayout),Ne.setScale();var Ee="M"+q+","+($+ie)+"h"+le+"l-"+le/2+",-"+ie+"Z";U.clipDef.select("path").attr("d",Ee),U.layers.plotbg.select("path").attr("d",Ee);var xe="M0,"+ie+"h"+le+"l-"+le/2+",-"+ie+"Z";U.clipDefRelative.select("path").attr("d",xe);var Se=A(q,$);U.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Se),U.clipDefRelative.select("path").attr("transform",null);var Ue=A(q-Oe._offset,$+ie);U.layers.baxis.attr("transform",Ue),U.layers.bgrid.attr("transform",Ue);var He=A(q+le/2,$)+"rotate(30)"+A(0,-Te._offset);U.layers.aaxis.attr("transform",He),U.layers.agrid.attr("transform",He);var Fe=A(q+le/2,$)+"rotate(-30)"+A(0,-Ne._offset);U.layers.caxis.attr("transform",Fe),U.layers.cgrid.attr("transform",Fe),U.drawAxes(!0),U.layers.aline.select("path").attr("d",Te.showline?"M"+q+","+($+ie)+"l"+le/2+",-"+ie:"M0,0").call(p.stroke,Te.linecolor||"#000").style("stroke-width",(Te.linewidth||0)+"px"),U.layers.bline.select("path").attr("d",Oe.showline?"M"+q+","+($+ie)+"h"+le:"M0,0").call(p.stroke,Oe.linecolor||"#000").style("stroke-width",(Oe.linewidth||0)+"px"),U.layers.cline.select("path").attr("d",Ne.showline?"M"+(q+le/2)+","+$+"l"+le/2+","+ie:"M0,0").call(p.stroke,Ne.linecolor||"#000").style("stroke-width",(Ne.linewidth||0)+"px"),U.graphDiv._context.staticPlot||U.initInteractions(),t.setClipUrl(U.layers.frontplot,U._hasClipOnAxisFalse?null:U.clipId,U.graphDiv)},S.drawAxes=function(N){var _=this,U=_.graphDiv,Y=_.id.substr(7)+"title",J=_.layers,te=_.aaxis,ae=_.baxis,ce=_.caxis;if(_.drawAx(te),_.drawAx(ae),_.drawAx(ce),N){var Q=Math.max(te.showticklabels?te.tickfont.size/2:0,(ce.showticklabels?ce.tickfont.size*.75:0)+(ce.ticks==="outside"?ce.ticklen*.87:0)),Z=(ae.showticklabels?ae.tickfont.size:0)+(ae.ticks==="outside"?ae.ticklen:0)+3;J["a-title"]=h.draw(U,"a"+Y,{propContainer:te,propName:_.id+".aaxis.title",placeholder:v(U,"Click to enter Component A title"),attributes:{x:_.x0+_.w/2,y:_.y0-te.title.font.size/3-Q,"text-anchor":"middle"}}),J["b-title"]=h.draw(U,"b"+Y,{propContainer:ae,propName:_.id+".baxis.title",placeholder:v(U,"Click to enter Component B title"),attributes:{x:_.x0-Z,y:_.y0+_.h+ae.title.font.size*.83+Z,"text-anchor":"middle"}}),J["c-title"]=h.draw(U,"c"+Y,{propContainer:ce,propName:_.id+".caxis.title",placeholder:v(U,"Click to enter Component C title"),attributes:{x:_.x0+_.w+Z,y:_.y0+_.h+ce.title.font.size*.83+Z,"text-anchor":"middle"}})}},S.drawAx=function(N){var _=this,U=_.graphDiv,Y=N._name,J=Y.charAt(0),te=N._id,ae=_.layers[Y],ce=30,Q=J+"tickLayout",Z=a(N);_[Q]!==Z&&(ae.selectAll("."+te+"tick").remove(),_[Q]=Z),N.setScale();var j=l.calcTicks(N),K=l.clipEnds(N,j),ee=l.makeTransTickFn(N),oe=l.getTickSigns(N)[2],q=L.deg2rad(ce),$=oe*(N.linewidth||1)/2,le=oe*N.ticklen,ie=_.w,he=_.h,me=J==="b"?"M0,"+$+"l"+Math.sin(q)*le+","+Math.cos(q)*le:"M"+$+",0l"+Math.cos(q)*le+","+-Math.sin(q)*le,Me={a:"M0,0l"+he+",-"+ie/2,b:"M0,0l-"+ie/2+",-"+he,c:"M0,0l-"+he+","+ie/2}[J];l.drawTicks(U,N,{vals:N.ticks==="inside"?K:j,layer:ae,path:me,transFn:ee,crisp:!1}),l.drawGrid(U,N,{vals:K,layer:_.layers[J+"grid"],path:Me,transFn:ee,crisp:!1}),l.drawLabels(U,N,{vals:j,layer:ae,transFn:ee,labelFns:l.makeLabelFns(N,0,ce)})};function a(N){return N.ticks+String(N.ticklen)+String(N.showticklabels)}var E=C.MINZOOM/2+.87,y="m-0.87,.5h"+E+"v3h-"+(E+5.2)+"l"+(E/2+2.6)+",-"+(E*.87+4.5)+"l2.6,1.5l-"+E/2+","+E*.87+"Z",z="m0.87,.5h-"+E+"v3h"+(E+5.2)+"l-"+(E/2+2.6)+",-"+(E*.87+4.5)+"l-2.6,1.5l"+E/2+","+E*.87+"Z",I="m0,1l"+E/2+","+E*.87+"l2.6,-1.5l-"+(E/2+2.6)+",-"+(E*.87+4.5)+"l-"+(E/2+2.6)+","+(E*.87+4.5)+"l2.6,1.5l"+E/2+",-"+E*.87+"Z",B="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",k=!0;S.clearOutline=function(){T(this.dragOptions),M(this.dragOptions.gd)},S.initInteractions=function(){var N=this,_=N.layers.plotbg.select("path").node(),U=N.graphDiv,Y=U._fullLayout._zoomlayer,J,te;this.dragOptions={element:_,gd:U,plotinfo:{id:N.id,domain:U._fullLayout[N.id].domain,xaxis:N.xaxis,yaxis:N.yaxis},subplot:N.id,prepFn:function(Ue,He,Fe){N.dragOptions.xaxes=[N.xaxis],N.dragOptions.yaxes=[N.yaxis],J=U._fullLayout._invScaleX,te=U._fullLayout._invScaleY;var Ge=N.dragOptions.dragmode=U._fullLayout.dragmode;f(Ge)?N.dragOptions.minDrag=1:N.dragOptions.minDrag=void 0,Ge==="zoom"?(N.dragOptions.moveFn=Oe,N.dragOptions.clickFn=ie,N.dragOptions.doneFn=Ne,he(Ue,He,Fe)):Ge==="pan"?(N.dragOptions.moveFn=xe,N.dragOptions.clickFn=ie,N.dragOptions.doneFn=Se,Ee(),N.clearOutline(U)):(w(Ge)||f(Ge))&&o(Ue,He,Fe,N.dragOptions,Ge)}};var ae,ce,Q,Z,j,K,ee,oe,q,$;function le(Ue){var He={};return He[N.id+".aaxis.min"]=Ue.a,He[N.id+".baxis.min"]=Ue.b,He[N.id+".caxis.min"]=Ue.c,He}function ie(Ue,He){var Fe=U._fullLayout.clickmode;O(U),Ue===2&&(U.emit("plotly_doubleclick",null),i.call("_guiRelayout",U,le({a:0,b:0,c:0}))),Fe.indexOf("select")>-1&&Ue===1&&d(He,U,[N.xaxis],[N.yaxis],N.id,N.dragOptions),Fe.indexOf("event")>-1&&u.click(U,He,N.id)}function he(Ue,He,Fe){var Ge=_.getBoundingClientRect();ae=He-Ge.left,ce=Fe-Ge.top,U._fullLayout._calcInverseTransform(U);var nt=U._fullLayout._invTransform,qe=L.apply3DTransform(nt)(ae,ce);ae=qe[0],ce=qe[1],Q={a:N.aaxis.range[0],b:N.baxis.range[1],c:N.caxis.range[1]},j=Q,Z=N.aaxis.range[1]-Q.a,K=P(N.graphDiv._fullLayout[N.id].bgcolor).getLuminance(),ee="M0,"+N.h+"L"+N.w/2+", 0L"+N.w+","+N.h+"Z",oe=!1,q=Y.append("path").attr("class","zoombox").attr("transform",A(N.x0,N.y0)).style({fill:K>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",ee),$=Y.append("path").attr("class","zoombox-corners").attr("transform",A(N.x0,N.y0)).style({fill:p.background,stroke:p.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),N.clearOutline(U)}function me(Ue,He){return 1-He/N.h}function Me(Ue,He){return 1-(Ue+(N.h-He)/Math.sqrt(3))/N.w}function Te(Ue,He){return(Ue-(N.h-He)/Math.sqrt(3))/N.w}function Oe(Ue,He){var Fe=ae+Ue*J,Ge=ce+He*te,nt=Math.max(0,Math.min(1,me(ae,ce),me(Fe,Ge))),qe=Math.max(0,Math.min(1,Me(ae,ce),Me(Fe,Ge))),$e=Math.max(0,Math.min(1,Te(ae,ce),Te(Fe,Ge))),et=(nt/2+$e)*N.w,ct=(1-nt/2-qe)*N.w,dt=(et+ct)/2,pt=ct-et,At=(1-nt)*N.h,Mt=At-pt/b;pt.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),$.transition().style("opacity",1).duration(200),oe=!0),U.emit("plotly_relayouting",le(j))}function Ne(){O(U),j!==Q&&(i.call("_guiRelayout",U,le(j)),k&&U.data&&U._context.showTips&&(L.notifier(v(U,"Double-click to zoom back out"),"long"),k=!1))}function Ee(){Q={a:N.aaxis.range[0],b:N.baxis.range[1],c:N.caxis.range[1]},j=Q}function xe(Ue,He){var Fe=Ue/N.xaxis._m,Ge=He/N.yaxis._m;j={a:Q.a-Ge,b:Q.b+(Fe+Ge)/2,c:Q.c-(Fe-Ge)/2};var nt=[j.a,j.b,j.c].sort(L.sorterAsc),qe={a:nt.indexOf(j.a),b:nt.indexOf(j.b),c:nt.indexOf(j.c)};nt[0]<0&&(nt[1]+nt[0]/2<0?(nt[2]+=nt[0]+nt[1],nt[0]=nt[1]=0):(nt[2]+=nt[0]/2,nt[1]+=nt[0]/2,nt[0]=0),j={a:nt[qe.a],b:nt[qe.b],c:nt[qe.c]},He=(Q.a-j.a)*N.yaxis._m,Ue=(Q.c-j.c-Q.b+j.b)*N.xaxis._m);var $e=A(N.x0+Ue,N.y0+He);N.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",$e);var et=A(-Ue,-He);N.clipDefRelative.select("path").attr("transform",et),N.aaxis.range=[j.a,N.sum-j.b-j.c],N.baxis.range=[N.sum-j.a-j.c,j.b],N.caxis.range=[N.sum-j.a-j.b,j.c],N.drawAxes(!1),N._hasClipOnAxisFalse&&N.plotContainer.select(".scatterlayer").selectAll(".trace").call(t.hideOutsideRangePoints,N),U.emit("plotly_relayouting",le(j))}function Se(){i.call("_guiRelayout",U,le(j))}_.onmousemove=function(Ue){u.hover(U,Ue,N.id),U._fullLayout._lasthover=_,U._fullLayout._hoversubplot=N.id},_.onmouseout=function(Ue){U._dragging||c.unhover(U,Ue)},c.init(this.dragOptions)};function O(N){m.select(N).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}},73972:function(G,V,e){var m=e(47769),P=e(64213),i=e(75138),L=e(41965),A=e(24401).addStyleRule,v=e(1426),p=e(9012),t=e(10820),r=v.extendFlat,s=v.extendDeepAll;V.modules={},V.allCategories={},V.allTypes=[],V.subplotsRegistry={},V.transformsRegistry={},V.componentsRegistry={},V.layoutArrayContainers=[],V.layoutArrayRegexes=[],V.traceLayoutAttributes={},V.localeRegistry={},V.apiMethodRegistry={},V.collectableSubplotTypes=null,V.register=function(T){if(V.collectableSubplotTypes=null,T)T&&!Array.isArray(T)&&(T=[T]);else throw new Error("No argument passed to Plotly.register.");for(var C=0;C-1}G.exports=function(t,r){var s,n=t.data,l=t.layout,c=L([],n),u=L({},l,A(r.tileClass)),g=t._context||{};if(r.width&&(u.width=r.width),r.height&&(u.height=r.height),r.tileClass==="thumbnail"||r.tileClass==="themes__thumb"){u.annotations=[];var f=Object.keys(u);for(s=0;s")!==-1?"":l.html(u).text()});return l.remove(),c}function s(n){return n.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}G.exports=function(l,c,u){var g=l._fullLayout,f=g._paper,w=g._toppaper,h=g.width,o=g.height,d;f.insert("rect",":first-child").call(i.setRect,0,0,h,o).call(L.fill,g.paper_bgcolor);var M=g._basePlotModules||[];for(d=0;dO+B||!m(k))}for(var _=0;_t;if(!r)return A}return v!==void 0?v:L.dflt},V.coerceColor=function(L,A,v){return P(A).isValid()?A:v!==void 0?v:L.dflt},V.coerceEnumerated=function(L,A,v){return L.coerceNumber&&(A=+A),L.values.indexOf(A)!==-1?A:v!==void 0?v:L.dflt},V.getValue=function(L,A){var v;return Array.isArray(L)?A0?me+=Me:x<0&&(me-=Me)}return me}function ce(he){var me=x,Me=he.b,Te=ae(he);return m.inbox(Me-me,Te-me,M+(Te-me)/(Te-Me)-1)}function Q(he){var me=x,Me=he.b,Te=ae(he);return m.inbox(Me-me,Te-me,T+(Te-me)/(Te-Me)-1)}var Z=n[S+"a"],j=n[b+"a"];y=Math.abs(Z.r2c(Z.range[1])-Z.r2c(Z.range[0]));function K(he){return(a(he)+E(he))/2}var ee=m.getDistanceFunction(u,a,E,K);if(m.getClosest(f,ee,n),n.index!==!1&&f[n.index].p!==p){I||(_=function(he){return Math.min(B(he),he.p-h.bargroupwidth/2)},U=function(he){return Math.max(k(he),he.p+h.bargroupwidth/2)});var oe=n.index,q=f[oe],$=w.base?q.b+q.s:q.s;n[b+"0"]=n[b+"1"]=j.c2p(q[b],!0),n[b+"LabelVal"]=$;var le=h.extents[h.extents.round(q.p)];n[S+"0"]=Z.c2p(o?_(q):le[0],!0),n[S+"1"]=Z.c2p(o?U(q):le[1],!0);var ie=q.orig_p!==void 0;return n[S+"LabelVal"]=ie?q.orig_p:q.p,n.labelLabel=v(Z,n[S+"LabelVal"],w[S+"hoverformat"]),n.valueLabel=v(j,n[b+"LabelVal"],w[b+"hoverformat"]),n.baseLabel=v(j,q.b,w[b+"hoverformat"]),n.spikeDistance=(Q(q)+te(q))/2,n[S+"Spike"]=Z.c2p(q.p,!0),L(q,w,n),n.hovertemplate=w.hovertemplate,n}}function s(n,l){var c=l.mcc||n.marker.color,u=l.mlcc||n.marker.line.color,g=A(n,l);if(i.opacity(c))return c;if(i.opacity(u)&&g)return u}G.exports={hoverPoints:t,hoverOnBars:r,getTraceColor:s}},60822:function(G,V,e){G.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(G){G.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(G,V,e){var m=e(73972),P=e(89298),i=e(71828),L=e(43641);G.exports=function(A,v,p){function t(h,o){return i.coerce(A,v,L,h,o)}for(var r=!1,s=!1,n=!1,l={},c=t("barmode"),u=0;u0}function b(_,U,Y,J,te,ae){var ce=U.xaxis,Q=U.yaxis,Z=_._fullLayout,j=_._context.staticPlot;te||(te={mode:Z.barmode,norm:Z.barmode,gap:Z.bargap,groupgap:Z.bargroupgap},n("bar",Z));var K=i.makeTraceGroups(J,Y,"trace bars").each(function(ee){var oe=m.select(this),q=ee[0].trace,$=q.type==="waterfall",le=q.type==="funnel",ie=q.type==="bar",he=ie||le,me=0;$&&q.connector.visible&&q.connector.mode==="between"&&(me=q.connector.line.width/2);var Me=q.orientation==="h",Te=S(te),Oe=i.ensureSingle(oe,"g","points"),Ne=M(q),Ee=Oe.selectAll("g.point").data(i.identity,Ne);Ee.enter().append("g").classed("point",!0),Ee.exit().remove(),Ee.each(function(Se,Ue){var He=m.select(this),Fe=C(Se,ce,Q,Me),Ge=Fe[0][0],nt=Fe[0][1],qe=Fe[1][0],$e=Fe[1][1],et=(Me?nt-Ge:$e-qe)===0;et&&he&&c.getLineWidth(q,Se)&&(et=!1),et||(et=!P(Ge)||!P(nt)||!P(qe)||!P($e)),Se.isBlank=et,et&&(Me?nt=Ge:$e=qe),me&&!et&&(Me?(Ge-=T(Ge,nt)*me,nt+=T(Ge,nt)*me):(qe-=T(qe,$e)*me,$e+=T(qe,$e)*me));var ct,dt;if(q.type==="waterfall"){if(!et){var pt=q[Se.dir].marker;ct=pt.line.width,dt=pt.color}}else ct=c.getLineWidth(q,Se),dt=Se.mc||q.marker.color;function At(ze){var Pe=m.round(ct/2%1,2);return te.gap===0&&te.groupgap===0?m.round(Math.round(ze)-Pe,2):ze}function Mt(ze,Pe,be){return be&&ze===Pe?ze:Math.abs(ze-Pe)>=2?At(ze):ze>Pe?Math.ceil(ze):Math.floor(ze)}if(!_._context.staticPlot){var Vt=A.opacity(dt),Je=Vt<1||ct>.01?At:Mt;Ge=Je(Ge,nt,Me),nt=Je(nt,Ge,Me),qe=Je(qe,$e,!Me),$e=Je($e,qe,!Me)}var De=x(i.ensureSingle(He,"path"),Z,te,ae);if(De.style("vector-effect",j?"none":"non-scaling-stroke").attr("d",isNaN((nt-Ge)*($e-qe))||et&&_._context.staticPlot?"M0,0Z":"M"+Ge+","+qe+"V"+$e+"H"+nt+"V"+qe+"Z").call(v.setClipUrl,U.layerClipId,_),!Z.uniformtext.mode&&Te){var Ie=v.makePointStyleFns(q);v.singlePointStyle(Se,De,q,Ie,_)}a(_,U,He,ee,Ue,Ge,nt,qe,$e,te,ae),U.layerClipId&&v.hideOutsideRangePoint(Se,He.select("text"),ce,Q,q.xcalendar,q.ycalendar)});var xe=q.cliponaxis===!1;v.setClipUrl(oe,xe?null:U.layerClipId,_)});p.getComponentMethod("errorbars","plot")(_,K,U,te)}function a(_,U,Y,J,te,ae,ce,Q,Z,j,K){var ee=U.xaxis,oe=U.yaxis,q=_._fullLayout,$;function le(ze,Pe,be){var se=i.ensureSingle(ze,"text").text(Pe).attr({class:"bartext bartext-"+$,"text-anchor":"middle","data-notex":1}).call(v.font,be).call(L.convertToTspans,_);return se}var ie=J[0].trace,he=ie.orientation==="h",me=B(q,J,te,ee,oe);$=k(ie,te);var Me=j.mode==="stack"||j.mode==="relative",Te=J[te],Oe=!Me||Te._outmost;if(!me||$==="none"||(Te.isBlank||ae===ce||Q===Z)&&($==="auto"||$==="inside")){Y.select("text").remove();return}var Ne=q.font,Ee=l.getBarColor(J[te],ie),xe=l.getInsideTextFont(ie,te,Ne,Ee),Se=l.getOutsideTextFont(ie,te,Ne),Ue=Y.datum();he?ee.type==="log"&&Ue.s0<=0&&(ee.range[0]0&&$e>0,dt=qe<=He&&$e<=Fe,pt=qe<=Fe&&$e<=He,At=he?He>=qe*(Fe/$e):Fe>=$e*(He/qe);ct&&(dt||pt||At)?$="inside":($="outside",Ge.remove(),Ge=null)}else $="inside";if(!Ge){et=i.ensureUniformFontSize(_,$==="outside"?Se:xe),Ge=le(Y,me,et);var Mt=Ge.attr("transform");if(Ge.attr("transform",""),nt=v.bBox(Ge.node()),qe=nt.width,$e=nt.height,Ge.attr("transform",Mt),qe<=0||$e<=0){Ge.remove();return}}var Vt=ie.textangle,Je,De;$==="outside"?(De=ie.constraintext==="both"||ie.constraintext==="outside",Je=I(ae,ce,Q,Z,nt,{isHorizontal:he,constrained:De,angle:Vt})):(De=ie.constraintext==="both"||ie.constraintext==="inside",Je=z(ae,ce,Q,Z,nt,{isHorizontal:he,constrained:De,angle:Vt,anchor:ie.insidetextanchor})),Je.fontSize=et.size,s(ie.type==="histogram"?"bar":ie.type,Je,q),Te.transform=Je;var Ie=x(Ge,q,j,K);i.setTransormAndDisplay(Ie,Je)}function E(_){return _==="auto"?0:_}function y(_,U){var Y=Math.PI/180*U,J=Math.abs(Math.sin(Y)),te=Math.abs(Math.cos(Y));return{x:_.width*te+_.height*J,y:_.width*J+_.height*te}}function z(_,U,Y,J,te,ae){var ce=!!ae.isHorizontal,Q=!!ae.constrained,Z=ae.angle||0,j=ae.anchor||"end",K=j==="end",ee=j==="start",oe=ae.leftToRight||0,q=(oe+1)/2,$=1-q,le=te.width,ie=te.height,he=Math.abs(U-_),me=Math.abs(J-Y),Me=he>2*o&&me>2*o?o:0;he-=2*Me,me-=2*Me;var Te=E(Z);Z==="auto"&&!(le<=he&&ie<=me)&&(le>he||ie>me)&&(!(le>me||ie>he)||le2*o?o:0:q=ee>2*o?o:0;var $=1;Q&&($=ce?Math.min(1,oe/K):Math.min(1,ee/j));var le=E(Z),ie=y(te,le),he=(ce?ie.x:ie.y)/2,me=(te.left+te.right)/2,Me=(te.top+te.bottom)/2,Te=(_+U)/2,Oe=(Y+J)/2,Ne=0,Ee=0,xe=ce?T(U,_):T(Y,J);return ce?(Te=U-xe*q,Ne=xe*he):(Oe=J+xe*q,Ee=-xe*he),{textX:me,textY:Me,targetX:Te,targetY:Oe,anchorX:Ne,anchorY:Ee,scale:$,rotate:le}}function B(_,U,Y,J,te){var ae=U[0].trace,ce=ae.texttemplate,Q;return ce?Q=O(_,U,Y,J,te):ae.textinfo?Q=N(U,Y,J,te):Q=c.getValue(ae.text,Y),c.coerceString(f,Q)}function k(_,U){var Y=c.getValue(_.textposition,U);return c.coerceEnumerated(w,Y)}function O(_,U,Y,J,te){var ae=U[0].trace,ce=i.castOption(ae,Y,"texttemplate");if(!ce)return"";var Q=ae.type==="histogram",Z=ae.type==="waterfall",j=ae.type==="funnel",K=ae.orientation==="h",ee,oe,q,$;K?(ee="y",oe=te,q="x",$=J):(ee="x",oe=J,q="y",$=te);function le(Ne){return t(oe,oe.c2l(Ne),!0).text}function ie(Ne){return t($,$.c2l(Ne),!0).text}var he=U[Y],me={};me.label=he.p,me.labelLabel=me[ee+"Label"]=le(he.p);var Me=i.castOption(ae,he.i,"text");(Me===0||Me)&&(me.text=Me),me.value=he.s,me.valueLabel=me[q+"Label"]=ie(he.s);var Te={};h(Te,ae,he.i),(Q||Te.x===void 0)&&(Te.x=K?me.value:me.label),(Q||Te.y===void 0)&&(Te.y=K?me.label:me.value),(Q||Te.xLabel===void 0)&&(Te.xLabel=K?me.valueLabel:me.labelLabel),(Q||Te.yLabel===void 0)&&(Te.yLabel=K?me.labelLabel:me.valueLabel),Z&&(me.delta=+he.rawS||he.s,me.deltaLabel=ie(me.delta),me.final=he.v,me.finalLabel=ie(me.final),me.initial=me.final-me.delta,me.initialLabel=ie(me.initial)),j&&(me.value=he.s,me.valueLabel=ie(me.value),me.percentInitial=he.begR,me.percentInitialLabel=i.formatPercent(he.begR),me.percentPrevious=he.difR,me.percentPreviousLabel=i.formatPercent(he.difR),me.percentTotal=he.sumR,me.percenTotalLabel=i.formatPercent(he.sumR));var Oe=i.castOption(ae,he.i,"customdata");return Oe&&(me.customdata=Oe),i.texttemplateString(ce,me,_._d3locale,Te,me,ae._meta||{})}function N(_,U,Y,J){var te=_[0].trace,ae=te.orientation==="h",ce=te.type==="waterfall",Q=te.type==="funnel";function Z(Oe){var Ne=ae?J:Y;return t(Ne,Oe,!0).text}function j(Oe){var Ne=ae?Y:J;return t(Ne,+Oe,!0).text}var K=te.textinfo,ee=_[U],oe=K.split("+"),q=[],$,le=function(Oe){return oe.indexOf(Oe)!==-1};if(le("label")&&q.push(Z(_[U].p)),le("text")&&($=i.castOption(te,ee.i,"text"),($===0||$)&&q.push($)),ce){var ie=+ee.rawS||ee.s,he=ee.v,me=he-ie;le("initial")&&q.push(j(me)),le("delta")&&q.push(j(ie)),le("final")&&q.push(j(he))}if(Q){le("value")&&q.push(j(ee.s));var Me=0;le("percent initial")&&Me++,le("percent previous")&&Me++,le("percent total")&&Me++;var Te=Me>1;le("percent initial")&&($=i.formatPercent(ee.begR),Te&&($+=" of initial"),q.push($)),le("percent previous")&&($=i.formatPercent(ee.difR),Te&&($+=" of previous"),q.push($)),le("percent total")&&($=i.formatPercent(ee.sumR),Te&&($+=" of total"),q.push($))}return q.join("
")}G.exports={plot:b,toMoveInsideBar:z}},81974:function(G){G.exports=function(m,P){var i=m.cd,L=m.xaxis,A=m.yaxis,v=i[0].trace,p=v.type==="funnel",t=v.orientation==="h",r=[],s;if(P===!1)for(s=0;s1||a.bargap===0&&a.bargroupgap===0&&!E[0].trace.marker.line.width)&&m.select(this).attr("shape-rendering","crispEdges")}),S.selectAll("g.points").each(function(E){var y=m.select(this),z=E[0].trace;c(y,z,x)}),A.getComponentMethod("errorbars","style")(S)}function c(x,S,b){i.pointStyle(x.selectAll("path"),S,b),u(x,S,b)}function u(x,S,b){x.selectAll("text").each(function(a){var E=m.select(this),y=L.ensureUniformFontSize(b,h(E,a,S,b));i.font(E,y)})}function g(x,S,b){var a=S[0].trace;a.selectedpoints?f(b,a,x):(c(b,a,x),A.getComponentMethod("errorbars","style")(b))}function f(x,S,b){i.selectedPointStyle(x.selectAll("path"),S),w(x.selectAll("text"),S,b)}function w(x,S,b){x.each(function(a){var E=m.select(this),y;if(a.selected){y=L.ensureUniformFontSize(b,h(E,a,S,b));var z=S.selected.textfont&&S.selected.textfont.color;z&&(y.color=z),i.font(E,y)}else i.selectedTextStyle(E,S)})}function h(x,S,b,a){var E=a._fullLayout.font,y=b.textfont;if(x.classed("bartext-inside")){var z=C(S,b);y=d(b,S.i,E,z)}else x.classed("bartext-outside")&&(y=M(b,S.i,E));return y}function o(x,S,b){return T(t,x.textfont,S,b)}function d(x,S,b,a){var E=o(x,S,b),y=x._input.textfont===void 0||x._input.textfont.color===void 0||Array.isArray(x.textfont.color)&&x.textfont.color[S]===void 0;return y&&(E={color:P.contrast(a),family:E.family,size:E.size}),T(r,x.insidetextfont,S,E)}function M(x,S,b){var a=o(x,S,b);return T(s,x.outsidetextfont,S,a)}function T(x,S,b,a){S=S||{};var E=n.getValue(S.family,b),y=n.getValue(S.size,b),z=n.getValue(S.color,b);return{family:n.coerceString(x.family,E,a.family),size:n.coerceNumber(x.size,y,a.size),color:n.coerceColor(x.color,z,a.color)}}function C(x,S){return S.type==="waterfall"?S[x.dir].marker.color:x.mcc||x.mc||S.marker.color}G.exports={style:l,styleTextPoints:u,styleOnSelect:g,getInsideTextFont:d,getOutsideTextFont:M,getBarColor:C,resizeText:v}},98340:function(G,V,e){var m=e(7901),P=e(52075).hasColorscale,i=e(1586),L=e(71828).coercePattern;G.exports=function(v,p,t,r,s){var n=t("marker.color",r),l=P(v,"marker");l&&i(v,p,s,t,{prefix:"marker.",cLetter:"c"}),t("marker.line.color",m.defaultLine),P(v,"marker.line")&&i(v,p,s,t,{prefix:"marker.line.",cLetter:"c"}),t("marker.line.width"),t("marker.opacity"),L(t,"marker.pattern",n,l),t("selected.marker.color"),t("unselected.marker.color")}},72597:function(G,V,e){var m=e(39898),P=e(71828);function i(p,t,r){var s=p._fullLayout,n=s["_"+r+"Text_minsize"];if(n){var l=s.uniformtext.mode==="hide",c;switch(r){case"funnelarea":case"pie":case"sunburst":c="g.slice";break;case"treemap":case"icicle":c="g.slice, g.pathbar";break;default:c="g.points > g.point"}t.selectAll(c).each(function(u){var g=u.transform;if(g){g.scale=l&&g.hide?0:n/g.fontSize;var f=m.select(this).select("text");P.setTransormAndDisplay(f,g)}})}}function L(p,t,r){if(r.uniformtext.mode){var s=v(p),n=r.uniformtext.minsize,l=t.scale*t.fontSize;t.hide=lu.range[1]&&(M+=Math.PI);var T=function(b){return w(d,M,[b.rp0,b.rp1],[b.thetag0,b.thetag1],f)?h+Math.min(1,Math.abs(b.thetag1-b.thetag0)/o)-1+(b.rp1-d)/(b.rp1-b.rp0)-1:1/0};if(m.getClosest(n,T,t),t.index!==!1){var C=t.index,x=n[C];t.x0=t.x1=x.ct[0],t.y0=t.y1=x.ct[1];var S=P.extendFlat({},x,{r:x.s,theta:x.p});return L(x,l,t),A(S,l,c,t),t.hovertemplate=l.hovertemplate,t.color=i(l,x),t.xLabelVal=t.yLabelVal=void 0,x.s<0&&(t.idealAlign="left"),[t]}}},23381:function(G,V,e){G.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(G){G.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}},19860:function(G,V,e){var m=e(71828),P=e(40151);G.exports=function(i,L,A){var v={},p;function t(n,l){return m.coerce(i[p]||{},L[p],P,n,l)}for(var r=0;r0?(u=l,g=c):(u=c,g=l);var f=A.findEnclosingVertexAngles(u,p.vangles)[0],w=A.findEnclosingVertexAngles(g,p.vangles)[1],h=[f,(u+g)/2,w];return A.pathPolygonAnnulus(s,n,u,g,h,t,r)}:function(s,n,l,c){return i.pathAnnulus(s,n,l,c,t,r)}}},53522:function(G,V,e){var m=e(82196),P=e(1486),i=e(22399),L=e(12663).axisHoverFormat,A=e(5386).fF,v=e(1426).extendFlat,p=m.marker,t=p.line;G.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:m.xperiod,yperiod:m.yperiod,xperiod0:m.xperiod0,yperiod0:m.yperiod0,xperiodalignment:m.xperiodalignment,yperiodalignment:m.yperiodalignment,xhoverformat:L("x"),yhoverformat:L("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},sdmultiple:{valType:"number",min:0,editType:"calc",dflt:1},sizemode:{valType:"enumerated",values:["quartiles","sd"],editType:"calc",dflt:"quartiles"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:v({},p.symbol,{arrayOk:!1,editType:"plot"}),opacity:v({},p.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:v({},p.angle,{arrayOk:!1,editType:"calc"}),size:v({},p.size,{arrayOk:!1,editType:"calc"}),color:v({},p.color,{arrayOk:!1,editType:"style"}),line:{color:v({},t.color,{arrayOk:!1,dflt:i.defaultLine,editType:"style"}),width:v({},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:m.fillcolor,whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:P.offsetgroup,alignmentgroup:P.alignmentgroup,selected:{marker:m.selected.marker,editType:"style"},unselected:{marker:m.unselected.marker,editType:"style"},text:v({},m.text,{}),hovertext:v({},m.hovertext,{}),hovertemplate:A({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"}}},48518:function(G,V,e){var m=e(92770),P=e(89298),i=e(42973),L=e(71828),A=e(50606).BADNUM,v=L._;G.exports=function(M,T){var C=M._fullLayout,x=P.getFromId(M,T.xaxis||"x"),S=P.getFromId(M,T.yaxis||"y"),b=[],a=T.type==="violin"?"_numViolins":"_numBoxes",E,y,z,I,B,k,O;T.orientation==="h"?(z=x,I="x",B=S,k="y",O=!!T.yperiodalignment):(z=S,I="y",B=x,k="x",O=!!T.xperiodalignment);var N=p(T,k,B,C[a]),_=N[0],U=N[1],Y=L.distinctVals(_,B),J=Y.vals,te=Y.minDiff/2,ae,ce,Q,Z,j,K,ee=(T.boxpoints||T.points)==="all"?L.identity:function(Mt){return Mt.vae.uf};if(T._hasPreCompStats){var oe=T[I],q=function(Mt){return z.d2c((T[Mt]||[])[E])},$=1/0,le=-1/0;for(E=0;E=ae.q1&&ae.q3>=ae.med){var he=q("lowerfence");ae.lf=he!==A&&he<=ae.q1?he:g(ae,Q,Z);var me=q("upperfence");ae.uf=me!==A&&me>=ae.q3?me:f(ae,Q,Z);var Me=q("mean");ae.mean=Me!==A?Me:Z?L.mean(Q,Z):(ae.q1+ae.q3)/2;var Te=q("sd");ae.sd=Me!==A&&Te>=0?Te:Z?L.stdev(Q,Z,ae.mean):ae.q3-ae.q1,ae.lo=w(ae),ae.uo=h(ae);var Oe=q("notchspan");Oe=Oe!==A&&Oe>0?Oe:o(ae,Z),ae.ln=ae.med-Oe,ae.un=ae.med+Oe;var Ne=ae.lf,Ee=ae.uf;T.boxpoints&&Q.length&&(Ne=Math.min(Ne,Q[0]),Ee=Math.max(Ee,Q[Z-1])),T.notched&&(Ne=Math.min(Ne,ae.ln),Ee=Math.max(Ee,ae.un)),ae.min=Ne,ae.max=Ee}else{L.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+ae.q1,"median = "+ae.med,"q3 = "+ae.q3].join(` `));var xe;ae.med!==A?xe=ae.med:ae.q1!==A?ae.q3!==A?xe=(ae.q1+ae.q3)/2:xe=ae.q1:ae.q3!==A?xe=ae.q3:xe=0,ae.med=xe,ae.q1=ae.q3=xe,ae.lf=ae.uf=xe,ae.mean=ae.sd=xe,ae.ln=ae.un=xe,ae.min=ae.max=xe}$=Math.min($,ae.min),le=Math.max(le,ae.max),ae.pts2=ce.filter(ee),b.push(ae)}}T._extremes[z._id]=P.findExtremes(z,[$,le],{padded:!0})}else{var Se=z.makeCalcdata(T,I),Ue=t(J,te),He=J.length,Fe=r(He);for(E=0;E=0&&Ge0){if(ae={},ae.pos=ae[k]=J[E],ce=ae.pts=Fe[E].sort(c),Q=ae[I]=ce.map(u),Z=Q.length,ae.min=Q[0],ae.max=Q[Z-1],ae.mean=L.mean(Q,Z),ae.sd=L.stdev(Q,Z,ae.mean)*T.sdmultiple,ae.med=L.interp(Q,.5),Z%2&&(et||ct)){var dt,pt;et?(dt=Q.slice(0,Z/2),pt=Q.slice(Z/2+1)):ct&&(dt=Q.slice(0,Z/2+1),pt=Q.slice(Z/2)),ae.q1=L.interp(dt,.5),ae.q3=L.interp(pt,.5)}else ae.q1=L.interp(Q,.25),ae.q3=L.interp(Q,.75);ae.lf=g(ae,Q,Z),ae.uf=f(ae,Q,Z),ae.lo=w(ae),ae.uo=h(ae);var At=o(ae,Z);ae.ln=ae.med-At,ae.un=ae.med+At,nt=Math.min(nt,ae.ln),qe=Math.max(qe,ae.un),ae.pts2=ce.filter(ee),b.push(ae)}T._extremes[z._id]=P.findExtremes(z,T.notched?Se.concat([nt,qe]):Se,{padded:!0})}return l(b,T),b.length>0?(b[0].t={num:C[a],dPos:te,posLetter:k,valLetter:I,labels:{med:v(M,"median:"),min:v(M,"min:"),q1:v(M,"q1:"),q3:v(M,"q3:"),max:v(M,"max:"),mean:T.boxmean==="sd"||T.sizemode==="sd"?v(M,"mean ± σ:").replace("σ",T.sdmultiple===1?"σ":T.sdmultiple+"σ"):v(M,"mean:"),lf:v(M,"lower fence:"),uf:v(M,"upper fence:")}},C[a]++,b):[{t:{empty:!0}}]};function p(d,M,T,C){var x=M in d,S=M+"0"in d,b="d"+M in d;if(x||S&&b){var a=T.makeCalcdata(d,M),E=i(d,T,M,a).vals;return[E,a]}var y;S?y=d[M+"0"]:"name"in d&&(T.type==="category"||m(d.name)&&["linear","log"].indexOf(T.type)!==-1||L.isDateTime(d.name)&&T.type==="date")?y=d.name:y=C;for(var z=T.type==="multicategory"?T.r2c_just_indices(y):T.d2c(y,0,d[M+"calendar"]),I=d._length,B=new Array(I),k=0;k1,S=1-l[p+"gap"],b=1-l[p+"groupgap"];for(g=0;g0;if(z==="positive"?(ae=I*(y?1:.5),Z=Q,ce=Z=k):z==="negative"?(ae=Z=k,ce=I*(y?1:.5),j=Q):(ae=ce=I,Z=j=Q),le){var ie=a.pointpos,he=a.jitter,me=a.marker.size/2,Me=0;ie+he>=0&&(Me=Q*(ie+he),Me>ae?($=!0,oe=me,K=Me):Me>Z&&(oe=me,K=ae)),Me<=ae&&(K=ae);var Te=0;ie-he<=0&&(Te=-Q*(ie-he),Te>ce?($=!0,q=me,ee=Te):Te>j&&(q=me,ee=ce)),Te<=ce&&(ee=ce)}else K=ae,ee=ce;var Oe=new Array(w.length);for(f=0;f0?(z="v",S>0?I=Math.min(a,b):I=Math.min(b)):S>0?(z="h",I=Math.min(a)):I=0;if(!I){c.visible=!1;return}c._length=I;var _=u("orientation",z);c._hasPreCompStats?_==="v"&&S===0?(u("x0",0),u("dx",1)):_==="h"&&x===0&&(u("y0",0),u("dy",1)):_==="v"&&S===0?u("x0"):_==="h"&&x===0&&u("y0");var U=P.getComponentMethod("calendars","handleTraceDefaults");U(l,c,["x","y"],g)}function s(l,c,u,g){var f=g.prefix,w=m.coerce2(l,c,p,"marker.outliercolor"),h=u("marker.line.outliercolor"),o="outliers";c._hasPreCompStats?o="all":(w||h)&&(o="suspectedoutliers");var d=u(f+"points",o);d?(u("jitter",d==="all"?.3:0),u("pointpos",d==="all"?-1.5:0),u("marker.symbol"),u("marker.opacity"),u("marker.size"),u("marker.angle"),u("marker.color",c.line.color),u("marker.line.color"),u("marker.line.width"),d==="suspectedoutliers"&&(u("marker.line.outliercolor",c.marker.color),u("marker.line.outlierwidth")),u("selected.marker.color"),u("unselected.marker.color"),u("selected.marker.size"),u("unselected.marker.size"),u("text"),u("hovertext")):delete c.marker;var M=u("hoveron");(M==="all"||M.indexOf("points")!==-1)&&u("hovertemplate"),m.coerceSelectionMarkerOpacity(c,u)}function n(l,c){var u,g;function f(o){return m.coerce(g._input,g,p,o)}for(var w=0;wT.lo&&(_.so=!0)}return x});M.enter().append("path").classed("point",!0),M.exit().remove(),M.call(i.translatePoints,u,g)}function r(s,n,l,c){var u=n.val,g=n.pos,f=!!g.rangebreaks,w=c.bPos,h=c.bPosPxOffset||0,o=l.boxmean||(l.meanline||{}).visible,d,M;Array.isArray(c.bdPos)?(d=c.bdPos[0],M=c.bdPos[1]):(d=c.bdPos,M=c.bdPos);var T=s.selectAll("path.mean").data(l.type==="box"&&l.boxmean||l.type==="violin"&&l.box.visible&&l.meanline.visible?P.identity:[]);T.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),T.exit().remove(),T.each(function(C){var x=g.c2l(C.pos+w,!0),S=g.l2p(x-d)+h,b=g.l2p(x+M)+h,a=f?(S+b)/2:g.l2p(x)+h,E=u.c2p(C.mean,!0),y=u.c2p(C.mean-C.sd,!0),z=u.c2p(C.mean+C.sd,!0);l.orientation==="h"?m.select(this).attr("d","M"+E+","+S+"V"+b+(o==="sd"?"m0,0L"+y+","+a+"L"+E+","+S+"L"+z+","+a+"Z":"")):m.select(this).attr("d","M"+S+","+E+"H"+b+(o==="sd"?"m0,0L"+a+","+y+"L"+S+","+E+"L"+a+","+z+"Z":""))})}G.exports={plot:v,plotBoxAndWhiskers:p,plotPoints:t,plotBoxMean:r}},24626:function(G){G.exports=function(e,m){var P=e.cd,i=e.xaxis,L=e.yaxis,A=[],v,p;if(m===!1)for(v=0;v=10)return null;for(var A=1/0,v=-1/0,p=i.length,t=0;t0?Math.floor:Math.ceil,O=I>0?Math.ceil:Math.floor,N=I>0?Math.min:Math.max,_=I>0?Math.max:Math.min,U=k(y+B),Y=O(z-B);l=E(y);var J=[[l]];for(v=U;v*I=0;L--)A[s-L]=e[n][L],v[s-L]=m[n][L];for(p.push({x:A,y:v,bicubic:t}),L=n,A=[],v=[];L>=0;L--)A[n-L]=e[L][0],v[n-L]=m[L][0];return p.push({x:A,y:v,bicubic:r}),p}},20347:function(G,V,e){var m=e(89298),P=e(1426).extendFlat;G.exports=function(L,A,v){var p,t,r,s,n,l,c,u,g,f,w,h,o,d,M=L["_"+A],T=L[A+"axis"],C=T._gridlines=[],x=T._minorgridlines=[],S=T._boundarylines=[],b=L["_"+v],a=L[v+"axis"];T.tickmode==="array"&&(T.tickvals=M.slice());var E=L._xctrl,y=L._yctrl,z=E[0].length,I=E.length,B=L._a.length,k=L._b.length;m.prepTicks(T),T.tickmode==="array"&&delete T.tickvals;var O=T.smoothing?3:1;function N(U){var Y,J,te,ae,ce,Q,Z,j,K,ee,oe,q,$=[],le=[],ie={};if(A==="b")for(J=L.b2j(U),te=Math.floor(Math.max(0,Math.min(k-2,J))),ae=J-te,ie.length=k,ie.crossLength=B,ie.xy=function(he){return L.evalxy([],he,J)},ie.dxy=function(he,me){return L.dxydi([],he,te,me,ae)},Y=0;Y0&&(K=L.dxydi([],Y-1,te,0,ae),$.push(ce[0]+K[0]/3),le.push(ce[1]+K[1]/3),ee=L.dxydi([],Y-1,te,1,ae),$.push(j[0]-ee[0]/3),le.push(j[1]-ee[1]/3)),$.push(j[0]),le.push(j[1]),ce=j;else for(Y=L.a2i(U),Q=Math.floor(Math.max(0,Math.min(B-2,Y))),Z=Y-Q,ie.length=B,ie.crossLength=k,ie.xy=function(he){return L.evalxy([],Y,he)},ie.dxy=function(he,me){return L.dxydj([],Q,he,Z,me)},J=0;J0&&(oe=L.dxydj([],Q,J-1,Z,0),$.push(ce[0]+oe[0]/3),le.push(ce[1]+oe[1]/3),q=L.dxydj([],Q,J-1,Z,1),$.push(j[0]-q[0]/3),le.push(j[1]-q[1]/3)),$.push(j[0]),le.push(j[1]),ce=j;return ie.axisLetter=A,ie.axis=T,ie.crossAxis=a,ie.value=U,ie.constvar=v,ie.index=u,ie.x=$,ie.y=le,ie.smoothing=a.smoothing,ie}function _(U){var Y,J,te,ae,ce,Q=[],Z=[],j={};if(j.length=M.length,j.crossLength=b.length,A==="b")for(te=Math.max(0,Math.min(k-2,U)),ce=Math.min(1,Math.max(0,U-te)),j.xy=function(K){return L.evalxy([],K,U)},j.dxy=function(K,ee){return L.dxydi([],K,te,ee,ce)},Y=0;YM.length-1)&&C.push(P(_(t),{color:T.gridcolor,width:T.gridwidth,dash:T.griddash}));for(u=l;uM.length-1)&&!(w<0||w>M.length-1))for(h=M[r],o=M[w],p=0;pM[M.length-1])&&x.push(P(N(f),{color:T.minorgridcolor,width:T.minorgridwidth,dash:T.minorgriddash})));T.startline&&S.push(P(_(0),{color:T.startlinecolor,width:T.startlinewidth})),T.endline&&S.push(P(_(M.length-1),{color:T.endlinecolor,width:T.endlinewidth}))}else{for(s=5e-15,n=[Math.floor((M[M.length-1]-T.tick0)/T.dtick*(1+s)),Math.ceil((M[0]-T.tick0)/T.dtick/(1+s))].sort(function(U,Y){return U-Y}),l=n[0],c=n[1],u=l;u<=c;u++)g=T.tick0+T.dtick*u,C.push(P(N(g),{color:T.gridcolor,width:T.gridwidth,dash:T.griddash}));for(u=l-1;uM[M.length-1])&&x.push(P(N(f),{color:T.minorgridcolor,width:T.minorgridwidth,dash:T.minorgriddash}));T.startline&&S.push(P(N(M[0]),{color:T.startlinecolor,width:T.startlinewidth})),T.endline&&S.push(P(N(M[M.length-1]),{color:T.endlinecolor,width:T.endlinewidth}))}}},83311:function(G,V,e){var m=e(89298),P=e(1426).extendFlat;G.exports=function(L,A){var v,p,t,r,s,n=A._labels=[],l=A._gridlines;for(v=0;vL.length&&(i=i.slice(0,L.length)):i=[],v=0;v90&&(c-=180,t=-t),{angle:c,flip:t,p:e.c2p(i,m,P),offsetMultplier:r}}},89740:function(G,V,e){var m=e(39898),P=e(91424),i=e(27669),L=e(67961),A=e(11651),v=e(63893),p=e(71828),t=p.strRotate,r=p.strTranslate,s=e(18783);G.exports=function(o,d,M,T){var C=o._context.staticPlot,x=d.xaxis,S=d.yaxis,b=o._fullLayout,a=b._clips;p.makeTraceGroups(T,M,"trace").each(function(E){var y=m.select(this),z=E[0],I=z.trace,B=I.aaxis,k=I.baxis,O=p.ensureSingle(y,"g","minorlayer"),N=p.ensureSingle(y,"g","majorlayer"),_=p.ensureSingle(y,"g","boundarylayer"),U=p.ensureSingle(y,"g","labellayer");y.style("opacity",I.opacity),l(x,S,N,B,"a",B._gridlines,!0),l(x,S,N,k,"b",k._gridlines,!0),l(x,S,O,B,"a",B._minorgridlines,!0),l(x,S,O,k,"b",k._minorgridlines,!0),l(x,S,_,B,"a-boundary",B._boundarylines,C),l(x,S,_,k,"b-boundary",k._boundarylines,C);var Y=c(o,x,S,I,z,U,B._labels,"a-label"),J=c(o,x,S,I,z,U,k._labels,"b-label");u(o,U,I,z,x,S,Y,J),n(I,z,a,x,S)})};function n(h,o,d,M,T){var C,x,S,b,a=d.select("#"+h._clipPathId);a.size()||(a=d.append("clipPath").classed("carpetclip",!0));var E=p.ensureSingle(a,"path","carpetboundary"),y=o.clipsegments,z=[];for(b=0;b0?"start":"end","data-notex":1}).call(P.font,y.font).text(y.text).call(v.convertToTspans,h),N=P.bBox(this);O.attr("transform",r(I.p[0],I.p[1])+t(I.angle)+r(y.axis.labelpadding*k,N.height*.3)),a=Math.max(a,N.width+y.axis.labelpadding)}),b.exit().remove(),E.maxExtent=a,E}function u(h,o,d,M,T,C,x,S){var b,a,E,y,z=p.aggNums(Math.min,null,d.a),I=p.aggNums(Math.max,null,d.a),B=p.aggNums(Math.min,null,d.b),k=p.aggNums(Math.max,null,d.b);b=.5*(z+I),a=B,E=d.ab2xy(b,a,!0),y=d.dxyda_rough(b,a),x.angle===void 0&&p.extendFlat(x,A(d,T,C,E,d.dxydb_rough(b,a))),w(h,o,d,M,E,y,d.aaxis,T,C,x,"a-title"),b=z,a=.5*(B+k),E=d.ab2xy(b,a,!0),y=d.dxydb_rough(b,a),S.angle===void 0&&p.extendFlat(S,A(d,T,C,E,d.dxyda_rough(b,a))),w(h,o,d,M,E,y,d.baxis,T,C,S,"b-title")}var g=s.LINE_SPACING,f=(1-s.MID_SHIFT)/g+1;function w(h,o,d,M,T,C,x,S,b,a,E){var y=[];x.title.text&&y.push(x.title.text);var z=o.selectAll("text."+E).data(y),I=a.maxExtent;z.enter().append("text").classed(E,!0),z.each(function(){var B=A(d,S,b,T,C);["start","both"].indexOf(x.showticklabels)===-1&&(I=0);var k=x.title.font.size;I+=k+x.title.offset;var O=a.angle+(a.flip<0?180:0),N=(O-B.angle+450)%360,_=N>90&&N<270,U=m.select(this);U.text(x.title.text).call(v.convertToTspans,h),_&&(I=(-v.lineCount(U)+f)*g*k-I),U.attr("transform",r(B.p[0],B.p[1])+t(B.angle)+r(0,I)).attr("text-anchor","middle").call(P.font,x.title.font)}),z.exit().remove()}},11435:function(G,V,e){var m=e(35509),P=e(65888).findBin,i=e(45664),L=e(20349),A=e(54495),v=e(73057);G.exports=function(t){var r=t._a,s=t._b,n=r.length,l=s.length,c=t.aaxis,u=t.baxis,g=r[0],f=r[n-1],w=s[0],h=s[l-1],o=r[r.length-1]-r[0],d=s[s.length-1]-s[0],M=o*m.RELATIVE_CULL_TOLERANCE,T=d*m.RELATIVE_CULL_TOLERANCE;g-=M,f+=M,w-=T,h+=T,t.isVisible=function(C,x){return C>g&&Cw&&xf||xh},t.setScale=function(){var C=t._x,x=t._y,S=i(t._xctrl,t._yctrl,C,x,c.smoothing,u.smoothing);t._xctrl=S[0],t._yctrl=S[1],t.evalxy=L([t._xctrl,t._yctrl],n,l,c.smoothing,u.smoothing),t.dxydi=A([t._xctrl,t._yctrl],c.smoothing,u.smoothing),t.dxydj=v([t._xctrl,t._yctrl],c.smoothing,u.smoothing)},t.i2a=function(C){var x=Math.max(0,Math.floor(C[0]),n-2),S=C[0]-x;return(1-S)*r[x]+S*r[x+1]},t.j2b=function(C){var x=Math.max(0,Math.floor(C[1]),n-2),S=C[1]-x;return(1-S)*s[x]+S*s[x+1]},t.ij2ab=function(C){return[t.i2a(C[0]),t.j2b(C[1])]},t.a2i=function(C){var x=Math.max(0,Math.min(P(C,r),n-2)),S=r[x],b=r[x+1];return Math.max(0,Math.min(n-1,x+(C-S)/(b-S)))},t.b2j=function(C){var x=Math.max(0,Math.min(P(C,s),l-2)),S=s[x],b=s[x+1];return Math.max(0,Math.min(l-1,x+(C-S)/(b-S)))},t.ab2ij=function(C){return[t.a2i(C[0]),t.b2j(C[1])]},t.i2c=function(C,x){return t.evalxy([],C,x)},t.ab2xy=function(C,x,S){if(!S&&(Cr[n-1]|xs[l-1]))return[!1,!1];var b=t.a2i(C),a=t.b2j(x),E=t.evalxy([],b,a);if(S){var y=0,z=0,I=[],B,k,O,N;Cr[n-1]?(B=n-2,k=1,y=(C-r[n-1])/(r[n-1]-r[n-2])):(B=Math.max(0,Math.min(n-2,Math.floor(b))),k=b-B),xs[l-1]?(O=l-2,N=1,z=(x-s[l-1])/(s[l-1]-s[l-2])):(O=Math.max(0,Math.min(l-2,Math.floor(a))),N=a-O),y&&(t.dxydi(I,B,O,k,N),E[0]+=I[0]*y,E[1]+=I[1]*y),z&&(t.dxydj(I,B,O,k,N),E[0]+=I[0]*z,E[1]+=I[1]*z)}return E},t.c2p=function(C,x,S){return[x.c2p(C[0]),S.c2p(C[1])]},t.p2x=function(C,x,S){return[x.p2c(C[0]),S.p2c(C[1])]},t.dadi=function(C){var x=Math.max(0,Math.min(r.length-2,C));return r[x+1]-r[x]},t.dbdj=function(C){var x=Math.max(0,Math.min(s.length-2,C));return s[x+1]-s[x]},t.dxyda=function(C,x,S,b){var a=t.dxydi(null,C,x,S,b),E=t.dadi(C,S);return[a[0]/E,a[1]/E]},t.dxydb=function(C,x,S,b){var a=t.dxydj(null,C,x,S,b),E=t.dbdj(x,b);return[a[0]/E,a[1]/E]},t.dxyda_rough=function(C,x,S){var b=o*(S||.1),a=t.ab2xy(C+b,x,!0),E=t.ab2xy(C-b,x,!0);return[(a[0]-E[0])*.5/b,(a[1]-E[1])*.5/b]},t.dxydb_rough=function(C,x,S){var b=d*(S||.1),a=t.ab2xy(C,x+b,!0),E=t.ab2xy(C,x-b,!0);return[(a[0]-E[0])*.5/b,(a[1]-E[1])*.5/b]},t.dpdx=function(C){return C._m},t.dpdy=function(C){return C._m}}},72505:function(G,V,e){var m=e(71828);G.exports=function(i,L,A){var v,p,t,r=[],s=[],n=i[0].length,l=i.length;function c(J,te){var ae=0,ce,Q=0;return J>0&&(ce=i[te][J-1])!==void 0&&(Q++,ae+=ce),J0&&(ce=i[te-1][J])!==void 0&&(Q++,ae+=ce),te0&&p0&&vb);return m.log("Smoother converged to",a,"after",y,"iterations"),i}},19237:function(G,V,e){var m=e(71828).isArray1D;G.exports=function(i,L,A){var v=A("x"),p=v&&v.length,t=A("y"),r=t&&t.length;if(!p&&!r)return!1;if(L._cheater=!v,(!p||m(v))&&(!r||m(t))){var s=p?v.length:1/0;r&&(s=Math.min(s,t.length)),L.a&&L.a.length&&(s=Math.min(s,L.a.length)),L.b&&L.b.length&&(s=Math.min(s,L.b.length)),L._length=s}else L._length=null;return!0}},69568:function(G,V,e){var m=e(5386).fF,P=e(19316),i=e(50693),L=e(9012),A=e(22399).defaultLine,v=e(1426).extendFlat,p=P.marker.line;G.exports=v({locations:{valType:"data_array",editType:"calc"},locationmode:P.locationmode,z:{valType:"data_array",editType:"calc"},geojson:v({},P.geojson,{}),featureidkey:P.featureidkey,text:v({},P.text,{}),hovertext:v({},P.hovertext,{}),marker:{line:{color:v({},p.color,{dflt:A}),width:v({},p.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:P.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:P.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:v({},L.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:m(),showlegend:v({},L.showlegend,{dflt:!1})},i("",{cLetter:"z",editTypeOverride:"calc"}))},38675:function(G,V,e){var m=e(92770),P=e(50606).BADNUM,i=e(78803),L=e(75225),A=e(66279);function v(p){return p&&typeof p=="string"}G.exports=function(t,r){var s=r._length,n=new Array(s),l;r.geojson?l=function(w){return v(w)||m(w)}:l=v;for(var c=0;c")}}},51319:function(G,V,e){G.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(G,V,e){var m=e(39898),P=e(71828),i=e(41327),L=e(90973).getTopojsonFeatures,A=e(71739).findExtremes,v=e(99636).style;function p(r,s,n){var l=s.layers.backplot.select(".choroplethlayer");P.makeTraceGroups(l,n,"trace choropleth").each(function(c){var u=m.select(this),g=u.selectAll("path.choroplethlocation").data(P.identity);g.enter().append("path").classed("choroplethlocation",!0),g.exit().remove(),v(r,c)})}function t(r,s){for(var n=r[0].trace,l=s[n.geo],c=l._subplot,u=n.locationmode,g=n._length,f=u==="geojson-id"?i.extractTraceFeature(r):L(n,c.topojson),w=[],h=[],o=0;o=0;L--){var A=i[L].id;if(typeof A=="string"&&A.indexOf("water")===0){for(var v=L+1;v=0;t--)v.removeLayer(p[t][1])},A.dispose=function(){var v=this.subplot.map;this._removeLayers(),v.removeSource(this.sourceId)},G.exports=function(p,t){var r=t[0].trace,s=new L(p,r.uid),n=s.sourceId,l=m(t),c=s.below=p.belowLookup["trace-"+r.uid];return p.map.addSource(n,{type:"geojson",data:l.geojson}),s._addLayers(l,c),t[0].trace._glTrace=s,s}},12674:function(G,V,e){var m=e(50693),P=e(12663).axisHoverFormat,i=e(5386).fF,L=e(2418),A=e(9012),v=e(1426).extendFlat,p={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:i({editType:"calc"},{keys:["norm"]}),uhoverformat:P("u",1),vhoverformat:P("v",1),whoverformat:P("w",1),xhoverformat:P("x"),yhoverformat:P("y"),zhoverformat:P("z"),showlegend:v({},A.showlegend,{dflt:!1})};v(p,m("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var t=["opacity","lightposition","lighting"];t.forEach(function(r){p[r]=L[r]}),p.hoverinfo=v({},A.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),p.transforms=void 0,G.exports=p},31371:function(G,V,e){var m=e(78803);G.exports=function(i,L){for(var A=L.u,v=L.v,p=L.w,t=Math.min(L.x.length,L.y.length,L.z.length,A.length,v.length,p.length),r=-1/0,s=1/0,n=0;nA.level||A.starts.length&&L===A.level)}break;case"constraint":if(m.prefixBoundary=!1,m.edgepaths.length)return;var v=m.x.length,p=m.y.length,t=-1/0,r=1/0;for(i=0;i":s>t&&(m.prefixBoundary=!0);break;case"<":(st||m.starts.length&&l===r)&&(m.prefixBoundary=!0);break;case"][":n=Math.min(s[0],s[1]),l=Math.max(s[0],s[1]),nt&&(m.prefixBoundary=!0);break}break}}},90654:function(G,V,e){var m=e(21081),P=e(86068),i=e(53572);function L(A,v,p){var t=v.contours,r=v.line,s=t.size||1,n=t.coloring,l=P(v,{isColorbar:!0});if(n==="heatmap"){var c=m.extractOpts(v);p._fillgradient=c.reversescale?m.flipScale(c.colorscale):c.colorscale,p._zrange=[c.min,c.max]}else n==="fill"&&(p._fillcolor=l);p._line={color:n==="lines"?l:r.color,width:t.showlines!==!1?r.width:0,dash:r.dash},p._levels={start:t.start,end:i(t),size:s}}G.exports={min:"zmin",max:"zmax",calc:L}},36914:function(G){G.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(G,V,e){var m=e(92770),P=e(14523),i=e(7901),L=i.addOpacity,A=i.opacity,v=e(74808),p=v.CONSTRAINT_REDUCTION,t=v.COMPARISON_OPS2;G.exports=function(n,l,c,u,g,f){var w=l.contours,h,o,d,M=c("contours.operation");if(w._operation=p[M],r(c,w),M==="="?h=w.showlines=!0:(h=c("contours.showlines"),d=c("fillcolor",L((n.line||{}).color||g,.5))),h){var T=d&&A(d)?L(l.fillcolor,1):g;o=c("line.color",T),c("line.width",2),c("line.dash")}c("line.smoothing"),P(c,u,o,f)};function r(s,n){var l;t.indexOf(n.operation)===-1?(s("contours.value",[0,1]),Array.isArray(n.value)?n.value.length>2?n.value=n.value.slice(2):n.length===0?n.value=[0,1]:n.length<2?(l=parseFloat(n.value[0]),n.value=[l,l+1]):n.value=[parseFloat(n.value[0]),parseFloat(n.value[1])]:m(n.value)&&(l=parseFloat(n.value),n.value=[l,l+1])):(s("contours.value",0),m(n.value)||(Array.isArray(n.value)?n.value=parseFloat(n.value[0]):n.value=0))}},64237:function(G,V,e){var m=e(74808),P=e(92770);G.exports={"[]":L("[]"),"][":L("]["),">":A(">"),"<":A("<"),"=":A("=")};function i(v,p){var t=Array.isArray(p),r;function s(n){return P(n)?+n:null}return m.COMPARISON_OPS2.indexOf(v)!==-1?r=s(t?p[0]:p):m.INTERVAL_OPS.indexOf(v)!==-1?r=t?[s(p[0]),s(p[1])]:[s(p),s(p)]:m.SET_OPS.indexOf(v)!==-1&&(r=t?p.map(s):[s(p)]),r}function L(v){return function(p){p=i(v,p);var t=Math.min(p[0],p[1]),r=Math.max(p[0],p[1]);return{start:t,end:r,size:r-t}}}function A(v){return function(p){return p=i(v,p),{start:p,end:1/0,size:1/0}}}},67217:function(G){G.exports=function(e,m,P,i){var L=i("contours.start"),A=i("contours.end"),v=L===!1||A===!1,p=P("contours.size"),t;v?t=m.autocontour=!0:t=P("autocontour",!1),(t||!p)&&P("ncontours")}},84857:function(G,V,e){var m=e(71828);G.exports=function(i,L){var A,v,p,t=function(n){return n.reverse()},r=function(n){return n};switch(L){case"=":case"<":return i;case">":for(i.length!==1&&m.warn("Contour data invalid for the specified inequality operation."),v=i[0],A=0;A1e3){m.warn("Too many contours, clipping at 1000",A);break}return s}},53572:function(G){G.exports=function(e){return e.end+e.size/1e6}},81696:function(G,V,e){var m=e(71828),P=e(36914);G.exports=function(r,s,n){var l,c,u,g,f;for(s=s||.01,n=n||.01,u=0;u20?(u=P.CHOOSESADDLE[u][(g[0]||g[1])<0?0:1],t.crossings[c]=P.SADDLEREMAINDER[u]):delete t.crossings[c],g=P.NEWDELTA[u],!g){m.log("Found bad marching index:",u,r,t.level);break}f.push(p(t,r,g)),r[0]+=g[0],r[1]+=g[1],c=r.join(","),i(f[f.length-1],f[f.length-2],n,l)&&f.pop();var T=g[0]&&(r[0]<0||r[0]>h-2)||g[1]&&(r[1]<0||r[1]>w-2),C=r[0]===o[0]&&r[1]===o[1]&&g[0]===d[0]&&g[1]===d[1];if(C||s&&T)break;u=t.crossings[c]}M===1e4&&m.log("Infinite loop in contour?");var x=i(f[0],f[f.length-1],n,l),S=0,b=.2*t.smoothing,a=[],E=0,y,z,I,B,k,O,N,_,U,Y,J;for(M=1;M=E;M--)if(y=a[M],y=E&&y+a[z]_&&U--,t.edgepaths[U]=J.concat(f,Y));break}Q||(t.edgepaths[_]=f.concat(Y))}for(_=0;_20&&r?t===208||t===1114?n=s[0]===0?1:-1:l=s[1]===0?1:-1:P.BOTTOMSTART.indexOf(t)!==-1?l=1:P.LEFTSTART.indexOf(t)!==-1?n=1:P.TOPSTART.indexOf(t)!==-1?l=-1:n=-1,[n,l]}function p(t,r,s){var n=r[0]+Math.max(s[0],0),l=r[1]+Math.max(s[1],0),c=t.z[l][n],u=t.xaxis,g=t.yaxis;if(s[1]){var f=(t.level-c)/(t.z[l][n+1]-c),w=(f!==1?(1-f)*u.c2l(t.x[n]):0)+(f!==0?f*u.c2l(t.x[n+1]):0);return[u.c2p(u.l2c(w),!0),g.c2p(t.y[l],!0),n+f,l]}else{var h=(t.level-c)/(t.z[l+1][n]-c),o=(h!==1?(1-h)*g.c2l(t.y[l]):0)+(h!==0?h*g.c2l(t.y[l+1]):0);return[u.c2p(t.x[n],!0),g.c2p(g.l2c(o),!0),n,l+h]}}},52421:function(G,V,e){var m=e(7901),P=e(46248);G.exports=function(L,A,v,p,t){t||(t={}),t.isContour=!0;var r=P(L,A,v,p,t);return r&&r.forEach(function(s){var n=s.trace;n.contours.type==="constraint"&&(n.fillcolor&&m.opacity(n.fillcolor)?s.color=m.addOpacity(n.fillcolor,1):n.contours.showlines&&m.opacity(n.line.color)&&(s.color=m.addOpacity(n.line.color,1)))}),r}},99442:function(G,V,e){G.exports={attributes:e(70600),supplyDefaults:e(13031),calc:e(27529),plot:e(29854).plot,style:e(84426),colorbar:e(90654),hoverPoints:e(52421),moduleType:"trace",name:"contour",basePlotModule:e(93612),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}},14523:function(G,V,e){var m=e(71828);G.exports=function(i,L,A,v){v||(v={});var p=i("contours.showlabels");if(p){var t=L.font;m.coerceFont(i,"contours.labelfont",{family:t.family,size:t.size,color:A}),i("contours.labelformat")}v.hasHover!==!1&&i("zhoverformat")}},86068:function(G,V,e){var m=e(39898),P=e(21081),i=e(53572);G.exports=function(A){var v=A.contours,p=v.start,t=i(v),r=v.size||1,s=Math.floor((t-p)/r)+1,n=v.coloring==="lines"?0:1,l=P.extractOpts(A);isFinite(r)||(r=1,s=1);var c=l.reversescale?P.flipScale(l.colorscale):l.colorscale,u=c.length,g=new Array(u),f=new Array(u),w,h,o=l.min,d=l.max;if(v.coloring==="heatmap"){for(h=0;h=d)&&(p<=o&&(p=o),t>=d&&(t=d),s=Math.floor((t-p)/r)+1,n=0),h=0;ho&&(g.unshift(o),f.unshift(f[0])),g[g.length-1]i?0:1)+(L[0][1]>i?0:2)+(L[1][1]>i?0:4)+(L[1][0]>i?0:8);if(A===5||A===10){var v=(L[0][0]+L[0][1]+L[1][0]+L[1][1])/4;return i>v?A===5?713:1114:A===5?104:208}return A===15?0:A}},29854:function(G,V,e){var m=e(39898),P=e(71828),i=e(91424),L=e(21081),A=e(63893),v=e(89298),p=e(21994),t=e(50347),r=e(87678),s=e(81696),n=e(87558),l=e(84857),c=e(20083),u=e(36914),g=u.LABELOPTIMIZER;V.plot=function(x,S,b,a){var E=S.xaxis,y=S.yaxis;P.makeTraceGroups(a,b,"contour").each(function(z){var I=m.select(this),B=z[0],k=B.trace,O=B.x,N=B.y,_=k.contours,U=n(_,S,B),Y=P.ensureSingle(I,"g","heatmapcoloring"),J=[];_.coloring==="heatmap"&&(J=[z]),t(x,S,J,Y),r(U),s(U);var te=E.c2p(O[0],!0),ae=E.c2p(O[O.length-1],!0),ce=y.c2p(N[0],!0),Q=y.c2p(N[N.length-1],!0),Z=[[te,Q],[ae,Q],[ae,ce],[te,ce]],j=U;_.type==="constraint"&&(j=l(U,_._operation)),f(I,Z,_),w(I,j,Z,_),o(I,U,x,B,_),M(I,S,x,B,Z)})};function f(C,x,S){var b=P.ensureSingle(C,"g","contourbg"),a=b.selectAll("path").data(S.coloring==="fill"?[0]:[]);a.enter().append("path"),a.exit().remove(),a.attr("d","M"+x.join("L")+"Z").style("stroke","none")}function w(C,x,S,b){var a=b.coloring==="fill"||b.type==="constraint"&&b._operation!=="=",E="M"+S.join("L")+"Z";a&&c(x,b);var y=P.ensureSingle(C,"g","contourfill"),z=y.selectAll("path").data(a?x:[]);z.enter().append("path"),z.exit().remove(),z.each(function(I){var B=(I.prefixBoundary?E:"")+h(I,S);B?m.select(this).attr("d",B).style("stroke","none"):m.select(this).remove()})}function h(C,x){var S="",b=0,a=C.edgepaths.map(function(te,ae){return ae}),E=!0,y,z,I,B,k,O;function N(te){return Math.abs(te[1]-x[0][1])<.01}function _(te){return Math.abs(te[1]-x[2][1])<.01}function U(te){return Math.abs(te[0]-x[0][0])<.01}function Y(te){return Math.abs(te[0]-x[2][0])<.01}for(;a.length;){for(O=i.smoothopen(C.edgepaths[b],C.smoothing),S+=E?O:O.replace(/^M/,"L"),a.splice(a.indexOf(b),1),y=C.edgepaths[b][C.edgepaths[b].length-1],B=-1,I=0;I<4;I++){if(!y){P.log("Missing end?",b,C);break}for(N(y)&&!Y(y)?z=x[1]:U(y)?z=x[0]:_(y)?z=x[3]:Y(y)&&(z=x[2]),k=0;k=0&&(z=J,B=k):Math.abs(y[1]-z[1])<.01?Math.abs(y[1]-J[1])<.01&&(J[0]-y[0])*(z[0]-J[0])>=0&&(z=J,B=k):P.log("endpt to newendpt is not vert. or horz.",y,z,J)}if(y=z,B>=0)break;S+="L"+z}if(B===C.edgepaths.length){P.log("unclosed perimeter path");break}b=B,E=a.indexOf(b)===-1,E&&(b=a[0],S+="Z")}for(b=0;bg.MAXCOST*2)break;N&&(z/=2),y=B-z/2,I=y+z*1.5}if(O<=g.MAXCOST)return k};function d(C,x,S,b){var a=x.width/2,E=x.height/2,y=C.x,z=C.y,I=C.theta,B=Math.cos(I)*a,k=Math.sin(I)*a,O=(y>b.center?b.right-y:y-b.left)/(B+Math.abs(Math.sin(I)*E)),N=(z>b.middle?b.bottom-z:z-b.top)/(Math.abs(k)+Math.cos(I)*E);if(O<1||N<1)return 1/0;var _=g.EDGECOST*(1/(O-1)+1/(N-1));_+=g.ANGLECOST*I*I;for(var U=y-B,Y=z-k,J=y+B,te=z+k,ae=0;aep.end&&(p.start=p.end=(p.start+p.end)/2),A._input.contours||(A._input.contours={}),P.extendFlat(A._input.contours,{start:p.start,end:p.end,size:p.size}),A._input.autocontour=!0}else if(p.type!=="constraint"){var n=p.start,l=p.end,c=A._input.contours;if(n>l&&(p.start=c.start=l,l=p.end=c.end=n,n=p.start),!(p.size>0)){var u;n===l?u=1:u=i(n,l,A.ncontours).dtick,c.size=p.size=u}}};function i(L,A,v){var p={type:"linear",range:[L,A]};return m.autoTicks(p,(A-L)/(v||15)),p}},84426:function(G,V,e){var m=e(39898),P=e(91424),i=e(70035),L=e(86068);G.exports=function(v){var p=m.select(v).selectAll("g.contour");p.style("opacity",function(t){return t[0].trace.opacity}),p.each(function(t){var r=m.select(this),s=t[0].trace,n=s.contours,l=s.line,c=n.size||1,u=n.start,g=n.type==="constraint",f=!g&&n.coloring==="lines",w=!g&&n.coloring==="fill",h=f||w?L(s):null;r.selectAll("g.contourlevel").each(function(M){m.select(this).selectAll("path").call(P.lineGroupStyle,l.width,f?h(M.level):l.color,l.dash)});var o=n.labelfont;if(r.selectAll("g.contourlabels text").each(function(M){P.font(m.select(this),{family:o.family,size:o.size,color:o.color||(f?h(M.level):l.color)})}),g)r.selectAll("g.contourfill path").style("fill",s.fillcolor);else if(w){var d;r.selectAll("g.contourfill path").style("fill",function(M){return d===void 0&&(d=M.level),h(M.level+.5*c)}),d===void 0&&(d=u),r.selectAll("g.contourbg path").style("fill",h(d-.5*c))}}),i(v)}},8724:function(G,V,e){var m=e(1586),P=e(14523);G.exports=function(L,A,v,p,t){var r=v("contours.coloring"),s,n="";r==="fill"&&(s=v("contours.showlines")),s!==!1&&(r!=="lines"&&(n=v("line.color","#000")),v("line.width",.5),v("line.dash")),r!=="none"&&(L.showlegend!==!0&&(A.showlegend=!1),A._dfltShowLegend=!1,m(L,A,p,v,{prefix:"",cLetter:"z"})),v("line.smoothing"),P(v,p,n,t)}},88085:function(G,V,e){var m=e(21606),P=e(70600),i=e(50693),L=e(1426).extendFlat,A=P.contours;G.exports=L({carpet:{valType:"string",editType:"calc"},z:m.z,a:m.x,a0:m.x0,da:m.dx,b:m.y,b0:m.y0,db:m.dy,text:m.text,hovertext:m.hovertext,transpose:m.transpose,atype:m.xtype,btype:m.ytype,fillcolor:P.fillcolor,autocontour:P.autocontour,ncontours:P.ncontours,contours:{type:A.type,start:A.start,end:A.end,size:A.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:A.showlines,showlabels:A.showlabels,labelfont:A.labelfont,labelformat:A.labelformat,operation:A.operation,value:A.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:P.line.color,width:P.line.width,dash:P.line.dash,smoothing:P.line.smoothing,editType:"plot"},transforms:void 0},i("",{cLetter:"z",autoColorDflt:!1}))},59885:function(G,V,e){var m=e(78803),P=e(71828),i=e(68296),L=e(4742),A=e(824),v=e(43907),p=e(70769),t=e(75005),r=e(22882),s=e(18670);G.exports=function(c,u){var g=u._carpetTrace=r(c,u);if(!(!g||!g.visible||g.visible==="legendonly")){if(!u.a||!u.b){var f=c.data[g.index],w=c.data[u.index];w.a||(w.a=f.a),w.b||(w.b=f.b),t(w,u,u._defaultColor,c._fullLayout)}var h=n(c,u);return s(u,u._z),h}};function n(l,c){var u=c._carpetTrace,g=u.aaxis,f=u.baxis,w,h,o,d,M,T,C;g._minDtick=0,f._minDtick=0,P.isArray1D(c.z)&&i(c,g,f,"a","b",["z"]),w=c._a=c._a||c.a,d=c._b=c._b||c.b,w=w?g.makeCalcdata(c,"_a"):[],d=d?f.makeCalcdata(c,"_b"):[],h=c.a0||0,o=c.da||1,M=c.b0||0,T=c.db||1,C=c._z=L(c._z||c.z,c.transpose),c._emptypoints=v(C),A(C,c._emptypoints);var x=P.maxRowLength(C),S=c.xtype==="scaled"?"":w,b=p(c,S,h,o,x,g),a=c.ytype==="scaled"?"":d,E=p(c,a,M,T,C.length,f),y={a:b,b:E,z:C};return c.contours.type==="levels"&&c.contours.coloring!=="none"&&m(l,c,{vals:C,containerStr:"",cLetter:"z"}),[y]}},75005:function(G,V,e){var m=e(71828),P=e(67684),i=e(88085),L=e(83179),A=e(67217),v=e(8724);G.exports=function(t,r,s,n){function l(f,w){return m.coerce(t,r,i,f,w)}function c(f){return m.coerce2(t,r,i,f)}if(l("carpet"),t.a&&t.b){var u=P(t,r,l,n,"a","b");if(!u){r.visible=!1;return}l("text");var g=l("contours.type")==="constraint";g?L(t,r,l,n,s,{hasHover:!1}):(A(t,r,l,c),v(t,r,l,n,{hasHover:!1}))}else r._defaultColor=s,r._length=null}},93740:function(G,V,e){G.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(G,V,e){var m=e(39898),P=e(27669),i=e(67961),L=e(91424),A=e(71828),v=e(87678),p=e(81696),t=e(29854),r=e(36914),s=e(84857),n=e(87558),l=e(20083),c=e(22882),u=e(4536);G.exports=function(S,b,a,E){var y=b.xaxis,z=b.yaxis;A.makeTraceGroups(E,a,"contour").each(function(I){var B=m.select(this),k=I[0],O=k.trace,N=O._carpetTrace=c(S,O),_=S.calcdata[N.index][0];if(!N.visible||N.visible==="legendonly")return;var U=k.a,Y=k.b,J=O.contours,te=n(J,b,k),ae=J.type==="constraint",ce=J._operation,Q=ae?ce==="="?"lines":"fill":J.coloring;function Z(Me){var Te=N.ab2xy(Me[0],Me[1],!0);return[y.c2p(Te[0]),z.c2p(Te[1])]}var j=[[U[0],Y[Y.length-1]],[U[U.length-1],Y[Y.length-1]],[U[U.length-1],Y[0]],[U[0],Y[0]]];v(te);var K=(U[U.length-1]-U[0])*1e-8,ee=(Y[Y.length-1]-Y[0])*1e-8;p(te,K,ee);var oe=te;J.type==="constraint"&&(oe=s(te,ce)),g(te,Z);var q,$,le,ie,he=[];for(ie=_.clipsegments.length-1;ie>=0;ie--)q=_.clipsegments[ie],$=P([],q.x,y.c2p),le=P([],q.y,z.c2p),$.reverse(),le.reverse(),he.push(i($,le,q.bicubic));var me="M"+he.join("L")+"Z";M(B,_.clipsegments,y,z,ae,Q),T(O,B,y,z,oe,j,Z,N,_,Q,me),f(B,te,S,k,J,b,N),L.setClipUrl(B,N._clipPathId,S)})};function g(x,S){var b,a,E,y,z,I,B,k,O;for(b=0;bte&&(a.max=te),a.len=a.max-a.min}function h(x,S,b){var a=x.getPointAtLength(S),E=x.getPointAtLength(b),y=E.x-a.x,z=E.y-a.y,I=Math.sqrt(y*y+z*z);return[y/I,z/I]}function o(x){var S=Math.sqrt(x[0]*x[0]+x[1]*x[1]);return[x[0]/S,x[1]/S]}function d(x,S){var b=Math.abs(x[0]*S[0]+x[1]*S[1]),a=Math.sqrt(1-b*b);return a/b}function M(x,S,b,a,E,y){var z,I,B,k,O=A.ensureSingle(x,"g","contourbg"),N=O.selectAll("path").data(y==="fill"&&!E?[0]:[]);N.enter().append("path"),N.exit().remove();var _=[];for(k=0;k=0&&(U=$,J=te):Math.abs(_[1]-U[1])=0&&(U=$,J=te):A.log("endpt to newendpt is not vert. or horz.",_,U,$)}if(J>=0)break;k+=oe(_,U),_=U}if(J===S.edgepaths.length){A.log("unclosed perimeter path");break}B=J,N=O.indexOf(B)===-1,N&&(B=O[0],k+=oe(_,U)+"Z",_=null)}for(B=0;B0?+f[u]:0),c.push({type:"Feature",geometry:{type:"Point",coordinates:d},properties:M})}}var C=L.extractOpts(r),x=C.reversescale?L.flipScale(C.colorscale):C.colorscale,S=x[0][1],b=i.opacity(S)<1?S:i.addOpacity(S,0),a=["interpolate",["linear"],["heatmap-density"],0,b];for(u=1;u=0;p--)A.removeLayer(v[p][1])},L.dispose=function(){var A=this.subplot.map;this._removeLayers(),A.removeSource(this.sourceId)},G.exports=function(v,p){var t=p[0].trace,r=new i(v,t.uid),s=r.sourceId,n=m(p),l=r.below=v.belowLookup["trace-"+t.uid];return v.map.addSource(s,{type:"geojson",data:n.geojson}),r._addLayers(n,l),r}},49789:function(G,V,e){var m=e(71828);G.exports=function(i,L){for(var A=0;A"),n.color=L(c,f),[n]}};function L(A,v){var p=A.marker,t=v.mc||p.color,r=v.mlc||p.line.color,s=v.mlw||p.line.width;if(m(t))return t;if(m(r)&&s)return r}},51759:function(G,V,e){G.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(G){G.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(G,V,e){var m=e(71828),P=e(10440);G.exports=function(i,L,A){var v=!1;function p(s,n){return m.coerce(i,L,P,s,n)}for(var t=0;t path").each(function(f){if(!f.isBlank){var w=g.marker;m.select(this).call(i.fill,f.mc||w.color).call(i.stroke,f.mlc||w.line.color).call(P.dashLine,w.line.dash,f.mlw||w.line.width).style("opacity",g.selectedpoints&&!f.selected?L:1)}}),p(u,g,r),u.selectAll(".regions").each(function(){m.select(this).selectAll("path").style("stroke-width",0).call(i.fill,g.connector.fillcolor)}),u.selectAll(".lines").each(function(){var f=g.connector.line;P.lineGroupStyle(m.select(this).selectAll("path"),f.width,f.color,f.dash)})})}G.exports={style:t}},86807:function(G,V,e){var m=e(34e3),P=e(9012),i=e(27670).Y,L=e(5386).fF,A=e(5386).si,v=e(1426).extendFlat;G.exports={labels:m.labels,label0:m.label0,dlabel:m.dlabel,values:m.values,marker:{colors:m.marker.colors,line:{color:v({},m.marker.line.color,{dflt:null}),width:v({},m.marker.line.width,{dflt:1}),editType:"calc"},pattern:m.marker.pattern,editType:"calc"},text:m.text,hovertext:m.hovertext,scalegroup:v({},m.scalegroup,{}),textinfo:v({},m.textinfo,{flags:["label","text","value","percent"]}),texttemplate:A({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:v({},P.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:L({},{keys:["label","color","value","text","percent"]}),textposition:v({},m.textposition,{values:["inside","none"],dflt:"inside"}),textfont:m.textfont,insidetextfont:m.insidetextfont,title:{text:m.title.text,font:m.title.font,position:v({},m.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:i({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(G,V,e){var m=e(74875);V.name="funnelarea",V.plot=function(P,i,L,A){m.plotBasePlot(V.name,P,i,L,A)},V.clean=function(P,i,L,A){m.cleanBasePlot(V.name,P,i,L,A)}},89574:function(G,V,e){var m=e(32354);function P(L,A){return m.calc(L,A)}function i(L){m.crossTraceCalc(L,{type:"funnelarea"})}G.exports={calc:P,crossTraceCalc:i}},86282:function(G,V,e){var m=e(71828),P=e(86807),i=e(27670).c,L=e(90769).handleText,A=e(37434).handleLabelsAndValues,v=e(37434).handleMarkerDefaults;G.exports=function(t,r,s,n){function l(T,C){return m.coerce(t,r,P,T,C)}var c=l("labels"),u=l("values"),g=A(c,u),f=g.len;if(r._hasLabels=g.hasLabels,r._hasValues=g.hasValues,!r._hasLabels&&r._hasValues&&(l("label0"),l("dlabel")),!f){r.visible=!1;return}r._length=f,v(t,r,n,l),l("scalegroup");var w=l("text"),h=l("texttemplate"),o;if(h||(o=l("textinfo",Array.isArray(w)?"text+percent":"percent")),l("hovertext"),l("hovertemplate"),h||o&&o!=="none"){var d=l("textposition");L(t,r,n,l,d,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}i(r,n,l);var M=l("title.text");M&&(l("title.position"),m.coerceFont(l,"title.font",n.font)),l("aspectratio"),l("baseratio")}},10421:function(G,V,e){G.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(G,V,e){var m=e(92774).hiddenlabels;G.exports={hiddenlabels:m,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}},57402:function(G,V,e){var m=e(71828),P=e(80097);G.exports=function(L,A){function v(p,t){return m.coerce(L,A,P,p,t)}v("hiddenlabels"),v("funnelareacolorway",A.colorway),v("extendfunnelareacolors")}},79187:function(G,V,e){var m=e(39898),P=e(91424),i=e(71828),L=i.strScale,A=i.strTranslate,v=e(63893),p=e(17295),t=p.toMoveInsideBar,r=e(72597),s=r.recordMinTextSize,n=r.clearMinTextSize,l=e(53581),c=e(14575),u=c.attachFxHandlers,g=c.determineInsideTextFont,f=c.layoutAreas,w=c.prerenderTitles,h=c.positionTitleOutside,o=c.formatSliceLabel;G.exports=function(x,S){var b=x._context.staticPlot,a=x._fullLayout;n("funnelarea",a),w(S,x),f(S,a._size),i.makeTraceGroups(a._funnelarealayer,S,"trace").each(function(E){var y=m.select(this),z=E[0],I=z.trace;T(E),y.each(function(){var B=m.select(this).selectAll("g.slice").data(E);B.enter().append("g").classed("slice",!0),B.exit().remove(),B.each(function(O,N){if(O.hidden){m.select(this).selectAll("path,g").remove();return}O.pointNumber=O.i,O.curveNumber=I.index;var _=z.cx,U=z.cy,Y=m.select(this),J=Y.selectAll("path.surface").data([O]);J.enter().append("path").classed("surface",!0).style({"pointer-events":b?"none":"all"}),Y.call(u,x,E);var te="M"+(_+O.TR[0])+","+(U+O.TR[1])+d(O.TR,O.BR)+d(O.BR,O.BL)+d(O.BL,O.TL)+"Z";J.attr("d",te),o(x,O,z);var ae=l.castOption(I.textposition,O.pts),ce=Y.selectAll("g.slicetext").data(O.text&&ae!=="none"?[0]:[]);ce.enter().append("g").classed("slicetext",!0),ce.exit().remove(),ce.each(function(){var Q=i.ensureSingle(m.select(this),"text","",function(le){le.attr("data-notex",1)}),Z=i.ensureUniformFontSize(x,g(I,O,a.font));Q.text(O.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(P.font,Z).call(v.convertToTspans,x);var j=P.bBox(Q.node()),K,ee,oe,q=Math.min(O.BL[1],O.BR[1])+U,$=Math.max(O.TL[1],O.TR[1])+U;ee=Math.max(O.TL[0],O.BL[0])+_,oe=Math.min(O.TR[0],O.BR[0])+_,K=t(ee,oe,q,$,j,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),K.fontSize=Z.size,s(I.type,K,a),E[N].transform=K,i.setTransormAndDisplay(Q,K)})});var k=m.select(this).selectAll("g.titletext").data(I.title.text?[0]:[]);k.enter().append("g").classed("titletext",!0),k.exit().remove(),k.each(function(){var O=i.ensureSingle(m.select(this),"text","",function(U){U.attr("data-notex",1)}),N=I.title.text;I._meta&&(N=i.templateString(N,I._meta)),O.text(N).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(P.font,I.title.font).call(v.convertToTspans,x);var _=h(z,a._size);O.attr("transform",A(_.x,_.y)+L(Math.min(1,_.scale))+A(_.tx,_.ty))})})})};function d(C,x){var S=x[0]-C[0],b=x[1]-C[1];return"l"+S+","+b}function M(C,x){return[.5*(C[0]+x[0]),.5*(C[1]+x[1])]}function T(C){if(!C.length)return;var x=C[0],S=x.trace,b=S.aspectratio,a=S.baseratio;a>.999&&(a=.999);var E=Math.pow(a,2),y=x.vTotal,z=y*E/(1-E),I=y,B=z/y;function k(){var ie=Math.sqrt(B);return{x:ie,y:-ie}}function O(){var ie=k();return[ie.x,ie.y]}var N,_=[];_.push(O());var U,Y;for(U=C.length-1;U>-1;U--)if(Y=C[U],!Y.hidden){var J=Y.v/I;B+=J,_.push(O())}var te=1/0,ae=-1/0;for(U=0;U<_.length;U++)N=_[U],te=Math.min(te,N[1]),ae=Math.max(ae,N[1]);for(U=0;U<_.length;U++)_[U][1]-=(ae+te)/2;var ce=_[_.length-1][0],Q=x.r,Z=(ae-te)/2,j=Q/ce,K=Q/Z*b;for(x.r=K*Z,U=0;U<_.length;U++)_[U][0]*=j,_[U][1]*=K;N=_[0];var ee=[-N[0],N[1]],oe=[N[0],N[1]],q=0;for(U=C.length-1;U>-1;U--)if(Y=C[U],!Y.hidden){q+=1;var $=_[q][0],le=_[q][1];Y.TL=[-$,le],Y.TR=[$,le],Y.BL=ee,Y.BR=oe,Y.pxmid=M(Y.TR,Y.BR),ee=Y.TL,oe=Y.TR}}},71858:function(G,V,e){var m=e(39898),P=e(63463),i=e(72597).resizeText;G.exports=function(A){var v=A._fullLayout._funnelarealayer.selectAll(".trace");i(A,v,"funnelarea"),v.each(function(p){var t=p[0],r=t.trace,s=m.select(this);s.style({opacity:r.opacity}),s.selectAll("path.surface").each(function(n){m.select(this).call(P,n,r,A)})})}},21606:function(G,V,e){var m=e(82196),P=e(9012),i=e(41940),L=e(12663).axisHoverFormat,A=e(5386).fF,v=e(5386).si,p=e(50693),t=e(1426).extendFlat;G.exports=t({z:{valType:"data_array",editType:"calc"},x:t({},m.x,{impliedEdits:{xtype:"array"}}),x0:t({},m.x0,{impliedEdits:{xtype:"scaled"}}),dx:t({},m.dx,{impliedEdits:{xtype:"scaled"}}),y:t({},m.y,{impliedEdits:{ytype:"array"}}),y0:t({},m.y0,{impliedEdits:{ytype:"scaled"}}),dy:t({},m.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:t({},m.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:t({},m.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:t({},m.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:t({},m.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:t({},m.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:t({},m.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:L("x"),yhoverformat:L("y"),zhoverformat:L("z",1),hovertemplate:A(),texttemplate:v({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:i({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:t({},P.showlegend,{dflt:!1})},{transforms:void 0},p("",{cLetter:"z",autoColorDflt:!1}))},90757:function(G,V,e){var m=e(73972),P=e(71828),i=e(89298),L=e(42973),A=e(17562),v=e(78803),p=e(68296),t=e(4742),r=e(824),s=e(43907),n=e(70769),l=e(50606).BADNUM;G.exports=function(f,w){var h=i.getFromId(f,w.xaxis||"x"),o=i.getFromId(f,w.yaxis||"y"),d=m.traceIs(w,"contour"),M=m.traceIs(w,"histogram"),T=m.traceIs(w,"gl2d"),C=d?"best":w.zsmooth,x,S,b,a,E,y,z,I,B,k,O;if(h._minDtick=0,o._minDtick=0,M)O=A(f,w),a=O.orig_x,x=O.x,S=O.x0,b=O.dx,I=O.orig_y,E=O.y,y=O.y0,z=O.dy,B=O.z;else{var N=w.z;P.isArray1D(N)?(p(w,h,o,"x","y",["z"]),x=w._x,E=w._y,N=w._z):(a=w.x?h.makeCalcdata(w,"x"):[],I=w.y?o.makeCalcdata(w,"y"):[],x=L(w,h,"x",a).vals,E=L(w,o,"y",I).vals,w._x=x,w._y=E),S=w.x0,b=w.dx,y=w.y0,z=w.dy,B=t(N,w,h,o)}(h.rangebreaks||o.rangebreaks)&&(B=u(x,E,B),M||(x=c(x),E=c(E),w._x=x,w._y=E)),!M&&(d||w.connectgaps)&&(w._emptypoints=s(B),r(B,w._emptypoints));function _(j){C=w._input.zsmooth=w.zsmooth=!1,P.warn('cannot use zsmooth: "fast": '+j)}function U(j){if(j.length>1){var K=(j[j.length-1]-j[0])/(j.length-1),ee=Math.abs(K/100);for(k=0;kee)return!1}return!0}w._islinear=!1,h.type==="log"||o.type==="log"?C==="fast"&&_("log axis found"):U(x)?U(E)?w._islinear=!0:C==="fast"&&_("y scale is not linear"):C==="fast"&&_("x scale is not linear");var Y=P.maxRowLength(B),J=w.xtype==="scaled"?"":x,te=n(w,J,S,b,Y,h),ae=w.ytype==="scaled"?"":E,ce=n(w,ae,y,z,B.length,o);T||(w._extremes[h._id]=i.findExtremes(h,te),w._extremes[o._id]=i.findExtremes(o,ce));var Q={x:te,y:ce,z:B,text:w._text||w.text,hovertext:w._hovertext||w.hovertext};if(w.xperiodalignment&&a&&(Q.orig_x=a),w.yperiodalignment&&I&&(Q.orig_y=I),J&&J.length===te.length-1&&(Q.xCenter=J),ae&&ae.length===ce.length-1&&(Q.yCenter=ae),M&&(Q.xRanges=O.xRanges,Q.yRanges=O.yRanges,Q.pts=O.pts),d||v(f,w,{vals:B,cLetter:"z"}),d&&w.contours&&w.contours.coloring==="heatmap"){var Z={type:w.type==="contour"?"heatmap":"histogram2d",xcalendar:w.xcalendar,ycalendar:w.ycalendar};Q.xfill=n(Z,J,S,b,Y,h),Q.yfill=n(Z,ae,y,z,B.length,o)}return[Q]};function c(g){for(var f=[],w=g.length,h=0;h=0;g--)u=v[g],l=u[0],c=u[1],f=((A[[l-1,c]]||r)[2]+(A[[l+1,c]]||r)[2]+(A[[l,c-1]]||r)[2]+(A[[l,c+1]]||r)[2])/20,f&&(w[u]=[l,c,f],v.splice(g,1),h=!0);if(!h)throw"findEmpties iterated with no new neighbors";for(u in w)A[u]=w[u],L.push(w[u])}return L.sort(function(o,d){return d[2]-o[2]})}},46248:function(G,V,e){var m=e(30211),P=e(71828),i=e(89298),L=e(21081).extractOpts;G.exports=function(v,p,t,r,s){s||(s={});var n=s.isContour,l=v.cd[0],c=l.trace,u=v.xa,g=v.ya,f=l.x,w=l.y,h=l.z,o=l.xCenter,d=l.yCenter,M=l.zmask,T=c.zhoverformat,C=f,x=w,S,b,a,E;if(v.index!==!1){try{a=Math.round(v.index[1]),E=Math.round(v.index[0])}catch{P.error("Error hovering on heatmap, pointNumber must be [row,col], found:",v.index);return}if(a<0||a>=h[0].length||E<0||E>h.length)return}else{if(m.inbox(p-f[0],p-f[f.length-1],0)>0||m.inbox(t-w[0],t-w[w.length-1],0)>0)return;if(n){var y;for(C=[2*f[0]-f[1]],y=1;yP;s++)r=A(p,t,L(r));return r>P&&m.log("interp2d didn't converge quickly",r),p};function A(v,p,t){var r=0,s,n,l,c,u,g,f,w,h,o,d,M,T;for(c=0;cM&&(r=Math.max(r,Math.abs(v[n][l]-d)/(T-M))))}return r}},58623:function(G,V,e){var m=e(71828);G.exports=function(i,L){i("texttemplate");var A=m.extendFlat({},L.font,{color:"auto",size:"auto"});m.coerceFont(i,"textfont",A)}},70769:function(G,V,e){var m=e(73972),P=e(71828).isArrayOrTypedArray;G.exports=function(L,A,v,p,t,r){var s=[],n=m.traceIs(L,"contour"),l=m.traceIs(L,"histogram"),c=m.traceIs(L,"gl2d"),u,g,f,w=P(A)&&A.length>1;if(w&&!l&&r.type!=="category"){var h=A.length;if(h<=t){if(n||c)s=A.slice(0,t);else if(t===1)s=[A[0]-.5,A[0]+.5];else{for(s=[1.5*A[0]-.5*A[1]],f=1;f0;)ee=a.c2p(_[le]),le--;for(ee0;)$=E.c2p(U[le]),le--;$=a._length||ee<=0||q>=E._length||$<=0;if(Ne){var Ee=z.selectAll("image").data([]);Ee.exit().remove(),o(z);return}var xe,Se;me==="fast"?(xe=Q,Se=ce):(xe=Te,Se=Oe);var Ue=document.createElement("canvas");Ue.width=xe,Ue.height=Se;var He=Ue.getContext("2d"),Fe=n(B,{noNumericCheck:!0,returnArray:!0}),Ge,nt;me==="fast"?(Ge=Z?function(qr){return Q-1-qr}:v.identity,nt=j?function(qr){return ce-1-qr}:v.identity):(Ge=function(qr){return v.constrain(Math.round(a.c2p(_[qr])-K),0,Te)},nt=function(qr){return v.constrain(Math.round(E.c2p(U[qr])-q),0,Oe)});var qe=nt(0),$e=[qe,qe],et=Z?0:1,ct=j?0:1,dt=0,pt=0,At=0,Mt=0,Vt,Je,De,Ie,ze;function Pe(qr,vn){if(qr!==void 0){var fn=Fe(qr);return fn[0]=Math.round(fn[0]),fn[1]=Math.round(fn[1]),fn[2]=Math.round(fn[2]),dt+=vn,pt+=fn[0]*vn,At+=fn[1]*vn,Mt+=fn[2]*vn,fn}return[0,0,0,0]}function be(qr,vn,fn,Tn){var Pn=qr[fn.bin0];if(Pn===void 0)return Pe(void 0,1);var jn=qr[fn.bin1],qn=vn[fn.bin0],sa=vn[fn.bin1],ta=jn-Pn||0,ea=qn-Pn||0,Mr;return jn===void 0?sa===void 0?Mr=0:qn===void 0?Mr=2*(sa-Pn):Mr=(2*sa-qn-Pn)*2/3:sa===void 0?qn===void 0?Mr=0:Mr=(2*Pn-jn-qn)*2/3:qn===void 0?Mr=(2*sa-jn-Pn)*2/3:Mr=sa+Pn-jn-qn,Pe(Pn+fn.frac*ta+Tn.frac*(ea+fn.frac*Mr))}if(me!=="default"){var se=0,ye;try{ye=new Uint8Array(xe*Se*4)}catch{ye=new Array(xe*Se*4)}if(me==="smooth"){var Le=Y||_,Be=J||U,ot=new Array(Le.length),at=new Array(Be.length),wt=new Array(Te),It=Y?M:d,Bt=J?M:d,Gt,Lt,Kt;for(le=0;leEr||Er>E._length))for(ie=Ht;ie<$t;ie++){var Ye;if(Ct)Ye=I.x[ie];else if(Tt){if(ie===0||ie===Q-1)continue;Ye=I.x[ie]}else if(I.xCenter)Ye=I.xCenter[ie];else{if(ie+1===Q&&I.x[ie+1]===void 0)continue;Ye=(I.x[ie]+I.x[ie+1])/2}var We=Math.round(a.c2p(Ye));if(!(0>We||We>a._length)){var Dt=t({x:Ye,y:or},B,C._fullLayout);Dt.x=Ye,Dt.y=or;var Ft=I.z[le][ie];Ft===void 0?(Dt.z="",Dt.zLabel=""):(Dt.z=Ft,Dt.zLabel=A.tickText(xt,Ft,"hover").text);var Zt=I.text&&I.text[le]&&I.text[le][ie];(Zt===void 0||Zt===!1)&&(Zt=""),Dt.text=Zt;var nr=v.texttemplateString(ut,Dt,C._fullLayout._d3locale,Dt,B._meta||{});if(nr){var lr=nr.split("
"),rr=lr.length,zt=0;for(he=0;he0&&(t=!0);for(var l=0;lv){var p=v-L[P];return L[P]=v,p}}else return L[P]=v,v;return 0},max:function(P,i,L,A){var v=A[i];if(m(v))if(v=Number(v),m(L[P])){if(L[P]S&&SL){var E=b===P?1:6,y=b===P?"M12":"M1";return function(z,I){var B=w.c2d(z,P,h),k=B.indexOf("-",E);k>0&&(B=B.substr(0,k));var O=w.d2c(B,0,h);if(Op?c>L?c>P*1.1?P:c>i*1.1?i:L:c>A?A:c>v?v:p:Math.pow(10,Math.floor(Math.log(c)/Math.LN10))}function n(c,u,g,f,w,h){if(f&&c>L){var o=l(u,w,h),d=l(g,w,h),M=c===P?0:1;return o[M]!==d[M]}return Math.floor(g/c)-Math.floor(u/c)>.1}function l(c,u,g){var f=u.c2d(c,P,g).split("-");return f[0]===""&&(f.unshift(),f[0]="-"+f[0]),f}},72138:function(G,V,e){var m=e(92770),P=e(71828),i=e(73972),L=e(89298),A=e(75341),v=e(59575),p=e(36362),t=e(42174),r=e(40965);function s(g,f){var w=[],h=[],o=f.orientation==="h",d=L.getFromId(g,o?f.yaxis:f.xaxis),M=o?"y":"x",T={x:"y",y:"x"}[M],C=f[M+"calendar"],x=f.cumulative,S,b=n(g,f,d,M),a=b[0],E=b[1],y=typeof a.size=="string",z=[],I=y?z:a,B=[],k=[],O=[],N=0,_=f.histnorm,U=f.histfunc,Y=_.indexOf("density")!==-1,J,te,ae;x.enabled&&Y&&(_=_.replace(/ ?density$/,""),Y=!1);var ce=U==="max"||U==="min",Q=ce?null:0,Z=v.count,j=p[_],K=!1,ee=function(He){return d.r2c(He,0,C)},oe;for(P.isArrayOrTypedArray(f[T])&&U!=="count"&&(oe=f[T],K=U==="avg",Z=v[U]),S=ee(a.start),te=ee(a.end)+(S-L.tickIncrement(S,a.size,!1,C))/1e6;S=0&&ae=xe;S--)if(h[S]){Se=S;break}for(S=xe;S<=Se;S++)if(m(w[S])&&m(h[S])){var Ue={p:w[S],s:h[S],b:0};x.enabled||(Ue.pts=O[S],ie?Ue.ph0=Ue.ph1=O[S].length?E[O[S][0]]:w[S]:(f._computePh=!0,Ue.ph0=Oe(z[S]),Ue.ph1=Oe(z[S+1],!0))),Ee.push(Ue)}return Ee.length===1&&(Ee[0].width1=L.tickIncrement(Ee[0].p,a.size,!1,C)-Ee[0].p),A(Ee,f),P.isArrayOrTypedArray(f.selectedpoints)&&P.tagSelected(Ee,f,Me),Ee}function n(g,f,w,h,o){var d=h+"bins",M=g._fullLayout,T=f["_"+h+"bingroup"],C=M._histogramBinOpts[T],x=M.barmode==="overlay",S,b,a,E,y,z,I,B=function(Te){return w.r2c(Te,0,E)},k=function(Te){return w.c2r(Te,0,E)},O=w.type==="date"?function(Te){return Te||Te===0?P.cleanDate(Te,null,E):null}:function(Te){return m(Te)?Number(Te):null};function N(Te,Oe,Ne){Oe[Te+"Found"]?(Oe[Te]=O(Oe[Te]),Oe[Te]===null&&(Oe[Te]=Ne[Te])):(z[Te]=Oe[Te]=Ne[Te],P.nestedProperty(b[0],d+"."+Te).set(Ne[Te]))}if(f["_"+h+"autoBinFinished"])delete f["_"+h+"autoBinFinished"];else{b=C.traces;var _=[],U=!0,Y=!1,J=!1;for(S=0;S"u"){if(o)return[ae,y,!0];ae=l(g,f,w,h,d)}I=a.cumulative||{},I.enabled&&I.currentbin!=="include"&&(I.direction==="decreasing"?ae.start=k(L.tickIncrement(B(ae.start),ae.size,!0,E)):ae.end=k(L.tickIncrement(B(ae.end),ae.size,!1,E))),C.size=ae.size,C.sizeFound||(z.size=ae.size,P.nestedProperty(b[0],d+".size").set(ae.size)),N("start",C,ae),N("end",C,ae)}y=f["_"+h+"pos0"],delete f["_"+h+"pos0"];var Q=f._input[d]||{},Z=P.extendFlat({},C),j=C.start,K=w.r2l(Q.start),ee=K!==void 0;if((C.startFound||ee)&&K!==w.r2l(j)){var oe=ee?K:P.aggNums(Math.min,null,y),q={type:w.type==="category"||w.type==="multicategory"?"linear":w.type,r2l:w.r2l,dtick:C.size,tick0:j,calendar:E,range:[oe,L.tickIncrement(oe,C.size,!1,E)].map(w.l2r)},$=L.tickFirst(q);$>w.r2l(oe)&&($=L.tickIncrement($,C.size,!0,E)),Z.start=w.l2r($),ee||P.nestedProperty(f,d+".start").set(Z.start)}var le=C.end,ie=w.r2l(Q.end),he=ie!==void 0;if((C.endFound||he)&&ie!==w.r2l(le)){var me=he?ie:P.aggNums(Math.max,null,y);Z.end=w.l2r(me),he||P.nestedProperty(f,d+".start").set(Z.end)}var Me="autobin"+h;return f._input[Me]===!1&&(f._input[d]=P.extendFlat({},f[d]||{}),delete f._input[Me],delete f[Me]),[Z,y]}function l(g,f,w,h,o){var d=g._fullLayout,M=c(g,f),T=!1,C=1/0,x=[f],S,b,a;for(S=0;S=0;h--)T(h);else if(f==="increasing"){for(h=1;h=0;h--)g[h]+=g[h+1];w==="exclude"&&(g.push(0),g.shift())}}G.exports={calc:s,calcAllAutoBins:n}},72406:function(G){G.exports={eventDataKeys:["binNumber"]}},82222:function(G,V,e){var m=e(71828),P=e(41675),i=e(73972).traceIs,L=e(26125),A=m.nestedProperty,v=e(99082).getAxisGroup,p=[{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"];G.exports=function(s,n){var l=n._histogramBinOpts={},c=[],u={},g=[],f,w,h,o,d,M,T;function C(J,te){return m.coerce(f._input,f,f._module.attributes,J,te)}function x(J){return J.orientation==="v"?"x":"y"}function S(J,te){var ae=P.getFromTrace({_fullLayout:n},J,te);return ae.type}function b(J,te,ae){var ce=J.uid+"__"+ae;te||(te=ce);var Q=S(J,ae),Z=J[ae+"calendar"]||"",j=l[te],K=!0;j&&(Q===j.axType&&Z===j.calendar?(K=!1,j.traces.push(J),j.dirs.push(ae)):(te=ce,Q!==j.axType&&m.warn(["Attempted to group the bins of trace",J.index,"set on a","type:"+Q,"axis","with bins on","type:"+j.axType,"axis."].join(" ")),Z!==j.calendar&&m.warn(["Attempted to group the bins of trace",J.index,"set with a",Z,"calendar","with bins",j.calendar?"on a "+j.calendar+" calendar":"w/o a set calendar"].join(" ")))),K&&(l[te]={traces:[J],dirs:[ae],axType:Q,calendar:J[ae+"calendar"]||""}),J["_"+ae+"bingroup"]=te}for(d=0;dB&&E.splice(B,E.length-B),I.length>B&&I.splice(B,I.length-B);var k=[],O=[],N=[],_=typeof a.size=="string",U=typeof z.size=="string",Y=[],J=[],te=_?Y:a,ae=U?J:z,ce=0,Q=[],Z=[],j=c.histnorm,K=c.histfunc,ee=j.indexOf("density")!==-1,oe=K==="max"||K==="min",q=oe?null:0,$=i.count,le=L[j],ie=!1,he=[],me=[],Me="z"in c?c.z:"marker"in c&&Array.isArray(c.marker.color)?c.marker.color:"";Me&&K!=="count"&&(ie=K==="avg",$=i[K]);var Te=a.size,Oe=h(a.start),Ne=h(a.end)+(Oe-P.tickIncrement(Oe,Te,!1,f))/1e6;for(T=Oe;T=0&&x=0&&S-1,flipY:O.tiling.flip.indexOf("y")>-1,orientation:O.tiling.orientation,pad:{inner:O.tiling.pad},maxDepth:O._maxDepth}),J=Y.descendants(),te=1/0,ae=-1/0;J.forEach(function(K){var ee=K.depth;ee>=O._maxDepth?(K.x0=K.x1=(K.x0+K.x1)/2,K.y0=K.y1=(K.y0+K.y1)/2):(te=Math.min(te,ee),ae=Math.max(ae,ee))}),f=f.data(J,t.getPtId),O._maxVisibleLayers=isFinite(ae)?ae-te+1:0,f.enter().append("g").classed("slice",!0),b(f,n,z,[h,o],T),f.order();var ce=null;if(S&&y){var Q=t.getPtId(y);f.each(function(K){ce===null&&t.getPtId(K)===Q&&(ce={x0:K.x0,x1:K.x1,y0:K.y0,y1:K.y1})})}var Z=function(){return ce||{x0:0,x1:h,y0:0,y1:o}},j=f;return S&&(j=j.transition().each("end",function(){var K=m.select(this);t.setSliceCursor(K,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),j.each(function(K){K._x0=d(K.x0),K._x1=d(K.x1),K._y0=M(K.y0),K._y1=M(K.y1),K._hoverX=d(K.x1-O.tiling.pad),K._hoverY=M(U?K.y1-O.tiling.pad/2:K.y0+O.tiling.pad/2);var ee=m.select(this),oe=P.ensureSingle(ee,"path","surface",function(ie){ie.style("pointer-events",I?"none":"all")});S?oe.transition().attrTween("d",function(ie){var he=a(ie,n,Z(),[h,o],{orientation:O.tiling.orientation,flipX:O.tiling.flip.indexOf("x")>-1,flipY:O.tiling.flip.indexOf("y")>-1});return function(me){return T(he(me))}}):oe.attr("d",T),ee.call(r,g,c,u,{styleOne:v,eventDataKeys:p.eventDataKeys,transitionTime:p.CLICK_TRANSITION_TIME,transitionEasing:p.CLICK_TRANSITION_EASING}).call(t.setSliceCursor,c,{isTransitioning:c._transitioning}),oe.call(v,K,O,c,{hovered:!1}),K.x0===K.x1||K.y0===K.y1?K._text="":K._text=s(K,g,O,u,B)||"";var q=P.ensureSingle(ee,"g","slicetext"),$=P.ensureSingle(q,"text","",function(ie){ie.attr("data-notex",1)}),le=P.ensureUniformFontSize(c,t.determineTextFont(O,K,B.font));$.text(K._text||" ").classed("slicetext",!0).attr("text-anchor",_?"end":N?"start":"middle").call(i.font,le).call(L.convertToTspans,c),K.textBB=i.bBox($.node()),K.transform=C(K,{fontSize:le.size}),K.transform.fontSize=le.size,S?$.transition().attrTween("transform",function(ie){var he=E(ie,n,Z(),[h,o]);return function(me){return x(he(me))}}):$.attr("transform",x(K))}),ce}},69816:function(G,V,e){G.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(G){G.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},21070:function(G,V,e){var m=e(71828),P=e(92894);G.exports=function(L,A){function v(p,t){return m.coerce(L,A,P,p,t)}v("iciclecolorway",A.colorway),v("extendiciclecolors")}},21538:function(G,V,e){var m=e(674),P=e(14102);G.exports=function(L,A,v){var p=v.flipX,t=v.flipY,r=v.orientation==="h",s=v.maxDepth,n=A[0],l=A[1];s&&(n=(L.height+1)*A[0]/Math.min(L.height+1,s),l=(L.height+1)*A[1]/Math.min(L.height+1,s));var c=m.partition().padding(v.pad.inner).size(r?[A[1],n]:[A[0],l])(L);return(r||p||t)&&P(c,A,{swapXY:r,flipX:p,flipY:t}),c}},85596:function(G,V,e){var m=e(80694),P=e(90666);G.exports=function(L,A,v,p){return m(L,A,v,p,{type:"icicle",drawDescendants:P})}},82454:function(G,V,e){var m=e(39898),P=e(7901),i=e(71828),L=e(72597).resizeText,A=e(43467);function v(t){var r=t._fullLayout._iciclelayer.selectAll(".trace");L(t,r,"icicle"),r.each(function(s){var n=m.select(this),l=s[0],c=l.trace;n.style("opacity",c.opacity),n.selectAll("path.surface").each(function(u){m.select(this).call(p,u,c,t)})})}function p(t,r,s,n){var l=r.data.data,c=!r.children,u=l.i,g=i.castOption(s,u,"marker.line.color")||P.defaultLine,f=i.castOption(s,u,"marker.line.width")||0;t.call(A,r,s,n).style("stroke-width",f).call(P.stroke,g).style("opacity",c?s.leaf.opacity:null)}G.exports={style:v,styleOne:p}},17230:function(G,V,e){for(var m=e(9012),P=e(5386).fF,i=e(1426).extendFlat,L=e(51877).colormodel,A=["rgb","rgba","rgba256","hsl","hsla"],v=[],p=[],t=0;t0||m.inbox(p-t.y0,p-(t.y0+t.h*r.dy),0)>0)){var l=Math.floor((v-t.x0)/r.dx),c=Math.floor(Math.abs(p-t.y0)/r.dy),u;if(r._hasZ?u=t.z[c][l]:r._hasSource&&(u=r._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(l,c,1,1).data),!!u){var g=t.hi||r.hoverinfo,f;if(g){var w=g.split("+");w.indexOf("all")!==-1&&(w=["color"]),w.indexOf("color")!==-1&&(f=!0)}var h=i.colormodel[r.colormodel],o=h.colormodel||r.colormodel,d=o.length,M=r._scaler(u),T=h.suffix,C=[];(r.hovertemplate||f)&&(C.push("["+[M[0]+T[0],M[1]+T[1],M[2]+T[2]].join(", ")),d===4&&C.push(", "+M[3]+T[3]),C.push("]"),C=C.join(""),A.extraText=o.toUpperCase()+": "+C);var x;Array.isArray(r.hovertext)&&Array.isArray(r.hovertext[c])?x=r.hovertext[c][l]:Array.isArray(r.text)&&Array.isArray(r.text[c])&&(x=r.text[c][l]);var S=n.c2p(t.y0+(c+.5)*r.dy),b=t.x0+(l+.5)*r.dx,a=t.y0+(c+.5)*r.dy,E="["+u.slice(0,r.colormodel.length).join(", ")+"]";return[P.extendFlat(A,{index:[c,l],x0:s.c2p(t.x0+l*r.dx),x1:s.c2p(t.x0+(l+1)*r.dx),y0:S,y1:S,color:M,xVal:b,xLabelVal:b,yVal:a,yLabelVal:a,zLabelVal:E,text:x,hovertemplateLabels:{zLabel:E,colorLabel:C,"color[0]Label":M[0]+T[0],"color[1]Label":M[1]+T[1],"color[2]Label":M[2]+T[2],"color[3]Label":M[3]+T[3]}})]}}}},94507:function(G,V,e){G.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(G,V,e){var m=e(39898),P=e(71828),i=P.strTranslate,L=e(77922),A=e(51877),v=e(3883),p=e(32396).STYLE;G.exports=function(r,s,n,l){var c=s.xaxis,u=s.yaxis,g=!r._context._exportedPlot&&v();P.makeTraceGroups(l,n,"im").each(function(f){var w=m.select(this),h=f[0],o=h.trace,d=(o.zsmooth==="fast"||o.zsmooth===!1&&g)&&!o._hasZ&&o._hasSource&&c.type==="linear"&&u.type==="linear";o._realImage=d;var M=h.z,T=h.x0,C=h.y0,x=h.w,S=h.h,b=o.dx,a=o.dy,E,y,z,I,B,k;for(k=0;E===void 0&&k0;)y=c.c2p(T+k*b),k--;for(k=0;I===void 0&&k0;)B=u.c2p(C+k*a),k--;if(yQ[0];if(Z||j){var K=E+N/2,ee=I+_/2;ae+="transform:"+i(K+"px",ee+"px")+"scale("+(Z?-1:1)+","+(j?-1:1)+")"+i(-K+"px",-ee+"px")+";"}}te.attr("style",ae);var oe=new Promise(function(q){if(o._hasZ)q();else if(o._hasSource)if(o._canvas&&o._canvas.el.width===x&&o._canvas.el.height===S&&o._canvas.source===o.source)q();else{var $=document.createElement("canvas");$.width=x,$.height=S;var le=$.getContext("2d",{willReadFrequently:!0});o._image=o._image||new Image;var ie=o._image;ie.onload=function(){le.drawImage(ie,0,0),o._canvas={el:$,source:o.source},q()},ie.setAttribute("src",o.source)}}).then(function(){var q,$;if(o._hasZ)$=J(function(he,me){return M[me][he]}),q=$.toDataURL("image/png");else if(o._hasSource)if(d)q=o.source;else{var le=o._canvas.el.getContext("2d",{willReadFrequently:!0}),ie=le.getImageData(0,0,x,S).data;$=J(function(he,me){var Me=4*(me*x+he);return[ie[Me],ie[Me+1],ie[Me+2],ie[Me+3]]}),q=$.toDataURL("image/png")}te.attr({"xlink:href":q,height:_,width:N,x:E,y:I})});r._promises.push(oe)})}},12826:function(G,V,e){var m=e(39898);G.exports=function(i){m.select(i).selectAll(".im image").style("opacity",function(L){return L[0].trace.opacity})}},54846:function(G,V,e){var m=e(1426).extendFlat,P=e(1426).extendDeep,i=e(30962).overrideAll,L=e(41940),A=e(22399),v=e(27670).Y,p=e(13838),t=e(44467).templatedArray,r=e(22372),s=e(12663).descriptionOnlyNumbers,n=L({editType:"plot",colorEditType:"plot"}),l={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:A.defaultLine,editType:"plot"},width:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},thickness:{valType:"number",min:0,max:1,dflt:1,editType:"plot"},editType:"calc"},c={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},u=t("step",P({},l,{range:c}));G.exports={mode:{valType:"flaglist",editType:"calc",flags:["number","delta","gauge"],dflt:"number"},value:{valType:"number",editType:"calc",anim:!0},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},domain:v({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:m({},n,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:s("value")},font:m({},n,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"plot"},delta:{reference:{valType:"number",editType:"calc"},position:{valType:"enumerated",values:["top","bottom","left","right"],dflt:"bottom",editType:"plot"},relative:{valType:"boolean",editType:"plot",dflt:!1},valueformat:{valType:"string",editType:"plot",description:s("value")},increasing:{symbol:{valType:"string",dflt:r.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:r.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:r.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:r.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:m({},n,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"calc"},gauge:{shape:{valType:"enumerated",editType:"plot",dflt:"angular",values:["angular","bullet"]},bar:P({},l,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:A.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:i({range:c,visible:m({},p.visible,{dflt:!0}),tickmode:p.minor.tickmode,nticks:p.nticks,tick0:p.tick0,dtick:p.dtick,tickvals:p.tickvals,ticktext:p.ticktext,ticks:m({},p.ticks,{dflt:"outside"}),ticklen:p.ticklen,tickwidth:p.tickwidth,tickcolor:p.tickcolor,ticklabelstep:p.ticklabelstep,showticklabels:p.showticklabels,labelalias:p.labelalias,tickfont:L({}),tickangle:p.tickangle,tickformat:p.tickformat,tickformatstops:p.tickformatstops,tickprefix:p.tickprefix,showtickprefix:p.showtickprefix,ticksuffix:p.ticksuffix,showticksuffix:p.showticksuffix,separatethousands:p.separatethousands,exponentformat:p.exponentformat,minexponent:p.minexponent,showexponent:p.showexponent,editType:"plot"},"plot"),steps:u,threshold:{line:{color:m({},l.line.color,{}),width:m({},l.line.width,{dflt:1}),editType:"plot"},thickness:m({},l.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}},15970:function(G,V,e){var m=e(74875);V.name="indicator",V.plot=function(P,i,L,A){m.plotBasePlot(V.name,P,i,L,A)},V.clean=function(P,i,L,A){m.cleanBasePlot(V.name,P,i,L,A)}},24667:function(G){function V(e,m){var P=[],i=m.value;typeof m._lastValue!="number"&&(m._lastValue=m.value);var L=m._lastValue,A=L;return m._hasDelta&&typeof m.delta.reference=="number"&&(A=m.delta.reference),P[0]={y:i,lastY:L,delta:i-A,relativeDelta:(i-A)/A},P}G.exports={calc:V}},84577:function(G){G.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}},94425:function(G,V,e){var m=e(71828),P=e(54846),i=e(27670).c,L=e(44467),A=e(85501),v=e(84577),p=e(26218),t=e(38701),r=e(96115),s=e(89426);function n(c,u,g,f){function w(B,k){return m.coerce(c,u,P,B,k)}i(u,f,w),w("mode"),u._hasNumber=u.mode.indexOf("number")!==-1,u._hasDelta=u.mode.indexOf("delta")!==-1,u._hasGauge=u.mode.indexOf("gauge")!==-1;var h=w("value");u._range=[0,typeof h=="number"?1.5*h:1];var o=new Array(2),d;u._hasNumber&&(w("number.valueformat"),w("number.font.color",f.font.color),w("number.font.family",f.font.family),w("number.font.size"),u.number.font.size===void 0&&(u.number.font.size=v.defaultNumberFontSize,o[0]=!0),w("number.prefix"),w("number.suffix"),d=u.number.font.size);var M;u._hasDelta&&(w("delta.font.color",f.font.color),w("delta.font.family",f.font.family),w("delta.font.size"),u.delta.font.size===void 0&&(u.delta.font.size=(u._hasNumber?.5:1)*(d||v.defaultNumberFontSize),o[1]=!0),w("delta.reference",u.value),w("delta.relative"),w("delta.valueformat",u.delta.relative?"2%":""),w("delta.increasing.symbol"),w("delta.increasing.color"),w("delta.decreasing.symbol"),w("delta.decreasing.color"),w("delta.position"),w("delta.prefix"),w("delta.suffix"),M=u.delta.font.size),u._scaleNumbers=(!u._hasNumber||o[0])&&(!u._hasDelta||o[1])||!1,w("title.font.color",f.font.color),w("title.font.family",f.font.family),w("title.font.size",.25*(d||M||v.defaultNumberFontSize)),w("title.text");var T,C,x,S;function b(B,k){return m.coerce(T,C,P.gauge,B,k)}function a(B,k){return m.coerce(x,S,P.gauge.axis,B,k)}if(u._hasGauge){T=c.gauge,T||(T={}),C=L.newContainer(u,"gauge"),b("shape");var E=u._isBullet=u.gauge.shape==="bullet";E||w("title.align","center");var y=u._isAngular=u.gauge.shape==="angular";y||w("align","center"),b("bgcolor",f.paper_bgcolor),b("borderwidth"),b("bordercolor"),b("bar.color"),b("bar.line.color"),b("bar.line.width");var z=v.valueThickness*(u.gauge.shape==="bullet"?.5:1);b("bar.thickness",z),A(T,C,{name:"steps",handleItemDefaults:l}),b("threshold.value"),b("threshold.thickness"),b("threshold.line.width"),b("threshold.line.color"),x={},T&&(x=T.axis||{}),S=L.newContainer(C,"axis"),a("visible"),u._range=a("range",u._range);var I={outerTicks:!0};p(x,S,a,"linear"),s(x,S,a,"linear",I),r(x,S,a,"linear",I),t(x,S,a,I)}else w("title.align","center"),w("align","center"),u._isAngular=u._isBullet=!1;u._length=null}function l(c,u){function g(f,w){return m.coerce(c,u,P.gauge.steps,f,w)}g("color"),g("line.color"),g("line.width"),g("range"),g("thickness")}G.exports={supplyDefaults:n}},15154:function(G,V,e){G.exports={moduleType:"trace",name:"indicator",basePlotModule:e(15970),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:e(54846),supplyDefaults:e(94425).supplyDefaults,calc:e(24667).calc,plot:e(75634),meta:{}}},75634:function(G,V,e){var m=e(39898),P=e(81684).sX,i=e(81684).k4,L=e(71828),A=L.strScale,v=L.strTranslate,p=L.rad2deg,t=e(18783).MID_SHIFT,r=e(91424),s=e(84577),n=e(63893),l=e(89298),c=e(71453),u=e(52830),g=e(13838),f=e(7901),w={left:"start",center:"middle",right:"end"},h={left:0,center:.5,right:1},o=/[yzafpnµmkMGTPEZY]/;function d(I){return I&&I.duration>0}G.exports=function(B,k,O,N){var _=B._fullLayout,U;d(O)&&N&&(U=N()),L.makeTraceGroups(_._indicatorlayer,k,"trace").each(function(Y){var J=Y[0],te=J.trace,ae=m.select(this),ce=te._hasGauge,Q=te._isAngular,Z=te._isBullet,j=te.domain,K={w:_._size.w*(j.x[1]-j.x[0]),h:_._size.h*(j.y[1]-j.y[0]),l:_._size.l+_._size.w*j.x[0],r:_._size.r+_._size.w*(1-j.x[1]),t:_._size.t+_._size.h*(1-j.y[1]),b:_._size.b+_._size.h*j.y[0]},ee=K.l+K.w/2,oe=K.t+K.h/2,q=Math.min(K.w/2,K.h),$=s.innerRadius*q,le,ie,he,me=te.align||"center";if(ie=oe,!ce)le=K.l+h[me]*K.w,he=function(Fe){return a(Fe,K.w,K.h)};else if(Q&&(le=ee,ie=oe+q/2,he=function(Fe){return E(Fe,.9*$)}),Z){var Me=s.bulletPadding,Te=1-s.bulletNumberDomainSize+Me;le=K.l+(Te+(1-Te)*h[me])*K.w,he=function(Fe){return a(Fe,(s.bulletNumberDomainSize-Me)*K.w,K.h)}}C(B,ae,Y,{numbersX:le,numbersY:ie,numbersScaler:he,transitionOpts:O,onComplete:U});var Oe,Ne;ce&&(Oe={range:te.gauge.axis.range,color:te.gauge.bgcolor,line:{color:te.gauge.bordercolor,width:0},thickness:1},Ne={range:te.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:te.gauge.bordercolor,width:te.gauge.borderwidth},thickness:1});var Ee=ae.selectAll("g.angular").data(Q?Y:[]);Ee.exit().remove();var xe=ae.selectAll("g.angularaxis").data(Q?Y:[]);xe.exit().remove(),Q&&T(B,ae,Y,{radius:q,innerRadius:$,gauge:Ee,layer:xe,size:K,gaugeBg:Oe,gaugeOutline:Ne,transitionOpts:O,onComplete:U});var Se=ae.selectAll("g.bullet").data(Z?Y:[]);Se.exit().remove();var Ue=ae.selectAll("g.bulletaxis").data(Z?Y:[]);Ue.exit().remove(),Z&&M(B,ae,Y,{gauge:Se,layer:Ue,size:K,gaugeBg:Oe,gaugeOutline:Ne,transitionOpts:O,onComplete:U});var He=ae.selectAll("text.title").data(Y);He.exit().remove(),He.enter().append("text").classed("title",!0),He.attr("text-anchor",function(){return Z?w.right:w[te.title.align]}).text(te.title.text).call(r.font,te.title.font).call(n.convertToTspans,B),He.attr("transform",function(){var Fe=K.l+K.w*h[te.title.align],Ge,nt=s.titlePadding,qe=r.bBox(He.node());if(ce){if(Q)if(te.gauge.axis.visible){var $e=r.bBox(xe.node());Ge=$e.top-nt-qe.bottom}else Ge=K.t+K.h/2-q/2-qe.bottom-nt;Z&&(Ge=ie-(qe.top+qe.bottom)/2,Fe=K.l-s.bulletPadding*K.w)}else Ge=te._numbersTop-nt-qe.bottom;return v(Fe,Ge)})})};function M(I,B,k,O){var N=k[0].trace,_=O.gauge,U=O.layer,Y=O.gaugeBg,J=O.gaugeOutline,te=O.size,ae=N.domain,ce=O.transitionOpts,Q=O.onComplete,Z,j,K,ee,oe;_.enter().append("g").classed("bullet",!0),_.attr("transform",v(te.l,te.t)),U.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),U.selectAll("g.xbulletaxistick,path,text").remove();var q=te.h,$=N.gauge.bar.thickness*q,le=ae.x[0],ie=ae.x[0]+(ae.x[1]-ae.x[0])*(N._hasNumber||N._hasDelta?1-s.bulletNumberDomainSize:1);Z=b(I,N.gauge.axis),Z._id="xbulletaxis",Z.domain=[le,ie],Z.setScale(),j=l.calcTicks(Z),K=l.makeTransTickFn(Z),ee=l.getTickSigns(Z)[2],oe=te.t+te.h,Z.visible&&(l.drawTicks(I,Z,{vals:Z.ticks==="inside"?l.clipEnds(Z,j):j,layer:U,path:l.makeTickPath(Z,oe,ee),transFn:K}),l.drawLabels(I,Z,{vals:j,layer:U,transFn:K,labelFns:l.makeLabelFns(Z,oe)}));function he(xe){xe.attr("width",function(Se){return Math.max(0,Z.c2p(Se.range[1])-Z.c2p(Se.range[0]))}).attr("x",function(Se){return Z.c2p(Se.range[0])}).attr("y",function(Se){return .5*(1-Se.thickness)*q}).attr("height",function(Se){return Se.thickness*q})}var me=[Y].concat(N.gauge.steps),Me=_.selectAll("g.bg-bullet").data(me);Me.enter().append("g").classed("bg-bullet",!0).append("rect"),Me.select("rect").call(he).call(x),Me.exit().remove();var Te=_.selectAll("g.value-bullet").data([N.gauge.bar]);Te.enter().append("g").classed("value-bullet",!0).append("rect"),Te.select("rect").attr("height",$).attr("y",(q-$)/2).call(x),d(ce)?Te.select("rect").transition().duration(ce.duration).ease(ce.easing).each("end",function(){Q&&Q()}).each("interrupt",function(){Q&&Q()}).attr("width",Math.max(0,Z.c2p(Math.min(N.gauge.axis.range[1],k[0].y)))):Te.select("rect").attr("width",typeof k[0].y=="number"?Math.max(0,Z.c2p(Math.min(N.gauge.axis.range[1],k[0].y))):0),Te.exit().remove();var Oe=k.filter(function(){return N.gauge.threshold.value||N.gauge.threshold.value===0}),Ne=_.selectAll("g.threshold-bullet").data(Oe);Ne.enter().append("g").classed("threshold-bullet",!0).append("line"),Ne.select("line").attr("x1",Z.c2p(N.gauge.threshold.value)).attr("x2",Z.c2p(N.gauge.threshold.value)).attr("y1",(1-N.gauge.threshold.thickness)/2*q).attr("y2",(1-(1-N.gauge.threshold.thickness)/2)*q).call(f.stroke,N.gauge.threshold.line.color).style("stroke-width",N.gauge.threshold.line.width),Ne.exit().remove();var Ee=_.selectAll("g.gauge-outline").data([J]);Ee.enter().append("g").classed("gauge-outline",!0).append("rect"),Ee.select("rect").call(he).call(x),Ee.exit().remove()}function T(I,B,k,O){var N=k[0].trace,_=O.size,U=O.radius,Y=O.innerRadius,J=O.gaugeBg,te=O.gaugeOutline,ae=[_.l+_.w/2,_.t+_.h/2+U/2],ce=O.gauge,Q=O.layer,Z=O.transitionOpts,j=O.onComplete,K=Math.PI/2;function ee(et){var ct=N.gauge.axis.range[0],dt=N.gauge.axis.range[1],pt=(et-ct)/(dt-ct)*Math.PI-K;return pt<-K?-K:pt>K?K:pt}function oe(et){return m.svg.arc().innerRadius((Y+U)/2-et/2*(U-Y)).outerRadius((Y+U)/2+et/2*(U-Y)).startAngle(-K)}function q(et){et.attr("d",function(ct){return oe(ct.thickness).startAngle(ee(ct.range[0])).endAngle(ee(ct.range[1]))()})}var $,le,ie,he;ce.enter().append("g").classed("angular",!0),ce.attr("transform",v(ae[0],ae[1])),Q.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),Q.selectAll("g.xangularaxistick,path,text").remove(),$=b(I,N.gauge.axis),$.type="linear",$.range=N.gauge.axis.range,$._id="xangularaxis",$.ticklabeloverflow="allow",$.setScale();var me=function(et){return($.range[0]-et.x)/($.range[1]-$.range[0])*Math.PI+Math.PI},Me={},Te=l.makeLabelFns($,0),Oe=Te.labelStandoff;Me.xFn=function(et){var ct=me(et);return Math.cos(ct)*Oe},Me.yFn=function(et){var ct=me(et),dt=Math.sin(ct)>0?.2:1;return-Math.sin(ct)*(Oe+et.fontSize*dt)+Math.abs(Math.cos(ct))*(et.fontSize*t)},Me.anchorFn=function(et){var ct=me(et),dt=Math.cos(ct);return Math.abs(dt)<.1?"middle":dt>0?"start":"end"},Me.heightFn=function(et,ct,dt){var pt=me(et);return-.5*(1+Math.sin(pt))*dt};var Ne=function(et){return v(ae[0]+U*Math.cos(et),ae[1]-U*Math.sin(et))};ie=function(et){return Ne(me(et))};var Ee=function(et){var ct=me(et);return Ne(ct)+"rotate("+-p(ct)+")"};if(le=l.calcTicks($),he=l.getTickSigns($)[2],$.visible){he=$.ticks==="inside"?-1:1;var xe=($.linewidth||1)/2;l.drawTicks(I,$,{vals:le,layer:Q,path:"M"+he*xe+",0h"+he*$.ticklen,transFn:Ee}),l.drawLabels(I,$,{vals:le,layer:Q,transFn:ie,labelFns:Me})}var Se=[J].concat(N.gauge.steps),Ue=ce.selectAll("g.bg-arc").data(Se);Ue.enter().append("g").classed("bg-arc",!0).append("path"),Ue.select("path").call(q).call(x),Ue.exit().remove();var He=oe(N.gauge.bar.thickness),Fe=ce.selectAll("g.value-arc").data([N.gauge.bar]);Fe.enter().append("g").classed("value-arc",!0).append("path");var Ge=Fe.select("path");d(Z)?(Ge.transition().duration(Z.duration).ease(Z.easing).each("end",function(){j&&j()}).each("interrupt",function(){j&&j()}).attrTween("d",S(He,ee(k[0].lastY),ee(k[0].y))),N._lastValue=k[0].y):Ge.attr("d",typeof k[0].y=="number"?He.endAngle(ee(k[0].y)):"M0,0Z"),Ge.call(x),Fe.exit().remove(),Se=[];var nt=N.gauge.threshold.value;(nt||nt===0)&&Se.push({range:[nt,nt],color:N.gauge.threshold.color,line:{color:N.gauge.threshold.line.color,width:N.gauge.threshold.line.width},thickness:N.gauge.threshold.thickness});var qe=ce.selectAll("g.threshold-arc").data(Se);qe.enter().append("g").classed("threshold-arc",!0).append("path"),qe.select("path").call(q).call(x),qe.exit().remove();var $e=ce.selectAll("g.gauge-outline").data([te]);$e.enter().append("g").classed("gauge-outline",!0).append("path"),$e.select("path").call(q).call(x),$e.exit().remove()}function C(I,B,k,O){var N=k[0].trace,_=O.numbersX,U=O.numbersY,Y=N.align||"center",J=w[Y],te=O.transitionOpts,ae=O.onComplete,ce=L.ensureSingle(B,"g","numbers"),Q,Z,j,K=[];N._hasNumber&&K.push("number"),N._hasDelta&&(K.push("delta"),N.delta.position==="left"&&K.reverse());var ee=ce.selectAll("text").data(K);ee.enter().append("text"),ee.attr("text-anchor",function(){return J}).attr("class",function(Ne){return Ne}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),ee.exit().remove();function oe(Ne,Ee,xe,Se){if(Ne.match("s")&&xe>=0!=Se>=0&&!Ee(xe).slice(-1).match(o)&&!Ee(Se).slice(-1).match(o)){var Ue=Ne.slice().replace("s","f").replace(/\d+/,function(Fe){return parseInt(Fe)-1}),He=b(I,{tickformat:Ue});return function(Fe){return Math.abs(Fe)<1?l.tickText(He,Fe).text:Ee(Fe)}}else return Ee}function q(){var Ne=b(I,{tickformat:N.number.valueformat},N._range);Ne.setScale(),l.prepTicks(Ne);var Ee=function(Fe){return l.tickText(Ne,Fe).text},xe=N.number.suffix,Se=N.number.prefix,Ue=ce.select("text.number");function He(){var Fe=typeof k[0].y=="number"?Se+Ee(k[0].y)+xe:"-";Ue.text(Fe).call(r.font,N.number.font).call(n.convertToTspans,I)}return d(te)?Ue.transition().duration(te.duration).ease(te.easing).each("end",function(){He(),ae&&ae()}).each("interrupt",function(){He(),ae&&ae()}).attrTween("text",function(){var Fe=m.select(this),Ge=i(k[0].lastY,k[0].y);N._lastValue=k[0].y;var nt=oe(N.number.valueformat,Ee,k[0].lastY,k[0].y);return function(qe){Fe.text(Se+nt(Ge(qe))+xe)}}):He(),Q=y(Se+Ee(k[0].y)+xe,N.number.font,J,I),Ue}function $(){var Ne=b(I,{tickformat:N.delta.valueformat},N._range);Ne.setScale(),l.prepTicks(Ne);var Ee=function(qe){return l.tickText(Ne,qe).text},xe=N.delta.suffix,Se=N.delta.prefix,Ue=function(qe){var $e=N.delta.relative?qe.relativeDelta:qe.delta;return $e},He=function(qe,$e){return qe===0||typeof qe!="number"||isNaN(qe)?"-":(qe>0?N.delta.increasing.symbol:N.delta.decreasing.symbol)+Se+$e(qe)+xe},Fe=function(qe){return qe.delta>=0?N.delta.increasing.color:N.delta.decreasing.color};N._deltaLastValue===void 0&&(N._deltaLastValue=Ue(k[0]));var Ge=ce.select("text.delta");Ge.call(r.font,N.delta.font).call(f.fill,Fe({delta:N._deltaLastValue}));function nt(){Ge.text(He(Ue(k[0]),Ee)).call(f.fill,Fe(k[0])).call(n.convertToTspans,I)}return d(te)?Ge.transition().duration(te.duration).ease(te.easing).tween("text",function(){var qe=m.select(this),$e=Ue(k[0]),et=N._deltaLastValue,ct=oe(N.delta.valueformat,Ee,et,$e),dt=i(et,$e);return N._deltaLastValue=$e,function(pt){qe.text(He(dt(pt),ct)),qe.call(f.fill,Fe({delta:dt(pt)}))}}).each("end",function(){nt(),ae&&ae()}).each("interrupt",function(){nt(),ae&&ae()}):nt(),Z=y(He(Ue(k[0]),Ee),N.delta.font,J,I),Ge}var le=N.mode+N.align,ie;if(N._hasDelta&&(ie=$(),le+=N.delta.position+N.delta.font.size+N.delta.font.family+N.delta.valueformat,le+=N.delta.increasing.symbol+N.delta.decreasing.symbol,j=Z),N._hasNumber&&(q(),le+=N.number.font.size+N.number.font.family+N.number.valueformat+N.number.suffix+N.number.prefix,j=Q),N._hasDelta&&N._hasNumber){var he=[(Q.left+Q.right)/2,(Q.top+Q.bottom)/2],me=[(Z.left+Z.right)/2,(Z.top+Z.bottom)/2],Me,Te,Oe=.75*N.delta.font.size;N.delta.position==="left"&&(Me=z(N,"deltaPos",0,-1*(Q.width*h[N.align]+Z.width*(1-h[N.align])+Oe),le,Math.min),Te=he[1]-me[1],j={width:Q.width+Z.width+Oe,height:Math.max(Q.height,Z.height),left:Z.left+Me,right:Q.right,top:Math.min(Q.top,Z.top+Te),bottom:Math.max(Q.bottom,Z.bottom+Te)}),N.delta.position==="right"&&(Me=z(N,"deltaPos",0,Q.width*(1-h[N.align])+Z.width*h[N.align]+Oe,le,Math.max),Te=he[1]-me[1],j={width:Q.width+Z.width+Oe,height:Math.max(Q.height,Z.height),left:Q.left,right:Z.right+Me,top:Math.min(Q.top,Z.top+Te),bottom:Math.max(Q.bottom,Z.bottom+Te)}),N.delta.position==="bottom"&&(Me=null,Te=Z.height,j={width:Math.max(Q.width,Z.width),height:Q.height+Z.height,left:Math.min(Q.left,Z.left),right:Math.max(Q.right,Z.right),top:Q.bottom-Q.height,bottom:Q.bottom+Z.height}),N.delta.position==="top"&&(Me=null,Te=Q.top,j={width:Math.max(Q.width,Z.width),height:Q.height+Z.height,left:Math.min(Q.left,Z.left),right:Math.max(Q.right,Z.right),top:Q.bottom-Q.height-Z.height,bottom:Q.bottom}),ie.attr({dx:Me,dy:Te})}(N._hasNumber||N._hasDelta)&&ce.attr("transform",function(){var Ne=O.numbersScaler(j);le+=Ne[2];var Ee=z(N,"numbersScale",1,Ne[0],le,Math.min),xe;N._scaleNumbers||(Ee=1),N._isAngular?xe=U-Ee*j.bottom:xe=U-Ee*(j.top+j.bottom)/2,N._numbersTop=Ee*j.top+xe;var Se=j[Y];Y==="center"&&(Se=(j.left+j.right)/2);var Ue=_-Ee*Se;return Ue=z(N,"numbersTranslate",0,Ue,le,Math.max),v(Ue,xe)+A(Ee)})}function x(I){I.each(function(B){f.stroke(m.select(this),B.line.color)}).each(function(B){f.fill(m.select(this),B.color)}).style("stroke-width",function(B){return B.line.width})}function S(I,B,k){return function(){var O=P(B,k);return function(N){return I.endAngle(O(N))()}}}function b(I,B,k){var O=I._fullLayout,N=L.extendFlat({type:"linear",ticks:"outside",range:k,showline:!0},B),_={type:"linear",_id:"x"+B._id},U={letter:"x",font:O.font,noHover:!0,noTickson:!0};function Y(J,te){return L.coerce(N,_,g,J,te)}return c(N,_,Y,U,O),u(N,_,Y,U),_}function a(I,B,k){var O=Math.min(B/I.width,k/I.height);return[O,I,B+"x"+k]}function E(I,B){var k=Math.sqrt(I.width/2*(I.width/2)+I.height*I.height),O=B/k;return[O,I,B]}function y(I,B,k,O){var N=document.createElementNS("http://www.w3.org/2000/svg","text"),_=m.select(N);return _.text(I).attr("x",0).attr("y",0).attr("text-anchor",k).attr("data-unformatted",I).call(n.convertToTspans,O).call(r.font,B),r.bBox(_.node())}function z(I,B,k,O,N,_){var U="_cache"+B;I[U]&&I[U].key===N||(I[U]={key:N,value:k});var Y=L.aggNums(_,null,[I[U].value,O],2);return I[U].value=Y,Y}},16249:function(G,V,e){var m=e(50693),P=e(12663).axisHoverFormat,i=e(5386).fF,L=e(2418),A=e(9012),v=e(1426).extendFlat,p=e(30962).overrideAll;function t(n){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function r(n){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var s=G.exports=p(v({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:t(),y:t(),z:t()},caps:{x:r(),y:r(),z:r()},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:i(),xhoverformat:P("x"),yhoverformat:P("y"),zhoverformat:P("z"),valuehoverformat:P("value",1),showlegend:v({},A.showlegend,{dflt:!1})},m("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:L.opacity,lightposition:L.lightposition,lighting:L.lighting,flatshading:L.flatshading,contour:L.contour,hoverinfo:v({},A.hoverinfo)}),"calc","nested");s.flatshading.dflt=!0,s.lighting.facenormalsepsilon.dflt=0,s.x.editType=s.y.editType=s.z.editType=s.value.editType="calc+clearAxisTypes",s.transforms=void 0},56959:function(G,V,e){var m=e(78803),P=e(88489).processGrid,i=e(88489).filter;G.exports=function(A,v){v._len=Math.min(v.x.length,v.y.length,v.z.length,v.value.length),v._x=i(v.x,v._len),v._y=i(v.y,v._len),v._z=i(v.z,v._len),v._value=i(v.value,v._len);var p=P(v);v._gridFill=p.fill,v._Xs=p.Xs,v._Ys=p.Ys,v._Zs=p.Zs,v._len=p.len;for(var t=1/0,r=-1/0,s=0;s0;u--){var g=Math.min(c[u],c[u-1]),f=Math.max(c[u],c[u-1]);if(f>g&&g-1}function q(De,Ie){return De===null?Ie:De}function $(De,Ie,ze){J();var Pe=[Ie],be=[ze];if(j>=1)Pe=[Ie],be=[ze];else if(j>0){var se=ee(Ie,ze);Pe=se.xyzv,be=se.abc}for(var ye=0;ye-1?ze[Be]:Y(ot,at,wt);Bt>-1?Le[Be]=Bt:Le[Be]=ae(ot,at,wt,q(De,It))}ce(Le[0],Le[1],Le[2])}}function le(De,Ie,ze){var Pe=function(be,se,ye){$(De,[Ie[be],Ie[se],Ie[ye]],[ze[be],ze[se],ze[ye]])};Pe(0,1,2),Pe(2,3,0)}function ie(De,Ie,ze){var Pe=function(be,se,ye){$(De,[Ie[be],Ie[se],Ie[ye]],[ze[be],ze[se],ze[ye]])};Pe(0,1,2),Pe(3,0,1),Pe(2,3,0),Pe(1,2,3)}function he(De,Ie,ze,Pe){var be=De[3];bePe&&(be=Pe);for(var se=(De[3]-be)/(De[3]-Ie[3]+1e-9),ye=[],Le=0;Le<4;Le++)ye[Le]=(1-se)*De[Le]+se*Ie[Le];return ye}function me(De,Ie,ze){return De>=Ie&&De<=ze}function Me(De){var Ie=.001*(k-B);return De>=B-Ie&&De<=k+Ie}function Te(De){for(var Ie=[],ze=0;ze<4;ze++){var Pe=De[ze];Ie.push([l._x[Pe],l._y[Pe],l._z[Pe],l._value[Pe]])}return Ie}var Oe=3;function Ne(De,Ie,ze,Pe,be,se){se||(se=1),ze=[-1,-1,-1];var ye=!1,Le=[me(Ie[0][3],Pe,be),me(Ie[1][3],Pe,be),me(Ie[2][3],Pe,be)];if(!Le[0]&&!Le[1]&&!Le[2])return!1;var Be=function(at,wt,It){return Me(wt[0][3])&&Me(wt[1][3])&&Me(wt[2][3])?($(at,wt,It),!0):seLe?[z,se]:[se,I];ct(Ie,Be[0],Be[1])}}var ot=[[Math.min(B,I),Math.max(B,I)],[Math.min(z,k),Math.max(z,k)]];["x","y","z"].forEach(function(at){for(var wt=[],It=0;It0&&(_r.push(Yt.id),at==="x"?yt.push([Yt.distRatio,0,0]):at==="y"?yt.push([0,Yt.distRatio,0]):yt.push([0,0,Yt.distRatio]))}else at==="x"?ir=Mt(1,S-1):at==="y"?ir=Mt(1,b-1):ir=Mt(1,a-1);_r.length>0&&(at==="x"?wt[Bt]=dt(De,_r,Gt,Lt,yt,wt[Bt]):at==="y"?wt[Bt]=pt(De,_r,Gt,Lt,yt,wt[Bt]):wt[Bt]=At(De,_r,Gt,Lt,yt,wt[Bt]),Bt++),ir.length>0&&(at==="x"?wt[Bt]=Ge(De,ir,Gt,Lt,wt[Bt]):at==="y"?wt[Bt]=nt(De,ir,Gt,Lt,wt[Bt]):wt[Bt]=qe(De,ir,Gt,Lt,wt[Bt]),Bt++)}var br=l.caps[at];br.show&&br.fill&&(K(br.fill),at==="x"?wt[Bt]=Ge(De,[0,S-1],Gt,Lt,wt[Bt]):at==="y"?wt[Bt]=nt(De,[0,b-1],Gt,Lt,wt[Bt]):wt[Bt]=qe(De,[0,a-1],Gt,Lt,wt[Bt]),Bt++)}}),o===0&&te(),l._meshX=O,l._meshY=N,l._meshZ=_,l._meshIntensity=U,l._Xs=T,l._Ys=C,l._Zs=x}return Je(),l}function n(l,c){var u=l.glplot.gl,g=m({gl:u}),f=new p(l,g,c.uid);return g._trace=f,f.update(c),l.glplot.add(g),f}G.exports={findNearestOnAxis:v,generateIsoMeshes:s,createIsosurfaceTrace:n}},82738:function(G,V,e){var m=e(71828),P=e(73972),i=e(16249),L=e(1586);function A(p,t,r,s){function n(l,c){return m.coerce(p,t,i,l,c)}v(p,t,r,s,n)}function v(p,t,r,s,n){var l=n("isomin"),c=n("isomax");c!=null&&l!==void 0&&l!==null&&l>c&&(t.isomin=null,t.isomax=null);var u=n("x"),g=n("y"),f=n("z"),w=n("value");if(!u||!u.length||!g||!g.length||!f||!f.length||!w||!w.length){t.visible=!1;return}var h=P.getComponentMethod("calendars","handleTraceDefaults");h(p,t,["x","y","z"],s),n("valuehoverformat"),["x","y","z"].forEach(function(T){n(T+"hoverformat");var C="caps."+T,x=n(C+".show");x&&n(C+".fill");var S="slices."+T,b=n(S+".show");b&&(n(S+".fill"),n(S+".locations"))});var o=n("spaceframe.show");o&&n("spaceframe.fill");var d=n("surface.show");d&&(n("surface.count"),n("surface.fill"),n("surface.pattern"));var M=n("contour.show");M&&(n("contour.color"),n("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach(function(T){n(T)}),L(p,t,s,n,{prefix:"",cLetter:"c"}),t._length=null}G.exports={supplyDefaults:A,supplyIsoDefaults:v}},64943:function(G,V,e){G.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(G,V,e){var m=e(50693),P=e(12663).axisHoverFormat,i=e(5386).fF,L=e(54532),A=e(9012),v=e(1426).extendFlat;G.exports=v({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:i({editType:"calc"}),xhoverformat:P("x"),yhoverformat:P("y"),zhoverformat:P("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},m("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:L.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:v({},L.contours.x.show,{}),color:L.contours.x.color,width:L.contours.x.width,editType:"calc"},lightposition:{x:v({},L.lightposition.x,{dflt:1e5}),y:v({},L.lightposition.y,{dflt:1e5}),z:v({},L.lightposition.z,{dflt:0}),editType:"calc"},lighting:v({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"},L.lighting),hoverinfo:v({},A.hoverinfo,{editType:"calc"}),showlegend:v({},A.showlegend,{dflt:!1})})},82932:function(G,V,e){var m=e(78803);G.exports=function(i,L){L.intensity&&m(i,L,{vals:L.intensity,containerStr:"",cLetter:"c"})}},91134:function(G,V,e){var m=e(9330).gl_mesh3d,P=e(9330).delaunay_triangulate,i=e(9330).alpha_shape,L=e(9330).convex_hull,A=e(81697).parseColorScale,v=e(78614),p=e(21081).extractOpts,t=e(90060);function r(w,h,o){this.scene=w,this.uid=o,this.mesh=h,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var s=r.prototype;s.handlePick=function(w){if(w.object===this.mesh){var h=w.index=w.data.index;w.data._cellCenter?w.traceCoordinate=w.data.dataCoordinate:w.traceCoordinate=[this.data.x[h],this.data.y[h],this.data.z[h]];var o=this.data.hovertext||this.data.text;return Array.isArray(o)&&o[h]!==void 0?w.textLabel=o[h]:o&&(w.textLabel=o),!0}};function n(w){for(var h=[],o=w.length,d=0;d=h-.5)return!1;return!0}s.update=function(w){var h=this.scene,o=h.fullSceneLayout;this.data=w;var d=w.x.length,M=t(l(o.xaxis,w.x,h.dataScale[0],w.xcalendar),l(o.yaxis,w.y,h.dataScale[1],w.ycalendar),l(o.zaxis,w.z,h.dataScale[2],w.zcalendar)),T;if(w.i&&w.j&&w.k){if(w.i.length!==w.j.length||w.j.length!==w.k.length||!g(w.i,d)||!g(w.j,d)||!g(w.k,d))return;T=t(c(w.i),c(w.j),c(w.k))}else w.alphahull===0?T=L(M):w.alphahull>0?T=i(w.alphahull,M):T=u(w.delaunayaxis,M);var C={positions:M,cells:T,lightPosition:[w.lightposition.x,w.lightposition.y,w.lightposition.z],ambient:w.lighting.ambient,diffuse:w.lighting.diffuse,specular:w.lighting.specular,roughness:w.lighting.roughness,fresnel:w.lighting.fresnel,vertexNormalsEpsilon:w.lighting.vertexnormalsepsilon,faceNormalsEpsilon:w.lighting.facenormalsepsilon,opacity:w.opacity,contourEnable:w.contour.show,contourColor:v(w.contour.color).slice(0,3),contourWidth:w.contour.width,useFacetNormals:w.flatshading};if(w.intensity){var x=p(w);this.color="#fff";var S=w.intensitymode;C[S+"Intensity"]=w.intensity,C[S+"IntensityBounds"]=[x.min,x.max],C.colormap=A(w)}else w.vertexcolor?(this.color=w.vertexcolor[0],C.vertexColors=n(w.vertexcolor)):w.facecolor?(this.color=w.facecolor[0],C.cellColors=n(w.facecolor)):(this.color=w.color,C.meshColor=v(w.color));this.mesh.update(C)},s.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function f(w,h){var o=w.glplot.gl,d=m({gl:o}),M=new r(w,d,h.uid);return d._trace=M,M.update(h),w.glplot.add(d),M}G.exports=f},58669:function(G,V,e){var m=e(73972),P=e(71828),i=e(1586),L=e(2418);G.exports=function(v,p,t,r){function s(g,f){return P.coerce(v,p,L,g,f)}function n(g){var f=g.map(function(w){var h=s(w);return h&&P.isArrayOrTypedArray(h)?h:null});return f.every(function(w){return w&&w.length===f[0].length})&&f}var l=n(["x","y","z"]);if(!l){p.visible=!1;return}if(n(["i","j","k"]),p.i&&(!p.j||!p.k)||p.j&&(!p.k||!p.i)||p.k&&(!p.i||!p.j)){p.visible=!1;return}var c=m.getComponentMethod("calendars","handleTraceDefaults");c(v,p,["x","y","z"],r),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(g){s(g)});var u=s("contour.show");u&&(s("contour.color"),s("contour.width")),"intensity"in v?(s("intensity"),s("intensitymode"),i(v,p,r,s,{prefix:"",cLetter:"c"})):(p.showscale=!1,"facecolor"in v?s("facecolor"):"vertexcolor"in v?s("vertexcolor"):s("color",t)),s("text"),s("hovertext"),s("hovertemplate"),s("xhoverformat"),s("yhoverformat"),s("zhoverformat"),p._length=null}},21164:function(G,V,e){G.exports={attributes:e(2418),supplyDefaults:e(58669),calc:e(82932),colorbar:{min:"cmin",max:"cmax"},plot:e(91134),moduleType:"trace",name:"mesh3d",basePlotModule:e(58547),categories:["gl3d","showLegend"],meta:{}}},2522:function(G,V,e){var m=e(71828).extendFlat,P=e(82196),i=e(12663).axisHoverFormat,L=e(79952).P,A=e(77914),v=e(22372),p=v.INCREASING.COLOR,t=v.DECREASING.COLOR,r=P.line;function s(n){return{line:{color:m({},r.color,{dflt:n}),width:r.width,dash:L,editType:"style"},editType:"style"}}G.exports={xperiod:P.xperiod,xperiod0:P.xperiod0,xperiodalignment:P.xperiodalignment,xhoverformat:i("x"),yhoverformat:i("y"),x:{valType:"data_array",editType:"calc+clearAxisTypes"},open:{valType:"data_array",editType:"calc"},high:{valType:"data_array",editType:"calc"},low:{valType:"data_array",editType:"calc"},close:{valType:"data_array",editType:"calc"},line:{width:m({},r.width,{}),dash:m({},L,{}),editType:"style"},increasing:s(p),decreasing:s(t),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:m({},A.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}})}},3485:function(G,V,e){var m=e(71828),P=m._,i=e(89298),L=e(42973),A=e(50606).BADNUM;function v(s,n){var l=i.getFromId(s,n.xaxis),c=i.getFromId(s,n.yaxis),u=r(s,l,n),g=n._minDiff;n._minDiff=null;var f=n._origX;n._origX=null;var w=n._xcalc;n._xcalc=null;var h=t(s,n,f,w,c,p);return n._extremes[l._id]=i.findExtremes(l,w,{vpad:g/2}),h.length?(m.extendFlat(h[0].t,{wHover:g/2,tickLen:u}),h):[{t:{empty:!0}}]}function p(s,n,l,c){return{o:s,h:n,l,c}}function t(s,n,l,c,u,g){for(var f=u.makeCalcdata(n,"open"),w=u.makeCalcdata(n,"high"),h=u.makeCalcdata(n,"low"),o=u.makeCalcdata(n,"close"),d=Array.isArray(n.text),M=Array.isArray(n.hovertext),T=!0,C=null,x=!!n.xperiodalignment,S=[],b=0;bC):T=I>E,C=I;var B=g(E,y,z,I);B.pos=a,B.yc=(E+I)/2,B.i=b,B.dir=T?"increasing":"decreasing",B.x=B.pos,B.y=[z,y],x&&(B.orig_p=l[b]),d&&(B.tx=n.text[b]),M&&(B.htx=n.hovertext[b]),S.push(B)}else S.push({pos:a,empty:!0})}return n._extremes[u._id]=i.findExtremes(u,m.concat(h,w),{padded:!0}),S.length&&(S[0].t={labels:{open:P(s,"open:")+" ",high:P(s,"high:")+" ",low:P(s,"low:")+" ",close:P(s,"close:")+" "}}),S}function r(s,n,l){var c=l._minDiff;if(!c){var u=s._fullData,g=[];c=1/0;var f;for(f=0;f"+o.labels[I]+m.hoverLabelText(w,B,h.yhoverformat)):(O=P.extendFlat({},M),O.y0=O.y1=k,O.yLabelVal=B,O.yLabel=o.labels[I]+m.hoverLabelText(w,B,h.yhoverformat),O.name="",d.push(O),y[B]=O)}return d}function n(l,c,u,g){var f=l.cd,w=l.ya,h=f[0].trace,o=f[0].t,d=r(l,c,u,g);if(!d)return[];var M=d.index,T=f[M],C=d.index=T.i,x=T.dir;function S(B){return o.labels[B]+m.hoverLabelText(w,h[B][C],h.yhoverformat)}var b=T.hi||h.hoverinfo,a=b.split("+"),E=b==="all",y=E||a.indexOf("y")!==-1,z=E||a.indexOf("text")!==-1,I=y?[S("open"),S("high"),S("low"),S("close")+" "+p[x]]:[];return z&&A(T,h,I),d.extraText=I.join("
"),d.y0=d.y1=w.c2p(T.yc,!0),[d]}G.exports={hoverPoints:t,hoverSplit:s,hoverOnPoints:n}},54186:function(G,V,e){G.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(G,V,e){var m=e(73972),P=e(71828);G.exports=function(L,A,v,p){var t=v("x"),r=v("open"),s=v("high"),n=v("low"),l=v("close");v("hoverlabel.split");var c=m.getComponentMethod("calendars","handleTraceDefaults");if(c(L,A,["x"],p),!!(r&&s&&n&&l)){var u=Math.min(r.length,s.length,n.length,l.length);return t&&(u=Math.min(u,P.minRowLength(t))),A._length=u,u}}},72314:function(G,V,e){var m=e(39898),P=e(71828);G.exports=function(L,A,v,p){var t=A.yaxis,r=A.xaxis,s=!!r.rangebreaks;P.makeTraceGroups(p,v,"trace ohlc").each(function(n){var l=m.select(this),c=n[0],u=c.t,g=c.trace;if(g.visible!==!0||u.empty){l.remove();return}var f=u.tickLen,w=l.selectAll("path").data(P.identity);w.enter().append("path"),w.exit().remove(),w.attr("d",function(h){if(h.empty)return"M0,0Z";var o=r.c2p(h.pos-f,!0),d=r.c2p(h.pos+f,!0),M=s?(o+d)/2:r.c2p(h.pos,!0),T=t.c2p(h.o,!0),C=t.c2p(h.h,!0),x=t.c2p(h.l,!0),S=t.c2p(h.c,!0);return"M"+o+","+T+"H"+M+"M"+M+","+C+"V"+x+"M"+d+","+S+"H"+M})})}},67324:function(G){G.exports=function(e,m){var P=e.cd,i=e.xaxis,L=e.yaxis,A=[],v,p=P[0].t.bPos||0;if(m===!1)for(v=0;v=h.length||o[h[d]]!==void 0)return!1;o[h[d]]=!0}return!0}},14647:function(G,V,e){var m=e(71828),P=e(52075).hasColorscale,i=e(1586),L=e(27670).c,A=e(85501),v=e(99506),p=e(94397);function t(s,n,l,c,u){u("line.shape"),u("line.hovertemplate");var g=u("line.color",c.colorway[0]);if(P(s,"line")&&m.isArrayOrTypedArray(g)){if(g.length)return u("line.colorscale"),i(s,n,c,u,{prefix:"line.",cLetter:"c"}),g.length;n.line.color=l}return 1/0}function r(s,n){function l(o,d){return m.coerce(s,n,v.dimensions,o,d)}var c=l("values"),u=l("visible");if(c&&c.length||(u=n.visible=!1),u){l("label"),l("displayindex",n._index);var g=s.categoryarray,f=Array.isArray(g)&&g.length>0,w;f&&(w="array");var h=l("categoryorder",w);h==="array"?(l("categoryarray"),l("ticktext")):(delete s.categoryarray,delete s.ticktext),!f&&h==="array"&&(n.categoryorder="trace")}}G.exports=function(n,l,c,u){function g(d,M){return m.coerce(n,l,v,d,M)}var f=A(n,l,{name:"dimensions",handleItemDefaults:r}),w=t(n,l,c,u,g);L(l,u,g),(!Array.isArray(f)||!f.length)&&(l.visible=!1),p(l,f,"values",w),g("hoveron"),g("hovertemplate"),g("arrangement"),g("bundlecolors"),g("sortpaths"),g("counts");var h={family:u.font.family,size:Math.round(u.font.size),color:u.font.color};m.coerceFont(g,"labelfont",h);var o={family:u.font.family,size:Math.round(u.font.size/1.2),color:u.font.color};m.coerceFont(g,"tickfont",o)}},94873:function(G,V,e){G.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(G,V,e){var m=e(39898),P=e(81684).k4,i=e(72391),L=e(30211),A=e(71828),v=A.strTranslate,p=e(91424),t=e(84267),r=e(63893);function s(K,ee,oe,q){var $=ee._context.staticPlot,le=K.map(ae.bind(0,ee,oe)),ie=q.selectAll("g.parcatslayer").data([null]);ie.enter().append("g").attr("class","parcatslayer").style("pointer-events",$?"none":"all");var he=ie.selectAll("g.trace.parcats").data(le,n),me=he.enter().append("g").attr("class","trace parcats");he.attr("transform",function(Ge){return v(Ge.x,Ge.y)}),me.append("g").attr("class","paths");var Me=he.select("g.paths"),Te=Me.selectAll("path.path").data(function(Ge){return Ge.paths},n);Te.attr("fill",function(Ge){return Ge.model.color});var Oe=Te.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(Ge){return Ge.model.color}).attr("fill-opacity",0);o(Oe),Te.attr("d",function(Ge){return Ge.svgD}),Oe.empty()||Te.sort(c),Te.exit().remove(),Te.on("mouseover",u).on("mouseout",g).on("click",h),me.append("g").attr("class","dimensions");var Ne=he.select("g.dimensions"),Ee=Ne.selectAll("g.dimension").data(function(Ge){return Ge.dimensions},n);Ee.enter().append("g").attr("class","dimension"),Ee.attr("transform",function(Ge){return v(Ge.x,0)}),Ee.exit().remove();var xe=Ee.selectAll("g.category").data(function(Ge){return Ge.categories},n),Se=xe.enter().append("g").attr("class","category");xe.attr("transform",function(Ge){return v(0,Ge.y)}),Se.append("rect").attr("class","catrect").attr("pointer-events","none"),xe.select("rect.catrect").attr("fill","none").attr("width",function(Ge){return Ge.width}).attr("height",function(Ge){return Ge.height}),T(Se);var Ue=xe.selectAll("rect.bandrect").data(function(Ge){return Ge.bands},n);Ue.each(function(){A.raiseToTop(this)}),Ue.attr("fill",function(Ge){return Ge.color});var He=Ue.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(Ge){return Ge.color}).attr("fill-opacity",0);Ue.attr("fill",function(Ge){return Ge.color}).attr("width",function(Ge){return Ge.width}).attr("height",function(Ge){return Ge.height}).attr("y",function(Ge){return Ge.y}).attr("cursor",function(Ge){return Ge.parcatsViewModel.arrangement==="fixed"?"default":Ge.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),x(He),Ue.exit().remove(),Se.append("text").attr("class","catlabel").attr("pointer-events","none");var Fe=ee._fullLayout.paper_bgcolor;xe.select("text.catlabel").attr("text-anchor",function(Ge){return l(Ge)?"start":"end"}).attr("alignment-baseline","middle").style("text-shadow",r.makeTextShadow(Fe)).style("fill","rgb(0, 0, 0)").attr("x",function(Ge){return l(Ge)?Ge.width+5:-5}).attr("y",function(Ge){return Ge.height/2}).text(function(Ge){return Ge.model.categoryLabel}).each(function(Ge){p.font(m.select(this),Ge.parcatsViewModel.categorylabelfont),r.convertToTspans(m.select(this),ee)}),Se.append("text").attr("class","dimlabel"),xe.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(Ge){return Ge.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(Ge){return Ge.width/2}).attr("y",-5).text(function(Ge,nt){return nt===0?Ge.parcatsViewModel.model.dimensions[Ge.model.dimensionInd].dimensionLabel:null}).each(function(Ge){p.font(m.select(this),Ge.parcatsViewModel.labelfont)}),xe.selectAll("rect.bandrect").on("mouseover",k).on("mouseout",O),xe.exit().remove(),Ee.call(m.behavior.drag().origin(function(Ge){return{x:Ge.x,y:0}}).on("dragstart",N).on("drag",_).on("dragend",U)),he.each(function(Ge){Ge.traceSelection=m.select(this),Ge.pathSelection=m.select(this).selectAll("g.paths").selectAll("path.path"),Ge.dimensionSelection=m.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),he.exit().remove()}G.exports=function(K,ee,oe,q){s(oe,K,q,ee)};function n(K){return K.key}function l(K){var ee=K.parcatsViewModel.dimensions.length,oe=K.parcatsViewModel.dimensions[ee-1].model.dimensionInd;return K.model.dimensionInd===oe}function c(K,ee){return K.model.rawColor>ee.model.rawColor?1:K.model.rawColor"),$e=m.mouse($)[0];L.loneHover({trace:le,x:xe-he.left+me.left,y:Se-he.top+me.top,text:qe,color:K.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:Ue,idealAlign:$e1&&Me.displayInd===me.dimensions.length-1?(Ne=ie.left,Ee="left"):(Ne=ie.left+ie.width,Ee="right");var xe=he.model.count,Se=he.model.categoryLabel,Ue=xe/he.parcatsViewModel.model.count,He={countLabel:xe,categoryLabel:Se,probabilityLabel:Ue.toFixed(3)},Fe=[];he.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Fe.push(["Count:",He.countLabel].join(" ")),he.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&Fe.push(["P("+He.categoryLabel+"):",He.probabilityLabel].join(" "));var Ge=Fe.join("
");return{trace:Te,x:q*(Ne-ee.left),y:$*(Oe-ee.top),text:Ge,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:Ee,hovertemplate:Te.hovertemplate,hovertemplateLabels:He,eventData:[{data:Te._input,fullData:Te,count:xe,category:Se,probability:Ue}]}}function I(K,ee,oe){var q=[];return m.select(oe.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var $=this;q.push(z(K,ee,$))}),q}function B(K,ee,oe){K._fullLayout._calcInverseTransform(K);var q=K._fullLayout._invScaleX,$=K._fullLayout._invScaleY,le=oe.getBoundingClientRect(),ie=m.select(oe).datum(),he=ie.categoryViewModel,me=he.parcatsViewModel,Me=me.model.dimensions[he.model.dimensionInd],Te=me.trace,Oe=le.y+le.height/2,Ne,Ee;me.dimensions.length>1&&Me.displayInd===me.dimensions.length-1?(Ne=le.left,Ee="left"):(Ne=le.left+le.width,Ee="right");var xe=he.model.categoryLabel,Se=ie.parcatsViewModel.model.count,Ue=0;ie.categoryViewModel.bands.forEach(function(pt){pt.color===ie.color&&(Ue+=pt.count)});var He=he.model.count,Fe=0;me.pathSelection.each(function(pt){pt.model.color===ie.color&&(Fe+=pt.model.count)});var Ge=Ue/Se,nt=Ue/Fe,qe=Ue/He,$e={countLabel:Se,categoryLabel:xe,probabilityLabel:Ge.toFixed(3)},et=[];he.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&et.push(["Count:",$e.countLabel].join(" ")),he.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(et.push("P(color ∩ "+xe+"): "+$e.probabilityLabel),et.push("P("+xe+" | color): "+nt.toFixed(3)),et.push("P(color | "+xe+"): "+qe.toFixed(3)));var ct=et.join("
"),dt=t.mostReadable(ie.color,["black","white"]);return{trace:Te,x:q*(Ne-ee.left),y:$*(Oe-ee.top),text:ct,color:ie.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:dt,fontSize:10,idealAlign:Ee,hovertemplate:Te.hovertemplate,hovertemplateLabels:$e,eventData:[{data:Te._input,fullData:Te,category:xe,count:Se,probability:Ge,categorycount:He,colorcount:Fe,bandcolorcount:Ue}]}}function k(K){if(!K.parcatsViewModel.dragDimension&&K.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var ee=m.mouse(this)[1];if(ee<-1)return;var oe=K.parcatsViewModel.graphDiv,q=oe._fullLayout,$=q._paperdiv.node().getBoundingClientRect(),le=K.parcatsViewModel.hoveron,ie=this;if(le==="color"?(a(ie),y(ie,"plotly_hover",m.event)):(b(ie),E(ie,"plotly_hover",m.event)),K.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var he;le==="category"?he=z(oe,$,ie):le==="color"?he=B(oe,$,ie):le==="dimension"&&(he=I(oe,$,ie)),he&&L.loneHover(he,{container:q._hoverlayer.node(),outerContainer:q._paper.node(),gd:oe})}}}function O(K){var ee=K.parcatsViewModel;if(!ee.dragDimension&&(o(ee.pathSelection),T(ee.dimensionSelection.selectAll("g.category")),x(ee.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),L.loneUnhover(ee.graphDiv._fullLayout._hoverlayer.node()),ee.pathSelection.sort(c),ee.hoverinfoItems.indexOf("skip")===-1)){var oe=K.parcatsViewModel.hoveron,q=this;oe==="color"?y(q,"plotly_unhover",m.event):E(q,"plotly_unhover",m.event)}}function N(K){K.parcatsViewModel.arrangement!=="fixed"&&(K.dragDimensionDisplayInd=K.model.displayInd,K.initialDragDimensionDisplayInds=K.parcatsViewModel.model.dimensions.map(function(ee){return ee.displayInd}),K.dragHasMoved=!1,K.dragCategoryDisplayInd=null,m.select(this).selectAll("g.category").select("rect.catrect").each(function(ee){var oe=m.mouse(this)[0],q=m.mouse(this)[1];-2<=oe&&oe<=ee.width+2&&-2<=q&&q<=ee.height+2&&(K.dragCategoryDisplayInd=ee.model.displayInd,K.initialDragCategoryDisplayInds=K.model.categories.map(function($){return $.displayInd}),ee.model.dragY=ee.y,A.raiseToTop(this.parentNode),m.select(this.parentNode).selectAll("rect.bandrect").each(function($){$.yTe.y+Te.height/2&&(le.model.displayInd=Te.model.displayInd,Te.model.displayInd=he),K.dragCategoryDisplayInd=le.model.displayInd}if(K.dragCategoryDisplayInd===null||K.parcatsViewModel.arrangement==="freeform"){$.model.dragX=m.event.x;var Oe=K.parcatsViewModel.dimensions[oe],Ne=K.parcatsViewModel.dimensions[q];Oe!==void 0&&$.model.dragXNe.x&&($.model.displayInd=Ne.model.displayInd,Ne.model.displayInd=K.dragDimensionDisplayInd),K.dragDimensionDisplayInd=$.model.displayInd}Z(K.parcatsViewModel),Q(K.parcatsViewModel),te(K.parcatsViewModel),J(K.parcatsViewModel)}}function U(K){if(K.parcatsViewModel.arrangement!=="fixed"&&K.dragDimensionDisplayInd!==null){m.select(this).selectAll("text").attr("font-weight","normal");var ee={},oe=Y(K.parcatsViewModel),q=K.parcatsViewModel.model.dimensions.map(function(Ne){return Ne.displayInd}),$=K.initialDragDimensionDisplayInds.some(function(Ne,Ee){return Ne!==q[Ee]});$&&q.forEach(function(Ne,Ee){var xe=K.parcatsViewModel.model.dimensions[Ee].containerInd;ee["dimensions["+xe+"].displayindex"]=Ne});var le=!1;if(K.dragCategoryDisplayInd!==null){var ie=K.model.categories.map(function(Ne){return Ne.displayInd});if(le=K.initialDragCategoryDisplayInds.some(function(Ne,Ee){return Ne!==ie[Ee]}),le){var he=K.model.categories.slice().sort(function(Ne,Ee){return Ne.displayInd-Ee.displayInd}),me=he.map(function(Ne){return Ne.categoryValue}),Me=he.map(function(Ne){return Ne.categoryLabel});ee["dimensions["+K.model.containerInd+"].categoryarray"]=[me],ee["dimensions["+K.model.containerInd+"].ticktext"]=[Me],ee["dimensions["+K.model.containerInd+"].categoryorder"]="array"}}if(K.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!K.dragHasMoved&&K.potentialClickBand&&(K.parcatsViewModel.hoveron==="color"?y(K.potentialClickBand,"plotly_click",m.event.sourceEvent):E(K.potentialClickBand,"plotly_click",m.event.sourceEvent)),K.model.dragX=null,K.dragCategoryDisplayInd!==null){var Te=K.parcatsViewModel.dimensions[K.dragDimensionDisplayInd].categories[K.dragCategoryDisplayInd];Te.model.dragY=null,K.dragCategoryDisplayInd=null}K.dragDimensionDisplayInd=null,K.parcatsViewModel.dragDimension=null,K.dragHasMoved=null,K.potentialClickBand=null,Z(K.parcatsViewModel),Q(K.parcatsViewModel);var Oe=m.transition().duration(300).ease("cubic-in-out");Oe.each(function(){te(K.parcatsViewModel,!0),J(K.parcatsViewModel,!0)}).each("end",function(){($||le)&&i.restyle(K.parcatsViewModel.graphDiv,ee,[oe])})}}function Y(K){for(var ee,oe=K.graphDiv._fullData,q=0;q=0;me--)Me+="C"+ie[me]+","+(ee[me+1]+q)+" "+le[me]+","+(ee[me]+q)+" "+(K[me]+oe[me])+","+(ee[me]+q),Me+="l-"+oe[me]+",0 ";return Me+="Z",Me}function Q(K){var ee=K.dimensions,oe=K.model,q=ee.map(function(Vt){return Vt.categories.map(function(Je){return Je.y})}),$=K.model.dimensions.map(function(Vt){return Vt.categories.map(function(Je){return Je.displayInd})}),le=K.model.dimensions.map(function(Vt){return Vt.displayInd}),ie=K.dimensions.map(function(Vt){return Vt.model.dimensionInd}),he=ee.map(function(Vt){return Vt.x}),me=ee.map(function(Vt){return Vt.width}),Me=[];for(var Te in oe.paths)oe.paths.hasOwnProperty(Te)&&Me.push(oe.paths[Te]);function Oe(Vt){var Je=Vt.categoryInds.map(function(Ie,ze){return $[ze][Ie]}),De=ie.map(function(Ie){return Je[Ie]});return De}Me.sort(function(Vt,Je){var De=Oe(Vt),Ie=Oe(Je);return K.sortpaths==="backward"&&(De.reverse(),Ie.reverse()),De.push(Vt.valueInds[0]),Ie.push(Je.valueInds[0]),K.bundlecolors&&(De.unshift(Vt.rawColor),Ie.unshift(Je.rawColor)),DeIe?1:0});for(var Ne=new Array(Me.length),Ee=ee[0].model.count,xe=ee[0].categories.map(function(Vt){return Vt.height}).reduce(function(Vt,Je){return Vt+Je}),Se=0;Se0?He=xe*(Ue.count/Ee):He=0;for(var Fe=new Array(q.length),Ge=0;Ge1?ie=(K.width-2*oe-q)/($-1):ie=0,he=oe,me=he+ie*le;var Me=[],Te=K.model.maxCats,Oe=ee.categories.length,Ne=8,Ee=ee.count,xe=K.height-Ne*(Te-1),Se,Ue,He,Fe,Ge,nt=(Te-Oe)*Ne/2,qe=ee.categories.map(function($e){return{displayInd:$e.displayInd,categoryInd:$e.categoryInd}});for(qe.sort(function($e,et){return $e.displayInd-et.displayInd}),Ge=0;Ge0?Se=Ue.count/Ee*xe:Se=0,He={key:Ue.valueInds[0],model:Ue,width:q,height:Se,y:Ue.dragY!==null?Ue.dragY:nt,bands:[],parcatsViewModel:K},nt=nt+Se+Ne,Me.push(He);return{key:ee.dimensionInd,x:ee.dragX!==null?ee.dragX:me,y:0,width:q,model:ee,categories:Me,parcatsViewModel:K,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}},45784:function(G,V,e){var m=e(45460);G.exports=function(i,L,A,v){var p=i._fullLayout,t=p._paper,r=p._size;m(i,t,L,{width:r.w,height:r.h,margin:{t:r.t,r:r.r,b:r.b,l:r.l}},A,v)}},73362:function(G,V,e){var m=e(50693),P=e(13838),i=e(41940),L=e(27670).Y,A=e(1426).extendFlat,v=e(44467).templatedArray;G.exports={domain:L({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:i({editType:"plot"}),tickfont:i({editType:"plot"}),rangefont:i({editType:"plot"}),dimensions:v("dimension",{label:{valType:"string",editType:"plot"},tickvals:A({},P.tickvals,{editType:"plot"}),ticktext:A({},P.ticktext,{editType:"plot"}),tickformat:A({},P.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:A({editType:"calc"},m("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(G,V,e){var m=e(25706),P=e(39898),i=e(28984).keyFun,L=e(28984).repeat,A=e(71828).sorterAsc,v=e(71828).strTranslate,p=m.bar.snapRatio;function t(U,Y){return U*(1-p)+Y*p}var r=m.bar.snapClose;function s(U,Y){return U*(1-r)+Y*r}function n(U,Y,J,te){if(l(J,te))return J;var ae=U?-1:1,ce=0,Q=Y.length-1;if(ae<0){var Z=ce;ce=Q,Q=Z}for(var j=Y[ce],K=j,ee=ce;ae*ee=Y[J][0]&&U<=Y[J][1])return!0;return!1}function c(U){U.attr("x",-m.bar.captureWidth/2).attr("width",m.bar.captureWidth)}function u(U){U.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function g(U){if(!U.brush.filterSpecified)return"0,"+U.height;for(var Y=f(U.brush.filter.getConsolidated(),U.height),J=[0],te,ae,ce,Q=Y.length?Y[0][0]:null,Z=0;ZU[1]+J||Y=.9*U[1]+.1*U[0]?"n":Y<=.9*U[0]+.1*U[1]?"s":"ns"}function h(){P.select(document.body).style("cursor",null)}function o(U){U.attr("stroke-dasharray",g)}function d(U,Y){var J=P.select(U).selectAll(".highlight, .highlight-shadow"),te=Y?J.transition().duration(m.bar.snapDuration).each("end",Y):J;o(te)}function M(U,Y){var J=U.brush,te=J.filterSpecified,ae=NaN,ce={},Q;if(te){var Z=U.height,j=J.filter.getConsolidated(),K=f(j,Z),ee=NaN,oe=NaN,q=NaN;for(Q=0;Q<=K.length;Q++){var $=K[Q];if($&&$[0]<=Y&&Y<=$[1]){ee=Q;break}else if(oe=Q?Q-1:NaN,$&&$[0]>Y){q=Q;break}}if(ae=ee,isNaN(ae)&&(isNaN(oe)||isNaN(q)?ae=isNaN(oe)?q:oe:ae=Y-K[oe][1]=Me[0]&&me<=Me[1]){ce.clickableOrdinalRange=Me;break}}}return ce}function T(U,Y){P.event.sourceEvent.stopPropagation();var J=Y.height-P.mouse(U)[1]-2*m.verticalPadding,te=Y.unitToPaddedPx.invert(J),ae=Y.brush,ce=M(Y,J),Q=ce.interval,Z=ae.svgBrush;if(Z.wasDragged=!1,Z.grabbingBar=ce.region==="ns",Z.grabbingBar){var j=Q.map(Y.unitToPaddedPx);Z.grabPoint=J-j[0]-m.verticalPadding,Z.barLength=j[1]-j[0]}Z.clickableOrdinalRange=ce.clickableOrdinalRange,Z.stayingIntervals=Y.multiselect&&ae.filterSpecified?ae.filter.getConsolidated():[],Q&&(Z.stayingIntervals=Z.stayingIntervals.filter(function(K){return K[0]!==Q[0]&&K[1]!==Q[1]})),Z.startExtent=ce.region?Q[ce.region==="s"?1:0]:te,Y.parent.inBrushDrag=!0,Z.brushStartCallback()}function C(U,Y){P.event.sourceEvent.stopPropagation();var J=Y.height-P.mouse(U)[1]-2*m.verticalPadding,te=Y.brush.svgBrush;te.wasDragged=!0,te._dragging=!0,te.grabbingBar?te.newExtent=[J-te.grabPoint,J+te.barLength-te.grabPoint].map(Y.unitToPaddedPx.invert):te.newExtent=[te.startExtent,Y.unitToPaddedPx.invert(J)].sort(A),Y.brush.filterSpecified=!0,te.extent=te.stayingIntervals.concat([te.newExtent]),te.brushCallback(Y),d(U.parentNode)}function x(U,Y){var J=Y.brush,te=J.filter,ae=J.svgBrush;ae._dragging||(S(U,Y),C(U,Y),Y.brush.svgBrush.wasDragged=!1),ae._dragging=!1;var ce=P.event;ce.sourceEvent.stopPropagation();var Q=ae.grabbingBar;if(ae.grabbingBar=!1,ae.grabLocation=void 0,Y.parent.inBrushDrag=!1,h(),!ae.wasDragged){ae.wasDragged=void 0,ae.clickableOrdinalRange?J.filterSpecified&&Y.multiselect?ae.extent.push(ae.clickableOrdinalRange):(ae.extent=[ae.clickableOrdinalRange],J.filterSpecified=!0):Q?(ae.extent=ae.stayingIntervals,ae.extent.length===0&&I(J)):I(J),ae.brushCallback(Y),d(U.parentNode),ae.brushEndCallback(J.filterSpecified?te.getConsolidated():[]);return}var Z=function(){te.set(te.getConsolidated())};if(Y.ordinal){var j=Y.unitTickvals;j[j.length-1]ae.newExtent[0];ae.extent=ae.stayingIntervals.concat(K?[ae.newExtent]:[]),ae.extent.length||I(J),ae.brushCallback(Y),K?d(U.parentNode,Z):(Z(),d(U.parentNode))}else Z();ae.brushEndCallback(J.filterSpecified?te.getConsolidated():[])}function S(U,Y){var J=Y.height-P.mouse(U)[1]-2*m.verticalPadding,te=M(Y,J),ae="crosshair";te.clickableOrdinalRange?ae="pointer":te.region&&(ae=te.region+"-resize"),P.select(document.body).style("cursor",ae)}function b(U){U.on("mousemove",function(Y){P.event.preventDefault(),Y.parent.inBrushDrag||S(this,Y)}).on("mouseleave",function(Y){Y.parent.inBrushDrag||h()}).call(P.behavior.drag().on("dragstart",function(Y){T(this,Y)}).on("drag",function(Y){C(this,Y)}).on("dragend",function(Y){x(this,Y)}))}function a(U,Y){return U[0]-Y[0]}function E(U,Y,J){var te=J._context.staticPlot,ae=U.selectAll(".background").data(L);ae.enter().append("rect").classed("background",!0).call(c).call(u).style("pointer-events",te?"none":"auto").attr("transform",v(0,m.verticalPadding)),ae.call(b).attr("height",function(Z){return Z.height-m.verticalPadding});var ce=U.selectAll(".highlight-shadow").data(L);ce.enter().append("line").classed("highlight-shadow",!0).attr("x",-m.bar.width/2).attr("stroke-width",m.bar.width+m.bar.strokeWidth).attr("stroke",Y).attr("opacity",m.bar.strokeOpacity).attr("stroke-linecap","butt"),ce.attr("y1",function(Z){return Z.height}).call(o);var Q=U.selectAll(".highlight").data(L);Q.enter().append("line").classed("highlight",!0).attr("x",-m.bar.width/2).attr("stroke-width",m.bar.width-m.bar.strokeWidth).attr("stroke",m.bar.fillColor).attr("opacity",m.bar.fillOpacity).attr("stroke-linecap","butt"),Q.attr("y1",function(Z){return Z.height}).call(o)}function y(U,Y,J){var te=U.selectAll("."+m.cn.axisBrush).data(L,i);te.enter().append("g").classed(m.cn.axisBrush,!0),E(te,Y,J)}function z(U){return U.svgBrush.extent.map(function(Y){return Y.slice()})}function I(U){U.filterSpecified=!1,U.svgBrush.extent=[[-1/0,1/0]]}function B(U){return function(J){var te=J.brush,ae=z(te),ce=ae.slice();te.filter.set(ce),U()}}function k(U){for(var Y=U.slice(),J=[],te,ae=Y.shift();ae;){for(te=ae.slice();(ae=Y.shift())&&ae[0]<=te[1];)te[1]=Math.max(te[1],ae[1]);J.push(te)}return J.length===1&&J[0][0]>J[0][1]&&(J=[]),J}function O(){var U=[],Y,J;return{set:function(te){U=te.map(function(ae){return ae.slice().sort(A)}).sort(a),U.length===1&&U[0][0]===-1/0&&U[0][1]===1/0&&(U=[[0,-1]]),Y=k(U),J=U.reduce(function(ae,ce){return[Math.min(ae[0],ce[0]),Math.max(ae[1],ce[1])]},[1/0,-1/0])},get:function(){return U.slice()},getConsolidated:function(){return Y},getBounds:function(){return J}}}function N(U,Y,J,te,ae,ce){var Q=O();return Q.set(J),{filter:Q,filterSpecified:Y,svgBrush:{extent:[],brushStartCallback:te,brushCallback:B(ae),brushEndCallback:ce}}}function _(U,Y){if(Array.isArray(U[0])?(U=U.map(function(te){return te.sort(A)}),Y.multiselect?U=k(U.sort(a)):U=[U[0]]):U=[U.sort(A)],Y.tickvals){var J=Y.tickvals.slice().sort(A);if(U=U.map(function(te){var ae=[n(0,J,te[0],[]),n(1,J,te[1],[])];if(ae[1]>ae[0])return ae}).filter(function(te){return te}),!U.length)return}return U.length>1?U:U[0]}G.exports={makeBrush:N,ensureAxisBrush:y,cleanRanges:_}},71791:function(G,V,e){G.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(G,V,e){var m=e(39898),P=e(27659).a0,i=e(21341),L=e(77922);V.name="parcoords",V.plot=function(A){var v=P(A.calcdata,"parcoords")[0];v.length&&i(A,v)},V.clean=function(A,v,p,t){var r=t._has&&t._has("parcoords"),s=v._has&&v._has("parcoords");r&&!s&&(t._paperdiv.selectAll(".parcoords").remove(),t._glimages.selectAll("*").remove())},V.toSVG=function(A){var v=A._fullLayout._glimages,p=m.select(A).selectAll(".svg-container"),t=p.filter(function(s,n){return n===p.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function r(){var s=this,n=s.toDataURL("image/png"),l=v.append("svg:image");l.attr({xmlns:L.svg,"xlink:href":n,preserveAspectRatio:"none",x:0,y:0,width:s.style.width,height:s.style.height})}t.each(r),window.setTimeout(function(){m.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}},24639:function(G,V,e){var m=e(71828).isArrayOrTypedArray,P=e(21081),i=e(28984).wrap;G.exports=function(v,p){var t,r;return P.hasColorscale(p,"line")&&m(p.line.color)?(t=p.line.color,r=P.extractOpts(p.line).colorscale,P.calc(v,p,{vals:t,containerStr:"line",cLetter:"c"})):(t=L(p._length),r=[[0,p.line.color],[1,p.line.color]]),i({lineColor:t,cscale:r})};function L(A){for(var v=new Array(A),p=0;pr&&(m.log("parcoords traces support up to "+r+" dimensions at the moment"),o.splice(r));var d=A(u,g,{name:"dimensions",layout:w,handleItemDefaults:l}),M=n(u,g,f,w,h);L(g,w,h),(!Array.isArray(d)||!d.length)&&(g.visible=!1),s(g,d,"values",M);var T={family:w.font.family,size:Math.round(w.font.size/1.2),color:w.font.color};m.coerceFont(h,"labelfont",T),m.coerceFont(h,"tickfont",T),m.coerceFont(h,"rangefont",T),h("labelangle"),h("labelside"),h("unselected.line.color"),h("unselected.line.opacity")}},1602:function(G,V,e){var m=e(71828).isTypedArray;V.convertTypedArray=function(P){return m(P)?Array.prototype.slice.call(P):P},V.isOrdinal=function(P){return!!P.tickvals},V.isVisible=function(P){return P.visible||!("visible"in P)}},67618:function(G,V,e){var m=e(71791);m.plot=e(21341),G.exports=m},83398:function(G,V,e){var m=e(56068),P=m([`precision highp float; #define GLSLIFY 1 varying vec4 fragColor; attribute vec4 p01_04, p05_08, p09_12, p13_16, p17_20, p21_24, p25_28, p29_32, p33_36, p37_40, p41_44, p45_48, p49_52, p53_56, p57_60, colors; uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D, loA, hiA, loB, hiB, loC, hiC, loD, hiD; uniform vec2 resolution, viewBoxPos, viewBoxSize; uniform float maskHeight; uniform float drwLayer; // 0: context, 1: focus, 2: pick uniform vec4 contextColor; uniform sampler2D maskTexture, palette; bool isPick = (drwLayer > 1.5); bool isContext = (drwLayer < 0.5); const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0); const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0); float val(mat4 p, mat4 v) { return dot(matrixCompMult(p, v) * UNITS, UNITS); } float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) { float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D); float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D); return y1 * (1.0 - ratio) + y2 * ratio; } int iMod(int a, int b) { return a - b * (a / b); } bool fOutside(float p, float lo, float hi) { return (lo < hi) && (lo > p || p > hi); } bool vOutside(vec4 p, vec4 lo, vec4 hi) { return ( fOutside(p[0], lo[0], hi[0]) || fOutside(p[1], lo[1], hi[1]) || fOutside(p[2], lo[2], hi[2]) || fOutside(p[3], lo[3], hi[3]) ); } bool mOutside(mat4 p, mat4 lo, mat4 hi) { return ( vOutside(p[0], lo[0], hi[0]) || vOutside(p[1], lo[1], hi[1]) || vOutside(p[2], lo[2], hi[2]) || vOutside(p[3], lo[3], hi[3]) ); } bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) { return mOutside(A, loA, hiA) || mOutside(B, loB, hiB) || mOutside(C, loC, hiC) || mOutside(D, loD, hiD); } bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) { mat4 pnts[4]; pnts[0] = A; pnts[1] = B; pnts[2] = C; pnts[3] = D; for(int i = 0; i < 4; ++i) { for(int j = 0; j < 4; ++j) { for(int k = 0; k < 4; ++k) { if(0 == iMod( int(255.0 * texture2D(maskTexture, vec2( (float(i * 2 + j / 2) + 0.5) / 8.0, (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight ))[3] ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))), 2 )) return true; } } } return false; } vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) { float x = 0.5 * sign(v) + 0.5; float y = axisY(x, A, B, C, D); float z = 1.0 - abs(v); z += isContext ? 0.0 : 2.0 * float( outsideBoundingBox(A, B, C, D) || outsideRasterMask(A, B, C, D) ); return vec4( 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0, z, 1.0 ); } void main() { mat4 A = mat4(p01_04, p05_08, p09_12, p13_16); mat4 B = mat4(p17_20, p21_24, p25_28, p29_32); mat4 C = mat4(p33_36, p37_40, p41_44, p45_48); mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS); float v = colors[3]; gl_Position = position(isContext, v, A, B, C, D); fragColor = isContext ? vec4(contextColor) : isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5)); } `]),i=m([`precision highp float; #define GLSLIFY 1 varying vec4 fragColor; void main() { gl_FragColor = fragColor; } `]),L=e(25706).maxDimensionCount,A=e(71828),v=1e-6,p=2048,t=new Uint8Array(4),r=new Uint8Array(4),s={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function n(S){S.read({x:0,y:0,width:1,height:1,data:t})}function l(S,b,a,E,y){var z=S._gl;z.enable(z.SCISSOR_TEST),z.scissor(b,a,E,y),S.clear({color:[0,0,0,0],depth:1})}function c(S,b,a,E,y,z){var I=z.key;function B(k){var O=Math.min(E,y-k*E);k===0&&(window.cancelAnimationFrame(a.currentRafs[I]),delete a.currentRafs[I],l(S,z.scissorX,z.scissorY,z.scissorWidth,z.viewBoxSize[1])),!a.clearOnly&&(z.count=2*O,z.offset=2*k*E,b(z),k*E+O>>8*b)%256/255}function w(S,b,a){for(var E=new Array(S*(L+4)),y=0,z=0;zOe&&(Oe=q[he].dim1.canvasX,Me=he);ie===0&&l(y,0,0,O.canvasWidth,O.canvasHeight);var Ne=Z(a);for(he=0;hele._length&&(xe=xe.slice(0,le._length));var Se=le.tickvals,Ue;function He($e,et){return{val:$e,text:Ue[et]}}function Fe($e,et){return $e.val-et.val}if(Array.isArray(Se)&&Se.length){Ue=le.ticktext,!Array.isArray(Ue)||!Ue.length?Ue=Se.map(i(le.tickformat)):Ue.length>Se.length?Ue=Ue.slice(0,Se.length):Se.length>Ue.length&&(Se=Se.slice(0,Ue.length));for(var Ge=1;Ge=et||At>=ct)return;var Mt=qe.lineLayer.readPixel(pt,ct-1-At),Vt=Mt[3]!==0,Je=Vt?Mt[2]+256*(Mt[1]+256*Mt[0]):null,De={x:pt,y:At,clientX:$e.clientX,clientY:$e.clientY,dataIndex:qe.model.key,curveNumber:Je};Je!==he&&(Vt?Q.hover(De):Q.unhover&&Q.unhover(De),he=Je)}}),ie.style("opacity",function(qe){return qe.pick?0:1}),K.style("background","rgba(255, 255, 255, 0)");var Me=K.selectAll("."+f.cn.parcoords).data(le,l);Me.exit().remove(),Me.enter().append("g").classed(f.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),Me.attr("transform",function(qe){return p(qe.model.translateX,qe.model.translateY)});var Te=Me.selectAll("."+f.cn.parcoordsControlView).data(c,l);Te.enter().append("g").classed(f.cn.parcoordsControlView,!0),Te.attr("transform",function(qe){return p(qe.model.pad.l,qe.model.pad.t)});var Oe=Te.selectAll("."+f.cn.yAxis).data(function(qe){return qe.dimensions},l);Oe.enter().append("g").classed(f.cn.yAxis,!0),Te.each(function(qe){N(Oe,qe,oe)}),ie.each(function(qe){if(qe.viewModel){!qe.lineLayer||Q?qe.lineLayer=h(this,qe):qe.lineLayer.update(qe),(qe.key||qe.key===0)&&(qe.viewModel[qe.key]=qe.lineLayer);var $e=!qe.context||Q;qe.lineLayer.render(qe.viewModel.panels,$e)}}),Oe.attr("transform",function(qe){return p(qe.xScale(qe.xIndex),0)}),Oe.call(m.behavior.drag().origin(function(qe){return qe}).on("drag",function(qe){var $e=qe.parent;$.linePickActive(!1),qe.x=Math.max(-f.overdrag,Math.min(qe.model.width+f.overdrag,m.event.x)),qe.canvasX=qe.x*qe.model.canvasPixelRatio,Oe.sort(function(et,ct){return et.x-ct.x}).each(function(et,ct){et.xIndex=ct,et.x=qe===et?et.x:et.xScale(et.xIndex),et.canvasX=et.x*et.model.canvasPixelRatio}),N(Oe,$e,oe),Oe.filter(function(et){return Math.abs(qe.xIndex-et.xIndex)!==0}).attr("transform",function(et){return p(et.xScale(et.xIndex),0)}),m.select(this).attr("transform",p(qe.x,0)),Oe.each(function(et,ct,dt){dt===qe.parent.key&&($e.dimensions[ct]=et)}),$e.contextLayer&&$e.contextLayer.render($e.panels,!1,!y($e)),$e.focusLayer.render&&$e.focusLayer.render($e.panels)}).on("dragend",function(qe){var $e=qe.parent;qe.x=qe.xScale(qe.xIndex),qe.canvasX=qe.x*qe.model.canvasPixelRatio,N(Oe,$e,oe),m.select(this).attr("transform",function(et){return p(et.x,0)}),$e.contextLayer&&$e.contextLayer.render($e.panels,!1,!y($e)),$e.focusLayer&&$e.focusLayer.render($e.panels),$e.pickLayer&&$e.pickLayer.render($e.panels,!0),$.linePickActive(!0),Q&&Q.axesMoved&&Q.axesMoved($e.key,$e.dimensions.map(function(et){return et.crossfilterDimensionIndex}))})),Oe.exit().remove();var Ne=Oe.selectAll("."+f.cn.axisOverlays).data(c,l);Ne.enter().append("g").classed(f.cn.axisOverlays,!0),Ne.selectAll("."+f.cn.axis).remove();var Ee=Ne.selectAll("."+f.cn.axis).data(c,l);Ee.enter().append("g").classed(f.cn.axis,!0),Ee.each(function(qe){var $e=qe.model.height/qe.model.tickDistance,et=qe.domainScale,ct=et.domain();m.select(this).call(m.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks($e,qe.tickFormat).tickValues(qe.ordinal?ct:null).tickFormat(function(dt){return g.isOrdinal(qe)?dt:U(qe.model.dimensions[qe.visibleIndex],dt)}).scale(et)),r.font(Ee.selectAll("text"),qe.model.tickFont)}),Ee.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),Ee.selectAll("text").style("text-shadow",t.makeTextShadow(q)).style("cursor","default");var xe=Ne.selectAll("."+f.cn.axisHeading).data(c,l);xe.enter().append("g").classed(f.cn.axisHeading,!0);var Se=xe.selectAll("."+f.cn.axisTitle).data(c,l);Se.enter().append("text").classed(f.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",Z?"none":"auto"),Se.text(function(qe){return qe.label}).each(function(qe){var $e=m.select(this);r.font($e,qe.model.labelFont),t.convertToTspans($e,te)}).attr("transform",function(qe){var $e=O(qe.model.labelAngle,qe.model.labelSide),et=f.axisTitleOffset;return($e.dir>0?"":p(0,2*et+qe.model.height))+v($e.degrees)+p(-et*$e.dx,-et*$e.dy)}).attr("text-anchor",function(qe){var $e=O(qe.model.labelAngle,qe.model.labelSide),et=Math.abs($e.dx),ct=Math.abs($e.dy);return 2*et>ct?$e.dir*$e.dx<0?"start":"end":"middle"});var Ue=Ne.selectAll("."+f.cn.axisExtent).data(c,l);Ue.enter().append("g").classed(f.cn.axisExtent,!0);var He=Ue.selectAll("."+f.cn.axisExtentTop).data(c,l);He.enter().append("g").classed(f.cn.axisExtentTop,!0),He.attr("transform",p(0,-f.axisExtentOffset));var Fe=He.selectAll("."+f.cn.axisExtentTopText).data(c,l);Fe.enter().append("text").classed(f.cn.axisExtentTopText,!0).call(B),Fe.text(function(qe){return Y(qe,!0)}).each(function(qe){r.font(m.select(this),qe.model.rangeFont)});var Ge=Ue.selectAll("."+f.cn.axisExtentBottom).data(c,l);Ge.enter().append("g").classed(f.cn.axisExtentBottom,!0),Ge.attr("transform",function(qe){return p(0,qe.model.height+f.axisExtentOffset)});var nt=Ge.selectAll("."+f.cn.axisExtentBottomText).data(c,l);nt.enter().append("text").classed(f.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(B),nt.text(function(qe){return Y(qe,!1)}).each(function(qe){r.font(m.select(this),qe.model.rangeFont)}),w.ensureAxisBrush(Ne,q,te)}},21341:function(G,V,e){var m=e(17171),P=e(79749),i=e(1602).isVisible,L={};function A(t,r,s){var n=r.indexOf(s),l=t.indexOf(n);return l===-1&&(l+=r.length),l}function v(t,r){return function(n,l){return A(t,r,n)-A(t,r,l)}}var p=G.exports=function(r,s){var n=r._fullLayout,l=P(r,[],L);if(l){var c={},u={},g={},f={},w=n._size;s.forEach(function(T,C){var x=T[0].trace;g[C]=x.index;var S=f[C]=x._fullInput.index;c[C]=r.data[S].dimensions,u[C]=r.data[S].dimensions.slice()});var h=function(T,C,x){var S=u[T][C],b=x.map(function(B){return B.slice()}),a="dimensions["+C+"].constraintrange",E=n._tracePreGUI[r._fullData[g[T]]._fullInput.uid];if(E[a]===void 0){var y=S.constraintrange;E[a]=y||null}var z=r._fullData[g[T]].dimensions[C];b.length?(b.length===1&&(b=b[0]),S.constraintrange=b,z.constraintrange=b.slice(),b=[b]):(delete S.constraintrange,delete z.constraintrange,b=null);var I={};I[a]=b,r.emit("plotly_restyle",[I,[f[T]]])},o=function(T){r.emit("plotly_hover",T)},d=function(T){r.emit("plotly_unhover",T)},M=function(T,C){var x=v(C,u[T].filter(i));c[T].sort(x),u[T].filter(function(S){return!i(S)}).sort(function(S){return u[T].indexOf(S)}).forEach(function(S){c[T].splice(c[T].indexOf(S),1),c[T].splice(u[T].indexOf(S),0,S)}),r.emit("plotly_restyle",[{dimensions:[c[T]]},[f[T]]])};m(r,s,{width:w.w,height:w.h,margin:{t:w.t,r:w.r,b:w.b,l:w.l}},{filterChanged:h,hover:o,unhover:d,axesMoved:M})}};p.reglPrecompiled=L},34e3:function(G,V,e){var m=e(9012),P=e(27670).Y,i=e(41940),L=e(22399),A=e(5386).fF,v=e(5386).si,p=e(1426).extendFlat,t=e(79952).u,r=i({editType:"plot",arrayOk:!0,colorEditType:"plot"});G.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:L.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:t,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:p({},m.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:A({},{keys:["label","color","value","percent","text"]}),texttemplate:v({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:p({},r,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:p({},r,{}),outsidetextfont:p({},r,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:p({},r,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:P({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:p({},r,{}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc"}}}},13584:function(G,V,e){var m=e(74875);V.name="pie",V.plot=function(P,i,L,A){m.plotBasePlot(V.name,P,i,L,A)},V.clean=function(P,i,L,A){m.cleanBasePlot(V.name,P,i,L,A)}},32354:function(G,V,e){var m=e(92770),P=e(84267),i=e(7901),L={};function A(r,s){var n=[],l=r._fullLayout,c=l.hiddenlabels||[],u=s.labels,g=s.marker.colors||[],f=s.values,w=s._length,h=s._hasValues&&w,o,d;if(s.dlabel)for(u=new Array(w),o=0;o=0});var y=s.type==="funnelarea"?x:s.sort;return y&&n.sort(function(z,I){return I.v-z.v}),n[0]&&(n[0].vTotal=C),n}function v(r){return function(n,l){return!n||(n=P(n),!n.isValid())?!1:(n=i.addOpacity(n,n.getAlpha()),r[l]||(r[l]=n),n)}}function p(r,s){var n=(s||{}).type;n||(n="pie");var l=r._fullLayout,c=r.calcdata,u=l[n+"colorway"],g=l["_"+n+"colormap"];l["extend"+n+"colors"]&&(u=t(u,L));for(var f=0,w=0;w0){g=!0;break}}g||(u=0)}return{hasLabels:l,hasValues:c,len:u}}function t(s,n,l,c,u){var g=c("marker.line.width");g&&c("marker.line.color",u?void 0:l.paper_bgcolor);var f=c("marker.colors");v(c,"marker.pattern",f),s.marker&&!n.marker.pattern.fgcolor&&(n.marker.pattern.fgcolor=s.marker.colors),n.marker.pattern.bgcolor||(n.marker.pattern.bgcolor=l.paper_bgcolor)}function r(s,n,l,c){function u(E,y){return P.coerce(s,n,i,E,y)}var g=u("labels"),f=u("values"),w=p(g,f),h=w.len;if(n._hasLabels=w.hasLabels,n._hasValues=w.hasValues,!n._hasLabels&&n._hasValues&&(u("label0"),u("dlabel")),!h){n.visible=!1;return}n._length=h,t(s,n,c,u,!0),u("scalegroup");var o=u("text"),d=u("texttemplate"),M;if(d||(M=u("textinfo",Array.isArray(o)?"text+percent":"percent")),u("hovertext"),u("hovertemplate"),d||M&&M!=="none"){var T=u("textposition");A(s,n,c,u,T,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var C=Array.isArray(T)||T==="auto",x=C||T==="outside";x&&u("automargin"),(T==="inside"||T==="auto"||Array.isArray(T))&&u("insidetextorientation")}L(n,c,u);var S=u("hole"),b=u("title.text");if(b){var a=u("title.position",S?"middle center":"top center");!S&&a==="middle center"&&(n.title.position="top center"),P.coerceFont(u,"title.font",c.font)}u("sort"),u("direction"),u("rotation"),u("pull")}G.exports={handleLabelsAndValues:p,handleMarkerDefaults:t,supplyDefaults:r}},20007:function(G,V,e){var m=e(23469).appendArrayMultiPointValues;G.exports=function(i,L){var A={curveNumber:L.index,pointNumbers:i.pts,data:L._input,fullData:L,label:i.label,color:i.color,value:i.v,percent:i.percent,text:i.text,bbox:i.bbox,v:i.v};return i.pts.length===1&&(A.pointNumber=A.i=i.pts[0]),m(A,L,i.pts),L.type==="funnelarea"&&(delete A.v,delete A.i),A}},22209:function(G,V,e){var m=e(91424),P=e(7901);G.exports=function(L,A,v,p){var t=v.marker.pattern;t&&t.shape?m.pointStyle(L,v,p,A):P.fill(L,A.color)}},53581:function(G,V,e){var m=e(71828);function P(i){return i.indexOf("e")!==-1?i.replace(/[.]?0+e/,"e"):i.indexOf(".")!==-1?i.replace(/[.]?0+$/,""):i}V.formatPiePercent=function(L,A){var v=P((L*100).toPrecision(3));return m.numSeparate(v,A)+"%"},V.formatPieValue=function(L,A){var v=P(L.toPrecision(10));return m.numSeparate(v,A)},V.getFirstFilled=function(L,A){if(Array.isArray(L))for(var v=0;v0&&(nt+=ct*Fe.pxmid[0],qe+=ct*Fe.pxmid[1])}Fe.cxFinal=nt,Fe.cyFinal=qe;function dt(Ie,ze,Pe,be){var se=be*(ze[0]-Ie[0]),ye=be*(ze[1]-Ie[1]);return"a"+be*ie.r+","+be*ie.r+" 0 "+Fe.largeArc+(Pe?" 1 ":" 0 ")+se+","+ye}var pt=he.hole;if(Fe.v===ie.vTotal){var At="M"+(nt+Fe.px0[0])+","+(qe+Fe.px0[1])+dt(Fe.px0,Fe.pxmid,!0,1)+dt(Fe.pxmid,Fe.px0,!0,1)+"Z";pt?et.attr("d","M"+(nt+pt*Fe.px0[0])+","+(qe+pt*Fe.px0[1])+dt(Fe.px0,Fe.pxmid,!1,pt)+dt(Fe.pxmid,Fe.px0,!1,pt)+"Z"+At):et.attr("d",At)}else{var Mt=dt(Fe.px0,Fe.px1,!0,1);if(pt){var Vt=1-pt;et.attr("d","M"+(nt+pt*Fe.px1[0])+","+(qe+pt*Fe.px1[1])+dt(Fe.px1,Fe.px0,!1,pt)+"l"+Vt*Fe.px0[0]+","+Vt*Fe.px0[1]+Mt+"Z")}else et.attr("d","M"+nt+","+qe+"l"+Fe.px0[0]+","+Fe.px0[1]+Mt+"Z")}ce(Z,Fe,ie);var Je=u.castOption(he.textposition,Fe.pts),De=$e.selectAll("g.slicetext").data(Fe.text&&Je!=="none"?[0]:[]);De.enter().append("g").classed("slicetext",!0),De.exit().remove(),De.each(function(){var Ie=v.ensureSingle(m.select(this),"text","",function(ot){ot.attr("data-notex",1)}),ze=v.ensureUniformFontSize(Z,Je==="outside"?d(he,Fe,ee.font):M(he,Fe,ee.font));Ie.text(Fe.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(A.font,ze).call(r.convertToTspans,Z);var Pe=A.bBox(Ie.node()),be;if(Je==="outside")be=I(Pe,Fe);else if(be=C(Pe,Fe,ie),Je==="auto"&&be.scale<1){var se=v.ensureUniformFontSize(Z,he.outsidetextfont);Ie.call(A.font,se),Pe=A.bBox(Ie.node()),be=I(Pe,Fe)}var ye=be.textPosAngle,Le=ye===void 0?Fe.pxmid:ae(ie.r,ye);if(be.targetX=nt+Le[0]*be.rCenter+(be.x||0),be.targetY=qe+Le[1]*be.rCenter+(be.y||0),Q(be,Pe),be.outside){var Be=be.targetY;Fe.yLabelMin=Be-Pe.height/2,Fe.yLabelMid=Be,Fe.yLabelMax=Be+Pe.height/2,Fe.labelExtraX=0,Fe.labelExtraY=0,Te=!0}be.fontSize=ze.size,n(he.type,be,ee),$[Ge].transform=be,v.setTransormAndDisplay(Ie,be)})});var Oe=m.select(this).selectAll("g.titletext").data(he.title.text?[0]:[]);if(Oe.enter().append("g").classed("titletext",!0),Oe.exit().remove(),Oe.each(function(){var Fe=v.ensureSingle(m.select(this),"text","",function(qe){qe.attr("data-notex",1)}),Ge=he.title.text;he._meta&&(Ge=v.templateString(Ge,he._meta)),Fe.text(Ge).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(A.font,he.title.font).call(r.convertToTspans,Z);var nt;he.title.position==="middle center"?nt=B(ie):nt=k(ie,oe),Fe.attr("transform",t(nt.x,nt.y)+p(Math.min(1,nt.scale))+t(nt.tx,nt.ty))}),Te&&U(Me,he),h(me,he),Te&&he.automargin){var Ne=A.bBox(le.node()),Ee=he.domain,xe=oe.w*(Ee.x[1]-Ee.x[0]),Se=oe.h*(Ee.y[1]-Ee.y[0]),Ue=(.5*xe-ie.r)/oe.w,He=(.5*Se-ie.r)/oe.h;P.autoMargin(Z,"pie."+he.uid+".automargin",{xl:Ee.x[0]-Ue,xr:Ee.x[1]+Ue,yb:Ee.y[0]-He,yt:Ee.y[1]+He,l:Math.max(ie.cx-ie.r-Ne.left,0),r:Math.max(Ne.right-(ie.cx+ie.r),0),b:Math.max(Ne.bottom-(ie.cy+ie.r),0),t:Math.max(ie.cy-ie.r-Ne.top,0),pad:5})}})});setTimeout(function(){q.selectAll("tspan").each(function(){var $=m.select(this);$.attr("dy")&&$.attr("dy",$.attr("dy"))})},0)}function h(Z,j){Z.each(function(K){var ee=m.select(this);if(!K.labelExtraX&&!K.labelExtraY){ee.select("path.textline").remove();return}var oe=ee.select("g.slicetext text");K.transform.targetX+=K.labelExtraX,K.transform.targetY+=K.labelExtraY,v.setTransormAndDisplay(oe,K.transform);var q=K.cxFinal+K.pxmid[0],$=K.cyFinal+K.pxmid[1],le="M"+q+","+$,ie=(K.yLabelMax-K.yLabelMin)*(K.pxmid[0]<0?-1:1)/4;if(K.labelExtraX){var he=K.labelExtraX*K.pxmid[1]/K.pxmid[0],me=K.yLabelMid+K.labelExtraY-(K.cyFinal+K.pxmid[1]);Math.abs(he)>Math.abs(me)?le+="l"+me*K.pxmid[0]/K.pxmid[1]+","+me+"H"+(q+K.labelExtraX+ie):le+="l"+K.labelExtraX+","+he+"v"+(me-he)+"h"+ie}else le+="V"+(K.yLabelMid+K.labelExtraY)+"h"+ie;v.ensureSingle(ee,"path","textline").call(L.stroke,j.outsidetextfont.color).attr({"stroke-width":Math.min(2,j.outsidetextfont.size/8),d:le,fill:"none"})})}function o(Z,j,K){var ee=K[0],oe=ee.cx,q=ee.cy,$=ee.trace,le=$.type==="funnelarea";"_hasHoverLabel"in $||($._hasHoverLabel=!1),"_hasHoverEvent"in $||($._hasHoverEvent=!1),Z.on("mouseover",function(ie){var he=j._fullLayout,me=j._fullData[$.index];if(!(j._dragging||he.hovermode===!1)){var Me=me.hoverinfo;if(Array.isArray(Me)&&(Me=i.castHoverinfo({hoverinfo:[u.castOption(Me,ie.pts)],_module:$._module},he,0)),Me==="all"&&(Me="label+text+value+percent+name"),me.hovertemplate||Me!=="none"&&Me!=="skip"&&Me){var Te=ie.rInscribed||0,Oe=oe+ie.pxmid[0]*(1-Te),Ne=q+ie.pxmid[1]*(1-Te),Ee=he.separators,xe=[];if(Me&&Me.indexOf("label")!==-1&&xe.push(ie.label),ie.text=u.castOption(me.hovertext||me.text,ie.pts),Me&&Me.indexOf("text")!==-1){var Se=ie.text;v.isValidTextValue(Se)&&xe.push(Se)}ie.value=ie.v,ie.valueLabel=u.formatPieValue(ie.v,Ee),Me&&Me.indexOf("value")!==-1&&xe.push(ie.valueLabel),ie.percent=ie.v/ee.vTotal,ie.percentLabel=u.formatPiePercent(ie.percent,Ee),Me&&Me.indexOf("percent")!==-1&&xe.push(ie.percentLabel);var Ue=me.hoverlabel,He=Ue.font,Fe=[];i.loneHover({trace:$,x0:Oe-Te*ee.r,x1:Oe+Te*ee.r,y:Ne,_x0:le?oe+ie.TL[0]:Oe-Te*ee.r,_x1:le?oe+ie.TR[0]:Oe+Te*ee.r,_y0:le?q+ie.TL[1]:Ne-Te*ee.r,_y1:le?q+ie.BL[1]:Ne+Te*ee.r,text:xe.join("
"),name:me.hovertemplate||Me.indexOf("name")!==-1?me.name:void 0,idealAlign:ie.pxmid[0]<0?"left":"right",color:u.castOption(Ue.bgcolor,ie.pts)||ie.color,borderColor:u.castOption(Ue.bordercolor,ie.pts),fontFamily:u.castOption(He.family,ie.pts),fontSize:u.castOption(He.size,ie.pts),fontColor:u.castOption(He.color,ie.pts),nameLength:u.castOption(Ue.namelength,ie.pts),textAlign:u.castOption(Ue.align,ie.pts),hovertemplate:u.castOption(me.hovertemplate,ie.pts),hovertemplateLabels:ie,eventData:[g(ie,me)]},{container:he._hoverlayer.node(),outerContainer:he._paper.node(),gd:j,inOut_bbox:Fe}),ie.bbox=Fe[0],$._hasHoverLabel=!0}$._hasHoverEvent=!0,j.emit("plotly_hover",{points:[g(ie,me)],event:m.event})}}),Z.on("mouseout",function(ie){var he=j._fullLayout,me=j._fullData[$.index],Me=m.select(this).datum();$._hasHoverEvent&&(ie.originalEvent=m.event,j.emit("plotly_unhover",{points:[g(Me,me)],event:m.event}),$._hasHoverEvent=!1),$._hasHoverLabel&&(i.loneUnhover(he._hoverlayer.node()),$._hasHoverLabel=!1)}),Z.on("click",function(ie){var he=j._fullLayout,me=j._fullData[$.index];j._dragging||he.hovermode===!1||(j._hoverdata=[g(ie,me)],i.click(j,m.event))})}function d(Z,j,K){var ee=u.castOption(Z.outsidetextfont.color,j.pts)||u.castOption(Z.textfont.color,j.pts)||K.color,oe=u.castOption(Z.outsidetextfont.family,j.pts)||u.castOption(Z.textfont.family,j.pts)||K.family,q=u.castOption(Z.outsidetextfont.size,j.pts)||u.castOption(Z.textfont.size,j.pts)||K.size;return{color:ee,family:oe,size:q}}function M(Z,j,K){var ee=u.castOption(Z.insidetextfont.color,j.pts);!ee&&Z._input.textfont&&(ee=u.castOption(Z._input.textfont.color,j.pts));var oe=u.castOption(Z.insidetextfont.family,j.pts)||u.castOption(Z.textfont.family,j.pts)||K.family,q=u.castOption(Z.insidetextfont.size,j.pts)||u.castOption(Z.textfont.size,j.pts)||K.size;return{color:ee||L.contrast(j.color),family:oe,size:q}}function T(Z,j){for(var K,ee,oe=0;oe=-4;Ue-=2)Se(Math.PI*Ue,"tan");for(Ue=4;Ue>=-4;Ue-=2)Se(Math.PI*(Ue+1),"tan")}if(Me||Oe){for(Ue=4;Ue>=-4;Ue-=2)Se(Math.PI*(Ue+1.5),"rad");for(Ue=4;Ue>=-4;Ue-=2)Se(Math.PI*(Ue+.5),"rad")}}if(le||Ne||Me){var He=Math.sqrt(Z.width*Z.width+Z.height*Z.height);if(xe={scale:oe*ee*2/He,rCenter:1-oe,rotate:0},xe.textPosAngle=(j.startangle+j.stopangle)/2,xe.scale>=1)return xe;Ee.push(xe)}(Ne||Oe)&&(xe=S(Z,ee,$,ie,he),xe.textPosAngle=(j.startangle+j.stopangle)/2,Ee.push(xe)),(Ne||Te)&&(xe=b(Z,ee,$,ie,he),xe.textPosAngle=(j.startangle+j.stopangle)/2,Ee.push(xe));for(var Fe=0,Ge=0,nt=0;nt=1)break}return Ee[Fe]}function x(Z,j){var K=Z.startangle,ee=Z.stopangle;return K>j&&j>ee||K0?1:-1)/2,y:q/(1+K*K/(ee*ee)),outside:!0}}function B(Z){var j=Math.sqrt(Z.titleBox.width*Z.titleBox.width+Z.titleBox.height*Z.titleBox.height);return{x:Z.cx,y:Z.cy,scale:Z.trace.hole*Z.r*2/j,tx:0,ty:-Z.titleBox.height/2+Z.trace.title.font.size}}function k(Z,j){var K=1,ee=1,oe,q=Z.trace,$={x:Z.cx,y:Z.cy},le={tx:0,ty:0};le.ty+=q.title.font.size,oe=_(q),q.title.position.indexOf("top")!==-1?($.y-=(1+oe)*Z.r,le.ty-=Z.titleBox.height):q.title.position.indexOf("bottom")!==-1&&($.y+=(1+oe)*Z.r);var ie=O(Z.r,Z.trace.aspectratio),he=j.w*(q.domain.x[1]-q.domain.x[0])/2;return q.title.position.indexOf("left")!==-1?(he=he+ie,$.x-=(1+oe)*ie,le.tx+=Z.titleBox.width/2):q.title.position.indexOf("center")!==-1?he*=2:q.title.position.indexOf("right")!==-1&&(he=he+ie,$.x+=(1+oe)*ie,le.tx-=Z.titleBox.width/2),K=he/Z.titleBox.width,ee=N(Z,j)/Z.titleBox.height,{x:$.x,y:$.y,scale:Math.min(K,ee),tx:le.tx,ty:le.ty}}function O(Z,j){return Z/(j===void 0?1:j)}function N(Z,j){var K=Z.trace,ee=j.h*(K.domain.y[1]-K.domain.y[0]);return Math.min(Z.titleBox.height,ee/2)}function _(Z){var j=Z.pull;if(!j)return 0;var K;if(Array.isArray(j))for(j=0,K=0;Kj&&(j=Z.pull[K]);return j}function U(Z,j){var K,ee,oe,q,$,le,ie,he,me,Me,Te,Oe,Ne;function Ee(He,Fe){return He.pxmid[1]-Fe.pxmid[1]}function xe(He,Fe){return Fe.pxmid[1]-He.pxmid[1]}function Se(He,Fe){Fe||(Fe={});var Ge=Fe.labelExtraY+(ee?Fe.yLabelMax:Fe.yLabelMin),nt=ee?He.yLabelMin:He.yLabelMax,qe=ee?He.yLabelMax:He.yLabelMin,$e=He.cyFinal+$(He.px0[1],He.px1[1]),et=Ge-nt,ct,dt,pt,At,Mt,Vt;if(et*ie>0&&(He.labelExtraY=et),!!Array.isArray(j.pull))for(dt=0;dt=(u.castOption(j.pull,pt.pts)||0))&&((He.pxmid[1]-pt.pxmid[1])*ie>0?(At=pt.cyFinal+$(pt.px0[1],pt.px1[1]),et=At-nt-He.labelExtraY,et*ie>0&&(He.labelExtraY+=et)):(qe+He.labelExtraY-$e)*ie>0&&(ct=3*le*Math.abs(dt-Me.indexOf(He)),Mt=pt.cxFinal+q(pt.px0[0],pt.px1[0]),Vt=Mt+ct-(He.cxFinal+He.pxmid[0])-He.labelExtraX,Vt*le>0&&(He.labelExtraX+=Vt)))}for(ee=0;ee<2;ee++)for(oe=ee?Ee:xe,$=ee?Math.max:Math.min,ie=ee?1:-1,K=0;K<2;K++){for(q=K?Math.max:Math.min,le=K?1:-1,he=Z[ee][K],he.sort(oe),me=Z[1-ee][K],Me=me.concat(he),Oe=[],Te=0;Te1?(he=K.r,me=he/oe.aspectratio):(me=K.r,he=me*oe.aspectratio),he*=(1+oe.baseratio)/2,ie=he*me}$=Math.min($,ie/K.vTotal)}for(ee=0;eej.vTotal/2?1:0,he.halfangle=Math.PI*Math.min(he.v/j.vTotal,.5),he.ring=1-ee.hole,he.rInscribed=z(he,j))}function ae(Z,j){return[Z*Math.sin(j),-Z*Math.cos(j)]}function ce(Z,j,K){var ee=Z._fullLayout,oe=K.trace,q=oe.texttemplate,$=oe.textinfo;if(!q&&$&&$!=="none"){var le=$.split("+"),ie=function(Fe){return le.indexOf(Fe)!==-1},he=ie("label"),me=ie("text"),Me=ie("value"),Te=ie("percent"),Oe=ee.separators,Ne;if(Ne=he?[j.label]:[],me){var Ee=u.getFirstFilled(oe.text,j.pts);f(Ee)&&Ne.push(Ee)}Me&&Ne.push(u.formatPieValue(j.v,Oe)),Te&&Ne.push(u.formatPiePercent(j.v/K.vTotal,Oe)),j.text=Ne.join("
")}function xe(Fe){return{label:Fe.label,value:Fe.v,valueLabel:u.formatPieValue(Fe.v,ee.separators),percent:Fe.v/K.vTotal,percentLabel:u.formatPiePercent(Fe.v/K.vTotal,ee.separators),color:Fe.color,text:Fe.text,customdata:v.castOption(oe,Fe.i,"customdata")}}if(q){var Se=v.castOption(oe,j.i,"texttemplate");if(!Se)j.text="";else{var Ue=xe(j),He=u.getFirstFilled(oe.text,j.pts);(f(He)||He==="")&&(Ue.text=He),j.text=v.texttemplateString(Se,Ue,Z._fullLayout._d3locale,Ue,oe._meta||{})}}}function Q(Z,j){var K=Z.rotate*Math.PI/180,ee=Math.cos(K),oe=Math.sin(K),q=(j.left+j.right)/2,$=(j.top+j.bottom)/2;Z.textX=q*ee-$*oe,Z.textY=q*oe+$*ee,Z.noCenter=!0}G.exports={plot:w,formatSliceLabel:ce,transformInsideText:C,determineInsideTextFont:M,positionTitleOutside:k,prerenderTitles:T,layoutAreas:Y,attachFxHandlers:o,computeTransform:Q}},68357:function(G,V,e){var m=e(39898),P=e(63463),i=e(72597).resizeText;G.exports=function(A){var v=A._fullLayout._pielayer.selectAll(".trace");i(A,v,"pie"),v.each(function(p){var t=p[0],r=t.trace,s=m.select(this);s.style({opacity:r.opacity}),s.selectAll("path.surface").each(function(n){m.select(this).call(P,n,r,A)})})}},63463:function(G,V,e){var m=e(7901),P=e(53581).castOption,i=e(22209);G.exports=function(A,v,p,t){var r=p.marker.line,s=P(r.color,v.pts)||m.defaultLine,n=P(r.width,v.pts)||0;A.call(i,v,p,t).style("stroke-width",n).call(m.stroke,s)}},10959:function(G,V,e){var m=e(82196);G.exports={x:m.x,y:m.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:m.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(G,V,e){var m=e(9330).gl_pointcloud2d,P=e(78614),i=e(71739).findExtremes,L=e(34603);function A(t,r){this.scene=t,this.uid=r,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=m(t.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var v=A.prototype;v.handlePick=function(t){var r=this.idToIndex[t.pointId];return{trace:this,dataCoord:t.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[r*2],this.pickXYData[r*2+1]]:[this.pickXData[r],this.pickYData[r]],textLabel:Array.isArray(this.textLabels)?this.textLabels[r]:this.textLabels,color:this.color,name:this.name,pointIndex:r,hoverinfo:this.hoverinfo}},v.update=function(t){this.index=t.index,this.textLabels=t.text,this.name=t.name,this.hoverinfo=t.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(t),this.color=L(t,{})},v.updateFast=function(t){var r=this.xData=this.pickXData=t.x,s=this.yData=this.pickYData=t.y,n=this.pickXYData=t.xy,l=t.xbounds&&t.ybounds,c=t.indices,u,g,f,w=this.bounds,h,o,d;if(n){if(f=n,u=n.length>>>1,l)w[0]=t.xbounds[0],w[2]=t.xbounds[1],w[1]=t.ybounds[0],w[3]=t.ybounds[1];else for(d=0;dw[2]&&(w[2]=h),ow[3]&&(w[3]=o);if(c)g=c;else for(g=new Int32Array(u),d=0;dw[2]&&(w[2]=h),ow[3]&&(w[3]=o);this.idToIndex=g,this.pointcloudOptions.idToIndex=g,this.pointcloudOptions.positions=f;var M=P(t.marker.color),T=P(t.marker.border.color),C=t.opacity*t.marker.opacity;M[3]*=C,this.pointcloudOptions.color=M;var x=t.marker.blend;if(x===null){var S=100;x=r.lengthT&&(T=n.source[h]),n.target[h]>T&&(T=n.target[h]);var C=T+1;r.node._count=C;var x,S=r.node.groups,b={};for(h=0;h0&&A(B,C)&&A(k,C)&&!(b.hasOwnProperty(B)&&b.hasOwnProperty(k)&&b[B]===b[k])){b.hasOwnProperty(k)&&(k=b[k]),b.hasOwnProperty(B)&&(B=b[B]),B=+B,k=+k,g[B]=g[k]=!0;var O="";n.label&&n.label[h]&&(O=n.label[h]);var N=null;O&&f.hasOwnProperty(O)&&(N=f[O]),l.push({pointNumber:h,label:O,color:c?n.color[h]:n.color,customdata:u?n.customdata[h]:n.customdata,concentrationscale:N,source:B,target:k,value:+I}),z.source.push(B),z.target.push(k)}}var _=C+S.length,U=L(s.color),Y=L(s.customdata),J=[];for(h=0;h<_;h++)if(g[h]){var te=s.label[h];J.push({group:h>C-1,childrenNodes:[],pointNumber:h,label:te,color:U?s.color[h]:s.color,customdata:Y?s.customdata[h]:s.customdata})}var ae=!1;return t(_,z.source,z.target)&&(ae=!0),{circular:ae,links:l,nodes:J,groups:S,groupLookup:b}}function t(r,s,n){for(var l=P.init2dArray(r,0),c=0;c1})}G.exports=function(s,n){var l=p(n);return i({circular:l.circular,_nodes:l.nodes,_links:l.links,_groups:l.groups,_groupLookup:l.groupLookup})}},85247:function(G){G.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(G,V,e){var m=e(71828),P=e(39953),i=e(7901),L=e(84267),A=e(27670).c,v=e(38048),p=e(44467),t=e(85501);G.exports=function(n,l,c,u){function g(a,E){return m.coerce(n,l,P,a,E)}var f=m.extendDeep(u.hoverlabel,n.hoverlabel),w=n.node,h=p.newContainer(l,"node");function o(a,E){return m.coerce(w,h,P.node,a,E)}o("label"),o("groups"),o("x"),o("y"),o("pad"),o("thickness"),o("line.color"),o("line.width"),o("hoverinfo",n.hoverinfo),v(w,h,o,f),o("hovertemplate");var d=u.colorway,M=function(a){return d[a%d.length]};o("color",h.label.map(function(a,E){return i.addOpacity(M(E),.8)})),o("customdata");var T=n.link||{},C=p.newContainer(l,"link");function x(a,E){return m.coerce(T,C,P.link,a,E)}x("label"),x("arrowlen"),x("source"),x("target"),x("value"),x("line.color"),x("line.width"),x("hoverinfo",n.hoverinfo),v(T,C,x,f),x("hovertemplate");var S=L(u.paper_bgcolor).getLuminance()<.333?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)";x("color",m.repeat(S,C.value.length)),x("customdata"),t(T,C,{name:"colorscales",handleItemDefaults:r}),A(l,u,g),g("orientation"),g("valueformat"),g("valuesuffix");var b;h.x.length&&h.y.length&&(b="freeform"),g("arrangement",b),m.coerceFont(g,"textfont",m.extendFlat({},u.font)),l._length=null};function r(s,n){function l(c,u){return m.coerce(s,n,P.link.colorscales,c,u)}l("label"),l("cmin"),l("cmax"),l("colorscale")}},29396:function(G,V,e){G.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(G,V,e){var m=e(39898),P=e(71828),i=P.numberFormat,L=e(3393),A=e(30211),v=e(7901),p=e(85247).cn,t=P._;function r(d){return d!==""}function s(d,M){return d.filter(function(T){return T.key===M.traceId})}function n(d,M){m.select(d).select("path").style("fill-opacity",M),m.select(d).select("rect").style("fill-opacity",M)}function l(d){m.select(d).select("text.name").style("fill","black")}function c(d){return function(M){return d.node.sourceLinks.indexOf(M.link)!==-1||d.node.targetLinks.indexOf(M.link)!==-1}}function u(d){return function(M){return M.node.sourceLinks.indexOf(d.link)!==-1||M.node.targetLinks.indexOf(d.link)!==-1}}function g(d,M,T){M&&T&&s(T,M).selectAll("."+p.sankeyLink).filter(c(M)).call(w.bind(0,M,T,!1))}function f(d,M,T){M&&T&&s(T,M).selectAll("."+p.sankeyLink).filter(c(M)).call(h.bind(0,M,T,!1))}function w(d,M,T,C){var x=C.datum().link.label;C.style("fill-opacity",function(S){if(!S.link.concentrationscale)return .4}),x&&s(M,d).selectAll("."+p.sankeyLink).filter(function(S){return S.link.label===x}).style("fill-opacity",function(S){if(!S.link.concentrationscale)return .4}),T&&s(M,d).selectAll("."+p.sankeyNode).filter(u(d)).call(g)}function h(d,M,T,C){var x=C.datum().link.label;C.style("fill-opacity",function(S){return S.tinyColorAlpha}),x&&s(M,d).selectAll("."+p.sankeyLink).filter(function(S){return S.link.label===x}).style("fill-opacity",function(S){return S.tinyColorAlpha}),T&&s(M,d).selectAll(p.sankeyNode).filter(u(d)).call(f)}function o(d,M){var T=d.hoverlabel||{},C=P.nestedProperty(T,M).get();return Array.isArray(C)?!1:C}G.exports=function(M,T){for(var C=M._fullLayout,x=C._paper,S=C._size,b=0;b"),color:o(Q,"bgcolor")||v.addOpacity(oe.color,1),borderColor:o(Q,"bordercolor"),fontFamily:o(Q,"font.family"),fontSize:o(Q,"font.size"),fontColor:o(Q,"font.color"),nameLength:o(Q,"namelength"),textAlign:o(Q,"align"),idealAlign:m.event.x"),color:o(Q,"bgcolor")||ce.tinyColorHue,borderColor:o(Q,"bordercolor"),fontFamily:o(Q,"font.family"),fontSize:o(Q,"font.size"),fontColor:o(Q,"font.color"),nameLength:o(Q,"namelength"),textAlign:o(Q,"align"),idealAlign:"left",hovertemplate:Q.hovertemplate,hovertemplateLabels:$,eventData:[ce.node]},{container:C._hoverlayer.node(),outerContainer:C._paper.node(),gd:M});n(he,.85),l(he)}}},te=function(ae,ce,Q){M._fullLayout.hovermode!==!1&&(m.select(ae).call(f,ce,Q),ce.node.trace.node.hoverinfo!=="skip"&&(ce.node.fullData=ce.node.trace,M.emit("plotly_unhover",{event:m.event,points:[ce.node]})),A.loneUnhover(C._hoverlayer.node()))};L(M,x,T,{width:S.w,height:S.h,margin:{t:S.t,r:S.r,b:S.b,l:S.l}},{linkEvents:{hover:y,follow:N,unhover:_,select:E},nodeEvents:{hover:Y,follow:J,unhover:te,select:U}})}},3393:function(G,V,e){var m=e(49887),P=e(81684).k4,i=e(39898),L=e(30838),A=e(86781),v=e(85247),p=e(84267),t=e(7901),r=e(91424),s=e(71828),n=s.strTranslate,l=s.strRotate,c=e(28984),u=c.keyFun,g=c.repeat,f=c.unwrap,w=e(63893),h=e(73972),o=e(18783),d=o.CAP_SHIFT,M=o.LINE_SPACING,T=3;function C(j,K,ee){var oe=f(K),q=oe.trace,$=q.domain,le=q.orientation==="h",ie=q.node.pad,he=q.node.thickness,me=j.width*($.x[1]-$.x[0]),Me=j.height*($.y[1]-$.y[0]),Te=oe._nodes,Oe=oe._links,Ne=oe.circular,Ee;Ne?Ee=A.sankeyCircular().circularLinkGap(0):Ee=L.sankey(),Ee.iterations(v.sankeyIterations).size(le?[me,Me]:[Me,me]).nodeWidth(he).nodePadding(ie).nodeId(function(Mt){return Mt.pointNumber}).nodes(Te).links(Oe);var xe=Ee();Ee.nodePadding()=Ie||(De=Ie-Je.y0,De>1e-6&&(Je.y0+=De,Je.y1+=De)),Ie=Je.y1+ie})}function ct(Mt){var Vt=Mt.map(function(se,ye){return{x0:se.x0,index:ye}}).sort(function(se,ye){return se.x0-ye.x0}),Je=[],De=-1,Ie,ze=-1/0,Pe;for(Se=0;Seze+he&&(De+=1,Ie=be.x0),ze=be.x0,Je[De]||(Je[De]=[]),Je[De].push(be),Pe=Ie-be.x0,be.x0+=Pe,be.x1+=Pe}return Je}if(q.node.x.length&&q.node.y.length){for(Se=0;Se0?"L"+q.targetX+" "+q.targetY:"")+"Z":ee="M "+(q.targetX-K)+" "+(q.targetY-oe)+" L"+(q.rightInnerExtent-K)+" "+(q.targetY-oe)+"A"+(q.rightLargeArcRadius+oe)+" "+(q.rightSmallArcRadius+oe)+" 0 0 0 "+(q.rightFullExtent-oe-K)+" "+(q.targetY+q.rightSmallArcRadius)+"L"+(q.rightFullExtent-oe-K)+" "+q.verticalRightInnerExtent+"A"+(q.rightLargeArcRadius+oe)+" "+(q.rightLargeArcRadius+oe)+" 0 0 0 "+(q.rightInnerExtent-K)+" "+(q.verticalFullExtent+oe)+"L"+q.leftInnerExtent+" "+(q.verticalFullExtent+oe)+"A"+(q.leftLargeArcRadius+oe)+" "+(q.leftLargeArcRadius+oe)+" 0 0 0 "+(q.leftFullExtent+oe)+" "+q.verticalLeftInnerExtent+"L"+(q.leftFullExtent+oe)+" "+(q.sourceY+q.leftSmallArcRadius)+"A"+(q.leftLargeArcRadius+oe)+" "+(q.leftSmallArcRadius+oe)+" 0 0 0 "+q.leftInnerExtent+" "+(q.sourceY-oe)+"L"+q.sourceX+" "+(q.sourceY-oe)+"L"+q.sourceX+" "+(q.sourceY+oe)+"L"+q.leftInnerExtent+" "+(q.sourceY+oe)+"A"+(q.leftLargeArcRadius-oe)+" "+(q.leftSmallArcRadius-oe)+" 0 0 1 "+(q.leftFullExtent-oe)+" "+(q.sourceY+q.leftSmallArcRadius)+"L"+(q.leftFullExtent-oe)+" "+q.verticalLeftInnerExtent+"A"+(q.leftLargeArcRadius-oe)+" "+(q.leftLargeArcRadius-oe)+" 0 0 1 "+q.leftInnerExtent+" "+(q.verticalFullExtent-oe)+"L"+(q.rightInnerExtent-K)+" "+(q.verticalFullExtent-oe)+"A"+(q.rightLargeArcRadius-oe)+" "+(q.rightLargeArcRadius-oe)+" 0 0 1 "+(q.rightFullExtent+oe-K)+" "+q.verticalRightInnerExtent+"L"+(q.rightFullExtent+oe-K)+" "+(q.targetY+q.rightSmallArcRadius)+"A"+(q.rightLargeArcRadius-oe)+" "+(q.rightSmallArcRadius-oe)+" 0 0 1 "+(q.rightInnerExtent-K)+" "+(q.targetY+oe)+"L"+(q.targetX-K)+" "+(q.targetY+oe)+(K>0?"L"+q.targetX+" "+q.targetY:"")+"Z",ee}function b(){var j=.5;function K(ee){var oe=ee.linkArrowLength;if(ee.link.circular)return S(ee.link,oe);var q=Math.abs((ee.link.target.x0-ee.link.source.x1)/2);oe>q&&(oe=q);var $=ee.link.source.x1,le=ee.link.target.x0-oe,ie=P($,le),he=ie(j),me=ie(1-j),Me=ee.link.y0-ee.link.width/2,Te=ee.link.y0+ee.link.width/2,Oe=ee.link.y1-ee.link.width/2,Ne=ee.link.y1+ee.link.width/2,Ee="M"+$+","+Me,xe="C"+he+","+Me+" "+me+","+Oe+" "+le+","+Oe,Se="C"+me+","+Ne+" "+he+","+Te+" "+$+","+Te,Ue=oe>0?"L"+(le+oe)+","+(Oe+ee.link.width/2):"";return Ue+="L"+le+","+Ne,Ee+xe+Ue+Se+"Z"}return K}function a(j,K){var ee=p(K.color),oe=v.nodePadAcross,q=j.nodePad/2;K.dx=K.x1-K.x0,K.dy=K.y1-K.y0;var $=K.dx,le=Math.max(.5,K.dy),ie="node_"+K.pointNumber;return K.group&&(ie=s.randstr()),K.trace=j.trace,K.curveNumber=j.trace.index,{index:K.pointNumber,key:ie,partOfGroup:K.partOfGroup||!1,group:K.group,traceId:j.key,trace:j.trace,node:K,nodePad:j.nodePad,nodeLineColor:j.nodeLineColor,nodeLineWidth:j.nodeLineWidth,textFont:j.textFont,size:j.horizontal?j.height:j.width,visibleWidth:Math.ceil($),visibleHeight:le,zoneX:-oe,zoneY:-q,zoneWidth:$+2*oe,zoneHeight:le+2*q,labelY:j.horizontal?K.dy/2+1:K.dx/2+1,left:K.originalLayer===1,sizeAcross:j.width,forceLayouts:j.forceLayouts,horizontal:j.horizontal,darkBackground:ee.getBrightness()<=128,tinyColorHue:t.tinyRGB(ee),tinyColorAlpha:ee.getAlpha(),valueFormat:j.valueFormat,valueSuffix:j.valueSuffix,sankey:j.sankey,graph:j.graph,arrangement:j.arrangement,uniqueNodeLabelPathId:[j.guid,j.key,ie].join("_"),interactionState:j.interactionState,figure:j}}function E(j){j.attr("transform",function(K){return n(K.node.x0.toFixed(3),K.node.y0.toFixed(3))})}function y(j){j.call(E)}function z(j,K){j.call(y),K.attr("d",b())}function I(j){j.attr("width",function(K){return K.node.x1-K.node.x0}).attr("height",function(K){return K.visibleHeight})}function B(j){return j.link.width>1||j.linkLineWidth>0}function k(j){var K=n(j.translateX,j.translateY);return K+(j.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function O(j,K,ee){j.on(".basic",null).on("mouseover.basic",function(oe){!oe.interactionState.dragInProgress&&!oe.partOfGroup&&(ee.hover(this,oe,K),oe.interactionState.hovered=[this,oe])}).on("mousemove.basic",function(oe){!oe.interactionState.dragInProgress&&!oe.partOfGroup&&(ee.follow(this,oe),oe.interactionState.hovered=[this,oe])}).on("mouseout.basic",function(oe){!oe.interactionState.dragInProgress&&!oe.partOfGroup&&(ee.unhover(this,oe,K),oe.interactionState.hovered=!1)}).on("click.basic",function(oe){oe.interactionState.hovered&&(ee.unhover(this,oe,K),oe.interactionState.hovered=!1),!oe.interactionState.dragInProgress&&!oe.partOfGroup&&ee.select(this,oe,K)})}function N(j,K,ee,oe){var q=i.behavior.drag().origin(function($){return{x:$.node.x0+$.visibleWidth/2,y:$.node.y0+$.visibleHeight/2}}).on("dragstart",function($){if($.arrangement!=="fixed"&&(s.ensureSingle(oe._fullLayout._infolayer,"g","dragcover",function(ie){oe._fullLayout._dragCover=ie}),s.raiseToTop(this),$.interactionState.dragInProgress=$.node,ae($.node),$.interactionState.hovered&&(ee.nodeEvents.unhover.apply(0,$.interactionState.hovered),$.interactionState.hovered=!1),$.arrangement==="snap")){var le=$.traceId+"|"+$.key;$.forceLayouts[le]?$.forceLayouts[le].alpha(1):_(j,le,$),U(j,K,$,le,oe)}}).on("drag",function($){if($.arrangement!=="fixed"){var le=i.event.x,ie=i.event.y;$.arrangement==="snap"?($.node.x0=le-$.visibleWidth/2,$.node.x1=le+$.visibleWidth/2,$.node.y0=ie-$.visibleHeight/2,$.node.y1=ie+$.visibleHeight/2):($.arrangement==="freeform"&&($.node.x0=le-$.visibleWidth/2,$.node.x1=le+$.visibleWidth/2),ie=Math.max(0,Math.min($.size-$.visibleHeight/2,ie)),$.node.y0=ie-$.visibleHeight/2,$.node.y1=ie+$.visibleHeight/2),ae($.node),$.arrangement!=="snap"&&($.sankey.update($.graph),z(j.filter(ce($)),K))}}).on("dragend",function($){if($.arrangement!=="fixed"){$.interactionState.dragInProgress=!1;for(var le=0;le<$.node.childrenNodes.length;le++)$.node.childrenNodes[le].x=$.node.x,$.node.childrenNodes[le].y=$.node.y;$.arrangement!=="snap"&&J($,oe)}});j.on(".drag",null).call(q)}function _(j,K,ee,oe){Q(ee.graph.nodes);var q=ee.graph.nodes.filter(function($){return $.originalX===ee.node.originalX}).filter(function($){return!$.partOfGroup});ee.forceLayouts[K]=m.forceSimulation(q).alphaDecay(0).force("collide",m.forceCollide().radius(function($){return $.dy/2+ee.nodePad/2}).strength(1).iterations(v.forceIterations)).force("constrain",Y(j,K,q,ee)).stop()}function U(j,K,ee,oe,q){window.requestAnimationFrame(function $(){var le;for(le=0;le0)window.requestAnimationFrame($);else{var he=ee.node.originalX;ee.node.x0=he-ee.visibleWidth/2,ee.node.x1=he+ee.visibleWidth/2,J(ee,q)}})}function Y(j,K,ee,oe){return function(){for(var $=0,le=0;le0&&oe.forceLayouts[K].alpha(0)}}function J(j,K){for(var ee=[],oe=[],q=0;qk&&E[N].gap;)N--;for(U=E[N].s,O=E.length-1;O>N;O--)E[O].s=U;for(;kI[f]&&f=0;c--){var u=A[c];if(u.type==="scatter"&&u.xaxis===n.xaxis&&u.yaxis===n.yaxis){u.opacity=void 0;break}}}}}},17438:function(G,V,e){var m=e(71828),P=e(73972),i=e(82196),L=e(47581),A=e(34098),v=e(67513),p=e(73927),t=e(565),r=e(49508),s=e(11058),n=e(94039),l=e(82410),c=e(28908),u=e(71828).coercePattern;G.exports=function(f,w,h,o){function d(E,y){return m.coerce(f,w,i,E,y)}var M=v(f,w,o,d);if(M||(w.visible=!1),!!w.visible){p(f,w,o,d),d("xhoverformat"),d("yhoverformat");var T=t(f,w,o,d);o.scattermode==="group"&&w.orientation===void 0&&d("orientation","v");var C=!T&&M=Math.min(me,Me)&&f<=Math.max(me,Me)?0:1/0}var Te=Math.max(3,he.mrc||0),Oe=1-1/Te,Ne=Math.abs(u.c2p(he.x)-f);return Ne=Math.min(me,Me)&&w<=Math.max(me,Me)?0:1/0}var Te=Math.max(3,he.mrc||0),Oe=1-1/Te,Ne=Math.abs(g.c2p(he.y)-w);return Nele!=$>=le&&(ee=j[Q-1][0],oe=j[Q][0],$-q&&(K=ee+(oe-ee)*(le-q)/($-q),Y=Math.min(Y,K),J=Math.max(J,K)));Y=Math.max(Y,0),J=Math.min(J,u._length);var ie=A.defaultLine;return A.opacity(c.fillcolor)?ie=c.fillcolor:A.opacity((c.line||{}).color)&&(ie=c.line.color),m.extendFlat(t,{distance:t.maxHoverDistance,x0:Y,x1:J,y0:le,y1:le,color:ie,hovertemplate:!1}),delete t.index,c.text&&!Array.isArray(c.text)?t.text=String(c.text):t.text=c.name,[t]}}}},67368:function(G,V,e){var m=e(34098);G.exports={hasLines:m.hasLines,hasMarkers:m.hasMarkers,hasText:m.hasText,isBubble:m.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(G){G.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}},79334:function(G,V,e){var m=e(71828),P=e(21479);G.exports=function(i,L){function A(p,t){return m.coerce(i,L,P,p,t)}var v=L.barmode==="group";L.scattermode==="group"&&A("scattergap",v?L.bargap:.2)}},11058:function(G,V,e){var m=e(71828).isArrayOrTypedArray,P=e(52075).hasColorscale,i=e(1586);G.exports=function(A,v,p,t,r,s){s||(s={});var n=(A.marker||{}).color;if(r("line.color",p),P(A,"line"))i(A,v,t,r,{prefix:"line.",cLetter:"c"});else{var l=(m(n)?!1:n)||p;r("line.color",l)}r("line.width"),s.noDash||r("line.dash"),s.backoff&&r("line.backoff")}},34621:function(G,V,e){var m=e(91424),P=e(50606),i=P.BADNUM,L=P.LOG_CLIP,A=L+.5,v=L-.5,p=e(71828),t=p.segmentsIntersect,r=p.constrain,s=e(47581);G.exports=function(l,c){var u=c.trace||{},g=c.xaxis,f=c.yaxis,w=g.type==="log",h=f.type==="log",o=g._length,d=f._length,M=c.backoff,T=u.marker,C=c.connectGaps,x=c.baseTolerance,S=c.shape,b=S==="linear",a=u.fill&&u.fill!=="none",E=[],y=s.minTolerance,z=l.length,I=new Array(z),B=0,k,O,N,_,U,Y,J,te,ae,ce,Q,Z,j,K,ee,oe;function q(wt){var It=l[wt];if(!It)return!1;var Bt=c.linearized?g.l2p(It.x):g.c2p(It.x),Gt=c.linearized?f.l2p(It.y):f.c2p(It.y);if(Bt===i){if(w&&(Bt=g.c2p(It.x,!0)),Bt===i)return!1;h&&Gt===i&&(Bt*=Math.abs(g._m*d*(g._m>0?A:v)/(f._m*o*(f._m>0?A:v)))),Bt*=1e3}if(Gt===i){if(h&&(Gt=f.c2p(It.y,!0)),Gt===i)return!1;Gt*=1e3}return[Bt,Gt]}function $(wt,It,Bt,Gt){var Lt=Bt-wt,Kt=Gt-It,ir=.5-wt,_r=.5-It,yt=Lt*Lt+Kt*Kt,jt=Lt*ir+Kt*_r;if(jt>0&&jt1||Math.abs(ir.y-Bt[0][1])>1)&&(ir=[ir.x,ir.y],Gt&&me(ir,wt)Oe||wt[1]Ee)return[r(wt[0],Te,Oe),r(wt[1],Ne,Ee)]}function et(wt,It){if(wt[0]===It[0]&&(wt[0]===Te||wt[0]===Oe)||wt[1]===It[1]&&(wt[1]===Ne||wt[1]===Ee))return!0}function ct(wt,It){var Bt=[],Gt=$e(wt),Lt=$e(It);return Gt&&Lt&&et(Gt,Lt)||(Gt&&Bt.push(Gt),Lt&&Bt.push(Lt)),Bt}function dt(wt,It,Bt){return function(Gt,Lt){var Kt=$e(Gt),ir=$e(Lt),_r=[];if(Kt&&ir&&et(Kt,ir))return _r;Kt&&_r.push(Kt),ir&&_r.push(ir);var yt=2*p.constrain((Gt[wt]+Lt[wt])/2,It,Bt)-((Kt||Gt)[wt]+(ir||Lt)[wt]);if(yt){var jt;Kt&&ir?jt=yt>0==Kt[wt]>ir[wt]?Kt:ir:jt=Kt||ir,jt[wt]+=yt}return _r}}var pt;S==="linear"||S==="spline"?pt=qe:S==="hv"||S==="vh"?pt=ct:S==="hvh"?pt=dt(0,Te,Oe):S==="vhv"&&(pt=dt(1,Ne,Ee));function At(wt,It){var Bt=It[0]-wt[0],Gt=(It[1]-wt[1])/Bt,Lt=(wt[1]*It[0]-It[1]*wt[0])/Bt;return Lt>0?[Gt>0?Te:Oe,Ee]:[Gt>0?Oe:Te,Ne]}function Mt(wt){var It=wt[0],Bt=wt[1],Gt=It===I[B-1][0],Lt=Bt===I[B-1][1];if(!(Gt&&Lt))if(B>1){var Kt=It===I[B-2][0],ir=Bt===I[B-2][1];Gt&&(It===Te||It===Oe)&&Kt?ir?B--:I[B-1]=wt:Lt&&(Bt===Ne||Bt===Ee)&&ir?Kt?B--:I[B-1]=wt:I[B++]=wt}else I[B++]=wt}function Vt(wt){I[B-1][0]!==wt[0]&&I[B-1][1]!==wt[1]&&Mt([He,Fe]),Mt(wt),Ge=null,He=Fe=0}var Je=p.isArrayOrTypedArray(T);function De(wt){if(wt&&M&&(wt.i=k,wt.d=l,wt.trace=u,wt.marker=Je?T[wt.i]:T,wt.backoff=M),le=wt[0]/o,ie=wt[1]/d,Se=wt[0]Oe?Oe:0,Ue=wt[1]Ee?Ee:0,Se||Ue){if(!B)I[B++]=[Se||wt[0],Ue||wt[1]];else if(Ge){var It=pt(Ge,wt);It.length>1&&(Vt(It[0]),I[B++]=It[1])}else nt=pt(I[B-1],wt)[0],I[B++]=nt;var Bt=I[B-1];Se&&Ue&&(Bt[0]!==Se||Bt[1]!==Ue)?(Ge&&(He!==Se&&Fe!==Ue?Mt(He&&Fe?At(Ge,wt):[He||Se,Fe||Ue]):He&&Fe&&Mt([He,Fe])),Mt([Se,Ue])):He-Se&&Fe-Ue&&Mt([Se||He,Ue||Fe]),Ge=wt,He=Se,Fe=Ue}else Ge&&Vt(pt(Ge,wt)[0]),I[B++]=wt}for(k=0;khe(Y,Ie))break;N=Y,j=ae[0]*te[0]+ae[1]*te[1],j>Q?(Q=j,_=Y,J=!1):j=l.length||!Y)break;De(Y),O=Y}}Ge&&Mt([He||Ge[0],Fe||Ge[1]]),E.push(I.slice(0,B))}var ze=S.slice(S.length-1);if(M&&ze!=="h"&&ze!=="v"){for(var Pe=!1,be=-1,se=[],ye=0;ye=0?t=c:(t=c=l,l++),t0?Math.max(s,p):0}}},4898:function(G){G.exports={container:"marker",min:"cmin",max:"cmax"}},49508:function(G,V,e){var m=e(7901),P=e(52075).hasColorscale,i=e(1586),L=e(34098);G.exports=function(v,p,t,r,s,n){var l=L.isBubble(v),c=(v.line||{}).color,u;if(n=n||{},c&&(t=c),s("marker.symbol"),s("marker.opacity",l?.7:1),s("marker.size"),n.noAngle||(s("marker.angle"),n.noAngleRef||s("marker.angleref"),n.noStandOff||s("marker.standoff")),s("marker.color",t),P(v,"marker")&&i(v,p,r,s,{prefix:"marker.",cLetter:"c"}),n.noSelect||(s("selected.marker.color"),s("unselected.marker.color"),s("selected.marker.size"),s("unselected.marker.size")),n.noLine||(c&&!Array.isArray(c)&&p.marker.color!==c?u=c:l?u=m.background:u=m.defaultLine,s("marker.line.color",u),P(v,"marker.line")&&i(v,p,r,s,{prefix:"marker.line.",cLetter:"c"}),s("marker.line.width",l?1:0)),l&&(s("marker.sizeref"),s("marker.sizemin"),s("marker.sizemode")),n.gradient){var g=s("marker.gradient.type");g!=="none"&&s("marker.gradient.color")}}},73927:function(G,V,e){var m=e(71828).dateTick0,P=e(50606),i=P.ONEWEEK;function L(A,v){return A%i===0?m(v,1):m(v,0)}G.exports=function(v,p,t,r,s){if(s||(s={x:!0,y:!0}),s.x){var n=r("xperiod");n&&(r("xperiod0",L(n,p.xcalendar)),r("xperiodalignment"))}if(s.y){var l=r("yperiod");l&&(r("yperiod0",L(l,p.ycalendar)),r("yperiodalignment"))}}},32663:function(G,V,e){var m=e(39898),P=e(73972),i=e(71828),L=i.ensureSingle,A=i.identity,v=e(91424),p=e(34098),t=e(34621),r=e(68687),s=e(61082).tester;G.exports=function(g,f,w,h,o,d){var M,T,C=!o,x=!!o&&o.duration>0,S=r(g,f,w);if(M=h.selectAll("g.trace").data(S,function(a){return a[0].trace.uid}),M.enter().append("g").attr("class",function(a){return"trace scatter trace"+a[0].trace.uid}).style("stroke-miterlimit",2),M.order(),n(g,M,f),x){d&&(T=d());var b=m.transition().duration(o.duration).ease(o.easing).each("end",function(){T&&T()}).each("interrupt",function(){T&&T()});b.each(function(){h.selectAll("g.trace").each(function(a,E){l(g,E,f,a,S,this,o)})})}else M.each(function(a,E){l(g,E,f,a,S,this,o)});C&&M.exit().remove(),h.selectAll("path:not([d])").remove()};function n(u,g,f){g.each(function(w){var h=L(m.select(this),"g","fills");v.setClipUrl(h,f.layerClipId,u);var o=w[0].trace,d=[];o._ownfill&&d.push("_ownFill"),o._nexttrace&&d.push("_nextFill");var M=h.selectAll("g").data(d,A);M.enter().append("g"),M.exit().each(function(T){o[T]=null}).remove(),M.order().each(function(T){o[T]=L(m.select(this),"path","js-fill")})})}function l(u,g,f,w,h,o,d){var M=u._context.staticPlot,T;c(u,g,f,w,h);var C=!!d&&d.duration>0;function x(Fe){return C?Fe.transition():Fe}var S=f.xaxis,b=f.yaxis,a=w[0].trace,E=a.line,y=m.select(o),z=L(y,"g","errorbars"),I=L(y,"g","lines"),B=L(y,"g","points"),k=L(y,"g","text");if(P.getComponentMethod("errorbars","plot")(u,z,f,d),a.visible!==!0)return;x(y).style("opacity",a.opacity);var O,N,_=a.fill.charAt(a.fill.length-1);_!=="x"&&_!=="y"&&(_=""),w[0][f.isRangePlot?"nodeRangePlot3":"node3"]=y;var U="",Y=[],J=a._prevtrace;J&&(U=J._prevRevpath||"",N=J._nextFill,Y=J._polygons);var te,ae,ce="",Q="",Z,j,K,ee,oe,q,$,le=[],ie=i.noop;if(O=a._ownFill,p.hasLines(a)||a.fill!=="none"){for(N&&N.datum(w),["hv","vh","hvh","vhv"].indexOf(E.shape)!==-1?(Z=v.steps(E.shape),j=v.steps(E.shape.split("").reverse().join(""))):E.shape==="spline"?Z=j=function(Fe){var Ge=Fe[Fe.length-1];return Fe.length>1&&Fe[0][0]===Ge[0]&&Fe[0][1]===Ge[1]?v.smoothclosed(Fe.slice(1),E.smoothing):v.smoothopen(Fe,E.smoothing)}:Z=j=function(Fe){return"M"+Fe.join("L")},K=function(Fe){return j(Fe.reverse())},le=t(w,{xaxis:S,yaxis:b,trace:a,connectGaps:a.connectgaps,baseTolerance:Math.max(E.width||1,3)/4,shape:E.shape,backoff:E.backoff,simplify:E.simplify,fill:a.fill}),$=a._polygons=new Array(le.length),T=0;T=M[0]&&y.x<=M[1]&&y.y>=T[0]&&y.y<=T[1]}),b=Math.ceil(S.length/x),a=0;h.forEach(function(y,z){var I=y[0].trace;p.hasMarkers(I)&&I.marker.maxdisplayed>0&&z0){var f=t.c2l(u);t._lowerLogErrorBound||(t._lowerLogErrorBound=f),t._lowerErrorBound=Math.min(t._lowerLogErrorBound,f)}}else s[n]=[-l[0]*p,l[1]*p]}return s}function i(A){for(var v=0;v-1?-1:y.indexOf("right")>-1?1:0}function d(y){return y==null?0:y.indexOf("top")>-1?-1:y.indexOf("bottom")>-1?1:0}function M(y){var z=0,I=0,B=[z,I];if(Array.isArray(y))for(var k=0;k=0){var Y=w(_.position,_.delaunayColor,_.delaunayAxis);Y.opacity=y.opacity,this.delaunayMesh?this.delaunayMesh.update(Y):(Y.gl=z,this.delaunayMesh=L(Y),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},f.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())};function E(y,z){var I=new g(y,z.uid);return I.update(z),I}G.exports=E},21428:function(G,V,e){var m=e(73972),P=e(71828),i=e(34098),L=e(49508),A=e(11058),v=e(82410),p=e(44542);G.exports=function(s,n,l,c){function u(T,C){return P.coerce(s,n,p,T,C)}var g=t(s,n,u,c);if(!g){n.visible=!1;return}u("text"),u("hovertext"),u("hovertemplate"),u("xhoverformat"),u("yhoverformat"),u("zhoverformat"),u("mode"),i.hasLines(n)&&(u("connectgaps"),A(s,n,l,c,u)),i.hasMarkers(n)&&L(s,n,l,c,u,{noSelect:!0,noAngle:!0}),i.hasText(n)&&(u("texttemplate"),v(s,n,c,u,{noSelect:!0}));var f=(n.line||{}).color,w=(n.marker||{}).color;u("surfaceaxis")>=0&&u("surfacecolor",f||w);for(var h=["x","y","z"],o=0;o<3;++o){var d="projection."+h[o];u(d+".show")&&(u(d+".opacity"),u(d+".scale"))}var M=m.getComponentMethod("errorbars","supplyDefaults");M(s,n,f||w||l,{axis:"z"}),M(s,n,f||w||l,{axis:"y",inherit:"z"}),M(s,n,f||w||l,{axis:"x",inherit:"z"})};function t(r,s,n,l){var c=0,u=n("x"),g=n("y"),f=n("z"),w=m.getComponentMethod("calendars","handleTraceDefaults");return w(r,s,["x","y","z"],l),u&&g&&f&&(c=Math.min(u.length,g.length,f.length),s._length=s._xlength=s._ylength=s._zlength=c),c}},13551:function(G,V,e){G.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(G,V,e){var m=e(82196),P=e(9012),i=e(5386).fF,L=e(5386).si,A=e(50693),v=e(1426).extendFlat,p=m.marker,t=m.line,r=p.line;G.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:v({},m.mode,{dflt:"markers"}),text:v({},m.text,{}),texttemplate:L({editType:"plot"},{keys:["a","b","text"]}),hovertext:v({},m.hovertext,{}),line:{color:t.color,width:t.width,dash:t.dash,backoff:t.backoff,shape:v({},t.shape,{values:["linear","spline"]}),smoothing:t.smoothing,editType:"calc"},connectgaps:m.connectgaps,fill:v({},m.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:m.fillcolor,marker:v({symbol:p.symbol,opacity:p.opacity,maxdisplayed:p.maxdisplayed,angle:p.angle,angleref:p.angleref,standoff:p.standoff,size:p.size,sizeref:p.sizeref,sizemin:p.sizemin,sizemode:p.sizemode,line:v({width:r.width,editType:"calc"},A("marker.line")),gradient:p.gradient,editType:"calc"},A("marker")),textfont:m.textfont,textposition:m.textposition,selected:m.selected,unselected:m.unselected,hoverinfo:v({},P.hoverinfo,{flags:["a","b","text","name"]}),hoveron:m.hoveron,hovertemplate:i()}},34618:function(G,V,e){var m=e(92770),P=e(36922),i=e(75225),L=e(66279),A=e(47761).calcMarkerSize,v=e(22882);G.exports=function(t,r){var s=r._carpetTrace=v(t,r);if(!(!s||!s.visible||s.visible==="legendonly")){var n;r.xaxis=s.xaxis,r.yaxis=s.yaxis;var l=r._length,c=new Array(l),u,g,f=!1;for(n=0;n0?x=T.labelprefix.replace(/ = $/,""):x=T._hovertitle,h.push(x+": "+C.toFixed(3)+T.labelsuffix)}if(!g.hovertemplate){var d=u.hi||g.hoverinfo,M=d.split("+");M.indexOf("all")!==-1&&(M=["a","b","text"]),M.indexOf("a")!==-1&&o(f.aaxis,u.a),M.indexOf("b")!==-1&&o(f.baxis,u.b),h.push("y: "+r.yLabel),M.indexOf("text")!==-1&&P(u,g,h),r.extraText=h.join("
")}return t}},46858:function(G,V,e){G.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(G,V,e){var m=e(32663),P=e(89298),i=e(91424);G.exports=function(A,v,p,t){var r,s,n,l=p[0][0].carpet,c=P.getFromId(A,l.xaxis||"x"),u=P.getFromId(A,l.yaxis||"y"),g={xaxis:c,yaxis:u,plot:v.plot};for(r=0;r")}},17988:function(G,V,e){G.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(G,V,e){var m=e(39898),P=e(71828),i=e(90973).getTopojsonFeatures,L=e(18214),A=e(41327),v=e(71739).findExtremes,p=e(50606).BADNUM,t=e(47761).calcMarkerSize,r=e(34098),s=e(33095);function n(c,u,g){var f=u.layers.frontplot.select(".scatterlayer"),w=P.makeTraceGroups(f,g,"trace scattergeo");function h(o,d){o.lonlat[0]===p&&m.select(d).remove()}w.selectAll("*").remove(),w.each(function(o){var d=m.select(this),M=o[0].trace;if(r.hasLines(M)||M.fill!=="none"){var T=L.calcTraceToLineCoords(o),C=M.fill!=="none"?L.makePolygon(T):L.makeLine(T);d.selectAll("path.js-line").data([{geojson:C,trace:M}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}r.hasMarkers(M)&&d.selectAll("path.point").data(P.identity).enter().append("path").classed("point",!0).each(function(x){h(x,this)}),r.hasText(M)&&d.selectAll("g").data(P.identity).enter().append("g").append("text").each(function(x){h(x,this)}),s(c,o)})}function l(c,u){var g=c[0].trace,f=u[g.geo],w=f._subplot,h=g._length,o,d;if(Array.isArray(g.locations)){var M=g.locationmode,T=M==="geojson-id"?A.extractTraceFeature(c):i(g,w.topojson);for(o=0;o=u,b=x*2,a={},E,y=M.makeCalcdata(o,"x"),z=T.makeCalcdata(o,"y"),I=A(o,M,"x",y),B=A(o,T,"y",z),k=I.vals,O=B.vals;o._x=k,o._y=O,o.xperiodalignment&&(o._origX=y,o._xStarts=I.starts,o._xEnds=I.ends),o.yperiodalignment&&(o._origY=z,o._yStarts=B.starts,o._yEnds=B.ends);var N=new Array(b),_=new Array(x);for(E=0;E1&&P.extendFlat(C.line,n.linePositions(w,o,d)),C.errorX||C.errorY){var x=n.errorBarPositions(w,o,d,M,T);C.errorX&&P.extendFlat(C.errorX,x.x),C.errorY&&P.extendFlat(C.errorY,x.y)}return C.text&&(P.extendFlat(C.text,{positions:d},n.textPosition(w,o,C.text,C.marker)),P.extendFlat(C.textSel,{positions:d},n.textPosition(w,o,C.text,C.markerSel)),P.extendFlat(C.textUnsel,{positions:d},n.textPosition(w,o,C.text,C.markerUnsel))),C}},78232:function(G){var V=20;G.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:V,SYMBOL_STROKE:V/20,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}},19635:function(G,V,e){var m=e(92770),P=e(82019),i=e(25075),L=e(73972),A=e(71828),v=e(91424),p=e(41675),t=e(81697).formatColor,r=e(34098),s=e(39984),n=e(68645),l=e(78232),c=e(37822).DESELECTDIM,u={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},g=e(23469).appendArrayPointValue;function f(I,B){var k,O={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},N=I._context.plotGlPixelRatio;if(B.visible!==!0)return O;if(r.hasText(B)&&(O.text=w(I,B),O.textSel=d(I,B,B.selected),O.textUnsel=d(I,B,B.unselected)),r.hasMarkers(B)&&(O.marker=h(I,B),O.markerSel=o(I,B,B.selected),O.markerUnsel=o(I,B,B.unselected),!B.unselected&&A.isArrayOrTypedArray(B.marker.opacity))){var _=B.marker.opacity;for(O.markerUnsel.opacity=new Array(_.length),k=0;k<_.length;k++)O.markerUnsel.opacity[k]=c*_[k]}if(r.hasLines(B)){O.line={overlay:!0,thickness:B.line.width*N,color:B.line.color,opacity:B.opacity};var U=(l.DASHES[B.line.dash]||[1]).slice();for(k=0;kl.TOO_MANY_POINTS||r.hasMarkers(B)?"rect":"round";if(te&&B.connectgaps){var ce=_[0],Q=_[1];for(U=0;U<_.length;U+=2)isNaN(_[U])||isNaN(_[U+1])?(_[U]=ce,_[U+1]=Q):(ce=_[U],Q=_[U+1])}return{join:ae,positions:_}}function y(I,B,k,O,N){var _=L.getComponentMethod("errorbars","makeComputeError"),U=p.getFromId(I,B.xaxis,"x"),Y=p.getFromId(I,B.yaxis,"y"),J=k.length/2,te={};function ae(ce,Q){var Z=Q._id.charAt(0),j=B["error_"+Z];if(j&&j.visible&&(Q.type==="linear"||Q.type==="log")){for(var K=_(j),ee={x:0,y:1}[Z],oe={x:[0,1,2,3],y:[2,3,0,1]}[Z],q=new Float64Array(4*J),$=1/0,le=-1/0,ie=0,he=0;ie1?J[U]:J[0]:J,Z=Array.isArray(te)?te.length>1?te[U]:te[0]:te,j=u[Q],K=u[Z],ee=ae?ae/.8+1:0,oe=-K*ee-K*.5;_.offset[U]=[j*ee/ce,oe/ce]}}return _}G.exports={style:f,markerStyle:h,markerSelection:o,linePositions:E,errorBarPositions:y,textPosition:z}},47148:function(G,V,e){var m=e(71828),P=e(73972),i=e(68645),L=e(42341),A=e(47581),v=e(34098),p=e(67513),t=e(73927),r=e(49508),s=e(11058),n=e(28908),l=e(82410);G.exports=function(u,g,f,w){function h(b,a){return m.coerce(u,g,L,b,a)}var o=u.marker?i.isOpenSymbol(u.marker.symbol):!1,d=v.isBubble(u),M=p(u,g,w,h);if(!M){g.visible=!1;return}t(u,g,w,h),h("xhoverformat"),h("yhoverformat");var T=M100},V.isDotSymbol=function(P){return typeof P=="string"?m.DOT_RE.test(P):P>200}},20794:function(G,V,e){var m=e(73972),P=e(71828),i=e(34603);function L(v,p,t,r){var s=v.cd,n=s[0].t,l=s[0].trace,c=v.xa,u=v.ya,g=n.x,f=n.y,w=c.c2p(p),h=u.c2p(t),o=v.distance,d;if(n.tree){var M=c.p2c(w-o),T=c.p2c(w+o),C=u.p2c(h-o),x=u.p2c(h+o);r==="x"?d=n.tree.range(Math.min(M,T),Math.min(u._rl[0],u._rl[1]),Math.max(M,T),Math.max(u._rl[0],u._rl[1])):d=n.tree.range(Math.min(M,T),Math.min(C,x),Math.max(M,T),Math.max(C,x))}else d=n.ids;var S,b,a,E,y,z,I,B,k,O=o;if(r==="x"){var N=!!l.xperiodalignment,_=!!l.yperiodalignment;for(y=0;y=Math.min(U,Y)&&w<=Math.max(U,Y)?0:1/0}if(z=Math.min(J,te)&&h<=Math.max(J,te)?0:1/0}k=Math.sqrt(z*z+I*I),b=d[y]}}}else for(y=d.length-1;y>-1;y--)S=d[y],a=g[S],E=f[S],z=c.c2p(a)-w,I=u.c2p(E)-h,B=Math.sqrt(z*z+I*I),Bo.glText.length){var a=S-o.glText.length;for(T=0;Tle&&(isNaN($[ie])||isNaN($[ie+1]));)ie-=2;q.positions=$.slice(le,ie+2)}return q}),o.line2d.update(o.lineOptions)),o.error2d){var z=(o.errorXOptions||[]).concat(o.errorYOptions||[]);o.error2d.update(z)}o.scatter2d&&o.scatter2d.update(o.markerOptions),o.fillOrder=A.repeat(null,S),o.fill2d&&(o.fillOptions=o.fillOptions.map(function(q,$){var le=w[$];if(!(!q||!le||!le[0]||!le[0].trace)){var ie=le[0],he=ie.trace,me=ie.t,Me=o.lineOptions[$],Te,Oe,Ne=[];he._ownfill&&Ne.push($),he._nexttrace&&Ne.push($+1),Ne.length&&(o.fillOrder[$]=Ne);var Ee=[],xe=Me&&Me.positions||me.positions,Se,Ue;if(he.fill==="tozeroy"){for(Se=0;SeSe&&isNaN(xe[Ue+1]);)Ue-=2;xe[Se+1]!==0&&(Ee=[xe[Se],0]),Ee=Ee.concat(xe.slice(Se,Ue+2)),xe[Ue+1]!==0&&(Ee=Ee.concat([xe[Ue],0]))}else if(he.fill==="tozerox"){for(Se=0;SeSe&&isNaN(xe[Ue]);)Ue-=2;xe[Se]!==0&&(Ee=[0,xe[Se+1]]),Ee=Ee.concat(xe.slice(Se,Ue+2)),xe[Ue]!==0&&(Ee=Ee.concat([0,xe[Ue+1]]))}else if(he.fill==="toself"||he.fill==="tonext"){for(Ee=[],Te=0,q.splitNull=!0,Oe=0;Oe-1;for(T=0;T=0?Math.floor((s+180)/360):Math.ceil((s-180)/360),T=M*360,C=s-T;function x(k){var O=k.lonlat;if(O[0]===A||o&&w.indexOf(k.i+1)===-1)return 1/0;var N=P.modHalf(O[0],360),_=O[1],U=f.project([N,_]),Y=U.x-u.c2p([C,_]),J=U.y-g.c2p([N,n]),te=Math.max(3,k.mrc||0);return Math.max(Math.sqrt(Y*Y+J*J)-te,1-3/te)}if(m.getClosest(l,x,r),r.index!==!1){var S=l[r.index],b=S.lonlat,a=[P.modHalf(b[0],360)+T,b[1]],E=u.c2p(a),y=g.c2p(a),z=S.mrc||1;r.x0=E-z,r.x1=E+z,r.y0=y-z,r.y1=y+z;var I={};I[c.subplot]={_subplot:f};var B=c._module.formatLabels(S,c,I);return r.lonLabel=B.lonLabel,r.latLabel=B.latLabel,r.color=i(c,S),r.extraText=t(c,S,l[0].t.labels),r.hovertemplate=c.hovertemplate,[r]}}function t(r,s,n){if(r.hovertemplate)return;var l=s.hi||r.hoverinfo,c=l.split("+"),u=c.indexOf("all")!==-1,g=c.indexOf("lon")!==-1,f=c.indexOf("lat")!==-1,w=s.lonlat,h=[];function o(d){return d+"°"}return u||g&&f?h.push("("+o(w[1])+", "+o(w[0])+")"):g?h.push(n.lon+o(w[0])):f&&h.push(n.lat+o(w[1])),(u||c.indexOf("text")!==-1)&&L(s,r,h),h.join("
")}G.exports={hoverPoints:p,getExtraText:t}},20467:function(G,V,e){G.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(m,P){if(P){var i=P[0].trace;i._glTrace.update(P)}},moduleType:"trace",name:"scattermapbox",basePlotModule:e(50101),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}},86951:function(G,V,e){var m=e(71828),P=e(15790),i=e(77734).traceLayerPrefix,L={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function A(p,t,r,s){this.type="scattermapbox",this.subplot=p,this.uid=t,this.clusterEnabled=r,this.isHidden=s,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:i+t+"-fill",line:i+t+"-line",circle:i+t+"-circle",symbol:i+t+"-symbol",cluster:i+t+"-cluster",clusterCount:i+t+"-cluster-count"},this.below=null}var v=A.prototype;v.addSource=function(p,t,r){var s={type:"geojson",data:t.geojson};r&&r.enabled&&m.extendFlat(s,{cluster:!0,clusterMaxZoom:r.maxzoom});var n=this.subplot.map.getSource(this.sourceIds[p]);n?n.setData(t.geojson):this.subplot.map.addSource(this.sourceIds[p],s)},v.setSourceData=function(p,t){this.subplot.map.getSource(this.sourceIds[p]).setData(t.geojson)},v.addLayer=function(p,t,r){var s={type:t.type,id:this.layerIds[p],source:this.sourceIds[p],layout:t.layout,paint:t.paint};t.filter&&(s.filter=t.filter);for(var n=this.layerIds[p],l,c=this.subplot.getMapLayers(),u=0;u=0;E--){var y=a[E];n.removeLayer(f.layerIds[y])}b||n.removeSource(f.sourceIds.circle)}function o(b){for(var a=L.nonCluster,E=0;E=0;E--){var y=a[E];n.removeLayer(f.layerIds[y]),b||n.removeSource(f.sourceIds[y])}}function M(b){g?h(b):d(b)}function T(b){u?w(b):o(b)}function C(){for(var b=u?L.cluster:L.nonCluster,a=0;a=0;s--){var n=r[s];t.removeLayer(this.layerIds[n]),t.removeSource(this.sourceIds[n])}},G.exports=function(t,r){var s=r[0].trace,n=s.cluster&&s.cluster.enabled,l=s.visible!==!0,c=new A(t,s.uid,n,l),u=P(t.gd,r),g=c.below=t.belowLookup["trace-"+s.uid],f,w,h;if(n)for(c.addSource("circle",u.circle,s.cluster),f=0;f")}}G.exports={hoverPoints:P,makeHoverPointText:i}},91271:function(G,V,e){G.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(G,V,e){var m=e(32663),P=e(50606).BADNUM;G.exports=function(L,A,v){for(var p=A.layers.frontplot.select("g.scatterlayer"),t=A.xaxis,r=A.yaxis,s={xaxis:t,yaxis:r,plot:A.framework,layerClipId:A._hasClipOnAxisFalse?A.clipIds.forTraces:null},n=A.radialAxis,l=A.angularAxis,c=0;c=p&&(C.marker.cluster=o.tree),C.marker&&(C.markerSel.positions=C.markerUnsel.positions=C.marker.positions=a),C.line&&a.length>1&&v.extendFlat(C.line,A.linePositions(s,h,a)),C.text&&(v.extendFlat(C.text,{positions:a},A.textPosition(s,h,C.text,C.marker)),v.extendFlat(C.textSel,{positions:a},A.textPosition(s,h,C.text,C.markerSel)),v.extendFlat(C.textUnsel,{positions:a},A.textPosition(s,h,C.text,C.markerUnsel))),C.fill&&!g.fill2d&&(g.fill2d=!0),C.marker&&!g.scatter2d&&(g.scatter2d=!0),C.line&&!g.line2d&&(g.line2d=!0),C.text&&!g.glText&&(g.glText=!0),g.lineOptions.push(C.line),g.fillOptions.push(C.fill),g.markerOptions.push(C.marker),g.markerSelectedOptions.push(C.markerSel),g.markerUnselectedOptions.push(C.markerUnsel),g.textOptions.push(C.text),g.textSelectedOptions.push(C.textSel),g.textUnselectedOptions.push(C.textUnsel),g.selectBatch.push([]),g.unselectBatch.push([]),o.x=E,o.y=y,o.rawx=E,o.rawy=y,o.r=M,o.theta=T,o.positions=a,o._scene=g,o.index=g.count,g.count++}}),i(s,n,l)}},G.exports.reglPrecompiled=t},48300:function(G,V,e){var m=e(5386).fF,P=e(5386).si,i=e(1426).extendFlat,L=e(82196),A=e(9012),v=L.line;G.exports={mode:L.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:L.text,texttemplate:P({editType:"plot"},{keys:["real","imag","text"]}),hovertext:L.hovertext,line:{color:v.color,width:v.width,dash:v.dash,backoff:v.backoff,shape:i({},v.shape,{values:["linear","spline"]}),smoothing:v.smoothing,editType:"calc"},connectgaps:L.connectgaps,marker:L.marker,cliponaxis:i({},L.cliponaxis,{dflt:!1}),textposition:L.textposition,textfont:L.textfont,fill:i({},L.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:L.fillcolor,hoverinfo:i({},A.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:L.hoveron,hovertemplate:m(),selected:L.selected,unselected:L.unselected}},30621:function(G,V,e){var m=e(92770),P=e(50606).BADNUM,i=e(36922),L=e(75225),A=e(66279),v=e(47761).calcMarkerSize;G.exports=function(t,r){for(var s=t._fullLayout,n=r.subplot,l=s[n].realaxis,c=s[n].imaginaryaxis,u=l.makeCalcdata(r,"real"),g=c.makeCalcdata(r,"imag"),f=r._length,w=new Array(f),h=0;h")}}G.exports={hoverPoints:P,makeHoverPointText:i}},85956:function(G,V,e){G.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(G,V,e){var m=e(32663),P=e(50606).BADNUM,i=e(23893),L=i.smith;G.exports=function(v,p,t){for(var r=p.layers.frontplot.select("g.scatterlayer"),s=p.xaxis,n=p.yaxis,l={xaxis:s,yaxis:n,plot:p.framework,layerClipId:p._hasClipOnAxisFalse?p.clipIds.forTraces:null},c=0;c"),t.hovertemplate=u.hovertemplate,p}},52979:function(G,V,e){G.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(G,V,e){var m=e(32663);G.exports=function(i,L,A){var v=L.plotContainer;v.select(".scatterlayer").selectAll("*").remove();for(var p=L.xaxis,t=L.yaxis,r={xaxis:p,yaxis:t,plot:v,layerClipId:L._hasClipOnAxisFalse?L.clipIdRelative:null},s=L.layers.frontplot.select("g.scatterlayer"),n=0;ns,E;for(a?E=f.sizeAvg||Math.max(f.size,3):E=i(c,g),M=0;Md&&f||o-1,k=L(f)||!!s.selectedpoints||B,O=!0;if(k){var N=s._length;if(s.selectedpoints){l.selectBatch=s.selectedpoints;var _=s.selectedpoints,U={};for(o=0;o<_.length;o++)U[_[o]]=!0;var Y=[];for(o=0;o1&&(b=t[n-1],E=r[n-1],z=s[n-1]),l=0;lb?"-":"+")+"x"),M=M.replace("y",(a>E?"-":"+")+"y"),M=M.replace("z",(y>z?"-":"+")+"z");var O=function(){n=0,I=[],B=[],k=[]};(!n||n2?f=u.slice(1,g-1):g===2?f=[(u[0]+u[1])/2]:f=u,f}function n(u){var g=u.length;return g===1?[.5,.5]:[u[1]-u[0],u[g-1]-u[g-2]]}function l(u,g){var f=u.fullSceneLayout,w=u.dataScale,h=g._len,o={};function d(ce,Q){var Z=f[Q],j=w[p[Q]];return i.simpleMap(ce,function(K){return Z.d2l(K)*j})}if(o.vectors=v(d(g._u,"xaxis"),d(g._v,"yaxis"),d(g._w,"zaxis"),h),!h)return{positions:[],cells:[]};var M=d(g._Xs,"xaxis"),T=d(g._Ys,"yaxis"),C=d(g._Zs,"zaxis");o.meshgrid=[M,T,C],o.gridFill=g._gridFill;var x=g._slen;if(x)o.startingPositions=v(d(g._startsX,"xaxis"),d(g._startsY,"yaxis"),d(g._startsZ,"zaxis"));else{for(var S=T[0],b=s(M),a=s(C),E=new Array(b.length*a.length),y=0,z=0;z=0},E,y,z;w?(E=Math.min(f.length,o.length),y=function(K){return b(f[K])&&a(K)},z=function(K){return String(f[K])}):(E=Math.min(h.length,o.length),y=function(K){return b(h[K])&&a(K)},z=function(K){return String(h[K])}),M&&(E=Math.min(E,d.length));for(var I=0;I1){for(var U=i.randstr(),Y=0;Y=0){A.i=r.i;var l=v.marker;l.pattern?(!l.colors||!l.pattern.shape)&&(l.color=n,A.color=n):(l.color=n,A.color=n),m.pointStyle(L,v,p,A)}else P.fill(L,n)}},83523:function(G,V,e){var m=e(39898),P=e(73972),i=e(23469).appendArrayPointValue,L=e(30211),A=e(71828),v=e(11086),p=e(2791),t=e(53581),r=t.formatPieValue;G.exports=function(l,c,u,g,f){var w=g[0],h=w.trace,o=w.hierarchy,d=h.type==="sunburst",M=h.type==="treemap"||h.type==="icicle";"_hasHoverLabel"in h||(h._hasHoverLabel=!1),"_hasHoverEvent"in h||(h._hasHoverEvent=!1);var T=function(S){var b=u._fullLayout;if(!(u._dragging||b.hovermode===!1)){var a=u._fullData[h.index],E=S.data.data,y=E.i,z=p.isHierarchyRoot(S),I=p.getParent(o,S),B=p.getValue(S),k=function($){return A.castOption(a,y,$)},O=k("hovertemplate"),N=L.castHoverinfo(a,b,y),_=b.separators,U;if(O||N&&N!=="none"&&N!=="skip"){var Y,J;d&&(Y=w.cx+S.pxmid[0]*(1-S.rInscribed),J=w.cy+S.pxmid[1]*(1-S.rInscribed)),M&&(Y=S._hoverX,J=S._hoverY);var te={},ae=[],ce=[],Q=function($){return ae.indexOf($)!==-1};N&&(ae=N==="all"?a._module.attributes.hoverinfo.flags:N.split("+")),te.label=E.label,Q("label")&&te.label&&ce.push(te.label),E.hasOwnProperty("v")&&(te.value=E.v,te.valueLabel=r(te.value,_),Q("value")&&ce.push(te.valueLabel)),te.currentPath=S.currentPath=p.getPath(S.data),Q("current path")&&!z&&ce.push(te.currentPath);var Z,j=[],K=function(){j.indexOf(Z)===-1&&(ce.push(Z),j.push(Z))};te.percentParent=S.percentParent=B/p.getValue(I),te.parent=S.parentString=p.getPtLabel(I),Q("percent parent")&&(Z=p.formatPercent(te.percentParent,_)+" of "+te.parent,K()),te.percentEntry=S.percentEntry=B/p.getValue(c),te.entry=S.entry=p.getPtLabel(c),Q("percent entry")&&!z&&!S.onPathbar&&(Z=p.formatPercent(te.percentEntry,_)+" of "+te.entry,K()),te.percentRoot=S.percentRoot=B/p.getValue(o),te.root=S.root=p.getPtLabel(o),Q("percent root")&&!z&&(Z=p.formatPercent(te.percentRoot,_)+" of "+te.root,K()),te.text=k("hovertext")||k("text"),Q("text")&&(Z=te.text,A.isValidTextValue(Z)&&ce.push(Z)),U=[s(S,a,f.eventDataKeys)];var ee={trace:a,y:J,_x0:S._x0,_x1:S._x1,_y0:S._y0,_y1:S._y1,text:ce.join("
"),name:O||Q("name")?a.name:void 0,color:k("hoverlabel.bgcolor")||E.color,borderColor:k("hoverlabel.bordercolor"),fontFamily:k("hoverlabel.font.family"),fontSize:k("hoverlabel.font.size"),fontColor:k("hoverlabel.font.color"),nameLength:k("hoverlabel.namelength"),textAlign:k("hoverlabel.align"),hovertemplate:O,hovertemplateLabels:te,eventData:U};d&&(ee.x0=Y-S.rInscribed*S.rpx1,ee.x1=Y+S.rInscribed*S.rpx1,ee.idealAlign=S.pxmid[0]<0?"left":"right"),M&&(ee.x=Y,ee.idealAlign=Y<0?"left":"right");var oe=[];L.loneHover(ee,{container:b._hoverlayer.node(),outerContainer:b._paper.node(),gd:u,inOut_bbox:oe}),U[0].bbox=oe[0],h._hasHoverLabel=!0}if(M){var q=l.select("path.surface");f.styleOne(q,S,a,u,{hovered:!0})}h._hasHoverEvent=!0,u.emit("plotly_hover",{points:U||[s(S,a,f.eventDataKeys)],event:m.event})}},C=function(S){var b=u._fullLayout,a=u._fullData[h.index],E=m.select(this).datum();if(h._hasHoverEvent&&(S.originalEvent=m.event,u.emit("plotly_unhover",{points:[s(E,a,f.eventDataKeys)],event:m.event}),h._hasHoverEvent=!1),h._hasHoverLabel&&(L.loneUnhover(b._hoverlayer.node()),h._hasHoverLabel=!1),M){var y=l.select("path.surface");f.styleOne(y,E,a,u,{hovered:!1})}},x=function(S){var b=u._fullLayout,a=u._fullData[h.index],E=d&&(p.isHierarchyRoot(S)||p.isLeaf(S)),y=p.getPtId(S),z=p.isEntry(S)?p.findEntryWithChild(o,y):p.findEntryWithLevel(o,y),I=p.getPtId(z),B={points:[s(S,a,f.eventDataKeys)],event:m.event};E||(B.nextLevel=I);var k=v.triggerHandler(u,"plotly_"+h.type+"click",B);if(k!==!1&&b.hovermode&&(u._hoverdata=[s(S,a,f.eventDataKeys)],L.click(u,m.event)),!E&&k!==!1&&!u._dragging&&!u._transitioning){P.call("_storeDirectGUIEdit",a,b._tracePreGUI[a.uid],{level:a.level});var O={data:[{level:I}],traces:[h.index]},N={frame:{redraw:!1,duration:f.transitionTime},transition:{duration:f.transitionTime,easing:f.transitionEasing},mode:"immediate",fromcurrent:!0};L.loneUnhover(b._hoverlayer.node()),P.call("animate",u,O,N)}};l.on("mouseover",T),l.on("mouseout",C),l.on("click",x)};function s(n,l,c){for(var u=n.data.data,g={curveNumber:l.index,pointNumber:u.i,data:l._input,fullData:l},f=0;f0)},V.getMaxDepth=function(t){return t.maxdepth>=0?t.maxdepth:1/0},V.isHeader=function(t,r){return!(V.isLeaf(t)||t.depth===r._maxDepth-1)};function p(t){return t.data.data.pid}V.getParent=function(t,r){return V.findEntryWithLevel(t,p(r))},V.listPath=function(t,r){var s=t.parent;if(!s)return[];var n=r?[s.data[r]]:[s];return V.listPath(s,r).concat(n)},V.getPath=function(t){return V.listPath(t,"label").join("/")+"/"},V.formatValue=L.formatPieValue,V.formatPercent=function(t,r){var s=m.formatPercent(t,0);return s==="0%"&&(s=L.formatPiePercent(t,r)),s}},87619:function(G,V,e){G.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(G){G.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},57034:function(G,V,e){var m=e(71828),P=e(2654);G.exports=function(L,A){function v(p,t){return m.coerce(L,A,P,p,t)}v("sunburstcolorway",A.colorway),v("extendsunburstcolors")}},24714:function(G,V,e){var m=e(39898),P=e(674),i=e(81684).sX,L=e(91424),A=e(71828),v=e(63893),p=e(72597),t=p.recordMinTextSize,r=p.clearMinTextSize,s=e(14575),n=e(53581).getRotationAngle,l=s.computeTransform,c=s.transformInsideText,u=e(29969).styleOne,g=e(16688).resizeText,f=e(83523),w=e(7055),h=e(2791);V.plot=function(x,S,b,a){var E=x._fullLayout,y=E._sunburstlayer,z,I,B=!b,k=!E.uniformtext.mode&&h.hasTransition(b);if(r("sunburst",E),z=y.selectAll("g.trace.sunburst").data(S,function(N){return N[0].trace.uid}),z.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),z.order(),k){a&&(I=a());var O=m.transition().duration(b.duration).ease(b.easing).each("end",function(){I&&I()}).each("interrupt",function(){I&&I()});O.each(function(){y.selectAll("g.trace").each(function(N){o(x,N,this,b)})})}else z.each(function(N){o(x,N,this,b)}),E.uniformtext.mode&&g(x,E._sunburstlayer.selectAll(".trace"),"sunburst");B&&z.exit().remove()};function o(x,S,b,a){var E=x._context.staticPlot,y=x._fullLayout,z=!y.uniformtext.mode&&h.hasTransition(a),I=m.select(b),B=I.selectAll("g.slice"),k=S[0],O=k.trace,N=k.hierarchy,_=h.findEntryWithLevel(N,O.level),U=h.getMaxDepth(O),Y=y._size,J=O.domain,te=Y.w*(J.x[1]-J.x[0]),ae=Y.h*(J.y[1]-J.y[0]),ce=.5*Math.min(te,ae),Q=k.cx=Y.l+Y.w*(J.x[1]+J.x[0])/2,Z=k.cy=Y.t+Y.h*(1-J.y[0])-ae/2;if(!_)return B.remove();var j=null,K={};z&&B.each(function(Ge){K[h.getPtId(Ge)]={rpx0:Ge.rpx0,rpx1:Ge.rpx1,x0:Ge.x0,x1:Ge.x1,transform:Ge.transform},!j&&h.isEntry(Ge)&&(j=Ge)});var ee=d(_).descendants(),oe=_.height+1,q=0,$=U;k.hasMultipleRoots&&h.isHierarchyRoot(_)&&(ee=ee.slice(1),oe-=1,q=1,$+=1),ee=ee.filter(function(Ge){return Ge.y1<=$});var le=n(O.rotation);le&&ee.forEach(function(Ge){Ge.x0+=le,Ge.x1+=le});var ie=Math.min(oe,U),he=function(Ge){return(Ge-q)/ie*ce},me=function(Ge,nt){return[Ge*Math.cos(nt),-Ge*Math.sin(nt)]},Me=function(Ge){return A.pathAnnulus(Ge.rpx0,Ge.rpx1,Ge.x0,Ge.x1,Q,Z)},Te=function(Ge){return Q+T(Ge)[0]*(Ge.transform.rCenter||0)+(Ge.transform.x||0)},Oe=function(Ge){return Z+T(Ge)[1]*(Ge.transform.rCenter||0)+(Ge.transform.y||0)};B=B.data(ee,h.getPtId),B.enter().append("g").classed("slice",!0),z?B.exit().transition().each(function(){var Ge=m.select(this),nt=Ge.select("path.surface");nt.transition().attrTween("d",function($e){var et=Se($e);return function(ct){return Me(et(ct))}});var qe=Ge.select("g.slicetext");qe.attr("opacity",0)}).remove():B.exit().remove(),B.order();var Ne=null;if(z&&j){var Ee=h.getPtId(j);B.each(function(Ge){Ne===null&&h.getPtId(Ge)===Ee&&(Ne=Ge.x1)})}var xe=B;z&&(xe=xe.transition().each("end",function(){var Ge=m.select(this);h.setSliceCursor(Ge,x,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),xe.each(function(Ge){var nt=m.select(this),qe=A.ensureSingle(nt,"path","surface",function(At){At.style("pointer-events",E?"none":"all")});Ge.rpx0=he(Ge.y0),Ge.rpx1=he(Ge.y1),Ge.xmid=(Ge.x0+Ge.x1)/2,Ge.pxmid=me(Ge.rpx1,Ge.xmid),Ge.midangle=-(Ge.xmid-Math.PI/2),Ge.startangle=-(Ge.x0-Math.PI/2),Ge.stopangle=-(Ge.x1-Math.PI/2),Ge.halfangle=.5*Math.min(A.angleDelta(Ge.x0,Ge.x1)||Math.PI,Math.PI),Ge.ring=1-Ge.rpx0/Ge.rpx1,Ge.rInscribed=M(Ge),z?qe.transition().attrTween("d",function(At){var Mt=Ue(At);return function(Vt){return Me(Mt(Vt))}}):qe.attr("d",Me),nt.call(f,_,x,S,{eventDataKeys:w.eventDataKeys,transitionTime:w.CLICK_TRANSITION_TIME,transitionEasing:w.CLICK_TRANSITION_EASING}).call(h.setSliceCursor,x,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:x._transitioning}),qe.call(u,Ge,O,x);var $e=A.ensureSingle(nt,"g","slicetext"),et=A.ensureSingle($e,"text","",function(At){At.attr("data-notex",1)}),ct=A.ensureUniformFontSize(x,h.determineTextFont(O,Ge,y.font));et.text(V.formatSliceLabel(Ge,_,O,S,y)).classed("slicetext",!0).attr("text-anchor","middle").call(L.font,ct).call(v.convertToTspans,x);var dt=L.bBox(et.node());Ge.transform=c(dt,Ge,k),Ge.transform.targetX=Te(Ge),Ge.transform.targetY=Oe(Ge);var pt=function(At,Mt){var Vt=At.transform;return l(Vt,Mt),Vt.fontSize=ct.size,t(O.type,Vt,y),A.getTextTransform(Vt)};z?et.transition().attrTween("transform",function(At){var Mt=He(At);return function(Vt){return pt(Mt(Vt),dt)}}):et.attr("transform",pt(Ge,dt))});function Se(Ge){var nt=h.getPtId(Ge),qe=K[nt],$e=K[h.getPtId(_)],et;if($e){var ct=(Ge.x1>$e.x1?2*Math.PI:0)+le;et=Ge.rpx1<$e.rpx1?{x0:Ge.x0,x1:Ge.x1,rpx0:0,rpx1:0}:{x0:ct,x1:ct,rpx0:Ge.rpx0,rpx1:Ge.rpx1}}else{var dt,pt=h.getPtId(Ge.parent);B.each(function(De){if(h.getPtId(De)===pt)return dt=De});var At=dt.children,Mt;At.forEach(function(De,Ie){if(h.getPtId(De)===nt)return Mt=Ie});var Vt=At.length,Je=i(dt.x0,dt.x1);et={rpx0:ce,rpx1:ce,x0:Je(Mt/Vt),x1:Je((Mt+1)/Vt)}}return i(qe,et)}function Ue(Ge){var nt=K[h.getPtId(Ge)],qe,$e={x0:Ge.x0,x1:Ge.x1,rpx0:Ge.rpx0,rpx1:Ge.rpx1};if(nt)qe=nt;else if(j)if(Ge.parent)if(Ne){var et=(Ge.x1>Ne?2*Math.PI:0)+le;qe={x0:et,x1:et}}else qe={rpx0:ce,rpx1:ce},A.extendFlat(qe,Fe(Ge));else qe={rpx0:0,rpx1:0};else qe={x0:le,x1:le};return i(qe,$e)}function He(Ge){var nt=K[h.getPtId(Ge)],qe,$e=Ge.transform;if(nt)qe=nt;else if(qe={rpx1:Ge.rpx1,transform:{textPosAngle:$e.textPosAngle,scale:0,rotate:$e.rotate,rCenter:$e.rCenter,x:$e.x,y:$e.y}},j)if(Ge.parent)if(Ne){var et=Ge.x1>Ne?2*Math.PI:0;qe.x0=qe.x1=et}else A.extendFlat(qe,Fe(Ge));else qe.x0=qe.x1=le;else qe.x0=qe.x1=le;var ct=i(qe.transform.textPosAngle,Ge.transform.textPosAngle),dt=i(qe.rpx1,Ge.rpx1),pt=i(qe.x0,Ge.x0),At=i(qe.x1,Ge.x1),Mt=i(qe.transform.scale,$e.scale),Vt=i(qe.transform.rotate,$e.rotate),Je=$e.rCenter===0?3:qe.transform.rCenter===0?1/3:1,De=i(qe.transform.rCenter,$e.rCenter),Ie=function(ze){return De(Math.pow(ze,Je))};return function(ze){var Pe=dt(ze),be=pt(ze),se=At(ze),ye=Ie(ze),Le=me(Pe,(be+se)/2),Be=ct(ze),ot={pxmid:Le,rpx1:Pe,transform:{textPosAngle:Be,rCenter:ye,x:$e.x,y:$e.y}};return t(O.type,$e,y),{transform:{targetX:Te(ot),targetY:Oe(ot),scale:Mt(ze),rotate:Vt(ze),rCenter:ye}}}}function Fe(Ge){var nt=Ge.parent,qe=K[h.getPtId(nt)],$e={};if(qe){var et=nt.children,ct=et.indexOf(Ge),dt=et.length,pt=i(qe.x0,qe.x1);$e.x0=pt(ct/dt),$e.x1=pt(ct/dt)}else $e.x0=$e.x1=0;return $e}}function d(x){return P.partition().size([2*Math.PI,x.height+1])(x)}V.formatSliceLabel=function(x,S,b,a,E){var y=b.texttemplate,z=b.textinfo;if(!y&&(!z||z==="none"))return"";var I=E.separators,B=a[0],k=x.data.data,O=B.hierarchy,N=h.isHierarchyRoot(x),_=h.getParent(O,x),U=h.getValue(x);if(!y){var Y=z.split("+"),J=function(q){return Y.indexOf(q)!==-1},te=[],ae;if(J("label")&&k.label&&te.push(k.label),k.hasOwnProperty("v")&&J("value")&&te.push(h.formatValue(k.v,I)),!N){J("current path")&&te.push(h.getPath(x.data));var ce=0;J("percent parent")&&ce++,J("percent entry")&&ce++,J("percent root")&&ce++;var Q=ce>1;if(ce){var Z,j=function(q){ae=h.formatPercent(Z,I),Q&&(ae+=" of "+q),te.push(ae)};J("percent parent")&&!N&&(Z=U/h.getValue(_),j("parent")),J("percent entry")&&(Z=U/h.getValue(S),j("entry")),J("percent root")&&(Z=U/h.getValue(O),j("root"))}}return J("text")&&(ae=A.castOption(b,k.i,"text"),A.isValidTextValue(ae)&&te.push(ae)),te.join("
")}var K=A.castOption(b,k.i,"texttemplate");if(!K)return"";var ee={};k.label&&(ee.label=k.label),k.hasOwnProperty("v")&&(ee.value=k.v,ee.valueLabel=h.formatValue(k.v,I)),ee.currentPath=h.getPath(x.data),N||(ee.percentParent=U/h.getValue(_),ee.percentParentLabel=h.formatPercent(ee.percentParent,I),ee.parent=h.getPtLabel(_)),ee.percentEntry=U/h.getValue(S),ee.percentEntryLabel=h.formatPercent(ee.percentEntry,I),ee.entry=h.getPtLabel(S),ee.percentRoot=U/h.getValue(O),ee.percentRootLabel=h.formatPercent(ee.percentRoot,I),ee.root=h.getPtLabel(O),k.hasOwnProperty("color")&&(ee.color=k.color);var oe=A.castOption(b,k.i,"text");return(A.isValidTextValue(oe)||oe==="")&&(ee.text=oe),ee.customdata=A.castOption(b,k.i,"customdata"),A.texttemplateString(K,ee,E._d3locale,ee,b._meta||{})};function M(x){return x.rpx0===0&&A.isFullCircle([x.x0,x.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(x.halfangle)),x.ring/2))}function T(x){return C(x.rpx1,x.transform.textPosAngle)}function C(x,S){return[x*Math.sin(S),-x*Math.cos(S)]}},29969:function(G,V,e){var m=e(39898),P=e(7901),i=e(71828),L=e(72597).resizeText,A=e(43467);function v(t){var r=t._fullLayout._sunburstlayer.selectAll(".trace");L(t,r,"sunburst"),r.each(function(s){var n=m.select(this),l=s[0],c=l.trace;n.style("opacity",c.opacity),n.selectAll("path.surface").each(function(u){m.select(this).call(p,u,c,t)})})}function p(t,r,s,n){var l=r.data.data,c=!r.children,u=l.i,g=i.castOption(s,u,"marker.line.color")||P.defaultLine,f=i.castOption(s,u,"marker.line.width")||0;t.call(A,r,s,n).style("stroke-width",f).call(P.stroke,g).style("opacity",c?s.leaf.opacity:null)}G.exports={style:v,styleOne:p}},54532:function(G,V,e){var m=e(7901),P=e(50693),i=e(12663).axisHoverFormat,L=e(5386).fF,A=e(9012),v=e(1426).extendFlat,p=e(30962).overrideAll;function t(n){return{valType:"boolean",dflt:!1}}function r(n){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:t(),y:t(),z:t()},color:{valType:"color",dflt:m.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:m.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var s=G.exports=p(v({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:L(),xhoverformat:i("x"),yhoverformat:i("y"),zhoverformat:i("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},P("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:r(),y:r(),z:r()},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:v({},P.zauto,{}),zmin:v({},P.zmin,{}),zmax:v({},P.zmax,{})},hoverinfo:v({},A.hoverinfo),showlegend:v({},A.showlegend,{dflt:!1})}),"calc","nested");s.x.editType=s.y.editType=s.z.editType="calc+clearAxisTypes",s.transforms=void 0},18396:function(G,V,e){var m=e(78803);G.exports=function(i,L){L.surfacecolor?m(i,L,{vals:L.surfacecolor,containerStr:"",cLetter:"c"}):m(i,L,{vals:L.z,containerStr:"",cLetter:"c"})}},43768:function(G,V,e){var m=e(9330).gl_surface3d,P=e(9330).ndarray,i=e(9330).ndarray_linear_interpolate.d2,L=e(824),A=e(43907),v=e(71828).isArrayOrTypedArray,p=e(81697).parseColorScale,t=e(78614),r=e(21081).extractOpts;function s(a,E,y){this.scene=a,this.uid=y,this.surface=E,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=s.prototype;n.getXat=function(a,E,y,z){var I=v(this.data.x)?v(this.data.x[0])?this.data.x[E][a]:this.data.x[a]:a;return y===void 0?I:z.d2l(I,0,y)},n.getYat=function(a,E,y,z){var I=v(this.data.y)?v(this.data.y[0])?this.data.y[E][a]:this.data.y[E]:E;return y===void 0?I:z.d2l(I,0,y)},n.getZat=function(a,E,y,z){var I=this.data.z[E][a];return I===null&&this.data.connectgaps&&this.data._interpolatedZ&&(I=this.data._interpolatedZ[E][a]),y===void 0?I:z.d2l(I,0,y)},n.handlePick=function(a){if(a.object===this.surface){var E=(a.data.index[0]-1)/this.dataScaleX-1,y=(a.data.index[1]-1)/this.dataScaleY-1,z=Math.max(Math.min(Math.round(E),this.data.z[0].length-1),0),I=Math.max(Math.min(Math.round(y),this.data._ylength-1),0);a.index=[z,I],a.traceCoordinate=[this.getXat(z,I),this.getYat(z,I),this.getZat(z,I)],a.dataCoordinate=[this.getXat(z,I,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(z,I,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(z,I,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var B=0;B<3;B++){var k=a.dataCoordinate[B];k!=null&&(a.dataCoordinate[B]*=this.scene.dataScale[B])}var O=this.data.hovertext||this.data.text;return Array.isArray(O)&&O[I]&&O[I][z]!==void 0?a.textLabel=O[I][z]:O?a.textLabel=O:a.textLabel="",a.data.dataCoordinate=a.dataCoordinate.slice(),this.surface.highlight(a.data),this.scene.glplot.spikes.position=a.dataCoordinate,!0}};function l(a){var E=a[0].rgb,y=a[a.length-1].rgb;return E[0]===y[0]&&E[1]===y[1]&&E[2]===y[2]&&E[3]===y[3]}var c=[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 u(a,E){if(a0){y=c[z];break}return y}function w(a,E){if(!(a<1||E<1)){for(var y=g(a),z=g(E),I=1,B=0;BM;)z--,z/=f(z),z++,z1?I:1};function T(a,E,y){var z=y[8]+y[2]*E[0]+y[5]*E[1];return a[0]=(y[6]+y[0]*E[0]+y[3]*E[1])/z,a[1]=(y[7]+y[1]*E[0]+y[4]*E[1])/z,a}function C(a,E,y){return x(a,E,T,y),a}function x(a,E,y,z){for(var I=[0,0],B=a.shape[0],k=a.shape[1],O=0;O0&&this.contourStart[z]!==null&&this.contourEnd[z]!==null&&this.contourEnd[z]>this.contourStart[z]))for(E[z]=!0,I=this.contourStart[z];IJ&&(this.minValues[_]=J),this.maxValues[_]",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(G,V,e){var m=e(49850),P=e(1426).extendFlat,i=e(92770);G.exports=function(c,u){var g=v(u.cells.values),f=function(U){return U.slice(u.header.values.length,U.length)},w=v(u.header.values);w.length&&!w[0].length&&(w[0]=[""],w=v(w));var h=w.concat(f(g).map(function(){return p((w[0]||[""]).length)})),o=u.domain,d=Math.floor(c._fullLayout._size.w*(o.x[1]-o.x[0])),M=Math.floor(c._fullLayout._size.h*(o.y[1]-o.y[0])),T=u.header.values.length?h[0].map(function(){return u.header.height}):[m.emptyHeaderHeight],C=g.length?g[0].map(function(){return u.cells.height}):[],x=T.reduce(A,0),S=M-x,b=S+m.uplift,a=s(C,b),E=s(T,x),y=r(E,[]),z=r(a,y),I={},B=u._fullInput.columnorder.concat(f(g.map(function(U,Y){return Y}))),k=h.map(function(U,Y){var J=Array.isArray(u.columnwidth)?u.columnwidth[Math.min(Y,u.columnwidth.length-1)]:u.columnwidth;return i(J)?Number(J):1}),O=k.reduce(A,0);k=k.map(function(U){return U/O*d});var N=Math.max(L(u.header.line.width),L(u.cells.line.width)),_={key:u.uid+c._context.staticPlot,translateX:o.x[0]*c._fullLayout._size.w,translateY:c._fullLayout._size.h*(1-o.y[1]),size:c._fullLayout._size,width:d,maxLineWidth:N,height:M,columnOrder:B,groupHeight:M,rowBlocks:z,headerRowBlocks:y,scrollY:0,cells:P({},u.cells,{values:g}),headerCells:P({},u.header,{values:h}),gdColumns:h.map(function(U){return U[0]}),gdColumnsOriginalOrder:h.map(function(U){return U[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:h.map(function(U,Y){var J=I[U];I[U]=(J||0)+1;var te=U+"__"+I[U];return{key:te,label:U,specIndex:Y,xIndex:B[Y],xScale:t,x:void 0,calcdata:void 0,columnWidth:k[Y]}})};return _.columns.forEach(function(U){U.calcdata=_,U.x=t(U)}),_};function L(l){if(Array.isArray(l)){for(var c=0,u=0;u=c||M===l.length-1)&&(u[f]=h,h.key=d++,h.firstRowIndex=o,h.lastRowIndex=M,h=n(),f+=w,o=M+1,w=0);return u}function n(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}},56269:function(G,V,e){var m=e(1426).extendFlat;V.splitToPanels=function(i){var L=[0,0],A=m({},i,{key:"header",type:"header",page:0,prevPages:L,currentRepaint:[null,null],dragHandle:!0,values:i.calcdata.headerCells.values[i.specIndex],rowBlocks:i.calcdata.headerRowBlocks,calcdata:m({},i.calcdata,{cells:i.calcdata.headerCells})}),v=m({},i,{key:"cells1",type:"cells",page:0,prevPages:L,currentRepaint:[null,null],dragHandle:!1,values:i.calcdata.cells.values[i.specIndex],rowBlocks:i.calcdata.rowBlocks}),p=m({},i,{key:"cells2",type:"cells",page:1,prevPages:L,currentRepaint:[null,null],dragHandle:!1,values:i.calcdata.cells.values[i.specIndex],rowBlocks:i.calcdata.rowBlocks});return[v,p,A]},V.splitToCells=function(i){var L=P(i);return(i.values||[]).slice(L[0],L[1]).map(function(A,v){var p=typeof A=="string"&&A.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:v+p,key:L[0]+v,column:i,calcdata:i.calcdata,page:i.page,rowBlocks:i.rowBlocks,value:A}})};function P(i){var L=i.rowBlocks[i.page],A=L?L.rows[0].rowIndex:0,v=L?A+L.rows.length:0;return[A,v]}},39754:function(G,V,e){var m=e(71828),P=e(44464),i=e(27670).c;function L(A,v){for(var p=A.columnorder||[],t=A.header.values.length,r=p.slice(0,t),s=r.slice().sort(function(c,u){return c-u}),n=r.map(function(c){return s.indexOf(c)}),l=n.length;l/i),xe=!Ne||Ee;me.mayHaveMarkup=Ne&&Oe.match(/[<&>]/);var Se=y(Oe);me.latex=Se;var Ue=Se?"":B(me.calcdata.cells.prefix,Me,Te)||"",He=Se?"":B(me.calcdata.cells.suffix,Me,Te)||"",Fe=Se?null:B(me.calcdata.cells.format,Me,Te)||null,Ge=Ue+(Fe?L(Fe)(me.value):me.value)+He,nt;me.wrappingNeeded=!me.wrapped&&!xe&&!Se&&(nt=z(Ge)),me.cellHeightMayIncrease=Ee||Se||me.mayHaveMarkup||(nt===void 0?z(Ge):nt),me.needsConvertToTspans=me.mayHaveMarkup||me.wrappingNeeded||me.latex;var qe;if(me.wrappingNeeded){var $e=m.wrapSplitCharacter===" "?Ge.replace(/me&&he.push(Me),me+=Ne}return he}function Y($,le,ie){var he=w(le)[0];if(he!==void 0){var me=he.rowBlocks,Me=he.calcdata,Te=j(me,me.length),Oe=he.calcdata.groupHeight-_(he),Ne=Me.scrollY=Math.max(0,Math.min(Te-Oe,Me.scrollY)),Ee=U(me,Ne,Oe);Ee.length===1&&(Ee[0]===me.length-1?Ee.unshift(Ee[0]-1):Ee.push(Ee[0]+1)),Ee[0]%2&&Ee.reverse(),le.each(function(xe,Se){xe.page=Ee[Se],xe.scrollY=Ne}),le.attr("transform",function(xe){var Se=j(xe.rowBlocks,xe.page)-xe.scrollY;return r(0,Se)}),$&&(te($,ie,le,Ee,he.prevPages,he,0),te($,ie,le,Ee,he.prevPages,he,1),h(ie,$))}}function J($,le,ie,he){return function(Me){var Te=Me.calcdata?Me.calcdata:Me,Oe=le.filter(function(Se){return Te.key===Se.key}),Ne=ie||Te.scrollbarState.dragMultiplier,Ee=Te.scrollY;Te.scrollY=he===void 0?Te.scrollY+Ne*P.event.dy:he;var xe=Oe.selectAll("."+m.cn.yColumn).selectAll("."+m.cn.columnBlock).filter(O);return Y($,xe,Oe),Te.scrollY===Ee}}function te($,le,ie,he,me,Me,Te){var Oe=he[Te]!==me[Te];Oe&&(clearTimeout(Me.currentRepaint[Te]),Me.currentRepaint[Te]=setTimeout(function(){var Ne=ie.filter(function(Ee,xe){return xe===Te&&he[xe]!==me[xe]});o($,le,Ne,ie),me[Te]=he[Te]}))}function ae($,le,ie,he){return function(){var Me=P.select(le.parentNode);Me.each(function(Te){var Oe=Te.fragments;Me.selectAll("tspan.line").each(function(Ge,nt){Oe[nt].width=this.getComputedTextLength()});var Ne=Oe[Oe.length-1].width,Ee=Oe.slice(0,-1),xe=[],Se,Ue,He=0,Fe=Te.column.columnWidth-2*m.cellPad;for(Te.value="";Ee.length;)Se=Ee.shift(),Ue=Se.width+Ne,He+Ue>Fe&&(Te.value+=xe.join(m.wrapSpacer)+m.lineBreaker,xe=[],He=0),xe.push(Se.text),He+=Ue;He&&(Te.value+=xe.join(m.wrapSpacer)),Te.wrapped=!0}),Me.selectAll("tspan.line").remove(),E(Me.select("."+m.cn.cellText),ie,$,he),P.select(le.parentNode.parentNode).call(Z)}}function ce($,le,ie,he,me){return function(){if(!me.settledY){var Te=P.select(le.parentNode),Oe=oe(me),Ne=me.key-Oe.firstRowIndex,Ee=Oe.rows[Ne].rowHeight,xe=me.cellHeightMayIncrease?le.parentNode.getBoundingClientRect().height+2*m.cellPad:Ee,Se=Math.max(xe,Ee),Ue=Se-Oe.rows[Ne].rowHeight;Ue&&(Oe.rows[Ne].rowHeight=Se,$.selectAll("."+m.cn.columnCell).call(Z),Y(null,$.filter(O),0),h(ie,he,!0)),Te.attr("transform",function(){var He=this,Fe=He.parentNode,Ge=Fe.getBoundingClientRect(),nt=P.select(He.parentNode).select("."+m.cn.cellRect).node().getBoundingClientRect(),qe=He.transform.baseVal.consolidate(),$e=nt.top-Ge.top+(qe?qe.matrix.f:m.cellPad);return r(Q(me,P.select(He.parentNode).select("."+m.cn.cellTextHolder).node().getBoundingClientRect().width),$e)}),me.settledY=!0}}}function Q($,le){switch($.align){case"left":return m.cellPad;case"right":return $.column.columnWidth-(le||0)-m.cellPad;case"center":return($.column.columnWidth-(le||0))/2;default:return m.cellPad}}function Z($){$.attr("transform",function(le){var ie=le.rowBlocks[0].auxiliaryBlocks.reduce(function(Te,Oe){return Te+K(Oe,1/0)},0),he=oe(le),me=K(he,le.key),Me=me+ie;return r(0,Me)}).selectAll("."+m.cn.cellRect).attr("height",function(le){return q(oe(le),le.key).rowHeight})}function j($,le){for(var ie=0,he=le-1;he>=0;he--)ie+=ee($[he]);return ie}function K($,le){for(var ie=0,he=0;he<$.rows.length&&$.rows[he].rowIndex","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:t({},A.textfont,{}),editType:"calc"},text:A.text,textinfo:v.textinfo,texttemplate:P({editType:"plot"},{keys:p.eventDataKeys.concat(["label","value"])}),hovertext:A.hovertext,hoverinfo:v.hoverinfo,hovertemplate:m({},{keys:p.eventDataKeys}),textfont:A.textfont,insidetextfont:A.insidetextfont,outsidetextfont:t({},A.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:A.sort,root:v.root,domain:L({name:"treemap",trace:!0,editType:"calc"})}},78018:function(G,V,e){var m=e(74875);V.name="treemap",V.plot=function(P,i,L,A){m.plotBasePlot(V.name,P,i,L,A)},V.clean=function(P,i,L,A){m.cleanBasePlot(V.name,P,i,L,A)}},65039:function(G,V,e){var m=e(52147);V.y=function(P,i){return m.calc(P,i)},V.T=function(P){return m._runCrossTraceCalc("treemap",P)}},43473:function(G){G.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}},91174:function(G,V,e){var m=e(71828),P=e(45802),i=e(7901),L=e(27670).c,A=e(90769).handleText,v=e(97313).TEXTPAD,p=e(37434).handleMarkerDefaults,t=e(21081),r=t.hasColorscale,s=t.handleDefaults;G.exports=function(l,c,u,g){function f(a,E){return m.coerce(l,c,P,a,E)}var w=f("labels"),h=f("parents");if(!w||!w.length||!h||!h.length){c.visible=!1;return}var o=f("values");o&&o.length?f("branchvalues"):f("count"),f("level"),f("maxdepth");var d=f("tiling.packing");d==="squarify"&&f("tiling.squarifyratio"),f("tiling.flip"),f("tiling.pad");var M=f("text");f("texttemplate"),c.texttemplate||f("textinfo",Array.isArray(M)?"text+label":"label"),f("hovertext"),f("hovertemplate");var T=f("pathbar.visible"),C="auto";A(l,c,g,f,C,{hasPathbar:T,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),f("textposition");var x=c.textposition.indexOf("bottom")!==-1;p(l,c,g,f);var S=c._hasColorscale=r(l,"marker","colors")||(l.marker||{}).coloraxis;S?s(l,c,g,f,{prefix:"marker.",cLetter:"c"}):f("marker.depthfade",!(c.marker.colors||[]).length);var b=c.textfont.size*2;f("marker.pad.t",x?b/4:b),f("marker.pad.l",b/4),f("marker.pad.r",b/4),f("marker.pad.b",x?b:b/4),f("marker.cornerradius"),c._hovered={marker:{line:{width:2,color:i.contrast(g.paper_bgcolor)}}},T&&(f("pathbar.thickness",c.pathbar.textfont.size+2*v),f("pathbar.side"),f("pathbar.edgeshape")),f("sort"),f("root.color"),L(c,g,f),c._length=null}},80694:function(G,V,e){var m=e(39898),P=e(2791),i=e(72597),L=i.clearMinTextSize,A=e(16688).resizeText,v=e(46650);G.exports=function(t,r,s,n,l){var c=l.type,u=l.drawDescendants,g=t._fullLayout,f=g["_"+c+"layer"],w,h,o=!s;if(L(c,g),w=f.selectAll("g.trace."+c).data(r,function(M){return M[0].trace.uid}),w.enter().append("g").classed("trace",!0).classed(c,!0),w.order(),!g.uniformtext.mode&&P.hasTransition(s)){n&&(h=n());var d=m.transition().duration(s.duration).ease(s.easing).each("end",function(){h&&h()}).each("interrupt",function(){h&&h()});d.each(function(){f.selectAll("g.trace").each(function(M){v(t,M,this,s,u)})})}else w.each(function(M){v(t,M,this,s,u)}),g.uniformtext.mode&&A(t,f.selectAll(".trace"),c);o&&w.exit().remove()}},66209:function(G,V,e){var m=e(39898),P=e(71828),i=e(91424),L=e(63893),A=e(37210),v=e(96362).styleOne,p=e(43473),t=e(2791),r=e(83523),s=!0;G.exports=function(l,c,u,g,f){var w=f.barDifY,h=f.width,o=f.height,d=f.viewX,M=f.viewY,T=f.pathSlice,C=f.toMoveInsideSlice,x=f.strTransform,S=f.hasTransition,b=f.handleSlicesExit,a=f.makeUpdateSliceInterpolator,E=f.makeUpdateTextInterpolator,y={},z=l._context.staticPlot,I=l._fullLayout,B=c[0],k=B.trace,O=B.hierarchy,N=h/k._entryDepth,_=t.listPath(u.data,"id"),U=A(O.copy(),[h,o],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();U=U.filter(function(J){var te=_.indexOf(J.data.id);return te===-1?!1:(J.x0=N*te,J.x1=N*(te+1),J.y0=w,J.y1=w+o,J.onPathbar=!0,!0)}),U.reverse(),g=g.data(U,t.getPtId),g.enter().append("g").classed("pathbar",!0),b(g,s,y,[h,o],T),g.order();var Y=g;S&&(Y=Y.transition().each("end",function(){var J=m.select(this);t.setSliceCursor(J,l,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),Y.each(function(J){J._x0=d(J.x0),J._x1=d(J.x1),J._y0=M(J.y0),J._y1=M(J.y1),J._hoverX=d(J.x1-Math.min(h,o)/2),J._hoverY=M(J.y1-o/2);var te=m.select(this),ae=P.ensureSingle(te,"path","surface",function(j){j.style("pointer-events",z?"none":"all")});S?ae.transition().attrTween("d",function(j){var K=a(j,s,y,[h,o]);return function(ee){return T(K(ee))}}):ae.attr("d",T),te.call(r,u,l,c,{styleOne:v,eventDataKeys:p.eventDataKeys,transitionTime:p.CLICK_TRANSITION_TIME,transitionEasing:p.CLICK_TRANSITION_EASING}).call(t.setSliceCursor,l,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:l._transitioning}),ae.call(v,J,k,l,{hovered:!1}),J._text=(t.getPtLabel(J)||"").split("
").join(" ")||"";var ce=P.ensureSingle(te,"g","slicetext"),Q=P.ensureSingle(ce,"text","",function(j){j.attr("data-notex",1)}),Z=P.ensureUniformFontSize(l,t.determineTextFont(k,J,I.font,{onPathbar:!0}));Q.text(J._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(i.font,Z).call(L.convertToTspans,l),J.textBB=i.bBox(Q.node()),J.transform=C(J,{fontSize:Z.size,onPathbar:!0}),J.transform.fontSize=Z.size,S?Q.transition().attrTween("transform",function(j){var K=E(j,s,y,[h,o]);return function(ee){return x(K(ee))}}):Q.attr("transform",x(J))})}},52583:function(G,V,e){var m=e(39898),P=e(71828),i=e(91424),L=e(63893),A=e(37210),v=e(96362).styleOne,p=e(43473),t=e(2791),r=e(83523),s=e(24714).formatSliceLabel,n=!1;G.exports=function(c,u,g,f,w){var h=w.width,o=w.height,d=w.viewX,M=w.viewY,T=w.pathSlice,C=w.toMoveInsideSlice,x=w.strTransform,S=w.hasTransition,b=w.handleSlicesExit,a=w.makeUpdateSliceInterpolator,E=w.makeUpdateTextInterpolator,y=w.prevEntry,z={},I=c._context.staticPlot,B=c._fullLayout,k=u[0],O=k.trace,N=O.textposition.indexOf("left")!==-1,_=O.textposition.indexOf("right")!==-1,U=O.textposition.indexOf("bottom")!==-1,Y=!U&&!O.marker.pad.t||U&&!O.marker.pad.b,J=A(g,[h,o],{packing:O.tiling.packing,squarifyratio:O.tiling.squarifyratio,flipX:O.tiling.flip.indexOf("x")>-1,flipY:O.tiling.flip.indexOf("y")>-1,pad:{inner:O.tiling.pad,top:O.marker.pad.t,left:O.marker.pad.l,right:O.marker.pad.r,bottom:O.marker.pad.b}}),te=J.descendants(),ae=1/0,ce=-1/0;te.forEach(function(ee){var oe=ee.depth;oe>=O._maxDepth?(ee.x0=ee.x1=(ee.x0+ee.x1)/2,ee.y0=ee.y1=(ee.y0+ee.y1)/2):(ae=Math.min(ae,oe),ce=Math.max(ce,oe))}),f=f.data(te,t.getPtId),O._maxVisibleLayers=isFinite(ce)?ce-ae+1:0,f.enter().append("g").classed("slice",!0),b(f,n,z,[h,o],T),f.order();var Q=null;if(S&&y){var Z=t.getPtId(y);f.each(function(ee){Q===null&&t.getPtId(ee)===Z&&(Q={x0:ee.x0,x1:ee.x1,y0:ee.y0,y1:ee.y1})})}var j=function(){return Q||{x0:0,x1:h,y0:0,y1:o}},K=f;return S&&(K=K.transition().each("end",function(){var ee=m.select(this);t.setSliceCursor(ee,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),K.each(function(ee){var oe=t.isHeader(ee,O);ee._x0=d(ee.x0),ee._x1=d(ee.x1),ee._y0=M(ee.y0),ee._y1=M(ee.y1),ee._hoverX=d(ee.x1-O.marker.pad.r),ee._hoverY=M(U?ee.y1-O.marker.pad.b/2:ee.y0+O.marker.pad.t/2);var q=m.select(this),$=P.ensureSingle(q,"path","surface",function(me){me.style("pointer-events",I?"none":"all")});S?$.transition().attrTween("d",function(me){var Me=a(me,n,j(),[h,o]);return function(Te){return T(Me(Te))}}):$.attr("d",T),q.call(r,g,c,u,{styleOne:v,eventDataKeys:p.eventDataKeys,transitionTime:p.CLICK_TRANSITION_TIME,transitionEasing:p.CLICK_TRANSITION_EASING}).call(t.setSliceCursor,c,{isTransitioning:c._transitioning}),$.call(v,ee,O,c,{hovered:!1}),ee.x0===ee.x1||ee.y0===ee.y1?ee._text="":oe?ee._text=Y?"":t.getPtLabel(ee)||"":ee._text=s(ee,g,O,u,B)||"";var le=P.ensureSingle(q,"g","slicetext"),ie=P.ensureSingle(le,"text","",function(me){me.attr("data-notex",1)}),he=P.ensureUniformFontSize(c,t.determineTextFont(O,ee,B.font));ie.text(ee._text||" ").classed("slicetext",!0).attr("text-anchor",_?"end":N||oe?"start":"middle").call(i.font,he).call(L.convertToTspans,c),ee.textBB=i.bBox(ie.node()),ee.transform=C(ee,{fontSize:he.size,isHeader:oe}),ee.transform.fontSize=he.size,S?ie.transition().attrTween("transform",function(me){var Me=E(me,n,j(),[h,o]);return function(Te){return x(Me(Te))}}):ie.attr("transform",x(ee))}),Q}},14102:function(G){G.exports=function V(e,m,P){var i;P.swapXY&&(i=e.x0,e.x0=e.y0,e.y0=i,i=e.x1,e.x1=e.y1,e.y1=i),P.flipX&&(i=e.x0,e.x0=m[0]-e.x1,e.x1=m[0]-i),P.flipY&&(i=e.y0,e.y0=m[1]-e.y1,e.y1=m[1]-i);var L=e.children;if(L)for(var A=0;A-1?_+J:-(Y+J):0,ae={x0:U,x1:U,y0:te,y1:te+Y},ce=function(Je,De,Ie){var ze=M.tiling.pad,Pe=function(Le){return Le-ze<=De.x0},be=function(Le){return Le+ze>=De.x1},se=function(Le){return Le-ze<=De.y0},ye=function(Le){return Le+ze>=De.y1};return Je.x0===De.x0&&Je.x1===De.x1&&Je.y0===De.y0&&Je.y1===De.y1?{x0:Je.x0,x1:Je.x1,y0:Je.y0,y1:Je.y1}:{x0:Pe(Je.x0-ze)?0:be(Je.x0-ze)?Ie[0]:Je.x0,x1:Pe(Je.x1+ze)?0:be(Je.x1+ze)?Ie[0]:Je.x1,y0:se(Je.y0-ze)?0:ye(Je.y0-ze)?Ie[1]:Je.y0,y1:se(Je.y1+ze)?0:ye(Je.y1+ze)?Ie[1]:Je.y1}},Q=null,Z={},j={},K=null,ee=function(Je,De){return De?Z[l(Je)]:j[l(Je)]},oe=function(Je,De,Ie,ze){if(De)return Z[l(x)]||ae;var Pe=j[M.level]||Ie;return B(Je)?ce(Je,Pe,ze):{}};d.hasMultipleRoots&&y&&I++,M._maxDepth=I,M._backgroundColor=o.paper_bgcolor,M._entryDepth=S.data.depth,M._atRootLevel=y;var q=-N/2+k.l+k.w*(O.x[1]+O.x[0])/2,$=-_/2+k.t+k.h*(1-(O.y[1]+O.y[0])/2),le=function(Je){return q+Je},ie=function(Je){return $+Je},he=ie(0),me=le(0),Me=function(Je){return me+Je},Te=function(Je){return he+Je};function Oe(Je,De){return Je+","+De}var Ne=Me(0),Ee=function(Je){Je.x=Math.max(Ne,Je.x)},xe=M.pathbar.edgeshape,Se=function(Je){var De=Me(Math.max(Math.min(Je.x0,Je.x0),0)),Ie=Me(Math.min(Math.max(Je.x1,Je.x1),U)),ze=Te(Je.y0),Pe=Te(Je.y1),be=Y/2,se={},ye={};se.x=De,ye.x=Ie,se.y=ye.y=(ze+Pe)/2;var Le={x:De,y:ze},Be={x:Ie,y:ze},ot={x:Ie,y:Pe},at={x:De,y:Pe};return xe===">"?(Le.x-=be,Be.x-=be,ot.x-=be,at.x-=be):xe==="/"?(ot.x-=be,at.x-=be,se.x-=be/2,ye.x-=be/2):xe==="\\"?(Le.x-=be,Be.x-=be,se.x-=be/2,ye.x-=be/2):xe==="<"&&(se.x-=be,ye.x-=be),Ee(Le),Ee(at),Ee(se),Ee(Be),Ee(ot),Ee(ye),"M"+Oe(Le.x,Le.y)+"L"+Oe(Be.x,Be.y)+"L"+Oe(ye.x,ye.y)+"L"+Oe(ot.x,ot.y)+"L"+Oe(at.x,at.y)+"L"+Oe(se.x,se.y)+"Z"},Ue=M[C?"tiling":"marker"].pad,He=function(Je){return M.textposition.indexOf(Je)!==-1},Fe=He("top"),Ge=He("left"),nt=He("right"),qe=He("bottom"),$e=function(Je){var De=le(Je.x0),Ie=le(Je.x1),ze=ie(Je.y0),Pe=ie(Je.y1),be=Ie-De,se=Pe-ze;if(!be||!se)return"";var ye=M.marker.cornerradius||0,Le=Math.min(ye,be/2,se/2);Le&&Je.data&&Je.data.data&&Je.data.data.label&&(Fe&&(Le=Math.min(Le,Ue.t)),Ge&&(Le=Math.min(Le,Ue.l)),nt&&(Le=Math.min(Le,Ue.r)),qe&&(Le=Math.min(Le,Ue.b)));var Be=function(ot,at){return Le?"a"+Oe(Le,Le)+" 0 0 1 "+Oe(ot,at):""};return"M"+Oe(De,ze+Le)+Be(Le,-Le)+"L"+Oe(Ie-Le,ze)+Be(Le,Le)+"L"+Oe(Ie,Pe-Le)+Be(-Le,Le)+"L"+Oe(De+Le,Pe)+Be(-Le,-Le)+"Z"},et=function(Je,De){var Ie=Je.x0,ze=Je.x1,Pe=Je.y0,be=Je.y1,se=Je.textBB,ye=Fe||De.isHeader&&!qe,Le=ye?"start":qe?"end":"middle",Be=He("right"),ot=He("left")||De.onPathbar,at=ot?-1:Be?1:0;if(De.isHeader){if(Ie+=(C?Ue:Ue.l)-A,ze-=(C?Ue:Ue.r)-A,Ie>=ze){var wt=(Ie+ze)/2;Ie=wt,ze=wt}var It;qe?(It=be-(C?Ue:Ue.b),Pe0)for(var b=0;b0){var T=p.xa,C=p.ya,x,S,b,a,E;u.orientation==="h"?(E=t,x="y",b=C,S="x",a=T):(E=r,x="x",b=T,S="y",a=C);var y=c[p.index];if(E>=y.span[0]&&E<=y.span[1]){var z=P.extendFlat({},p),I=a.c2p(E,!0),B=A.getKdeValue(y,u,E),k=A.getPositionOnKdePath(y,u,I),O=b._offset,N=b._length;z[x+"0"]=k[0],z[x+"1"]=k[1],z[S+"0"]=z[S+"1"]=I,z[S+"Label"]=S+": "+i.hoverLabelText(a,E,u[S+"hoverformat"])+", "+c[0].t.labels.kde+" "+B.toFixed(3);for(var _=0,U=0;U")),c.color=v(g,M),[c]};function v(p,t){var r=p[t.dir].marker,s=r.color,n=r.line.color,l=r.line.width;if(P(s))return s;if(P(n)&&l)return n}},19990:function(G,V,e){G.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(G){G.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(G,V,e){var m=e(71828),P=e(13494);G.exports=function(i,L,A){var v=!1;function p(s,n){return m.coerce(i,L,P,s,n)}for(var t=0;t0&&(o?E+="M"+b[0]+","+a[1]+"V"+a[0]:E+="M"+b[1]+","+a[0]+"H"+b[0]),d!=="between"&&(C.isSum||x path").each(function(f){if(!f.isBlank){var w=g[f.dir].marker;m.select(this).call(i.fill,w.color).call(i.stroke,w.line.color).call(P.dashLine,w.line.dash,w.line.width).style("opacity",g.selectedpoints&&!f.selected?L:1)}}),p(u,g,r),u.selectAll(".lines").each(function(){var f=g.connector.line;P.lineGroupStyle(m.select(this).selectAll("path"),f.width,f.color,f.dash)})})}G.exports={style:t}},82887:function(G,V,e){var m=e(89298),P=e(71828),i=e(86281),L=e(79344).p,A=e(50606).BADNUM;V.moduleType="transform",V.name="aggregate";var v=V.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"},p=v.aggregations;V.supplyDefaults=function(c,u){var g={},f;function w(y,z){return P.coerce(c,g,v,y,z)}var h=w("enabled");if(!h)return g;var o=i.findArrayAttributes(u),d={};for(f=0;fM&&(M=S,T=x)}}return M?w(T):A};case"rms":return function(h,o){for(var d=0,M=0,T=0;T":return function(d){return h(d)>o};case">=":return function(d){return h(d)>=o};case"[]":return function(d){var M=h(d);return M>=o[0]&&M<=o[1]};case"()":return function(d){var M=h(d);return M>o[0]&&M=o[0]&&Mo[0]&&M<=o[1]};case"][":return function(d){var M=h(d);return M<=o[0]||M>=o[1]};case")(":return function(d){var M=h(d);return Mo[1]};case"](":return function(d){var M=h(d);return M<=o[0]||M>o[1]};case")[":return function(d){var M=h(d);return M=o[1]};case"{}":return function(d){return o.indexOf(h(d))!==-1};case"}{":return function(d){return o.indexOf(h(d))===-1}}}},43102:function(G,V,e){var m=e(71828),P=e(86281),i=e(74875),L=e(79344).p;V.moduleType="transform",V.name="groupby",V.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"data_array",dflt:[],editType:"calc"},nameformat:{valType:"string",editType:"calc"},styles:{_isLinkedToArray:"style",target:{valType:"string",editType:"calc"},value:{valType:"any",dflt:{},editType:"calc",_compareAsJSON:!0},editType:"calc"},editType:"calc"},V.supplyDefaults=function(v,p,t){var r,s={};function n(w,h){return m.coerce(v,s,V.attributes,w,h)}var l=n("enabled");if(!l)return s;n("groups"),n("nameformat",t._dataLength>1?"%{group} (%{trace})":"%{group}");var c=v.styles,u=s.styles=[];if(c)for(r=0;r * @license MIT */function r(be,se){if(!(be instanceof se))throw new TypeError("Cannot call a class as a function")}function s(be,se){for(var ye=0;ye"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 h(be){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(ye){return ye.__proto__||Object.getPrototypeOf(ye)},h(be)}function o(be){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(se){return typeof se}:function(se){return se&&typeof Symbol=="function"&&se.constructor===Symbol&&se!==Symbol.prototype?"symbol":typeof se},o(be)}var d=t(3910),M=t(3187),T=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;p.lW=b,p.h2=50;var C=2147483647;b.TYPED_ARRAY_SUPPORT=x(),!b.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function x(){try{var be=new Uint8Array(1),se={foo:function(){return 42}};return Object.setPrototypeOf(se,Uint8Array.prototype),Object.setPrototypeOf(be,se),be.foo()===42}catch{return!1}}Object.defineProperty(b.prototype,"parent",{enumerable:!0,get:function(){if(b.isBuffer(this))return this.buffer}}),Object.defineProperty(b.prototype,"offset",{enumerable:!0,get:function(){if(b.isBuffer(this))return this.byteOffset}});function S(be){if(be>C)throw new RangeError('The value "'+be+'" is invalid for option "size"');var se=new Uint8Array(be);return Object.setPrototypeOf(se,b.prototype),se}function b(be,se,ye){if(typeof be=="number"){if(typeof se=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return z(be)}return a(be,se,ye)}b.poolSize=8192;function a(be,se,ye){if(typeof be=="string")return I(be,se);if(ArrayBuffer.isView(be))return k(be);if(be==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+o(be));if(Je(be,ArrayBuffer)||be&&Je(be.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Je(be,SharedArrayBuffer)||be&&Je(be.buffer,SharedArrayBuffer)))return O(be,se,ye);if(typeof be=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Le=be.valueOf&&be.valueOf();if(Le!=null&&Le!==be)return b.from(Le,se,ye);var Be=N(be);if(Be)return Be;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof be[Symbol.toPrimitive]=="function")return b.from(be[Symbol.toPrimitive]("string"),se,ye);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+o(be))}b.from=function(be,se,ye){return a(be,se,ye)},Object.setPrototypeOf(b.prototype,Uint8Array.prototype),Object.setPrototypeOf(b,Uint8Array);function E(be){if(typeof be!="number")throw new TypeError('"size" argument must be of type number');if(be<0)throw new RangeError('The value "'+be+'" is invalid for option "size"')}function y(be,se,ye){return E(be),be<=0?S(be):se!==void 0?typeof ye=="string"?S(be).fill(se,ye):S(be).fill(se):S(be)}b.alloc=function(be,se,ye){return y(be,se,ye)};function z(be){return E(be),S(be<0?0:_(be)|0)}b.allocUnsafe=function(be){return z(be)},b.allocUnsafeSlow=function(be){return z(be)};function I(be,se){if((typeof se!="string"||se==="")&&(se="utf8"),!b.isEncoding(se))throw new TypeError("Unknown encoding: "+se);var ye=U(be,se)|0,Le=S(ye),Be=Le.write(be,se);return Be!==ye&&(Le=Le.slice(0,Be)),Le}function B(be){for(var se=be.length<0?0:_(be.length)|0,ye=S(se),Le=0;Le=C)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+C.toString(16)+" bytes");return be|0}b.isBuffer=function(se){return se!=null&&se._isBuffer===!0&&se!==b.prototype},b.compare=function(se,ye){if(Je(se,Uint8Array)&&(se=b.from(se,se.offset,se.byteLength)),Je(ye,Uint8Array)&&(ye=b.from(ye,ye.offset,ye.byteLength)),!b.isBuffer(se)||!b.isBuffer(ye))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(se===ye)return 0;for(var Le=se.length,Be=ye.length,ot=0,at=Math.min(Le,Be);otBe.length?(b.isBuffer(at)||(at=b.from(at)),at.copy(Be,ot)):Uint8Array.prototype.set.call(Be,at,ot);else if(b.isBuffer(at))at.copy(Be,ot);else throw new TypeError('"list" argument must be an Array of Buffers');ot+=at.length}return Be};function U(be,se){if(b.isBuffer(be))return be.length;if(ArrayBuffer.isView(be)||Je(be,ArrayBuffer))return be.byteLength;if(typeof be!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+o(be));var ye=be.length,Le=arguments.length>2&&arguments[2]===!0;if(!Le&&ye===0)return 0;for(var Be=!1;;)switch(se){case"ascii":case"latin1":case"binary":return ye;case"utf8":case"utf-8":return dt(be).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ye*2;case"hex":return ye>>>1;case"base64":return Mt(be).length;default:if(Be)return Le?-1:dt(be).length;se=(""+se).toLowerCase(),Be=!0}}b.byteLength=U;function Y(be,se,ye){var Le=!1;if((se===void 0||se<0)&&(se=0),se>this.length||((ye===void 0||ye>this.length)&&(ye=this.length),ye<=0)||(ye>>>=0,se>>>=0,ye<=se))return"";for(be||(be="utf8");;)switch(be){case"hex":return he(this,se,ye);case"utf8":case"utf-8":return oe(this,se,ye);case"ascii":return le(this,se,ye);case"latin1":case"binary":return ie(this,se,ye);case"base64":return ee(this,se,ye);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return me(this,se,ye);default:if(Le)throw new TypeError("Unknown encoding: "+be);be=(be+"").toLowerCase(),Le=!0}}b.prototype._isBuffer=!0;function J(be,se,ye){var Le=be[se];be[se]=be[ye],be[ye]=Le}b.prototype.swap16=function(){var se=this.length;if(se%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ye=0;yeye&&(se+=" ... "),""},T&&(b.prototype[T]=b.prototype.inspect),b.prototype.compare=function(se,ye,Le,Be,ot){if(Je(se,Uint8Array)&&(se=b.from(se,se.offset,se.byteLength)),!b.isBuffer(se))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+o(se));if(ye===void 0&&(ye=0),Le===void 0&&(Le=se?se.length:0),Be===void 0&&(Be=0),ot===void 0&&(ot=this.length),ye<0||Le>se.length||Be<0||ot>this.length)throw new RangeError("out of range index");if(Be>=ot&&ye>=Le)return 0;if(Be>=ot)return-1;if(ye>=Le)return 1;if(ye>>>=0,Le>>>=0,Be>>>=0,ot>>>=0,this===se)return 0;for(var at=ot-Be,wt=Le-ye,It=Math.min(at,wt),Bt=this.slice(Be,ot),Gt=se.slice(ye,Le),Lt=0;Lt2147483647?ye=2147483647:ye<-2147483648&&(ye=-2147483648),ye=+ye,De(ye)&&(ye=Be?0:be.length-1),ye<0&&(ye=be.length+ye),ye>=be.length){if(Be)return-1;ye=be.length-1}else if(ye<0)if(Be)ye=0;else return-1;if(typeof se=="string"&&(se=b.from(se,Le)),b.isBuffer(se))return se.length===0?-1:ae(be,se,ye,Le,Be);if(typeof se=="number")return se=se&255,typeof Uint8Array.prototype.indexOf=="function"?Be?Uint8Array.prototype.indexOf.call(be,se,ye):Uint8Array.prototype.lastIndexOf.call(be,se,ye):ae(be,[se],ye,Le,Be);throw new TypeError("val must be string, number or Buffer")}function ae(be,se,ye,Le,Be){var ot=1,at=be.length,wt=se.length;if(Le!==void 0&&(Le=String(Le).toLowerCase(),Le==="ucs2"||Le==="ucs-2"||Le==="utf16le"||Le==="utf-16le")){if(be.length<2||se.length<2)return-1;ot=2,at/=2,wt/=2,ye/=2}function It(ir,_r){return ot===1?ir[_r]:ir.readUInt16BE(_r*ot)}var Bt;if(Be){var Gt=-1;for(Bt=ye;Btat&&(ye=at-wt),Bt=ye;Bt>=0;Bt--){for(var Lt=!0,Kt=0;KtBe&&(Le=Be)):Le=Be;var ot=se.length;Le>ot/2&&(Le=ot/2);var at;for(at=0;at>>0,isFinite(Le)?(Le=Le>>>0,Be===void 0&&(Be="utf8")):(Be=Le,Le=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ot=this.length-ye;if((Le===void 0||Le>ot)&&(Le=ot),se.length>0&&(Le<0||ye<0)||ye>this.length)throw new RangeError("Attempt to write outside buffer bounds");Be||(Be="utf8");for(var at=!1;;)switch(Be){case"hex":return ce(this,se,ye,Le);case"utf8":case"utf-8":return Q(this,se,ye,Le);case"ascii":case"latin1":case"binary":return Z(this,se,ye,Le);case"base64":return j(this,se,ye,Le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return K(this,se,ye,Le);default:if(at)throw new TypeError("Unknown encoding: "+Be);Be=(""+Be).toLowerCase(),at=!0}},b.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ee(be,se,ye){return se===0&&ye===be.length?d.fromByteArray(be):d.fromByteArray(be.slice(se,ye))}function oe(be,se,ye){ye=Math.min(be.length,ye);for(var Le=[],Be=se;Be239?4:ot>223?3:ot>191?2:1;if(Be+wt<=ye){var It=void 0,Bt=void 0,Gt=void 0,Lt=void 0;switch(wt){case 1:ot<128&&(at=ot);break;case 2:It=be[Be+1],(It&192)===128&&(Lt=(ot&31)<<6|It&63,Lt>127&&(at=Lt));break;case 3:It=be[Be+1],Bt=be[Be+2],(It&192)===128&&(Bt&192)===128&&(Lt=(ot&15)<<12|(It&63)<<6|Bt&63,Lt>2047&&(Lt<55296||Lt>57343)&&(at=Lt));break;case 4:It=be[Be+1],Bt=be[Be+2],Gt=be[Be+3],(It&192)===128&&(Bt&192)===128&&(Gt&192)===128&&(Lt=(ot&15)<<18|(It&63)<<12|(Bt&63)<<6|Gt&63,Lt>65535&&Lt<1114112&&(at=Lt))}}at===null?(at=65533,wt=1):at>65535&&(at-=65536,Le.push(at>>>10&1023|55296),at=56320|at&1023),Le.push(at),Be+=wt}return $(Le)}var q=4096;function $(be){var se=be.length;if(se<=q)return String.fromCharCode.apply(String,be);for(var ye="",Le=0;LeLe)&&(ye=Le);for(var Be="",ot=se;otLe&&(se=Le),ye<0?(ye+=Le,ye<0&&(ye=0)):ye>Le&&(ye=Le),yeye)throw new RangeError("Trying to access beyond buffer length")}b.prototype.readUintLE=b.prototype.readUIntLE=function(se,ye,Le){se=se>>>0,ye=ye>>>0,Le||Me(se,ye,this.length);for(var Be=this[se],ot=1,at=0;++at>>0,ye=ye>>>0,Le||Me(se,ye,this.length);for(var Be=this[se+--ye],ot=1;ye>0&&(ot*=256);)Be+=this[se+--ye]*ot;return Be},b.prototype.readUint8=b.prototype.readUInt8=function(se,ye){return se=se>>>0,ye||Me(se,1,this.length),this[se]},b.prototype.readUint16LE=b.prototype.readUInt16LE=function(se,ye){return se=se>>>0,ye||Me(se,2,this.length),this[se]|this[se+1]<<8},b.prototype.readUint16BE=b.prototype.readUInt16BE=function(se,ye){return se=se>>>0,ye||Me(se,2,this.length),this[se]<<8|this[se+1]},b.prototype.readUint32LE=b.prototype.readUInt32LE=function(se,ye){return se=se>>>0,ye||Me(se,4,this.length),(this[se]|this[se+1]<<8|this[se+2]<<16)+this[se+3]*16777216},b.prototype.readUint32BE=b.prototype.readUInt32BE=function(se,ye){return se=se>>>0,ye||Me(se,4,this.length),this[se]*16777216+(this[se+1]<<16|this[se+2]<<8|this[se+3])},b.prototype.readBigUInt64LE=ze(function(se){se=se>>>0,qe(se,"offset");var ye=this[se],Le=this[se+7];(ye===void 0||Le===void 0)&&$e(se,this.length-8);var Be=ye+this[++se]*Math.pow(2,8)+this[++se]*Math.pow(2,16)+this[++se]*Math.pow(2,24),ot=this[++se]+this[++se]*Math.pow(2,8)+this[++se]*Math.pow(2,16)+Le*Math.pow(2,24);return BigInt(Be)+(BigInt(ot)<>>0,qe(se,"offset");var ye=this[se],Le=this[se+7];(ye===void 0||Le===void 0)&&$e(se,this.length-8);var Be=ye*Math.pow(2,24)+this[++se]*Math.pow(2,16)+this[++se]*Math.pow(2,8)+this[++se],ot=this[++se]*Math.pow(2,24)+this[++se]*Math.pow(2,16)+this[++se]*Math.pow(2,8)+Le;return(BigInt(Be)<>>0,ye=ye>>>0,Le||Me(se,ye,this.length);for(var Be=this[se],ot=1,at=0;++at=ot&&(Be-=Math.pow(2,8*ye)),Be},b.prototype.readIntBE=function(se,ye,Le){se=se>>>0,ye=ye>>>0,Le||Me(se,ye,this.length);for(var Be=ye,ot=1,at=this[se+--Be];Be>0&&(ot*=256);)at+=this[se+--Be]*ot;return ot*=128,at>=ot&&(at-=Math.pow(2,8*ye)),at},b.prototype.readInt8=function(se,ye){return se=se>>>0,ye||Me(se,1,this.length),this[se]&128?(255-this[se]+1)*-1:this[se]},b.prototype.readInt16LE=function(se,ye){se=se>>>0,ye||Me(se,2,this.length);var Le=this[se]|this[se+1]<<8;return Le&32768?Le|4294901760:Le},b.prototype.readInt16BE=function(se,ye){se=se>>>0,ye||Me(se,2,this.length);var Le=this[se+1]|this[se]<<8;return Le&32768?Le|4294901760:Le},b.prototype.readInt32LE=function(se,ye){return se=se>>>0,ye||Me(se,4,this.length),this[se]|this[se+1]<<8|this[se+2]<<16|this[se+3]<<24},b.prototype.readInt32BE=function(se,ye){return se=se>>>0,ye||Me(se,4,this.length),this[se]<<24|this[se+1]<<16|this[se+2]<<8|this[se+3]},b.prototype.readBigInt64LE=ze(function(se){se=se>>>0,qe(se,"offset");var ye=this[se],Le=this[se+7];(ye===void 0||Le===void 0)&&$e(se,this.length-8);var Be=this[se+4]+this[se+5]*Math.pow(2,8)+this[se+6]*Math.pow(2,16)+(Le<<24);return(BigInt(Be)<>>0,qe(se,"offset");var ye=this[se],Le=this[se+7];(ye===void 0||Le===void 0)&&$e(se,this.length-8);var Be=(ye<<24)+this[++se]*Math.pow(2,16)+this[++se]*Math.pow(2,8)+this[++se];return(BigInt(Be)<>>0,ye||Me(se,4,this.length),M.read(this,se,!0,23,4)},b.prototype.readFloatBE=function(se,ye){return se=se>>>0,ye||Me(se,4,this.length),M.read(this,se,!1,23,4)},b.prototype.readDoubleLE=function(se,ye){return se=se>>>0,ye||Me(se,8,this.length),M.read(this,se,!0,52,8)},b.prototype.readDoubleBE=function(se,ye){return se=se>>>0,ye||Me(se,8,this.length),M.read(this,se,!1,52,8)};function Te(be,se,ye,Le,Be,ot){if(!b.isBuffer(be))throw new TypeError('"buffer" argument must be a Buffer instance');if(se>Be||sebe.length)throw new RangeError("Index out of range")}b.prototype.writeUintLE=b.prototype.writeUIntLE=function(se,ye,Le,Be){if(se=+se,ye=ye>>>0,Le=Le>>>0,!Be){var ot=Math.pow(2,8*Le)-1;Te(this,se,ye,Le,ot,0)}var at=1,wt=0;for(this[ye]=se&255;++wt>>0,Le=Le>>>0,!Be){var ot=Math.pow(2,8*Le)-1;Te(this,se,ye,Le,ot,0)}var at=Le-1,wt=1;for(this[ye+at]=se&255;--at>=0&&(wt*=256);)this[ye+at]=se/wt&255;return ye+Le},b.prototype.writeUint8=b.prototype.writeUInt8=function(se,ye,Le){return se=+se,ye=ye>>>0,Le||Te(this,se,ye,1,255,0),this[ye]=se&255,ye+1},b.prototype.writeUint16LE=b.prototype.writeUInt16LE=function(se,ye,Le){return se=+se,ye=ye>>>0,Le||Te(this,se,ye,2,65535,0),this[ye]=se&255,this[ye+1]=se>>>8,ye+2},b.prototype.writeUint16BE=b.prototype.writeUInt16BE=function(se,ye,Le){return se=+se,ye=ye>>>0,Le||Te(this,se,ye,2,65535,0),this[ye]=se>>>8,this[ye+1]=se&255,ye+2},b.prototype.writeUint32LE=b.prototype.writeUInt32LE=function(se,ye,Le){return se=+se,ye=ye>>>0,Le||Te(this,se,ye,4,4294967295,0),this[ye+3]=se>>>24,this[ye+2]=se>>>16,this[ye+1]=se>>>8,this[ye]=se&255,ye+4},b.prototype.writeUint32BE=b.prototype.writeUInt32BE=function(se,ye,Le){return se=+se,ye=ye>>>0,Le||Te(this,se,ye,4,4294967295,0),this[ye]=se>>>24,this[ye+1]=se>>>16,this[ye+2]=se>>>8,this[ye+3]=se&255,ye+4};function Oe(be,se,ye,Le,Be){nt(se,Le,Be,be,ye,7);var ot=Number(se&BigInt(4294967295));be[ye++]=ot,ot=ot>>8,be[ye++]=ot,ot=ot>>8,be[ye++]=ot,ot=ot>>8,be[ye++]=ot;var at=Number(se>>BigInt(32)&BigInt(4294967295));return be[ye++]=at,at=at>>8,be[ye++]=at,at=at>>8,be[ye++]=at,at=at>>8,be[ye++]=at,ye}function Ne(be,se,ye,Le,Be){nt(se,Le,Be,be,ye,7);var ot=Number(se&BigInt(4294967295));be[ye+7]=ot,ot=ot>>8,be[ye+6]=ot,ot=ot>>8,be[ye+5]=ot,ot=ot>>8,be[ye+4]=ot;var at=Number(se>>BigInt(32)&BigInt(4294967295));return be[ye+3]=at,at=at>>8,be[ye+2]=at,at=at>>8,be[ye+1]=at,at=at>>8,be[ye]=at,ye+8}b.prototype.writeBigUInt64LE=ze(function(se){var ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Oe(this,se,ye,BigInt(0),BigInt("0xffffffffffffffff"))}),b.prototype.writeBigUInt64BE=ze(function(se){var ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Ne(this,se,ye,BigInt(0),BigInt("0xffffffffffffffff"))}),b.prototype.writeIntLE=function(se,ye,Le,Be){if(se=+se,ye=ye>>>0,!Be){var ot=Math.pow(2,8*Le-1);Te(this,se,ye,Le,ot-1,-ot)}var at=0,wt=1,It=0;for(this[ye]=se&255;++at>0)-It&255;return ye+Le},b.prototype.writeIntBE=function(se,ye,Le,Be){if(se=+se,ye=ye>>>0,!Be){var ot=Math.pow(2,8*Le-1);Te(this,se,ye,Le,ot-1,-ot)}var at=Le-1,wt=1,It=0;for(this[ye+at]=se&255;--at>=0&&(wt*=256);)se<0&&It===0&&this[ye+at+1]!==0&&(It=1),this[ye+at]=(se/wt>>0)-It&255;return ye+Le},b.prototype.writeInt8=function(se,ye,Le){return se=+se,ye=ye>>>0,Le||Te(this,se,ye,1,127,-128),se<0&&(se=255+se+1),this[ye]=se&255,ye+1},b.prototype.writeInt16LE=function(se,ye,Le){return se=+se,ye=ye>>>0,Le||Te(this,se,ye,2,32767,-32768),this[ye]=se&255,this[ye+1]=se>>>8,ye+2},b.prototype.writeInt16BE=function(se,ye,Le){return se=+se,ye=ye>>>0,Le||Te(this,se,ye,2,32767,-32768),this[ye]=se>>>8,this[ye+1]=se&255,ye+2},b.prototype.writeInt32LE=function(se,ye,Le){return se=+se,ye=ye>>>0,Le||Te(this,se,ye,4,2147483647,-2147483648),this[ye]=se&255,this[ye+1]=se>>>8,this[ye+2]=se>>>16,this[ye+3]=se>>>24,ye+4},b.prototype.writeInt32BE=function(se,ye,Le){return se=+se,ye=ye>>>0,Le||Te(this,se,ye,4,2147483647,-2147483648),se<0&&(se=4294967295+se+1),this[ye]=se>>>24,this[ye+1]=se>>>16,this[ye+2]=se>>>8,this[ye+3]=se&255,ye+4},b.prototype.writeBigInt64LE=ze(function(se){var ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Oe(this,se,ye,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),b.prototype.writeBigInt64BE=ze(function(se){var ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Ne(this,se,ye,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ee(be,se,ye,Le,Be,ot){if(ye+Le>be.length)throw new RangeError("Index out of range");if(ye<0)throw new RangeError("Index out of range")}function xe(be,se,ye,Le,Be){return se=+se,ye=ye>>>0,Be||Ee(be,se,ye,4),M.write(be,se,ye,Le,23,4),ye+4}b.prototype.writeFloatLE=function(se,ye,Le){return xe(this,se,ye,!0,Le)},b.prototype.writeFloatBE=function(se,ye,Le){return xe(this,se,ye,!1,Le)};function Se(be,se,ye,Le,Be){return se=+se,ye=ye>>>0,Be||Ee(be,se,ye,8),M.write(be,se,ye,Le,52,8),ye+8}b.prototype.writeDoubleLE=function(se,ye,Le){return Se(this,se,ye,!0,Le)},b.prototype.writeDoubleBE=function(se,ye,Le){return Se(this,se,ye,!1,Le)},b.prototype.copy=function(se,ye,Le,Be){if(!b.isBuffer(se))throw new TypeError("argument should be a Buffer");if(Le||(Le=0),!Be&&Be!==0&&(Be=this.length),ye>=se.length&&(ye=se.length),ye||(ye=0),Be>0&&Be=this.length)throw new RangeError("Index out of range");if(Be<0)throw new RangeError("sourceEnd out of bounds");Be>this.length&&(Be=this.length),se.length-ye>>0,Le=Le===void 0?this.length:Le>>>0,se||(se=0);var at;if(typeof se=="number")for(at=ye;atMath.pow(2,32)?Be=Fe(String(ye)):typeof ye=="bigint"&&(Be=String(ye),(ye>Math.pow(BigInt(2),BigInt(32))||ye<-Math.pow(BigInt(2),BigInt(32)))&&(Be=Fe(Be)),Be+="n"),Le+=" It must be ".concat(se,". Received ").concat(Be),Le},RangeError);function Fe(be){for(var se="",ye=be.length,Le=be[0]==="-"?1:0;ye>=Le+4;ye-=3)se="_".concat(be.slice(ye-3,ye)).concat(se);return"".concat(be.slice(0,ye)).concat(se)}function Ge(be,se,ye){qe(se,"offset"),(be[se]===void 0||be[se+ye]===void 0)&&$e(se,be.length-(ye+1))}function nt(be,se,ye,Le,Be,ot){if(be>ye||be3?se===0||se===BigInt(0)?wt=">= 0".concat(at," and < 2").concat(at," ** ").concat((ot+1)*8).concat(at):wt=">= -(2".concat(at," ** ").concat((ot+1)*8-1).concat(at,") and < 2 ** ")+"".concat((ot+1)*8-1).concat(at):wt=">= ".concat(se).concat(at," and <= ").concat(ye).concat(at),new Ue.ERR_OUT_OF_RANGE("value",wt,be)}Ge(Le,Be,ot)}function qe(be,se){if(typeof be!="number")throw new Ue.ERR_INVALID_ARG_TYPE(se,"number",be)}function $e(be,se,ye){throw Math.floor(be)!==be?(qe(be,ye),new Ue.ERR_OUT_OF_RANGE(ye||"offset","an integer",be)):se<0?new Ue.ERR_BUFFER_OUT_OF_BOUNDS:new Ue.ERR_OUT_OF_RANGE(ye||"offset",">= ".concat(ye?1:0," and <= ").concat(se),be)}var et=/[^+/0-9A-Za-z-_]/g;function ct(be){if(be=be.split("=")[0],be=be.trim().replace(et,""),be.length<2)return"";for(;be.length%4!==0;)be=be+"=";return be}function dt(be,se){se=se||1/0;for(var ye,Le=be.length,Be=null,ot=[],at=0;at55295&&ye<57344){if(!Be){if(ye>56319){(se-=3)>-1&&ot.push(239,191,189);continue}else if(at+1===Le){(se-=3)>-1&&ot.push(239,191,189);continue}Be=ye;continue}if(ye<56320){(se-=3)>-1&&ot.push(239,191,189),Be=ye;continue}ye=(Be-55296<<10|ye-56320)+65536}else Be&&(se-=3)>-1&&ot.push(239,191,189);if(Be=null,ye<128){if((se-=1)<0)break;ot.push(ye)}else if(ye<2048){if((se-=2)<0)break;ot.push(ye>>6|192,ye&63|128)}else if(ye<65536){if((se-=3)<0)break;ot.push(ye>>12|224,ye>>6&63|128,ye&63|128)}else if(ye<1114112){if((se-=4)<0)break;ot.push(ye>>18|240,ye>>12&63|128,ye>>6&63|128,ye&63|128)}else throw new Error("Invalid code point")}return ot}function pt(be){for(var se=[],ye=0;ye>8,Be=ye%256,ot.push(Be),ot.push(Le);return ot}function Mt(be){return d.toByteArray(ct(be))}function Vt(be,se,ye,Le){var Be;for(Be=0;Be=se.length||Be>=be.length);++Be)se[Be+ye]=be[Be];return Be}function Je(be,se){return be instanceof se||be!=null&&be.constructor!=null&&be.constructor.name!=null&&be.constructor.name===se.name}function De(be){return be!==be}var Ie=function(){for(var be="0123456789abcdef",se=new Array(256),ye=0;ye<16;++ye)for(var Le=ye*16,Be=0;Be<16;++Be)se[Le+Be]=be[ye]+be[Be];return se}();function ze(be){return typeof BigInt>"u"?Pe:be}function Pe(){throw new Error("BigInt not supported")}},2321:function(v){v.exports=s,v.exports.isMobile=s,v.exports.default=s;var p=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,t=/CrOS/,r=/android|ipad|playbook|silk/i;function s(n){n||(n={});var l=n.ua;if(!l&&typeof navigator<"u"&&(l=navigator.userAgent),l&&l.headers&&typeof l.headers["user-agent"]=="string"&&(l=l.headers["user-agent"]),typeof l!="string")return!1;var c=p.test(l)&&!t.test(l)||!!n.tablet&&r.test(l);return!c&&n.tablet&&n.featureDetect&&navigator&&navigator.maxTouchPoints>1&&l.indexOf("Macintosh")!==-1&&l.indexOf("Safari")!==-1&&(c=!0),c}},3910:function(v,p){p.byteLength=g,p.toByteArray=w,p.fromByteArray=d;for(var t=[],r=[],s=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,c=n.length;l0)throw new Error("Invalid string. Length must be a multiple of 4");var C=M.indexOf("=");C===-1&&(C=T);var x=C===T?0:4-C%4;return[C,x]}function g(M){var T=u(M),C=T[0],x=T[1];return(C+x)*3/4-x}function f(M,T,C){return(T+C)*3/4-C}function w(M){var T,C=u(M),x=C[0],S=C[1],b=new s(f(M,x,S)),a=0,E=S>0?x-4:x,y;for(y=0;y>16&255,b[a++]=T>>8&255,b[a++]=T&255;return S===2&&(T=r[M.charCodeAt(y)]<<2|r[M.charCodeAt(y+1)]>>4,b[a++]=T&255),S===1&&(T=r[M.charCodeAt(y)]<<10|r[M.charCodeAt(y+1)]<<4|r[M.charCodeAt(y+2)]>>2,b[a++]=T>>8&255,b[a++]=T&255),b}function h(M){return t[M>>18&63]+t[M>>12&63]+t[M>>6&63]+t[M&63]}function o(M,T,C){for(var x,S=[],b=T;bE?E:a+b));return x===1?(T=M[C-1],S.push(t[T>>2]+t[T<<4&63]+"==")):x===2&&(T=(M[C-2]<<8)+M[C-1],S.push(t[T>>10]+t[T>>4&63]+t[T<<2&63]+"=")),S.join("")}},3187:function(v,p){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */p.read=function(t,r,s,n,l){var c,u,g=l*8-n-1,f=(1<>1,h=-7,o=s?l-1:0,d=s?-1:1,M=t[r+o];for(o+=d,c=M&(1<<-h)-1,M>>=-h,h+=g;h>0;c=c*256+t[r+o],o+=d,h-=8);for(u=c&(1<<-h)-1,c>>=-h,h+=n;h>0;u=u*256+t[r+o],o+=d,h-=8);if(c===0)c=1-w;else{if(c===f)return u?NaN:(M?-1:1)*(1/0);u=u+Math.pow(2,n),c=c-w}return(M?-1:1)*u*Math.pow(2,c-n)},p.write=function(t,r,s,n,l,c){var u,g,f,w=c*8-l-1,h=(1<>1,d=l===23?Math.pow(2,-24)-Math.pow(2,-77):0,M=n?0:c-1,T=n?1:-1,C=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(g=isNaN(r)?1:0,u=h):(u=Math.floor(Math.log(r)/Math.LN2),r*(f=Math.pow(2,-u))<1&&(u--,f*=2),u+o>=1?r+=d/f:r+=d*Math.pow(2,1-o),r*f>=2&&(u++,f/=2),u+o>=h?(g=0,u=h):u+o>=1?(g=(r*f-1)*Math.pow(2,l),u=u+o):(g=r*Math.pow(2,o-1)*Math.pow(2,l),u=0));l>=8;t[s+M]=g&255,M+=T,g/=256,l-=8);for(u=u<0;t[s+M]=u&255,M+=T,u/=256,w-=8);t[s+M-T]|=C*128}},1152:function(v,p,t){v.exports=u;var r=t(3440),s=t(7774),n=t(9298);function l(g,f){this._controllerNames=Object.keys(g),this._controllerList=this._controllerNames.map(function(w){return g[w]}),this._mode=f,this._active=g[f],this._active||(this._mode="turntable",this._active=g.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var c=l.prototype;c.flush=function(g){for(var f=this._controllerList,w=0;w"u"?t(5346):WeakMap,s=t(5827),n=t(2944),l=new r;function c(u){var g=l.get(u),f=g&&(g._triangleBuffer.handle||g._triangleBuffer.buffer);if(!f||!u.isBuffer(f)){var w=s(u,new Float32Array([-1,-1,-1,4,4,-1]));g=n(u,[{buffer:w,type:u.FLOAT,size:2}]),g._triangleBuffer=w,l.set(u,g)}g.bind(),u.drawArrays(u.TRIANGLES,0,3),g.unbind()}v.exports=c},8008:function(v,p,t){var r=t(4930);v.exports=s;function s(n,l,c){l=typeof l=="number"?l:1,c=c||": ";var u=n.split(/\r?\n/),g=String(u.length+l-1).length;return u.map(function(f,w){var h=w+l,o=String(h).length,d=r(h,g-o);return d+c+f}).join(` `)}},2153:function(v,p,t){v.exports=n;var r=t(417);function s(l,c){for(var u=new Array(c+1),g=0;g0?o=o.ushln(h):h<0&&(d=d.ushln(-h)),c(o,d)}},234:function(v,p,t){var r=t(3218);v.exports=s;function s(n){return Array.isArray(n)&&n.length===2&&r(n[0])&&r(n[1])}},4275:function(v,p,t){var r=t(1928);v.exports=s;function s(n){return n.cmp(new r(0))}},9958:function(v,p,t){var r=t(4275);v.exports=s;function s(n){var l=n.length,c=n.words,u=0;if(l===1)u=c[0];else if(l===2)u=c[0]+c[1]*67108864;else for(var g=0;g20?52:u+32}},3218:function(v,p,t){t(1928),v.exports=r;function r(s){return s&&typeof s=="object"&&!!s.words}},5514:function(v,p,t){var r=t(1928),s=t(8362);v.exports=n;function n(l){var c=s.exponent(l);return c<52?new r(l):new r(l*Math.pow(2,52-c)).ushln(c-52)}},8524:function(v,p,t){var r=t(5514),s=t(4275);v.exports=n;function n(l,c){var u=s(l),g=s(c);if(u===0)return[r(0),r(1)];if(g===0)return[r(0),r(0)];g<0&&(l=l.neg(),c=c.neg());var f=l.gcd(c);return f.cmpn(1)?[l.div(f),c.div(f)]:[l,c]}},2813:function(v,p,t){var r=t(1928);v.exports=s;function s(n){return new r(n)}},3962:function(v,p,t){var r=t(8524);v.exports=s;function s(n,l){return r(n[0].mul(l[0]),n[1].mul(l[1]))}},4951:function(v,p,t){var r=t(4275);v.exports=s;function s(n){return r(n[0])*r(n[1])}},4354:function(v,p,t){var r=t(8524);v.exports=s;function s(n,l){return r(n[0].mul(l[1]).sub(n[1].mul(l[0])),n[1].mul(l[1]))}},7999:function(v,p,t){var r=t(9958),s=t(1112);v.exports=n;function n(l){var c=l[0],u=l[1];if(c.cmpn(0)===0)return 0;var g=c.abs().divmod(u.abs()),f=g.div,w=r(f),h=g.mod,o=c.negative!==u.negative?-1:1;if(h.cmpn(0)===0)return o*w;if(w){var d=s(w)+4,M=r(h.ushln(d).divRound(u));return o*(w+M*Math.pow(2,-d))}else{var T=u.bitLength()-h.bitLength()+53,M=r(h.ushln(T).divRound(u));return T<1023?o*M*Math.pow(2,-T):(M*=Math.pow(2,-1023),o*M*Math.pow(2,1023-T))}}},5070:function(v){function p(c,u,g,f,w){for(var h=w+1;f<=w;){var o=f+w>>>1,d=c[o],M=g!==void 0?g(d,u):d-u;M>=0?(h=o,w=o-1):f=o+1}return h}function t(c,u,g,f,w){for(var h=w+1;f<=w;){var o=f+w>>>1,d=c[o],M=g!==void 0?g(d,u):d-u;M>0?(h=o,w=o-1):f=o+1}return h}function r(c,u,g,f,w){for(var h=f-1;f<=w;){var o=f+w>>>1,d=c[o],M=g!==void 0?g(d,u):d-u;M<0?(h=o,f=o+1):w=o-1}return h}function s(c,u,g,f,w){for(var h=f-1;f<=w;){var o=f+w>>>1,d=c[o],M=g!==void 0?g(d,u):d-u;M<=0?(h=o,f=o+1):w=o-1}return h}function n(c,u,g,f,w){for(;f<=w;){var h=f+w>>>1,o=c[h],d=g!==void 0?g(o,u):o-u;if(d===0)return h;d<=0?f=h+1:w=h-1}return-1}function l(c,u,g,f,w,h){return typeof g=="function"?h(c,u,g,f===void 0?0:f|0,w===void 0?c.length-1:w|0):h(c,u,void 0,g===void 0?0:g|0,f===void 0?c.length-1:f|0)}v.exports={ge:function(c,u,g,f,w){return l(c,u,g,f,w,p)},gt:function(c,u,g,f,w){return l(c,u,g,f,w,t)},lt:function(c,u,g,f,w){return l(c,u,g,f,w,r)},le:function(c,u,g,f,w){return l(c,u,g,f,w,s)},eq:function(c,u,g,f,w){return l(c,u,g,f,w,n)}}},2288:function(v,p){"use restrict";var t=32;p.INT_BITS=t,p.INT_MAX=2147483647,p.INT_MIN=-1<0)-(n<0)},p.abs=function(n){var l=n>>t-1;return(n^l)-l},p.min=function(n,l){return l^(n^l)&-(n65535)<<4,n>>>=l,c=(n>255)<<3,n>>>=c,l|=c,c=(n>15)<<2,n>>>=c,l|=c,c=(n>3)<<1,n>>>=c,l|=c,l|n>>1},p.log10=function(n){return n>=1e9?9:n>=1e8?8:n>=1e7?7:n>=1e6?6:n>=1e5?5:n>=1e4?4:n>=1e3?3:n>=100?2:n>=10?1:0},p.popCount=function(n){return n=n-(n>>>1&1431655765),n=(n&858993459)+(n>>>2&858993459),(n+(n>>>4)&252645135)*16843009>>>24};function r(n){var l=32;return n&=-n,n&&l--,n&65535&&(l-=16),n&16711935&&(l-=8),n&252645135&&(l-=4),n&858993459&&(l-=2),n&1431655765&&(l-=1),l}p.countTrailingZeros=r,p.nextPow2=function(n){return n+=n===0,--n,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n+1},p.prevPow2=function(n){return n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n-(n>>>1)},p.parity=function(n){return n^=n>>>16,n^=n>>>8,n^=n>>>4,n&=15,27030>>>n&1};var s=new Array(256);(function(n){for(var l=0;l<256;++l){var c=l,u=l,g=7;for(c>>>=1;c;c>>>=1)u<<=1,u|=c&1,--g;n[l]=u<>>8&255]<<16|s[n>>>16&255]<<8|s[n>>>24&255]},p.interleave2=function(n,l){return n&=65535,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,l&=65535,l=(l|l<<8)&16711935,l=(l|l<<4)&252645135,l=(l|l<<2)&858993459,l=(l|l<<1)&1431655765,n|l<<1},p.deinterleave2=function(n,l){return n=n>>>l&1431655765,n=(n|n>>>1)&858993459,n=(n|n>>>2)&252645135,n=(n|n>>>4)&16711935,n=(n|n>>>16)&65535,n<<16>>16},p.interleave3=function(n,l,c){return n&=1023,n=(n|n<<16)&4278190335,n=(n|n<<8)&251719695,n=(n|n<<4)&3272356035,n=(n|n<<2)&1227133513,l&=1023,l=(l|l<<16)&4278190335,l=(l|l<<8)&251719695,l=(l|l<<4)&3272356035,l=(l|l<<2)&1227133513,n|=l<<1,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,n|c<<2},p.deinterleave3=function(n,l){return n=n>>>l&1227133513,n=(n|n>>>2)&3272356035,n=(n|n>>>4)&251719695,n=(n|n>>>8)&4278190335,n=(n|n>>>16)&1023,n<<22>>22},p.nextCombination=function(n){var l=n|n-1;return l+1|(~l&-~l)-1>>>r(n)+1}},1928:function(v,p,t){v=t.nmd(v),function(r,s){function n(N,_){if(!N)throw new Error(_||"Assertion failed")}function l(N,_){N.super_=_;var U=function(){};U.prototype=_.prototype,N.prototype=new U,N.prototype.constructor=N}function c(N,_,U){if(c.isBN(N))return N;this.negative=0,this.words=null,this.length=0,this.red=null,N!==null&&((_==="le"||_==="be")&&(U=_,_=10),this._init(N||0,_||10,U||"be"))}typeof r=="object"?r.exports=c:s.BN=c,c.BN=c,c.wordSize=26;var u;try{typeof window<"u"&&typeof window.Buffer<"u"?u=window.Buffer:u=t(6601).Buffer}catch{}c.isBN=function(_){return _ instanceof c?!0:_!==null&&typeof _=="object"&&_.constructor.wordSize===c.wordSize&&Array.isArray(_.words)},c.max=function(_,U){return _.cmp(U)>0?_:U},c.min=function(_,U){return _.cmp(U)<0?_:U},c.prototype._init=function(_,U,Y){if(typeof _=="number")return this._initNumber(_,U,Y);if(typeof _=="object")return this._initArray(_,U,Y);U==="hex"&&(U=16),n(U===(U|0)&&U>=2&&U<=36),_=_.toString().replace(/\s+/g,"");var J=0;_[0]==="-"&&(J++,this.negative=1),J<_.length&&(U===16?this._parseHex(_,J,Y):(this._parseBase(_,U,J),Y==="le"&&this._initArray(this.toArray(),U,Y)))},c.prototype._initNumber=function(_,U,Y){_<0&&(this.negative=1,_=-_),_<67108864?(this.words=[_&67108863],this.length=1):_<4503599627370496?(this.words=[_&67108863,_/67108864&67108863],this.length=2):(n(_<9007199254740992),this.words=[_&67108863,_/67108864&67108863,1],this.length=3),Y==="le"&&this._initArray(this.toArray(),U,Y)},c.prototype._initArray=function(_,U,Y){if(n(typeof _.length=="number"),_.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(_.length/3),this.words=new Array(this.length);for(var J=0;J=0;J-=3)ae=_[J]|_[J-1]<<8|_[J-2]<<16,this.words[te]|=ae<>>26-ce&67108863,ce+=24,ce>=26&&(ce-=26,te++);else if(Y==="le")for(J=0,te=0;J<_.length;J+=3)ae=_[J]|_[J+1]<<8|_[J+2]<<16,this.words[te]|=ae<>>26-ce&67108863,ce+=24,ce>=26&&(ce-=26,te++);return this.strip()};function g(N,_){var U=N.charCodeAt(_);return U>=65&&U<=70?U-55:U>=97&&U<=102?U-87:U-48&15}function f(N,_,U){var Y=g(N,U);return U-1>=_&&(Y|=g(N,U-1)<<4),Y}c.prototype._parseHex=function(_,U,Y){this.length=Math.ceil((_.length-U)/6),this.words=new Array(this.length);for(var J=0;J=U;J-=2)ce=f(_,U,J)<=18?(te-=18,ae+=1,this.words[ae]|=ce>>>26):te+=8;else{var Q=_.length-U;for(J=Q%2===0?U+1:U;J<_.length;J+=2)ce=f(_,U,J)<=18?(te-=18,ae+=1,this.words[ae]|=ce>>>26):te+=8}this.strip()};function w(N,_,U,Y){for(var J=0,te=Math.min(N.length,U),ae=_;ae=49?J+=ce-49+10:ce>=17?J+=ce-17+10:J+=ce}return J}c.prototype._parseBase=function(_,U,Y){this.words=[0],this.length=1;for(var J=0,te=1;te<=67108863;te*=U)J++;J--,te=te/U|0;for(var ae=_.length-Y,ce=ae%J,Q=Math.min(ae,ae-ce)+Y,Z=0,j=Y;j1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},c.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},c.prototype.inspect=function(){return(this.red?""};var h=["","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"],o=[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],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];c.prototype.toString=function(_,U){_=_||10,U=U|0||1;var Y;if(_===16||_==="hex"){Y="";for(var J=0,te=0,ae=0;ae>>24-J&16777215,te!==0||ae!==this.length-1?Y=h[6-Q.length]+Q+Y:Y=Q+Y,J+=2,J>=26&&(J-=26,ae--)}for(te!==0&&(Y=te.toString(16)+Y);Y.length%U!==0;)Y="0"+Y;return this.negative!==0&&(Y="-"+Y),Y}if(_===(_|0)&&_>=2&&_<=36){var Z=o[_],j=d[_];Y="";var K=this.clone();for(K.negative=0;!K.isZero();){var ee=K.modn(j).toString(_);K=K.idivn(j),K.isZero()?Y=ee+Y:Y=h[Z-ee.length]+ee+Y}for(this.isZero()&&(Y="0"+Y);Y.length%U!==0;)Y="0"+Y;return this.negative!==0&&(Y="-"+Y),Y}n(!1,"Base should be between 2 and 36")},c.prototype.toNumber=function(){var _=this.words[0];return this.length===2?_+=this.words[1]*67108864:this.length===3&&this.words[2]===1?_+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-_:_},c.prototype.toJSON=function(){return this.toString(16)},c.prototype.toBuffer=function(_,U){return n(typeof u<"u"),this.toArrayLike(u,_,U)},c.prototype.toArray=function(_,U){return this.toArrayLike(Array,_,U)},c.prototype.toArrayLike=function(_,U,Y){var J=this.byteLength(),te=Y||Math.max(1,J);n(J<=te,"byte array longer than desired length"),n(te>0,"Requested array length <= 0"),this.strip();var ae=U==="le",ce=new _(te),Q,Z,j=this.clone();if(ae){for(Z=0;!j.isZero();Z++)Q=j.andln(255),j.iushrn(8),ce[Z]=Q;for(;Z=4096&&(Y+=13,U>>>=13),U>=64&&(Y+=7,U>>>=7),U>=8&&(Y+=4,U>>>=4),U>=2&&(Y+=2,U>>>=2),Y+U},c.prototype._zeroBits=function(_){if(_===0)return 26;var U=_,Y=0;return U&8191||(Y+=13,U>>>=13),U&127||(Y+=7,U>>>=7),U&15||(Y+=4,U>>>=4),U&3||(Y+=2,U>>>=2),U&1||Y++,Y},c.prototype.bitLength=function(){var _=this.words[this.length-1],U=this._countBits(_);return(this.length-1)*26+U};function M(N){for(var _=new Array(N.bitLength()),U=0;U<_.length;U++){var Y=U/26|0,J=U%26;_[U]=(N.words[Y]&1<>>J}return _}c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var _=0,U=0;U_.length?this.clone().ior(_):_.clone().ior(this)},c.prototype.uor=function(_){return this.length>_.length?this.clone().iuor(_):_.clone().iuor(this)},c.prototype.iuand=function(_){var U;this.length>_.length?U=_:U=this;for(var Y=0;Y_.length?this.clone().iand(_):_.clone().iand(this)},c.prototype.uand=function(_){return this.length>_.length?this.clone().iuand(_):_.clone().iuand(this)},c.prototype.iuxor=function(_){var U,Y;this.length>_.length?(U=this,Y=_):(U=_,Y=this);for(var J=0;J_.length?this.clone().ixor(_):_.clone().ixor(this)},c.prototype.uxor=function(_){return this.length>_.length?this.clone().iuxor(_):_.clone().iuxor(this)},c.prototype.inotn=function(_){n(typeof _=="number"&&_>=0);var U=Math.ceil(_/26)|0,Y=_%26;this._expand(U),Y>0&&U--;for(var J=0;J0&&(this.words[J]=~this.words[J]&67108863>>26-Y),this.strip()},c.prototype.notn=function(_){return this.clone().inotn(_)},c.prototype.setn=function(_,U){n(typeof _=="number"&&_>=0);var Y=_/26|0,J=_%26;return this._expand(Y+1),U?this.words[Y]=this.words[Y]|1<_.length?(Y=this,J=_):(Y=_,J=this);for(var te=0,ae=0;ae>>26;for(;te!==0&&ae>>26;if(this.length=Y.length,te!==0)this.words[this.length]=te,this.length++;else if(Y!==this)for(;ae_.length?this.clone().iadd(_):_.clone().iadd(this)},c.prototype.isub=function(_){if(_.negative!==0){_.negative=0;var U=this.iadd(_);return _.negative=1,U._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(_),this.negative=1,this._normSign();var Y=this.cmp(_);if(Y===0)return this.negative=0,this.length=1,this.words[0]=0,this;var J,te;Y>0?(J=this,te=_):(J=_,te=this);for(var ae=0,ce=0;ce>26,this.words[ce]=U&67108863;for(;ae!==0&&ce>26,this.words[ce]=U&67108863;if(ae===0&&ce>>26,K=Q&67108863,ee=Math.min(Z,_.length-1),oe=Math.max(0,Z-N.length+1);oe<=ee;oe++){var q=Z-oe|0;J=N.words[q]|0,te=_.words[oe]|0,ae=J*te+K,j+=ae/67108864|0,K=ae&67108863}U.words[Z]=K|0,Q=j|0}return Q!==0?U.words[Z]=Q|0:U.length--,U.strip()}var C=function(_,U,Y){var J=_.words,te=U.words,ae=Y.words,ce=0,Q,Z,j,K=J[0]|0,ee=K&8191,oe=K>>>13,q=J[1]|0,$=q&8191,le=q>>>13,ie=J[2]|0,he=ie&8191,me=ie>>>13,Me=J[3]|0,Te=Me&8191,Oe=Me>>>13,Ne=J[4]|0,Ee=Ne&8191,xe=Ne>>>13,Se=J[5]|0,Ue=Se&8191,He=Se>>>13,Fe=J[6]|0,Ge=Fe&8191,nt=Fe>>>13,qe=J[7]|0,$e=qe&8191,et=qe>>>13,ct=J[8]|0,dt=ct&8191,pt=ct>>>13,At=J[9]|0,Mt=At&8191,Vt=At>>>13,Je=te[0]|0,De=Je&8191,Ie=Je>>>13,ze=te[1]|0,Pe=ze&8191,be=ze>>>13,se=te[2]|0,ye=se&8191,Le=se>>>13,Be=te[3]|0,ot=Be&8191,at=Be>>>13,wt=te[4]|0,It=wt&8191,Bt=wt>>>13,Gt=te[5]|0,Lt=Gt&8191,Kt=Gt>>>13,ir=te[6]|0,_r=ir&8191,yt=ir>>>13,jt=te[7]|0,Yt=jt&8191,br=jt>>>13,hr=te[8]|0,ut=hr&8191,lt=hr>>>13,xt=te[9]|0,Tt=xt&8191,Ct=xt>>>13;Y.negative=_.negative^U.negative,Y.length=19,Q=Math.imul(ee,De),Z=Math.imul(ee,Ie),Z=Z+Math.imul(oe,De)|0,j=Math.imul(oe,Ie);var St=(ce+Q|0)+((Z&8191)<<13)|0;ce=(j+(Z>>>13)|0)+(St>>>26)|0,St&=67108863,Q=Math.imul($,De),Z=Math.imul($,Ie),Z=Z+Math.imul(le,De)|0,j=Math.imul(le,Ie),Q=Q+Math.imul(ee,Pe)|0,Z=Z+Math.imul(ee,be)|0,Z=Z+Math.imul(oe,Pe)|0,j=j+Math.imul(oe,be)|0;var _t=(ce+Q|0)+((Z&8191)<<13)|0;ce=(j+(Z>>>13)|0)+(_t>>>26)|0,_t&=67108863,Q=Math.imul(he,De),Z=Math.imul(he,Ie),Z=Z+Math.imul(me,De)|0,j=Math.imul(me,Ie),Q=Q+Math.imul($,Pe)|0,Z=Z+Math.imul($,be)|0,Z=Z+Math.imul(le,Pe)|0,j=j+Math.imul(le,be)|0,Q=Q+Math.imul(ee,ye)|0,Z=Z+Math.imul(ee,Le)|0,Z=Z+Math.imul(oe,ye)|0,j=j+Math.imul(oe,Le)|0;var Ht=(ce+Q|0)+((Z&8191)<<13)|0;ce=(j+(Z>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,Q=Math.imul(Te,De),Z=Math.imul(Te,Ie),Z=Z+Math.imul(Oe,De)|0,j=Math.imul(Oe,Ie),Q=Q+Math.imul(he,Pe)|0,Z=Z+Math.imul(he,be)|0,Z=Z+Math.imul(me,Pe)|0,j=j+Math.imul(me,be)|0,Q=Q+Math.imul($,ye)|0,Z=Z+Math.imul($,Le)|0,Z=Z+Math.imul(le,ye)|0,j=j+Math.imul(le,Le)|0,Q=Q+Math.imul(ee,ot)|0,Z=Z+Math.imul(ee,at)|0,Z=Z+Math.imul(oe,ot)|0,j=j+Math.imul(oe,at)|0;var $t=(ce+Q|0)+((Z&8191)<<13)|0;ce=(j+(Z>>>13)|0)+($t>>>26)|0,$t&=67108863,Q=Math.imul(Ee,De),Z=Math.imul(Ee,Ie),Z=Z+Math.imul(xe,De)|0,j=Math.imul(xe,Ie),Q=Q+Math.imul(Te,Pe)|0,Z=Z+Math.imul(Te,be)|0,Z=Z+Math.imul(Oe,Pe)|0,j=j+Math.imul(Oe,be)|0,Q=Q+Math.imul(he,ye)|0,Z=Z+Math.imul(he,Le)|0,Z=Z+Math.imul(me,ye)|0,j=j+Math.imul(me,Le)|0,Q=Q+Math.imul($,ot)|0,Z=Z+Math.imul($,at)|0,Z=Z+Math.imul(le,ot)|0,j=j+Math.imul(le,at)|0,Q=Q+Math.imul(ee,It)|0,Z=Z+Math.imul(ee,Bt)|0,Z=Z+Math.imul(oe,It)|0,j=j+Math.imul(oe,Bt)|0;var Qt=(ce+Q|0)+((Z&8191)<<13)|0;ce=(j+(Z>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,Q=Math.imul(Ue,De),Z=Math.imul(Ue,Ie),Z=Z+Math.imul(He,De)|0,j=Math.imul(He,Ie),Q=Q+Math.imul(Ee,Pe)|0,Z=Z+Math.imul(Ee,be)|0,Z=Z+Math.imul(xe,Pe)|0,j=j+Math.imul(xe,be)|0,Q=Q+Math.imul(Te,ye)|0,Z=Z+Math.imul(Te,Le)|0,Z=Z+Math.imul(Oe,ye)|0,j=j+Math.imul(Oe,Le)|0,Q=Q+Math.imul(he,ot)|0,Z=Z+Math.imul(he,at)|0,Z=Z+Math.imul(me,ot)|0,j=j+Math.imul(me,at)|0,Q=Q+Math.imul($,It)|0,Z=Z+Math.imul($,Bt)|0,Z=Z+Math.imul(le,It)|0,j=j+Math.imul(le,Bt)|0,Q=Q+Math.imul(ee,Lt)|0,Z=Z+Math.imul(ee,Kt)|0,Z=Z+Math.imul(oe,Lt)|0,j=j+Math.imul(oe,Kt)|0;var or=(ce+Q|0)+((Z&8191)<<13)|0;ce=(j+(Z>>>13)|0)+(or>>>26)|0,or&=67108863,Q=Math.imul(Ge,De),Z=Math.imul(Ge,Ie),Z=Z+Math.imul(nt,De)|0,j=Math.imul(nt,Ie),Q=Q+Math.imul(Ue,Pe)|0,Z=Z+Math.imul(Ue,be)|0,Z=Z+Math.imul(He,Pe)|0,j=j+Math.imul(He,be)|0,Q=Q+Math.imul(Ee,ye)|0,Z=Z+Math.imul(Ee,Le)|0,Z=Z+Math.imul(xe,ye)|0,j=j+Math.imul(xe,Le)|0,Q=Q+Math.imul(Te,ot)|0,Z=Z+Math.imul(Te,at)|0,Z=Z+Math.imul(Oe,ot)|0,j=j+Math.imul(Oe,at)|0,Q=Q+Math.imul(he,It)|0,Z=Z+Math.imul(he,Bt)|0,Z=Z+Math.imul(me,It)|0,j=j+Math.imul(me,Bt)|0,Q=Q+Math.imul($,Lt)|0,Z=Z+Math.imul($,Kt)|0,Z=Z+Math.imul(le,Lt)|0,j=j+Math.imul(le,Kt)|0,Q=Q+Math.imul(ee,_r)|0,Z=Z+Math.imul(ee,yt)|0,Z=Z+Math.imul(oe,_r)|0,j=j+Math.imul(oe,yt)|0;var Er=(ce+Q|0)+((Z&8191)<<13)|0;ce=(j+(Z>>>13)|0)+(Er>>>26)|0,Er&=67108863,Q=Math.imul($e,De),Z=Math.imul($e,Ie),Z=Z+Math.imul(et,De)|0,j=Math.imul(et,Ie),Q=Q+Math.imul(Ge,Pe)|0,Z=Z+Math.imul(Ge,be)|0,Z=Z+Math.imul(nt,Pe)|0,j=j+Math.imul(nt,be)|0,Q=Q+Math.imul(Ue,ye)|0,Z=Z+Math.imul(Ue,Le)|0,Z=Z+Math.imul(He,ye)|0,j=j+Math.imul(He,Le)|0,Q=Q+Math.imul(Ee,ot)|0,Z=Z+Math.imul(Ee,at)|0,Z=Z+Math.imul(xe,ot)|0,j=j+Math.imul(xe,at)|0,Q=Q+Math.imul(Te,It)|0,Z=Z+Math.imul(Te,Bt)|0,Z=Z+Math.imul(Oe,It)|0,j=j+Math.imul(Oe,Bt)|0,Q=Q+Math.imul(he,Lt)|0,Z=Z+Math.imul(he,Kt)|0,Z=Z+Math.imul(me,Lt)|0,j=j+Math.imul(me,Kt)|0,Q=Q+Math.imul($,_r)|0,Z=Z+Math.imul($,yt)|0,Z=Z+Math.imul(le,_r)|0,j=j+Math.imul(le,yt)|0,Q=Q+Math.imul(ee,Yt)|0,Z=Z+Math.imul(ee,br)|0,Z=Z+Math.imul(oe,Yt)|0,j=j+Math.imul(oe,br)|0;var Ye=(ce+Q|0)+((Z&8191)<<13)|0;ce=(j+(Z>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,Q=Math.imul(dt,De),Z=Math.imul(dt,Ie),Z=Z+Math.imul(pt,De)|0,j=Math.imul(pt,Ie),Q=Q+Math.imul($e,Pe)|0,Z=Z+Math.imul($e,be)|0,Z=Z+Math.imul(et,Pe)|0,j=j+Math.imul(et,be)|0,Q=Q+Math.imul(Ge,ye)|0,Z=Z+Math.imul(Ge,Le)|0,Z=Z+Math.imul(nt,ye)|0,j=j+Math.imul(nt,Le)|0,Q=Q+Math.imul(Ue,ot)|0,Z=Z+Math.imul(Ue,at)|0,Z=Z+Math.imul(He,ot)|0,j=j+Math.imul(He,at)|0,Q=Q+Math.imul(Ee,It)|0,Z=Z+Math.imul(Ee,Bt)|0,Z=Z+Math.imul(xe,It)|0,j=j+Math.imul(xe,Bt)|0,Q=Q+Math.imul(Te,Lt)|0,Z=Z+Math.imul(Te,Kt)|0,Z=Z+Math.imul(Oe,Lt)|0,j=j+Math.imul(Oe,Kt)|0,Q=Q+Math.imul(he,_r)|0,Z=Z+Math.imul(he,yt)|0,Z=Z+Math.imul(me,_r)|0,j=j+Math.imul(me,yt)|0,Q=Q+Math.imul($,Yt)|0,Z=Z+Math.imul($,br)|0,Z=Z+Math.imul(le,Yt)|0,j=j+Math.imul(le,br)|0,Q=Q+Math.imul(ee,ut)|0,Z=Z+Math.imul(ee,lt)|0,Z=Z+Math.imul(oe,ut)|0,j=j+Math.imul(oe,lt)|0;var We=(ce+Q|0)+((Z&8191)<<13)|0;ce=(j+(Z>>>13)|0)+(We>>>26)|0,We&=67108863,Q=Math.imul(Mt,De),Z=Math.imul(Mt,Ie),Z=Z+Math.imul(Vt,De)|0,j=Math.imul(Vt,Ie),Q=Q+Math.imul(dt,Pe)|0,Z=Z+Math.imul(dt,be)|0,Z=Z+Math.imul(pt,Pe)|0,j=j+Math.imul(pt,be)|0,Q=Q+Math.imul($e,ye)|0,Z=Z+Math.imul($e,Le)|0,Z=Z+Math.imul(et,ye)|0,j=j+Math.imul(et,Le)|0,Q=Q+Math.imul(Ge,ot)|0,Z=Z+Math.imul(Ge,at)|0,Z=Z+Math.imul(nt,ot)|0,j=j+Math.imul(nt,at)|0,Q=Q+Math.imul(Ue,It)|0,Z=Z+Math.imul(Ue,Bt)|0,Z=Z+Math.imul(He,It)|0,j=j+Math.imul(He,Bt)|0,Q=Q+Math.imul(Ee,Lt)|0,Z=Z+Math.imul(Ee,Kt)|0,Z=Z+Math.imul(xe,Lt)|0,j=j+Math.imul(xe,Kt)|0,Q=Q+Math.imul(Te,_r)|0,Z=Z+Math.imul(Te,yt)|0,Z=Z+Math.imul(Oe,_r)|0,j=j+Math.imul(Oe,yt)|0,Q=Q+Math.imul(he,Yt)|0,Z=Z+Math.imul(he,br)|0,Z=Z+Math.imul(me,Yt)|0,j=j+Math.imul(me,br)|0,Q=Q+Math.imul($,ut)|0,Z=Z+Math.imul($,lt)|0,Z=Z+Math.imul(le,ut)|0,j=j+Math.imul(le,lt)|0,Q=Q+Math.imul(ee,Tt)|0,Z=Z+Math.imul(ee,Ct)|0,Z=Z+Math.imul(oe,Tt)|0,j=j+Math.imul(oe,Ct)|0;var Dt=(ce+Q|0)+((Z&8191)<<13)|0;ce=(j+(Z>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,Q=Math.imul(Mt,Pe),Z=Math.imul(Mt,be),Z=Z+Math.imul(Vt,Pe)|0,j=Math.imul(Vt,be),Q=Q+Math.imul(dt,ye)|0,Z=Z+Math.imul(dt,Le)|0,Z=Z+Math.imul(pt,ye)|0,j=j+Math.imul(pt,Le)|0,Q=Q+Math.imul($e,ot)|0,Z=Z+Math.imul($e,at)|0,Z=Z+Math.imul(et,ot)|0,j=j+Math.imul(et,at)|0,Q=Q+Math.imul(Ge,It)|0,Z=Z+Math.imul(Ge,Bt)|0,Z=Z+Math.imul(nt,It)|0,j=j+Math.imul(nt,Bt)|0,Q=Q+Math.imul(Ue,Lt)|0,Z=Z+Math.imul(Ue,Kt)|0,Z=Z+Math.imul(He,Lt)|0,j=j+Math.imul(He,Kt)|0,Q=Q+Math.imul(Ee,_r)|0,Z=Z+Math.imul(Ee,yt)|0,Z=Z+Math.imul(xe,_r)|0,j=j+Math.imul(xe,yt)|0,Q=Q+Math.imul(Te,Yt)|0,Z=Z+Math.imul(Te,br)|0,Z=Z+Math.imul(Oe,Yt)|0,j=j+Math.imul(Oe,br)|0,Q=Q+Math.imul(he,ut)|0,Z=Z+Math.imul(he,lt)|0,Z=Z+Math.imul(me,ut)|0,j=j+Math.imul(me,lt)|0,Q=Q+Math.imul($,Tt)|0,Z=Z+Math.imul($,Ct)|0,Z=Z+Math.imul(le,Tt)|0,j=j+Math.imul(le,Ct)|0;var Ft=(ce+Q|0)+((Z&8191)<<13)|0;ce=(j+(Z>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,Q=Math.imul(Mt,ye),Z=Math.imul(Mt,Le),Z=Z+Math.imul(Vt,ye)|0,j=Math.imul(Vt,Le),Q=Q+Math.imul(dt,ot)|0,Z=Z+Math.imul(dt,at)|0,Z=Z+Math.imul(pt,ot)|0,j=j+Math.imul(pt,at)|0,Q=Q+Math.imul($e,It)|0,Z=Z+Math.imul($e,Bt)|0,Z=Z+Math.imul(et,It)|0,j=j+Math.imul(et,Bt)|0,Q=Q+Math.imul(Ge,Lt)|0,Z=Z+Math.imul(Ge,Kt)|0,Z=Z+Math.imul(nt,Lt)|0,j=j+Math.imul(nt,Kt)|0,Q=Q+Math.imul(Ue,_r)|0,Z=Z+Math.imul(Ue,yt)|0,Z=Z+Math.imul(He,_r)|0,j=j+Math.imul(He,yt)|0,Q=Q+Math.imul(Ee,Yt)|0,Z=Z+Math.imul(Ee,br)|0,Z=Z+Math.imul(xe,Yt)|0,j=j+Math.imul(xe,br)|0,Q=Q+Math.imul(Te,ut)|0,Z=Z+Math.imul(Te,lt)|0,Z=Z+Math.imul(Oe,ut)|0,j=j+Math.imul(Oe,lt)|0,Q=Q+Math.imul(he,Tt)|0,Z=Z+Math.imul(he,Ct)|0,Z=Z+Math.imul(me,Tt)|0,j=j+Math.imul(me,Ct)|0;var Zt=(ce+Q|0)+((Z&8191)<<13)|0;ce=(j+(Z>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,Q=Math.imul(Mt,ot),Z=Math.imul(Mt,at),Z=Z+Math.imul(Vt,ot)|0,j=Math.imul(Vt,at),Q=Q+Math.imul(dt,It)|0,Z=Z+Math.imul(dt,Bt)|0,Z=Z+Math.imul(pt,It)|0,j=j+Math.imul(pt,Bt)|0,Q=Q+Math.imul($e,Lt)|0,Z=Z+Math.imul($e,Kt)|0,Z=Z+Math.imul(et,Lt)|0,j=j+Math.imul(et,Kt)|0,Q=Q+Math.imul(Ge,_r)|0,Z=Z+Math.imul(Ge,yt)|0,Z=Z+Math.imul(nt,_r)|0,j=j+Math.imul(nt,yt)|0,Q=Q+Math.imul(Ue,Yt)|0,Z=Z+Math.imul(Ue,br)|0,Z=Z+Math.imul(He,Yt)|0,j=j+Math.imul(He,br)|0,Q=Q+Math.imul(Ee,ut)|0,Z=Z+Math.imul(Ee,lt)|0,Z=Z+Math.imul(xe,ut)|0,j=j+Math.imul(xe,lt)|0,Q=Q+Math.imul(Te,Tt)|0,Z=Z+Math.imul(Te,Ct)|0,Z=Z+Math.imul(Oe,Tt)|0,j=j+Math.imul(Oe,Ct)|0;var nr=(ce+Q|0)+((Z&8191)<<13)|0;ce=(j+(Z>>>13)|0)+(nr>>>26)|0,nr&=67108863,Q=Math.imul(Mt,It),Z=Math.imul(Mt,Bt),Z=Z+Math.imul(Vt,It)|0,j=Math.imul(Vt,Bt),Q=Q+Math.imul(dt,Lt)|0,Z=Z+Math.imul(dt,Kt)|0,Z=Z+Math.imul(pt,Lt)|0,j=j+Math.imul(pt,Kt)|0,Q=Q+Math.imul($e,_r)|0,Z=Z+Math.imul($e,yt)|0,Z=Z+Math.imul(et,_r)|0,j=j+Math.imul(et,yt)|0,Q=Q+Math.imul(Ge,Yt)|0,Z=Z+Math.imul(Ge,br)|0,Z=Z+Math.imul(nt,Yt)|0,j=j+Math.imul(nt,br)|0,Q=Q+Math.imul(Ue,ut)|0,Z=Z+Math.imul(Ue,lt)|0,Z=Z+Math.imul(He,ut)|0,j=j+Math.imul(He,lt)|0,Q=Q+Math.imul(Ee,Tt)|0,Z=Z+Math.imul(Ee,Ct)|0,Z=Z+Math.imul(xe,Tt)|0,j=j+Math.imul(xe,Ct)|0;var lr=(ce+Q|0)+((Z&8191)<<13)|0;ce=(j+(Z>>>13)|0)+(lr>>>26)|0,lr&=67108863,Q=Math.imul(Mt,Lt),Z=Math.imul(Mt,Kt),Z=Z+Math.imul(Vt,Lt)|0,j=Math.imul(Vt,Kt),Q=Q+Math.imul(dt,_r)|0,Z=Z+Math.imul(dt,yt)|0,Z=Z+Math.imul(pt,_r)|0,j=j+Math.imul(pt,yt)|0,Q=Q+Math.imul($e,Yt)|0,Z=Z+Math.imul($e,br)|0,Z=Z+Math.imul(et,Yt)|0,j=j+Math.imul(et,br)|0,Q=Q+Math.imul(Ge,ut)|0,Z=Z+Math.imul(Ge,lt)|0,Z=Z+Math.imul(nt,ut)|0,j=j+Math.imul(nt,lt)|0,Q=Q+Math.imul(Ue,Tt)|0,Z=Z+Math.imul(Ue,Ct)|0,Z=Z+Math.imul(He,Tt)|0,j=j+Math.imul(He,Ct)|0;var rr=(ce+Q|0)+((Z&8191)<<13)|0;ce=(j+(Z>>>13)|0)+(rr>>>26)|0,rr&=67108863,Q=Math.imul(Mt,_r),Z=Math.imul(Mt,yt),Z=Z+Math.imul(Vt,_r)|0,j=Math.imul(Vt,yt),Q=Q+Math.imul(dt,Yt)|0,Z=Z+Math.imul(dt,br)|0,Z=Z+Math.imul(pt,Yt)|0,j=j+Math.imul(pt,br)|0,Q=Q+Math.imul($e,ut)|0,Z=Z+Math.imul($e,lt)|0,Z=Z+Math.imul(et,ut)|0,j=j+Math.imul(et,lt)|0,Q=Q+Math.imul(Ge,Tt)|0,Z=Z+Math.imul(Ge,Ct)|0,Z=Z+Math.imul(nt,Tt)|0,j=j+Math.imul(nt,Ct)|0;var zt=(ce+Q|0)+((Z&8191)<<13)|0;ce=(j+(Z>>>13)|0)+(zt>>>26)|0,zt&=67108863,Q=Math.imul(Mt,Yt),Z=Math.imul(Mt,br),Z=Z+Math.imul(Vt,Yt)|0,j=Math.imul(Vt,br),Q=Q+Math.imul(dt,ut)|0,Z=Z+Math.imul(dt,lt)|0,Z=Z+Math.imul(pt,ut)|0,j=j+Math.imul(pt,lt)|0,Q=Q+Math.imul($e,Tt)|0,Z=Z+Math.imul($e,Ct)|0,Z=Z+Math.imul(et,Tt)|0,j=j+Math.imul(et,Ct)|0;var fr=(ce+Q|0)+((Z&8191)<<13)|0;ce=(j+(Z>>>13)|0)+(fr>>>26)|0,fr&=67108863,Q=Math.imul(Mt,ut),Z=Math.imul(Mt,lt),Z=Z+Math.imul(Vt,ut)|0,j=Math.imul(Vt,lt),Q=Q+Math.imul(dt,Tt)|0,Z=Z+Math.imul(dt,Ct)|0,Z=Z+Math.imul(pt,Tt)|0,j=j+Math.imul(pt,Ct)|0;var dr=(ce+Q|0)+((Z&8191)<<13)|0;ce=(j+(Z>>>13)|0)+(dr>>>26)|0,dr&=67108863,Q=Math.imul(Mt,Tt),Z=Math.imul(Mt,Ct),Z=Z+Math.imul(Vt,Tt)|0,j=Math.imul(Vt,Ct);var pr=(ce+Q|0)+((Z&8191)<<13)|0;return ce=(j+(Z>>>13)|0)+(pr>>>26)|0,pr&=67108863,ae[0]=St,ae[1]=_t,ae[2]=Ht,ae[3]=$t,ae[4]=Qt,ae[5]=or,ae[6]=Er,ae[7]=Ye,ae[8]=We,ae[9]=Dt,ae[10]=Ft,ae[11]=Zt,ae[12]=nr,ae[13]=lr,ae[14]=rr,ae[15]=zt,ae[16]=fr,ae[17]=dr,ae[18]=pr,ce!==0&&(ae[19]=ce,Y.length++),Y};Math.imul||(C=T);function x(N,_,U){U.negative=_.negative^N.negative,U.length=N.length+_.length;for(var Y=0,J=0,te=0;te>>26)|0,J+=ae>>>26,ae&=67108863}U.words[te]=ce,Y=ae,ae=J}return Y!==0?U.words[te]=Y:U.length--,U.strip()}function S(N,_,U){var Y=new b;return Y.mulp(N,_,U)}c.prototype.mulTo=function(_,U){var Y,J=this.length+_.length;return this.length===10&&_.length===10?Y=C(this,_,U):J<63?Y=T(this,_,U):J<1024?Y=x(this,_,U):Y=S(this,_,U),Y};function b(N,_){this.x=N,this.y=_}b.prototype.makeRBT=function(_){for(var U=new Array(_),Y=c.prototype._countBits(_)-1,J=0;J<_;J++)U[J]=this.revBin(J,Y,_);return U},b.prototype.revBin=function(_,U,Y){if(_===0||_===Y-1)return _;for(var J=0,te=0;te>=1;return J},b.prototype.permute=function(_,U,Y,J,te,ae){for(var ce=0;ce>>1)te++;return 1<>>13,Y[2*ae+1]=te&8191,te=te>>>13;for(ae=2*U;ae>=26,U+=J/67108864|0,U+=te>>>26,this.words[Y]=te&67108863}return U!==0&&(this.words[Y]=U,this.length++),this},c.prototype.muln=function(_){return this.clone().imuln(_)},c.prototype.sqr=function(){return this.mul(this)},c.prototype.isqr=function(){return this.imul(this.clone())},c.prototype.pow=function(_){var U=M(_);if(U.length===0)return new c(1);for(var Y=this,J=0;J=0);var U=_%26,Y=(_-U)/26,J=67108863>>>26-U<<26-U,te;if(U!==0){var ae=0;for(te=0;te>>26-U}ae&&(this.words[te]=ae,this.length++)}if(Y!==0){for(te=this.length-1;te>=0;te--)this.words[te+Y]=this.words[te];for(te=0;te=0);var J;U?J=(U-U%26)/26:J=0;var te=_%26,ae=Math.min((_-te)/26,this.length),ce=67108863^67108863>>>te<ae)for(this.length-=ae,Z=0;Z=0&&(j!==0||Z>=J);Z--){var K=this.words[Z]|0;this.words[Z]=j<<26-te|K>>>te,j=K&ce}return Q&&j!==0&&(Q.words[Q.length++]=j),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},c.prototype.ishrn=function(_,U,Y){return n(this.negative===0),this.iushrn(_,U,Y)},c.prototype.shln=function(_){return this.clone().ishln(_)},c.prototype.ushln=function(_){return this.clone().iushln(_)},c.prototype.shrn=function(_){return this.clone().ishrn(_)},c.prototype.ushrn=function(_){return this.clone().iushrn(_)},c.prototype.testn=function(_){n(typeof _=="number"&&_>=0);var U=_%26,Y=(_-U)/26,J=1<=0);var U=_%26,Y=(_-U)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=Y)return this;if(U!==0&&Y++,this.length=Math.min(Y,this.length),U!==0){var J=67108863^67108863>>>U<=67108864;U++)this.words[U]-=67108864,U===this.length-1?this.words[U+1]=1:this.words[U+1]++;return this.length=Math.max(this.length,U+1),this},c.prototype.isubn=function(_){if(n(typeof _=="number"),n(_<67108864),_<0)return this.iaddn(-_);if(this.negative!==0)return this.negative=0,this.iaddn(_),this.negative=1,this;if(this.words[0]-=_,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var U=0;U>26)-(Q/67108864|0),this.words[te+Y]=ae&67108863}for(;te>26,this.words[te+Y]=ae&67108863;if(ce===0)return this.strip();for(n(ce===-1),ce=0,te=0;te>26,this.words[te]=ae&67108863;return this.negative=1,this.strip()},c.prototype._wordDiv=function(_,U){var Y=this.length-_.length,J=this.clone(),te=_,ae=te.words[te.length-1]|0,ce=this._countBits(ae);Y=26-ce,Y!==0&&(te=te.ushln(Y),J.iushln(Y),ae=te.words[te.length-1]|0);var Q=J.length-te.length,Z;if(U!=="mod"){Z=new c(null),Z.length=Q+1,Z.words=new Array(Z.length);for(var j=0;j=0;ee--){var oe=(J.words[te.length+ee]|0)*67108864+(J.words[te.length+ee-1]|0);for(oe=Math.min(oe/ae|0,67108863),J._ishlnsubmul(te,oe,ee);J.negative!==0;)oe--,J.negative=0,J._ishlnsubmul(te,1,ee),J.isZero()||(J.negative^=1);Z&&(Z.words[ee]=oe)}return Z&&Z.strip(),J.strip(),U!=="div"&&Y!==0&&J.iushrn(Y),{div:Z||null,mod:J}},c.prototype.divmod=function(_,U,Y){if(n(!_.isZero()),this.isZero())return{div:new c(0),mod:new c(0)};var J,te,ae;return this.negative!==0&&_.negative===0?(ae=this.neg().divmod(_,U),U!=="mod"&&(J=ae.div.neg()),U!=="div"&&(te=ae.mod.neg(),Y&&te.negative!==0&&te.iadd(_)),{div:J,mod:te}):this.negative===0&&_.negative!==0?(ae=this.divmod(_.neg(),U),U!=="mod"&&(J=ae.div.neg()),{div:J,mod:ae.mod}):this.negative&_.negative?(ae=this.neg().divmod(_.neg(),U),U!=="div"&&(te=ae.mod.neg(),Y&&te.negative!==0&&te.isub(_)),{div:ae.div,mod:te}):_.length>this.length||this.cmp(_)<0?{div:new c(0),mod:this}:_.length===1?U==="div"?{div:this.divn(_.words[0]),mod:null}:U==="mod"?{div:null,mod:new c(this.modn(_.words[0]))}:{div:this.divn(_.words[0]),mod:new c(this.modn(_.words[0]))}:this._wordDiv(_,U)},c.prototype.div=function(_){return this.divmod(_,"div",!1).div},c.prototype.mod=function(_){return this.divmod(_,"mod",!1).mod},c.prototype.umod=function(_){return this.divmod(_,"mod",!0).mod},c.prototype.divRound=function(_){var U=this.divmod(_);if(U.mod.isZero())return U.div;var Y=U.div.negative!==0?U.mod.isub(_):U.mod,J=_.ushrn(1),te=_.andln(1),ae=Y.cmp(J);return ae<0||te===1&&ae===0?U.div:U.div.negative!==0?U.div.isubn(1):U.div.iaddn(1)},c.prototype.modn=function(_){n(_<=67108863);for(var U=(1<<26)%_,Y=0,J=this.length-1;J>=0;J--)Y=(U*Y+(this.words[J]|0))%_;return Y},c.prototype.idivn=function(_){n(_<=67108863);for(var U=0,Y=this.length-1;Y>=0;Y--){var J=(this.words[Y]|0)+U*67108864;this.words[Y]=J/_|0,U=J%_}return this.strip()},c.prototype.divn=function(_){return this.clone().idivn(_)},c.prototype.egcd=function(_){n(_.negative===0),n(!_.isZero());var U=this,Y=_.clone();U.negative!==0?U=U.umod(_):U=U.clone();for(var J=new c(1),te=new c(0),ae=new c(0),ce=new c(1),Q=0;U.isEven()&&Y.isEven();)U.iushrn(1),Y.iushrn(1),++Q;for(var Z=Y.clone(),j=U.clone();!U.isZero();){for(var K=0,ee=1;!(U.words[0]&ee)&&K<26;++K,ee<<=1);if(K>0)for(U.iushrn(K);K-- >0;)(J.isOdd()||te.isOdd())&&(J.iadd(Z),te.isub(j)),J.iushrn(1),te.iushrn(1);for(var oe=0,q=1;!(Y.words[0]&q)&&oe<26;++oe,q<<=1);if(oe>0)for(Y.iushrn(oe);oe-- >0;)(ae.isOdd()||ce.isOdd())&&(ae.iadd(Z),ce.isub(j)),ae.iushrn(1),ce.iushrn(1);U.cmp(Y)>=0?(U.isub(Y),J.isub(ae),te.isub(ce)):(Y.isub(U),ae.isub(J),ce.isub(te))}return{a:ae,b:ce,gcd:Y.iushln(Q)}},c.prototype._invmp=function(_){n(_.negative===0),n(!_.isZero());var U=this,Y=_.clone();U.negative!==0?U=U.umod(_):U=U.clone();for(var J=new c(1),te=new c(0),ae=Y.clone();U.cmpn(1)>0&&Y.cmpn(1)>0;){for(var ce=0,Q=1;!(U.words[0]&Q)&&ce<26;++ce,Q<<=1);if(ce>0)for(U.iushrn(ce);ce-- >0;)J.isOdd()&&J.iadd(ae),J.iushrn(1);for(var Z=0,j=1;!(Y.words[0]&j)&&Z<26;++Z,j<<=1);if(Z>0)for(Y.iushrn(Z);Z-- >0;)te.isOdd()&&te.iadd(ae),te.iushrn(1);U.cmp(Y)>=0?(U.isub(Y),J.isub(te)):(Y.isub(U),te.isub(J))}var K;return U.cmpn(1)===0?K=J:K=te,K.cmpn(0)<0&&K.iadd(_),K},c.prototype.gcd=function(_){if(this.isZero())return _.abs();if(_.isZero())return this.abs();var U=this.clone(),Y=_.clone();U.negative=0,Y.negative=0;for(var J=0;U.isEven()&&Y.isEven();J++)U.iushrn(1),Y.iushrn(1);do{for(;U.isEven();)U.iushrn(1);for(;Y.isEven();)Y.iushrn(1);var te=U.cmp(Y);if(te<0){var ae=U;U=Y,Y=ae}else if(te===0||Y.cmpn(1)===0)break;U.isub(Y)}while(!0);return Y.iushln(J)},c.prototype.invm=function(_){return this.egcd(_).a.umod(_)},c.prototype.isEven=function(){return(this.words[0]&1)===0},c.prototype.isOdd=function(){return(this.words[0]&1)===1},c.prototype.andln=function(_){return this.words[0]&_},c.prototype.bincn=function(_){n(typeof _=="number");var U=_%26,Y=(_-U)/26,J=1<>>26,ce&=67108863,this.words[ae]=ce}return te!==0&&(this.words[ae]=te,this.length++),this},c.prototype.isZero=function(){return this.length===1&&this.words[0]===0},c.prototype.cmpn=function(_){var U=_<0;if(this.negative!==0&&!U)return-1;if(this.negative===0&&U)return 1;this.strip();var Y;if(this.length>1)Y=1;else{U&&(_=-_),n(_<=67108863,"Number is too big");var J=this.words[0]|0;Y=J===_?0:J<_?-1:1}return this.negative!==0?-Y|0:Y},c.prototype.cmp=function(_){if(this.negative!==0&&_.negative===0)return-1;if(this.negative===0&&_.negative!==0)return 1;var U=this.ucmp(_);return this.negative!==0?-U|0:U},c.prototype.ucmp=function(_){if(this.length>_.length)return 1;if(this.length<_.length)return-1;for(var U=0,Y=this.length-1;Y>=0;Y--){var J=this.words[Y]|0,te=_.words[Y]|0;if(J!==te){Jte&&(U=1);break}}return U},c.prototype.gtn=function(_){return this.cmpn(_)===1},c.prototype.gt=function(_){return this.cmp(_)===1},c.prototype.gten=function(_){return this.cmpn(_)>=0},c.prototype.gte=function(_){return this.cmp(_)>=0},c.prototype.ltn=function(_){return this.cmpn(_)===-1},c.prototype.lt=function(_){return this.cmp(_)===-1},c.prototype.lten=function(_){return this.cmpn(_)<=0},c.prototype.lte=function(_){return this.cmp(_)<=0},c.prototype.eqn=function(_){return this.cmpn(_)===0},c.prototype.eq=function(_){return this.cmp(_)===0},c.red=function(_){return new k(_)},c.prototype.toRed=function(_){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),_.convertTo(this)._forceRed(_)},c.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},c.prototype._forceRed=function(_){return this.red=_,this},c.prototype.forceRed=function(_){return n(!this.red,"Already a number in reduction context"),this._forceRed(_)},c.prototype.redAdd=function(_){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,_)},c.prototype.redIAdd=function(_){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,_)},c.prototype.redSub=function(_){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,_)},c.prototype.redISub=function(_){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,_)},c.prototype.redShl=function(_){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,_)},c.prototype.redMul=function(_){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,_),this.red.mul(this,_)},c.prototype.redIMul=function(_){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,_),this.red.imul(this,_)},c.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},c.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},c.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},c.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},c.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},c.prototype.redPow=function(_){return n(this.red&&!_.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,_)};var a={k256:null,p224:null,p192:null,p25519:null};function E(N,_){this.name=N,this.p=new c(_,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}E.prototype._tmp=function(){var _=new c(null);return _.words=new Array(Math.ceil(this.n/13)),_},E.prototype.ireduce=function(_){var U=_,Y;do this.split(U,this.tmp),U=this.imulK(U),U=U.iadd(this.tmp),Y=U.bitLength();while(Y>this.n);var J=Y0?U.isub(this.p):U.strip!==void 0?U.strip():U._strip(),U},E.prototype.split=function(_,U){_.iushrn(this.n,0,U)},E.prototype.imulK=function(_){return _.imul(this.k)};function y(){E.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}l(y,E),y.prototype.split=function(_,U){for(var Y=4194303,J=Math.min(_.length,9),te=0;te>>22,ae=ce}ae>>>=22,_.words[te-10]=ae,ae===0&&_.length>10?_.length-=10:_.length-=9},y.prototype.imulK=function(_){_.words[_.length]=0,_.words[_.length+1]=0,_.length+=2;for(var U=0,Y=0;Y<_.length;Y++){var J=_.words[Y]|0;U+=J*977,_.words[Y]=U&67108863,U=J*64+(U/67108864|0)}return _.words[_.length-1]===0&&(_.length--,_.words[_.length-1]===0&&_.length--),_};function z(){E.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}l(z,E);function I(){E.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}l(I,E);function B(){E.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}l(B,E),B.prototype.imulK=function(_){for(var U=0,Y=0;Y<_.length;Y++){var J=(_.words[Y]|0)*19+U,te=J&67108863;J>>>=26,_.words[Y]=te,U=J}return U!==0&&(_.words[_.length++]=U),_},c._prime=function(_){if(a[_])return a[_];var U;if(_==="k256")U=new y;else if(_==="p224")U=new z;else if(_==="p192")U=new I;else if(_==="p25519")U=new B;else throw new Error("Unknown prime "+_);return a[_]=U,U};function k(N){if(typeof N=="string"){var _=c._prime(N);this.m=_.p,this.prime=_}else n(N.gtn(1),"modulus must be greater than 1"),this.m=N,this.prime=null}k.prototype._verify1=function(_){n(_.negative===0,"red works only with positives"),n(_.red,"red works only with red numbers")},k.prototype._verify2=function(_,U){n((_.negative|U.negative)===0,"red works only with positives"),n(_.red&&_.red===U.red,"red works only with red numbers")},k.prototype.imod=function(_){return this.prime?this.prime.ireduce(_)._forceRed(this):_.umod(this.m)._forceRed(this)},k.prototype.neg=function(_){return _.isZero()?_.clone():this.m.sub(_)._forceRed(this)},k.prototype.add=function(_,U){this._verify2(_,U);var Y=_.add(U);return Y.cmp(this.m)>=0&&Y.isub(this.m),Y._forceRed(this)},k.prototype.iadd=function(_,U){this._verify2(_,U);var Y=_.iadd(U);return Y.cmp(this.m)>=0&&Y.isub(this.m),Y},k.prototype.sub=function(_,U){this._verify2(_,U);var Y=_.sub(U);return Y.cmpn(0)<0&&Y.iadd(this.m),Y._forceRed(this)},k.prototype.isub=function(_,U){this._verify2(_,U);var Y=_.isub(U);return Y.cmpn(0)<0&&Y.iadd(this.m),Y},k.prototype.shl=function(_,U){return this._verify1(_),this.imod(_.ushln(U))},k.prototype.imul=function(_,U){return this._verify2(_,U),this.imod(_.imul(U))},k.prototype.mul=function(_,U){return this._verify2(_,U),this.imod(_.mul(U))},k.prototype.isqr=function(_){return this.imul(_,_.clone())},k.prototype.sqr=function(_){return this.mul(_,_)},k.prototype.sqrt=function(_){if(_.isZero())return _.clone();var U=this.m.andln(3);if(n(U%2===1),U===3){var Y=this.m.add(new c(1)).iushrn(2);return this.pow(_,Y)}for(var J=this.m.subn(1),te=0;!J.isZero()&&J.andln(1)===0;)te++,J.iushrn(1);n(!J.isZero());var ae=new c(1).toRed(this),ce=ae.redNeg(),Q=this.m.subn(1).iushrn(1),Z=this.m.bitLength();for(Z=new c(2*Z*Z).toRed(this);this.pow(Z,Q).cmp(ce)!==0;)Z.redIAdd(ce);for(var j=this.pow(Z,J),K=this.pow(_,J.addn(1).iushrn(1)),ee=this.pow(_,J),oe=te;ee.cmp(ae)!==0;){for(var q=ee,$=0;q.cmp(ae)!==0;$++)q=q.redSqr();n($=0;te--){for(var j=U.words[te],K=Z-1;K>=0;K--){var ee=j>>K&1;if(ae!==J[0]&&(ae=this.sqr(ae)),ee===0&&ce===0){Q=0;continue}ce<<=1,ce|=ee,Q++,!(Q!==Y&&(te!==0||K!==0))&&(ae=this.mul(ae,J[ce]),Q=0,ce=0)}Z=26}return ae},k.prototype.convertTo=function(_){var U=_.umod(this.m);return U===_?U.clone():U},k.prototype.convertFrom=function(_){var U=_.clone();return U.red=null,U},c.mont=function(_){return new O(_)};function O(N){k.call(this,N),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new c(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}l(O,k),O.prototype.convertTo=function(_){return this.imod(_.ushln(this.shift))},O.prototype.convertFrom=function(_){var U=this.imod(_.mul(this.rinv));return U.red=null,U},O.prototype.imul=function(_,U){if(_.isZero()||U.isZero())return _.words[0]=0,_.length=1,_;var Y=_.imul(U),J=Y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),te=Y.isub(J).iushrn(this.shift),ae=te;return te.cmp(this.m)>=0?ae=te.isub(this.m):te.cmpn(0)<0&&(ae=te.iadd(this.m)),ae._forceRed(this)},O.prototype.mul=function(_,U){if(_.isZero()||U.isZero())return new c(0)._forceRed(this);var Y=_.mul(U),J=Y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),te=Y.isub(J).iushrn(this.shift),ae=te;return te.cmp(this.m)>=0?ae=te.isub(this.m):te.cmpn(0)<0&&(ae=te.iadd(this.m)),ae._forceRed(this)},O.prototype.invm=function(_){var U=this.imod(_._invmp(this.m).mul(this.r2));return U._forceRed(this)}}(v,this)},2692:function(v){v.exports=p;function p(t){var r,s,n,l=t.length,c=0;for(r=0;r>>1;if(!(b<=0)){var a,E=r.mallocDouble(2*b*x),y=r.mallocInt32(x);if(x=c(d,b,E,y),x>0){if(b===1&&C)s.init(x),a=s.sweepComplete(b,T,0,x,E,y,0,x,E,y);else{var z=r.mallocDouble(2*b*S),I=r.mallocInt32(S);S=c(M,b,z,I),S>0&&(s.init(x+S),b===1?a=s.sweepBipartite(b,T,0,x,E,y,0,S,z,I):a=n(b,T,C,x,E,y,S,z,I),r.free(z),r.free(I))}r.free(E),r.free(y)}return a}}}var g;function f(d,M){g.push([d,M])}function w(d){return g=[],u(d,d,f,!0),g}function h(d,M){return g=[],u(d,M,f,!1),g}function o(d,M,T){switch(arguments.length){case 1:return w(d);case 2:return typeof M=="function"?u(d,d,M,!0):h(d,M);case 3:return u(d,M,T,!1);default:throw new Error("box-intersect: Invalid arguments")}}},7333:function(v,p){function t(){function n(u,g,f,w,h,o,d,M,T,C,x){for(var S=2*u,b=w,a=S*w;bT-M?n(u,g,f,w,h,o,d,M,T,C,x):l(u,g,f,w,h,o,d,M,T,C,x)}return c}function r(){function n(f,w,h,o,d,M,T,C,x,S,b){for(var a=2*f,E=o,y=a*o;ES-x?o?n(f,w,h,d,M,T,C,x,S,b,a):l(f,w,h,d,M,T,C,x,S,b,a):o?c(f,w,h,d,M,T,C,x,S,b,a):u(f,w,h,d,M,T,C,x,S,b,a)}return g}function s(n){return n?t():r()}p.partial=s(!1),p.full=s(!0)},2337:function(v,p,t){v.exports=N;var r=t(5306),s=t(2288),n=t(7333),l=n.partial,c=n.full,u=t(1390),g=t(2464),f=t(122),w=128,h=1<<22,o=1<<22,d=f("!(lo>=p0)&&!(p1>=hi)"),M=f("lo===p0"),T=f("lo0;){j-=1;var oe=j*b,q=y[oe],$=y[oe+1],le=y[oe+2],ie=y[oe+3],he=y[oe+4],me=y[oe+5],Me=j*a,Te=z[Me],Oe=z[Me+1],Ne=me&1,Ee=!!(me&16),xe=te,Se=ae,Ue=Q,He=Z;if(Ne&&(xe=Q,Se=Z,Ue=te,He=ae),!(me&2&&(le=T(_,q,$,le,xe,Se,Oe),$>=le))&&!(me&4&&($=C(_,q,$,le,xe,Se,Te),$>=le))){var Fe=le-$,Ge=he-ie;if(Ee){if(_*Fe*(Fe+Ge)f&&h[S+g]>C;--x,S-=d){for(var b=S,a=S+d,E=0;E>>1,C=2*u,x=T,S=h[C*T+g];d=z?(x=y,S=z):E>=B?(x=a,S=E):(x=I,S=B):z>=B?(x=y,S=z):B>=E?(x=a,S=E):(x=I,S=B);for(var N=C*(M-1),_=C*x,k=0;k=p0)&&!(p1>=hi)":g};function t(f){return p[f]}function r(f,w,h,o,d,M,T){for(var C=2*f,x=C*h,S=x,b=h,a=w,E=f+w,y=h;o>y;++y,x+=C){var z=d[x+a];if(z===T)if(b===y)b+=1,S+=C;else{for(var I=0;C>I;++I){var B=d[x+I];d[x+I]=d[S],d[S++]=B}var k=M[y];M[y]=M[b],M[b++]=k}}return b}function s(f,w,h,o,d,M,T){for(var C=2*f,x=C*h,S=x,b=h,a=w,E=f+w,y=h;o>y;++y,x+=C){var z=d[x+a];if(zI;++I){var B=d[x+I];d[x+I]=d[S],d[S++]=B}var k=M[y];M[y]=M[b],M[b++]=k}}return b}function n(f,w,h,o,d,M,T){for(var C=2*f,x=C*h,S=x,b=h,a=w,E=f+w,y=h;o>y;++y,x+=C){var z=d[x+E];if(z<=T)if(b===y)b+=1,S+=C;else{for(var I=0;C>I;++I){var B=d[x+I];d[x+I]=d[S],d[S++]=B}var k=M[y];M[y]=M[b],M[b++]=k}}return b}function l(f,w,h,o,d,M,T){for(var C=2*f,x=C*h,S=x,b=h,a=w,E=f+w,y=h;o>y;++y,x+=C){var z=d[x+E];if(z<=T)if(b===y)b+=1,S+=C;else{for(var I=0;C>I;++I){var B=d[x+I];d[x+I]=d[S],d[S++]=B}var k=M[y];M[y]=M[b],M[b++]=k}}return b}function c(f,w,h,o,d,M,T){for(var C=2*f,x=C*h,S=x,b=h,a=w,E=f+w,y=h;o>y;++y,x+=C){var z=d[x+a],I=d[x+E];if(z<=T&&T<=I)if(b===y)b+=1,S+=C;else{for(var B=0;C>B;++B){var k=d[x+B];d[x+B]=d[S],d[S++]=k}var O=M[y];M[y]=M[b],M[b++]=O}}return b}function u(f,w,h,o,d,M,T){for(var C=2*f,x=C*h,S=x,b=h,a=w,E=f+w,y=h;o>y;++y,x+=C){var z=d[x+a],I=d[x+E];if(zB;++B){var k=d[x+B];d[x+B]=d[S],d[S++]=k}var O=M[y];M[y]=M[b],M[b++]=O}}return b}function g(f,w,h,o,d,M,T,C){for(var x=2*f,S=x*h,b=S,a=h,E=w,y=f+w,z=h;o>z;++z,S+=x){var I=d[S+E],B=d[S+y];if(!(I>=T)&&!(C>=B))if(a===z)a+=1,b+=x;else{for(var k=0;x>k;++k){var O=d[S+k];d[S+k]=d[b],d[b++]=O}var N=M[z];M[z]=M[a],M[a++]=N}}return a}},309:function(v){v.exports=t;var p=32;function t(w,h){h<=4*p?r(0,h-1,w):f(0,h-1,w)}function r(w,h,o){for(var d=2*(w+1),M=w+1;M<=h;++M){for(var T=o[d++],C=o[d++],x=M,S=d-2;x-- >w;){var b=o[S-2],a=o[S-1];if(bo[h+1]:!0}function g(w,h,o,d){w*=2;var M=d[w];return M>1,x=C-d,S=C+d,b=M,a=x,E=C,y=S,z=T,I=w+1,B=h-1,k=0;u(b,a,o)&&(k=b,b=a,a=k),u(y,z,o)&&(k=y,y=z,z=k),u(b,E,o)&&(k=b,b=E,E=k),u(a,E,o)&&(k=a,a=E,E=k),u(b,y,o)&&(k=b,b=y,y=k),u(E,y,o)&&(k=E,E=y,y=k),u(a,z,o)&&(k=a,a=z,z=k),u(a,E,o)&&(k=a,a=E,E=k),u(y,z,o)&&(k=y,y=z,z=k);for(var O=o[2*a],N=o[2*a+1],_=o[2*y],U=o[2*y+1],Y=2*b,J=2*E,te=2*z,ae=2*M,ce=2*C,Q=2*T,Z=0;Z<2;++Z){var j=o[Y+Z],K=o[J+Z],ee=o[te+Z];o[ae+Z]=j,o[ce+Z]=K,o[Q+Z]=ee}n(x,w,o),n(S,h,o);for(var oe=I;oe<=B;++oe)if(g(oe,O,N,o))oe!==I&&s(oe,I,o),++I;else if(!g(oe,_,U,o))for(;;)if(g(B,_,U,o)){g(B,O,N,o)?(l(oe,I,B,o),++I,--B):(s(oe,B,o),--B);break}else{if(--B>>1;n(d,K);for(var ee=0,oe=0,ce=0;ce=l)q=q-l|0,T(f,w,oe--,q);else if(q>=0)T(u,g,ee--,q);else if(q<=-l){q=-q-l|0;for(var $=0;$>>1;n(d,K);for(var ee=0,oe=0,q=0,ce=0;ce>1===d[2*ce+3]>>1&&(le=2,ce+=1),$<0){for(var ie=-($>>1)-1,he=0;he>1)-1;le===0?T(u,g,ee--,ie):le===1?T(f,w,oe--,ie):le===2&&T(h,o,q--,ie)}}}function b(E,y,z,I,B,k,O,N,_,U,Y,J){var te=0,ae=2*E,ce=y,Q=y+E,Z=1,j=1;I?j=l:Z=l;for(var K=B;K>>1;n(d,$);for(var le=0,K=0;K<$;++K){var ie=d[2*K+1]|0;if(ie<0){var ee=-ie,he=!1;if(ee>=l?(he=!I,ee-=l):(he=!!I,ee-=1),he)C(u,g,le++,ee);else{var me=J[ee],Me=ae*ee,Te=Y[Me+y+1],Oe=Y[Me+y+1+E];e:for(var Ne=0;Ne>>1;n(d,ee);for(var oe=0,Q=0;Q=l)u[oe++]=Z-l;else{Z-=1;var $=Y[Z],le=te*Z,ie=U[le+y+1],he=U[le+y+1+E];e:for(var me=0;me=0;--me)if(u[me]===Z){for(var Ne=me+1;Ne0;){for(var d=u.pop(),w=u.pop(),M=-1,T=-1,h=f[w],x=1;x=0||(c.flip(w,d),s(l,c,u,M,w,T),s(l,c,u,w,T,M),s(l,c,u,T,d,M),s(l,c,u,d,M,T))}}},7098:function(v,p,t){var r=t(5070);v.exports=g;function s(f,w,h,o,d,M,T){this.cells=f,this.neighbor=w,this.flags=o,this.constraint=h,this.active=d,this.next=M,this.boundary=T}var n=s.prototype;function l(f,w){return f[0]-w[0]||f[1]-w[1]||f[2]-w[2]}n.locate=function(){var f=[0,0,0];return function(w,h,o){var d=w,M=h,T=o;return h0||T.length>0;){for(;M.length>0;){var a=M.pop();if(C[a]!==-d){C[a]=d,x[a];for(var E=0;E<3;++E){var y=b[3*a+E];y>=0&&C[y]===0&&(S[3*a+E]?T.push(y):(M.push(y),C[y]=d))}}}var z=T;T=M,M=z,T.length=0,d=-d}var I=u(x,C,w);return h?I.concat(o.boundary):I}},9971:function(v,p,t){var r=t(5070),s=t(417)[3],n=0,l=1,c=2;v.exports=T;function u(C,x,S,b,a){this.a=C,this.b=x,this.idx=S,this.lowerIds=b,this.upperIds=a}function g(C,x,S,b){this.a=C,this.b=x,this.type=S,this.idx=b}function f(C,x){var S=C.a[0]-x.a[0]||C.a[1]-x.a[1]||C.type-x.type;return S||C.type!==n&&(S=s(C.a,C.b,x.b),S)?S:C.idx-x.idx}function w(C,x){return s(C.a,C.b,x)}function h(C,x,S,b,a){for(var E=r.lt(x,b,w),y=r.gt(x,b,w),z=E;z1&&s(S[B[O-2]],S[B[O-1]],b)>0;)C.push([B[O-1],B[O-2],a]),O-=1;B.length=O,B.push(a);for(var k=I.upperIds,O=k.length;O>1&&s(S[k[O-2]],S[k[O-1]],b)<0;)C.push([k[O-2],k[O-1],a]),O-=1;k.length=O,k.push(a)}}function o(C,x){var S;return C.a[0]I[0]&&a.push(new g(I,z,c,E),new g(z,I,l,E))}a.sort(f);for(var B=a[0].a[0]-(1+Math.abs(a[0].a[0]))*Math.pow(2,-52),k=[new u([B,1],[B,0],-1,[],[])],O=[],E=0,N=a.length;E=0}}(),n.removeTriangle=function(u,g,f){var w=this.stars;l(w[u],g,f),l(w[g],f,u),l(w[f],u,g)},n.addTriangle=function(u,g,f){var w=this.stars;w[u].push(g,f),w[g].push(f,u),w[f].push(u,g)},n.opposite=function(u,g){for(var f=this.stars[g],w=1,h=f.length;w=0;--_){var j=O[_];U=j[0];var K=B[U],ee=K[0],oe=K[1],q=I[ee],$=I[oe];if((q[0]-$[0]||q[1]-$[1])<0){var le=ee;ee=oe,oe=le}K[0]=ee;var ie=K[1]=j[1],he;for(N&&(he=K[2]);_>0&&O[_-1][0]===U;){var j=O[--_],me=j[1];N?B.push([ie,me,he]):B.push([ie,me]),ie=me}N?B.push([ie,oe,he]):B.push([ie,oe])}return Y}function x(I,B,k){for(var O=B.length,N=new r(O),_=[],U=0;UB[2]?1:0)}function a(I,B,k){if(I.length!==0){if(B)for(var O=0;O0||U.length>0}function z(I,B,k){var O;if(k){O=B;for(var N=new Array(B.length),_=0;_C+1)throw new Error(M+" map requires nshades to be at least size "+d.length);Array.isArray(g.alpha)?g.alpha.length!==2?x=[1,1]:x=g.alpha.slice():typeof g.alpha=="number"?x=[g.alpha,g.alpha]:x=[1,1],f=d.map(function(z){return Math.round(z.index*C)}),x[0]=Math.min(Math.max(x[0],0),1),x[1]=Math.min(Math.max(x[1],0),1);var b=d.map(function(z,I){var B=d[I].index,k=d[I].rgb.slice();return k.length===4&&k[3]>=0&&k[3]<=1||(k[3]=x[0]+(x[1]-x[0])*B),k}),a=[];for(S=0;S=0}function g(f,w,h,o){var d=r(w,h,o);if(d===0){var M=s(r(f,w,h)),T=s(r(f,w,o));if(M===T){if(M===0){var C=u(f,w,h),x=u(f,w,o);return C===x?0:C?1:-1}return 0}else{if(T===0)return M>0||u(f,w,o)?-1:1;if(M===0)return T>0||u(f,w,h)?1:-1}return s(T-M)}var S=r(f,w,h);if(S>0)return d>0&&r(f,w,o)>0?1:-1;if(S<0)return d>0||r(f,w,o)>0?1:-1;var b=r(f,w,o);return b>0||u(f,w,h)?1:-1}},7538:function(v){v.exports=function(t){return t<0?-1:t>0?1:0}},9209:function(v){v.exports=r;var p=Math.min;function t(s,n){return s-n}function r(s,n){var l=s.length,c=s.length-n.length;if(c)return c;switch(l){case 0:return 0;case 1:return s[0]-n[0];case 2:return s[0]+s[1]-n[0]-n[1]||p(s[0],s[1])-p(n[0],n[1]);case 3:var u=s[0]+s[1],g=n[0]+n[1];if(c=u+s[2]-(g+n[2]),c)return c;var f=p(s[0],s[1]),w=p(n[0],n[1]);return p(f,s[2])-p(w,n[2])||p(f+s[2],u)-p(w+n[2],g);case 4:var h=s[0],o=s[1],d=s[2],M=s[3],T=n[0],C=n[1],x=n[2],S=n[3];return h+o+d+M-(T+C+x+S)||p(h,o,d,M)-p(T,C,x,S,T)||p(h+o,h+d,h+M,o+d,o+M,d+M)-p(T+C,T+x,T+S,C+x,C+S,x+S)||p(h+o+d,h+o+M,h+d+M,o+d+M)-p(T+C+x,T+C+S,T+x+S,C+x+S);default:for(var b=s.slice().sort(t),a=n.slice().sort(t),E=0;Et[s][0]&&(s=n);return rs?[[s],[r]]:[[r]]}},8722:function(v,p,t){v.exports=s;var r=t(3266);function s(n){var l=r(n),c=l.length;if(c<=2)return[];for(var u=new Array(c),g=l[c-1],f=0;f=g[T]&&(M+=1);o[d]=M}}return u}function c(u,g){try{return r(u,!0)}catch{var f=s(u);if(f.length<=g)return[];var w=n(u,f),h=r(w,!0);return l(h,f)}}},9680:function(v){function p(r,s,n,l,c,u){var g=6*c*c-6*c,f=3*c*c-4*c+1,w=-6*c*c+6*c,h=3*c*c-2*c;if(r.length){u||(u=new Array(r.length));for(var o=r.length-1;o>=0;--o)u[o]=g*r[o]+f*s[o]+w*n[o]+h*l[o];return u}return g*r+f*s+w*n[o]+h*l}function t(r,s,n,l,c,u){var g=c-1,f=c*c,w=g*g,h=(1+2*c)*w,o=c*w,d=f*(3-2*c),M=f*g;if(r.length){u||(u=new Array(r.length));for(var T=r.length-1;T>=0;--T)u[T]=h*r[T]+o*s[T]+d*n[T]+M*l[T];return u}return h*r+o*s+d*n+M*l}v.exports=t,v.exports.derivative=p},4419:function(v,p,t){var r=t(2183),s=t(1215);v.exports=u;function n(g,f){this.point=g,this.index=f}function l(g,f){for(var w=g.point,h=f.point,o=w.length,d=0;d=2)return!1;k[N]=_}return!0}):B=B.filter(function(k){for(var O=0;O<=h;++O){var N=E[k[O]];if(N<0)return!1;k[O]=N}return!0}),h&1)for(var M=0;M>>31},v.exports.exponent=function(d){var M=v.exports.hi(d);return(M<<1>>>21)-1023},v.exports.fraction=function(d){var M=v.exports.lo(d),T=v.exports.hi(d),C=T&(1<<20)-1;return T&2146435072&&(C+=1048576),[M,C]},v.exports.denormalized=function(d){var M=v.exports.hi(d);return!(M&2146435072)}},3094:function(v){function p(s,n,l){var c=s[l]|0;if(c<=0)return[];var u=new Array(c),g;if(l===s.length-1)for(g=0;g"u"&&(n=0),typeof s){case"number":if(s>0)return t(s|0,n);break;case"object":if(typeof s.length=="number")return p(s,n,0);break}return[]}v.exports=r},8348:function(v,p,t){v.exports=s;var r=t(1215);function s(n,l){var c=n.length;if(typeof l!="number"){l=0;for(var u=0;u=h-1)for(var S=M.length-1,a=f-w[h-1],b=0;b=h-1){var x=M.length-1;f-w[h-1];for(var S=0;S=0;--h)if(f[--w])return!1;return!0},c.jump=function(f){var w=this.lastT(),h=this.dimension;if(!(f0;--b)o.push(n(C[b-1],x[b-1],arguments[b])),d.push(0)}},c.push=function(f){var w=this.lastT(),h=this.dimension;if(!(f1e-6?1/T:0;this._time.push(f);for(var a=h;a>0;--a){var E=n(x[a-1],S[a-1],arguments[a]);o.push(E),d.push((E-o[M++])*b)}}},c.set=function(f){var w=this.dimension;if(!(f0;--C)h.push(n(M[C-1],T[C-1],arguments[C])),o.push(0)}},c.move=function(f){var w=this.lastT(),h=this.dimension;if(!(f<=w||arguments.length!==h+1)){var o=this._state,d=this._velocity,M=o.length-this.dimension,T=this.bounds,C=T[0],x=T[1],S=f-w,b=S>1e-6?1/S:0;this._time.push(f);for(var a=h;a>0;--a){var E=arguments[a];o.push(n(C[a-1],x[a-1],o[M++]+E)),d.push(E*b)}}},c.idle=function(f){var w=this.lastT();if(!(f=0;--b)o.push(n(C[b],x[b],o[M]+S*d[M])),d.push(0),M+=1}};function u(f){for(var w=new Array(f),h=0;h=0;--I){var a=E[I];y[I]<=0?E[I]=new r(a._color,a.key,a.value,E[I+1],a.right,a._count+1):E[I]=new r(a._color,a.key,a.value,a.left,E[I+1],a._count+1)}for(var I=E.length-1;I>1;--I){var B=E[I-1],a=E[I];if(B._color===t||a._color===t)break;var k=E[I-2];if(k.left===B)if(B.left===a){var O=k.right;if(O&&O._color===p)B._color=t,k.right=n(t,O),k._color=p,I-=1;else{if(k._color=p,k.left=B.right,B._color=t,B.right=k,E[I-2]=B,E[I-1]=a,l(k),l(B),I>=3){var N=E[I-3];N.left===k?N.left=B:N.right=B}break}}else{var O=k.right;if(O&&O._color===p)B._color=t,k.right=n(t,O),k._color=p,I-=1;else{if(B.right=a.left,k._color=p,k.left=a.right,a._color=t,a.left=B,a.right=k,E[I-2]=a,E[I-1]=B,l(k),l(B),l(a),I>=3){var N=E[I-3];N.left===k?N.left=a:N.right=a}break}}else if(B.right===a){var O=k.left;if(O&&O._color===p)B._color=t,k.left=n(t,O),k._color=p,I-=1;else{if(k._color=p,k.right=B.left,B._color=t,B.left=k,E[I-2]=B,E[I-1]=a,l(k),l(B),I>=3){var N=E[I-3];N.right===k?N.right=B:N.left=B}break}}else{var O=k.left;if(O&&O._color===p)B._color=t,k.left=n(t,O),k._color=p,I-=1;else{if(B.left=a.right,k._color=p,k.right=a.left,a._color=t,a.right=B,a.left=k,E[I-2]=a,E[I-1]=B,l(k),l(B),l(a),I>=3){var N=E[I-3];N.right===k?N.right=a:N.left=a}break}}}return E[0]._color=t,new c(b,E[0])};function g(x,S){if(S.left){var b=g(x,S.left);if(b)return b}var b=x(S.key,S.value);if(b)return b;if(S.right)return g(x,S.right)}function f(x,S,b,a){var E=S(x,a.key);if(E<=0){if(a.left){var y=f(x,S,b,a.left);if(y)return y}var y=b(a.key,a.value);if(y)return y}if(a.right)return f(x,S,b,a.right)}function w(x,S,b,a,E){var y=b(x,E.key),z=b(S,E.key),I;if(y<=0&&(E.left&&(I=w(x,S,b,a,E.left),I)||z>0&&(I=a(E.key,E.value),I)))return I;if(z>0&&E.right)return w(x,S,b,a,E.right)}u.forEach=function(S,b,a){if(this.root)switch(arguments.length){case 1:return g(S,this.root);case 2:return f(b,this._compare,S,this.root);case 3:return this._compare(b,a)>=0?void 0:w(b,a,this._compare,S,this.root)}},Object.defineProperty(u,"begin",{get:function(){for(var x=[],S=this.root;S;)x.push(S),S=S.left;return new h(this,x)}}),Object.defineProperty(u,"end",{get:function(){for(var x=[],S=this.root;S;)x.push(S),S=S.right;return new h(this,x)}}),u.at=function(x){if(x<0)return new h(this,[]);for(var S=this.root,b=[];;){if(b.push(S),S.left){if(x=S.right._count)break;S=S.right}else break}return new h(this,[])},u.ge=function(x){for(var S=this._compare,b=this.root,a=[],E=0;b;){var y=S(x,b.key);a.push(b),y<=0&&(E=a.length),y<=0?b=b.left:b=b.right}return a.length=E,new h(this,a)},u.gt=function(x){for(var S=this._compare,b=this.root,a=[],E=0;b;){var y=S(x,b.key);a.push(b),y<0&&(E=a.length),y<0?b=b.left:b=b.right}return a.length=E,new h(this,a)},u.lt=function(x){for(var S=this._compare,b=this.root,a=[],E=0;b;){var y=S(x,b.key);a.push(b),y>0&&(E=a.length),y<=0?b=b.left:b=b.right}return a.length=E,new h(this,a)},u.le=function(x){for(var S=this._compare,b=this.root,a=[],E=0;b;){var y=S(x,b.key);a.push(b),y>=0&&(E=a.length),y<0?b=b.left:b=b.right}return a.length=E,new h(this,a)},u.find=function(x){for(var S=this._compare,b=this.root,a=[];b;){var E=S(x,b.key);if(a.push(b),E===0)return new h(this,a);E<=0?b=b.left:b=b.right}return new h(this,[])},u.remove=function(x){var S=this.find(x);return S?S.remove():this},u.get=function(x){for(var S=this._compare,b=this.root;b;){var a=S(x,b.key);if(a===0)return b.value;a<=0?b=b.left:b=b.right}};function h(x,S){this.tree=x,this._stack=S}var o=h.prototype;Object.defineProperty(o,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(o,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),o.clone=function(){return new h(this.tree,this._stack.slice())};function d(x,S){x.key=S.key,x.value=S.value,x.left=S.left,x.right=S.right,x._color=S._color,x._count=S._count}function M(x){for(var S,b,a,E,y=x.length-1;y>=0;--y){if(S=x[y],y===0){S._color=t;return}if(b=x[y-1],b.left===S){if(a=b.right,a.right&&a.right._color===p){if(a=b.right=s(a),E=a.right=s(a.right),b.right=a.left,a.left=b,a.right=E,a._color=b._color,S._color=t,b._color=t,E._color=t,l(b),l(a),y>1){var z=x[y-2];z.left===b?z.left=a:z.right=a}x[y-1]=a;return}else if(a.left&&a.left._color===p){if(a=b.right=s(a),E=a.left=s(a.left),b.right=E.left,a.left=E.right,E.left=b,E.right=a,E._color=b._color,b._color=t,a._color=t,S._color=t,l(b),l(a),l(E),y>1){var z=x[y-2];z.left===b?z.left=E:z.right=E}x[y-1]=E;return}if(a._color===t)if(b._color===p){b._color=t,b.right=n(p,a);return}else{b.right=n(p,a);continue}else{if(a=s(a),b.right=a.left,a.left=b,a._color=b._color,b._color=p,l(b),l(a),y>1){var z=x[y-2];z.left===b?z.left=a:z.right=a}x[y-1]=a,x[y]=b,y+11){var z=x[y-2];z.right===b?z.right=a:z.left=a}x[y-1]=a;return}else if(a.right&&a.right._color===p){if(a=b.left=s(a),E=a.right=s(a.right),b.left=E.right,a.right=E.left,E.right=b,E.left=a,E._color=b._color,b._color=t,a._color=t,S._color=t,l(b),l(a),l(E),y>1){var z=x[y-2];z.right===b?z.right=E:z.left=E}x[y-1]=E;return}if(a._color===t)if(b._color===p){b._color=t,b.left=n(p,a);return}else{b.left=n(p,a);continue}else{if(a=s(a),b.left=a.right,a.right=b,a._color=b._color,b._color=p,l(b),l(a),y>1){var z=x[y-2];z.right===b?z.right=a:z.left=a}x[y-1]=a,x[y]=b,y+1=0;--a){var b=x[a];b.left===x[a+1]?S[a]=new r(b._color,b.key,b.value,S[a+1],b.right,b._count):S[a]=new r(b._color,b.key,b.value,b.left,S[a+1],b._count)}if(b=S[S.length-1],b.left&&b.right){var E=S.length;for(b=b.left;b.right;)S.push(b),b=b.right;var y=S[E-1];S.push(new r(b._color,y.key,y.value,b.left,b.right,b._count)),S[E-1].key=b.key,S[E-1].value=b.value;for(var a=S.length-2;a>=E;--a)b=S[a],S[a]=new r(b._color,b.key,b.value,b.left,S[a+1],b._count);S[E-1].left=S[E]}if(b=S[S.length-1],b._color===p){var z=S[S.length-2];z.left===b?z.left=null:z.right===b&&(z.right=null),S.pop();for(var a=0;a0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(o,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(o,"index",{get:function(){var x=0,S=this._stack;if(S.length===0){var b=this.tree.root;return b?b._count:0}else S[S.length-1].left&&(x=S[S.length-1].left._count);for(var a=S.length-2;a>=0;--a)S[a+1]===S[a].right&&(++x,S[a].left&&(x+=S[a].left._count));return x},enumerable:!0}),o.next=function(){var x=this._stack;if(x.length!==0){var S=x[x.length-1];if(S.right)for(S=S.right;S;)x.push(S),S=S.left;else for(x.pop();x.length>0&&x[x.length-1].right===S;)S=x[x.length-1],x.pop()}},Object.defineProperty(o,"hasNext",{get:function(){var x=this._stack;if(x.length===0)return!1;if(x[x.length-1].right)return!0;for(var S=x.length-1;S>0;--S)if(x[S-1].left===x[S])return!0;return!1}}),o.update=function(x){var S=this._stack;if(S.length===0)throw new Error("Can't update empty node!");var b=new Array(S.length),a=S[S.length-1];b[b.length-1]=new r(a._color,a.key,x,a.left,a.right,a._count);for(var E=S.length-2;E>=0;--E)a=S[E],a.left===S[E+1]?b[E]=new r(a._color,a.key,a.value,b[E+1],a.right,a._count):b[E]=new r(a._color,a.key,a.value,a.left,b[E+1],a._count);return new c(this.tree._compare,b[0])},o.prev=function(){var x=this._stack;if(x.length!==0){var S=x[x.length-1];if(S.left)for(S=S.left;S;)x.push(S),S=S.right;else for(x.pop();x.length>0&&x[x.length-1].left===S;)S=x[x.length-1],x.pop()}},Object.defineProperty(o,"hasPrev",{get:function(){var x=this._stack;if(x.length===0)return!1;if(x[x.length-1].left)return!0;for(var S=x.length-1;S>0;--S)if(x[S-1].right===x[S])return!0;return!1}});function T(x,S){return xS?1:0}function C(x){return new c(x||T,null)}},7453:function(v,p,t){v.exports=a;var r=t(9557),s=t(1681),n=t(1011),l=t(2864),c=t(8468),u=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function g(E,y){return E[0]=y[0],E[1]=y[1],E[2]=y[2],E}function f(E){this.gl=E,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(E)}var w=f.prototype;w.update=function(E){E=E||{};function y(ae,ce,Q){if(Q in E){var Z=E[Q],j=this[Q],K;(ae?Array.isArray(Z)&&Array.isArray(Z[0]):Array.isArray(Z))?this[Q]=K=[ce(Z[0]),ce(Z[1]),ce(Z[2])]:this[Q]=K=[ce(Z),ce(Z),ce(Z)];for(var ee=0;ee<3;++ee)if(K[ee]!==j[ee])return!0}return!1}var z=y.bind(this,!1,Number),I=y.bind(this,!1,Boolean),B=y.bind(this,!1,String),k=y.bind(this,!0,function(ae){if(Array.isArray(ae)){if(ae.length===3)return[+ae[0],+ae[1],+ae[2],1];if(ae.length===4)return[+ae[0],+ae[1],+ae[2],+ae[3]]}return[0,0,0,1]}),O,N=!1,_=!1;if("bounds"in E)for(var U=E.bounds,Y=0;Y<2;++Y)for(var J=0;J<3;++J)U[Y][J]!==this.bounds[Y][J]&&(_=!0),this.bounds[Y][J]=U[Y][J];if("ticks"in E){O=E.ticks,N=!0,this.autoTicks=!1;for(var Y=0;Y<3;++Y)this.tickSpacing[Y]=0}else z("tickSpacing")&&(this.autoTicks=!0,_=!0);if(this._firstInit&&("ticks"in E||"tickSpacing"in E||(this.autoTicks=!0),_=!0,N=!0,this._firstInit=!1),_&&this.autoTicks&&(O=c.create(this.bounds,this.tickSpacing),N=!0),N){for(var Y=0;Y<3;++Y)O[Y].sort(function(ce,Q){return ce.x-Q.x});c.equal(O,this.ticks)?N=!1:this.ticks=O}I("tickEnable"),B("tickFont")&&(N=!0),z("tickSize"),z("tickAngle"),z("tickPad"),k("tickColor");var te=B("labels");B("labelFont")&&(te=!0),I("labelEnable"),z("labelSize"),z("labelPad"),k("labelColor"),I("lineEnable"),I("lineMirror"),z("lineWidth"),k("lineColor"),I("lineTickEnable"),I("lineTickMirror"),z("lineTickLength"),z("lineTickWidth"),k("lineTickColor"),I("gridEnable"),z("gridWidth"),k("gridColor"),I("zeroEnable"),k("zeroLineColor"),z("zeroLineWidth"),I("backgroundEnable"),k("backgroundColor"),this._text?this._text&&(te||N)&&this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=r(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&&N&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=s(this.gl,this.bounds,this.ticks))};function h(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var o=[new h,new h,new h];function d(E,y,z,I,B){for(var k=E.primalOffset,O=E.primalMinor,N=E.mirrorOffset,_=E.mirrorMinor,U=I[y],Y=0;Y<3;++Y)if(y!==Y){var J=k,te=N,ae=O,ce=_;U&1<0?(ae[Y]=-1,ce[Y]=0):(ae[Y]=0,ce[Y]=1)}}var M=[0,0,0],T={model:u,view:u,projection:u,_ortho:!1};w.isOpaque=function(){return!0},w.isTransparent=function(){return!1},w.drawTransparent=function(E){};var C=0,x=[0,0,0],S=[0,0,0],b=[0,0,0];w.draw=function(E){E=E||T;for(var j=this.gl,y=E.model||u,z=E.view||u,I=E.projection||u,B=this.bounds,k=E._ortho||!1,O=l(y,z,I,B,k),N=O.cubeEdges,_=O.axis,U=z[12],Y=z[13],J=z[14],te=z[15],ae=k?2:1,ce=ae*this.pixelRatio*(I[3]*U+I[7]*Y+I[11]*J+I[15]*te)/j.drawingBufferHeight,Q=0;Q<3;++Q)this.lastCubeProps.cubeEdges[Q]=N[Q],this.lastCubeProps.axis[Q]=_[Q];for(var Z=o,Q=0;Q<3;++Q)d(o[Q],Q,this.bounds,N,_);for(var j=this.gl,K=M,Q=0;Q<3;++Q)this.backgroundEnable[Q]?K[Q]=_[Q]:K[Q]=0;this._background.draw(y,z,I,B,K,this.backgroundColor),this._lines.bind(y,z,I,this);for(var Q=0;Q<3;++Q){var ee=[0,0,0];_[Q]>0?ee[Q]=B[1][Q]:ee[Q]=B[0][Q];for(var oe=0;oe<2;++oe){var q=(Q+1+oe)%3,$=(Q+1+(oe^1))%3;this.gridEnable[q]&&this._lines.drawGrid(q,$,this.bounds,ee,this.gridColor[q],this.gridWidth[q]*this.pixelRatio)}for(var oe=0;oe<2;++oe){var q=(Q+1+oe)%3,$=(Q+1+(oe^1))%3;this.zeroEnable[$]&&Math.min(B[0][$],B[1][$])<=0&&Math.max(B[0][$],B[1][$])>=0&&this._lines.drawZero(q,$,this.bounds,ee,this.zeroLineColor[$],this.zeroLineWidth[$]*this.pixelRatio)}}for(var Q=0;Q<3;++Q){this.lineEnable[Q]&&this._lines.drawAxisLine(Q,this.bounds,Z[Q].primalOffset,this.lineColor[Q],this.lineWidth[Q]*this.pixelRatio),this.lineMirror[Q]&&this._lines.drawAxisLine(Q,this.bounds,Z[Q].mirrorOffset,this.lineColor[Q],this.lineWidth[Q]*this.pixelRatio);for(var le=g(x,Z[Q].primalMinor),ie=g(S,Z[Q].mirrorMinor),he=this.lineTickLength,oe=0;oe<3;++oe){var me=ce/y[5*oe];le[oe]*=he[oe]*me,ie[oe]*=he[oe]*me}this.lineTickEnable[Q]&&this._lines.drawAxisTicks(Q,Z[Q].primalOffset,le,this.lineTickColor[Q],this.lineTickWidth[Q]*this.pixelRatio),this.lineTickMirror[Q]&&this._lines.drawAxisTicks(Q,Z[Q].mirrorOffset,ie,this.lineTickColor[Q],this.lineTickWidth[Q]*this.pixelRatio)}this._lines.unbind(),this._text.bind(y,z,I,this.pixelRatio);var Me,Te=.5,Oe,Ne;function Ee(Ge){Ne=[0,0,0],Ne[Ge]=1}function xe(Ge,nt,qe){var $e=(Ge+1)%3,et=(Ge+2)%3,ct=nt[$e],dt=nt[et],pt=qe[$e],At=qe[et];if(ct>0&&At>0){Ee($e);return}else if(ct>0&&At<0){Ee($e);return}else if(ct<0&&At>0){Ee($e);return}else if(ct<0&&At<0){Ee($e);return}else if(dt>0&&pt>0){Ee(et);return}else if(dt>0&&pt<0){Ee(et);return}else if(dt<0&&pt>0){Ee(et);return}else if(dt<0&&pt<0){Ee(et);return}}for(var Q=0;Q<3;++Q){for(var Se=Z[Q].primalMinor,Ue=Z[Q].mirrorMinor,He=g(b,Z[Q].primalOffset),oe=0;oe<3;++oe)this.lineTickEnable[Q]&&(He[oe]+=ce*Se[oe]*Math.max(this.lineTickLength[oe],0)/y[5*oe]);var Fe=[0,0,0];if(Fe[Q]=1,this.tickEnable[Q]){this.tickAngle[Q]===-3600?(this.tickAngle[Q]=0,this.tickAlign[Q]="auto"):this.tickAlign[Q]=-1,Oe=1,Me=[this.tickAlign[Q],Te,Oe],Me[0]==="auto"?Me[0]=C:Me[0]=parseInt(""+Me[0]),Ne=[0,0,0],xe(Q,Se,Ue);for(var oe=0;oe<3;++oe)He[oe]+=ce*Se[oe]*this.tickPad[oe]/y[5*oe];this._text.drawTicks(Q,this.tickSize[Q],this.tickAngle[Q],He,this.tickColor[Q],Fe,Ne,Me)}if(this.labelEnable[Q]){Oe=0,Ne=[0,0,0],this.labels[Q].length>4&&(Ee(Q),Oe=1),Me=[this.labelAlign[Q],Te,Oe],Me[0]==="auto"?Me[0]=C:Me[0]=parseInt(""+Me[0]);for(var oe=0;oe<3;++oe)He[oe]+=ce*Se[oe]*this.labelPad[oe]/y[5*oe];He[Q]+=.5*(B[0][Q]+B[1][Q]),this._text.drawLabel(Q,this.labelSize[Q],this.labelAngle[Q],He,this.labelColor[Q],[0,0,0],Ne,Me)}}this._text.unbind()},w.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function a(E,y){var z=new f(E);return z.update(y),z}},1011:function(v,p,t){v.exports=u;var r=t(5827),s=t(2944),n=t(1943).bg;function l(g,f,w,h){this.gl=g,this.buffer=f,this.vao=w,this.shader=h}var c=l.prototype;c.draw=function(g,f,w,h,o,d){for(var M=!1,T=0;T<3;++T)M=M||o[T];if(M){var C=this.gl;C.enable(C.POLYGON_OFFSET_FILL),C.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:g,view:f,projection:w,bounds:h,enable:o,colors:d},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),C.disable(C.POLYGON_OFFSET_FILL)}},c.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function u(g){for(var f=[],w=[],h=0,o=0;o<3;++o)for(var d=(o+1)%3,M=(o+2)%3,T=[0,0,0],C=[0,0,0],x=-1;x<=1;x+=2){w.push(h,h+2,h+1,h+1,h+2,h+3),T[o]=x,C[o]=x;for(var S=-1;S<=1;S+=2){T[d]=S;for(var b=-1;b<=1;b+=2)T[M]=b,f.push(T[0],T[1],T[2],C[0],C[1],C[2]),h+=1}var a=d;d=M,M=a}var E=r(g,new Float32Array(f)),y=r(g,new Uint16Array(w),g.ELEMENT_ARRAY_BUFFER),z=s(g,[{buffer:E,type:g.FLOAT,size:3,offset:0,stride:24},{buffer:E,type:g.FLOAT,size:3,offset:12,stride:24}],y),I=n(g);return I.attributes.position.location=0,I.attributes.normal.location=1,new l(g,E,z,I)}},2864:function(v,p,t){v.exports=x;var r=t(2288),s=t(104),n=t(4670),l=t(417),c=new Array(16),u=new Array(8),g=new Array(8),f=new Array(3),w=[0,0,0];(function(){for(var S=0;S<8;++S)u[S]=[1,1,1,1],g[S]=[1,1,1]})();function h(S,b,a){for(var E=0;E<4;++E){S[E]=a[12+E];for(var y=0;y<3;++y)S[E]+=b[y]*a[4*y+E]}}var o=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function d(S){for(var b=0;bte&&(O|=1<te){O|=1<g[I][1])&&(oe=I);for(var q=-1,I=0;I<3;++I){var $=oe^1<g[le][0]&&(le=$)}}var ie=M;ie[0]=ie[1]=ie[2]=0,ie[r.log2(q^oe)]=oe&q,ie[r.log2(oe^le)]=oe≤var he=le^7;he===O||he===ee?(he=q^7,ie[r.log2(le^he)]=he&le):ie[r.log2(q^he)]=he&q;for(var me=T,Me=O,U=0;U<3;++U)Me&1< HALF_PI) && (b <= ONE_AND_HALF_PI)) ? b - PI : b; } float look_horizontal_or_vertical(float a, float ratio) { // ratio controls the ratio between being horizontal to (vertical + horizontal) // if ratio is set to 0.5 then it is 50%, 50%. // when using a higher ratio e.g. 0.75 the result would // likely be more horizontal than vertical. float b = positive_angle(a); return (b < ( ratio) * HALF_PI) ? 0.0 : (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI : (b < (2.0 + ratio) * HALF_PI) ? 0.0 : (b < (4.0 - ratio) * HALF_PI) ? HALF_PI : 0.0; } float roundTo(float a, float b) { return float(b * floor((a + 0.5 * b) / b)); } float look_round_n_directions(float a, int n) { float b = positive_angle(a); float div = TWO_PI / float(n); float c = roundTo(b, div); return look_upwards(c); } float applyAlignOption(float rawAngle, float delta) { return (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal rawAngle; // otherwise return back raw input angle } bool isAxisTitle = (axis.x == 0.0) && (axis.y == 0.0) && (axis.z == 0.0); void main() { //Compute world offset float axisDistance = position.z; vec3 dataPosition = axisDistance * axis + offset; float beta = angle; // i.e. user defined attributes for each tick float axisAngle; float clipAngle; float flip; if (enableAlign) { axisAngle = (isAxisTitle) ? HALF_PI : computeViewAngle(dataPosition, dataPosition + axis); clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir); axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0; clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0; flip = (dot(vec2(cos(axisAngle), sin(axisAngle)), vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0; beta += applyAlignOption(clipAngle, flip * PI); } //Compute plane offset vec2 planeCoord = position.xy * pixelScale; mat2 planeXform = scale * mat2( cos(beta), sin(beta), -sin(beta), cos(beta) ); vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution; //Compute clip position vec3 clipPosition = project(dataPosition); //Apply text offset in clip coordinates clipPosition += vec3(viewOffset, 0.0); //Done gl_Position = vec4(clipPosition, 1.0); }`]),u=r([`precision highp float; #define GLSLIFY 1 uniform vec4 color; void main() { gl_FragColor = color; }`]);p.f=function(w){return s(w,c,u,null,[{name:"position",type:"vec3"}])};var g=r([`precision highp float; #define GLSLIFY 1 attribute vec3 position; attribute vec3 normal; uniform mat4 model, view, projection; uniform vec3 enable; uniform vec3 bounds[2]; varying vec3 colorChannel; void main() { vec3 signAxis = sign(bounds[1] - bounds[0]); vec3 realNormal = signAxis * normal; if(dot(realNormal, enable) > 0.0) { vec3 minRange = min(bounds[0], bounds[1]); vec3 maxRange = max(bounds[0], bounds[1]); vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0)); gl_Position = projection * view * model * vec4(nPosition, 1.0); } else { gl_Position = vec4(0,0,0,0); } colorChannel = abs(realNormal); }`]),f=r([`precision highp float; #define GLSLIFY 1 uniform vec4 colors[3]; varying vec3 colorChannel; void main() { gl_FragColor = colorChannel.x * colors[0] + colorChannel.y * colors[1] + colorChannel.z * colors[2]; }`]);p.bg=function(w){return s(w,g,f,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},9557:function(v,p,t){v.exports=d;var r=t(5827),s=t(2944),n=t(875),l=t(1943).f,c=window||m.global||{},u=c.__TEXT_CACHE||{};c.__TEXT_CACHE={};var g=3;function f(M,T,C,x){this.gl=M,this.shader=T,this.buffer=C,this.vao=x,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var w=f.prototype,h=[0,0];w.bind=function(M,T,C,x){this.vao.bind(),this.shader.bind();var S=this.shader.uniforms;S.model=M,S.view=T,S.projection=C,S.pixelScale=x,h[0]=this.gl.drawingBufferWidth,h[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=h},w.unbind=function(){this.vao.unbind()},w.update=function(M,T,C,x,S){var b=[];function a(_,U,Y,J,te,ae){var ce=u[Y];ce||(ce=u[Y]={});var Q=ce[U];Q||(Q=ce[U]=o(U,{triangles:!0,font:Y,textAlign:"center",textBaseline:"middle",lineSpacing:te,styletags:ae}));for(var Z=(J||12)/12,j=Q.positions,K=Q.cells,ee=0,oe=K.length;ee=0;--$){var le=j[q[$]];b.push(Z*le[0],-Z*le[1],_)}}for(var E=[0,0,0],y=[0,0,0],z=[0,0,0],I=[0,0,0],B=1.25,k={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},O=0;O<3;++O){z[O]=b.length/g|0,a(.5*(M[0][O]+M[1][O]),T[O],C[O],12,B,k),I[O]=(b.length/g|0)-z[O],E[O]=b.length/g|0;for(var N=0;N=0&&(g=c.length-u-1);var f=Math.pow(10,g),w=Math.round(n*l*f),h=w+"";if(h.indexOf("e")>=0)return h;var o=w/f,d=w%f;w<0?(o=-Math.ceil(o)|0,d=-d|0):(o=Math.floor(o)|0,d=d|0);var M=""+o;if(w<0&&(M="-"+M),g){for(var T=""+d;T.length=n[0][u];--f)g.push({x:f*l[u],text:t(l[u],f)});c.push(g)}return c}function s(n,l){for(var c=0;c<3;++c){if(n[c].length!==l[c].length)return!1;for(var u=0;uM)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return o.bufferSubData(d,x,C),M}function f(o,d){for(var M=r.malloc(o.length,d),T=o.length,C=0;C=0;--T){if(d[T]!==M)return!1;M*=o[T]}return!0}u.update=function(o,d){if(typeof d!="number"&&(d=-1),this.bind(),typeof o=="object"&&typeof o.shape<"u"){var M=o.dtype;if(l.indexOf(M)<0&&(M="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var T=gl.getExtension("OES_element_index_uint");T&&M!=="uint16"?M="uint32":M="uint16"}if(M===o.dtype&&w(o.shape,o.stride))o.offset===0&&o.data.length===o.shape[0]?this.length=g(this.gl,this.type,this.length,this.usage,o.data,d):this.length=g(this.gl,this.type,this.length,this.usage,o.data.subarray(o.offset,o.shape[0]),d);else{var C=r.malloc(o.size,M),x=n(C,o.shape);s.assign(x,o),d<0?this.length=g(this.gl,this.type,this.length,this.usage,C,d):this.length=g(this.gl,this.type,this.length,this.usage,C.subarray(0,o.size),d),r.free(C)}}else if(Array.isArray(o)){var S;this.type===this.gl.ELEMENT_ARRAY_BUFFER?S=f(o,"uint16"):S=f(o,"float32"),d<0?this.length=g(this.gl,this.type,this.length,this.usage,S,d):this.length=g(this.gl,this.type,this.length,this.usage,S.subarray(0,o.length),d),r.free(S)}else if(typeof o=="object"&&typeof o.length=="number")this.length=g(this.gl,this.type,this.length,this.usage,o,d);else if(typeof o=="number"||o===void 0){if(d>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");o=o|0,o<=0&&(o=1),this.gl.bufferData(this.type,o|0,this.usage),this.length=o}else throw new Error("gl-buffer: Invalid data type")};function h(o,d,M,T){if(M=M||o.ARRAY_BUFFER,T=T||o.DYNAMIC_DRAW,M!==o.ARRAY_BUFFER&&M!==o.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(T!==o.DYNAMIC_DRAW&&T!==o.STATIC_DRAW&&T!==o.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 C=o.createBuffer(),x=new c(o,M,C,0,T);return x.update(d),x}v.exports=h},1140:function(v,p,t){var r=t(2858);v.exports=function(n,l){var c=n.positions,u=n.vectors,g={positions:[],vertexIntensity:[],vertexIntensityBounds:n.vertexIntensityBounds,vectors:[],cells:[],coneOffset:n.coneOffset,colormap:n.colormap};if(n.positions.length===0)return l&&(l[0]=[0,0,0],l[1]=[0,0,0]),g;for(var f=0,w=1/0,h=-1/0,o=1/0,d=-1/0,M=1/0,T=-1/0,C=null,x=null,S=[],b=1/0,a=!1,E=0;Ef&&(f=r.length(z)),E){var I=2*r.distance(C,y)/(r.length(x)+r.length(z));I?(b=Math.min(b,I),a=!1):a=!0}a||(C=y,x=z),S.push(z)}var B=[w,o,M],k=[h,d,T];l&&(l[0]=B,l[1]=k),f===0&&(f=1);var O=1/f;isFinite(b)||(b=1),g.vectorScale=b;var N=n.coneSize||.5;n.absoluteConeSize&&(N=n.absoluteConeSize*O),g.coneScale=N;for(var E=0,_=0;E=1},o.isTransparent=function(){return this.opacity<1},o.pickSlots=1,o.setPickBase=function(S){this.pickId=S};function d(S){for(var b=f({colormap:S,nshades:256,format:"rgba"}),a=new Uint8Array(256*4),E=0;E<256;++E){for(var y=b[E],z=0;z<3;++z)a[4*E+z]=y[z];a[4*E+3]=y[3]*255}return g(a,[256,256,4],[4,0,1])}function M(S){for(var b=S.length,a=new Array(b),E=0;E0){var U=this.triShader;U.bind(),U.uniforms=B,this.triangleVAO.bind(),b.drawArrays(b.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},o.drawPick=function(S){S=S||{};for(var b=this.gl,a=S.model||w,E=S.view||w,y=S.projection||w,z=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],I=0;I<3;++I)z[0][I]=Math.max(z[0][I],this.clipBounds[0][I]),z[1][I]=Math.min(z[1][I],this.clipBounds[1][I]);this._model=[].slice.call(a),this._view=[].slice.call(E),this._projection=[].slice.call(y),this._resolution=[b.drawingBufferWidth,b.drawingBufferHeight];var B={model:a,view:E,projection:y,clipBounds:z,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},k=this.pickShader;k.bind(),k.uniforms=B,this.triangleCount>0&&(this.triangleVAO.bind(),b.drawArrays(b.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},o.pick=function(S){if(!S||S.id!==this.pickId)return null;var b=S.value[0]+256*S.value[1]+65536*S.value[2],a=this.cells[b],E=this.positions[a[1]].slice(0,3),y={position:E,dataCoordinate:E,index:Math.floor(a[1]/48)};return this.traceType==="cone"?y.index=Math.floor(a[1]/48):this.traceType==="streamtube"&&(y.intensity=this.intensity[a[1]],y.velocity=this.vectors[a[1]].slice(0,3),y.divergence=this.vectors[a[1]][3],y.index=b),y},o.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()};function T(S,b){var a=r(S,b.meshShader.vertex,b.meshShader.fragment,null,b.meshShader.attributes);return a.attributes.position.location=0,a.attributes.color.location=2,a.attributes.uv.location=3,a.attributes.vector.location=4,a}function C(S,b){var a=r(S,b.pickShader.vertex,b.pickShader.fragment,null,b.pickShader.attributes);return a.attributes.position.location=0,a.attributes.id.location=1,a.attributes.vector.location=4,a}function x(S,b,a){var E=a.shaders;arguments.length===1&&(b=S,S=b.gl);var y=T(S,E),z=C(S,E),I=l(S,g(new Uint8Array([255,255,255,255]),[1,1,4]));I.generateMipmap(),I.minFilter=S.LINEAR_MIPMAP_LINEAR,I.magFilter=S.LINEAR;var B=s(S),k=s(S),O=s(S),N=s(S),_=s(S),U=n(S,[{buffer:B,type:S.FLOAT,size:4},{buffer:_,type:S.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:O,type:S.FLOAT,size:4},{buffer:N,type:S.FLOAT,size:2},{buffer:k,type:S.FLOAT,size:4}]),Y=new h(S,I,y,z,B,k,_,O,N,U,a.traceType||"cone");return Y.update(b),Y}v.exports=x},7234:function(v,p,t){var r=t(6832),s=r([`precision highp float; precision highp float; #define GLSLIFY 1 vec3 getOrthogonalVector(vec3 v) { // Return up-vector for only-z vector. // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0). // From the above if-statement we have ||a|| > 0 U ||b|| > 0. // Assign z = 0, x = -b, y = a: // a*-b + b*a + c*0 = -ba + ba + 0 = 0 if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { return normalize(vec3(-v.y, v.x, 0.0)); } else { return normalize(vec3(0.0, v.z, -v.y)); } } // Calculate the cone vertex and normal at the given index. // // The returned vertex is for a cone with its top at origin and height of 1.0, // pointing in the direction of the vector attribute. // // Each cone is made up of a top vertex, a center base vertex and base perimeter vertices. // These vertices are used to make up the triangles of the cone by the following: // segment + 0 top vertex // segment + 1 perimeter vertex a+1 // segment + 2 perimeter vertex a // segment + 3 center base vertex // segment + 4 perimeter vertex a // segment + 5 perimeter vertex a+1 // Where segment is the number of the radial segment * 6 and a is the angle at that radial segment. // To go from index to segment, floor(index / 6) // To go from segment to angle, 2*pi * (segment/segmentCount) // To go from index to segment index, index - (segment*6) // vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) { const float segmentCount = 8.0; float index = rawIndex - floor(rawIndex / (segmentCount * 6.0)) * (segmentCount * 6.0); float segment = floor(0.001 + index/6.0); float segmentIndex = index - (segment*6.0); normal = -normalize(d); if (segmentIndex > 2.99 && segmentIndex < 3.01) { return mix(vec3(0.0), -d, coneOffset); } float nextAngle = ( (segmentIndex > 0.99 && segmentIndex < 1.01) || (segmentIndex > 4.99 && segmentIndex < 5.01) ) ? 1.0 : 0.0; float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount); vec3 v1 = mix(d, vec3(0.0), coneOffset); vec3 v2 = v1 - d; vec3 u = getOrthogonalVector(d); vec3 v = normalize(cross(u, d)); vec3 x = u * cos(angle) * length(d)*0.25; vec3 y = v * sin(angle) * length(d)*0.25; vec3 v3 = v2 + x + y; if (segmentIndex < 3.0) { vec3 tx = u * sin(angle); vec3 ty = v * -cos(angle); vec3 tangent = tx + ty; normal = normalize(cross(v3 - v1, tangent)); } if (segmentIndex == 0.0) { return mix(d, vec3(0.0), coneOffset); } return v3; } attribute vec3 vector; attribute vec4 color, position; attribute vec2 uv; uniform float vectorScale, coneScale, coneOffset; uniform mat4 model, view, projection, inverseModel; uniform vec3 eyePosition, lightPosition; varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; varying vec4 f_color; varying vec2 f_uv; void main() { // Scale the vector magnitude to stay constant with // model & view changes. vec3 normal; vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal); vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); //Lighting geometry parameters vec4 cameraCoordinate = view * conePosition; cameraCoordinate.xyz /= cameraCoordinate.w; f_lightDirection = lightPosition - cameraCoordinate.xyz; f_eyeDirection = eyePosition - cameraCoordinate.xyz; f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); // vec4 m_position = model * vec4(conePosition, 1.0); vec4 t_position = view * conePosition; gl_Position = projection * t_position; f_color = color; f_data = conePosition.xyz; f_position = position.xyz; f_uv = uv; } `]),n=r([`#extension GL_OES_standard_derivatives : enable precision highp float; #define GLSLIFY 1 float beckmannDistribution(float x, float roughness) { float NdotH = max(x, 0.0001); float cos2Alpha = NdotH * NdotH; float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; float roughness2 = roughness * roughness; float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; return exp(tan2Alpha / roughness2) / denom; } float cookTorranceSpecular( vec3 lightDirection, vec3 viewDirection, vec3 surfaceNormal, float roughness, float fresnel) { float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); //Half angle vector vec3 H = normalize(lightDirection + viewDirection); //Geometric term float NdotH = max(dot(surfaceNormal, H), 0.0); float VdotH = max(dot(viewDirection, H), 0.000001); float LdotH = max(dot(lightDirection, H), 0.000001); float G1 = (2.0 * NdotH * VdotN) / VdotH; float G2 = (2.0 * NdotH * LdotN) / LdotH; float G = min(1.0, min(G1, G2)); //Distribution term float D = beckmannDistribution(NdotH, roughness); //Fresnel term float F = pow(1.0 - VdotN, fresnel); //Multiply terms and done return G * F * D / max(3.14159265 * VdotN, 0.000001); } bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; uniform sampler2D texture; varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; varying vec4 f_color; varying vec2 f_uv; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; vec3 N = normalize(f_normal); vec3 L = normalize(f_lightDirection); vec3 V = normalize(f_eyeDirection); if(gl_FrontFacing) { N = -N; } float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); vec4 surfaceColor = f_color * texture2D(texture, f_uv); vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); gl_FragColor = litColor * opacity; } `]),l=r([`precision highp float; precision highp float; #define GLSLIFY 1 vec3 getOrthogonalVector(vec3 v) { // Return up-vector for only-z vector. // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0). // From the above if-statement we have ||a|| > 0 U ||b|| > 0. // Assign z = 0, x = -b, y = a: // a*-b + b*a + c*0 = -ba + ba + 0 = 0 if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { return normalize(vec3(-v.y, v.x, 0.0)); } else { return normalize(vec3(0.0, v.z, -v.y)); } } // Calculate the cone vertex and normal at the given index. // // The returned vertex is for a cone with its top at origin and height of 1.0, // pointing in the direction of the vector attribute. // // Each cone is made up of a top vertex, a center base vertex and base perimeter vertices. // These vertices are used to make up the triangles of the cone by the following: // segment + 0 top vertex // segment + 1 perimeter vertex a+1 // segment + 2 perimeter vertex a // segment + 3 center base vertex // segment + 4 perimeter vertex a // segment + 5 perimeter vertex a+1 // Where segment is the number of the radial segment * 6 and a is the angle at that radial segment. // To go from index to segment, floor(index / 6) // To go from segment to angle, 2*pi * (segment/segmentCount) // To go from index to segment index, index - (segment*6) // vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) { const float segmentCount = 8.0; float index = rawIndex - floor(rawIndex / (segmentCount * 6.0)) * (segmentCount * 6.0); float segment = floor(0.001 + index/6.0); float segmentIndex = index - (segment*6.0); normal = -normalize(d); if (segmentIndex > 2.99 && segmentIndex < 3.01) { return mix(vec3(0.0), -d, coneOffset); } float nextAngle = ( (segmentIndex > 0.99 && segmentIndex < 1.01) || (segmentIndex > 4.99 && segmentIndex < 5.01) ) ? 1.0 : 0.0; float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount); vec3 v1 = mix(d, vec3(0.0), coneOffset); vec3 v2 = v1 - d; vec3 u = getOrthogonalVector(d); vec3 v = normalize(cross(u, d)); vec3 x = u * cos(angle) * length(d)*0.25; vec3 y = v * sin(angle) * length(d)*0.25; vec3 v3 = v2 + x + y; if (segmentIndex < 3.0) { vec3 tx = u * sin(angle); vec3 ty = v * -cos(angle); vec3 tangent = tx + ty; normal = normalize(cross(v3 - v1, tangent)); } if (segmentIndex == 0.0) { return mix(d, vec3(0.0), coneOffset); } return v3; } attribute vec4 vector; attribute vec4 position; attribute vec4 id; uniform mat4 model, view, projection; uniform float vectorScale, coneScale, coneOffset; varying vec3 f_position; varying vec4 f_id; void main() { vec3 normal; vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal); vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); gl_Position = projection * view * conePosition; f_id = id; f_position = position.xyz; } `]),c=r([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float pickId; varying vec3 f_position; varying vec4 f_id; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); }`]);p.meshShader={vertex:s,fragment:n,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},p.pickShader={vertex:l,fragment:c,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},1950:function(v){v.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(v,p,t){var r=t(1950);v.exports=function(n){return r[n]}},3110:function(v,p,t){v.exports=h;var r=t(5827),s=t(2944),n=t(7667),l=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function c(o,d,M,T){this.gl=o,this.shader=T,this.buffer=d,this.vao=M,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=c.prototype;u.isOpaque=function(){return!this.hasAlpha},u.isTransparent=function(){return this.hasAlpha},u.drawTransparent=u.draw=function(o){var d=this.gl,M=this.shader.uniforms;this.shader.bind();var T=M.view=o.view||l,C=M.projection=o.projection||l;M.model=o.model||l,M.clipBounds=this.clipBounds,M.opacity=this.opacity;var x=T[12],S=T[13],b=T[14],a=T[15],E=o._ortho||!1,y=E?2:1,z=y*this.pixelRatio*(C[3]*x+C[7]*S+C[11]*b+C[15]*a)/d.drawingBufferHeight;this.vao.bind();for(var I=0;I<3;++I)d.lineWidth(this.lineWidth[I]*this.pixelRatio),M.capSize=this.capSize[I]*z,this.lineCount[I]&&d.drawArrays(d.LINES,this.lineOffset[I],this.lineCount[I]);this.vao.unbind()};function g(o,d){for(var M=0;M<3;++M)o[0][M]=Math.min(o[0][M],d[M]),o[1][M]=Math.max(o[1][M],d[M])}var f=function(){for(var o=new Array(3),d=0;d<3;++d){for(var M=[],T=1;T<=2;++T)for(var C=-1;C<=1;C+=2){var x=(T+d)%3,S=[0,0,0];S[x]=C,M.push(S)}o[d]=M}return o}();function w(o,d,M,T){for(var C=f[T],x=0;x0){var B=E.slice();B[b]+=z[1][b],C.push(E[0],E[1],E[2],I[0],I[1],I[2],I[3],0,0,0,B[0],B[1],B[2],I[0],I[1],I[2],I[3],0,0,0),g(this.bounds,B),S+=2+w(C,B,I,b)}}}this.lineCount[b]=S-this.lineOffset[b]}this.buffer.update(C)}},u.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function h(o){var d=o.gl,M=r(d),T=s(d,[{buffer:M,type:d.FLOAT,size:3,offset:0,stride:40},{buffer:M,type:d.FLOAT,size:4,offset:12,stride:40},{buffer:M,type:d.FLOAT,size:3,offset:28,stride:40}]),C=n(d);C.attributes.position.location=0,C.attributes.color.location=1,C.attributes.offset.location=2;var x=new c(d,M,T,C);return x.update(o),x}},7667:function(v,p,t){var r=t(6832),s=t(5158),n=r([`precision highp float; #define GLSLIFY 1 attribute vec3 position, offset; attribute vec4 color; uniform mat4 model, view, projection; uniform float capSize; varying vec4 fragColor; varying vec3 fragPosition; void main() { vec4 worldPosition = model * vec4(position, 1.0); worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0); gl_Position = projection * view * worldPosition; fragColor = color; fragPosition = position; }`]),l=r([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float opacity; varying vec3 fragPosition; varying vec4 fragColor; void main() { if ( outOfRange(clipBounds[0], clipBounds[1], fragPosition) || fragColor.a * opacity == 0. ) discard; gl_FragColor = opacity * fragColor; }`]);v.exports=function(c){return s(c,n,l,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},4234:function(v,p,t){var r=t(8931);v.exports=S;var s=null,n,l,c,u;function g(b){var a=b.getParameter(b.FRAMEBUFFER_BINDING),E=b.getParameter(b.RENDERBUFFER_BINDING),y=b.getParameter(b.TEXTURE_BINDING_2D);return[a,E,y]}function f(b,a){b.bindFramebuffer(b.FRAMEBUFFER,a[0]),b.bindRenderbuffer(b.RENDERBUFFER,a[1]),b.bindTexture(b.TEXTURE_2D,a[2])}function w(b,a){var E=b.getParameter(a.MAX_COLOR_ATTACHMENTS_WEBGL);s=new Array(E+1);for(var y=0;y<=E;++y){for(var z=new Array(E),I=0;I1&&k.drawBuffersWEBGL(s[B]);var Y=E.getExtension("WEBGL_depth_texture");Y?O?b.depth=o(E,z,I,Y.UNSIGNED_INT_24_8_WEBGL,E.DEPTH_STENCIL,E.DEPTH_STENCIL_ATTACHMENT):N&&(b.depth=o(E,z,I,E.UNSIGNED_SHORT,E.DEPTH_COMPONENT,E.DEPTH_ATTACHMENT)):N&&O?b._depth_rb=d(E,z,I,E.DEPTH_STENCIL,E.DEPTH_STENCIL_ATTACHMENT):N?b._depth_rb=d(E,z,I,E.DEPTH_COMPONENT16,E.DEPTH_ATTACHMENT):O&&(b._depth_rb=d(E,z,I,E.STENCIL_INDEX,E.STENCIL_ATTACHMENT));var J=E.checkFramebufferStatus(E.FRAMEBUFFER);if(J!==E.FRAMEBUFFER_COMPLETE){b._destroyed=!0,E.bindFramebuffer(E.FRAMEBUFFER,null),E.deleteFramebuffer(b.handle),b.handle=null,b.depth&&(b.depth.dispose(),b.depth=null),b._depth_rb&&(E.deleteRenderbuffer(b._depth_rb),b._depth_rb=null);for(var U=0;Uz||E<0||E>z)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");b._shape[0]=a,b._shape[1]=E;for(var I=g(y),B=0;BI||E<0||E>I)throw new Error("gl-fbo: Parameters are too large for FBO");y=y||{};var B=1;if("color"in y){if(B=Math.max(y.color|0,0),B<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(B>1)if(z){if(B>b.getParameter(z.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+B+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var k=b.UNSIGNED_BYTE,O=b.getExtension("OES_texture_float");if(y.float&&B>0){if(!O)throw new Error("gl-fbo: Context does not support floating point textures");k=b.FLOAT}else y.preferFloat&&B>0&&O&&(k=b.FLOAT);var N=!0;"depth"in y&&(N=!!y.depth);var _=!1;return"stencil"in y&&(_=!!y.stencil),new T(b,a,E,k,B,N,_,z)}},3530:function(v,p,t){var r=t(8974).sprintf,s=t(6603),n=t(9365),l=t(8008);v.exports=c;function c(u,g,f){var w=n(g)||"of unknown name (see npm glsl-shader-name)",h="unknown type";f!==void 0&&(h=f===s.FRAGMENT_SHADER?"fragment":"vertex");for(var o=r(`Error compiling %s shader %s: `,h,w),d=r("%s%s",o,u),M=u.split(` `),T={},C=0;C>B*8&255;this.pickOffset=M,C.bind();var k=C.uniforms;k.viewTransform=o,k.pickOffset=d,k.shape=this.shape;var O=C.attributes;return this.positionBuffer.bind(),O.position.pointer(),this.weightBuffer.bind(),O.weight.pointer(b.UNSIGNED_BYTE,!1),this.idBuffer.bind(),O.pickId.pointer(b.UNSIGNED_BYTE,!1),b.drawArrays(b.TRIANGLES,0,S),M+this.shape[0]*this.shape[1]}}}(),f.pick=function(o,d,M){var T=this.pickOffset,C=this.shape[0]*this.shape[1];if(M=T+C)return null;var x=M-T,S=this.xData,b=this.yData;return{object:this,pointId:x,dataCoord:[S[x%this.shape[0]],b[x/this.shape[0]|0]]}},f.update=function(o){o=o||{};var d=o.shape||[0,0],M=o.x||s(d[0]),T=o.y||s(d[1]),C=o.z||new Float32Array(d[0]*d[1]),x=o.zsmooth!==!1;this.xData=M,this.yData=T;var S=o.colorLevels||[0],b=o.colorValues||[0,0,0,1],a=S.length,E=this.bounds,y,z,I,B;x?(y=E[0]=M[0],z=E[1]=T[0],I=E[2]=M[M.length-1],B=E[3]=T[T.length-1]):(y=E[0]=M[0]+(M[1]-M[0])/2,z=E[1]=T[0]+(T[1]-T[0])/2,I=E[2]=M[M.length-1]+(M[M.length-1]-M[M.length-2])/2,B=E[3]=T[T.length-1]+(T[T.length-1]-T[T.length-2])/2);var k=1/(I-y),O=1/(B-z),N=d[0],_=d[1];this.shape=[N,_];var U=(x?(N-1)*(_-1):N*_)*(w.length>>>1);this.numVertices=U;for(var Y=n.mallocUint8(U*4),J=n.mallocFloat32(U*2),te=n.mallocUint8(U*2),ae=n.mallocUint32(U),ce=0,Q=x?N-1:N,Z=x?_-1:_,j=0;j max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform sampler2D dashTexture; uniform float dashScale; uniform float opacity; varying vec3 worldPosition; varying float pixelArcLength; varying vec4 fragColor; void main() { if ( outOfRange(clipBounds[0], clipBounds[1], worldPosition) || fragColor.a * opacity == 0. ) discard; float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r; if(dashWeight < 0.5) { discard; } gl_FragColor = fragColor * opacity; } `]),c=r([`precision highp float; #define GLSLIFY 1 #define FLOAT_MAX 1.70141184e38 #define FLOAT_MIN 1.17549435e-38 // https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl vec4 packFloat(float v) { float av = abs(v); //Handle special cases if(av < FLOAT_MIN) { return vec4(0.0, 0.0, 0.0, 0.0); } else if(v > FLOAT_MAX) { return vec4(127.0, 128.0, 0.0, 0.0) / 255.0; } else if(v < -FLOAT_MAX) { return vec4(255.0, 128.0, 0.0, 0.0) / 255.0; } vec4 c = vec4(0,0,0,0); //Compute exponent and mantissa float e = floor(log2(av)); float m = av * pow(2.0, -e) - 1.0; //Unpack mantissa c[1] = floor(128.0 * m); m -= c[1] / 128.0; c[2] = floor(32768.0 * m); m -= c[2] / 32768.0; c[3] = floor(8388608.0 * m); //Unpack exponent float ebias = e + 127.0; c[0] = floor(ebias / 2.0); ebias -= c[0] * 2.0; c[1] += floor(ebias) * 128.0; //Unpack sign bit c[0] += 128.0 * step(0.0, -v); //Scale back to range return c / 255.0; } bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform float pickId; uniform vec3 clipBounds[2]; varying vec3 worldPosition; varying float pixelArcLength; varying vec4 fragColor; void main() { if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard; gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz); }`]),u=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];p.createShader=function(g){return s(g,n,l,null,u)},p.createPickShader=function(g){return s(g,n,c,null,u)}},6086:function(v,p,t){v.exports=b;var r=t(5827),s=t(2944),n=t(8931),l=new Uint8Array(4),c=new Float32Array(l.buffer);function u(a,E,y,z){return l[0]=z,l[1]=y,l[2]=E,l[3]=a,c[0]}var g=t(5070),f=t(5050),w=t(248),h=w.createShader,o=w.createPickShader,d=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function M(a,E){for(var y=0,z=0;z<3;++z){var I=a[z]-E[z];y+=I*I}return Math.sqrt(y)}function T(a){for(var E=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],y=0;y<3;++y)E[0][y]=Math.max(a[0][y],E[0][y]),E[1][y]=Math.min(a[1][y],E[1][y]);return E}function C(a,E,y,z){this.arcLength=a,this.position=E,this.index=y,this.dataCoordinate=z}function x(a,E,y,z,I,B){this.gl=a,this.shader=E,this.pickShader=y,this.buffer=z,this.vao=I,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=B,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var S=x.prototype;S.isTransparent=function(){return this.hasAlpha},S.isOpaque=function(){return!this.hasAlpha},S.pickSlots=1,S.setPickBase=function(a){this.pickId=a},S.drawTransparent=S.draw=function(a){if(this.vertexCount){var E=this.gl,y=this.shader,z=this.vao;y.bind(),y.uniforms={model:a.model||d,view:a.view||d,projection:a.projection||d,clipBounds:T(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[E.drawingBufferWidth,E.drawingBufferHeight],pixelRatio:this.pixelRatio},z.bind(),z.draw(E.TRIANGLE_STRIP,this.vertexCount),z.unbind()}},S.drawPick=function(a){if(this.vertexCount){var E=this.gl,y=this.pickShader,z=this.vao;y.bind(),y.uniforms={model:a.model||d,view:a.view||d,projection:a.projection||d,pickId:this.pickId,clipBounds:T(this.clipBounds),screenShape:[E.drawingBufferWidth,E.drawingBufferHeight],pixelRatio:this.pixelRatio},z.bind(),z.draw(E.TRIANGLE_STRIP,this.vertexCount),z.unbind()}},S.update=function(a){var E,y;this.dirty=!0;var z=!!a.connectGaps;"dashScale"in a&&(this.dashScale=a.dashScale),this.hasAlpha=!1,"opacity"in a&&(this.opacity=+a.opacity,this.opacity<1&&(this.hasAlpha=!0));var I=[],B=[],k=[],O=0,N=0,_=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],U=a.position||a.positions;if(U){var Y=a.color||a.colors||[0,0,0,1],J=a.lineWidth||1,te=!1;e:for(E=1;E0){for(var Q=0;Q<24;++Q)I.push(I[I.length-12]);N+=2,te=!0}continue e}_[0][y]=Math.min(_[0][y],ae[y],ce[y]),_[1][y]=Math.max(_[1][y],ae[y],ce[y])}var Z,j;Array.isArray(Y[0])?(Z=Y.length>E-1?Y[E-1]:Y.length>0?Y[Y.length-1]:[0,0,0,1],j=Y.length>E?Y[E]:Y.length>0?Y[Y.length-1]:[0,0,0,1]):Z=j=Y,Z.length===3&&(Z=[Z[0],Z[1],Z[2],1]),j.length===3&&(j=[j[0],j[1],j[2],1]),!this.hasAlpha&&Z[3]<1&&(this.hasAlpha=!0);var K;Array.isArray(J)?K=J.length>E-1?J[E-1]:J.length>0?J[J.length-1]:[0,0,0,1]:K=J;var ee=O;if(O+=M(ae,ce),te){for(y=0;y<2;++y)I.push(ae[0],ae[1],ae[2],ce[0],ce[1],ce[2],ee,K,Z[0],Z[1],Z[2],Z[3]);N+=2,te=!1}I.push(ae[0],ae[1],ae[2],ce[0],ce[1],ce[2],ee,K,Z[0],Z[1],Z[2],Z[3],ae[0],ae[1],ae[2],ce[0],ce[1],ce[2],ee,-K,Z[0],Z[1],Z[2],Z[3],ce[0],ce[1],ce[2],ae[0],ae[1],ae[2],O,-K,j[0],j[1],j[2],j[3],ce[0],ce[1],ce[2],ae[0],ae[1],ae[2],O,K,j[0],j[1],j[2],j[3]),N+=4}}if(this.buffer.update(I),B.push(O),k.push(U[U.length-1].slice()),this.bounds=_,this.vertexCount=N,this.points=k,this.arcLength=B,"dashes"in a){var oe=a.dashes,q=oe.slice();for(q.unshift(0),E=1;E1.0001)return null;y+=E[C]}return Math.abs(y-1)>.001?null:[x,u(f,E),E]}},2056:function(v,p,t){var r=t(6832),s=r([`precision highp float; #define GLSLIFY 1 attribute vec3 position, normal; attribute vec4 color; attribute vec2 uv; uniform mat4 model , view , projection , inverseModel; uniform vec3 eyePosition , lightPosition; varying vec3 f_normal , f_lightDirection , f_eyeDirection , f_data; varying vec4 f_color; varying vec2 f_uv; vec4 project(vec3 p) { return projection * view * model * vec4(p, 1.0); } void main() { gl_Position = project(position); //Lighting geometry parameters vec4 cameraCoordinate = view * vec4(position , 1.0); cameraCoordinate.xyz /= cameraCoordinate.w; f_lightDirection = lightPosition - cameraCoordinate.xyz; f_eyeDirection = eyePosition - cameraCoordinate.xyz; f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); f_color = color; f_data = position; f_uv = uv; } `]),n=r([`#extension GL_OES_standard_derivatives : enable precision highp float; #define GLSLIFY 1 float beckmannDistribution(float x, float roughness) { float NdotH = max(x, 0.0001); float cos2Alpha = NdotH * NdotH; float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; float roughness2 = roughness * roughness; float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; return exp(tan2Alpha / roughness2) / denom; } float cookTorranceSpecular( vec3 lightDirection, vec3 viewDirection, vec3 surfaceNormal, float roughness, float fresnel) { float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); //Half angle vector vec3 H = normalize(lightDirection + viewDirection); //Geometric term float NdotH = max(dot(surfaceNormal, H), 0.0); float VdotH = max(dot(viewDirection, H), 0.000001); float LdotH = max(dot(lightDirection, H), 0.000001); float G1 = (2.0 * NdotH * VdotN) / VdotH; float G2 = (2.0 * NdotH * LdotN) / LdotH; float G = min(1.0, min(G1, G2)); //Distribution term float D = beckmannDistribution(NdotH, roughness); //Fresnel term float F = pow(1.0 - VdotN, fresnel); //Multiply terms and done return G * F * D / max(3.14159265 * VdotN, 0.000001); } //#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float roughness , fresnel , kambient , kdiffuse , kspecular; uniform sampler2D texture; varying vec3 f_normal , f_lightDirection , f_eyeDirection , f_data; varying vec4 f_color; varying vec2 f_uv; void main() { if (f_color.a == 0.0 || outOfRange(clipBounds[0], clipBounds[1], f_data) ) discard; vec3 N = normalize(f_normal); vec3 L = normalize(f_lightDirection); vec3 V = normalize(f_eyeDirection); if(gl_FrontFacing) { N = -N; } float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv); vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); gl_FragColor = litColor * f_color.a; } `]),l=r([`precision highp float; #define GLSLIFY 1 attribute vec3 position; attribute vec4 color; attribute vec2 uv; uniform mat4 model, view, projection; varying vec4 f_color; varying vec3 f_data; varying vec2 f_uv; void main() { gl_Position = projection * view * model * vec4(position, 1.0); f_color = color; f_data = position; f_uv = uv; }`]),c=r([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform sampler2D texture; uniform float opacity; varying vec4 f_color; varying vec3 f_data; varying vec2 f_uv; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard; gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; }`]),u=r([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute vec4 color; attribute vec2 uv; attribute float pointSize; uniform mat4 model, view, projection; uniform vec3 clipBounds[2]; varying vec4 f_color; varying vec2 f_uv; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0); } else { gl_Position = projection * view * model * vec4(position, 1.0); } gl_PointSize = pointSize; f_color = color; f_uv = uv; }`]),g=r([`precision highp float; #define GLSLIFY 1 uniform sampler2D texture; uniform float opacity; varying vec4 f_color; varying vec2 f_uv; void main() { vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5); if(dot(pointR, pointR) > 0.25) { discard; } gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; }`]),f=r([`precision highp float; #define GLSLIFY 1 attribute vec3 position; attribute vec4 id; uniform mat4 model, view, projection; varying vec3 f_position; varying vec4 f_id; void main() { gl_Position = projection * view * model * vec4(position, 1.0); f_id = id; f_position = position; }`]),w=r([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float pickId; varying vec3 f_position; varying vec4 f_id; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); }`]),h=r([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute float pointSize; attribute vec4 id; uniform mat4 model, view, projection; uniform vec3 clipBounds[2]; varying vec3 f_position; varying vec4 f_id; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0.0, 0.0, 0.0, 0.0); } else { gl_Position = projection * view * model * vec4(position, 1.0); gl_PointSize = pointSize; } f_id = id; f_position = position; }`]),o=r([`precision highp float; #define GLSLIFY 1 attribute vec3 position; uniform mat4 model, view, projection; void main() { gl_Position = projection * view * model * vec4(position, 1.0); }`]),d=r([`precision highp float; #define GLSLIFY 1 uniform vec3 contourColor; void main() { gl_FragColor = vec4(contourColor, 1.0); } `]);p.meshShader={vertex:s,fragment:n,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},p.wireShader={vertex:l,fragment:c,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},p.pointShader={vertex:u,fragment:g,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},p.pickShader={vertex:f,fragment:w,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},p.pointPickShader={vertex:h,fragment:w,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},p.contourShader={vertex:o,fragment:d,attributes:[{name:"position",type:"vec3"}]}},8116:function(v,p,t){var r=1e-6,s=1e-6,n=t(5158),l=t(5827),c=t(2944),u=t(8931),g=t(115),f=t(104),w=t(7437),h=t(5050),o=t(9156),d=t(7212),M=t(5306),T=t(2056),C=t(4340),x=T.meshShader,S=T.wireShader,b=T.pointShader,a=T.pickShader,E=T.pointPickShader,y=T.contourShader,z=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function I(Q,Z,j,K,ee,oe,q,$,le,ie,he,me,Me,Te,Oe,Ne,Ee,xe,Se,Ue,He,Fe,Ge,nt,qe,$e,et){this.gl=Q,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=Z,this.dirty=!0,this.triShader=j,this.lineShader=K,this.pointShader=ee,this.pickShader=oe,this.pointPickShader=q,this.contourShader=$,this.trianglePositions=le,this.triangleColors=he,this.triangleNormals=Me,this.triangleUVs=me,this.triangleIds=ie,this.triangleVAO=Te,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Oe,this.edgeColors=Ee,this.edgeUVs=xe,this.edgeIds=Ne,this.edgeVAO=Se,this.edgeCount=0,this.pointPositions=Ue,this.pointColors=Fe,this.pointUVs=Ge,this.pointSizes=nt,this.pointIds=He,this.pointVAO=qe,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=$e,this.contourVAO=et,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=z,this._view=z,this._projection=z,this._resolution=[1,1]}var B=I.prototype;B.isOpaque=function(){return!this.hasAlpha},B.isTransparent=function(){return this.hasAlpha},B.pickSlots=1,B.setPickBase=function(Q){this.pickId=Q};function k(Q,Z){if(!Z||!Z.length)return 1;for(var j=0;jQ&&j>0){var K=(Z[j][0]-Q)/(Z[j][0]-Z[j-1][0]);return Z[j][1]*(1-K)+K*Z[j-1][1]}}return 1}function O(Q,Z){for(var j=o({colormap:Q,nshades:256,format:"rgba"}),K=new Uint8Array(256*4),ee=0;ee<256;++ee){for(var oe=j[ee],q=0;q<3;++q)K[4*ee+q]=oe[q];Z?K[4*ee+3]=255*k(ee/255,Z):K[4*ee+3]=255*oe[3]}return h(K,[256,256,4],[4,0,1])}function N(Q){for(var Z=Q.length,j=new Array(Z),K=0;K0){var Me=this.triShader;Me.bind(),Me.uniforms=$,this.triangleVAO.bind(),Z.drawArrays(Z.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var Me=this.lineShader;Me.bind(),Me.uniforms=$,this.edgeVAO.bind(),Z.lineWidth(this.lineWidth*this.pixelRatio),Z.drawArrays(Z.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var Me=this.pointShader;Me.bind(),Me.uniforms=$,this.pointVAO.bind(),Z.drawArrays(Z.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var Me=this.contourShader;Me.bind(),Me.uniforms=$,this.contourVAO.bind(),Z.drawArrays(Z.LINES,0,this.contourCount),this.contourVAO.unbind()}},B.drawPick=function(Q){Q=Q||{};for(var Z=this.gl,j=Q.model||z,K=Q.view||z,ee=Q.projection||z,oe=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],q=0;q<3;++q)oe[0][q]=Math.max(oe[0][q],this.clipBounds[0][q]),oe[1][q]=Math.min(oe[1][q],this.clipBounds[1][q]);this._model=[].slice.call(j),this._view=[].slice.call(K),this._projection=[].slice.call(ee),this._resolution=[Z.drawingBufferWidth,Z.drawingBufferHeight];var $={model:j,view:K,projection:ee,clipBounds:oe,pickId:this.pickId/255},le=this.pickShader;if(le.bind(),le.uniforms=$,this.triangleCount>0&&(this.triangleVAO.bind(),Z.drawArrays(Z.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),Z.lineWidth(this.lineWidth*this.pixelRatio),Z.drawArrays(Z.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var le=this.pointPickShader;le.bind(),le.uniforms=$,this.pointVAO.bind(),Z.drawArrays(Z.POINTS,0,this.pointCount),this.pointVAO.unbind()}},B.pick=function(Q){if(!Q||Q.id!==this.pickId)return null;for(var Z=Q.value[0]+256*Q.value[1]+65536*Q.value[2],j=this.cells[Z],K=this.positions,ee=new Array(j.length),oe=0;oex[te]&&(T.uniforms.dataAxis=w,T.uniforms.screenOffset=h,T.uniforms.color=B[d],T.uniforms.angle=k[d],S.drawArrays(S.TRIANGLES,x[te],x[ae]-x[te]))),O[d]&&J&&(h[d^1]-=ce*y*N[d],T.uniforms.dataAxis=o,T.uniforms.screenOffset=h,T.uniforms.color=_[d],T.uniforms.angle=U[d],S.drawArrays(S.TRIANGLES,Y,J)),h[d^1]=ce*b[2+(d^1)]-1,z[d+2]&&(h[d^1]+=ce*y*I[d+2],tex[te]&&(T.uniforms.dataAxis=w,T.uniforms.screenOffset=h,T.uniforms.color=B[d+2],T.uniforms.angle=k[d+2],S.drawArrays(S.TRIANGLES,x[te],x[ae]-x[te]))),O[d+2]&&J&&(h[d^1]+=ce*y*N[d+2],T.uniforms.dataAxis=o,T.uniforms.screenOffset=h,T.uniforms.color=_[d+2],T.uniforms.angle=U[d+2],S.drawArrays(S.TRIANGLES,Y,J))}}(),g.drawTitle=function(){var w=[0,0],h=[0,0];return function(){var o=this.plot,d=this.shader,M=o.gl,T=o.screenBox,C=o.titleCenter,x=o.titleAngle,S=o.titleColor,b=o.pixelRatio;if(this.titleCount){for(var a=0;a<2;++a)h[a]=2*(C[a]*b-T[a])/(T[2+a]-T[a])-1;d.bind(),d.uniforms.dataAxis=w,d.uniforms.screenOffset=h,d.uniforms.angle=x,d.uniforms.color=S,M.drawArrays(M.TRIANGLES,this.titleOffset,this.titleCount)}}}(),g.bind=function(){var w=[0,0],h=[0,0],o=[0,0];return function(){var d=this.plot,M=this.shader,T=d._tickBounds,C=d.dataBox,x=d.screenBox,S=d.viewBox;M.bind();for(var b=0;b<2;++b){var a=T[b],E=T[b+2],y=E-a,z=.5*(C[b+2]+C[b]),I=C[b+2]-C[b],B=S[b],k=S[b+2],O=k-B,N=x[b],_=x[b+2],U=_-N;h[b]=2*y/I*O/U,w[b]=2*(a-z)/I*O/U}o[1]=2*d.pixelRatio/(x[3]-x[1]),o[0]=o[1]*(x[3]-x[1])/(x[2]-x[0]),M.uniforms.dataScale=h,M.uniforms.dataShift=w,M.uniforms.textScale=o,this.vbo.bind(),M.attributes.textCoordinate.pointer()}}(),g.update=function(w){var h=[],o=w.ticks,d=w.bounds,M,T,C,x,S;for(S=0;S<2;++S){var b=[Math.floor(h.length/3)],a=[-1/0],E=o[S];for(M=0;M=0))){var O=d[k]-T[k]*(d[k+2]-d[k])/(T[k+2]-T[k]);k===0?S.drawLine(O,d[1],O,d[3],B[k],I[k]):S.drawLine(d[0],O,d[2],O,B[k],I[k])}}for(var k=0;k=0;--o)this.objects[o].dispose();this.objects.length=0;for(var o=this.overlays.length-1;o>=0;--o)this.overlays[o].dispose();this.overlays.length=0,this.gl=null},g.addObject=function(o){this.objects.indexOf(o)<0&&(this.objects.push(o),this.setDirty())},g.removeObject=function(o){for(var d=this.objects,M=0;MMath.abs(a))o.rotate(z,0,0,-b*E*Math.PI*x.rotateSpeed/window.innerWidth);else if(!x._ortho){var I=-x.zoomSpeed*y*a/window.innerHeight*(z-o.lastT())/20;o.pan(z,0,0,M*(Math.exp(I)-1))}}},!0)},x.enableMouseListeners(),x}},8245:function(v,p,t){var r=t(6832),s=t(5158),n=r([`precision mediump float; #define GLSLIFY 1 attribute vec2 position; varying vec2 uv; void main() { uv = position; gl_Position = vec4(position, 0, 1); }`]),l=r([`precision mediump float; #define GLSLIFY 1 uniform sampler2D accumBuffer; varying vec2 uv; void main() { vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0)); gl_FragColor = min(vec4(1,1,1,1), accum); }`]);v.exports=function(c){return s(c,n,l,null,[{name:"position",type:"vec2"}])}},1059:function(v,p,t){var r=t(4296),s=t(7453),n=t(2771),l=t(6496),c=t(2611),u=t(4234),g=t(8126),f=t(6145),w=t(1120),h=t(5268),o=t(8245),d=t(2321)({tablet:!0,featureDetect:!0});v.exports={createScene:S,createCamera:r};function M(){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 T(a,E){var y=null;try{y=a.getContext("webgl",E),y||(y=a.getContext("experimental-webgl",E))}catch{return null}return y}function C(a){var E=Math.round(Math.log(Math.abs(a))/Math.log(10));if(E<0){var y=Math.round(Math.pow(10,-E));return Math.ceil(a*y)/y}else if(E>0){var y=Math.round(Math.pow(10,E));return Math.ceil(a/y)*y}return Math.ceil(a)}function x(a){return typeof a=="boolean"?a:!0}function S(a){a=a||{},a.camera=a.camera||{};var E=a.canvas;if(!E)if(E=document.createElement("canvas"),a.container){var y=a.container;y.appendChild(E)}else document.body.appendChild(E);var z=a.gl;if(z||(a.glOptions&&(d=!!a.glOptions.preserveDrawingBuffer),z=T(E,a.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:d})),!z)throw new Error("webgl not supported");var I=a.bounds||[[-10,-10,-10],[10,10,10]],B=new M,k=u(z,z.drawingBufferWidth,z.drawingBufferHeight,{preferFloat:!d}),O=o(z),N=a.cameraObject&&a.cameraObject._ortho===!0||a.camera.projection&&a.camera.projection.type==="orthographic"||!1,_={eye:a.camera.eye||[2,0,0],center:a.camera.center||[0,0,0],up:a.camera.up||[0,1,0],zoomMin:a.camera.zoomMax||.1,zoomMax:a.camera.zoomMin||100,mode:a.camera.mode||"turntable",_ortho:N},U=a.axes||{},Y=s(z,U);Y.enable=!U.disable;var J=a.spikes||{},te=l(z,J),ae=[],ce=[],Q=[],Z=[],j=!0,q=!0,K=new Array(16),ee=new Array(16),oe={view:null,projection:K,model:ee,_ortho:!1},q=!0,$=[z.drawingBufferWidth,z.drawingBufferHeight],le=a.cameraObject||r(E,_),ie={gl:z,contextLost:!1,pixelRatio:a.pixelRatio||1,canvas:E,selection:B,camera:le,axes:Y,axesPixels:null,spikes:te,bounds:I,objects:ae,shape:$,aspect:a.aspectRatio||[1,1,1],pickRadius:a.pickRadius||10,zNear:a.zNear||.01,zFar:a.zFar||1e3,fovy:a.fovy||Math.PI/4,clearColor:a.clearColor||[0,0,0,0],autoResize:x(a.autoResize),autoBounds:x(a.autoBounds),autoScale:!!a.autoScale,autoCenter:x(a.autoCenter),clipToBounds:x(a.clipToBounds),snapToData:!!a.snapToData,onselect:a.onselect||null,onrender:a.onrender||null,onclick:a.onclick||null,cameraParams:oe,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(Ue){this.aspect[0]=Ue.x,this.aspect[1]=Ue.y,this.aspect[2]=Ue.z,q=!0},setBounds:function(Ue,He){this.bounds[0][Ue]=He.min,this.bounds[1][Ue]=He.max},setClearColor:function(Ue){this.clearColor=Ue},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)}},he=[z.drawingBufferWidth/ie.pixelRatio|0,z.drawingBufferHeight/ie.pixelRatio|0];function me(){if(!ie._stopped&&ie.autoResize){var Ue=E.parentNode,He=1,Fe=1;Ue&&Ue!==document.body?(He=Ue.clientWidth,Fe=Ue.clientHeight):(He=window.innerWidth,Fe=window.innerHeight);var Ge=Math.ceil(He*ie.pixelRatio)|0,nt=Math.ceil(Fe*ie.pixelRatio)|0;if(Ge!==E.width||nt!==E.height){E.width=Ge,E.height=nt;var qe=E.style;qe.position=qe.position||"absolute",qe.left="0px",qe.top="0px",qe.width=He+"px",qe.height=Fe+"px",j=!0}}}ie.autoResize&&me(),window.addEventListener("resize",me);function Me(){for(var Ue=ae.length,He=Z.length,Fe=0;Fe0&&Q[He-1]===0;)Q.pop(),Z.pop().dispose()}ie.update=function(Ue){ie._stopped||(j=!0,q=!0)},ie.add=function(Ue){ie._stopped||(Ue.axes=Y,ae.push(Ue),ce.push(-1),j=!0,q=!0,Me())},ie.remove=function(Ue){if(!ie._stopped){var He=ae.indexOf(Ue);He<0||(ae.splice(He,1),ce.pop(),j=!0,q=!0,Me())}},ie.dispose=function(){if(!ie._stopped&&(ie._stopped=!0,window.removeEventListener("resize",me),E.removeEventListener("webglcontextlost",Te),ie.mouseListener.enabled=!1,!ie.contextLost)){Y.dispose(),te.dispose();for(var Ue=0;UeB.distance)continue;for(var dt=0;dt 1.0) { discard; } baseColor = mix(borderColor, color, step(radius, centerFraction)); gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a); } } `]),p.pickVertex=r([`precision mediump float; #define GLSLIFY 1 attribute vec2 position; attribute vec4 pickId; uniform mat3 matrix; uniform float pointSize; uniform vec4 pickOffset; varying vec4 fragId; void main() { vec3 hgPosition = matrix * vec3(position, 1); gl_Position = vec4(hgPosition.xy, 0, hgPosition.z); gl_PointSize = pointSize; vec4 id = pickId + pickOffset; id.y += floor(id.x / 256.0); id.x -= floor(id.x / 256.0) * 256.0; id.z += floor(id.y / 256.0); id.y -= floor(id.y / 256.0) * 256.0; id.w += floor(id.z / 256.0); id.z -= floor(id.z / 256.0) * 256.0; fragId = id; } `]),p.pickFragment=r([`precision mediump float; #define GLSLIFY 1 varying vec4 fragId; void main() { float radius = length(2.0 * gl_PointCoord.xy - 1.0); if(radius > 1.0) { discard; } gl_FragColor = fragId / 255.0; } `])},8271:function(v,p,t){var r=t(5158),s=t(5827),n=t(5306),l=t(8023);v.exports=f;function c(w,h,o,d,M){this.plot=w,this.offsetBuffer=h,this.pickBuffer=o,this.shader=d,this.pickShader=M,this.sizeMin=.5,this.sizeMinCap=2,this.sizeMax=20,this.areaRatio=1,this.pointCount=0,this.color=[1,0,0,1],this.borderColor=[0,0,0,1],this.blend=!1,this.pickOffset=0,this.points=null}var u=c.prototype;u.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},u.update=function(w){var h;w=w||{};function o(b,a){return b in w?w[b]:a}this.sizeMin=o("sizeMin",.5),this.sizeMax=o("sizeMax",20),this.color=o("color",[1,0,0,1]).slice(),this.areaRatio=o("areaRatio",1),this.borderColor=o("borderColor",[0,0,0,1]).slice(),this.blend=o("blend",!1);var d=w.positions.length>>>1,M=w.positions instanceof Float32Array,T=w.idToIndex instanceof Int32Array&&w.idToIndex.length>=d,C=w.positions,x=M?C:n.mallocFloat32(C.length),S=T?w.idToIndex:n.mallocInt32(d);if(M||x.set(C),!T)for(x.set(C),h=0;h>>1,M;for(M=0;M=h[0]&&T<=h[2]&&C>=h[1]&&C<=h[3]&&o++}return o}u.unifiedDraw=function(){var w=[1,0,0,0,1,0,0,0,1],h=[0,0,0,0];return function(o){var d=o!==void 0,M=d?this.pickShader:this.shader,T=this.plot.gl,C=this.plot.dataBox;if(this.pointCount===0)return o;var x=C[2]-C[0],S=C[3]-C[1],b=g(this.points,C),a=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(b,.33333)));w[0]=2/x,w[4]=2/S,w[6]=-2*C[0]/x-1,w[7]=-2*C[1]/S-1,this.offsetBuffer.bind(),M.bind(),M.attributes.position.pointer(),M.uniforms.matrix=w,M.uniforms.color=this.color,M.uniforms.borderColor=this.borderColor,M.uniforms.pointCloud=a<5,M.uniforms.pointSize=a,M.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),d&&(h[0]=o&255,h[1]=o>>8&255,h[2]=o>>16&255,h[3]=o>>24&255,this.pickBuffer.bind(),M.attributes.pickId.pointer(T.UNSIGNED_BYTE),M.uniforms.pickOffset=h,this.pickOffset=o);var E=T.getParameter(T.BLEND),y=T.getParameter(T.DITHER);return E&&!this.blend&&T.disable(T.BLEND),y&&T.disable(T.DITHER),T.drawArrays(T.POINTS,0,this.pointCount),E&&!this.blend&&T.enable(T.BLEND),y&&T.enable(T.DITHER),o+this.pointCount}}(),u.draw=u.unifiedDraw,u.drawPick=u.unifiedDraw,u.pick=function(w,h,o){var d=this.pickOffset,M=this.pointCount;if(o=d+M)return null;var T=o-d,C=this.points;return{object:this,pointId:T,dataCoord:[C[2*T],C[2*T+1]]}};function f(w,h){var o=w.gl,d=s(o),M=s(o),T=r(o,l.pointVertex,l.pointFragment),C=r(o,l.pickVertex,l.pickFragment),x=new c(w,d,M,T,C);return x.update(h),w.addObject(x),x}},6093:function(v){v.exports=p;function p(t,r,s,n){var l=r[0],c=r[1],u=r[2],g=r[3],f=s[0],w=s[1],h=s[2],o=s[3],d,M,T,C,x;return M=l*f+c*w+u*h+g*o,M<0&&(M=-M,f=-f,w=-w,h=-h,o=-o),1-M>1e-6?(d=Math.acos(M),T=Math.sin(d),C=Math.sin((1-n)*d)/T,x=Math.sin(n*d)/T):(C=1-n,x=n),t[0]=C*l+x*f,t[1]=C*c+x*w,t[2]=C*u+x*h,t[3]=C*g+x*o,t}},8240:function(v){v.exports=function(p){return!p&&p!==0?"":p.toString()}},4123:function(v,p,t){var r=t(875);v.exports=n;var s={};function n(l,c,u){var g=s[c];if(g||(g=s[c]={}),l in g)return g[l];var f={textAlign:"center",textBaseline:"middle",lineHeight:1,font:c,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};f.triangles=!0;var w=r(l,f);f.triangles=!1;var h=r(l,f),o,d;if(u&&u!==1){for(o=0;o max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute vec4 color; attribute vec2 glyph; attribute vec4 id; uniform vec4 highlightId; uniform float highlightScale; uniform mat4 model, view, projection; uniform vec3 clipBounds[2]; varying vec4 interpColor; varying vec4 pickId; varying vec3 dataCoordinate; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0,0,0,0); } else { float scale = 1.0; if(distance(highlightId, id) < 0.0001) { scale = highlightScale; } vec4 worldPosition = model * vec4(position, 1); vec4 viewPosition = view * worldPosition; viewPosition = viewPosition / viewPosition.w; vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0)); gl_Position = clipPosition; interpColor = color; pickId = id; dataCoordinate = position; } }`]),l=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute vec4 color; attribute vec2 glyph; attribute vec4 id; uniform mat4 model, view, projection; uniform vec2 screenSize; uniform vec3 clipBounds[2]; uniform float highlightScale, pixelRatio; uniform vec4 highlightId; varying vec4 interpColor; varying vec4 pickId; varying vec3 dataCoordinate; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0,0,0,0); } else { float scale = pixelRatio; if(distance(highlightId.bgr, id.bgr) < 0.001) { scale *= highlightScale; } vec4 worldPosition = model * vec4(position, 1.0); vec4 viewPosition = view * worldPosition; vec4 clipPosition = projection * viewPosition; clipPosition /= clipPosition.w; gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0); interpColor = color; pickId = id; dataCoordinate = position; } }`]),c=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute vec4 color; attribute vec2 glyph; attribute vec4 id; uniform float highlightScale; uniform vec4 highlightId; uniform vec3 axes[2]; uniform mat4 model, view, projection; uniform vec2 screenSize; uniform vec3 clipBounds[2]; uniform float scale, pixelRatio; varying vec4 interpColor; varying vec4 pickId; varying vec3 dataCoordinate; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0,0,0,0); } else { float lscale = pixelRatio * scale; if(distance(highlightId, id) < 0.0001) { lscale *= highlightScale; } vec4 clipCenter = projection * view * model * vec4(position, 1); vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y; vec4 clipPosition = projection * view * model * vec4(dataPosition, 1); gl_Position = clipPosition; interpColor = color; pickId = id; dataCoordinate = dataPosition; } } `]),u=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 fragClipBounds[2]; uniform float opacity; varying vec4 interpColor; varying vec3 dataCoordinate; void main() { if ( outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) || interpColor.a * opacity == 0. ) discard; gl_FragColor = interpColor * opacity; } `]),g=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 fragClipBounds[2]; uniform float pickGroup; varying vec4 pickId; varying vec3 dataCoordinate; void main() { if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard; gl_FragColor = vec4(pickGroup, pickId.bgr); }`]),f=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],w={vertex:n,fragment:u,attributes:f},h={vertex:l,fragment:u,attributes:f},o={vertex:c,fragment:u,attributes:f},d={vertex:n,fragment:g,attributes:f},M={vertex:l,fragment:g,attributes:f},T={vertex:c,fragment:g,attributes:f};function C(x,S){var b=r(x,S),a=b.attributes;return a.position.location=0,a.color.location=1,a.glyph.location=2,a.id.location=3,b}p.createPerspective=function(x){return C(x,w)},p.createOrtho=function(x){return C(x,h)},p.createProject=function(x){return C(x,o)},p.createPickPerspective=function(x){return C(x,d)},p.createPickOrtho=function(x){return C(x,M)},p.createPickProject=function(x){return C(x,T)}},2182:function(v,p,t){var r=t(3596),s=t(5827),n=t(2944),l=t(5306),c=t(104),u=t(9282),g=t(4123),f=t(8240),w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];v.exports=ce;function h(Q,Z){var j=Q[0],K=Q[1],ee=Q[2],oe=Q[3];return Q[0]=Z[0]*j+Z[4]*K+Z[8]*ee+Z[12]*oe,Q[1]=Z[1]*j+Z[5]*K+Z[9]*ee+Z[13]*oe,Q[2]=Z[2]*j+Z[6]*K+Z[10]*ee+Z[14]*oe,Q[3]=Z[3]*j+Z[7]*K+Z[11]*ee+Z[15]*oe,Q}function o(Q,Z,j,K){return h(K,K),h(K,K),h(K,K)}function d(Q,Z){this.index=Q,this.dataCoordinate=this.position=Z}function M(Q){return Q===!0||Q>1?1:Q}function T(Q,Z,j,K,ee,oe,q,$,le,ie,he,me){this.gl=Q,this.pixelRatio=1,this.shader=Z,this.orthoShader=j,this.projectShader=K,this.pointBuffer=ee,this.colorBuffer=oe,this.glyphBuffer=q,this.idBuffer=$,this.vao=le,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=ie,this.pickOrthoShader=he,this.pickProjectShader=me,this.points=[],this._selectResult=new d(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}var C=T.prototype;C.pickSlots=1,C.setPickBase=function(Q){this.pickId=Q},C.isTransparent=function(){if(this.hasAlpha)return!0;for(var Q=0;Q<3;++Q)if(this.axesProject[Q]&&this.projectHasAlpha)return!0;return!1},C.isOpaque=function(){if(!this.hasAlpha)return!0;for(var Q=0;Q<3;++Q)if(this.axesProject[Q]&&!this.projectHasAlpha)return!0;return!1};var x=[0,0],S=[0,0,0],b=[0,0,0],a=[0,0,0,1],E=[0,0,0,1],y=w.slice(),z=[0,0,0],I=[[0,0,0],[0,0,0]];function B(Q){return Q[0]=Q[1]=Q[2]=0,Q}function k(Q,Z){return Q[0]=Z[0],Q[1]=Z[1],Q[2]=Z[2],Q[3]=1,Q}function O(Q,Z,j,K){return Q[0]=Z[0],Q[1]=Z[1],Q[2]=Z[2],Q[j]=K,Q}function N(Q){for(var Z=I,j=0;j<2;++j)for(var K=0;K<3;++K)Z[j][K]=Math.max(Math.min(Q[j][K],1e8),-1e8);return Z}function _(Q,Z,j,K){var ee=Z.axesProject,oe=Z.gl,q=Q.uniforms,$=j.model||w,le=j.view||w,ie=j.projection||w,he=Z.axesBounds,me=N(Z.clipBounds),Me;Z.axes&&Z.axes.lastCubeProps?Me=Z.axes.lastCubeProps.axis:Me=[1,1,1],x[0]=2/oe.drawingBufferWidth,x[1]=2/oe.drawingBufferHeight,Q.bind(),q.view=le,q.projection=ie,q.screenSize=x,q.highlightId=Z.highlightId,q.highlightScale=Z.highlightScale,q.clipBounds=me,q.pickGroup=Z.pickId/255,q.pixelRatio=K;for(var Te=0;Te<3;++Te)if(ee[Te]){q.scale=Z.projectScale[Te],q.opacity=Z.projectOpacity[Te];for(var Oe=y,Ne=0;Ne<16;++Ne)Oe[Ne]=0;for(var Ne=0;Ne<4;++Ne)Oe[5*Ne]=1;Oe[5*Te]=0,Me[Te]<0?Oe[12+Te]=he[0][Te]:Oe[12+Te]=he[1][Te],c(Oe,$,Oe),q.model=Oe;var Ee=(Te+1)%3,xe=(Te+2)%3,Se=B(S),Ue=B(b);Se[Ee]=1,Ue[xe]=1;var He=o(ie,le,$,k(a,Se)),Fe=o(ie,le,$,k(E,Ue));if(Math.abs(He[1])>Math.abs(Fe[1])){var Ge=He;He=Fe,Fe=Ge,Ge=Se,Se=Ue,Ue=Ge;var nt=Ee;Ee=xe,xe=nt}He[0]<0&&(Se[Ee]=-1),Fe[1]>0&&(Ue[xe]=-1);for(var qe=0,$e=0,Ne=0;Ne<4;++Ne)qe+=Math.pow($[4*Ee+Ne],2),$e+=Math.pow($[4*xe+Ne],2);Se[Ee]/=Math.sqrt(qe),Ue[xe]/=Math.sqrt($e),q.axes[0]=Se,q.axes[1]=Ue,q.fragClipBounds[0]=O(z,me[0],Te,-1e8),q.fragClipBounds[1]=O(z,me[1],Te,1e8),Z.vao.bind(),Z.vao.draw(oe.TRIANGLES,Z.vertexCount),Z.lineWidth>0&&(oe.lineWidth(Z.lineWidth*K),Z.vao.draw(oe.LINES,Z.lineVertexCount,Z.vertexCount)),Z.vao.unbind()}}var U=[-1e8,-1e8,-1e8],Y=[1e8,1e8,1e8],J=[U,Y];function te(Q,Z,j,K,ee,oe,q){var $=j.gl;if((oe===j.projectHasAlpha||q)&&_(Z,j,K,ee),oe===j.hasAlpha||q){Q.bind();var le=Q.uniforms;le.model=K.model||w,le.view=K.view||w,le.projection=K.projection||w,x[0]=2/$.drawingBufferWidth,x[1]=2/$.drawingBufferHeight,le.screenSize=x,le.highlightId=j.highlightId,le.highlightScale=j.highlightScale,le.fragClipBounds=J,le.clipBounds=j.axes.bounds,le.opacity=j.opacity,le.pickGroup=j.pickId/255,le.pixelRatio=ee,j.vao.bind(),j.vao.draw($.TRIANGLES,j.vertexCount),j.lineWidth>0&&($.lineWidth(j.lineWidth*ee),j.vao.draw($.LINES,j.lineVertexCount,j.vertexCount)),j.vao.unbind()}}C.draw=function(Q){var Z=this.useOrtho?this.orthoShader:this.shader;te(Z,this.projectShader,this,Q,this.pixelRatio,!1,!1)},C.drawTransparent=function(Q){var Z=this.useOrtho?this.orthoShader:this.shader;te(Z,this.projectShader,this,Q,this.pixelRatio,!0,!1)},C.drawPick=function(Q){var Z=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;te(Z,this.pickProjectShader,this,Q,1,!0,!0)},C.pick=function(Q){if(!Q||Q.id!==this.pickId)return null;var Z=Q.value[2]+(Q.value[1]<<8)+(Q.value[0]<<16);if(Z>=this.pointCount||Z<0)return null;var j=this.points[Z],K=this._selectResult;K.index=Z;for(var ee=0;ee<3;++ee)K.position[ee]=K.dataCoordinate[ee]=j[ee];return K},C.highlight=function(Q){if(!Q)this.highlightId=[1,1,1,1];else{var Z=Q.index,j=Z&255,K=Z>>8&255,ee=Z>>16&255;this.highlightId=[j/255,K/255,ee/255,0]}};function ae(Q,Z,j,K){var ee;Array.isArray(Q)?Z0){var Mt=0,Vt=xe,Je=[0,0,0,1],De=[0,0,0,1],Ie=Array.isArray(Me)&&Array.isArray(Me[0]),ze=Array.isArray(Ne)&&Array.isArray(Ne[0]);e:for(var K=0;K0?1-$e[0][0]:ot<0?1+$e[1][0]:1,at*=at>0?1-$e[0][1]:at<0?1+$e[1][1]:1;for(var wt=[ot,at],Kt=nt.cells||[],ir=nt.positions||[],Fe=0;Fe0){var B=w*S;M.drawBox(b-B,a-B,E+B,a+B,d),M.drawBox(b-B,y-B,E+B,y+B,d),M.drawBox(b-B,a-B,b+B,y+B,d),M.drawBox(E-B,a-B,E+B,y+B,d)}}}},c.update=function(g){g=g||{},this.innerFill=!!g.innerFill,this.outerFill=!!g.outerFill,this.innerColor=(g.innerColor||[0,0,0,.5]).slice(),this.outerColor=(g.outerColor||[0,0,0,.5]).slice(),this.borderColor=(g.borderColor||[0,0,0,1]).slice(),this.borderWidth=g.borderWidth||0,this.selectBox=(g.selectBox||this.selectBox).slice()},c.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)};function u(g,f){var w=g.gl,h=s(w,[0,0,0,1,1,0,1,1]),o=r(w,n.boxVertex,n.boxFragment),d=new l(g,h,o);return d.update(f),g.addOverlay(d),d}},2611:function(v,p,t){v.exports=w;var r=t(4234),s=t(5306),n=t(5050),l=t(2288).nextPow2,c=function(h,o,d){for(var M=1e8,T=-1,C=-1,x=h.shape[0],S=h.shape[1],b=0;bthis.buffer.length){s.free(this.buffer);for(var M=this.buffer=s.mallocUint8(l(d*o*4)),T=0;TM)for(o=M;od)for(o=d;o=0){for(var N=O.type.charAt(O.type.length-1)|0,_=new Array(N),U=0;U=0;)Y+=1;B[k]=Y}var J=new Array(M.length);function te(){x.program=l.program(S,x._vref,x._fref,I,B);for(var ae=0;ae=0){var a=S.charCodeAt(S.length-1)-48;if(a<2||a>4)throw new r("","Invalid data type for attribute "+x+": "+S);c(f,w,b[0],o,a,d,x)}else if(S.indexOf("mat")>=0){var a=S.charCodeAt(S.length-1)-48;if(a<2||a>4)throw new r("","Invalid data type for attribute "+x+": "+S);u(f,w,b,o,a,d,x)}else throw new r("","Unknown data type for attribute "+x+": "+S);break}}return d}},9016:function(v,p,t){var r=t(3984),s=t(9068);v.exports=c;function n(u){return function(){return u}}function l(u,g){for(var f=new Array(u),w=0;w4)throw new s("","Invalid data type");switch(Y.charAt(0)){case"b":case"i":u["uniform"+J+"iv"](w[B],k);break;case"v":u["uniform"+J+"fv"](w[B],k);break;default:throw new s("","Unrecognized data type for vector "+name+": "+Y)}}else if(Y.indexOf("mat")===0&&Y.length===4){if(J=Y.charCodeAt(Y.length-1)-48,J<2||J>4)throw new s("","Invalid uniform dimension type for matrix "+name+": "+Y);u["uniformMatrix"+J+"fv"](w[B],!1,k);break}else throw new s("","Unknown uniform data type for "+name+": "+Y)}}}}}function d(S,b){if(typeof b!="object")return[[S,b]];var a=[];for(var E in b){var y=b[E],z=S;parseInt(E)+""===E?z+="["+E+"]":z+="."+E,typeof y=="object"?a.push.apply(a,d(z,y)):a.push([z,y])}return a}function M(S){switch(S){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var b=S.indexOf("vec");if(0<=b&&b<=1&&S.length===4+b){var a=S.charCodeAt(S.length-1)-48;if(a<2||a>4)throw new s("","Invalid data type");return S.charAt(0)==="b"?l(a,!1):l(a,0)}else if(S.indexOf("mat")===0&&S.length===4){var a=S.charCodeAt(S.length-1)-48;if(a<2||a>4)throw new s("","Invalid uniform dimension type for matrix "+name+": "+S);return l(a*a,0)}else throw new s("","Unknown uniform data type for "+name+": "+S)}}function T(S,b,a){if(typeof a=="object"){var E=C(a);Object.defineProperty(S,b,{get:n(E),set:o(a),enumerable:!0,configurable:!1})}else w[a]?Object.defineProperty(S,b,{get:h(a),set:o(a),enumerable:!0,configurable:!1}):S[b]=M(f[a].type)}function C(S){var b;if(Array.isArray(S)){b=new Array(S.length);for(var a=0;a1){f[0]in u||(u[f[0]]=[]),u=u[f[0]];for(var w=1;w1)for(var d=0;d"u"?t(4037):WeakMap,l=new n,c=0;function u(T,C,x,S,b,a,E){this.id=T,this.src=C,this.type=x,this.shader=S,this.count=a,this.programs=[],this.cache=E}u.prototype.dispose=function(){if(--this.count===0){for(var T=this.cache,C=T.gl,x=this.programs,S=0,b=x.length;S 0 U ||b|| > 0. // Assign z = 0, x = -b, y = a: // a*-b + b*a + c*0 = -ba + ba + 0 = 0 if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { return normalize(vec3(-v.y, v.x, 0.0)); } else { return normalize(vec3(0.0, v.z, -v.y)); } } // Calculate the tube vertex and normal at the given index. // // The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d. // // Each tube segment is made up of a ring of vertices. // These vertices are used to make up the triangles of the tube by connecting them together in the vertex array. // The indexes of tube segments run from 0 to 8. // vec3 getTubePosition(vec3 d, float index, out vec3 normal) { float segmentCount = 8.0; float angle = 2.0 * 3.14159 * (index / segmentCount); vec3 u = getOrthogonalVector(d); vec3 v = normalize(cross(u, d)); vec3 x = u * cos(angle) * length(d); vec3 y = v * sin(angle) * length(d); vec3 v3 = x + y; normal = normalize(v3); return v3; } attribute vec4 vector; attribute vec4 color, position; attribute vec2 uv; uniform float vectorScale, tubeScale; uniform mat4 model, view, projection, inverseModel; uniform vec3 eyePosition, lightPosition; varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; varying vec4 f_color; varying vec2 f_uv; void main() { // Scale the vector magnitude to stay constant with // model & view changes. vec3 normal; vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal); vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); //Lighting geometry parameters vec4 cameraCoordinate = view * tubePosition; cameraCoordinate.xyz /= cameraCoordinate.w; f_lightDirection = lightPosition - cameraCoordinate.xyz; f_eyeDirection = eyePosition - cameraCoordinate.xyz; f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); // vec4 m_position = model * vec4(tubePosition, 1.0); vec4 t_position = view * tubePosition; gl_Position = projection * t_position; f_color = color; f_data = tubePosition.xyz; f_position = position.xyz; f_uv = uv; } `]),n=r([`#extension GL_OES_standard_derivatives : enable precision highp float; #define GLSLIFY 1 float beckmannDistribution(float x, float roughness) { float NdotH = max(x, 0.0001); float cos2Alpha = NdotH * NdotH; float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; float roughness2 = roughness * roughness; float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; return exp(tan2Alpha / roughness2) / denom; } float cookTorranceSpecular( vec3 lightDirection, vec3 viewDirection, vec3 surfaceNormal, float roughness, float fresnel) { float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); //Half angle vector vec3 H = normalize(lightDirection + viewDirection); //Geometric term float NdotH = max(dot(surfaceNormal, H), 0.0); float VdotH = max(dot(viewDirection, H), 0.000001); float LdotH = max(dot(lightDirection, H), 0.000001); float G1 = (2.0 * NdotH * VdotN) / VdotH; float G2 = (2.0 * NdotH * LdotN) / LdotH; float G = min(1.0, min(G1, G2)); //Distribution term float D = beckmannDistribution(NdotH, roughness); //Fresnel term float F = pow(1.0 - VdotN, fresnel); //Multiply terms and done return G * F * D / max(3.14159265 * VdotN, 0.000001); } bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; uniform sampler2D texture; varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; varying vec4 f_color; varying vec2 f_uv; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; vec3 N = normalize(f_normal); vec3 L = normalize(f_lightDirection); vec3 V = normalize(f_eyeDirection); if(gl_FrontFacing) { N = -N; } float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); vec4 surfaceColor = f_color * texture2D(texture, f_uv); vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); gl_FragColor = litColor * opacity; } `]),l=r([`precision highp float; precision highp float; #define GLSLIFY 1 vec3 getOrthogonalVector(vec3 v) { // Return up-vector for only-z vector. // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0). // From the above if-statement we have ||a|| > 0 U ||b|| > 0. // Assign z = 0, x = -b, y = a: // a*-b + b*a + c*0 = -ba + ba + 0 = 0 if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { return normalize(vec3(-v.y, v.x, 0.0)); } else { return normalize(vec3(0.0, v.z, -v.y)); } } // Calculate the tube vertex and normal at the given index. // // The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d. // // Each tube segment is made up of a ring of vertices. // These vertices are used to make up the triangles of the tube by connecting them together in the vertex array. // The indexes of tube segments run from 0 to 8. // vec3 getTubePosition(vec3 d, float index, out vec3 normal) { float segmentCount = 8.0; float angle = 2.0 * 3.14159 * (index / segmentCount); vec3 u = getOrthogonalVector(d); vec3 v = normalize(cross(u, d)); vec3 x = u * cos(angle) * length(d); vec3 y = v * sin(angle) * length(d); vec3 v3 = x + y; normal = normalize(v3); return v3; } attribute vec4 vector; attribute vec4 position; attribute vec4 id; uniform mat4 model, view, projection; uniform float tubeScale; varying vec3 f_position; varying vec4 f_id; void main() { vec3 normal; vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal); vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); gl_Position = projection * view * tubePosition; f_id = id; f_position = position.xyz; } `]),c=r([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float pickId; varying vec3 f_position; varying vec4 f_id; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); }`]);p.meshShader={vertex:s,fragment:n,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},p.pickShader={vertex:l,fragment:c,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7307:function(v,p,t){var r=t(2858),s=t(4020),n=["xyz","xzy","yxz","yzx","zxy","zyx"],l=function(M,T,C,x){for(var S=M.points,b=M.velocities,a=M.divergences,E=[],y=[],z=[],I=[],B=[],k=[],O=0,N=0,_=s.create(),U=s.create(),Y=8,J=0;J0)for(var Q=0;QT)return x-1}return x},g=function(M,T,C){return MC?C:M},f=function(M,T,C){var x=T.vectors,S=T.meshgrid,b=M[0],a=M[1],E=M[2],y=S[0].length,z=S[1].length,I=S[2].length,B=u(S[0],b),k=u(S[1],a),O=u(S[2],E),N=B+1,_=k+1,U=O+1;if(B=g(B,0,y-1),N=g(N,0,y-1),k=g(k,0,z-1),_=g(_,0,z-1),O=g(O,0,I-1),U=g(U,0,I-1),B<0||k<0||O<0||N>y-1||_>z-1||U>I-1)return r.create();var Y=S[0][B],J=S[0][N],te=S[1][k],ae=S[1][_],ce=S[2][O],Q=S[2][U],Z=(b-Y)/(J-Y),j=(a-te)/(ae-te),K=(E-ce)/(Q-ce);isFinite(Z)||(Z=.5),isFinite(j)||(j=.5),isFinite(K)||(K=.5);var ee,oe,q,$,le,ie;switch(C.reversedX&&(B=y-1-B,N=y-1-N),C.reversedY&&(k=z-1-k,_=z-1-_),C.reversedZ&&(O=I-1-O,U=I-1-U),C.filled){case 5:le=O,ie=U,q=k*I,$=_*I,ee=B*I*z,oe=N*I*z;break;case 4:le=O,ie=U,ee=B*I,oe=N*I,q=k*I*y,$=_*I*y;break;case 3:q=k,$=_,le=O*z,ie=U*z,ee=B*z*I,oe=N*z*I;break;case 2:q=k,$=_,ee=B*z,oe=N*z,le=O*z*y,ie=U*z*y;break;case 1:ee=B,oe=N,le=O*y,ie=U*y,q=k*y*I,$=_*y*I;break;default:ee=B,oe=N,q=k*y,$=_*y,le=O*y*z,ie=U*y*z;break}var he=x[ee+q+le],me=x[ee+q+ie],Me=x[ee+$+le],Te=x[ee+$+ie],Oe=x[oe+q+le],Ne=x[oe+q+ie],Ee=x[oe+$+le],xe=x[oe+$+ie],Se=r.create(),Ue=r.create(),He=r.create(),Fe=r.create();r.lerp(Se,he,Oe,Z),r.lerp(Ue,me,Ne,Z),r.lerp(He,Me,Ee,Z),r.lerp(Fe,Te,xe,Z);var Ge=r.create(),nt=r.create();r.lerp(Ge,Se,He,j),r.lerp(nt,Ue,Fe,j);var qe=r.create();return r.lerp(qe,Ge,nt,K),qe},w=function(M){var T=1/0;M.sort(function(b,a){return b-a});for(var C=M.length,x=1;xN||xe_||SeU)},J=r.distance(T[0],T[1]),te=10*J/x,ae=te*te,ce=1,Q=0,Z=C.length;Z>1&&(ce=h(C));for(var j=0;jQ&&(Q=he),le.push(he),I.push({points:ee,velocities:oe,divergences:le});for(var me=0;meae&&r.scale(Me,Me,te/Math.sqrt(Te)),r.add(Me,Me,K),q=y(Me),r.squaredDistance($,Me)-ae>-1e-4*ae){ee.push(Me),$=Me,oe.push(q);var ie=z(Me,q),he=r.length(ie);isFinite(he)&&he>Q&&(Q=he),le.push(he)}K=Me}}var Oe=c(I,M.colormap,Q,ce);return b?Oe.tubeScale=b:(Q===0&&(Q=1),Oe.tubeScale=S*.5*ce/Q),Oe};var o=t(9578),d=t(1140).createMesh;v.exports.createTubeMesh=function(M,T){return d(M,T,{shaders:o,traceType:"streamtube"})}},9054:function(v,p,t){var r=t(5158),s=t(6832),n=s([`precision highp float; #define GLSLIFY 1 attribute vec4 uv; attribute vec3 f; attribute vec3 normal; uniform vec3 objectOffset; uniform mat4 model, view, projection, inverseModel; uniform vec3 lightPosition, eyePosition; uniform sampler2D colormap; varying float value, kill; varying vec3 worldCoordinate; varying vec2 planeCoordinate; varying vec3 lightDirection, eyeDirection, surfaceNormal; varying vec4 vColor; void main() { vec3 localCoordinate = vec3(uv.zw, f.x); worldCoordinate = objectOffset + localCoordinate; vec4 worldPosition = model * vec4(worldCoordinate, 1.0); vec4 clipPosition = projection * view * worldPosition; gl_Position = clipPosition; kill = f.y; value = f.z; planeCoordinate = uv.xy; vColor = texture2D(colormap, vec2(value, value)); //Lighting geometry parameters vec4 cameraCoordinate = view * worldPosition; cameraCoordinate.xyz /= cameraCoordinate.w; lightDirection = lightPosition - cameraCoordinate.xyz; eyeDirection = eyePosition - cameraCoordinate.xyz; surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz); } `]),l=s([`precision highp float; #define GLSLIFY 1 float beckmannDistribution(float x, float roughness) { float NdotH = max(x, 0.0001); float cos2Alpha = NdotH * NdotH; float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; float roughness2 = roughness * roughness; float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; return exp(tan2Alpha / roughness2) / denom; } float beckmannSpecular( vec3 lightDirection, vec3 viewDirection, vec3 surfaceNormal, float roughness) { return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness); } bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 lowerBound, upperBound; uniform float contourTint; uniform vec4 contourColor; uniform sampler2D colormap; uniform vec3 clipBounds[2]; uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; uniform float vertexColor; varying float value, kill; varying vec3 worldCoordinate; varying vec3 lightDirection, eyeDirection, surfaceNormal; varying vec4 vColor; void main() { if ( kill > 0.0 || vColor.a == 0.0 || outOfRange(clipBounds[0], clipBounds[1], worldCoordinate) ) discard; vec3 N = normalize(surfaceNormal); vec3 V = normalize(eyeDirection); vec3 L = normalize(lightDirection); if(gl_FrontFacing) { N = -N; } float specular = max(beckmannSpecular(L, V, N, roughness), 0.); float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); //decide how to interpolate color — in vertex or in fragment vec4 surfaceColor = step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) + step(.5, vertexColor) * vColor; vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); gl_FragColor = mix(litColor, contourColor, contourTint) * opacity; } `]),c=s([`precision highp float; #define GLSLIFY 1 attribute vec4 uv; attribute float f; uniform vec3 objectOffset; uniform mat3 permutation; uniform mat4 model, view, projection; uniform float height, zOffset; uniform sampler2D colormap; varying float value, kill; varying vec3 worldCoordinate; varying vec2 planeCoordinate; varying vec3 lightDirection, eyeDirection, surfaceNormal; varying vec4 vColor; void main() { vec3 dataCoordinate = permutation * vec3(uv.xy, height); worldCoordinate = objectOffset + dataCoordinate; vec4 worldPosition = model * vec4(worldCoordinate, 1.0); vec4 clipPosition = projection * view * worldPosition; clipPosition.z += zOffset; gl_Position = clipPosition; value = f + objectOffset.z; kill = -1.0; planeCoordinate = uv.zw; vColor = texture2D(colormap, vec2(value, value)); //Don't do lighting for contours surfaceNormal = vec3(1,0,0); eyeDirection = vec3(0,1,0); lightDirection = vec3(0,0,1); } `]),u=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec2 shape; uniform vec3 clipBounds[2]; uniform float pickId; varying float value, kill; varying vec3 worldCoordinate; varying vec2 planeCoordinate; varying vec3 surfaceNormal; vec2 splitFloat(float v) { float vh = 255.0 * v; float upper = floor(vh); float lower = fract(vh); return vec2(upper / 255.0, floor(lower * 16.0) / 16.0); } void main() { if ((kill > 0.0) || (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard; vec2 ux = splitFloat(planeCoordinate.x / shape.x); vec2 uy = splitFloat(planeCoordinate.y / shape.y); gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0)); } `]);p.createShader=function(g){var f=r(g,n,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return f.attributes.uv.location=0,f.attributes.f.location=1,f.attributes.normal.location=2,f},p.createPickShader=function(g){var f=r(g,n,u,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return f.attributes.uv.location=0,f.attributes.f.location=1,f.attributes.normal.location=2,f},p.createContourShader=function(g){var f=r(g,c,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return f.attributes.uv.location=0,f.attributes.f.location=1,f},p.createPickContourShader=function(g){var f=r(g,c,u,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return f.attributes.uv.location=0,f.attributes.f.location=1,f}},3754:function(v,p,t){v.exports=oe;var r=t(2288),s=t(5827),n=t(2944),l=t(8931),c=t(5306),u=t(9156),g=t(7498),f=t(7382),w=t(5050),h=t(4162),o=t(104),d=t(7437),M=t(5070),T=t(9144),C=t(9054),x=C.createShader,S=C.createContourShader,b=C.createPickShader,a=C.createPickContourShader,E=4*(4+3+3),y=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],z=[[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(){for(var q=0;q<3;++q){var $=I[q],le=(q+1)%3,ie=(q+2)%3;$[le+0]=1,$[ie+3]=1,$[q+6]=1}})();function B(q,$,le,ie,he){this.position=q,this.index=$,this.uv=le,this.level=ie,this.dataCoordinate=he}var k=256;function O(q,$,le,ie,he,me,Me,Te,Oe,Ne,Ee,xe,Se,Ue,He){this.gl=q,this.shape=$,this.bounds=le,this.objectOffset=He,this.intensityBounds=[],this._shader=ie,this._pickShader=he,this._coordinateBuffer=me,this._vao=Me,this._colorMap=Te,this._contourShader=Oe,this._contourPickShader=Ne,this._contourBuffer=Ee,this._contourVAO=xe,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new B([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=Se,this._dynamicVAO=Ue,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[w(c.mallocFloat(1024),[0,0]),w(c.mallocFloat(1024),[0,0]),w(c.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var N=O.prototype;N.genColormap=function(q,$){var le=!1,ie=f([u({colormap:q,nshades:k,format:"rgba"}).map(function(he,me){var Me=$?_(me/255,$):he[3];return Me<1&&(le=!0),[he[0],he[1],he[2],255*Me]})]);return g.divseq(ie,255),this.hasAlphaScale=le,ie},N.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},N.isOpaque=function(){return!this.isTransparent()},N.pickSlots=1,N.setPickBase=function(q){this.pickId=q};function _(q,$){if(!$||!$.length)return 1;for(var le=0;le<$.length;++le){if($.length<2)return 1;if($[le][0]===q)return $[le][1];if($[le][0]>q&&le>0){var ie=($[le][0]-q)/($[le][0]-$[le-1][0]);return $[le][1]*(1-ie)+ie*$[le-1][1]}}return 1}var U=[0,0,0],Y={showSurface:!1,showContour:!1,projections:[y.slice(),y.slice(),y.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function J(q,$){var le,ie,he,me=$.axes&&$.axes.lastCubeProps.axis||U,Me=$.showSurface,Te=$.showContour;for(le=0;le<3;++le)for(Me=Me||$.surfaceProject[le],ie=0;ie<3;++ie)Te=Te||$.contourProject[le][ie];for(le=0;le<3;++le){var Oe=Y.projections[le];for(ie=0;ie<16;++ie)Oe[ie]=0;for(ie=0;ie<4;++ie)Oe[5*ie]=1;Oe[5*le]=0,Oe[12+le]=$.axesBounds[+(me[le]>0)][le],o(Oe,q.model,Oe);var Ne=Y.clipBounds[le];for(he=0;he<2;++he)for(ie=0;ie<3;++ie)Ne[he][ie]=q.clipBounds[he][ie];Ne[0][le]=-1e8,Ne[1][le]=1e8}return Y.showSurface=Me,Y.showContour=Te,Y}var te={model:y,view:y,projection:y,inverseModel:y.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},ae=y.slice(),ce=[1,0,0,0,1,0,0,0,1];function Q(q,$){q=q||{};var le=this.gl;le.disable(le.CULL_FACE),this._colorMap.bind(0);var ie=te;ie.model=q.model||y,ie.view=q.view||y,ie.projection=q.projection||y,ie.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],ie.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],ie.objectOffset=this.objectOffset,ie.contourColor=this.contourColor[0],ie.inverseModel=d(ie.inverseModel,ie.model);for(var he=0;he<2;++he)for(var me=ie.clipBounds[he],Me=0;Me<3;++Me)me[Me]=Math.min(Math.max(this.clipBounds[he][Me],-1e8),1e8);ie.kambient=this.ambientLight,ie.kdiffuse=this.diffuseLight,ie.kspecular=this.specularLight,ie.roughness=this.roughness,ie.fresnel=this.fresnel,ie.opacity=this.opacity,ie.height=0,ie.permutation=ce,ie.vertexColor=this.vertexColor;var Te=ae;for(o(Te,ie.view,ie.model),o(Te,ie.projection,Te),d(Te,Te),he=0;he<3;++he)ie.eyePosition[he]=Te[12+he]/Te[15];var Oe=Te[15];for(he=0;he<3;++he)Oe+=this.lightPosition[he]*Te[4*he+3];for(he=0;he<3;++he){var Ne=Te[12+he];for(Me=0;Me<3;++Me)Ne+=Te[4*Me+he]*this.lightPosition[Me];ie.lightPosition[he]=Ne/Oe}var Ee=J(ie,this);if(Ee.showSurface){for(this._shader.bind(),this._shader.uniforms=ie,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(le.TRIANGLES,this._vertexCount),he=0;he<3;++he)!this.surfaceProject[he]||!this.vertexCount||(this._shader.uniforms.model=Ee.projections[he],this._shader.uniforms.clipBounds=Ee.clipBounds[he],this._vao.draw(le.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Ee.showContour){var xe=this._contourShader;ie.kambient=1,ie.kdiffuse=0,ie.kspecular=0,ie.opacity=1,xe.bind(),xe.uniforms=ie;var Se=this._contourVAO;for(Se.bind(),he=0;he<3;++he)for(xe.uniforms.permutation=I[he],le.lineWidth(this.contourWidth[he]*this.pixelRatio),Me=0;Me>4)/16)/255,he=Math.floor(ie),me=ie-he,Me=$[1]*(q.value[1]+(q.value[2]&15)/16)/255,Te=Math.floor(Me),Oe=Me-Te;he+=1,Te+=1;var Ne=le.position;Ne[0]=Ne[1]=Ne[2]=0;for(var Ee=0;Ee<2;++Ee)for(var xe=Ee?me:1-me,Se=0;Se<2;++Se)for(var Ue=Se?Oe:1-Oe,He=he+Ee,Fe=Te+Se,Ge=xe*Ue,nt=0;nt<3;++nt)Ne[nt]+=this._field[nt].get(He,Fe)*Ge;for(var qe=this._pickResult.level,$e=0;$e<3;++$e)if(qe[$e]=M.le(this.contourLevels[$e],Ne[$e]),qe[$e]<0)this.contourLevels[$e].length>0&&(qe[$e]=0);else if(qe[$e]Math.abs(ct-Ne[$e])&&(qe[$e]+=1)}for(le.index[0]=me<.5?he:he+1,le.index[1]=Oe<.5?Te:Te+1,le.uv[0]=ie/$[0],le.uv[1]=Me/$[1],nt=0;nt<3;++nt)le.dataCoordinate[nt]=this._field[nt].get(le.index[0],le.index[1]);return le},N.padField=function(q,$){var le=$.shape.slice(),ie=q.shape.slice();g.assign(q.lo(1,1).hi(le[0],le[1]),$),g.assign(q.lo(1).hi(le[0],1),$.hi(le[0],1)),g.assign(q.lo(1,ie[1]-1).hi(le[0],1),$.lo(0,le[1]-1).hi(le[0],1)),g.assign(q.lo(0,1).hi(1,le[1]),$.hi(1)),g.assign(q.lo(ie[0]-1,1).hi(1,le[1]),$.lo(le[0]-1)),q.set(0,0,$.get(0,0)),q.set(0,ie[1]-1,$.get(0,le[1]-1)),q.set(ie[0]-1,0,$.get(le[0]-1,0)),q.set(ie[0]-1,ie[1]-1,$.get(le[0]-1,le[1]-1))};function j(q,$){return Array.isArray(q)?[$(q[0]),$(q[1]),$(q[2])]:[$(q),$(q),$(q)]}function K(q){return Array.isArray(q)?q.length===3?[q[0],q[1],q[2],1]:[q[0],q[1],q[2],q[3]]:[0,0,0,1]}function ee(q){if(Array.isArray(q)){if(Array.isArray(q))return[K(q[0]),K(q[1]),K(q[2])];var $=K(q);return[$.slice(),$.slice(),$.slice()]}}N.update=function(q){q=q||{},this.objectOffset=q.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in q&&(this.contourWidth=j(q.contourWidth,Number)),"showContour"in q&&(this.showContour=j(q.showContour,Boolean)),"showSurface"in q&&(this.showSurface=!!q.showSurface),"contourTint"in q&&(this.contourTint=j(q.contourTint,Boolean)),"contourColor"in q&&(this.contourColor=ee(q.contourColor)),"contourProject"in q&&(this.contourProject=j(q.contourProject,function(Ft){return j(Ft,Boolean)})),"surfaceProject"in q&&(this.surfaceProject=q.surfaceProject),"dynamicColor"in q&&(this.dynamicColor=ee(q.dynamicColor)),"dynamicTint"in q&&(this.dynamicTint=j(q.dynamicTint,Number)),"dynamicWidth"in q&&(this.dynamicWidth=j(q.dynamicWidth,Number)),"opacity"in q&&(this.opacity=q.opacity),"opacityscale"in q&&(this.opacityscale=q.opacityscale),"colorBounds"in q&&(this.colorBounds=q.colorBounds),"vertexColor"in q&&(this.vertexColor=q.vertexColor?1:0),"colormap"in q&&this._colorMap.setPixels(this.genColormap(q.colormap,this.opacityscale));var $=q.field||q.coords&&q.coords[2]||null,le=!1;if($||(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 q||"coords"in q){var ie=($.shape[0]+2)*($.shape[1]+2);ie>this._field[2].data.length&&(c.freeFloat(this._field[2].data),this._field[2].data=c.mallocFloat(r.nextPow2(ie))),this._field[2]=w(this._field[2].data,[$.shape[0]+2,$.shape[1]+2]),this.padField(this._field[2],$),this.shape=$.shape.slice();for(var he=this.shape,me=0;me<2;++me)this._field[2].size>this._field[me].data.length&&(c.freeFloat(this._field[me].data),this._field[me].data=c.mallocFloat(this._field[2].size)),this._field[me]=w(this._field[me].data,[he[0]+2,he[1]+2]);if(q.coords){var Me=q.coords;if(!Array.isArray(Me)||Me.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(me=0;me<2;++me){var Te=Me[me];for(Se=0;Se<2;++Se)if(Te.shape[Se]!==he[Se])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[me],Te)}}else if(q.ticks){var Oe=q.ticks;if(!Array.isArray(Oe)||Oe.length!==2)throw new Error("gl-surface: invalid ticks");for(me=0;me<2;++me){var Ne=Oe[me];if((Array.isArray(Ne)||Ne.length)&&(Ne=w(Ne)),Ne.shape[0]!==he[me])throw new Error("gl-surface: invalid tick length");var Ee=w(Ne.data,he);Ee.stride[me]=Ne.stride[0],Ee.stride[me^1]=0,this.padField(this._field[me],Ee)}}else{for(me=0;me<2;++me){var xe=[0,0];xe[me]=1,this._field[me]=w(this._field[me].data,[he[0]+2,he[1]+2],xe,0)}this._field[0].set(0,0,0);for(var Se=0;Se0){for(var We=0;We<5;++We)Kt.pop();se-=1}continue e}}}jt.push(se)}this._contourOffsets[ir]=yt,this._contourCounts[ir]=jt}var Dt=c.mallocFloat(Kt.length);for(me=0;meB||z<0||z>B)throw new Error("gl-texture2d: Invalid texture size");return E._shape=[y,z],E.bind(),I.texImage2D(I.TEXTURE_2D,0,E.format,y,z,0,E.format,E.type,null),E._mipLevels=[0],E}function o(E,y,z,I,B,k){this.gl=E,this.handle=y,this.format=B,this.type=k,this._shape=[z,I],this._mipLevels=[0],this._magFilter=E.NEAREST,this._minFilter=E.NEAREST,this._wrapS=E.CLAMP_TO_EDGE,this._wrapT=E.CLAMP_TO_EDGE,this._anisoSamples=1;var O=this,N=[this._wrapS,this._wrapT];Object.defineProperties(N,[{get:function(){return O._wrapS},set:function(U){return O.wrapS=U}},{get:function(){return O._wrapT},set:function(U){return O.wrapT=U}}]),this._wrapVector=N;var _=[this._shape[0],this._shape[1]];Object.defineProperties(_,[{get:function(){return O._shape[0]},set:function(U){return O.width=U}},{get:function(){return O._shape[1]},set:function(U){return O.height=U}}]),this._shapeVector=_}var d=o.prototype;Object.defineProperties(d,{minFilter:{get:function(){return this._minFilter},set:function(E){this.bind();var y=this.gl;if(this.type===y.FLOAT&&l.indexOf(E)>=0&&(y.getExtension("OES_texture_float_linear")||(E=y.NEAREST)),c.indexOf(E)<0)throw new Error("gl-texture2d: Unknown filter mode "+E);return y.texParameteri(y.TEXTURE_2D,y.TEXTURE_MIN_FILTER,E),this._minFilter=E}},magFilter:{get:function(){return this._magFilter},set:function(E){this.bind();var y=this.gl;if(this.type===y.FLOAT&&l.indexOf(E)>=0&&(y.getExtension("OES_texture_float_linear")||(E=y.NEAREST)),c.indexOf(E)<0)throw new Error("gl-texture2d: Unknown filter mode "+E);return y.texParameteri(y.TEXTURE_2D,y.TEXTURE_MAG_FILTER,E),this._magFilter=E}},mipSamples:{get:function(){return this._anisoSamples},set:function(E){var y=this._anisoSamples;if(this._anisoSamples=Math.max(E,1)|0,y!==this._anisoSamples){var z=this.gl.getExtension("EXT_texture_filter_anisotropic");z&&this.gl.texParameterf(this.gl.TEXTURE_2D,z.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(E){if(this.bind(),u.indexOf(E)<0)throw new Error("gl-texture2d: Unknown wrap mode "+E);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,E),this._wrapS=E}},wrapT:{get:function(){return this._wrapT},set:function(E){if(this.bind(),u.indexOf(E)<0)throw new Error("gl-texture2d: Unknown wrap mode "+E);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,E),this._wrapT=E}},wrap:{get:function(){return this._wrapVector},set:function(E){if(Array.isArray(E)||(E=[E,E]),E.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var y=0;y<2;++y)if(u.indexOf(E[y])<0)throw new Error("gl-texture2d: Unknown wrap mode "+E);this._wrapS=E[0],this._wrapT=E[1];var z=this.gl;return this.bind(),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_S,this._wrapS),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_T,this._wrapT),E}},shape:{get:function(){return this._shapeVector},set:function(E){if(!Array.isArray(E))E=[E|0,E|0];else if(E.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return h(this,E[0]|0,E[1]|0),[E[0]|0,E[1]|0]}},width:{get:function(){return this._shape[0]},set:function(E){return E=E|0,h(this,E,this._shape[1]),E}},height:{get:function(){return this._shape[1]},set:function(E){return E=E|0,h(this,this._shape[0],E),E}}}),d.bind=function(E){var y=this.gl;return E!==void 0&&y.activeTexture(y.TEXTURE0+(E|0)),y.bindTexture(y.TEXTURE_2D,this.handle),E!==void 0?E|0:y.getParameter(y.ACTIVE_TEXTURE)-y.TEXTURE0},d.dispose=function(){this.gl.deleteTexture(this.handle)},d.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var E=Math.min(this._shape[0],this._shape[1]),y=0;E>0;++y,E>>>=1)this._mipLevels.indexOf(y)<0&&this._mipLevels.push(y)},d.setPixels=function(E,y,z,I){var B=this.gl;this.bind(),Array.isArray(y)?(I=z,z=y[1]|0,y=y[0]|0):(y=y||0,z=z||0),I=I||0;var k=f(E)?E:E.raw;if(k){var O=this._mipLevels.indexOf(I)<0;O?(B.texImage2D(B.TEXTURE_2D,0,this.format,this.format,this.type,k),this._mipLevels.push(I)):B.texSubImage2D(B.TEXTURE_2D,I,y,z,this.format,this.type,k)}else if(E.shape&&E.stride&&E.data){if(E.shape.length<2||y+E.shape[1]>this._shape[1]>>>I||z+E.shape[0]>this._shape[0]>>>I||y<0||z<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");T(B,y,z,I,this.format,this.type,this._mipLevels,E)}else throw new Error("gl-texture2d: Unsupported data type")};function M(E,y){return E.length===3?y[2]===1&&y[1]===E[0]*E[2]&&y[0]===E[2]:y[0]===1&&y[1]===E[0]}function T(E,y,z,I,B,k,O,N){var _=N.dtype,U=N.shape.slice();if(U.length<2||U.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var Y=0,J=0,te=M(U,N.stride.slice());if(_==="float32"?Y=E.FLOAT:_==="float64"?(Y=E.FLOAT,te=!1,_="float32"):_==="uint8"?Y=E.UNSIGNED_BYTE:(Y=E.UNSIGNED_BYTE,te=!1,_="uint8"),U.length===2)J=E.LUMINANCE,U=[U[0],U[1],1],N=r(N.data,U,[N.stride[0],N.stride[1],1],N.offset);else if(U.length===3){if(U[2]===1)J=E.ALPHA;else if(U[2]===2)J=E.LUMINANCE_ALPHA;else if(U[2]===3)J=E.RGB;else if(U[2]===4)J=E.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");U[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((J===E.LUMINANCE||J===E.ALPHA)&&(B===E.LUMINANCE||B===E.ALPHA)&&(J=B),J!==B)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var ae=N.size,ce=O.indexOf(I)<0;if(ce&&O.push(I),Y===k&&te)N.offset===0&&N.data.length===ae?ce?E.texImage2D(E.TEXTURE_2D,I,B,U[0],U[1],0,B,k,N.data):E.texSubImage2D(E.TEXTURE_2D,I,y,z,U[0],U[1],B,k,N.data):ce?E.texImage2D(E.TEXTURE_2D,I,B,U[0],U[1],0,B,k,N.data.subarray(N.offset,N.offset+ae)):E.texSubImage2D(E.TEXTURE_2D,I,y,z,U[0],U[1],B,k,N.data.subarray(N.offset,N.offset+ae));else{var Q;k===E.FLOAT?Q=n.mallocFloat32(ae):Q=n.mallocUint8(ae);var Z=r(Q,U,[U[2],U[2]*U[0],1]);Y===E.FLOAT&&k===E.UNSIGNED_BYTE?w(Z,N):s.assign(Z,N),ce?E.texImage2D(E.TEXTURE_2D,I,B,U[0],U[1],0,B,k,Q.subarray(0,ae)):E.texSubImage2D(E.TEXTURE_2D,I,y,z,U[0],U[1],B,k,Q.subarray(0,ae)),k===E.FLOAT?n.freeFloat32(Q):n.freeUint8(Q)}}function C(E){var y=E.createTexture();return E.bindTexture(E.TEXTURE_2D,y),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_MIN_FILTER,E.NEAREST),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_MAG_FILTER,E.NEAREST),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_WRAP_S,E.CLAMP_TO_EDGE),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_WRAP_T,E.CLAMP_TO_EDGE),y}function x(E,y,z,I,B){var k=E.getParameter(E.MAX_TEXTURE_SIZE);if(y<0||y>k||z<0||z>k)throw new Error("gl-texture2d: Invalid texture shape");if(B===E.FLOAT&&!E.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var O=C(E);return E.texImage2D(E.TEXTURE_2D,0,I,y,z,0,I,B,null),new o(E,O,y,z,I,B)}function S(E,y,z,I,B,k){var O=C(E);return E.texImage2D(E.TEXTURE_2D,0,B,B,k,y),new o(E,O,z,I,B,k)}function b(E,y){var z=y.dtype,I=y.shape.slice(),B=E.getParameter(E.MAX_TEXTURE_SIZE);if(I[0]<0||I[0]>B||I[1]<0||I[1]>B)throw new Error("gl-texture2d: Invalid texture size");var k=M(I,y.stride.slice()),O=0;z==="float32"?O=E.FLOAT:z==="float64"?(O=E.FLOAT,k=!1,z="float32"):z==="uint8"?O=E.UNSIGNED_BYTE:(O=E.UNSIGNED_BYTE,k=!1,z="uint8");var N=0;if(I.length===2)N=E.LUMINANCE,I=[I[0],I[1],1],y=r(y.data,I,[y.stride[0],y.stride[1],1],y.offset);else if(I.length===3)if(I[2]===1)N=E.ALPHA;else if(I[2]===2)N=E.LUMINANCE_ALPHA;else if(I[2]===3)N=E.RGB;else if(I[2]===4)N=E.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");O===E.FLOAT&&!E.getExtension("OES_texture_float")&&(O=E.UNSIGNED_BYTE,k=!1);var _,U,Y=y.size;if(k)y.offset===0&&y.data.length===Y?_=y.data:_=y.data.subarray(y.offset,y.offset+Y);else{var J=[I[2],I[2]*I[0],1];U=n.malloc(Y,z);var te=r(U,I,J,0);(z==="float32"||z==="float64")&&O===E.UNSIGNED_BYTE?w(te,y):s.assign(te,y),_=U.subarray(0,Y)}var ae=C(E);return E.texImage2D(E.TEXTURE_2D,0,N,I[0],I[1],0,N,O,_),k||n.free(U),new o(E,ae,I[0],I[1],N,O)}function a(E){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(l||g(E),typeof arguments[1]=="number")return x(E,arguments[1],arguments[2],arguments[3]||E.RGBA,arguments[4]||E.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return x(E,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||E.RGBA,arguments[3]||E.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var y=arguments[1],z=f(y)?y:y.raw;if(z)return S(E,z,y.width|0,y.height|0,arguments[2]||E.RGBA,arguments[3]||E.UNSIGNED_BYTE);if(y.shape&&y.data&&y.stride)return b(E,y)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},3056:function(v){function p(t,r,s){r?r.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var n=t.getParameter(t.MAX_VERTEX_ATTRIBS)|0;if(s){if(s.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var l=0;l1?0:Math.acos(w)}},8827:function(v){v.exports=p;function p(t,r){return t[0]=Math.ceil(r[0]),t[1]=Math.ceil(r[1]),t[2]=Math.ceil(r[2]),t}},7622:function(v){v.exports=p;function p(t){var r=new Float32Array(3);return r[0]=t[0],r[1]=t[1],r[2]=t[2],r}},8782:function(v){v.exports=p;function p(t,r){return t[0]=r[0],t[1]=r[1],t[2]=r[2],t}},8501:function(v){v.exports=p;function p(){var t=new Float32Array(3);return t[0]=0,t[1]=0,t[2]=0,t}},903:function(v){v.exports=p;function p(t,r,s){var n=r[0],l=r[1],c=r[2],u=s[0],g=s[1],f=s[2];return t[0]=l*f-c*g,t[1]=c*u-n*f,t[2]=n*g-l*u,t}},5981:function(v,p,t){v.exports=t(8288)},8288:function(v){v.exports=p;function p(t,r){var s=r[0]-t[0],n=r[1]-t[1],l=r[2]-t[2];return Math.sqrt(s*s+n*n+l*l)}},8629:function(v,p,t){v.exports=t(7979)},7979:function(v){v.exports=p;function p(t,r,s){return t[0]=r[0]/s[0],t[1]=r[1]/s[1],t[2]=r[2]/s[2],t}},9305:function(v){v.exports=p;function p(t,r){return t[0]*r[0]+t[1]*r[1]+t[2]*r[2]}},154:function(v){v.exports=1e-6},4932:function(v,p,t){v.exports=s;var r=t(154);function s(n,l){var c=n[0],u=n[1],g=n[2],f=l[0],w=l[1],h=l[2];return Math.abs(c-f)<=r*Math.max(1,Math.abs(c),Math.abs(f))&&Math.abs(u-w)<=r*Math.max(1,Math.abs(u),Math.abs(w))&&Math.abs(g-h)<=r*Math.max(1,Math.abs(g),Math.abs(h))}},5777:function(v){v.exports=p;function p(t,r){return t[0]===r[0]&&t[1]===r[1]&&t[2]===r[2]}},3306:function(v){v.exports=p;function p(t,r){return t[0]=Math.floor(r[0]),t[1]=Math.floor(r[1]),t[2]=Math.floor(r[2]),t}},7447:function(v,p,t){v.exports=s;var r=t(8501)();function s(n,l,c,u,g,f){var w,h;for(l||(l=3),c||(c=0),u?h=Math.min(u*l+c,n.length):h=n.length,w=c;w0&&(c=1/Math.sqrt(c),t[0]=r[0]*c,t[1]=r[1]*c,t[2]=r[2]*c),t}},6660:function(v){v.exports=p;function p(t,r){r=r||1;var s=Math.random()*2*Math.PI,n=Math.random()*2-1,l=Math.sqrt(1-n*n)*r;return t[0]=Math.cos(s)*l,t[1]=Math.sin(s)*l,t[2]=n*r,t}},392:function(v){v.exports=p;function p(t,r,s,n){var l=s[1],c=s[2],u=r[1]-l,g=r[2]-c,f=Math.sin(n),w=Math.cos(n);return t[0]=r[0],t[1]=l+u*w-g*f,t[2]=c+u*f+g*w,t}},3222:function(v){v.exports=p;function p(t,r,s,n){var l=s[0],c=s[2],u=r[0]-l,g=r[2]-c,f=Math.sin(n),w=Math.cos(n);return t[0]=l+g*f+u*w,t[1]=r[1],t[2]=c+g*w-u*f,t}},3388:function(v){v.exports=p;function p(t,r,s,n){var l=s[0],c=s[1],u=r[0]-l,g=r[1]-c,f=Math.sin(n),w=Math.cos(n);return t[0]=l+u*w-g*f,t[1]=c+u*f+g*w,t[2]=r[2],t}},1624:function(v){v.exports=p;function p(t,r){return t[0]=Math.round(r[0]),t[1]=Math.round(r[1]),t[2]=Math.round(r[2]),t}},5685:function(v){v.exports=p;function p(t,r,s){return t[0]=r[0]*s,t[1]=r[1]*s,t[2]=r[2]*s,t}},6722:function(v){v.exports=p;function p(t,r,s,n){return t[0]=r[0]+s[0]*n,t[1]=r[1]+s[1]*n,t[2]=r[2]+s[2]*n,t}},831:function(v){v.exports=p;function p(t,r,s,n){return t[0]=r,t[1]=s,t[2]=n,t}},5294:function(v,p,t){v.exports=t(6403)},3303:function(v,p,t){v.exports=t(4337)},6403:function(v){v.exports=p;function p(t,r){var s=r[0]-t[0],n=r[1]-t[1],l=r[2]-t[2];return s*s+n*n+l*l}},4337:function(v){v.exports=p;function p(t){var r=t[0],s=t[1],n=t[2];return r*r+s*s+n*n}},8921:function(v,p,t){v.exports=t(911)},911:function(v){v.exports=p;function p(t,r,s){return t[0]=r[0]-s[0],t[1]=r[1]-s[1],t[2]=r[2]-s[2],t}},9908:function(v){v.exports=p;function p(t,r,s){var n=r[0],l=r[1],c=r[2];return t[0]=n*s[0]+l*s[3]+c*s[6],t[1]=n*s[1]+l*s[4]+c*s[7],t[2]=n*s[2]+l*s[5]+c*s[8],t}},3255:function(v){v.exports=p;function p(t,r,s){var n=r[0],l=r[1],c=r[2],u=s[3]*n+s[7]*l+s[11]*c+s[15];return u=u||1,t[0]=(s[0]*n+s[4]*l+s[8]*c+s[12])/u,t[1]=(s[1]*n+s[5]*l+s[9]*c+s[13])/u,t[2]=(s[2]*n+s[6]*l+s[10]*c+s[14])/u,t}},6568:function(v){v.exports=p;function p(t,r,s){var n=r[0],l=r[1],c=r[2],u=s[0],g=s[1],f=s[2],w=s[3],h=w*n+g*c-f*l,o=w*l+f*n-u*c,d=w*c+u*l-g*n,M=-u*n-g*l-f*c;return t[0]=h*w+M*-u+o*-f-d*-g,t[1]=o*w+M*-g+d*-u-h*-f,t[2]=d*w+M*-f+h*-g-o*-u,t}},3433:function(v){v.exports=p;function p(t,r,s){return t[0]=r[0]+s[0],t[1]=r[1]+s[1],t[2]=r[2]+s[2],t[3]=r[3]+s[3],t}},1413:function(v){v.exports=p;function p(t){var r=new Float32Array(4);return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r}},3470:function(v){v.exports=p;function p(t,r){return t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t}},5313:function(v){v.exports=p;function p(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},5446:function(v){v.exports=p;function p(t,r){var s=r[0]-t[0],n=r[1]-t[1],l=r[2]-t[2],c=r[3]-t[3];return Math.sqrt(s*s+n*n+l*l+c*c)}},205:function(v){v.exports=p;function p(t,r,s){return t[0]=r[0]/s[0],t[1]=r[1]/s[1],t[2]=r[2]/s[2],t[3]=r[3]/s[3],t}},4242:function(v){v.exports=p;function p(t,r){return t[0]*r[0]+t[1]*r[1]+t[2]*r[2]+t[3]*r[3]}},5680:function(v){v.exports=p;function p(t,r,s,n){var l=new Float32Array(4);return l[0]=t,l[1]=r,l[2]=s,l[3]=n,l}},4020:function(v,p,t){v.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(v){v.exports=p;function p(t,r){return t[0]=1/r[0],t[1]=1/r[1],t[2]=1/r[2],t[3]=1/r[3],t}},8177:function(v){v.exports=p;function p(t){var r=t[0],s=t[1],n=t[2],l=t[3];return Math.sqrt(r*r+s*s+n*n+l*l)}},8746:function(v){v.exports=p;function p(t,r,s,n){var l=r[0],c=r[1],u=r[2],g=r[3];return t[0]=l+n*(s[0]-l),t[1]=c+n*(s[1]-c),t[2]=u+n*(s[2]-u),t[3]=g+n*(s[3]-g),t}},3030:function(v){v.exports=p;function p(t,r,s){return t[0]=Math.max(r[0],s[0]),t[1]=Math.max(r[1],s[1]),t[2]=Math.max(r[2],s[2]),t[3]=Math.max(r[3],s[3]),t}},2170:function(v){v.exports=p;function p(t,r,s){return t[0]=Math.min(r[0],s[0]),t[1]=Math.min(r[1],s[1]),t[2]=Math.min(r[2],s[2]),t[3]=Math.min(r[3],s[3]),t}},746:function(v){v.exports=p;function p(t,r,s){return t[0]=r[0]*s[0],t[1]=r[1]*s[1],t[2]=r[2]*s[2],t[3]=r[3]*s[3],t}},6459:function(v){v.exports=p;function p(t,r){return t[0]=-r[0],t[1]=-r[1],t[2]=-r[2],t[3]=-r[3],t}},381:function(v){v.exports=p;function p(t,r){var s=r[0],n=r[1],l=r[2],c=r[3],u=s*s+n*n+l*l+c*c;return u>0&&(u=1/Math.sqrt(u),t[0]=s*u,t[1]=n*u,t[2]=l*u,t[3]=c*u),t}},3770:function(v,p,t){var r=t(381),s=t(5510);v.exports=n;function n(l,c){return c=c||1,l[0]=Math.random(),l[1]=Math.random(),l[2]=Math.random(),l[3]=Math.random(),r(l,l),s(l,l,c),l}},5510:function(v){v.exports=p;function p(t,r,s){return t[0]=r[0]*s,t[1]=r[1]*s,t[2]=r[2]*s,t[3]=r[3]*s,t}},4224:function(v){v.exports=p;function p(t,r,s,n){return t[0]=r[0]+s[0]*n,t[1]=r[1]+s[1]*n,t[2]=r[2]+s[2]*n,t[3]=r[3]+s[3]*n,t}},6453:function(v){v.exports=p;function p(t,r,s,n,l){return t[0]=r,t[1]=s,t[2]=n,t[3]=l,t}},1542:function(v){v.exports=p;function p(t,r){var s=r[0]-t[0],n=r[1]-t[1],l=r[2]-t[2],c=r[3]-t[3];return s*s+n*n+l*l+c*c}},9037:function(v){v.exports=p;function p(t){var r=t[0],s=t[1],n=t[2],l=t[3];return r*r+s*s+n*n+l*l}},2705:function(v){v.exports=p;function p(t,r,s){return t[0]=r[0]-s[0],t[1]=r[1]-s[1],t[2]=r[2]-s[2],t[3]=r[3]-s[3],t}},6342:function(v){v.exports=p;function p(t,r,s){var n=r[0],l=r[1],c=r[2],u=r[3];return t[0]=s[0]*n+s[4]*l+s[8]*c+s[12]*u,t[1]=s[1]*n+s[5]*l+s[9]*c+s[13]*u,t[2]=s[2]*n+s[6]*l+s[10]*c+s[14]*u,t[3]=s[3]*n+s[7]*l+s[11]*c+s[15]*u,t}},5022:function(v){v.exports=p;function p(t,r,s){var n=r[0],l=r[1],c=r[2],u=s[0],g=s[1],f=s[2],w=s[3],h=w*n+g*c-f*l,o=w*l+f*n-u*c,d=w*c+u*l-g*n,M=-u*n-g*l-f*c;return t[0]=h*w+M*-u+o*-f-d*-g,t[1]=o*w+M*-g+d*-u-h*-f,t[2]=d*w+M*-f+h*-g-o*-u,t[3]=r[3],t}},9365:function(v,p,t){var r=t(8096),s=t(7896);v.exports=n;function n(l){for(var c=Array.isArray(l)?l:r(l),u=0;u0)continue;nt=He.slice(0,1).join("")}return q(nt),te+=nt.length,_=_.slice(nt.length),_.length}while(1)}function Ee(){return/[^a-fA-F0-9]/.test(O)?(q(_.join("")),k=u,I):(_.push(O),N=O,I+1)}function xe(){return O==="."||/[eE]/.test(O)?(_.push(O),k=M,N=O,I+1):O==="x"&&_.length===1&&_[0]==="0"?(k=a,_.push(O),N=O,I+1):/[^\d]/.test(O)?(q(_.join("")),k=u,I):(_.push(O),N=O,I+1)}function Se(){return O==="f"&&(_.push(O),N=O,I+=1),/[eE]/.test(O)||(O==="-"||O==="+")&&/[eE]/.test(N)?(_.push(O),N=O,I+1):/[^\d]/.test(O)?(q(_.join("")),k=u,I):(_.push(O),N=O,I+1)}function Ue(){if(/[^\d\w_]/.test(O)){var He=_.join("");return oe[He]?k=x:ee[He]?k=C:k=T,q(_.join("")),k=u,I}return _.push(O),N=O,I+1}}},3585:function(v,p,t){var r=t(9525);r=r.slice().filter(function(s){return!/^(gl\_|texture)/.test(s)}),v.exports=r.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(v){v.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(v,p,t){var r=t(399);v.exports=r.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(v){v.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(v){v.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},8096:function(v,p,t){var r=t(3193);v.exports=s;function s(n,l){var c=r(l),u=[];return u=u.concat(c(n)),u=u.concat(c(null)),u}},6832:function(v){v.exports=function(p){typeof p=="string"&&(p=[p]);for(var t=[].slice.call(arguments,1),r=[],s=0;s0;){d=b.pop();for(var a=d.adjacent,E=0;E<=T;++E){var y=a[E];if(!(!y.boundary||y.lastVisited<=-C)){for(var z=y.vertices,I=0;I<=T;++I){var B=z[I];B<0?x[I]=M:x[I]=S[B]}var k=this.orient();if(k>0)return y;y.lastVisited=-C,k===0&&b.push(y)}}}return null},h.walk=function(d,M){var T=this.vertices.length-1,C=this.dimension,x=this.vertices,S=this.tuple,b=M?this.interior.length*Math.random()|0:this.interior.length-1,a=this.interior[b];e:for(;!a.boundary;){for(var E=a.vertices,y=a.adjacent,z=0;z<=C;++z)S[z]=x[E[z]];a.lastVisited=T;for(var z=0;z<=C;++z){var I=y[z];if(!(I.lastVisited>=T)){var B=S[z];S[z]=d;var k=this.orient();if(S[z]=B,k<0){a=I;continue e}else I.boundary?I.lastVisited=-T:I.lastVisited=T}}return}return a},h.addPeaks=function(d,M){var T=this.vertices.length-1,C=this.dimension,x=this.vertices,S=this.tuple,b=this.interior,a=this.simplices,E=[M];M.lastVisited=T,M.vertices[M.vertices.indexOf(-1)]=T,M.boundary=!1,b.push(M);for(var y=[];E.length>0;){var M=E.pop(),z=M.vertices,I=M.adjacent,B=z.indexOf(T);if(!(B<0)){for(var k=0;k<=C;++k)if(k!==B){var O=I[k];if(!(!O.boundary||O.lastVisited>=T)){var N=O.vertices;if(O.lastVisited!==-T){for(var _=0,U=0;U<=C;++U)N[U]<0?(_=U,S[U]=d):S[U]=x[N[U]];var Y=this.orient();if(Y>0){N[_]=T,O.boundary=!1,b.push(O),E.push(O),O.lastVisited=T;continue}else O.lastVisited=-T}var J=O.adjacent,te=z.slice(),ae=I.slice(),ce=new n(te,ae,!0);a.push(ce);var Q=J.indexOf(M);if(!(Q<0)){J[Q]=ce,ae[B]=O,te[k]=-1,ae[k]=M,I[k]=ce,ce.flip();for(var U=0;U<=C;++U){var Z=te[U];if(!(Z<0||Z===T)){for(var j=new Array(C-1),K=0,ee=0;ee<=C;++ee){var oe=te[ee];oe<0||ee===U||(j[K++]=oe)}y.push(new l(j,ce,U))}}}}}}}y.sort(c);for(var k=0;k+1=0?b[E++]=a[z]:y=z&1;if(y===(d&1)){var I=b[0];b[0]=b[1],b[1]=I}M.push(b)}}return M};function o(d,M){var T=d.length;if(T===0)throw new Error("Must have at least d+1 points");var C=d[0].length;if(T<=C)throw new Error("Must input at least d+1 points");var x=d.slice(0,C+1),S=r.apply(void 0,x);if(S===0)throw new Error("Input not in general position");for(var b=new Array(C+1),a=0;a<=C;++a)b[a]=a;S<0&&(b[0]=1,b[1]=0);for(var E=new n(b,new Array(C+1),!1),y=E.adjacent,z=new Array(C+2),a=0;a<=C;++a){for(var I=b.slice(),B=0;B<=C;++B)B===a&&(I[B]=-1);var k=I[0];I[0]=I[1],I[1]=k;var O=new n(I,new Array(C+1),!0);y[a]=O,z[a]=O}z[C+1]=E;for(var a=0;a<=C;++a)for(var I=y[a].vertices,N=y[a].adjacent,B=0;B<=C;++B){var _=I[B];if(_<0){N[B]=E;continue}for(var U=0;U<=C;++U)y[U].vertices.indexOf(_)<0&&(N[B]=y[U])}for(var Y=new w(C,x,z),J=!!M,a=C+1;a3*(z+1)?w(this,y):this.left.insert(y):this.left=S([y]);else if(y[0]>this.mid)this.right?4*(this.right.count+1)>3*(z+1)?w(this,y):this.right.insert(y):this.right=S([y]);else{var I=r.ge(this.leftPoints,y,C),B=r.ge(this.rightPoints,y,x);this.leftPoints.splice(I,0,y),this.rightPoints.splice(B,0,y)}},u.remove=function(y){var z=this.count-this.leftPoints;if(y[1]3*(z-1))return h(this,y);var B=this.left.remove(y);return B===l?(this.left=null,this.count-=1,n):(B===n&&(this.count-=1),B)}else if(y[0]>this.mid){if(!this.right)return s;var k=this.left?this.left.count:0;if(4*k>3*(z-1))return h(this,y);var B=this.right.remove(y);return B===l?(this.right=null,this.count-=1,n):(B===n&&(this.count-=1),B)}else{if(this.count===1)return this.leftPoints[0]===y?l:s;if(this.leftPoints.length===1&&this.leftPoints[0]===y){if(this.left&&this.right){for(var O=this,N=this.left;N.right;)O=N,N=N.right;if(O===this)N.right=this.right;else{var _=this.left,B=this.right;O.count-=N.count,O.right=N.left,N.left=_,N.right=B}g(this,N),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?g(this,this.left):g(this,this.right);return n}for(var _=r.ge(this.leftPoints,y,C);_=0&&y[B][1]>=z;--B){var k=I(y[B]);if(k)return k}}function M(y,z){for(var I=0;Ithis.mid){if(this.right){var I=this.right.queryPoint(y,z);if(I)return I}return d(this.rightPoints,y,z)}else return M(this.leftPoints,z)},u.queryInterval=function(y,z,I){if(ythis.mid&&this.right){var B=this.right.queryInterval(y,z,I);if(B)return B}return zthis.mid?d(this.rightPoints,y,I):M(this.leftPoints,I)};function T(y,z){return y-z}function C(y,z){var I=y[0]-z[0];return I||y[1]-z[1]}function x(y,z){var I=y[1]-z[1];return I||y[0]-z[0]}function S(y){if(y.length===0)return null;for(var z=[],I=0;I>1],k=[],O=[],N=[],I=0;I * @license MIT */v.exports=function(r){return r!=null&&(p(r)||t(r)||!!r._isBuffer)};function p(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function t(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&p(r.slice(0,0))}},3596:function(v){v.exports=function(p){for(var t=p.length,r,s=0;s13)&&r!==32&&r!==133&&r!==160&&r!==5760&&r!==6158&&(r<8192||r>8205)&&r!==8232&&r!==8233&&r!==8239&&r!==8287&&r!==8288&&r!==12288&&r!==65279)return!1;return!0}},3578:function(v){function p(t,r,s){return t*(1-s)+r*s}v.exports=p},7191:function(v,p,t){var r=t(4690),s=t(9823),n=t(7332),l=t(7787),c=t(7437),u=t(2142),g={length:t(4693),normalize:t(899),dot:t(9305),cross:t(903)},f=s(),w=s(),h=[0,0,0,0],o=[[0,0,0],[0,0,0],[0,0,0]],d=[0,0,0];v.exports=function(S,b,a,E,y,z){if(b||(b=[0,0,0]),a||(a=[0,0,0]),E||(E=[0,0,0]),y||(y=[0,0,0,1]),z||(z=[0,0,0,1]),!r(f,S)||(n(w,f),w[3]=0,w[7]=0,w[11]=0,w[15]=1,Math.abs(l(w)<1e-8)))return!1;var I=f[3],B=f[7],k=f[11],O=f[12],N=f[13],_=f[14],U=f[15];if(I!==0||B!==0||k!==0){h[0]=I,h[1]=B,h[2]=k,h[3]=U;var Y=c(w,w);if(!Y)return!1;u(w,w),M(y,h,w)}else y[0]=y[1]=y[2]=0,y[3]=1;if(b[0]=O,b[1]=N,b[2]=_,T(o,f),a[0]=g.length(o[0]),g.normalize(o[0],o[0]),E[0]=g.dot(o[0],o[1]),C(o[1],o[1],o[0],1,-E[0]),a[1]=g.length(o[1]),g.normalize(o[1],o[1]),E[0]/=a[1],E[1]=g.dot(o[0],o[2]),C(o[2],o[2],o[0],1,-E[1]),E[2]=g.dot(o[1],o[2]),C(o[2],o[2],o[1],1,-E[2]),a[2]=g.length(o[2]),g.normalize(o[2],o[2]),E[1]/=a[2],E[2]/=a[2],g.cross(d,o[1],o[2]),g.dot(o[0],d)<0)for(var J=0;J<3;J++)a[J]*=-1,o[J][0]*=-1,o[J][1]*=-1,o[J][2]*=-1;return z[0]=.5*Math.sqrt(Math.max(1+o[0][0]-o[1][1]-o[2][2],0)),z[1]=.5*Math.sqrt(Math.max(1-o[0][0]+o[1][1]-o[2][2],0)),z[2]=.5*Math.sqrt(Math.max(1-o[0][0]-o[1][1]+o[2][2],0)),z[3]=.5*Math.sqrt(Math.max(1+o[0][0]+o[1][1]+o[2][2],0)),o[2][1]>o[1][2]&&(z[0]=-z[0]),o[0][2]>o[2][0]&&(z[1]=-z[1]),o[1][0]>o[0][1]&&(z[2]=-z[2]),!0};function M(x,S,b){var a=S[0],E=S[1],y=S[2],z=S[3];return x[0]=b[0]*a+b[4]*E+b[8]*y+b[12]*z,x[1]=b[1]*a+b[5]*E+b[9]*y+b[13]*z,x[2]=b[2]*a+b[6]*E+b[10]*y+b[14]*z,x[3]=b[3]*a+b[7]*E+b[11]*y+b[15]*z,x}function T(x,S){x[0][0]=S[0],x[0][1]=S[1],x[0][2]=S[2],x[1][0]=S[4],x[1][1]=S[5],x[1][2]=S[6],x[2][0]=S[8],x[2][1]=S[9],x[2][2]=S[10]}function C(x,S,b,a,E){x[0]=S[0]*a+b[0]*E,x[1]=S[1]*a+b[1]*E,x[2]=S[2]*a+b[2]*E}},4690:function(v){v.exports=function(t,r){var s=r[15];if(s===0)return!1;for(var n=1/s,l=0;l<16;l++)t[l]=r[l]*n;return!0}},7649:function(v,p,t){var r=t(1868),s=t(1102),n=t(7191),l=t(7787),c=t(1116),u=h(),g=h(),f=h();v.exports=w;function w(M,T,C,x){if(l(T)===0||l(C)===0)return!1;var S=n(T,u.translate,u.scale,u.skew,u.perspective,u.quaternion),b=n(C,g.translate,g.scale,g.skew,g.perspective,g.quaternion);return!S||!b?!1:(r(f.translate,u.translate,g.translate,x),r(f.skew,u.skew,g.skew,x),r(f.scale,u.scale,g.scale,x),r(f.perspective,u.perspective,g.perspective,x),c(f.quaternion,u.quaternion,g.quaternion,x),s(M,f.translate,f.scale,f.skew,f.perspective,f.quaternion),!0)}function h(){return{translate:o(),scale:o(1),skew:o(),perspective:d(),quaternion:d()}}function o(M){return[M||0,M||0,M||0]}function d(){return[0,0,0,1]}},1102:function(v,p,t){var r={identity:t(9947),translate:t(998),multiply:t(104),create:t(9823),scale:t(3668),fromRotationTranslation:t(7280)};r.create();var s=r.create();v.exports=function(l,c,u,g,f,w){return r.identity(l),r.fromRotationTranslation(l,w,c),l[3]=f[0],l[7]=f[1],l[11]=f[2],l[15]=f[3],r.identity(s),g[2]!==0&&(s[9]=g[2],r.multiply(l,l,s)),g[1]!==0&&(s[9]=0,s[8]=g[1],r.multiply(l,l,s)),g[0]!==0&&(s[8]=0,s[4]=g[0],r.multiply(l,l,s)),r.scale(l,l,u),l}},9298:function(v,p,t){var r=t(5070),s=t(7649),n=t(7437),l=t(6109),c=t(7115),u=t(5240),g=t(3012),f=t(998);t(3668);var w=t(899),h=[0,0,0];v.exports=T;function o(C){this._components=C.slice(),this._time=[0],this.prevMatrix=C.slice(),this.nextMatrix=C.slice(),this.computedMatrix=C.slice(),this.computedInverse=C.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}var d=o.prototype;d.recalcMatrix=function(C){var x=this._time,S=r.le(x,C),b=this.computedMatrix;if(!(S<0)){var a=this._components;if(S===x.length-1)for(var E=16*S,y=0;y<16;++y)b[y]=a[E++];else{for(var z=x[S+1]-x[S],E=16*S,I=this.prevMatrix,B=!0,y=0;y<16;++y)I[y]=a[E++];for(var k=this.nextMatrix,y=0;y<16;++y)k[y]=a[E++],B=B&&I[y]===k[y];if(z<1e-6||B)for(var y=0;y<16;++y)b[y]=I[y];else s(b,I,k,(C-x[S])/z)}var O=this.computedUp;O[0]=b[1],O[1]=b[5],O[2]=b[9],w(O,O);var N=this.computedInverse;n(N,b);var _=this.computedEye,U=N[15];_[0]=N[12]/U,_[1]=N[13]/U,_[2]=N[14]/U;for(var Y=this.computedCenter,J=Math.exp(this.computedRadius[0]),y=0;y<3;++y)Y[y]=_[y]-b[2+4*y]*J}},d.idle=function(C){if(!(C1&&r(n[g[o-2]],n[g[o-1]],h)<=0;)o-=1,g.pop();for(g.push(w),o=f.length;o>1&&r(n[f[o-2]],n[f[o-1]],h)>=0;)o-=1,f.pop();f.push(w)}for(var d=new Array(f.length+g.length-2),M=0,c=0,T=g.length;c0;--C)d[M++]=f[C];return d}},6145:function(v,p,t){v.exports=s;var r=t(4110);function s(n,l){l||(l=n,n=window);var c=0,u=0,g=0,f={shift:!1,alt:!1,control:!1,meta:!1},w=!1;function h(y){var z=!1;return"altKey"in y&&(z=z||y.altKey!==f.alt,f.alt=!!y.altKey),"shiftKey"in y&&(z=z||y.shiftKey!==f.shift,f.shift=!!y.shiftKey),"ctrlKey"in y&&(z=z||y.ctrlKey!==f.control,f.control=!!y.ctrlKey),"metaKey"in y&&(z=z||y.metaKey!==f.meta,f.meta=!!y.metaKey),z}function o(y,z){var I=r.x(z),B=r.y(z);"buttons"in z&&(y=z.buttons|0),(y!==c||I!==u||B!==g||h(z))&&(c=y|0,u=I||0,g=B||0,l&&l(c,u,g,f))}function d(y){o(0,y)}function M(){(c||u||g||f.shift||f.alt||f.meta||f.control)&&(u=g=0,c=0,f.shift=f.alt=f.control=f.meta=!1,l&&l(0,0,0,f))}function T(y){h(y)&&l&&l(c,u,g,f)}function C(y){r.buttons(y)===0?o(0,y):o(c,y)}function x(y){o(c|r.buttons(y),y)}function S(y){o(c&~r.buttons(y),y)}function b(){w||(w=!0,n.addEventListener("mousemove",C),n.addEventListener("mousedown",x),n.addEventListener("mouseup",S),n.addEventListener("mouseleave",d),n.addEventListener("mouseenter",d),n.addEventListener("mouseout",d),n.addEventListener("mouseover",d),n.addEventListener("blur",M),n.addEventListener("keyup",T),n.addEventListener("keydown",T),n.addEventListener("keypress",T),n!==window&&(window.addEventListener("blur",M),window.addEventListener("keyup",T),window.addEventListener("keydown",T),window.addEventListener("keypress",T)))}function a(){w&&(w=!1,n.removeEventListener("mousemove",C),n.removeEventListener("mousedown",x),n.removeEventListener("mouseup",S),n.removeEventListener("mouseleave",d),n.removeEventListener("mouseenter",d),n.removeEventListener("mouseout",d),n.removeEventListener("mouseover",d),n.removeEventListener("blur",M),n.removeEventListener("keyup",T),n.removeEventListener("keydown",T),n.removeEventListener("keypress",T),n!==window&&(window.removeEventListener("blur",M),window.removeEventListener("keyup",T),window.removeEventListener("keydown",T),window.removeEventListener("keypress",T)))}b();var E={element:n};return Object.defineProperties(E,{enabled:{get:function(){return w},set:function(y){y?b():a()},enumerable:!0},buttons:{get:function(){return c},enumerable:!0},x:{get:function(){return u},enumerable:!0},y:{get:function(){return g},enumerable:!0},mods:{get:function(){return f},enumerable:!0}}),E}},2565:function(v){var p={left:0,top:0};v.exports=t;function t(s,n,l){n=n||s.currentTarget||s.srcElement,Array.isArray(l)||(l=[0,0]);var c=s.clientX||0,u=s.clientY||0,g=r(n);return l[0]=c-g.left,l[1]=u-g.top,l}function r(s){return s===window||s===document||s===document.body?p:s.getBoundingClientRect()}},4110:function(v,p){function t(l){if(typeof l=="object"){if("buttons"in l)return l.buttons;if("which"in l){var c=l.which;if(c===2)return 4;if(c===3)return 2;if(c>0)return 1<=0)return 1<0){if(ae=1,Z[K++]=f(b[z],M,T,C),z+=Y,x>0)for(te=1,I=b[z],ee=Z[K]=f(I,M,T,C),$=Z[K+oe],he=Z[K+le],Te=Z[K+me],(ee!==$||ee!==he||ee!==Te)&&(k=b[z+B],N=b[z+O],U=b[z+_],u(te,ae,I,k,N,U,ee,$,he,Te,M,T,C),Oe=j[K]=ce++),K+=1,z+=Y,te=2;te0)for(te=1,I=b[z],ee=Z[K]=f(I,M,T,C),$=Z[K+oe],he=Z[K+le],Te=Z[K+me],(ee!==$||ee!==he||ee!==Te)&&(k=b[z+B],N=b[z+O],U=b[z+_],u(te,ae,I,k,N,U,ee,$,he,Te,M,T,C),Oe=j[K]=ce++,Te!==he&&g(j[K+le],Oe,N,U,he,Te,M,T,C)),K+=1,z+=Y,te=2;te0){if(te=1,Z[K++]=f(b[z],M,T,C),z+=Y,S>0)for(ae=1,I=b[z],ee=Z[K]=f(I,M,T,C),he=Z[K+le],$=Z[K+oe],Te=Z[K+me],(ee!==he||ee!==$||ee!==Te)&&(k=b[z+B],N=b[z+O],U=b[z+_],u(te,ae,I,k,N,U,ee,he,$,Te,M,T,C),Oe=j[K]=ce++),K+=1,z+=Y,ae=2;ae0)for(ae=1,I=b[z],ee=Z[K]=f(I,M,T,C),he=Z[K+le],$=Z[K+oe],Te=Z[K+me],(ee!==he||ee!==$||ee!==Te)&&(k=b[z+B],N=b[z+O],U=b[z+_],u(te,ae,I,k,N,U,ee,he,$,Te,M,T,C),Oe=j[K]=ce++,Te!==he&&g(j[K+le],Oe,U,k,Te,he,M,T,C)),K+=1,z+=Y,ae=2;ae 0"),typeof c.vertex!="function"&&u("Must specify vertex creation function"),typeof c.cell!="function"&&u("Must specify cell creation function"),typeof c.phase!="function"&&u("Must specify phase function");for(var h=c.getters||[],o=new Array(f),d=0;d=0?o[d]=!0:o[d]=!1;return n(c.vertex,c.cell,c.phase,w,g,o)}},9144:function(v,p,t){var r=t(3094),s={zero:function(T,C,x,S){var b=T[0],a=x[0];S|=0;var E=0,y=a;for(E=0;E2&&E[1]>2&&S(a.pick(-1,-1).lo(1,1).hi(E[0]-2,E[1]-2),b.pick(-1,-1,0).lo(1,1).hi(E[0]-2,E[1]-2),b.pick(-1,-1,1).lo(1,1).hi(E[0]-2,E[1]-2)),E[1]>2&&(x(a.pick(0,-1).lo(1).hi(E[1]-2),b.pick(0,-1,1).lo(1).hi(E[1]-2)),C(b.pick(0,-1,0).lo(1).hi(E[1]-2))),E[1]>2&&(x(a.pick(E[0]-1,-1).lo(1).hi(E[1]-2),b.pick(E[0]-1,-1,1).lo(1).hi(E[1]-2)),C(b.pick(E[0]-1,-1,0).lo(1).hi(E[1]-2))),E[0]>2&&(x(a.pick(-1,0).lo(1).hi(E[0]-2),b.pick(-1,0,0).lo(1).hi(E[0]-2)),C(b.pick(-1,0,1).lo(1).hi(E[0]-2))),E[0]>2&&(x(a.pick(-1,E[1]-1).lo(1).hi(E[0]-2),b.pick(-1,E[1]-1,0).lo(1).hi(E[0]-2)),C(b.pick(-1,E[1]-1,1).lo(1).hi(E[0]-2))),b.set(0,0,0,0),b.set(0,0,1,0),b.set(E[0]-1,0,0,0),b.set(E[0]-1,0,1,0),b.set(0,E[1]-1,0,0),b.set(0,E[1]-1,1,0),b.set(E[0]-1,E[1]-1,0,0),b.set(E[0]-1,E[1]-1,1,0),b}}function M(T){var C=T.join(),E=f[C];if(E)return E;for(var x=T.length,S=[w,h],b=1;b<=x;++b)S.push(o(b));var a=d,E=a.apply(void 0,S);return f[C]=E,E}v.exports=function(C,x,S){if(Array.isArray(S)||(typeof S=="string"?S=r(x.dimension,S):S=r(x.dimension,"clamp")),x.size===0)return C;if(x.dimension===0)return C.set(0),C;var b=M(S);return b(C,x)}},3581:function(v){function p(l,c){var u=Math.floor(c),g=c-u,f=0<=u&&u0;){N<64?(x=N,N=0):(x=64,N-=64);for(var _=f[1]|0;_>0;){_<64?(S=_,_=0):(S=64,_-=64),o=k+N*a+_*E,T=O+N*z+_*I;var U=0,Y=0,J=0,te=y,ae=a-b*y,ce=E-x*a,Q=B,Z=z-b*B,j=I-x*z;for(J=0;J0;){I<64?(x=I,I=0):(x=64,I-=64);for(var B=f[0]|0;B>0;){B<64?(C=B,B=0):(C=64,B-=64),o=y+I*b+B*S,T=z+I*E+B*a;var k=0,O=0,N=b,_=S-x*b,U=E,Y=a-x*E;for(O=0;O0;){O<64?(S=O,O=0):(S=64,O-=64);for(var N=f[0]|0;N>0;){N<64?(C=N,N=0):(C=64,N-=64);for(var _=f[1]|0;_>0;){_<64?(x=_,_=0):(x=64,_-=64),o=B+O*E+N*b+_*a,T=k+O*I+N*y+_*z;var U=0,Y=0,J=0,te=E,ae=b-S*E,ce=a-C*b,Q=I,Z=y-S*I,j=z-C*y;for(J=0;Jd;){U=0,Y=k-x;t:for(N=0;Nte)break t;Y+=y,U+=z}for(U=k,Y=k-x,N=0;N>1,_=N-B,U=N+B,Y=k,J=_,te=N,ae=U,ce=O,Q=M+1,Z=T-1,j=!0,K,ee,oe,q,$,le,ie,he,me,Me=0,Te=0,Oe=0,Ne,Ee,xe,Se,Ue,He,Fe,Ge,nt,qe,$e,et,ct,dt,pt,At,Mt=E,Vt=h(Mt),Je=h(Mt);Ee=S*Y,xe=S*J,At=x;e:for(Ne=0;Ne0){ee=Y,Y=J,J=ee;break e}if(Oe<0)break e;At+=z}Ee=S*ae,xe=S*ce,At=x;e:for(Ne=0;Ne0){ee=ae,ae=ce,ce=ee;break e}if(Oe<0)break e;At+=z}Ee=S*Y,xe=S*te,At=x;e:for(Ne=0;Ne0){ee=Y,Y=te,te=ee;break e}if(Oe<0)break e;At+=z}Ee=S*J,xe=S*te,At=x;e:for(Ne=0;Ne0){ee=J,J=te,te=ee;break e}if(Oe<0)break e;At+=z}Ee=S*Y,xe=S*ae,At=x;e:for(Ne=0;Ne0){ee=Y,Y=ae,ae=ee;break e}if(Oe<0)break e;At+=z}Ee=S*te,xe=S*ae,At=x;e:for(Ne=0;Ne0){ee=te,te=ae,ae=ee;break e}if(Oe<0)break e;At+=z}Ee=S*J,xe=S*ce,At=x;e:for(Ne=0;Ne0){ee=J,J=ce,ce=ee;break e}if(Oe<0)break e;At+=z}Ee=S*J,xe=S*te,At=x;e:for(Ne=0;Ne0){ee=J,J=te,te=ee;break e}if(Oe<0)break e;At+=z}Ee=S*ae,xe=S*ce,At=x;e:for(Ne=0;Ne0){ee=ae,ae=ce,ce=ee;break e}if(Oe<0)break e;At+=z}for(Ee=S*Y,xe=S*J,Se=S*te,Ue=S*ae,He=S*ce,Fe=S*k,Ge=S*N,nt=S*O,pt=0,At=x,Ne=0;Ne0)Z--;else if(Oe<0){for(Ee=S*le,xe=S*Q,Se=S*Z,At=x,Ne=0;Ne0)for(;;){ie=x+Z*S,pt=0;e:for(Ne=0;Ne0){if(--ZO){e:for(;;){for(ie=x+Q*S,pt=0,At=x,Ne=0;Ne1&&d?T(o,d[0],d[1]):T(o)}var g={"uint32,1,0":function(w,h){return function(o){var d=o.data,M=o.offset|0,T=o.shape,C=o.stride,x=C[0]|0,S=T[0]|0,b=C[1]|0,a=T[1]|0,E=b,y=b,z=1;S<=32?w(0,S-1,d,M,x,b,S,a,E,y,z):h(0,S-1,d,M,x,b,S,a,E,y,z)}}};function f(w,h){var o=[h,w].join(","),d=g[o],M=l(w,h),T=u(w,h,M);return d(M,T)}v.exports=f},8729:function(v,p,t){var r=t(8139),s={};function n(l){var c=l.order,u=l.dtype,g=[c,u],f=g.join(":"),w=s[f];return w||(s[f]=w=r(c,u)),w(l),l}v.exports=n},5050:function(v,p,t){var r=t(4780),s=typeof Float64Array<"u";function n(h,o){return h[0]-o[0]}function l(){var h=this.stride,o=new Array(h.length),d;for(d=0;d=0&&(b=x|0,S+=E*b,a-=b),new M(this.data,a,E,S)},T.step=function(x){var S=this.shape[0],b=this.stride[0],a=this.offset,E=0,y=Math.ceil;return typeof x=="number"&&(E=x|0,E<0?(a+=b*(S-1),S=y(-S/E)):S=y(S/E),b*=E),new M(this.data,S,b,a)},T.transpose=function(x){x=x===void 0?0:x|0;var S=this.shape,b=this.stride;return new M(this.data,S[x],b[x],this.offset)},T.pick=function(x){var S=[],b=[],a=this.offset;typeof x=="number"&&x>=0?a=a+this.stride[0]*x|0:(S.push(this.shape[0]),b.push(this.stride[0]));var E=o[S.length+1];return E(this.data,S,b,a)},function(x,S,b,a){return new M(x,S[0],b[0],a)}},2:function(h,o,d){function M(C,x,S,b,a,E){this.data=C,this.shape=[x,S],this.stride=[b,a],this.offset=E|0}var T=M.prototype;return T.dtype=h,T.dimension=2,Object.defineProperty(T,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(T,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),T.set=function(x,S,b){return h==="generic"?this.data.set(this.offset+this.stride[0]*x+this.stride[1]*S,b):this.data[this.offset+this.stride[0]*x+this.stride[1]*S]=b},T.get=function(x,S){return h==="generic"?this.data.get(this.offset+this.stride[0]*x+this.stride[1]*S):this.data[this.offset+this.stride[0]*x+this.stride[1]*S]},T.index=function(x,S){return this.offset+this.stride[0]*x+this.stride[1]*S},T.hi=function(x,S){return new M(this.data,typeof x!="number"||x<0?this.shape[0]:x|0,typeof S!="number"||S<0?this.shape[1]:S|0,this.stride[0],this.stride[1],this.offset)},T.lo=function(x,S){var b=this.offset,a=0,E=this.shape[0],y=this.shape[1],z=this.stride[0],I=this.stride[1];return typeof x=="number"&&x>=0&&(a=x|0,b+=z*a,E-=a),typeof S=="number"&&S>=0&&(a=S|0,b+=I*a,y-=a),new M(this.data,E,y,z,I,b)},T.step=function(x,S){var b=this.shape[0],a=this.shape[1],E=this.stride[0],y=this.stride[1],z=this.offset,I=0,B=Math.ceil;return typeof x=="number"&&(I=x|0,I<0?(z+=E*(b-1),b=B(-b/I)):b=B(b/I),E*=I),typeof S=="number"&&(I=S|0,I<0?(z+=y*(a-1),a=B(-a/I)):a=B(a/I),y*=I),new M(this.data,b,a,E,y,z)},T.transpose=function(x,S){x=x===void 0?0:x|0,S=S===void 0?1:S|0;var b=this.shape,a=this.stride;return new M(this.data,b[x],b[S],a[x],a[S],this.offset)},T.pick=function(x,S){var b=[],a=[],E=this.offset;typeof x=="number"&&x>=0?E=E+this.stride[0]*x|0:(b.push(this.shape[0]),a.push(this.stride[0])),typeof S=="number"&&S>=0?E=E+this.stride[1]*S|0:(b.push(this.shape[1]),a.push(this.stride[1]));var y=o[b.length+1];return y(this.data,b,a,E)},function(x,S,b,a){return new M(x,S[0],S[1],b[0],b[1],a)}},3:function(h,o,d){function M(C,x,S,b,a,E,y,z){this.data=C,this.shape=[x,S,b],this.stride=[a,E,y],this.offset=z|0}var T=M.prototype;return T.dtype=h,T.dimension=3,Object.defineProperty(T,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(T,"order",{get:function(){var x=Math.abs(this.stride[0]),S=Math.abs(this.stride[1]),b=Math.abs(this.stride[2]);return x>S?S>b?[2,1,0]:x>b?[1,2,0]:[1,0,2]:x>b?[2,0,1]:b>S?[0,1,2]:[0,2,1]}}),T.set=function(x,S,b,a){return h==="generic"?this.data.set(this.offset+this.stride[0]*x+this.stride[1]*S+this.stride[2]*b,a):this.data[this.offset+this.stride[0]*x+this.stride[1]*S+this.stride[2]*b]=a},T.get=function(x,S,b){return h==="generic"?this.data.get(this.offset+this.stride[0]*x+this.stride[1]*S+this.stride[2]*b):this.data[this.offset+this.stride[0]*x+this.stride[1]*S+this.stride[2]*b]},T.index=function(x,S,b){return this.offset+this.stride[0]*x+this.stride[1]*S+this.stride[2]*b},T.hi=function(x,S,b){return new M(this.data,typeof x!="number"||x<0?this.shape[0]:x|0,typeof S!="number"||S<0?this.shape[1]:S|0,typeof b!="number"||b<0?this.shape[2]:b|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},T.lo=function(x,S,b){var a=this.offset,E=0,y=this.shape[0],z=this.shape[1],I=this.shape[2],B=this.stride[0],k=this.stride[1],O=this.stride[2];return typeof x=="number"&&x>=0&&(E=x|0,a+=B*E,y-=E),typeof S=="number"&&S>=0&&(E=S|0,a+=k*E,z-=E),typeof b=="number"&&b>=0&&(E=b|0,a+=O*E,I-=E),new M(this.data,y,z,I,B,k,O,a)},T.step=function(x,S,b){var a=this.shape[0],E=this.shape[1],y=this.shape[2],z=this.stride[0],I=this.stride[1],B=this.stride[2],k=this.offset,O=0,N=Math.ceil;return typeof x=="number"&&(O=x|0,O<0?(k+=z*(a-1),a=N(-a/O)):a=N(a/O),z*=O),typeof S=="number"&&(O=S|0,O<0?(k+=I*(E-1),E=N(-E/O)):E=N(E/O),I*=O),typeof b=="number"&&(O=b|0,O<0?(k+=B*(y-1),y=N(-y/O)):y=N(y/O),B*=O),new M(this.data,a,E,y,z,I,B,k)},T.transpose=function(x,S,b){x=x===void 0?0:x|0,S=S===void 0?1:S|0,b=b===void 0?2:b|0;var a=this.shape,E=this.stride;return new M(this.data,a[x],a[S],a[b],E[x],E[S],E[b],this.offset)},T.pick=function(x,S,b){var a=[],E=[],y=this.offset;typeof x=="number"&&x>=0?y=y+this.stride[0]*x|0:(a.push(this.shape[0]),E.push(this.stride[0])),typeof S=="number"&&S>=0?y=y+this.stride[1]*S|0:(a.push(this.shape[1]),E.push(this.stride[1])),typeof b=="number"&&b>=0?y=y+this.stride[2]*b|0:(a.push(this.shape[2]),E.push(this.stride[2]));var z=o[a.length+1];return z(this.data,a,E,y)},function(x,S,b,a){return new M(x,S[0],S[1],S[2],b[0],b[1],b[2],a)}},4:function(h,o,d){function M(C,x,S,b,a,E,y,z,I,B){this.data=C,this.shape=[x,S,b,a],this.stride=[E,y,z,I],this.offset=B|0}var T=M.prototype;return T.dtype=h,T.dimension=4,Object.defineProperty(T,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(T,"order",{get:d}),T.set=function(x,S,b,a,E){return h==="generic"?this.data.set(this.offset+this.stride[0]*x+this.stride[1]*S+this.stride[2]*b+this.stride[3]*a,E):this.data[this.offset+this.stride[0]*x+this.stride[1]*S+this.stride[2]*b+this.stride[3]*a]=E},T.get=function(x,S,b,a){return h==="generic"?this.data.get(this.offset+this.stride[0]*x+this.stride[1]*S+this.stride[2]*b+this.stride[3]*a):this.data[this.offset+this.stride[0]*x+this.stride[1]*S+this.stride[2]*b+this.stride[3]*a]},T.index=function(x,S,b,a){return this.offset+this.stride[0]*x+this.stride[1]*S+this.stride[2]*b+this.stride[3]*a},T.hi=function(x,S,b,a){return new M(this.data,typeof x!="number"||x<0?this.shape[0]:x|0,typeof S!="number"||S<0?this.shape[1]:S|0,typeof b!="number"||b<0?this.shape[2]:b|0,typeof a!="number"||a<0?this.shape[3]:a|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},T.lo=function(x,S,b,a){var E=this.offset,y=0,z=this.shape[0],I=this.shape[1],B=this.shape[2],k=this.shape[3],O=this.stride[0],N=this.stride[1],_=this.stride[2],U=this.stride[3];return typeof x=="number"&&x>=0&&(y=x|0,E+=O*y,z-=y),typeof S=="number"&&S>=0&&(y=S|0,E+=N*y,I-=y),typeof b=="number"&&b>=0&&(y=b|0,E+=_*y,B-=y),typeof a=="number"&&a>=0&&(y=a|0,E+=U*y,k-=y),new M(this.data,z,I,B,k,O,N,_,U,E)},T.step=function(x,S,b,a){var E=this.shape[0],y=this.shape[1],z=this.shape[2],I=this.shape[3],B=this.stride[0],k=this.stride[1],O=this.stride[2],N=this.stride[3],_=this.offset,U=0,Y=Math.ceil;return typeof x=="number"&&(U=x|0,U<0?(_+=B*(E-1),E=Y(-E/U)):E=Y(E/U),B*=U),typeof S=="number"&&(U=S|0,U<0?(_+=k*(y-1),y=Y(-y/U)):y=Y(y/U),k*=U),typeof b=="number"&&(U=b|0,U<0?(_+=O*(z-1),z=Y(-z/U)):z=Y(z/U),O*=U),typeof a=="number"&&(U=a|0,U<0?(_+=N*(I-1),I=Y(-I/U)):I=Y(I/U),N*=U),new M(this.data,E,y,z,I,B,k,O,N,_)},T.transpose=function(x,S,b,a){x=x===void 0?0:x|0,S=S===void 0?1:S|0,b=b===void 0?2:b|0,a=a===void 0?3:a|0;var E=this.shape,y=this.stride;return new M(this.data,E[x],E[S],E[b],E[a],y[x],y[S],y[b],y[a],this.offset)},T.pick=function(x,S,b,a){var E=[],y=[],z=this.offset;typeof x=="number"&&x>=0?z=z+this.stride[0]*x|0:(E.push(this.shape[0]),y.push(this.stride[0])),typeof S=="number"&&S>=0?z=z+this.stride[1]*S|0:(E.push(this.shape[1]),y.push(this.stride[1])),typeof b=="number"&&b>=0?z=z+this.stride[2]*b|0:(E.push(this.shape[2]),y.push(this.stride[2])),typeof a=="number"&&a>=0?z=z+this.stride[3]*a|0:(E.push(this.shape[3]),y.push(this.stride[3]));var I=o[E.length+1];return I(this.data,E,y,z)},function(x,S,b,a){return new M(x,S[0],S[1],S[2],S[3],b[0],b[1],b[2],b[3],a)}},5:function(o,d,M){function T(x,S,b,a,E,y,z,I,B,k,O,N){this.data=x,this.shape=[S,b,a,E,y],this.stride=[z,I,B,k,O],this.offset=N|0}var C=T.prototype;return C.dtype=o,C.dimension=5,Object.defineProperty(C,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(C,"order",{get:M}),C.set=function(S,b,a,E,y,z){return o==="generic"?this.data.set(this.offset+this.stride[0]*S+this.stride[1]*b+this.stride[2]*a+this.stride[3]*E+this.stride[4]*y,z):this.data[this.offset+this.stride[0]*S+this.stride[1]*b+this.stride[2]*a+this.stride[3]*E+this.stride[4]*y]=z},C.get=function(S,b,a,E,y){return o==="generic"?this.data.get(this.offset+this.stride[0]*S+this.stride[1]*b+this.stride[2]*a+this.stride[3]*E+this.stride[4]*y):this.data[this.offset+this.stride[0]*S+this.stride[1]*b+this.stride[2]*a+this.stride[3]*E+this.stride[4]*y]},C.index=function(S,b,a,E,y){return this.offset+this.stride[0]*S+this.stride[1]*b+this.stride[2]*a+this.stride[3]*E+this.stride[4]*y},C.hi=function(S,b,a,E,y){return new T(this.data,typeof S!="number"||S<0?this.shape[0]:S|0,typeof b!="number"||b<0?this.shape[1]:b|0,typeof a!="number"||a<0?this.shape[2]:a|0,typeof E!="number"||E<0?this.shape[3]:E|0,typeof y!="number"||y<0?this.shape[4]:y|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},C.lo=function(S,b,a,E,y){var z=this.offset,I=0,B=this.shape[0],k=this.shape[1],O=this.shape[2],N=this.shape[3],_=this.shape[4],U=this.stride[0],Y=this.stride[1],J=this.stride[2],te=this.stride[3],ae=this.stride[4];return typeof S=="number"&&S>=0&&(I=S|0,z+=U*I,B-=I),typeof b=="number"&&b>=0&&(I=b|0,z+=Y*I,k-=I),typeof a=="number"&&a>=0&&(I=a|0,z+=J*I,O-=I),typeof E=="number"&&E>=0&&(I=E|0,z+=te*I,N-=I),typeof y=="number"&&y>=0&&(I=y|0,z+=ae*I,_-=I),new T(this.data,B,k,O,N,_,U,Y,J,te,ae,z)},C.step=function(S,b,a,E,y){var z=this.shape[0],I=this.shape[1],B=this.shape[2],k=this.shape[3],O=this.shape[4],N=this.stride[0],_=this.stride[1],U=this.stride[2],Y=this.stride[3],J=this.stride[4],te=this.offset,ae=0,ce=Math.ceil;return typeof S=="number"&&(ae=S|0,ae<0?(te+=N*(z-1),z=ce(-z/ae)):z=ce(z/ae),N*=ae),typeof b=="number"&&(ae=b|0,ae<0?(te+=_*(I-1),I=ce(-I/ae)):I=ce(I/ae),_*=ae),typeof a=="number"&&(ae=a|0,ae<0?(te+=U*(B-1),B=ce(-B/ae)):B=ce(B/ae),U*=ae),typeof E=="number"&&(ae=E|0,ae<0?(te+=Y*(k-1),k=ce(-k/ae)):k=ce(k/ae),Y*=ae),typeof y=="number"&&(ae=y|0,ae<0?(te+=J*(O-1),O=ce(-O/ae)):O=ce(O/ae),J*=ae),new T(this.data,z,I,B,k,O,N,_,U,Y,J,te)},C.transpose=function(S,b,a,E,y){S=S===void 0?0:S|0,b=b===void 0?1:b|0,a=a===void 0?2:a|0,E=E===void 0?3:E|0,y=y===void 0?4:y|0;var z=this.shape,I=this.stride;return new T(this.data,z[S],z[b],z[a],z[E],z[y],I[S],I[b],I[a],I[E],I[y],this.offset)},C.pick=function(S,b,a,E,y){var z=[],I=[],B=this.offset;typeof S=="number"&&S>=0?B=B+this.stride[0]*S|0:(z.push(this.shape[0]),I.push(this.stride[0])),typeof b=="number"&&b>=0?B=B+this.stride[1]*b|0:(z.push(this.shape[1]),I.push(this.stride[1])),typeof a=="number"&&a>=0?B=B+this.stride[2]*a|0:(z.push(this.shape[2]),I.push(this.stride[2])),typeof E=="number"&&E>=0?B=B+this.stride[3]*E|0:(z.push(this.shape[3]),I.push(this.stride[3])),typeof y=="number"&&y>=0?B=B+this.stride[4]*y|0:(z.push(this.shape[4]),I.push(this.stride[4]));var k=d[z.length+1];return k(this.data,z,I,B)},function(S,b,a,E){return new T(S,b[0],b[1],b[2],b[3],b[4],a[0],a[1],a[2],a[3],a[4],E)}}};function u(h,o){var d=o===-1?"T":String(o),M=c[d];return o===-1?M(h):o===0?M(h,f[h][0]):M(h,f[h],l)}function g(h){if(r(h))return"buffer";if(s)switch(Object.prototype.toString.call(h)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(h)?"array":"generic"}var f={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function w(h,o,d,M){if(h===void 0){var a=f.array[0];return a([])}else typeof h=="number"&&(h=[h]);o===void 0&&(o=[h.length]);var T=o.length;if(d===void 0){d=new Array(T);for(var C=T-1,x=1;C>=0;--C)d[C]=x,x*=o[C]}if(M===void 0){M=0;for(var C=0;C>>0;v.exports=l;function l(c,u){if(isNaN(c)||isNaN(u))return NaN;if(c===u)return c;if(c===0)return u<0?-s:s;var g=r.hi(c),f=r.lo(c);return u>c==c>0?f===n?(g+=1,f=0):f+=1:f===0?(f=n,g-=1):f-=1,r.pack(f,g)}},115:function(v,p){var t=1e-6,r=1e-6;p.vertexNormals=function(s,n,l){for(var c=n.length,u=new Array(c),g=l===void 0?t:l,f=0;fg)for(var z=u[o],I=1/Math.sqrt(b*E),y=0;y<3;++y){var B=(y+1)%3,k=(y+2)%3;z[y]+=I*(a[B]*S[k]-a[k]*S[B])}}for(var f=0;fg)for(var I=1/Math.sqrt(O),y=0;y<3;++y)z[y]*=I;else for(var y=0;y<3;++y)z[y]=0}return u},p.faceNormals=function(s,n,l){for(var c=s.length,u=new Array(c),g=l===void 0?r:l,f=0;fg?C=1/Math.sqrt(C):C=0;for(var o=0;o<3;++o)T[o]*=C;u[f]=T}return u}},567:function(v){v.exports=p;function p(t,r,s,n,l,c,u,g,f,w){var h=r+c+w;if(o>0){var o=Math.sqrt(h+1);t[0]=.5*(u-f)/o,t[1]=.5*(g-n)/o,t[2]=.5*(s-c)/o,t[3]=.5*o}else{var d=Math.max(r,c,w),o=Math.sqrt(2*d-h+1);r>=d?(t[0]=.5*o,t[1]=.5*(l+s)/o,t[2]=.5*(g+n)/o,t[3]=.5*(u-f)/o):c>=d?(t[0]=.5*(s+l)/o,t[1]=.5*o,t[2]=.5*(f+u)/o,t[3]=.5*(g-n)/o):(t[0]=.5*(n+g)/o,t[1]=.5*(u+f)/o,t[2]=.5*o,t[3]=.5*(s-l)/o)}return t}},7774:function(v,p,t){v.exports=o;var r=t(8444),s=t(3012),n=t(5950),l=t(7437),c=t(567);function u(d,M,T){return Math.sqrt(Math.pow(d,2)+Math.pow(M,2)+Math.pow(T,2))}function g(d,M,T,C){return Math.sqrt(Math.pow(d,2)+Math.pow(M,2)+Math.pow(T,2)+Math.pow(C,2))}function f(d,M){var T=M[0],C=M[1],x=M[2],S=M[3],b=g(T,C,x,S);b>1e-6?(d[0]=T/b,d[1]=C/b,d[2]=x/b,d[3]=S/b):(d[0]=d[1]=d[2]=0,d[3]=1)}function w(d,M,T){this.radius=r([T]),this.center=r(M),this.rotation=r(d),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 h=w.prototype;h.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},h.recalcMatrix=function(d){this.radius.curve(d),this.center.curve(d),this.rotation.curve(d);var M=this.computedRotation;f(M,M);var T=this.computedMatrix;n(T,M);var C=this.computedCenter,x=this.computedEye,S=this.computedUp,b=Math.exp(this.computedRadius[0]);x[0]=C[0]+b*T[2],x[1]=C[1]+b*T[6],x[2]=C[2]+b*T[10],S[0]=T[1],S[1]=T[5],S[2]=T[9];for(var a=0;a<3;++a){for(var E=0,y=0;y<3;++y)E+=T[a+4*y]*x[y];T[12+a]=-E}},h.getMatrix=function(d,M){this.recalcMatrix(d);var T=this.computedMatrix;if(M){for(var C=0;C<16;++C)M[C]=T[C];return M}return T},h.idle=function(d){this.center.idle(d),this.radius.idle(d),this.rotation.idle(d)},h.flush=function(d){this.center.flush(d),this.radius.flush(d),this.rotation.flush(d)},h.pan=function(d,M,T,C){M=M||0,T=T||0,C=C||0,this.recalcMatrix(d);var x=this.computedMatrix,S=x[1],b=x[5],a=x[9],E=u(S,b,a);S/=E,b/=E,a/=E;var y=x[0],z=x[4],I=x[8],B=y*S+z*b+I*a;y-=S*B,z-=b*B,I-=a*B;var k=u(y,z,I);y/=k,z/=k,I/=k,x[2],x[6],x[10];var O=y*M+S*T,N=z*M+b*T,_=I*M+a*T;this.center.move(d,O,N,_);var U=Math.exp(this.computedRadius[0]);U=Math.max(1e-4,U+C),this.radius.set(d,Math.log(U))},h.rotate=function(d,M,T,C){this.recalcMatrix(d),M=M||0,T=T||0;var x=this.computedMatrix,S=x[0],b=x[4],a=x[8],E=x[1],y=x[5],z=x[9],I=x[2],B=x[6],k=x[10],O=M*S+T*E,N=M*b+T*y,_=M*a+T*z,U=-(B*_-k*N),Y=-(k*O-I*_),J=-(I*N-B*O),te=Math.sqrt(Math.max(0,1-Math.pow(U,2)-Math.pow(Y,2)-Math.pow(J,2))),ae=g(U,Y,J,te);ae>1e-6?(U/=ae,Y/=ae,J/=ae,te/=ae):(U=Y=J=0,te=1);var ce=this.computedRotation,Q=ce[0],Z=ce[1],j=ce[2],K=ce[3],ee=Q*te+K*U+Z*J-j*Y,oe=Z*te+K*Y+j*U-Q*J,q=j*te+K*J+Q*Y-Z*U,$=K*te-Q*U-Z*Y-j*J;if(C){U=I,Y=B,J=k;var le=Math.sin(C)/u(U,Y,J);U*=le,Y*=le,J*=le,te=Math.cos(M),ee=ee*te+$*U+oe*J-q*Y,oe=oe*te+$*Y+q*U-ee*J,q=q*te+$*J+ee*Y-oe*U,$=$*te-ee*U-oe*Y-q*J}var ie=g(ee,oe,q,$);ie>1e-6?(ee/=ie,oe/=ie,q/=ie,$/=ie):(ee=oe=q=0,$=1),this.rotation.set(d,ee,oe,q,$)},h.lookAt=function(d,M,T,C){this.recalcMatrix(d),T=T||this.computedCenter,M=M||this.computedEye,C=C||this.computedUp;var x=this.computedMatrix;s(x,M,T,C);var S=this.computedRotation;c(S,x[0],x[1],x[2],x[4],x[5],x[6],x[8],x[9],x[10]),f(S,S),this.rotation.set(d,S[0],S[1],S[2],S[3]);for(var b=0,a=0;a<3;++a)b+=Math.pow(T[a]-M[a],2);this.radius.set(d,.5*Math.log(Math.max(b,1e-6))),this.center.set(d,T[0],T[1],T[2])},h.translate=function(d,M,T,C){this.center.move(d,M||0,T||0,C||0)},h.setMatrix=function(d,M){var T=this.computedRotation;c(T,M[0],M[1],M[2],M[4],M[5],M[6],M[8],M[9],M[10]),f(T,T),this.rotation.set(d,T[0],T[1],T[2],T[3]);var C=this.computedMatrix;l(C,M);var x=C[15];if(Math.abs(x)>1e-6){var S=C[12]/x,b=C[13]/x,a=C[14]/x;this.recalcMatrix(d);var E=Math.exp(this.computedRadius[0]);this.center.set(d,S-C[2]*E,b-C[6]*E,a-C[10]*E),this.radius.idle(d)}else this.center.idle(d),this.radius.idle(d)},h.setDistance=function(d,M){M>0&&this.radius.set(d,Math.log(M))},h.setDistanceLimits=function(d,M){d>0?d=Math.log(d):d=-1/0,M>0?M=Math.log(M):M=1/0,M=Math.max(M,d),this.radius.bounds[0][0]=d,this.radius.bounds[1][0]=M},h.getDistanceLimits=function(d){var M=this.radius.bounds;return d?(d[0]=Math.exp(M[0][0]),d[1]=Math.exp(M[1][0]),d):[Math.exp(M[0][0]),Math.exp(M[1][0])]},h.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]}},h.fromJSON=function(d){var M=this.lastT(),T=d.center;T&&this.center.set(M,T[0],T[1],T[2]);var C=d.rotation;C&&this.rotation.set(M,C[0],C[1],C[2],C[3]);var x=d.distance;x&&x>0&&this.radius.set(M,Math.log(x)),this.setDistanceLimits(d.zoomMin,d.zoomMax)};function o(d){d=d||{};var M=d.center||[0,0,0],T=d.rotation||[0,0,0,1],C=d.radius||1;M=[].slice.call(M,0,3),T=[].slice.call(T,0,4),f(T,T);var x=new w(T,M,Math.log(C));return x.setDistanceLimits(d.zoomMin,d.zoomMax),("eye"in d||"up"in d)&&x.lookAt(0,d.eye,d.center,d.up),x}},4930:function(v,p,t){/*! * pad-left * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT license. */var r=t(6184);v.exports=function(n,l,c){return c=typeof c<"u"?c+"":" ",r(c,l)+n}},4405:function(v){v.exports=function(t,r){r||(r=[0,""]),t=String(t);var s=parseFloat(t,10);return r[0]=s,r[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",r}},4166:function(v,p,t){v.exports=s;var r=t(9398);function s(n,l){for(var c=l.length|0,u=n.length,g=[new Array(c),new Array(c)],f=0;f0){y=g[B][a][0],I=B;break}z=y[I^1];for(var k=0;k<2;++k)for(var O=g[k][a],N=0;N0&&(y=_,z=U,I=k)}return E||y&&o(y,I),z}function M(b,a){var E=g[a][b][0],y=[b];o(E,a);for(var z=E[a^1];;){for(;z!==b;)y.push(z),z=d(y[y.length-2],z,!1);if(g[0][b].length+g[1][b].length===0)break;var I=y[y.length-1],B=b,k=y[1],O=d(I,B,!0);if(r(l[I],l[B],l[k],l[O])<0)break;y.push(b),z=d(I,B)}return y}function T(b,a){return a[1]===a[a.length-1]}for(var f=0;f0;){g[0][f].length;var S=M(f,C);T(x,S)?x.push.apply(x,S):(x.length>0&&h.push(x),x=S)}x.length>0&&h.push(x)}return h}},3959:function(v,p,t){v.exports=s;var r=t(8348);function s(n,l){for(var c=r(n,l.length),u=new Array(l.length),g=new Array(l.length),f=[],w=0;w0;){var o=f.pop();u[o]=!1;for(var d=c[o],w=0;w0}x=x.filter(S);for(var b=x.length,a=new Array(b),E=new Array(b),C=0;C0;){var le=oe.pop(),ie=te[le];u(ie,function(Oe,Ne){return Oe-Ne});var he=ie.length,me=q[le],Me;if(me===0){var O=x[le];Me=[O]}for(var C=0;C=0)&&(q[Te]=me^1,oe.push(Te),me===0)){var O=x[Te];ee(O)||(O.reverse(),Me.push(O))}}me===0&&$.push(Me)}return $}},211:function(v,p,t){v.exports=d;var r=t(417)[3],s=t(4385),n=t(9014),l=t(5070);function c(){return!0}function u(M){return function(T,C){var x=M[T];return x?!!x.queryPoint(C,c):!1}}function g(M){for(var T={},C=0;C0&&T[x]===C[0])S=M[x-1];else return 1;for(var b=1;S;){var a=S.key,E=r(C,a[0],a[1]);if(a[0][0]0)b=-1,S=S.right;else return 0;else if(E>0)S=S.left;else if(E<0)b=1,S=S.right;else return 0}return b}}function w(M){return 1}function h(M){return function(C){return M(C[0],C[1])?0:1}}function o(M,T){return function(x){return M(x[0],x[1])?0:T(x)}}function d(M){for(var T=M.length,C=[],x=[],S=0;S=w?(a=1,y=w+2*d+T):(a=-d/w,y=d*a+T)):(a=0,M>=0?(E=0,y=T):-M>=o?(E=1,y=o+2*M+T):(E=-M/o,y=M*E+T));else if(E<0)E=0,d>=0?(a=0,y=T):-d>=w?(a=1,y=w+2*d+T):(a=-d/w,y=d*a+T);else{var z=1/b;a*=z,E*=z,y=a*(w*a+h*E+2*d)+E*(h*a+o*E+2*M)+T}else{var I,B,k,O;a<0?(I=h+d,B=o+M,B>I?(k=B-I,O=w-2*h+o,k>=O?(a=1,E=0,y=w+2*d+T):(a=k/O,E=1-a,y=a*(w*a+h*E+2*d)+E*(h*a+o*E+2*M)+T)):(a=0,B<=0?(E=1,y=o+2*M+T):M>=0?(E=0,y=T):(E=-M/o,y=M*E+T))):E<0?(I=h+M,B=w+d,B>I?(k=B-I,O=w-2*h+o,k>=O?(E=1,a=0,y=o+2*M+T):(E=k/O,a=1-E,y=a*(w*a+h*E+2*d)+E*(h*a+o*E+2*M)+T)):(E=0,B<=0?(a=1,y=w+2*d+T):d>=0?(a=0,y=T):(a=-d/w,y=d*a+T))):(k=o+M-h-d,k<=0?(a=0,E=1,y=o+2*M+T):(O=w-2*h+o,k>=O?(a=1,E=0,y=w+2*d+T):(a=k/O,E=1-a,y=a*(w*a+h*E+2*d)+E*(h*a+o*E+2*M)+T)))}for(var N=1-a-E,f=0;f0){var o=c[g-1];if(r(w,o)===0&&n(o)!==h){g-=1;continue}}c[g++]=w}}return c.length=g,c}},6184:function(v){/*! * repeat-string * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT License. */var p="",t;v.exports=r;function r(s,n){if(typeof s!="string")throw new TypeError("expected a string");if(n===1)return s;if(n===2)return s+s;var l=s.length*n;if(t!==s||typeof t>"u")t=s,p="";else if(p.length>=l)return p.substr(0,l);for(;l>p.length&&n>1;)n&1&&(p+=s),n>>=1,s+=s;return p+=s,p=p.substr(0,l),p}},8161:function(v,p,t){v.exports=t.g.performance&&t.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},402:function(v){v.exports=p;function p(t){for(var r=t.length,s=t[t.length-1],n=r,l=r-2;l>=0;--l){var c=s,u=t[l];s=c+u;var g=s-c,f=u-g;f&&(t[--n]=s,s=f)}for(var w=0,l=n;l0){if(B<=0)return k;O=I+B}else if(I<0){if(B>=0)return k;O=-(I+B)}else return k;var N=g*O;return k>=N||k<=-N?k:M(E,y,z)},function(E,y,z,I){var B=E[0]-I[0],k=y[0]-I[0],O=z[0]-I[0],N=E[1]-I[1],_=y[1]-I[1],U=z[1]-I[1],Y=E[2]-I[2],J=y[2]-I[2],te=z[2]-I[2],ae=k*U,ce=O*_,Q=O*N,Z=B*U,j=B*_,K=k*N,ee=Y*(ae-ce)+J*(Q-Z)+te*(j-K),oe=(Math.abs(ae)+Math.abs(ce))*Math.abs(Y)+(Math.abs(Q)+Math.abs(Z))*Math.abs(J)+(Math.abs(j)+Math.abs(K))*Math.abs(te),q=f*oe;return ee>q||-ee>q?ee:T(E,y,z,I)}];function x(a){var E=C[a.length];return E||(E=C[a.length]=d(a.length)),E.apply(void 0,a)}function S(a,E,y,z,I,B,k){return function(N,_,U,Y,J){switch(arguments.length){case 0:case 1:return 0;case 2:return z(N,_);case 3:return I(N,_,U);case 4:return B(N,_,U,Y);case 5:return k(N,_,U,Y,J)}for(var te=new Array(arguments.length),ae=0;ae0&&w>0||f<0&&w<0)return!1;var h=r(u,l,c),o=r(g,l,c);return h>0&&o>0||h<0&&o<0?!1:f===0&&w===0&&h===0&&o===0?s(l,c,u,g):!0}},4078:function(v){v.exports=t;function p(r,s){var n=r+s,l=n-r,c=n-l,u=s-l,g=r-c,f=g+u;return f?[f,n]:[n]}function t(r,s){var n=r.length|0,l=s.length|0;if(n===1&&l===1)return p(r[0],-s[0]);var c=n+l,u=new Array(c),g=0,f=0,w=0,h=Math.abs,o=r[f],d=h(o),M=-s[w],T=h(M),C,x;d=l?(C=o,f+=1,f=l?(C=o,f+=1,f"u"&&(C=c(d));var x=d.length;if(x===0||C<1)return{cells:[],vertexIds:[],vertexWeights:[]};var S=u(M,+T),b=g(d,C),a=f(b,M,S,+T),E=w(b,M.length|0),y=l(C)(d,b.data,E,S),z=h(b),I=[].slice.call(a.data,0,a.shape[0]);return s.free(S),s.free(b.data),s.free(a.data),s.free(E),{cells:y,vertexIds:z,vertexWeights:I}}},1168:function(v){v.exports=t;var p=[function(){function s(n,l,c,u){for(var g=n.length,f=[],w=0;w>1,M=c[2*d+1];if(M===w)return d;w>1,M=c[2*d+1];if(M===w)return d;w>1,M=c[2*d+1];if(M===w)return d;w0)-(n<0)},p.abs=function(n){var l=n>>t-1;return(n^l)-l},p.min=function(n,l){return l^(n^l)&-(n65535)<<4,n>>>=l,c=(n>255)<<3,n>>>=c,l|=c,c=(n>15)<<2,n>>>=c,l|=c,c=(n>3)<<1,n>>>=c,l|=c,l|n>>1},p.log10=function(n){return n>=1e9?9:n>=1e8?8:n>=1e7?7:n>=1e6?6:n>=1e5?5:n>=1e4?4:n>=1e3?3:n>=100?2:n>=10?1:0},p.popCount=function(n){return n=n-(n>>>1&1431655765),n=(n&858993459)+(n>>>2&858993459),(n+(n>>>4)&252645135)*16843009>>>24};function r(n){var l=32;return n&=-n,n&&l--,n&65535&&(l-=16),n&16711935&&(l-=8),n&252645135&&(l-=4),n&858993459&&(l-=2),n&1431655765&&(l-=1),l}p.countTrailingZeros=r,p.nextPow2=function(n){return n+=n===0,--n,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n+1},p.prevPow2=function(n){return n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n-(n>>>1)},p.parity=function(n){return n^=n>>>16,n^=n>>>8,n^=n>>>4,n&=15,27030>>>n&1};var s=new Array(256);(function(n){for(var l=0;l<256;++l){var c=l,u=l,g=7;for(c>>>=1;c;c>>>=1)u<<=1,u|=c&1,--g;n[l]=u<>>8&255]<<16|s[n>>>16&255]<<8|s[n>>>24&255]},p.interleave2=function(n,l){return n&=65535,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,l&=65535,l=(l|l<<8)&16711935,l=(l|l<<4)&252645135,l=(l|l<<2)&858993459,l=(l|l<<1)&1431655765,n|l<<1},p.deinterleave2=function(n,l){return n=n>>>l&1431655765,n=(n|n>>>1)&858993459,n=(n|n>>>2)&252645135,n=(n|n>>>4)&16711935,n=(n|n>>>16)&65535,n<<16>>16},p.interleave3=function(n,l,c){return n&=1023,n=(n|n<<16)&4278190335,n=(n|n<<8)&251719695,n=(n|n<<4)&3272356035,n=(n|n<<2)&1227133513,l&=1023,l=(l|l<<16)&4278190335,l=(l|l<<8)&251719695,l=(l|l<<4)&3272356035,l=(l|l<<2)&1227133513,n|=l<<1,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,n|c<<2},p.deinterleave3=function(n,l){return n=n>>>l&1227133513,n=(n|n>>>2)&3272356035,n=(n|n>>>4)&251719695,n=(n|n>>>8)&4278190335,n=(n|n>>>16)&1023,n<<22>>22},p.nextCombination=function(n){var l=n|n-1;return l+1|(~l&-~l)-1>>>r(n)+1}},6656:function(v,p,t){"use restrict";var r=t(9392),s=t(9521);function n(a){for(var E=0,y=Math.max,z=0,I=a.length;z>1,k=u(a[B],E);k<=0?(k===0&&(I=B),y=B+1):k>0&&(z=B-1)}return I}p.findCell=h;function o(a,E){for(var y=new Array(a.length),z=0,I=y.length;z=a.length||u(a[te],B)!==0););}return y}p.incidence=o;function d(a,E){if(!E)return o(w(T(a,0)),a);for(var y=new Array(E),z=0;z>>_&1&&N.push(I[_]);E.push(N)}return f(E)}p.explode=M;function T(a,E){if(E<0)return[];for(var y=[],z=(1<>1:(Q>>1)-1}function z(Q){for(var Z=E(Q);;){var j=Z,K=2*Q+1,ee=2*(Q+1),oe=Q;if(K0;){var j=y(Q);if(j>=0){var K=E(j);if(Z0){var Q=N[0];return a(0,Y-1),Y-=1,z(0),Q}return-1}function k(Q,Z){var j=N[Q];return d[j]===Z?Q:(d[j]=-1/0,I(Q),B(),d[j]=Z,Y+=1,I(Y-1))}function O(Q){if(!M[Q]){M[Q]=!0;var Z=h[Q],j=o[Q];h[j]>=0&&(h[j]=Z),o[Z]>=0&&(o[Z]=j),_[Z]>=0&&k(_[Z],b(Z)),_[j]>=0&&k(_[j],b(j))}}for(var N=[],_=new Array(f),T=0;T>1;T>=0;--T)z(T);for(;;){var J=B();if(J<0||d[J]>g)break;O(J)}for(var te=[],T=0;T=0&&j>=0&&Z!==j){var K=_[Z],ee=_[j];K!==ee&&ce.push([K,ee])}}),s.unique(s.normalize(ce)),{positions:te,edges:ce}}},6638:function(v,p,t){v.exports=n;var r=t(417);function s(l,c){var u,g;if(c[0][0]c[1][0])u=c[1],g=c[0];else{var f=Math.min(l[0][1],l[1][1]),w=Math.max(l[0][1],l[1][1]),h=Math.min(c[0][1],c[1][1]),o=Math.max(c[0][1],c[1][1]);return wo?f-o:w-o}var d,M;l[0][1]c[1][0])u=c[1],g=c[0];else return s(c,l);var f,w;if(l[0][0]l[1][0])f=l[1],w=l[0];else return-s(l,c);var h=r(u,g,w),o=r(u,g,f);if(h<0){if(o<=0)return h}else if(h>0){if(o>=0)return h}else if(o)return o;if(h=r(w,f,g),o=r(w,f,u),h<0){if(o<=0)return h}else if(h>0){if(o>=0)return h}else if(o)return o;return g[0]-w[0]}},4385:function(v,p,t){v.exports=o;var r=t(5070),s=t(7080),n=t(417),l=t(6638);function c(d,M,T){this.slabs=d,this.coordinates=M,this.horizontal=T}var u=c.prototype;function g(d,M){return d.y-M}function f(d,M){for(var T=null;d;){var C=d.key,x,S;C[0][0]0)if(M[0]!==C[1][0])T=d,d=d.right;else{var a=f(d.right,M);if(a)return a;d=d.left}else{if(M[0]!==C[1][0])return d;var a=f(d.right,M);if(a)return a;d=d.left}}return T}u.castUp=function(d){var M=r.le(this.coordinates,d[0]);if(M<0)return-1;this.slabs[M];var T=f(this.slabs[M],d),C=-1;if(T&&(C=T.value),this.coordinates[M]===d[0]){var x=null;if(T&&(x=T.key),M>0){var S=f(this.slabs[M-1],d);S&&(x?l(S.key,x)>0&&(x=S.key,C=S.value):(C=S.value,x=S.key))}var b=this.horizontal[M];if(b.length>0){var a=r.ge(b,d[1],g);if(a=b.length)return C;E=b[a]}}if(E.start)if(x){var y=n(x[0],x[1],[d[0],E.y]);x[0][0]>x[1][0]&&(y=-y),y>0&&(C=E.index)}else C=E.index;else E.y!==d[1]&&(C=E.index)}}}return C};function w(d,M,T,C){this.y=d,this.index=M,this.start=T,this.closed=C}function h(d,M,T,C){this.x=d,this.segment=M,this.create=T,this.index=C}function o(d){for(var M=d.length,T=2*M,C=new Array(T),x=0;x1&&(M=1);for(var T=1-M,C=f.length,x=new Array(C),S=0;S0||d>0&&x<0){var S=l(M,x,T,d);h.push(S),o.push(S.slice())}x<0?o.push(T.slice()):x>0?h.push(T.slice()):(h.push(T.slice()),o.push(T.slice())),d=x}return{positive:h,negative:o}}function u(f,w){for(var h=[],o=n(f[f.length-1],w),d=f[f.length-1],M=f[0],T=0;T0||o>0&&C<0)&&h.push(l(d,C,M,o)),C>=0&&h.push(M.slice()),o=C}return h}function g(f,w){for(var h=[],o=n(f[f.length-1],w),d=f[f.length-1],M=f[0],T=0;T0||o>0&&C<0)&&h.push(l(d,C,M,o)),C<=0&&h.push(M.slice()),o=C}return h}},8974:function(v,p,t){var r;(function(){var s={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(f){return c(g(f),arguments)}function l(f,w){return n.apply(null,[f].concat(w||[]))}function c(f,w){var h=1,o=f.length,d,M="",T,C,x,S,b,a,E,y;for(T=0;T=0),x.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,x.width?parseInt(x.width):0);break;case"e":d=x.precision?parseFloat(d).toExponential(x.precision):parseFloat(d).toExponential();break;case"f":d=x.precision?parseFloat(d).toFixed(x.precision):parseFloat(d);break;case"g":d=x.precision?String(Number(d.toPrecision(x.precision))):parseFloat(d);break;case"o":d=(parseInt(d,10)>>>0).toString(8);break;case"s":d=String(d),d=x.precision?d.substring(0,x.precision):d;break;case"t":d=String(!!d),d=x.precision?d.substring(0,x.precision):d;break;case"T":d=Object.prototype.toString.call(d).slice(8,-1).toLowerCase(),d=x.precision?d.substring(0,x.precision):d;break;case"u":d=parseInt(d,10)>>>0;break;case"v":d=d.valueOf(),d=x.precision?d.substring(0,x.precision):d;break;case"x":d=(parseInt(d,10)>>>0).toString(16);break;case"X":d=(parseInt(d,10)>>>0).toString(16).toUpperCase();break}s.json.test(x.type)?M+=d:(s.number.test(x.type)&&(!E||x.sign)?(y=E?"+":"-",d=d.toString().replace(s.sign,"")):y="",b=x.pad_char?x.pad_char==="0"?"0":x.pad_char.charAt(1):" ",a=x.width-(y+d).length,S=x.width&&a>0?b.repeat(a):"",M+=x.align?y+d+S:b==="0"?y+S+d:S+y+d)}return M}var u=Object.create(null);function g(f){if(u[f])return u[f];for(var w=f,h,o=[],d=0;w;){if((h=s.text.exec(w))!==null)o.push(h[0]);else if((h=s.modulo.exec(w))!==null)o.push("%");else if((h=s.placeholder.exec(w))!==null){if(h[2]){d|=1;var M=[],T=h[2],C=[];if((C=s.key.exec(T))!==null)for(M.push(C[1]);(T=T.substring(C[0].length))!=="";)if((C=s.key_access.exec(T))!==null)M.push(C[1]);else if((C=s.index_access.exec(T))!==null)M.push(C[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");h[2]=M}else d|=2;if(d===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");o.push({placeholder:h[0],param_no:h[1],keys:h[2],sign:h[3],pad_char:h[4],align:h[5],width:h[6],precision:h[7],type:h[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");w=w.substring(h[0].length)}return u[f]=o}p.sprintf=n,p.vsprintf=l,typeof window<"u"&&(window.sprintf=n,window.vsprintf=l,r=(function(){return{sprintf:n,vsprintf:l}}).call(p,t,p,v),r!==void 0&&(v.exports=r))})()},4162:function(v,p,t){v.exports=g;var r=t(9284),s=t(9584),n={"2d":function(f,w,h){var o=f({order:w,scalarArguments:3,getters:h==="generic"?[0]:void 0,phase:function(M,T,C,x){return M>x|0},vertex:function(M,T,C,x,S,b,a,E,y,z,I,B,k){var O=(a<<0)+(E<<1)+(y<<2)+(z<<3)|0;if(!(O===0||O===15))switch(O){case 0:I.push([M-.5,T-.5]);break;case 1:I.push([M-.25-.25*(x+C-2*k)/(C-x),T-.25-.25*(S+C-2*k)/(C-S)]);break;case 2:I.push([M-.75-.25*(-x-C+2*k)/(x-C),T-.25-.25*(b+x-2*k)/(x-b)]);break;case 3:I.push([M-.5,T-.5-.5*(S+C+b+x-4*k)/(C-S+x-b)]);break;case 4:I.push([M-.25-.25*(b+S-2*k)/(S-b),T-.75-.25*(-S-C+2*k)/(S-C)]);break;case 5:I.push([M-.5-.5*(x+C+b+S-4*k)/(C-x+S-b),T-.5]);break;case 6:I.push([M-.5-.25*(-x-C+b+S)/(x-C+S-b),T-.5-.25*(-S-C+b+x)/(S-C+x-b)]);break;case 7:I.push([M-.75-.25*(b+S-2*k)/(S-b),T-.75-.25*(b+x-2*k)/(x-b)]);break;case 8:I.push([M-.75-.25*(-b-S+2*k)/(b-S),T-.75-.25*(-b-x+2*k)/(b-x)]);break;case 9:I.push([M-.5-.25*(x+C+-b-S)/(C-x+b-S),T-.5-.25*(S+C+-b-x)/(C-S+b-x)]);break;case 10:I.push([M-.5-.5*(-x-C+-b-S+4*k)/(x-C+b-S),T-.5]);break;case 11:I.push([M-.25-.25*(-b-S+2*k)/(b-S),T-.75-.25*(S+C-2*k)/(C-S)]);break;case 12:I.push([M-.5,T-.5-.5*(-S-C+-b-x+4*k)/(S-C+b-x)]);break;case 13:I.push([M-.75-.25*(x+C-2*k)/(C-x),T-.25-.25*(-b-x+2*k)/(b-x)]);break;case 14:I.push([M-.25-.25*(-x-C+2*k)/(x-C),T-.25-.25*(-S-C+2*k)/(S-C)]);break;case 15:I.push([M-.5,T-.5]);break}},cell:function(M,T,C,x,S,b,a,E,y){S?E.push([M,T]):E.push([T,M])}});return function(d,M){var T=[],C=[];return o(d,T,C,M),{positions:T,cells:C}}}};function l(f,w){var h=f.length+"d",o=n[h];if(o)return o(r,f,w)}function c(f,w){for(var h=s(f,w),o=h.length,d=new Array(o),M=new Array(o),T=0;T0&&(C+=.02);for(var S=new Float32Array(T),b=0,a=-.5*C,x=0;xMath.max(x,S)?b[2]=1:x>Math.max(C,S)?b[0]=1:b[1]=1;for(var a=0,E=0,y=0;y<3;++y)a+=T[y]*T[y],E+=b[y]*T[y];for(var y=0;y<3;++y)b[y]-=E/a*T[y];return c(b,b),b}function h(T,C,x,S,b,a,E,y){this.center=r(x),this.up=r(S),this.right=r(b),this.radius=r([a]),this.angle=r([E,y]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(T,C),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var z=0;z<16;++z)this.computedMatrix[z]=.5;this.recalcMatrix(0)}var o=h.prototype;o.setDistanceLimits=function(T,C){T>0?T=Math.log(T):T=-1/0,C>0?C=Math.log(C):C=1/0,C=Math.max(C,T),this.radius.bounds[0][0]=T,this.radius.bounds[1][0]=C},o.getDistanceLimits=function(T){var C=this.radius.bounds[0];return T?(T[0]=Math.exp(C[0][0]),T[1]=Math.exp(C[1][0]),T):[Math.exp(C[0][0]),Math.exp(C[1][0])]},o.recalcMatrix=function(T){this.center.curve(T),this.up.curve(T),this.right.curve(T),this.radius.curve(T),this.angle.curve(T);for(var C=this.computedUp,x=this.computedRight,S=0,b=0,a=0;a<3;++a)b+=C[a]*x[a],S+=C[a]*C[a];for(var E=Math.sqrt(S),y=0,a=0;a<3;++a)x[a]-=C[a]*b/S,y+=x[a]*x[a],C[a]/=E;for(var z=Math.sqrt(y),a=0;a<3;++a)x[a]/=z;var I=this.computedToward;l(I,C,x),c(I,I);for(var B=Math.exp(this.computedRadius[0]),k=this.computedAngle[0],O=this.computedAngle[1],N=Math.cos(k),_=Math.sin(k),U=Math.cos(O),Y=Math.sin(O),J=this.computedCenter,te=N*U,ae=_*U,ce=Y,Q=-N*Y,Z=-_*Y,j=U,K=this.computedEye,ee=this.computedMatrix,a=0;a<3;++a){var oe=te*x[a]+ae*I[a]+ce*C[a];ee[4*a+1]=Q*x[a]+Z*I[a]+j*C[a],ee[4*a+2]=oe,ee[4*a+3]=0}var q=ee[1],$=ee[5],le=ee[9],ie=ee[2],he=ee[6],me=ee[10],Me=$*me-le*he,Te=le*ie-q*me,Oe=q*he-$*ie,Ne=g(Me,Te,Oe);Me/=Ne,Te/=Ne,Oe/=Ne,ee[0]=Me,ee[4]=Te,ee[8]=Oe;for(var a=0;a<3;++a)K[a]=J[a]+ee[2+4*a]*B;for(var a=0;a<3;++a){for(var y=0,Ee=0;Ee<3;++Ee)y+=ee[a+4*Ee]*K[Ee];ee[12+a]=-y}ee[15]=1},o.getMatrix=function(T,C){this.recalcMatrix(T);var x=this.computedMatrix;if(C){for(var S=0;S<16;++S)C[S]=x[S];return C}return x};var d=[0,0,0];o.rotate=function(T,C,x,S){if(this.angle.move(T,C,x),S){this.recalcMatrix(T);var b=this.computedMatrix;d[0]=b[2],d[1]=b[6],d[2]=b[10];for(var a=this.computedUp,E=this.computedRight,y=this.computedToward,z=0;z<3;++z)b[4*z]=a[z],b[4*z+1]=E[z],b[4*z+2]=y[z];n(b,b,S,d);for(var z=0;z<3;++z)a[z]=b[4*z],E[z]=b[4*z+1];this.up.set(T,a[0],a[1],a[2]),this.right.set(T,E[0],E[1],E[2])}},o.pan=function(T,C,x,S){C=C||0,x=x||0,S=S||0,this.recalcMatrix(T);var b=this.computedMatrix;Math.exp(this.computedRadius[0]);var a=b[1],E=b[5],y=b[9],z=g(a,E,y);a/=z,E/=z,y/=z;var I=b[0],B=b[4],k=b[8],O=I*a+B*E+k*y;I-=a*O,B-=E*O,k-=y*O;var N=g(I,B,k);I/=N,B/=N,k/=N;var _=I*C+a*x,U=B*C+E*x,Y=k*C+y*x;this.center.move(T,_,U,Y);var J=Math.exp(this.computedRadius[0]);J=Math.max(1e-4,J+S),this.radius.set(T,Math.log(J))},o.translate=function(T,C,x,S){this.center.move(T,C||0,x||0,S||0)},o.setMatrix=function(T,C,x,S){var b=1;typeof x=="number"&&(b=x|0),(b<0||b>3)&&(b=1);var a=(b+2)%3;C||(this.recalcMatrix(T),C=this.computedMatrix);var E=C[b],y=C[b+4],z=C[b+8];if(S){var B=Math.abs(E),k=Math.abs(y),O=Math.abs(z),N=Math.max(B,k,O);B===N?(E=E<0?-1:1,y=z=0):O===N?(z=z<0?-1:1,E=y=0):(y=y<0?-1:1,E=z=0)}else{var I=g(E,y,z);E/=I,y/=I,z/=I}var _=C[a],U=C[a+4],Y=C[a+8],J=_*E+U*y+Y*z;_-=E*J,U-=y*J,Y-=z*J;var te=g(_,U,Y);_/=te,U/=te,Y/=te;var ae=y*Y-z*U,ce=z*_-E*Y,Q=E*U-y*_,Z=g(ae,ce,Q);ae/=Z,ce/=Z,Q/=Z,this.center.jump(T,He,Fe,Ge),this.radius.idle(T),this.up.jump(T,E,y,z),this.right.jump(T,_,U,Y);var j,K;if(b===2){var ee=C[1],oe=C[5],q=C[9],$=ee*_+oe*U+q*Y,le=ee*ae+oe*ce+q*Q;Me<0?j=-Math.PI/2:j=Math.PI/2,K=Math.atan2(le,$)}else{var ie=C[2],he=C[6],me=C[10],Me=ie*E+he*y+me*z,Te=ie*_+he*U+me*Y,Oe=ie*ae+he*ce+me*Q;j=Math.asin(f(Me)),K=Math.atan2(Oe,Te)}this.angle.jump(T,K,j),this.recalcMatrix(T);var Ne=C[2],Ee=C[6],xe=C[10],Se=this.computedMatrix;s(Se,C);var Ue=Se[15],He=Se[12]/Ue,Fe=Se[13]/Ue,Ge=Se[14]/Ue,nt=Math.exp(this.computedRadius[0]);this.center.jump(T,He-Ne*nt,Fe-Ee*nt,Ge-xe*nt)},o.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},o.idle=function(T){this.center.idle(T),this.up.idle(T),this.right.idle(T),this.radius.idle(T),this.angle.idle(T)},o.flush=function(T){this.center.flush(T),this.up.flush(T),this.right.flush(T),this.radius.flush(T),this.angle.flush(T)},o.setDistance=function(T,C){C>0&&this.radius.set(T,Math.log(C))},o.lookAt=function(T,C,x,S){this.recalcMatrix(T),C=C||this.computedEye,x=x||this.computedCenter,S=S||this.computedUp;var b=S[0],a=S[1],E=S[2],y=g(b,a,E);if(!(y<1e-6)){b/=y,a/=y,E/=y;var z=C[0]-x[0],I=C[1]-x[1],B=C[2]-x[2],k=g(z,I,B);if(!(k<1e-6)){z/=k,I/=k,B/=k;var O=this.computedRight,N=O[0],_=O[1],U=O[2],Y=b*N+a*_+E*U;N-=Y*b,_-=Y*a,U-=Y*E;var J=g(N,_,U);if(!(J<.01&&(N=a*B-E*I,_=E*z-b*B,U=b*I-a*z,J=g(N,_,U),J<1e-6))){N/=J,_/=J,U/=J,this.up.set(T,b,a,E),this.right.set(T,N,_,U),this.center.set(T,x[0],x[1],x[2]),this.radius.set(T,Math.log(k));var te=a*U-E*_,ae=E*N-b*U,ce=b*_-a*N,Q=g(te,ae,ce);te/=Q,ae/=Q,ce/=Q;var Z=b*z+a*I+E*B,j=N*z+_*I+U*B,K=te*z+ae*I+ce*B,ee=Math.asin(f(Z)),oe=Math.atan2(K,j),q=this.angle._state,$=q[q.length-1],le=q[q.length-2];$=$%(2*Math.PI);var ie=Math.abs($+2*Math.PI-oe),he=Math.abs($-oe),me=Math.abs($-2*Math.PI-oe);ie0?U.pop():new ArrayBuffer(N)}p.mallocArrayBuffer=d;function M(O){return new Uint8Array(d(O),0,O)}p.mallocUint8=M;function T(O){return new Uint16Array(d(2*O),0,O)}p.mallocUint16=T;function C(O){return new Uint32Array(d(4*O),0,O)}p.mallocUint32=C;function x(O){return new Int8Array(d(O),0,O)}p.mallocInt8=x;function S(O){return new Int16Array(d(2*O),0,O)}p.mallocInt16=S;function b(O){return new Int32Array(d(4*O),0,O)}p.mallocInt32=b;function a(O){return new Float32Array(d(4*O),0,O)}p.mallocFloat32=p.mallocFloat=a;function E(O){return new Float64Array(d(8*O),0,O)}p.mallocFloat64=p.mallocDouble=E;function y(O){return l?new Uint8ClampedArray(d(O),0,O):M(O)}p.mallocUint8Clamped=y;function z(O){return c?new BigUint64Array(d(8*O),0,O):null}p.mallocBigUint64=z;function I(O){return u?new BigInt64Array(d(8*O),0,O):null}p.mallocBigInt64=I;function B(O){return new DataView(d(O),0,O)}p.mallocDataView=B;function k(O){O=r.nextPow2(O);var N=r.log2(O),_=w[N];return _.length>0?_.pop():new n(O)}p.mallocBuffer=k,p.clearCache=function(){for(var N=0;N<32;++N)g.UINT8[N].length=0,g.UINT16[N].length=0,g.UINT32[N].length=0,g.INT8[N].length=0,g.INT16[N].length=0,g.INT32[N].length=0,g.FLOAT[N].length=0,g.DOUBLE[N].length=0,g.BIGUINT64[N].length=0,g.BIGINT64[N].length=0,g.UINT8C[N].length=0,f[N].length=0,w[N].length=0}},1731:function(v){"use restrict";v.exports=p;function p(r){this.roots=new Array(r),this.ranks=new Array(r);for(var s=0;s",U="",Y=_.length,J=U.length,te=k[0]===d||k[0]===C,ae=0,ce=-J;ae>-1&&(ae=O.indexOf(_,ae),!(ae===-1||(ce=O.indexOf(U,ae+Y),ce===-1)||ce<=ae));){for(var Q=ae;Q=ce)N[Q]=null,O=O.substr(0,Q)+" "+O.substr(Q+1);else if(N[Q]!==null){var Z=N[Q].indexOf(k[0]);Z===-1?N[Q]+=k:te&&(N[Q]=N[Q].substr(0,Z+1)+(1+parseInt(N[Q][Z+1]))+N[Q].substr(Z+2))}var j=ae+Y,K=O.substr(j,ce-j),ee=K.indexOf(_);ee!==-1?ae=ee:ae=ce+J}return N}function b(B,k,O){for(var N=k.textAlign||"start",_=k.textBaseline||"alphabetic",U=[1<<30,1<<30],Y=[0,0],J=B.length,te=0;te/g,` `):O=O.replace(/\/g," ");var Y="",J=[];for($=0;$-1?parseInt(Ge[1+$e]):0,dt=et>-1?parseInt(nt[1+et]):0;ct!==dt&&(qe=qe.replace(Oe(),"?px "),he*=Math.pow(.75,dt-ct),qe=qe.replace("?px ",Oe())),ie+=.25*Z*(dt-ct)}if(U.superscripts===!0){var pt=Ge.indexOf(d),At=nt.indexOf(d),Mt=pt>-1?parseInt(Ge[1+pt]):0,Vt=At>-1?parseInt(nt[1+At]):0;Mt!==Vt&&(qe=qe.replace(Oe(),"?px "),he*=Math.pow(.75,Vt-Mt),qe=qe.replace("?px ",Oe())),ie-=.25*Z*(Vt-Mt)}if(U.bolds===!0){var Je=Ge.indexOf(f)>-1,De=nt.indexOf(f)>-1;!Je&&De&&(Ie?qe=qe.replace("italic ","italic bold "):qe="bold "+qe),Je&&!De&&(qe=qe.replace("bold ",""))}if(U.italics===!0){var Ie=Ge.indexOf(h)>-1,ze=nt.indexOf(h)>-1;!Ie&&ze&&(qe="italic "+qe),Ie&&!ze&&(qe=qe.replace("italic ",""))}k.font=qe}for(q=0;q0&&(_=N.size),N.lineSpacing&&N.lineSpacing>0&&(U=N.lineSpacing),N.styletags&&N.styletags.breaklines&&(Y.breaklines=!!N.styletags.breaklines),N.styletags&&N.styletags.bolds&&(Y.bolds=!!N.styletags.bolds),N.styletags&&N.styletags.italics&&(Y.italics=!!N.styletags.italics),N.styletags&&N.styletags.subscripts&&(Y.subscripts=!!N.styletags.subscripts),N.styletags&&N.styletags.superscripts&&(Y.superscripts=!!N.styletags.superscripts)),O.font=[N.fontStyle,N.fontVariant,N.fontWeight,_+"px",N.font].filter(function(te){return te}).join(" "),O.textAlign="start",O.textBaseline="alphabetic",O.direction="ltr";var J=a(k,O,B,_,U,Y);return z(J,N,_)}},5346:function(v){(function(){if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function t(E){E.permitHostObjects___&&E.permitHostObjects___(t)}typeof ses<"u"&&(ses.weakMapPermitHostObjects=t);var r=!1;if(typeof WeakMap=="function"){var s=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var n=new s,l=Object.freeze({});if(n.set(l,1),n.get(l)!==1)r=!0;else{v.exports=WeakMap;return}}}var c=Object.getOwnPropertyNames,u=Object.defineProperty,g=Object.isExtensible,f="weakmap:",w=f+"ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var h=new ArrayBuffer(25),o=new Uint8Array(h);crypto.getRandomValues(o),w=f+"rand:"+Array.prototype.map.call(o,function(E){return(E%36).toString(36)}).join("")+"___"}function d(E){return!(E.substr(0,f.length)==f&&E.substr(E.length-3)==="___")}if(u(Object,"getOwnPropertyNames",{value:function(y){return c(y).filter(d)}}),"getPropertyNames"in Object){var M=Object.getPropertyNames;u(Object,"getPropertyNames",{value:function(y){return M(y).filter(d)}})}function T(E){if(E!==Object(E))throw new TypeError("Not an object: "+E);var y=E[w];if(y&&y.key===E)return y;if(g(E)){y={key:E};try{return u(E,w,{value:y,writable:!1,enumerable:!1,configurable:!1}),y}catch{return}}}(function(){var E=Object.freeze;u(Object,"freeze",{value:function(B){return T(B),E(B)}});var y=Object.seal;u(Object,"seal",{value:function(B){return T(B),y(B)}});var z=Object.preventExtensions;u(Object,"preventExtensions",{value:function(B){return T(B),z(B)}})})();function C(E){return E.prototype=null,Object.freeze(E)}var x=!1;function S(){!x&&typeof console<"u"&&(x=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var b=0,a=function(){this instanceof a||S();var E=[],y=[],z=b++;function I(N,_){var U,Y=T(N);return Y?z in Y?Y[z]:_:(U=E.indexOf(N),U>=0?y[U]:_)}function B(N){var _=T(N);return _?z in _:E.indexOf(N)>=0}function k(N,_){var U,Y=T(N);return Y?Y[z]=_:(U=E.indexOf(N),U>=0?y[U]=_:(U=E.length,y[U]=_,E[U]=N)),this}function O(N){var _=T(N),U,Y;return _?z in _&&delete _[z]:(U=E.indexOf(N),U<0?!1:(Y=E.length-1,E[U]=void 0,y[U]=y[Y],E[U]=E[Y],E.length=Y,y.length=Y,!0))}return Object.create(a.prototype,{get___:{value:C(I)},has___:{value:C(B)},set___:{value:C(k)},delete___:{value:C(O)}})};a.prototype=Object.create(Object.prototype,{get:{value:function(y,z){return this.get___(y,z)},writable:!0,configurable:!0},has:{value:function(y){return this.has___(y)},writable:!0,configurable:!0},set:{value:function(y,z){return this.set___(y,z)},writable:!0,configurable:!0},delete:{value:function(y){return this.delete___(y)},writable:!0,configurable:!0}}),typeof s=="function"?function(){r&&typeof Proxy<"u"&&(Proxy=void 0);function E(){this instanceof a||S();var y=new s,z=void 0,I=!1;function B(_,U){return z?y.has(_)?y.get(_):z.get___(_,U):y.get(_,U)}function k(_){return y.has(_)||(z?z.has___(_):!1)}var O;r?O=function(_,U){return y.set(_,U),y.has(_)||(z||(z=new a),z.set(_,U)),this}:O=function(_,U){if(I)try{y.set(_,U)}catch{z||(z=new a),z.set___(_,U)}else y.set(_,U);return this};function N(_){var U=!!y.delete(_);return z&&z.delete___(_)||U}return Object.create(a.prototype,{get___:{value:C(B)},has___:{value:C(k)},set___:{value:C(O)},delete___:{value:C(N)},permitHostObjects___:{value:C(function(_){if(_===t)I=!0;else throw new Error("bogus call to permitHostObjects___")})}})}E.prototype=a.prototype,v.exports=E,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),v.exports=a)})()},9222:function(v,p,t){var r=t(7178);v.exports=s;function s(){var n={};return function(l){if((typeof l!="object"||l===null)&&typeof l!="function")throw new Error("Weakmap-shim: Key must be object");var c=l.valueOf(n);return c&&c.identity===n?c:r(l,n)}}},7178:function(v){v.exports=p;function p(t,r){var s={identity:r},n=t.valueOf;return Object.defineProperty(t,"valueOf",{value:function(l){return l!==r?n.apply(this,arguments):s},writable:!0}),s}},4037:function(v,p,t){var r=t(9222);v.exports=s;function s(){var n=r();return{get:function(l,c){var u=n(l);return u.hasOwnProperty("value")?u.value:c},set:function(l,c){return n(l).value=c,this},has:function(l){return"value"in n(l)},delete:function(l){return delete n(l).value}}}},6183:function(v){function p(){return function(c,u,g,f,w,h){var o=c[0],d=g[0],M=[0],T=d;f|=0;var C=0,x=d;for(C=0;C=0!=b>=0&&w.push(M[0]+.5+.5*(S+b)/(S-b))}f+=x,++M[0]}}}function t(){return p()}var r=t;function s(c){var u={};return function(f,w,h){var o=f.dtype,d=f.order,M=[o,d.join()].join(),T=u[M];return T||(u[M]=T=c([o,d])),T(f.shape.slice(0),f.data,f.stride,f.offset|0,w,h)}}function n(c){return s(r.bind(void 0,c))}function l(c){return n({funcName:c.funcName})}v.exports=l({funcName:"zeroCrossings"})},9584:function(v,p,t){v.exports=s;var r=t(6183);function s(n,l){var c=[];return l=+l||0,r(n.hi(n.shape[0]-1),c,l),c}},6601:function(){}},i={};function L(v){var p=i[v];if(p!==void 0)return p.exports;var t=i[v]={id:v,loaded:!1,exports:{}};return P[v].call(t.exports,t,t.exports,L),t.loaded=!0,t.exports}(function(){L.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()})(),function(){L.nmd=function(v){return v.paths=[],v.children||(v.children=[]),v}}();var A=L(7386);return A}()})},12856:function(G,V,e){/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */function m(Je,De){if(!(Je instanceof De))throw new TypeError("Cannot call a class as a function")}function P(Je,De){for(var Ie=0;Ie"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 l(Je){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Ie){return Ie.__proto__||Object.getPrototypeOf(Ie)},l(Je)}function c(Je){"@babel/helpers - typeof";return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(De){return typeof De}:function(De){return De&&typeof Symbol=="function"&&De.constructor===Symbol&&De!==Symbol.prototype?"symbol":typeof De},c(Je)}var u=e(95341),g=e(95280),f=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;V.Buffer=d,V.SlowBuffer=I,V.INSPECT_MAX_BYTES=50;var w=2147483647;V.kMaxLength=w,d.TYPED_ARRAY_SUPPORT=h(),!d.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function h(){try{var Je=new Uint8Array(1),De={foo:function(){return 42}};return Object.setPrototypeOf(De,Uint8Array.prototype),Object.setPrototypeOf(Je,De),Je.foo()===42}catch{return!1}}Object.defineProperty(d.prototype,"parent",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.buffer}}),Object.defineProperty(d.prototype,"offset",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.byteOffset}});function o(Je){if(Je>w)throw new RangeError('The value "'+Je+'" is invalid for option "size"');var De=new Uint8Array(Je);return Object.setPrototypeOf(De,d.prototype),De}function d(Je,De,Ie){if(typeof Je=="number"){if(typeof De=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return x(Je)}return M(Je,De,Ie)}d.poolSize=8192;function M(Je,De,Ie){if(typeof Je=="string")return S(Je,De);if(ArrayBuffer.isView(Je))return a(Je);if(Je==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+c(Je));if(dt(Je,ArrayBuffer)||Je&&dt(Je.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(dt(Je,SharedArrayBuffer)||Je&&dt(Je.buffer,SharedArrayBuffer)))return E(Je,De,Ie);if(typeof Je=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ze=Je.valueOf&&Je.valueOf();if(ze!=null&&ze!==Je)return d.from(ze,De,Ie);var Pe=y(Je);if(Pe)return Pe;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Je[Symbol.toPrimitive]=="function")return d.from(Je[Symbol.toPrimitive]("string"),De,Ie);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+c(Je))}d.from=function(Je,De,Ie){return M(Je,De,Ie)},Object.setPrototypeOf(d.prototype,Uint8Array.prototype),Object.setPrototypeOf(d,Uint8Array);function T(Je){if(typeof Je!="number")throw new TypeError('"size" argument must be of type number');if(Je<0)throw new RangeError('The value "'+Je+'" is invalid for option "size"')}function C(Je,De,Ie){return T(Je),Je<=0?o(Je):De!==void 0?typeof Ie=="string"?o(Je).fill(De,Ie):o(Je).fill(De):o(Je)}d.alloc=function(Je,De,Ie){return C(Je,De,Ie)};function x(Je){return T(Je),o(Je<0?0:z(Je)|0)}d.allocUnsafe=function(Je){return x(Je)},d.allocUnsafeSlow=function(Je){return x(Je)};function S(Je,De){if((typeof De!="string"||De==="")&&(De="utf8"),!d.isEncoding(De))throw new TypeError("Unknown encoding: "+De);var Ie=B(Je,De)|0,ze=o(Ie),Pe=ze.write(Je,De);return Pe!==Ie&&(ze=ze.slice(0,Pe)),ze}function b(Je){for(var De=Je.length<0?0:z(Je.length)|0,Ie=o(De),ze=0;ze=w)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+w.toString(16)+" bytes");return Je|0}function I(Je){return+Je!=Je&&(Je=0),d.alloc(+Je)}d.isBuffer=function(De){return De!=null&&De._isBuffer===!0&&De!==d.prototype},d.compare=function(De,Ie){if(dt(De,Uint8Array)&&(De=d.from(De,De.offset,De.byteLength)),dt(Ie,Uint8Array)&&(Ie=d.from(Ie,Ie.offset,Ie.byteLength)),!d.isBuffer(De)||!d.isBuffer(Ie))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(De===Ie)return 0;for(var ze=De.length,Pe=Ie.length,be=0,se=Math.min(ze,Pe);bePe.length?(d.isBuffer(se)||(se=d.from(se)),se.copy(Pe,be)):Uint8Array.prototype.set.call(Pe,se,be);else if(d.isBuffer(se))se.copy(Pe,be);else throw new TypeError('"list" argument must be an Array of Buffers');be+=se.length}return Pe};function B(Je,De){if(d.isBuffer(Je))return Je.length;if(ArrayBuffer.isView(Je)||dt(Je,ArrayBuffer))return Je.byteLength;if(typeof Je!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+c(Je));var Ie=Je.length,ze=arguments.length>2&&arguments[2]===!0;if(!ze&&Ie===0)return 0;for(var Pe=!1;;)switch(De){case"ascii":case"latin1":case"binary":return Ie;case"utf8":case"utf-8":return nt(Je).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ie*2;case"hex":return Ie>>>1;case"base64":return et(Je).length;default:if(Pe)return ze?-1:nt(Je).length;De=(""+De).toLowerCase(),Pe=!0}}d.byteLength=B;function k(Je,De,Ie){var ze=!1;if((De===void 0||De<0)&&(De=0),De>this.length||((Ie===void 0||Ie>this.length)&&(Ie=this.length),Ie<=0)||(Ie>>>=0,De>>>=0,Ie<=De))return"";for(Je||(Je="utf8");;)switch(Je){case"hex":return oe(this,De,Ie);case"utf8":case"utf-8":return Q(this,De,Ie);case"ascii":return K(this,De,Ie);case"latin1":case"binary":return ee(this,De,Ie);case"base64":return ce(this,De,Ie);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return q(this,De,Ie);default:if(ze)throw new TypeError("Unknown encoding: "+Je);Je=(Je+"").toLowerCase(),ze=!0}}d.prototype._isBuffer=!0;function O(Je,De,Ie){var ze=Je[De];Je[De]=Je[Ie],Je[Ie]=ze}d.prototype.swap16=function(){var De=this.length;if(De%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Ie=0;IeIe&&(De+=" ... "),""},f&&(d.prototype[f]=d.prototype.inspect),d.prototype.compare=function(De,Ie,ze,Pe,be){if(dt(De,Uint8Array)&&(De=d.from(De,De.offset,De.byteLength)),!d.isBuffer(De))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+c(De));if(Ie===void 0&&(Ie=0),ze===void 0&&(ze=De?De.length:0),Pe===void 0&&(Pe=0),be===void 0&&(be=this.length),Ie<0||ze>De.length||Pe<0||be>this.length)throw new RangeError("out of range index");if(Pe>=be&&Ie>=ze)return 0;if(Pe>=be)return-1;if(Ie>=ze)return 1;if(Ie>>>=0,ze>>>=0,Pe>>>=0,be>>>=0,this===De)return 0;for(var se=be-Pe,ye=ze-Ie,Le=Math.min(se,ye),Be=this.slice(Pe,be),ot=De.slice(Ie,ze),at=0;at2147483647?Ie=2147483647:Ie<-2147483648&&(Ie=-2147483648),Ie=+Ie,pt(Ie)&&(Ie=Pe?0:Je.length-1),Ie<0&&(Ie=Je.length+Ie),Ie>=Je.length){if(Pe)return-1;Ie=Je.length-1}else if(Ie<0)if(Pe)Ie=0;else return-1;if(typeof De=="string"&&(De=d.from(De,ze)),d.isBuffer(De))return De.length===0?-1:_(Je,De,Ie,ze,Pe);if(typeof De=="number")return De=De&255,typeof Uint8Array.prototype.indexOf=="function"?Pe?Uint8Array.prototype.indexOf.call(Je,De,Ie):Uint8Array.prototype.lastIndexOf.call(Je,De,Ie):_(Je,[De],Ie,ze,Pe);throw new TypeError("val must be string, number or Buffer")}function _(Je,De,Ie,ze,Pe){var be=1,se=Je.length,ye=De.length;if(ze!==void 0&&(ze=String(ze).toLowerCase(),ze==="ucs2"||ze==="ucs-2"||ze==="utf16le"||ze==="utf-16le")){if(Je.length<2||De.length<2)return-1;be=2,se/=2,ye/=2,Ie/=2}function Le(It,Bt){return be===1?It[Bt]:It.readUInt16BE(Bt*be)}var Be;if(Pe){var ot=-1;for(Be=Ie;Bese&&(Ie=se-ye),Be=Ie;Be>=0;Be--){for(var at=!0,wt=0;wtPe&&(ze=Pe)):ze=Pe;var be=De.length;ze>be/2&&(ze=be/2);var se;for(se=0;se>>0,isFinite(ze)?(ze=ze>>>0,Pe===void 0&&(Pe="utf8")):(Pe=ze,ze=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var be=this.length-Ie;if((ze===void 0||ze>be)&&(ze=be),De.length>0&&(ze<0||Ie<0)||Ie>this.length)throw new RangeError("Attempt to write outside buffer bounds");Pe||(Pe="utf8");for(var se=!1;;)switch(Pe){case"hex":return U(this,De,Ie,ze);case"utf8":case"utf-8":return Y(this,De,Ie,ze);case"ascii":case"latin1":case"binary":return J(this,De,Ie,ze);case"base64":return te(this,De,Ie,ze);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ae(this,De,Ie,ze);default:if(se)throw new TypeError("Unknown encoding: "+Pe);Pe=(""+Pe).toLowerCase(),se=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ce(Je,De,Ie){return De===0&&Ie===Je.length?u.fromByteArray(Je):u.fromByteArray(Je.slice(De,Ie))}function Q(Je,De,Ie){Ie=Math.min(Je.length,Ie);for(var ze=[],Pe=De;Pe239?4:be>223?3:be>191?2:1;if(Pe+ye<=Ie){var Le=void 0,Be=void 0,ot=void 0,at=void 0;switch(ye){case 1:be<128&&(se=be);break;case 2:Le=Je[Pe+1],(Le&192)===128&&(at=(be&31)<<6|Le&63,at>127&&(se=at));break;case 3:Le=Je[Pe+1],Be=Je[Pe+2],(Le&192)===128&&(Be&192)===128&&(at=(be&15)<<12|(Le&63)<<6|Be&63,at>2047&&(at<55296||at>57343)&&(se=at));break;case 4:Le=Je[Pe+1],Be=Je[Pe+2],ot=Je[Pe+3],(Le&192)===128&&(Be&192)===128&&(ot&192)===128&&(at=(be&15)<<18|(Le&63)<<12|(Be&63)<<6|ot&63,at>65535&&at<1114112&&(se=at))}}se===null?(se=65533,ye=1):se>65535&&(se-=65536,ze.push(se>>>10&1023|55296),se=56320|se&1023),ze.push(se),Pe+=ye}return j(ze)}var Z=4096;function j(Je){var De=Je.length;if(De<=Z)return String.fromCharCode.apply(String,Je);for(var Ie="",ze=0;zeze)&&(Ie=ze);for(var Pe="",be=De;beze&&(De=ze),Ie<0?(Ie+=ze,Ie<0&&(Ie=0)):Ie>ze&&(Ie=ze),IeIe)throw new RangeError("Trying to access beyond buffer length")}d.prototype.readUintLE=d.prototype.readUIntLE=function(De,Ie,ze){De=De>>>0,Ie=Ie>>>0,ze||$(De,Ie,this.length);for(var Pe=this[De],be=1,se=0;++se>>0,Ie=Ie>>>0,ze||$(De,Ie,this.length);for(var Pe=this[De+--Ie],be=1;Ie>0&&(be*=256);)Pe+=this[De+--Ie]*be;return Pe},d.prototype.readUint8=d.prototype.readUInt8=function(De,Ie){return De=De>>>0,Ie||$(De,1,this.length),this[De]},d.prototype.readUint16LE=d.prototype.readUInt16LE=function(De,Ie){return De=De>>>0,Ie||$(De,2,this.length),this[De]|this[De+1]<<8},d.prototype.readUint16BE=d.prototype.readUInt16BE=function(De,Ie){return De=De>>>0,Ie||$(De,2,this.length),this[De]<<8|this[De+1]},d.prototype.readUint32LE=d.prototype.readUInt32LE=function(De,Ie){return De=De>>>0,Ie||$(De,4,this.length),(this[De]|this[De+1]<<8|this[De+2]<<16)+this[De+3]*16777216},d.prototype.readUint32BE=d.prototype.readUInt32BE=function(De,Ie){return De=De>>>0,Ie||$(De,4,this.length),this[De]*16777216+(this[De+1]<<16|this[De+2]<<8|this[De+3])},d.prototype.readBigUInt64LE=Mt(function(De){De=De>>>0,Ue(De,"offset");var Ie=this[De],ze=this[De+7];(Ie===void 0||ze===void 0)&&He(De,this.length-8);var Pe=Ie+this[++De]*Math.pow(2,8)+this[++De]*Math.pow(2,16)+this[++De]*Math.pow(2,24),be=this[++De]+this[++De]*Math.pow(2,8)+this[++De]*Math.pow(2,16)+ze*Math.pow(2,24);return BigInt(Pe)+(BigInt(be)<>>0,Ue(De,"offset");var Ie=this[De],ze=this[De+7];(Ie===void 0||ze===void 0)&&He(De,this.length-8);var Pe=Ie*Math.pow(2,24)+this[++De]*Math.pow(2,16)+this[++De]*Math.pow(2,8)+this[++De],be=this[++De]*Math.pow(2,24)+this[++De]*Math.pow(2,16)+this[++De]*Math.pow(2,8)+ze;return(BigInt(Pe)<>>0,Ie=Ie>>>0,ze||$(De,Ie,this.length);for(var Pe=this[De],be=1,se=0;++se=be&&(Pe-=Math.pow(2,8*Ie)),Pe},d.prototype.readIntBE=function(De,Ie,ze){De=De>>>0,Ie=Ie>>>0,ze||$(De,Ie,this.length);for(var Pe=Ie,be=1,se=this[De+--Pe];Pe>0&&(be*=256);)se+=this[De+--Pe]*be;return be*=128,se>=be&&(se-=Math.pow(2,8*Ie)),se},d.prototype.readInt8=function(De,Ie){return De=De>>>0,Ie||$(De,1,this.length),this[De]&128?(255-this[De]+1)*-1:this[De]},d.prototype.readInt16LE=function(De,Ie){De=De>>>0,Ie||$(De,2,this.length);var ze=this[De]|this[De+1]<<8;return ze&32768?ze|4294901760:ze},d.prototype.readInt16BE=function(De,Ie){De=De>>>0,Ie||$(De,2,this.length);var ze=this[De+1]|this[De]<<8;return ze&32768?ze|4294901760:ze},d.prototype.readInt32LE=function(De,Ie){return De=De>>>0,Ie||$(De,4,this.length),this[De]|this[De+1]<<8|this[De+2]<<16|this[De+3]<<24},d.prototype.readInt32BE=function(De,Ie){return De=De>>>0,Ie||$(De,4,this.length),this[De]<<24|this[De+1]<<16|this[De+2]<<8|this[De+3]},d.prototype.readBigInt64LE=Mt(function(De){De=De>>>0,Ue(De,"offset");var Ie=this[De],ze=this[De+7];(Ie===void 0||ze===void 0)&&He(De,this.length-8);var Pe=this[De+4]+this[De+5]*Math.pow(2,8)+this[De+6]*Math.pow(2,16)+(ze<<24);return(BigInt(Pe)<>>0,Ue(De,"offset");var Ie=this[De],ze=this[De+7];(Ie===void 0||ze===void 0)&&He(De,this.length-8);var Pe=(Ie<<24)+this[++De]*Math.pow(2,16)+this[++De]*Math.pow(2,8)+this[++De];return(BigInt(Pe)<>>0,Ie||$(De,4,this.length),g.read(this,De,!0,23,4)},d.prototype.readFloatBE=function(De,Ie){return De=De>>>0,Ie||$(De,4,this.length),g.read(this,De,!1,23,4)},d.prototype.readDoubleLE=function(De,Ie){return De=De>>>0,Ie||$(De,8,this.length),g.read(this,De,!0,52,8)},d.prototype.readDoubleBE=function(De,Ie){return De=De>>>0,Ie||$(De,8,this.length),g.read(this,De,!1,52,8)};function le(Je,De,Ie,ze,Pe,be){if(!d.isBuffer(Je))throw new TypeError('"buffer" argument must be a Buffer instance');if(De>Pe||DeJe.length)throw new RangeError("Index out of range")}d.prototype.writeUintLE=d.prototype.writeUIntLE=function(De,Ie,ze,Pe){if(De=+De,Ie=Ie>>>0,ze=ze>>>0,!Pe){var be=Math.pow(2,8*ze)-1;le(this,De,Ie,ze,be,0)}var se=1,ye=0;for(this[Ie]=De&255;++ye>>0,ze=ze>>>0,!Pe){var be=Math.pow(2,8*ze)-1;le(this,De,Ie,ze,be,0)}var se=ze-1,ye=1;for(this[Ie+se]=De&255;--se>=0&&(ye*=256);)this[Ie+se]=De/ye&255;return Ie+ze},d.prototype.writeUint8=d.prototype.writeUInt8=function(De,Ie,ze){return De=+De,Ie=Ie>>>0,ze||le(this,De,Ie,1,255,0),this[Ie]=De&255,Ie+1},d.prototype.writeUint16LE=d.prototype.writeUInt16LE=function(De,Ie,ze){return De=+De,Ie=Ie>>>0,ze||le(this,De,Ie,2,65535,0),this[Ie]=De&255,this[Ie+1]=De>>>8,Ie+2},d.prototype.writeUint16BE=d.prototype.writeUInt16BE=function(De,Ie,ze){return De=+De,Ie=Ie>>>0,ze||le(this,De,Ie,2,65535,0),this[Ie]=De>>>8,this[Ie+1]=De&255,Ie+2},d.prototype.writeUint32LE=d.prototype.writeUInt32LE=function(De,Ie,ze){return De=+De,Ie=Ie>>>0,ze||le(this,De,Ie,4,4294967295,0),this[Ie+3]=De>>>24,this[Ie+2]=De>>>16,this[Ie+1]=De>>>8,this[Ie]=De&255,Ie+4},d.prototype.writeUint32BE=d.prototype.writeUInt32BE=function(De,Ie,ze){return De=+De,Ie=Ie>>>0,ze||le(this,De,Ie,4,4294967295,0),this[Ie]=De>>>24,this[Ie+1]=De>>>16,this[Ie+2]=De>>>8,this[Ie+3]=De&255,Ie+4};function ie(Je,De,Ie,ze,Pe){Se(De,ze,Pe,Je,Ie,7);var be=Number(De&BigInt(4294967295));Je[Ie++]=be,be=be>>8,Je[Ie++]=be,be=be>>8,Je[Ie++]=be,be=be>>8,Je[Ie++]=be;var se=Number(De>>BigInt(32)&BigInt(4294967295));return Je[Ie++]=se,se=se>>8,Je[Ie++]=se,se=se>>8,Je[Ie++]=se,se=se>>8,Je[Ie++]=se,Ie}function he(Je,De,Ie,ze,Pe){Se(De,ze,Pe,Je,Ie,7);var be=Number(De&BigInt(4294967295));Je[Ie+7]=be,be=be>>8,Je[Ie+6]=be,be=be>>8,Je[Ie+5]=be,be=be>>8,Je[Ie+4]=be;var se=Number(De>>BigInt(32)&BigInt(4294967295));return Je[Ie+3]=se,se=se>>8,Je[Ie+2]=se,se=se>>8,Je[Ie+1]=se,se=se>>8,Je[Ie]=se,Ie+8}d.prototype.writeBigUInt64LE=Mt(function(De){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ie(this,De,Ie,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeBigUInt64BE=Mt(function(De){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return he(this,De,Ie,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeIntLE=function(De,Ie,ze,Pe){if(De=+De,Ie=Ie>>>0,!Pe){var be=Math.pow(2,8*ze-1);le(this,De,Ie,ze,be-1,-be)}var se=0,ye=1,Le=0;for(this[Ie]=De&255;++se>0)-Le&255;return Ie+ze},d.prototype.writeIntBE=function(De,Ie,ze,Pe){if(De=+De,Ie=Ie>>>0,!Pe){var be=Math.pow(2,8*ze-1);le(this,De,Ie,ze,be-1,-be)}var se=ze-1,ye=1,Le=0;for(this[Ie+se]=De&255;--se>=0&&(ye*=256);)De<0&&Le===0&&this[Ie+se+1]!==0&&(Le=1),this[Ie+se]=(De/ye>>0)-Le&255;return Ie+ze},d.prototype.writeInt8=function(De,Ie,ze){return De=+De,Ie=Ie>>>0,ze||le(this,De,Ie,1,127,-128),De<0&&(De=255+De+1),this[Ie]=De&255,Ie+1},d.prototype.writeInt16LE=function(De,Ie,ze){return De=+De,Ie=Ie>>>0,ze||le(this,De,Ie,2,32767,-32768),this[Ie]=De&255,this[Ie+1]=De>>>8,Ie+2},d.prototype.writeInt16BE=function(De,Ie,ze){return De=+De,Ie=Ie>>>0,ze||le(this,De,Ie,2,32767,-32768),this[Ie]=De>>>8,this[Ie+1]=De&255,Ie+2},d.prototype.writeInt32LE=function(De,Ie,ze){return De=+De,Ie=Ie>>>0,ze||le(this,De,Ie,4,2147483647,-2147483648),this[Ie]=De&255,this[Ie+1]=De>>>8,this[Ie+2]=De>>>16,this[Ie+3]=De>>>24,Ie+4},d.prototype.writeInt32BE=function(De,Ie,ze){return De=+De,Ie=Ie>>>0,ze||le(this,De,Ie,4,2147483647,-2147483648),De<0&&(De=4294967295+De+1),this[Ie]=De>>>24,this[Ie+1]=De>>>16,this[Ie+2]=De>>>8,this[Ie+3]=De&255,Ie+4},d.prototype.writeBigInt64LE=Mt(function(De){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ie(this,De,Ie,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),d.prototype.writeBigInt64BE=Mt(function(De){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return he(this,De,Ie,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function me(Je,De,Ie,ze,Pe,be){if(Ie+ze>Je.length)throw new RangeError("Index out of range");if(Ie<0)throw new RangeError("Index out of range")}function Me(Je,De,Ie,ze,Pe){return De=+De,Ie=Ie>>>0,Pe||me(Je,De,Ie,4),g.write(Je,De,Ie,ze,23,4),Ie+4}d.prototype.writeFloatLE=function(De,Ie,ze){return Me(this,De,Ie,!0,ze)},d.prototype.writeFloatBE=function(De,Ie,ze){return Me(this,De,Ie,!1,ze)};function Te(Je,De,Ie,ze,Pe){return De=+De,Ie=Ie>>>0,Pe||me(Je,De,Ie,8),g.write(Je,De,Ie,ze,52,8),Ie+8}d.prototype.writeDoubleLE=function(De,Ie,ze){return Te(this,De,Ie,!0,ze)},d.prototype.writeDoubleBE=function(De,Ie,ze){return Te(this,De,Ie,!1,ze)},d.prototype.copy=function(De,Ie,ze,Pe){if(!d.isBuffer(De))throw new TypeError("argument should be a Buffer");if(ze||(ze=0),!Pe&&Pe!==0&&(Pe=this.length),Ie>=De.length&&(Ie=De.length),Ie||(Ie=0),Pe>0&&Pe=this.length)throw new RangeError("Index out of range");if(Pe<0)throw new RangeError("sourceEnd out of bounds");Pe>this.length&&(Pe=this.length),De.length-Ie>>0,ze=ze===void 0?this.length:ze>>>0,De||(De=0);var se;if(typeof De=="number")for(se=Ie;seMath.pow(2,32)?Pe=Ee(String(Ie)):typeof Ie=="bigint"&&(Pe=String(Ie),(Ie>Math.pow(BigInt(2),BigInt(32))||Ie<-Math.pow(BigInt(2),BigInt(32)))&&(Pe=Ee(Pe)),Pe+="n"),ze+=" It must be ".concat(De,". Received ").concat(Pe),ze},RangeError);function Ee(Je){for(var De="",Ie=Je.length,ze=Je[0]==="-"?1:0;Ie>=ze+4;Ie-=3)De="_".concat(Je.slice(Ie-3,Ie)).concat(De);return"".concat(Je.slice(0,Ie)).concat(De)}function xe(Je,De,Ie){Ue(De,"offset"),(Je[De]===void 0||Je[De+Ie]===void 0)&&He(De,Je.length-(Ie+1))}function Se(Je,De,Ie,ze,Pe,be){if(Je>Ie||Je3?De===0||De===BigInt(0)?ye=">= 0".concat(se," and < 2").concat(se," ** ").concat((be+1)*8).concat(se):ye=">= -(2".concat(se," ** ").concat((be+1)*8-1).concat(se,") and < 2 ** ")+"".concat((be+1)*8-1).concat(se):ye=">= ".concat(De).concat(se," and <= ").concat(Ie).concat(se),new Oe.ERR_OUT_OF_RANGE("value",ye,Je)}xe(ze,Pe,be)}function Ue(Je,De){if(typeof Je!="number")throw new Oe.ERR_INVALID_ARG_TYPE(De,"number",Je)}function He(Je,De,Ie){throw Math.floor(Je)!==Je?(Ue(Je,Ie),new Oe.ERR_OUT_OF_RANGE(Ie||"offset","an integer",Je)):De<0?new Oe.ERR_BUFFER_OUT_OF_BOUNDS:new Oe.ERR_OUT_OF_RANGE(Ie||"offset",">= ".concat(Ie?1:0," and <= ").concat(De),Je)}var Fe=/[^+/0-9A-Za-z-_]/g;function Ge(Je){if(Je=Je.split("=")[0],Je=Je.trim().replace(Fe,""),Je.length<2)return"";for(;Je.length%4!==0;)Je=Je+"=";return Je}function nt(Je,De){De=De||1/0;for(var Ie,ze=Je.length,Pe=null,be=[],se=0;se55295&&Ie<57344){if(!Pe){if(Ie>56319){(De-=3)>-1&&be.push(239,191,189);continue}else if(se+1===ze){(De-=3)>-1&&be.push(239,191,189);continue}Pe=Ie;continue}if(Ie<56320){(De-=3)>-1&&be.push(239,191,189),Pe=Ie;continue}Ie=(Pe-55296<<10|Ie-56320)+65536}else Pe&&(De-=3)>-1&&be.push(239,191,189);if(Pe=null,Ie<128){if((De-=1)<0)break;be.push(Ie)}else if(Ie<2048){if((De-=2)<0)break;be.push(Ie>>6|192,Ie&63|128)}else if(Ie<65536){if((De-=3)<0)break;be.push(Ie>>12|224,Ie>>6&63|128,Ie&63|128)}else if(Ie<1114112){if((De-=4)<0)break;be.push(Ie>>18|240,Ie>>12&63|128,Ie>>6&63|128,Ie&63|128)}else throw new Error("Invalid code point")}return be}function qe(Je){for(var De=[],Ie=0;Ie>8,Pe=Ie%256,be.push(Pe),be.push(ze);return be}function et(Je){return u.toByteArray(Ge(Je))}function ct(Je,De,Ie,ze){var Pe;for(Pe=0;Pe=De.length||Pe>=Je.length);++Pe)De[Pe+Ie]=Je[Pe];return Pe}function dt(Je,De){return Je instanceof De||Je!=null&&Je.constructor!=null&&Je.constructor.name!=null&&Je.constructor.name===De.name}function pt(Je){return Je!==Je}var At=function(){for(var Je="0123456789abcdef",De=new Array(256),Ie=0;Ie<16;++Ie)for(var ze=Ie*16,Pe=0;Pe<16;++Pe)De[ze+Pe]=Je[Ie]+Je[Pe];return De}();function Mt(Je){return typeof BigInt>"u"?Vt:Je}function Vt(){throw new Error("BigInt not supported")}},35791:function(G){G.exports=P,G.exports.isMobile=P,G.exports.default=P;var V=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,e=/CrOS/,m=/android|ipad|playbook|silk/i;function P(i){i||(i={});var L=i.ua;if(!L&&typeof navigator<"u"&&(L=navigator.userAgent),L&&L.headers&&typeof L.headers["user-agent"]=="string"&&(L=L.headers["user-agent"]),typeof L!="string")return!1;var A=V.test(L)&&!e.test(L)||!!i.tablet&&m.test(L);return!A&&i.tablet&&i.featureDetect&&navigator&&navigator.maxTouchPoints>1&&L.indexOf("Macintosh")!==-1&&L.indexOf("Safari")!==-1&&(A=!0),A}},86781:function(G,V,e){e.r(V),e.d(V,{sankeyCenter:function(){return s},sankeyCircular:function(){return E},sankeyJustify:function(){return r},sankeyLeft:function(){return p},sankeyRight:function(){return t}});var m=e(33064),P=e(15140),i=e(45879),L=e(2502),A=e.n(L);function v(Te){return Te.target.depth}function p(Te){return Te.depth}function t(Te,Oe){return Oe-1-Te.height}function r(Te,Oe){return Te.sourceLinks.length?Te.depth:Oe-1}function s(Te){return Te.targetLinks.length?Te.depth:Te.sourceLinks.length?(0,m.VV)(Te.sourceLinks,v)-1:0}function n(Te){return function(){return Te}}var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Te){return typeof Te}:function(Te){return Te&&typeof Symbol=="function"&&Te.constructor===Symbol&&Te!==Symbol.prototype?"symbol":typeof Te};function c(Te,Oe){return g(Te.source,Oe.source)||Te.index-Oe.index}function u(Te,Oe){return g(Te.target,Oe.target)||Te.index-Oe.index}function g(Te,Oe){return Te.partOfCycle===Oe.partOfCycle?Te.y0-Oe.y0:Te.circularLinkType==="top"||Oe.circularLinkType==="bottom"?-1:1}function f(Te){return Te.value}function w(Te){return(Te.y0+Te.y1)/2}function h(Te){return w(Te.source)}function o(Te){return w(Te.target)}function d(Te){return Te.index}function M(Te){return Te.nodes}function T(Te){return Te.links}function C(Te,Oe){var Ne=Te.get(Oe);if(!Ne)throw new Error("missing: "+Oe);return Ne}function x(Te,Oe){return Oe(Te)}var S=25,b=10,a=.3;function E(){var Te=0,Oe=0,Ne=1,Ee=1,xe=24,Se,Ue=d,He=r,Fe=M,Ge=T,nt=32,qe=2,$e,et=null;function ct(){var Ie={nodes:Fe.apply(null,arguments),links:Ge.apply(null,arguments)};dt(Ie),y(Ie,Ue,et),pt(Ie),Vt(Ie),z(Ie,Ue),Je(Ie,nt,Ue),De(Ie);for(var ze=4,Pe=0;Pe"u"?"undefined":l(se))!=="object"&&(se=Pe.source=C(ze,se)),(typeof ye>"u"?"undefined":l(ye))!=="object"&&(ye=Pe.target=C(ze,ye)),se.sourceLinks.push(Pe),ye.targetLinks.push(Pe)}),Ie}function pt(Ie){Ie.nodes.forEach(function(ze){ze.partOfCycle=!1,ze.value=Math.max((0,m.Sm)(ze.sourceLinks,f),(0,m.Sm)(ze.targetLinks,f)),ze.sourceLinks.forEach(function(Pe){Pe.circular&&(ze.partOfCycle=!0,ze.circularLinkType=Pe.circularLinkType)}),ze.targetLinks.forEach(function(Pe){Pe.circular&&(ze.partOfCycle=!0,ze.circularLinkType=Pe.circularLinkType)})})}function At(Ie){var ze=0,Pe=0,be=0,se=0,ye=(0,m.Fp)(Ie.nodes,function(Le){return Le.column});return Ie.links.forEach(function(Le){Le.circular&&(Le.circularLinkType=="top"?ze=ze+Le.width:Pe=Pe+Le.width,Le.target.column==0&&(se=se+Le.width),Le.source.column==ye&&(be=be+Le.width))}),ze=ze>0?ze+S+b:ze,Pe=Pe>0?Pe+S+b:Pe,be=be>0?be+S+b:be,se=se>0?se+S+b:se,{top:ze,bottom:Pe,left:se,right:be}}function Mt(Ie,ze){var Pe=(0,m.Fp)(Ie.nodes,function(at){return at.column}),be=Ne-Te,se=Ee-Oe,ye=be+ze.right+ze.left,Le=se+ze.top+ze.bottom,Be=be/ye,ot=se/Le;return Te=Te*Be+ze.left,Ne=ze.right==0?Ne:Ne*Be,Oe=Oe*ot+ze.top,Ee=Ee*ot,Ie.nodes.forEach(function(at){at.x0=Te+at.column*((Ne-Te-xe)/Pe),at.x1=at.x0+xe}),ot}function Vt(Ie){var ze,Pe,be;for(ze=Ie.nodes,Pe=[],be=0;ze.length;++be,ze=Pe,Pe=[])ze.forEach(function(se){se.depth=be,se.sourceLinks.forEach(function(ye){Pe.indexOf(ye.target)<0&&!ye.circular&&Pe.push(ye.target)})});for(ze=Ie.nodes,Pe=[],be=0;ze.length;++be,ze=Pe,Pe=[])ze.forEach(function(se){se.height=be,se.targetLinks.forEach(function(ye){Pe.indexOf(ye.source)<0&&!ye.circular&&Pe.push(ye.source)})});Ie.nodes.forEach(function(se){se.column=Math.floor(He.call(null,se,be))})}function Je(Ie,ze,Pe){var be=(0,P.b1)().key(function(at){return at.column}).sortKeys(m.j2).entries(Ie.nodes).map(function(at){return at.values});Le(Pe),ot();for(var se=1,ye=ze;ye>0;--ye)Be(se*=.99,Pe),ot();function Le(at){if($e){var wt=1/0;be.forEach(function(Lt){var Kt=Ee*$e/(Lt.length+1);wt=Kt0))if(Lt==0&&Gt==1)ir=Kt.y1-Kt.y0,Kt.y0=Ee/2-ir/2,Kt.y1=Ee/2+ir/2;else if(Lt==It-1&&Gt==1)ir=Kt.y1-Kt.y0,Kt.y0=Ee/2-ir/2,Kt.y1=Ee/2+ir/2;else{var _r=0,yt=(0,m.J6)(Kt.sourceLinks,o),jt=(0,m.J6)(Kt.targetLinks,h);yt&&jt?_r=(yt+jt)/2:_r=yt||jt;var Yt=(_r-w(Kt))*at;Kt.y0+=Yt,Kt.y1+=Yt}})})}function ot(){be.forEach(function(at){var wt,It,Bt=Oe,Gt=at.length,Lt;for(at.sort(g),Lt=0;Lt0&&(wt.y0+=It,wt.y1+=It),Bt=wt.y1+Se;if(It=Bt-Se-Ee,It>0)for(Bt=wt.y0-=It,wt.y1-=It,Lt=Gt-2;Lt>=0;--Lt)wt=at[Lt],It=wt.y1+Se-Bt,It>0&&(wt.y0-=It,wt.y1-=It),Bt=wt.y0})}}function De(Ie){Ie.nodes.forEach(function(ze){ze.sourceLinks.sort(u),ze.targetLinks.sort(c)}),Ie.nodes.forEach(function(ze){var Pe=ze.y0,be=Pe,se=ze.y1,ye=se;ze.sourceLinks.forEach(function(Le){Le.circular?(Le.y0=se-Le.width/2,se=se-Le.width):(Le.y0=Pe+Le.width/2,Pe+=Le.width)}),ze.targetLinks.forEach(function(Le){Le.circular?(Le.y1=ye-Le.width/2,ye=ye-Le.width):(Le.y1=be+Le.width/2,be+=Le.width)})})}return ct}function y(Te,Oe,Ne){var Ee=0;if(Ne===null){for(var xe=[],Se=0;SeOe.source.column)}function k(Te,Oe){var Ne=0;Te.sourceLinks.forEach(function(xe){Ne=xe.circular&&!me(xe,Oe)?Ne+1:Ne});var Ee=0;return Te.targetLinks.forEach(function(xe){Ee=xe.circular&&!me(xe,Oe)?Ee+1:Ee}),Ne+Ee}function O(Te){var Oe=Te.source.sourceLinks,Ne=0;Oe.forEach(function(Se){Ne=Se.circular?Ne+1:Ne});var Ee=Te.target.targetLinks,xe=0;return Ee.forEach(function(Se){xe=Se.circular?xe+1:xe}),!(Ne>1||xe>1)}function N(Te,Oe,Ne){return Te.sort(Y),Te.forEach(function(Ee,xe){var Se=0;if(me(Ee,Ne)&&O(Ee))Ee.circularPathData.verticalBuffer=Se+Ee.width/2;else{var Ue=0;for(Ue;UeSe?He:Se}Ee.circularPathData.verticalBuffer=Se+Ee.width/2}}),Te}function _(Te,Oe,Ne,Ee){var xe=5,Se=(0,m.VV)(Te.links,function(Fe){return Fe.source.y0});Te.links.forEach(function(Fe){Fe.circular&&(Fe.circularPathData={})});var Ue=Te.links.filter(function(Fe){return Fe.circularLinkType=="top"});N(Ue,Oe,Ee);var He=Te.links.filter(function(Fe){return Fe.circularLinkType=="bottom"});N(He,Oe,Ee),Te.links.forEach(function(Fe){if(Fe.circular){if(Fe.circularPathData.arcRadius=Fe.width+b,Fe.circularPathData.leftNodeBuffer=xe,Fe.circularPathData.rightNodeBuffer=xe,Fe.circularPathData.sourceWidth=Fe.source.x1-Fe.source.x0,Fe.circularPathData.sourceX=Fe.source.x0+Fe.circularPathData.sourceWidth,Fe.circularPathData.targetX=Fe.target.x0,Fe.circularPathData.sourceY=Fe.y0,Fe.circularPathData.targetY=Fe.y1,me(Fe,Ee)&&O(Fe))Fe.circularPathData.leftSmallArcRadius=b+Fe.width/2,Fe.circularPathData.leftLargeArcRadius=b+Fe.width/2,Fe.circularPathData.rightSmallArcRadius=b+Fe.width/2,Fe.circularPathData.rightLargeArcRadius=b+Fe.width/2,Fe.circularLinkType=="bottom"?(Fe.circularPathData.verticalFullExtent=Fe.source.y1+S+Fe.circularPathData.verticalBuffer,Fe.circularPathData.verticalLeftInnerExtent=Fe.circularPathData.verticalFullExtent-Fe.circularPathData.leftLargeArcRadius,Fe.circularPathData.verticalRightInnerExtent=Fe.circularPathData.verticalFullExtent-Fe.circularPathData.rightLargeArcRadius):(Fe.circularPathData.verticalFullExtent=Fe.source.y0-S-Fe.circularPathData.verticalBuffer,Fe.circularPathData.verticalLeftInnerExtent=Fe.circularPathData.verticalFullExtent+Fe.circularPathData.leftLargeArcRadius,Fe.circularPathData.verticalRightInnerExtent=Fe.circularPathData.verticalFullExtent+Fe.circularPathData.rightLargeArcRadius);else{var Ge=Fe.source.column,nt=Fe.circularLinkType,qe=Te.links.filter(function(ct){return ct.source.column==Ge&&ct.circularLinkType==nt});Fe.circularLinkType=="bottom"?qe.sort(te):qe.sort(J);var $e=0;qe.forEach(function(ct,dt){ct.circularLinkID==Fe.circularLinkID&&(Fe.circularPathData.leftSmallArcRadius=b+Fe.width/2+$e,Fe.circularPathData.leftLargeArcRadius=b+Fe.width/2+dt*Oe+$e),$e=$e+ct.width}),Ge=Fe.target.column,qe=Te.links.filter(function(ct){return ct.target.column==Ge&&ct.circularLinkType==nt}),Fe.circularLinkType=="bottom"?qe.sort(ce):qe.sort(ae),$e=0,qe.forEach(function(ct,dt){ct.circularLinkID==Fe.circularLinkID&&(Fe.circularPathData.rightSmallArcRadius=b+Fe.width/2+$e,Fe.circularPathData.rightLargeArcRadius=b+Fe.width/2+dt*Oe+$e),$e=$e+ct.width}),Fe.circularLinkType=="bottom"?(Fe.circularPathData.verticalFullExtent=Math.max(Ne,Fe.source.y1,Fe.target.y1)+S+Fe.circularPathData.verticalBuffer,Fe.circularPathData.verticalLeftInnerExtent=Fe.circularPathData.verticalFullExtent-Fe.circularPathData.leftLargeArcRadius,Fe.circularPathData.verticalRightInnerExtent=Fe.circularPathData.verticalFullExtent-Fe.circularPathData.rightLargeArcRadius):(Fe.circularPathData.verticalFullExtent=Se-S-Fe.circularPathData.verticalBuffer,Fe.circularPathData.verticalLeftInnerExtent=Fe.circularPathData.verticalFullExtent+Fe.circularPathData.leftLargeArcRadius,Fe.circularPathData.verticalRightInnerExtent=Fe.circularPathData.verticalFullExtent+Fe.circularPathData.rightLargeArcRadius)}Fe.circularPathData.leftInnerExtent=Fe.circularPathData.sourceX+Fe.circularPathData.leftNodeBuffer,Fe.circularPathData.rightInnerExtent=Fe.circularPathData.targetX-Fe.circularPathData.rightNodeBuffer,Fe.circularPathData.leftFullExtent=Fe.circularPathData.sourceX+Fe.circularPathData.leftLargeArcRadius+Fe.circularPathData.leftNodeBuffer,Fe.circularPathData.rightFullExtent=Fe.circularPathData.targetX-Fe.circularPathData.rightLargeArcRadius-Fe.circularPathData.rightNodeBuffer}if(Fe.circular)Fe.path=U(Fe);else{var et=(0,i.h5)().source(function(ct){var dt=ct.source.x0+(ct.source.x1-ct.source.x0),pt=ct.y0;return[dt,pt]}).target(function(ct){var dt=ct.target.x0,pt=ct.y1;return[dt,pt]});Fe.path=et(Fe)}})}function U(Te){var Oe="";return Te.circularLinkType=="top"?Oe="M"+Te.circularPathData.sourceX+" "+Te.circularPathData.sourceY+" L"+Te.circularPathData.leftInnerExtent+" "+Te.circularPathData.sourceY+" A"+Te.circularPathData.leftLargeArcRadius+" "+Te.circularPathData.leftSmallArcRadius+" 0 0 0 "+Te.circularPathData.leftFullExtent+" "+(Te.circularPathData.sourceY-Te.circularPathData.leftSmallArcRadius)+" L"+Te.circularPathData.leftFullExtent+" "+Te.circularPathData.verticalLeftInnerExtent+" A"+Te.circularPathData.leftLargeArcRadius+" "+Te.circularPathData.leftLargeArcRadius+" 0 0 0 "+Te.circularPathData.leftInnerExtent+" "+Te.circularPathData.verticalFullExtent+" L"+Te.circularPathData.rightInnerExtent+" "+Te.circularPathData.verticalFullExtent+" A"+Te.circularPathData.rightLargeArcRadius+" "+Te.circularPathData.rightLargeArcRadius+" 0 0 0 "+Te.circularPathData.rightFullExtent+" "+Te.circularPathData.verticalRightInnerExtent+" L"+Te.circularPathData.rightFullExtent+" "+(Te.circularPathData.targetY-Te.circularPathData.rightSmallArcRadius)+" A"+Te.circularPathData.rightLargeArcRadius+" "+Te.circularPathData.rightSmallArcRadius+" 0 0 0 "+Te.circularPathData.rightInnerExtent+" "+Te.circularPathData.targetY+" L"+Te.circularPathData.targetX+" "+Te.circularPathData.targetY:Oe="M"+Te.circularPathData.sourceX+" "+Te.circularPathData.sourceY+" L"+Te.circularPathData.leftInnerExtent+" "+Te.circularPathData.sourceY+" A"+Te.circularPathData.leftLargeArcRadius+" "+Te.circularPathData.leftSmallArcRadius+" 0 0 1 "+Te.circularPathData.leftFullExtent+" "+(Te.circularPathData.sourceY+Te.circularPathData.leftSmallArcRadius)+" L"+Te.circularPathData.leftFullExtent+" "+Te.circularPathData.verticalLeftInnerExtent+" A"+Te.circularPathData.leftLargeArcRadius+" "+Te.circularPathData.leftLargeArcRadius+" 0 0 1 "+Te.circularPathData.leftInnerExtent+" "+Te.circularPathData.verticalFullExtent+" L"+Te.circularPathData.rightInnerExtent+" "+Te.circularPathData.verticalFullExtent+" A"+Te.circularPathData.rightLargeArcRadius+" "+Te.circularPathData.rightLargeArcRadius+" 0 0 1 "+Te.circularPathData.rightFullExtent+" "+Te.circularPathData.verticalRightInnerExtent+" L"+Te.circularPathData.rightFullExtent+" "+(Te.circularPathData.targetY+Te.circularPathData.rightSmallArcRadius)+" A"+Te.circularPathData.rightLargeArcRadius+" "+Te.circularPathData.rightSmallArcRadius+" 0 0 1 "+Te.circularPathData.rightInnerExtent+" "+Te.circularPathData.targetY+" L"+Te.circularPathData.targetX+" "+Te.circularPathData.targetY,Oe}function Y(Te,Oe){return Q(Te)==Q(Oe)?Te.circularLinkType=="bottom"?te(Te,Oe):J(Te,Oe):Q(Oe)-Q(Te)}function J(Te,Oe){return Te.y0-Oe.y0}function te(Te,Oe){return Oe.y0-Te.y0}function ae(Te,Oe){return Te.y1-Oe.y1}function ce(Te,Oe){return Oe.y1-Te.y1}function Q(Te){return Te.target.column-Te.source.column}function Z(Te){return Te.target.x0-Te.source.x1}function j(Te,Oe){var Ne=I(Te),Ee=Z(Oe)/Math.tan(Ne),xe=he(Te)=="up"?Te.y1+Ee:Te.y1-Ee;return xe}function K(Te,Oe){var Ne=I(Te),Ee=Z(Oe)/Math.tan(Ne),xe=he(Te)=="up"?Te.y1-Ee:Te.y1+Ee;return xe}function ee(Te,Oe,Ne,Ee){Te.links.forEach(function(xe){if(!xe.circular&&xe.target.column-xe.source.column>1){var Se=xe.source.column+1,Ue=xe.target.column-1,He=1,Fe=Ue-Se+1;for(He=1;Se<=Ue;Se++,He++)Te.nodes.forEach(function(Ge){if(Ge.column==Se){var nt=He/(Fe+1),qe=Math.pow(1-nt,3),$e=3*nt*Math.pow(1-nt,2),et=3*Math.pow(nt,2)*(1-nt),ct=Math.pow(nt,3),dt=qe*xe.y0+$e*xe.y0+et*xe.y1+ct*xe.y1,pt=dt-xe.width/2,At=dt+xe.width/2,Mt;pt>Ge.y0&&ptGe.y0&&AtGe.y1&&q(Vt,Mt,Oe,Ne)})):ptGe.y1&&(Mt=At-Ge.y0+10,Ge=q(Ge,Mt,Oe,Ne),Te.nodes.forEach(function(Vt){x(Vt,Ee)==x(Ge,Ee)||Vt.column!=Ge.column||Vt.y0Ge.y1&&q(Vt,Mt,Oe,Ne)}))}})}})}function oe(Te,Oe){return Te.y0>Oe.y0&&Te.y0Oe.y0&&Te.y1Oe.y1}function q(Te,Oe,Ne,Ee){return Te.y0+Oe>=Ne&&Te.y1+Oe<=Ee&&(Te.y0=Te.y0+Oe,Te.y1=Te.y1+Oe,Te.targetLinks.forEach(function(xe){xe.y1=xe.y1+Oe}),Te.sourceLinks.forEach(function(xe){xe.y0=xe.y0+Oe})),Te}function $(Te,Oe,Ne,Ee){Te.nodes.forEach(function(xe){Ee&&xe.y+(xe.y1-xe.y0)>Oe&&(xe.y=xe.y-(xe.y+(xe.y1-xe.y0)-Oe));var Se=Te.links.filter(function(Fe){return x(Fe.source,Ne)==x(xe,Ne)}),Ue=Se.length;Ue>1&&Se.sort(function(Fe,Ge){if(!Fe.circular&&!Ge.circular){if(Fe.target.column==Ge.target.column)return Fe.y1-Ge.y1;if(ie(Fe,Ge)){if(Fe.target.column>Ge.target.column){var nt=K(Ge,Fe);return Fe.y1-nt}if(Ge.target.column>Fe.target.column){var qe=K(Fe,Ge);return qe-Ge.y1}}else return Fe.y1-Ge.y1}if(Fe.circular&&!Ge.circular)return Fe.circularLinkType=="top"?-1:1;if(Ge.circular&&!Fe.circular)return Ge.circularLinkType=="top"?1:-1;if(Fe.circular&&Ge.circular)return Fe.circularLinkType===Ge.circularLinkType&&Fe.circularLinkType=="top"?Fe.target.column===Ge.target.column?Fe.target.y1-Ge.target.y1:Ge.target.column-Fe.target.column:Fe.circularLinkType===Ge.circularLinkType&&Fe.circularLinkType=="bottom"?Fe.target.column===Ge.target.column?Ge.target.y1-Fe.target.y1:Fe.target.column-Ge.target.column:Fe.circularLinkType=="top"?-1:1});var He=xe.y0;Se.forEach(function(Fe){Fe.y0=He+Fe.width/2,He=He+Fe.width}),Se.forEach(function(Fe,Ge){if(Fe.circularLinkType=="bottom"){var nt=Ge+1,qe=0;for(nt;nt1&&xe.sort(function(He,Fe){if(!He.circular&&!Fe.circular){if(He.source.column==Fe.source.column)return He.y0-Fe.y0;if(ie(He,Fe)){if(Fe.source.column0?"up":"down"}function me(Te,Oe){return x(Te.source,Oe)==x(Te.target,Oe)}function Me(Te,Oe,Ne){var Ee=Te.nodes,xe=Te.links,Se=!1,Ue=!1;if(xe.forEach(function($e){$e.circularLinkType=="top"?Se=!0:$e.circularLinkType=="bottom"&&(Ue=!0)}),Se==!1||Ue==!1){var He=(0,m.VV)(Ee,function($e){return $e.y0}),Fe=(0,m.Fp)(Ee,function($e){return $e.y1}),Ge=Fe-He,nt=Ne-Oe,qe=nt/Ge;Ee.forEach(function($e){var et=($e.y1-$e.y0)*qe;$e.y0=($e.y0-He)*qe,$e.y1=$e.y0+et}),xe.forEach(function($e){$e.y0=($e.y0-He)*qe,$e.y1=($e.y1-He)*qe,$e.width=$e.width*qe})}}},30838:function(G,V,e){e.r(V),e.d(V,{sankey:function(){return d},sankeyCenter:function(){return p},sankeyJustify:function(){return v},sankeyLeft:function(){return L},sankeyLinkHorizontal:function(){return x},sankeyRight:function(){return A}});var m=e(33064),P=e(15140);function i(S){return S.target.depth}function L(S){return S.depth}function A(S,b){return b-1-S.height}function v(S,b){return S.sourceLinks.length?S.depth:b-1}function p(S){return S.targetLinks.length?S.depth:S.sourceLinks.length?(0,m.VV)(S.sourceLinks,i)-1:0}function t(S){return function(){return S}}function r(S,b){return n(S.source,b.source)||S.index-b.index}function s(S,b){return n(S.target,b.target)||S.index-b.index}function n(S,b){return S.y0-b.y0}function l(S){return S.value}function c(S){return(S.y0+S.y1)/2}function u(S){return c(S.source)*S.value}function g(S){return c(S.target)*S.value}function f(S){return S.index}function w(S){return S.nodes}function h(S){return S.links}function o(S,b){var a=S.get(b);if(!a)throw new Error("missing: "+b);return a}function d(){var S=0,b=0,a=1,E=1,y=24,z=8,I=f,B=v,k=w,O=h,N=32,_=2/3;function U(){var Q={nodes:k.apply(null,arguments),links:O.apply(null,arguments)};return Y(Q),J(Q),te(Q),ae(Q),ce(Q),Q}U.update=function(Q){return ce(Q),Q},U.nodeId=function(Q){return arguments.length?(I=typeof Q=="function"?Q:t(Q),U):I},U.nodeAlign=function(Q){return arguments.length?(B=typeof Q=="function"?Q:t(Q),U):B},U.nodeWidth=function(Q){return arguments.length?(y=+Q,U):y},U.nodePadding=function(Q){return arguments.length?(z=+Q,U):z},U.nodes=function(Q){return arguments.length?(k=typeof Q=="function"?Q:t(Q),U):k},U.links=function(Q){return arguments.length?(O=typeof Q=="function"?Q:t(Q),U):O},U.size=function(Q){return arguments.length?(S=b=0,a=+Q[0],E=+Q[1],U):[a-S,E-b]},U.extent=function(Q){return arguments.length?(S=+Q[0][0],a=+Q[1][0],b=+Q[0][1],E=+Q[1][1],U):[[S,b],[a,E]]},U.iterations=function(Q){return arguments.length?(N=+Q,U):N};function Y(Q){Q.nodes.forEach(function(j,K){j.index=K,j.sourceLinks=[],j.targetLinks=[]});var Z=(0,P.UI)(Q.nodes,I);Q.links.forEach(function(j,K){j.index=K;var ee=j.source,oe=j.target;typeof ee!="object"&&(ee=j.source=o(Z,ee)),typeof oe!="object"&&(oe=j.target=o(Z,oe)),ee.sourceLinks.push(j),oe.targetLinks.push(j)})}function J(Q){Q.nodes.forEach(function(Z){Z.value=Math.max((0,m.Sm)(Z.sourceLinks,l),(0,m.Sm)(Z.targetLinks,l))})}function te(Q){var Z,j,K;for(Z=Q.nodes,j=[],K=0;Z.length;++K,Z=j,j=[])Z.forEach(function(oe){oe.depth=K,oe.sourceLinks.forEach(function(q){j.indexOf(q.target)<0&&j.push(q.target)})});for(Z=Q.nodes,j=[],K=0;Z.length;++K,Z=j,j=[])Z.forEach(function(oe){oe.height=K,oe.targetLinks.forEach(function(q){j.indexOf(q.source)<0&&j.push(q.source)})});var ee=(a-S-y)/(K-1);Q.nodes.forEach(function(oe){oe.x1=(oe.x0=S+Math.max(0,Math.min(K-1,Math.floor(B.call(null,oe,K))))*ee)+y})}function ae(Q){var Z=(0,P.b1)().key(function(le){return le.x0}).sortKeys(m.j2).entries(Q.nodes).map(function(le){return le.values});ee(),$();for(var j=1,K=N;K>0;--K)q(j*=.99),$(),oe(j),$();function ee(){var le=(0,m.Fp)(Z,function(me){return me.length}),ie=_*(E-b)/(le-1);z>ie&&(z=ie);var he=(0,m.VV)(Z,function(me){return(E-b-(me.length-1)*z)/(0,m.Sm)(me,l)});Z.forEach(function(me){me.forEach(function(Me,Te){Me.y1=(Me.y0=Te)+Me.value*he})}),Q.links.forEach(function(me){me.width=me.value*he})}function oe(le){Z.forEach(function(ie){ie.forEach(function(he){if(he.targetLinks.length){var me=((0,m.Sm)(he.targetLinks,u)/(0,m.Sm)(he.targetLinks,l)-c(he))*le;he.y0+=me,he.y1+=me}})})}function q(le){Z.slice().reverse().forEach(function(ie){ie.forEach(function(he){if(he.sourceLinks.length){var me=((0,m.Sm)(he.sourceLinks,g)/(0,m.Sm)(he.sourceLinks,l)-c(he))*le;he.y0+=me,he.y1+=me}})})}function $(){Z.forEach(function(le){var ie,he,me=b,Me=le.length,Te;for(le.sort(n),Te=0;Te0&&(ie.y0+=he,ie.y1+=he),me=ie.y1+z;if(he=me-z-E,he>0)for(me=ie.y0-=he,ie.y1-=he,Te=Me-2;Te>=0;--Te)ie=le[Te],he=ie.y1+z-me,he>0&&(ie.y0-=he,ie.y1-=he),me=ie.y0})}}function ce(Q){Q.nodes.forEach(function(Z){Z.sourceLinks.sort(s),Z.targetLinks.sort(r)}),Q.nodes.forEach(function(Z){var j=Z.y0,K=j;Z.sourceLinks.forEach(function(ee){ee.y0=j+ee.width/2,j+=ee.width}),Z.targetLinks.forEach(function(ee){ee.y1=K+ee.width/2,K+=ee.width})})}return U}var M=e(45879);function T(S){return[S.source.x1,S.y0]}function C(S){return[S.target.x0,S.y1]}function x(){return(0,M.h5)().source(T).target(C)}},39898:function(G,V,e){var m,P;(function(){var i={version:"3.8.0"},L=[].slice,A=function(fe){return L.call(fe)},v=self.document;function p(fe){return fe&&(fe.ownerDocument||fe.document||fe).documentElement}function t(fe){return fe&&(fe.ownerDocument&&fe.ownerDocument.defaultView||fe.document&&fe||fe.defaultView)}if(v)try{A(v.documentElement.childNodes)[0].nodeType}catch{A=function(Ce){for(var Ve=Ce.length,Qe=new Array(Ve);Ve--;)Qe[Ve]=Ce[Ve];return Qe}}if(Date.now||(Date.now=function(){return+new Date}),v)try{v.createElement("DIV").style.setProperty("opacity",0,"")}catch{var r=this.Element.prototype,s=r.setAttribute,n=r.setAttributeNS,l=this.CSSStyleDeclaration.prototype,c=l.setProperty;r.setAttribute=function(Ce,Ve){s.call(this,Ce,Ve+"")},r.setAttributeNS=function(Ce,Ve,Qe){n.call(this,Ce,Ve,Qe+"")},l.setProperty=function(Ce,Ve,Qe){c.call(this,Ce,Ve+"",Qe)}}i.ascending=u;function u(fe,Ce){return feCe?1:fe>=Ce?0:NaN}i.descending=function(fe,Ce){return Cefe?1:Ce>=fe?0:NaN},i.min=function(fe,Ce){var Ve=-1,Qe=fe.length,tt,it;if(arguments.length===1){for(;++Ve=it){tt=it;break}for(;++Veit&&(tt=it)}else{for(;++Ve=it){tt=it;break}for(;++Veit&&(tt=it)}return tt},i.max=function(fe,Ce){var Ve=-1,Qe=fe.length,tt,it;if(arguments.length===1){for(;++Ve=it){tt=it;break}for(;++Vett&&(tt=it)}else{for(;++Ve=it){tt=it;break}for(;++Vett&&(tt=it)}return tt},i.extent=function(fe,Ce){var Ve=-1,Qe=fe.length,tt,it,Rt;if(arguments.length===1){for(;++Ve=it){tt=Rt=it;break}for(;++Veit&&(tt=it),Rt=it){tt=Rt=it;break}for(;++Veit&&(tt=it),Rt1)return Rt/(Ut-1)},i.deviation=function(){var fe=i.variance.apply(this,arguments);return fe&&Math.sqrt(fe)};function w(fe){return{left:function(Ce,Ve,Qe,tt){for(arguments.length<3&&(Qe=0),arguments.length<4&&(tt=Ce.length);Qe>>1;fe(Ce[it],Ve)<0?Qe=it+1:tt=it}return Qe},right:function(Ce,Ve,Qe,tt){for(arguments.length<3&&(Qe=0),arguments.length<4&&(tt=Ce.length);Qe>>1;fe(Ce[it],Ve)>0?tt=it:Qe=it+1}return Qe}}}var h=w(u);i.bisectLeft=h.left,i.bisect=i.bisectRight=h.right,i.bisector=function(fe){return w(fe.length===1?function(Ce,Ve){return u(fe(Ce),Ve)}:fe)},i.shuffle=function(fe,Ce,Ve){(Qe=arguments.length)<3&&(Ve=fe.length,Qe<2&&(Ce=0));for(var Qe=Ve-Ce,tt,it;Qe;)it=Math.random()*Qe--|0,tt=fe[Qe+Ce],fe[Qe+Ce]=fe[it+Ce],fe[it+Ce]=tt;return fe},i.permute=function(fe,Ce){for(var Ve=Ce.length,Qe=new Array(Ve);Ve--;)Qe[Ve]=fe[Ce[Ve]];return Qe},i.pairs=function(fe){for(var Ce=0,Ve=fe.length-1,Qe=fe[0],tt=new Array(Ve<0?0:Ve);Ce=0;)for(Rt=fe[Ce],Ve=Rt.length;--Ve>=0;)it[--tt]=Rt[Ve];return it};var d=Math.abs;i.range=function(fe,Ce,Ve){if(arguments.length<3&&(Ve=1,arguments.length<2&&(Ce=fe,fe=0)),(Ce-fe)/Ve===1/0)throw new Error("infinite range");var Qe=[],tt=M(d(Ve)),it=-1,Rt;if(fe*=tt,Ce*=tt,Ve*=tt,Ve<0)for(;(Rt=fe+Ve*++it)>Ce;)Qe.push(Rt/tt);else for(;(Rt=fe+Ve*++it)=Ce.length)return tt?tt.call(fe,Ut):Qe?Ut.sort(Qe):Ut;for(var tr=-1,Lr=Ut.length,Sr=Ce[er++],Kr,en,Dr,Ur=new C,Zr;++tr=Ce.length)return ht;var er=[],tr=Ve[Ut++];return ht.forEach(function(Lr,Sr){er.push({key:Lr,values:Rt(Sr,Ut)})}),tr?er.sort(function(Lr,Sr){return tr(Lr.key,Sr.key)}):er}return fe.map=function(ht,Ut){return it(Ut,ht,0)},fe.entries=function(ht){return Rt(it(i.map,ht,0),0)},fe.key=function(ht){return Ce.push(ht),fe},fe.sortKeys=function(ht){return Ve[Ce.length-1]=ht,fe},fe.sortValues=function(ht){return Qe=ht,fe},fe.rollup=function(ht){return tt=ht,fe},fe},i.set=function(fe){var Ce=new k;if(fe)for(var Ve=0,Qe=fe.length;Ve=0&&(Qe=fe.slice(Ve+1),fe=fe.slice(0,Ve)),fe)return arguments.length<2?this[fe].on(Qe):this[fe].on(Qe,Ce);if(arguments.length===2){if(Ce==null)for(fe in this)this.hasOwnProperty(fe)&&this[fe].on(Qe,null);return this}};function te(fe){var Ce=[],Ve=new C;function Qe(){for(var tt=Ce,it=-1,Rt=tt.length,ht;++it=0&&(Ve=fe.slice(0,Ce))!=="xmlns"&&(fe=fe.slice(Ce+1)),me.hasOwnProperty(Ve)?{space:me[Ve],local:fe}:fe}},$.attr=function(fe,Ce){if(arguments.length<2){if(typeof fe=="string"){var Ve=this.node();return fe=i.ns.qualify(fe),fe.local?Ve.getAttributeNS(fe.space,fe.local):Ve.getAttribute(fe)}for(Ce in fe)this.each(Me(Ce,fe[Ce]));return this}return this.each(Me(fe,Ce))};function Me(fe,Ce){fe=i.ns.qualify(fe);function Ve(){this.removeAttribute(fe)}function Qe(){this.removeAttributeNS(fe.space,fe.local)}function tt(){this.setAttribute(fe,Ce)}function it(){this.setAttributeNS(fe.space,fe.local,Ce)}function Rt(){var Ut=Ce.apply(this,arguments);Ut==null?this.removeAttribute(fe):this.setAttribute(fe,Ut)}function ht(){var Ut=Ce.apply(this,arguments);Ut==null?this.removeAttributeNS(fe.space,fe.local):this.setAttributeNS(fe.space,fe.local,Ut)}return Ce==null?fe.local?Qe:Ve:typeof Ce=="function"?fe.local?ht:Rt:fe.local?it:tt}function Te(fe){return fe.trim().replace(/\s+/g," ")}$.classed=function(fe,Ce){if(arguments.length<2){if(typeof fe=="string"){var Ve=this.node(),Qe=(fe=Ne(fe)).length,tt=-1;if(Ce=Ve.classList){for(;++tt=0;)(it=Ve[Qe])&&(tt&&tt!==it.nextSibling&&tt.parentNode.insertBefore(it,tt),tt=it);return this},$.sort=function(fe){fe=qe.apply(this,arguments);for(var Ce=-1,Ve=this.length;++Ce=Ce&&(Ce=tt+1);!(Ut=Rt[Ce])&&++Ce0&&(fe=fe.slice(0,tt));var Rt=At.get(fe);Rt&&(fe=Rt,it=Vt);function ht(){var tr=this[Qe];tr&&(this.removeEventListener(fe,tr,tr.$),delete this[Qe])}function Ut(){var tr=it(Ce,A(arguments));ht.call(this),this.addEventListener(fe,this[Qe]=tr,tr.$=Ve),tr._=Ce}function er(){var tr=new RegExp("^__on([^.]+)"+i.requote(fe)+"$"),Lr;for(var Sr in this)if(Lr=Sr.match(tr)){var Kr=this[Sr];this.removeEventListener(Lr[1],Kr,Kr.$),delete this[Sr]}}return tt?Ce?Ut:ht:Ce?Y:er}var At=i.map({mouseenter:"mouseover",mouseleave:"mouseout"});v&&At.forEach(function(fe){"on"+fe in v&&At.remove(fe)});function Mt(fe,Ce){return function(Ve){var Qe=i.event;i.event=Ve,Ce[0]=this.__data__;try{fe.apply(this,Ce)}finally{i.event=Qe}}}function Vt(fe,Ce){var Ve=Mt(fe,Ce);return function(Qe){var tt=this,it=Qe.relatedTarget;(!it||it!==tt&&!(it.compareDocumentPosition(tt)&8))&&Ve.call(tt,Qe)}}var Je,De=0;function Ie(fe){var Ce=".dragsuppress-"+ ++De,Ve="click"+Ce,Qe=i.select(t(fe)).on("touchmove"+Ce,ae).on("dragstart"+Ce,ae).on("selectstart"+Ce,ae);if(Je==null&&(Je="onselectstart"in fe?!1:_(fe.style,"userSelect")),Je){var tt=p(fe).style,it=tt[Je];tt[Je]="none"}return function(Rt){if(Qe.on(Ce,null),Je&&(tt[Je]=it),Rt){var ht=function(){Qe.on(Ve,null)};Qe.on(Ve,function(){ae(),ht()},!0),setTimeout(ht,0)}}}i.mouse=function(fe){return Pe(fe,ce())};var ze=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Pe(fe,Ce){Ce.changedTouches&&(Ce=Ce.changedTouches[0]);var Ve=fe.ownerSVGElement||fe;if(Ve.createSVGPoint){var Qe=Ve.createSVGPoint();if(ze<0){var tt=t(fe);if(tt.scrollX||tt.scrollY){Ve=i.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var it=Ve[0][0].getScreenCTM();ze=!(it.f||it.e),Ve.remove()}}return ze?(Qe.x=Ce.pageX,Qe.y=Ce.pageY):(Qe.x=Ce.clientX,Qe.y=Ce.clientY),Qe=Qe.matrixTransform(fe.getScreenCTM().inverse()),[Qe.x,Qe.y]}var Rt=fe.getBoundingClientRect();return[Ce.clientX-Rt.left-fe.clientLeft,Ce.clientY-Rt.top-fe.clientTop]}i.touch=function(fe,Ce,Ve){if(arguments.length<3&&(Ve=Ce,Ce=ce().changedTouches),Ce){for(var Qe=0,tt=Ce.length,it;Qe1?at:fe<-1?-at:Math.asin(fe)}function Lt(fe){return((fe=Math.exp(fe))-1/fe)/2}function Kt(fe){return((fe=Math.exp(fe))+1/fe)/2}function ir(fe){return((fe=Math.exp(2*fe))-1)/(fe+1)}var _r=Math.SQRT2,yt=2,jt=4;i.interpolateZoom=function(fe,Ce){var Ve=fe[0],Qe=fe[1],tt=fe[2],it=Ce[0],Rt=Ce[1],ht=Ce[2],Ut=it-Ve,er=Rt-Qe,tr=Ut*Ut+er*er,Lr,Sr;if(tr0&&(Bn=Bn.transition().duration(Rt)),Bn.call(ln.event)}function ba(){Ur&&Ur.domain(Dr.range().map(function(Bn){return(Bn-fe.x)/fe.k}).map(Dr.invert)),tn&&tn.domain(Zr.range().map(function(Bn){return(Bn-fe.y)/fe.k}).map(Zr.invert))}function ma(Bn){ht++||Bn({type:"zoomstart"})}function Ua(Bn){ba(),Bn({type:"zoom",scale:fe.k,translate:[fe.x,fe.y]})}function Ea(Bn){--ht||(Bn({type:"zoomend"}),Ve=null)}function Oa(){var Bn=this,Na=en.of(Bn,arguments),_a=0,Ya=i.select(t(Bn)).on(er,Bi).on(tr,xi),Mi=Xr(i.mouse(Bn)),_i=Ie(Bn);Ot.call(Bn),ma(Na);function Bi(){_a=1,Kn(i.mouse(Bn),Mi),Ua(Na)}function xi(){Ya.on(er,null).on(tr,null),_i(_a),Ea(Na)}}function Ja(){var Bn=this,Na=en.of(Bn,arguments),_a={},Ya=0,Mi,_i=".zoom-"+i.event.changedTouches[0].identifier,Bi="touchmove"+_i,xi="touchend"+_i,fi=[],ga=i.select(Bn),Ma=Ie(Bn);Ni(),ma(Na),ga.on(Ut,null).on(Sr,Ni);function bi(){var xo=i.touches(Bn);return Mi=fe.k,xo.forEach(function(Ci){Ci.identifier in _a&&(_a[Ci.identifier]=Xr(Ci))}),xo}function Ni(){var xo=i.event.target;i.select(xo).on(Bi,zo).on(xi,$i),fi.push(xo);for(var Ci=i.event.changedTouches,Go=0,pi=Ci.length;Go1){var Xa=ys[0],wi=ys[1],yc=Xa[0]-wi[0],_f=Xa[1]-wi[1];Ya=yc*yc+_f*_f}}function zo(){var xo=i.touches(Bn),Ci,Go,pi,ys;Ot.call(Bn);for(var Wo=0,Xa=xo.length;Wo1?1:Ce,Ve=Ve<0?0:Ve>1?1:Ve,tt=Ve<=.5?Ve*(1+Ce):Ve+Ce-Ve*Ce,Qe=2*Ve-tt;function it(ht){return ht>360?ht-=360:ht<0&&(ht+=360),ht<60?Qe+(tt-Qe)*ht/60:ht<180?tt:ht<240?Qe+(tt-Qe)*(240-ht)/60:Qe}function Rt(ht){return Math.round(it(ht)*255)}return new lr(Rt(fe+120),Rt(fe),Rt(fe-120))}i.hcl=Ct;function Ct(fe,Ce,Ve){return this instanceof Ct?(this.h=+fe,this.c=+Ce,void(this.l=+Ve)):arguments.length<2?fe instanceof Ct?new Ct(fe.h,fe.c,fe.l):fe instanceof Ht?Dt(fe.l,fe.a,fe.b):Dt((fe=Hr((fe=i.rgb(fe)).r,fe.g,fe.b)).l,fe.a,fe.b):new Ct(fe,Ce,Ve)}var St=Ct.prototype=new ut;St.brighter=function(fe){return new Ct(this.h,this.c,Math.min(100,this.l+$t*(arguments.length?fe:1)))},St.darker=function(fe){return new Ct(this.h,this.c,Math.max(0,this.l-$t*(arguments.length?fe:1)))},St.rgb=function(){return _t(this.h,this.c,this.l).rgb()};function _t(fe,Ce,Ve){return isNaN(fe)&&(fe=0),isNaN(Ce)&&(Ce=0),new Ht(Ve,Math.cos(fe*=wt)*Ce,Math.sin(fe)*Ce)}i.lab=Ht;function Ht(fe,Ce,Ve){return this instanceof Ht?(this.l=+fe,this.a=+Ce,void(this.b=+Ve)):arguments.length<2?fe instanceof Ht?new Ht(fe.l,fe.a,fe.b):fe instanceof Ct?_t(fe.h,fe.c,fe.l):Hr((fe=lr(fe)).r,fe.g,fe.b):new Ht(fe,Ce,Ve)}var $t=18,Qt=.95047,or=1,Er=1.08883,Ye=Ht.prototype=new ut;Ye.brighter=function(fe){return new Ht(Math.min(100,this.l+$t*(arguments.length?fe:1)),this.a,this.b)},Ye.darker=function(fe){return new Ht(Math.max(0,this.l-$t*(arguments.length?fe:1)),this.a,this.b)},Ye.rgb=function(){return We(this.l,this.a,this.b)};function We(fe,Ce,Ve){var Qe=(fe+16)/116,tt=Qe+Ce/500,it=Qe-Ve/200;return tt=Ft(tt)*Qt,Qe=Ft(Qe)*or,it=Ft(it)*Er,new lr(nr(3.2404542*tt-1.5371385*Qe-.4985314*it),nr(-.969266*tt+1.8760108*Qe+.041556*it),nr(.0556434*tt-.2040259*Qe+1.0572252*it))}function Dt(fe,Ce,Ve){return fe>0?new Ct(Math.atan2(Ve,Ce)*It,Math.sqrt(Ce*Ce+Ve*Ve),fe):new Ct(NaN,NaN,fe)}function Ft(fe){return fe>.206893034?fe*fe*fe:(fe-.13793103448275862)/7.787037}function Zt(fe){return fe>.008856?Math.pow(fe,.3333333333333333):7.787037*fe+.13793103448275862}function nr(fe){return Math.round(255*(fe<=.00304?12.92*fe:1.055*Math.pow(fe,.4166666666666667)-.055))}i.rgb=lr;function lr(fe,Ce,Ve){return this instanceof lr?(this.r=~~fe,this.g=~~Ce,void(this.b=~~Ve)):arguments.length<2?fe instanceof lr?new lr(fe.r,fe.g,fe.b):pr(""+fe,lr,Tt):new lr(fe,Ce,Ve)}function rr(fe){return new lr(fe>>16,fe>>8&255,fe&255)}function zt(fe){return rr(fe)+""}var fr=lr.prototype=new ut;fr.brighter=function(fe){fe=Math.pow(.7,arguments.length?fe:1);var Ce=this.r,Ve=this.g,Qe=this.b,tt=30;return!Ce&&!Ve&&!Qe?new lr(tt,tt,tt):(Ce&&Ce>4,Qe=Qe>>4|Qe,tt=Ut&240,tt=tt>>4|tt,it=Ut&15,it=it<<4|it):fe.length===7&&(Qe=(Ut&16711680)>>16,tt=(Ut&65280)>>8,it=Ut&255)),Ce(Qe,tt,it))}function vr(fe,Ce,Ve){var Qe=Math.min(fe/=255,Ce/=255,Ve/=255),tt=Math.max(fe,Ce,Ve),it=tt-Qe,Rt,ht,Ut=(tt+Qe)/2;return it?(ht=Ut<.5?it/(tt+Qe):it/(2-tt-Qe),fe==tt?Rt=(Ce-Ve)/it+(Ce0&&Ut<1?0:Rt),new lt(Rt,ht,Ut)}function Hr(fe,Ce,Ve){fe=Ir(fe),Ce=Ir(Ce),Ve=Ir(Ve);var Qe=Zt((.4124564*fe+.3575761*Ce+.1804375*Ve)/Qt),tt=Zt((.2126729*fe+.7151522*Ce+.072175*Ve)/or),it=Zt((.0193339*fe+.119192*Ce+.9503041*Ve)/Er);return Ht(116*tt-16,500*(Qe-tt),200*(tt-it))}function Ir(fe){return(fe/=255)<=.04045?fe/12.92:Math.pow((fe+.055)/1.055,2.4)}function kr(fe){var Ce=parseFloat(fe);return fe.charAt(fe.length-1)==="%"?Math.round(Ce*2.55):Ce}var pn=i.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});pn.forEach(function(fe,Ce){pn.set(fe,rr(Ce))});function jr(fe){return typeof fe=="function"?fe:function(){return fe}}i.functor=jr,i.xhr=In(O);function In(fe){return function(Ce,Ve,Qe){return arguments.length===2&&typeof Ve=="function"&&(Qe=Ve,Ve=null),Dn(Ce,Ve,fe,Qe)}}function Dn(fe,Ce,Ve,Qe){var tt={},it=i.dispatch("beforesend","progress","load","error"),Rt={},ht=new XMLHttpRequest,Ut=null;self.XDomainRequest&&!("withCredentials"in ht)&&/^(http(s)?:)?\/\//.test(fe)&&(ht=new XDomainRequest),"onload"in ht?ht.onload=ht.onerror=er:ht.onreadystatechange=function(){ht.readyState>3&&er()};function er(){var tr=ht.status,Lr;if(!tr&&Ar(ht)||tr>=200&&tr<300||tr===304){try{Lr=Ve.call(tt,ht)}catch(Sr){it.error.call(tt,Sr);return}it.load.call(tt,Lr)}else it.error.call(tt,ht)}return ht.onprogress=function(tr){var Lr=i.event;i.event=tr;try{it.progress.call(tt,ht)}finally{i.event=Lr}},tt.header=function(tr,Lr){return tr=(tr+"").toLowerCase(),arguments.length<2?Rt[tr]:(Lr==null?delete Rt[tr]:Rt[tr]=Lr+"",tt)},tt.mimeType=function(tr){return arguments.length?(Ce=tr==null?null:tr+"",tt):Ce},tt.responseType=function(tr){return arguments.length?(Ut=tr,tt):Ut},tt.response=function(tr){return Ve=tr,tt},["get","post"].forEach(function(tr){tt[tr]=function(){return tt.send.apply(tt,[tr].concat(A(arguments)))}}),tt.send=function(tr,Lr,Sr){if(arguments.length===2&&typeof Lr=="function"&&(Sr=Lr,Lr=null),ht.open(tr,fe,!0),Ce!=null&&!("accept"in Rt)&&(Rt.accept=Ce+",*/*"),ht.setRequestHeader)for(var Kr in Rt)ht.setRequestHeader(Kr,Rt[Kr]);return Ce!=null&&ht.overrideMimeType&&ht.overrideMimeType(Ce),Ut!=null&&(ht.responseType=Ut),Sr!=null&&tt.on("error",Sr).on("load",function(en){Sr(null,en)}),it.beforesend.call(tt,ht),ht.send(Lr??null),tt},tt.abort=function(){return ht.abort(),tt},i.rebind(tt,it,"on"),Qe==null?tt:tt.get(xr(Qe))}function xr(fe){return fe.length===1?function(Ce,Ve){fe(Ce==null?Ve:null)}:fe}function Ar(fe){var Ce=fe.responseType;return Ce&&Ce!=="text"?fe.response:fe.responseText}i.dsv=function(fe,Ce){var Ve=new RegExp('["'+fe+` ]`),Qe=fe.charCodeAt(0);function tt(er,tr,Lr){arguments.length<3&&(Lr=tr,tr=null);var Sr=Dn(er,Ce,tr==null?it:Rt(tr),Lr);return Sr.row=function(Kr){return arguments.length?Sr.response((tr=Kr)==null?it:Rt(Kr)):tr},Sr}function it(er){return tt.parse(er.responseText)}function Rt(er){return function(tr){return tt.parse(tr.responseText,er)}}tt.parse=function(er,tr){var Lr;return tt.parseRows(er,function(Sr,Kr){if(Lr)return Lr(Sr,Kr-1);var en=function(Dr){for(var Ur={},Zr=Sr.length,tn=0;tn=en)return Sr;if(tn)return tn=!1,Lr;var Nn=Dr;if(er.charCodeAt(Nn)===34){for(var Gn=Nn;Gn++24?(isFinite(Ce)&&(clearTimeout(vn),vn=setTimeout(Pn,Ce)),qr=0):(qr=1,fn(Pn))}i.timer.flush=function(){jn(),qn()};function jn(){for(var fe=Date.now(),Ce=Or;Ce;)fe>=Ce.t&&Ce.c(fe-Ce.t)&&(Ce.c=null),Ce=Ce.n;return fe}function qn(){for(var fe,Ce=Or,Ve=1/0;Ce;)Ce.c?(Ce.t=0;--ht)Dr.push(tt[er[Lr[ht]][2]]);for(ht=+Kr;ht1&&Bt(fe[Ve[Qe-2]],fe[Ve[Qe-1]],fe[tt])<=0;)--Qe;Ve[Qe++]=tt}return Ve.slice(0,Qe)}function Mr(fe,Ce){return fe[0]-Ce[0]||fe[1]-Ce[1]}i.geom.polygon=function(fe){return j(fe,on),fe};var on=i.geom.polygon.prototype=[];on.area=function(){for(var fe=-1,Ce=this.length,Ve,Qe=this[Ce-1],tt=0;++fese)ht=ht.L;else if(Rt=Ce-un(ht,Ve),Rt>se){if(!ht.R){Qe=ht;break}ht=ht.R}else{it>-se?(Qe=ht.P,tt=ht):Rt>-se?(Qe=ht,tt=ht.N):Qe=tt=ht;break}var Ut=an(fe);if(Hn.insert(Qe,Ut),!(!Qe&&!tt)){if(Qe===tt){Wn(Qe),tt=an(Qe.site),Hn.insert(Ut,tt),Ut.edge=tt.edge=ia(Qe.site,Ut.site),_n(Qe),_n(tt);return}if(!tt){Ut.edge=ia(Qe.site,Ut.site);return}Wn(Qe),Wn(tt);var er=Qe.site,tr=er.x,Lr=er.y,Sr=fe.x-tr,Kr=fe.y-Lr,en=tt.site,Dr=en.x-tr,Ur=en.y-Lr,Zr=2*(Sr*Ur-Kr*Dr),tn=Sr*Sr+Kr*Kr,ln=Dr*Dr+Ur*Ur,Xr={x:(Ur*tn-Kr*ln)/Zr+tr,y:(Sr*ln-Dr*tn)/Zr+Lr};da(tt.edge,er,en,Xr),Ut.edge=ia(er,fe,null,Xr),tt.edge=ia(fe,en,null,Xr),_n(Qe),_n(tt)}}function wn(fe,Ce){var Ve=fe.site,Qe=Ve.x,tt=Ve.y,it=tt-Ce;if(!it)return Qe;var Rt=fe.P;if(!Rt)return-1/0;Ve=Rt.site;var ht=Ve.x,Ut=Ve.y,er=Ut-Ce;if(!er)return ht;var tr=ht-Qe,Lr=1/it-1/er,Sr=tr/er;return Lr?(-Sr+Math.sqrt(Sr*Sr-2*Lr*(tr*tr/(-2*er)-Ut+er/2+tt-it/2)))/Lr+Qe:(Qe+ht)/2}function un(fe,Ce){var Ve=fe.N;if(Ve)return wn(Ve,Ce);var Qe=fe.site;return Qe.y===Ce?Qe.x:1/0}function Rr(fe){this.site=fe,this.edges=[]}Rr.prototype.prepare=function(){for(var fe=this.edges,Ce=fe.length,Ve;Ce--;)Ve=fe[Ce].edge,(!Ve.b||!Ve.a)&&fe.splice(Ce,1);return fe.sort(zr),fe.length};function Cr(fe){for(var Ce=fe[0][0],Ve=fe[1][0],Qe=fe[0][1],tt=fe[1][1],it,Rt,ht,Ut,er=Cn,tr=er.length,Lr,Sr,Kr,en,Dr,Ur;tr--;)if(Lr=er[tr],!(!Lr||!Lr.prepare()))for(Kr=Lr.edges,en=Kr.length,Sr=0;Srse||d(Ut-Rt)>se)&&(Kr.splice(Sr,0,new Ki(oa(Lr.site,Ur,d(ht-Ce)se?{x:Ce,y:d(it-Ce)se?{x:d(Rt-tt)se?{x:Ve,y:d(it-Ve)se?{x:d(Rt-Qe)=-ye)){var Sr=Ut*Ut+er*er,Kr=tr*tr+Ur*Ur,en=(Ur*Sr-er*Kr)/Lr,Dr=(Ut*Kr-tr*Sr)/Lr,Ur=Dr+ht,Zr=Xt.pop()||new dn;Zr.arc=fe,Zr.site=tt,Zr.x=en+Rt,Zr.y=Ur+Math.sqrt(en*en+Dr*Dr),Zr.cy=Ur,fe.circle=Zr;for(var tn=null,ln=Za._;ln;)if(Zr.y0)){if(Dr/=Kr,Kr<0){if(Dr0){if(Dr>Sr)return;Dr>Lr&&(Lr=Dr)}if(Dr=Ve-ht,!(!Kr&&Dr<0)){if(Dr/=Kr,Kr<0){if(Dr>Sr)return;Dr>Lr&&(Lr=Dr)}else if(Kr>0){if(Dr0)){if(Dr/=en,en<0){if(Dr0){if(Dr>Sr)return;Dr>Lr&&(Lr=Dr)}if(Dr=Qe-Ut,!(!en&&Dr<0)){if(Dr/=en,en<0){if(Dr>Sr)return;Dr>Lr&&(Lr=Dr)}else if(en>0){if(Dr0&&(tt.a={x:ht+Lr*Kr,y:Ut+Lr*en}),Sr<1&&(tt.b={x:ht+Sr*Kr,y:Ut+Sr*en}),tt}}}}}}function On(fe){for(var Ce=En,Ve=yn(fe[0][0],fe[0][1],fe[1][0],fe[1][1]),Qe=Ce.length,tt;Qe--;)tt=Ce[Qe],(!$n(tt,fe)||!Ve(tt)||d(tt.a.x-tt.b.x)=it)return;if(tr>Sr){if(!Qe)Qe={x:en,y:Rt};else if(Qe.y>=ht)return;Ve={x:en,y:ht}}else{if(!Qe)Qe={x:en,y:ht};else if(Qe.y1)if(tr>Sr){if(!Qe)Qe={x:(Rt-Zr)/Ur,y:Rt};else if(Qe.y>=ht)return;Ve={x:(ht-Zr)/Ur,y:ht}}else{if(!Qe)Qe={x:(ht-Zr)/Ur,y:ht};else if(Qe.y=it)return;Ve={x:it,y:Ur*it+Zr}}else{if(!Qe)Qe={x:it,y:Ur*it+Zr};else if(Qe.x=tr&&Zr.x<=Sr&&Zr.y>=Lr&&Zr.y<=Kr?[[tr,Kr],[Sr,Kr],[Sr,Lr],[tr,Lr]]:[];tn.point=Ut[Dr]}),er}function ht(Ut){return Ut.map(function(er,tr){return{x:Math.round(Qe(er,tr)/se)*se,y:Math.round(tt(er,tr)/se)*se,i:tr}})}return Rt.links=function(Ut){return qa(ht(Ut)).edges.filter(function(er){return er.l&&er.r}).map(function(er){return{source:Ut[er.l.i],target:Ut[er.r.i]}})},Rt.triangles=function(Ut){var er=[];return qa(ht(Ut)).cells.forEach(function(tr,Lr){for(var Sr=tr.site,Kr=tr.edges.sort(zr),en=-1,Dr=Kr.length,Ur,Zr=Kr[Dr-1].edge,tn=Zr.l===Sr?Zr.r:Zr.l;++enln&&(ln=tr.x),tr.y>Xr&&(Xr=tr.y),Kr.push(tr.x),en.push(tr.y);else for(Dr=0;Drln&&(ln=Nn),Gn>Xr&&(Xr=Gn),Kr.push(Nn),en.push(Gn)}var Kn=ln-Zr,na=Xr-tn;Kn>na?Xr=tn+Kn:ln=Zr+na;function ba(Ea,Oa,Ja,ei,li,Bn,Na,_a){if(!(isNaN(Ja)||isNaN(ei)))if(Ea.leaf){var Ya=Ea.x,Mi=Ea.y;if(Ya!=null)if(d(Ya-Ja)+d(Mi-ei)<.01)ma(Ea,Oa,Ja,ei,li,Bn,Na,_a);else{var _i=Ea.point;Ea.x=Ea.y=Ea.point=null,ma(Ea,_i,Ya,Mi,li,Bn,Na,_a),ma(Ea,Oa,Ja,ei,li,Bn,Na,_a)}else Ea.x=Ja,Ea.y=ei,Ea.point=Oa}else ma(Ea,Oa,Ja,ei,li,Bn,Na,_a)}function ma(Ea,Oa,Ja,ei,li,Bn,Na,_a){var Ya=(li+Na)*.5,Mi=(Bn+_a)*.5,_i=Ja>=Ya,Bi=ei>=Mi,xi=Bi<<1|_i;Ea.leaf=!1,Ea=Ea.nodes[xi]||(Ea.nodes[xi]=iu()),_i?li=Ya:Na=Ya,Bi?Bn=Mi:_a=Mi,ba(Ea,Oa,Ja,ei,li,Bn,Na,_a)}var Ua=iu();if(Ua.add=function(Ea){ba(Ua,Ea,+Lr(Ea,++Dr),+Sr(Ea,Dr),Zr,tn,ln,Xr)},Ua.visit=function(Ea){Ri(Ea,Ua,Zr,tn,ln,Xr)},Ua.find=function(Ea){return ou(Ua,Ea[0],Ea[1],Zr,tn,ln,Xr)},Dr=-1,Ce==null){for(;++Drit||Sr>Rt||Kr=Nn,na=Ve>=Gn,ba=na<<1|Kn,ma=ba+4;baVe&&(it=Ce.slice(Ve,it),ht[Rt]?ht[Rt]+=it:ht[++Rt]=it),(Qe=Qe[0])===(tt=tt[0])?ht[Rt]?ht[Rt]+=tt:ht[++Rt]=tt:(ht[++Rt]=null,Ut.push({i:Rt,x:Fo(Qe,tt)})),Ve=fs.lastIndex;return Ve=0&&!(Qe=i.interpolators[Ve](fe,Ce)););return Qe}i.interpolators=[function(fe,Ce){var Ve=typeof Ce;return(Ve==="string"?pn.has(Ce.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(Ce)?ko:ho:Ce instanceof ut?ko:Array.isArray(Ce)?eo:Ve==="object"&&isNaN(Ce)?Wi:Fo)(fe,Ce)}],i.interpolateArray=eo;function eo(fe,Ce){var Ve=[],Qe=[],tt=fe.length,it=Ce.length,Rt=Math.min(fe.length,Ce.length),ht;for(ht=0;ht=0?fe.slice(0,Ce):fe,Qe=Ce>=0?fe.slice(Ce+1):"in";return Ve=cs.get(Ve)||ec,Qe=to.get(Qe)||O,hf(Qe(Ve.apply(null,L.call(arguments,1))))};function hf(fe){return function(Ce){return Ce<=0?0:Ce>=1?1:fe(Ce)}}function Ps(fe){return function(Ce){return 1-fe(1-Ce)}}function hs(fe){return function(Ce){return .5*(Ce<.5?fe(2*Ce):2-fe(2-2*Ce))}}function vf(fe){return fe*fe}function df(fe){return fe*fe*fe}function eh(fe){if(fe<=0)return 0;if(fe>=1)return 1;var Ce=fe*fe,Ve=Ce*fe;return 4*(fe<.5?Ve:3*(fe-Ce)+Ve-.75)}function su(fe){return function(Ce){return Math.pow(Ce,fe)}}function th(fe){return 1-Math.cos(fe*at)}function rh(fe){return Math.pow(2,10*(fe-1))}function nh(fe){return 1-Math.sqrt(1-fe*fe)}function pf(fe,Ce){var Ve;return arguments.length<2&&(Ce=.45),arguments.length?Ve=Ce/Be*Math.asin(1/fe):(fe=1,Ve=Ce/4),function(Qe){return 1+fe*Math.pow(2,-10*Qe)*Math.sin((Qe-Ve)*Be/Ce)}}function ah(fe){return fe||(fe=1.70158),function(Ce){return Ce*Ce*((fe+1)*Ce-fe)}}function ih(fe){return fe<.36363636363636365?7.5625*fe*fe:fe<.7272727272727273?7.5625*(fe-=.5454545454545454)*fe+.75:fe<.9090909090909091?7.5625*(fe-=.8181818181818182)*fe+.9375:7.5625*(fe-=.9545454545454546)*fe+.984375}i.interpolateHcl=tc;function tc(fe,Ce){fe=i.hcl(fe),Ce=i.hcl(Ce);var Ve=fe.h,Qe=fe.c,tt=fe.l,it=Ce.h-Ve,Rt=Ce.c-Qe,ht=Ce.l-tt;return isNaN(Rt)&&(Rt=0,Qe=isNaN(Qe)?Ce.c:Qe),isNaN(it)?(it=0,Ve=isNaN(Ve)?Ce.h:Ve):it>180?it-=360:it<-180&&(it+=360),function(Ut){return _t(Ve+it*Ut,Qe+Rt*Ut,tt+ht*Ut)+""}}i.interpolateHsl=oh;function oh(fe,Ce){fe=i.hsl(fe),Ce=i.hsl(Ce);var Ve=fe.h,Qe=fe.s,tt=fe.l,it=Ce.h-Ve,Rt=Ce.s-Qe,ht=Ce.l-tt;return isNaN(Rt)&&(Rt=0,Qe=isNaN(Qe)?Ce.s:Qe),isNaN(it)?(it=0,Ve=isNaN(Ve)?Ce.h:Ve):it>180?it-=360:it<-180&&(it+=360),function(Ut){return Tt(Ve+it*Ut,Qe+Rt*Ut,tt+ht*Ut)+""}}i.interpolateLab=sh;function sh(fe,Ce){fe=i.lab(fe),Ce=i.lab(Ce);var Ve=fe.l,Qe=fe.a,tt=fe.b,it=Ce.l-Ve,Rt=Ce.a-Qe,ht=Ce.b-tt;return function(Ut){return We(Ve+it*Ut,Qe+Rt*Ut,tt+ht*Ut)+""}}i.interpolateRound=gf;function gf(fe,Ce){return Ce-=fe,function(Ve){return Math.round(fe+Ce*Ve)}}i.transform=function(fe){var Ce=v.createElementNS(i.ns.prefix.svg,"g");return(i.transform=function(Ve){if(Ve!=null){Ce.setAttribute("transform",Ve);var Qe=Ce.transform.baseVal.consolidate()}return new hl(Qe?Qe.matrix:lh)})(fe)};function hl(fe){var Ce=[fe.a,fe.b],Ve=[fe.c,fe.d],Qe=Fl(Ce),tt=vl(Ce,Ve),it=Fl(zu(Ve,Ce,-tt))||0;Ce[0]*Ve[1]180?Ce+=360:Ce-fe>180&&(fe+=360),Qe.push({i:Ve.push(Rs(Ve)+"rotate(",null,")")-2,x:Fo(fe,Ce)})):Ce&&Ve.push(Rs(Ve)+"rotate("+Ce+")")}function uh(fe,Ce,Ve,Qe){fe!==Ce?Qe.push({i:Ve.push(Rs(Ve)+"skewX(",null,")")-2,x:Fo(fe,Ce)}):Ce&&Ve.push(Rs(Ve)+"skewX("+Ce+")")}function Ho(fe,Ce,Ve,Qe){if(fe[0]!==Ce[0]||fe[1]!==Ce[1]){var tt=Ve.push(Rs(Ve)+"scale(",null,",",null,")");Qe.push({i:tt-4,x:Fo(fe[0],Ce[0])},{i:tt-2,x:Fo(fe[1],Ce[1])})}else(Ce[0]!==1||Ce[1]!==1)&&Ve.push(Rs(Ve)+"scale("+Ce+")")}function dl(fe,Ce){var Ve=[],Qe=[];return fe=i.transform(fe),Ce=i.transform(Ce),rc(fe.translate,Ce.translate,Ve,Qe),yf(fe.rotate,Ce.rotate,Ve,Qe),uh(fe.skew,Ce.skew,Ve,Qe),Ho(fe.scale,Ce.scale,Ve,Qe),fe=Ce=null,function(tt){for(var it=-1,Rt=Qe.length,ht;++it0?it=Xr:(Ve.c=null,Ve.t=NaN,Ve=null,Ce.end({type:"end",alpha:it=0})):Xr>0&&(Ce.start({type:"start",alpha:it=Xr}),Ve=Tn(fe.tick)),fe):it},fe.start=function(){var Xr,Nn=Kr.length,Gn=en.length,Kn=Qe[0],na=Qe[1],ba,ma;for(Xr=0;Xr=0;)it.push(tr=er[Ut]),tr.parent=ht,tr.depth=ht.depth+1;Ve&&(ht.value=0),ht.children=er}else Ve&&(ht.value=+Ve.call(Qe,ht,ht.depth)||0),delete ht.children;return Qi(tt,function(Lr){var Sr,Kr;fe&&(Sr=Lr.children)&&Sr.sort(fe),Ve&&(Kr=Lr.parent)&&(Kr.value+=Lr.value)}),Rt}return Qe.sort=function(tt){return arguments.length?(fe=tt,Qe):fe},Qe.children=function(tt){return arguments.length?(Ce=tt,Qe):Ce},Qe.value=function(tt){return arguments.length?(Ve=tt,Qe):Ve},Qe.revalue=function(tt){return Ve&&(Bl(tt,function(it){it.children&&(it.value=0)}),Qi(tt,function(it){var Rt;it.children||(it.value=+Ve.call(Qe,it,it.depth)||0),(Rt=it.parent)&&(Rt.value+=it.value)})),tt},Qe};function Nl(fe,Ce){return i.rebind(fe,Ce,"sort","children","value"),fe.nodes=fe,fe.links=ch,fe}function Bl(fe,Ce){for(var Ve=[fe];(fe=Ve.pop())!=null;)if(Ce(fe),(tt=fe.children)&&(Qe=tt.length))for(var Qe,tt;--Qe>=0;)Ve.push(tt[Qe])}function Qi(fe,Ce){for(var Ve=[fe],Qe=[];(fe=Ve.pop())!=null;)if(Qe.push(fe),(Rt=fe.children)&&(it=Rt.length))for(var tt=-1,it,Rt;++tttt&&(tt=ht),Qe.push(ht)}for(Rt=0;RtQe&&(Ve=Ce,Qe=tt);return Ve}function ic(fe){return fe.reduce($o,0)}function $o(fe,Ce){return fe+Ce[1]}i.layout.histogram=function(){var fe=!0,Ce=Number,Ve=Sf,Qe=Ul;function tt(it,Sr){for(var ht=[],Ut=it.map(Ce,this),er=Ve.call(this,Ut,Sr),tr=Qe.call(this,er,Ut,Sr),Lr,Sr=-1,Kr=Ut.length,en=tr.length-1,Dr=fe?1:1/Kr,Ur;++Sr0)for(Sr=-1;++Sr=er[0]&&Ur<=er[1]&&(Lr=ht[i.bisect(tr,Ur,1,en)-1],Lr.y+=Dr,Lr.push(it[Sr]));return ht}return tt.value=function(it){return arguments.length?(Ce=it,tt):Ce},tt.range=function(it){return arguments.length?(Ve=jr(it),tt):Ve},tt.bins=function(it){return arguments.length?(Qe=typeof it=="number"?function(Rt){return pl(Rt,it)}:jr(it),tt):Qe},tt.frequency=function(it){return arguments.length?(fe=!!it,tt):fe},tt};function Ul(fe,Ce){return pl(fe,Math.ceil(Math.log(Ce.length)/Math.LN2+1))}function pl(fe,Ce){for(var Ve=-1,Qe=+fe[0],tt=(fe[1]-Qe)/Ce,it=[];++Ve<=Ce;)it[Ve]=tt*Ve+Qe;return it}function Sf(fe){return[i.min(fe),i.max(fe)]}i.layout.pack=function(){var fe=i.layout.hierarchy().sort(zi),Ce=0,Ve=[1,1],Qe;function tt(it,Rt){var ht=fe.call(this,it,Rt),Ut=ht[0],er=Ve[0],tr=Ve[1],Lr=Qe==null?Math.sqrt:typeof Qe=="function"?Qe:function(){return Qe};if(Ut.x=Ut.y=0,Qi(Ut,function(Kr){Kr.r=+Lr(Kr.value)}),Qi(Ut,ks),Ce){var Sr=Ce*(Qe?1:Math.max(2*Ut.r/er,2*Ut.r/tr))/2;Qi(Ut,function(Kr){Kr.r+=Sr}),Qi(Ut,ks),Qi(Ut,function(Kr){Kr.r-=Sr})}return Ks(Ut,er/2,tr/2,Qe?1:1/Math.max(2*Ut.r/er,2*Ut.r/tr)),ht}return tt.size=function(it){return arguments.length?(Ve=it,tt):Ve},tt.radius=function(it){return arguments.length?(Qe=it==null||typeof it=="function"?it:+it,tt):Qe},tt.padding=function(it){return arguments.length?(Ce=+it,tt):Ce},Nl(tt,fe)};function zi(fe,Ce){return fe.value-Ce.value}function cu(fe,Ce){var Ve=fe._pack_next;fe._pack_next=Ce,Ce._pack_prev=fe,Ce._pack_next=Ve,Ve._pack_prev=Ce}function Co(fe,Ce){fe._pack_next=Ce,Ce._pack_prev=fe}function Is(fe,Ce){var Ve=Ce.x-fe.x,Qe=Ce.y-fe.y,tt=fe.r+Ce.r;return .999*tt*tt>Ve*Ve+Qe*Qe}function ks(fe){if(!(Ce=fe.children)||!(Sr=Ce.length))return;var Ce,Ve=1/0,Qe=-1/0,tt=1/0,it=-1/0,Rt,ht,Ut,er,tr,Lr,Sr;function Kr(Xr){Ve=Math.min(Xr.x-Xr.r,Ve),Qe=Math.max(Xr.x+Xr.r,Qe),tt=Math.min(Xr.y-Xr.r,tt),it=Math.max(Xr.y+Xr.r,it)}if(Ce.forEach(Xs),Rt=Ce[0],Rt.x=-Rt.r,Rt.y=0,Kr(Rt),Sr>1&&(ht=Ce[1],ht.x=ht.r,ht.y=0,Kr(ht),Sr>2))for(Ut=Ce[2],qo(Rt,ht,Ut),Kr(Ut),cu(Rt,Ut),Rt._pack_prev=Ut,cu(Ut,ht),ht=Rt._pack_next,er=3;erUr.x&&(Ur=Nn),Nn.depth>Zr.depth&&(Zr=Nn)});var tn=Ce(Dr,Ur)/2-Dr.x,ln=Ve[0]/(Ur.x+Ce(Ur,Dr)/2+tn),Xr=Ve[1]/(Zr.depth||1);Bl(Kr,function(Nn){Nn.x=(Nn.x+tn)*ln,Nn.y=Nn.depth*Xr})}return Sr}function it(tr){for(var Lr={A:null,children:[tr]},Sr=[Lr],Kr;(Kr=Sr.pop())!=null;)for(var en=Kr.children,Dr,Ur=0,Zr=en.length;Ur0&&(Vu(vh(Dr,tr,Sr),tr,Nn),Zr+=Nn,tn+=Nn),ln+=Dr.m,Zr+=Kr.m,Xr+=Ur.m,tn+=en.m;Dr&&!vu(en)&&(en.t=Dr,en.m+=ln-tn),Kr&&!hu(Ur)&&(Ur.t=Kr,Ur.m+=Zr-Xr,Sr=tr)}return Sr}function er(tr){tr.x*=Ve[0],tr.y=tr.depth*Ve[1]}return tt.separation=function(tr){return arguments.length?(Ce=tr,tt):Ce},tt.size=function(tr){return arguments.length?(Qe=(Ve=tr)==null?er:null,tt):Qe?null:Ve},tt.nodeSize=function(tr){return arguments.length?(Qe=(Ve=tr)==null?null:er,tt):Qe?Ve:null},Nl(tt,fe)};function ds(fe,Ce){return fe.parent==Ce.parent?1:2}function hu(fe){var Ce=fe.children;return Ce.length?Ce[0]:fe.t}function vu(fe){var Ce=fe.children,Ve;return(Ve=Ce.length)?Ce[Ve-1]:fe.t}function Vu(fe,Ce,Ve){var Qe=Ve/(Ce.i-fe.i);Ce.c-=Qe,Ce.s+=Ve,fe.c+=Qe,Ce.z+=Ve,Ce.m+=Ve}function hh(fe){for(var Ce=0,Ve=0,Qe=fe.children,tt=Qe.length,it;--tt>=0;)it=Qe[tt],it.z+=Ce,it.m+=Ce,Ce+=it.s+(Ve+=it.c)}function vh(fe,Ce,Ve){return fe.a.parent===Ce.parent?fe.a:Ve}i.layout.cluster=function(){var fe=i.layout.hierarchy().sort(null).value(null),Ce=ds,Ve=[1,1],Qe=!1;function tt(it,Rt){var ht=fe.call(this,it,Rt),Ut=ht[0],er,tr=0;Qi(Ut,function(Dr){var Ur=Dr.children;Ur&&Ur.length?(Dr.x=ph(Ur),Dr.y=dh(Ur)):(Dr.x=er?tr+=Ce(Dr,er):0,Dr.y=0,er=Dr)});var Lr=Hu(Ut),Sr=oc(Ut),Kr=Lr.x-Ce(Lr,Sr)/2,en=Sr.x+Ce(Sr,Lr)/2;return Qi(Ut,Qe?function(Dr){Dr.x=(Dr.x-Ut.x)*Ve[0],Dr.y=(Ut.y-Dr.y)*Ve[1]}:function(Dr){Dr.x=(Dr.x-Kr)/(en-Kr)*Ve[0],Dr.y=(1-(Ut.y?Dr.y/Ut.y:1))*Ve[1]}),ht}return tt.separation=function(it){return arguments.length?(Ce=it,tt):Ce},tt.size=function(it){return arguments.length?(Qe=(Ve=it)==null,tt):Qe?null:Ve},tt.nodeSize=function(it){return arguments.length?(Qe=(Ve=it)!=null,tt):Qe?Ve:null},Nl(tt,fe)};function dh(fe){return 1+i.max(fe,function(Ce){return Ce.y})}function ph(fe){return fe.reduce(function(Ce,Ve){return Ce+Ve.x},0)/fe.length}function Hu(fe){var Ce=fe.children;return Ce&&Ce.length?Hu(Ce[0]):fe}function oc(fe){var Ce=fe.children,Ve;return Ce&&(Ve=Ce.length)?oc(Ce[Ve-1]):fe}i.layout.treemap=function(){var fe=i.layout.hierarchy(),Ce=Math.round,Ve=[1,1],Qe=null,tt=Vl,it=!1,Rt,ht="squarify",Ut=.5*(1+Math.sqrt(5));function er(Dr,Ur){for(var Zr=-1,tn=Dr.length,ln,Xr;++Zr0;)tn.push(Xr=ln[na-1]),tn.area+=Xr.area,ht!=="squarify"||(Gn=Sr(tn,Kn))<=Nn?(ln.pop(),Nn=Gn):(tn.area-=tn.pop().area,Kr(tn,Kn,Zr,!1),Kn=Math.min(Zr.dx,Zr.dy),tn.length=tn.area=0,Nn=1/0);tn.length&&(Kr(tn,Kn,Zr,!0),tn.length=tn.area=0),Ur.forEach(tr)}}function Lr(Dr){var Ur=Dr.children;if(Ur&&Ur.length){var Zr=tt(Dr),tn=Ur.slice(),ln,Xr=[];for(er(tn,Zr.dx*Zr.dy/Dr.value),Xr.area=0;ln=tn.pop();)Xr.push(ln),Xr.area+=ln.area,ln.z!=null&&(Kr(Xr,ln.z?Zr.dx:Zr.dy,Zr,!tn.length),Xr.length=Xr.area=0);Ur.forEach(Lr)}}function Sr(Dr,Ur){for(var Zr=Dr.area,tn,ln=0,Xr=1/0,Nn=-1,Gn=Dr.length;++Nnln&&(ln=tn));return Zr*=Zr,Ur*=Ur,Zr?Math.max(Ur*ln*Ut/Zr,Zr/(Ur*Xr*Ut)):1/0}function Kr(Dr,Ur,Zr,tn){var ln=-1,Xr=Dr.length,Nn=Zr.x,Gn=Zr.y,Kn=Ur?Ce(Dr.area/Ur):0,na;if(Ur==Zr.dx){for((tn||Kn>Zr.dy)&&(Kn=Zr.dy);++lnZr.dx)&&(Kn=Zr.dx);++ln1);return fe+Ce*Qe*Math.sqrt(-2*Math.log(it)/it)}},logNormal:function(){var fe=i.random.normal.apply(i,arguments);return function(){return Math.exp(fe())}},bates:function(fe){var Ce=i.random.irwinHall(fe);return function(){return Ce()/fe}},irwinHall:function(fe){return function(){for(var Ce=0,Ve=0;Ve2?sc:yl,er=Qe?_l:lu;return tt=Ut(fe,Ce,er,Ve),it=Ut(Ce,fe,er,Ls),ht}function ht(Ut){return tt(Ut)}return ht.invert=function(Ut){return it(Ut)},ht.domain=function(Ut){return arguments.length?(fe=Ut.map(Number),Rt()):fe},ht.range=function(Ut){return arguments.length?(Ce=Ut,Rt()):Ce},ht.rangeRound=function(Ut){return ht.range(Ut).interpolate(gf)},ht.clamp=function(Ut){return arguments.length?(Qe=Ut,Rt()):Qe},ht.interpolate=function(Ut){return arguments.length?(Ve=Ut,Rt()):Ve},ht.ticks=function(Ut){return ps(fe,Ut)},ht.tickFormat=function(Ut,er){return d3_scale_linearTickFormat(fe,Ut,er)},ht.nice=function(Ut){return Js(fe,Ut),Rt()},ht.copy=function(){return lc(fe,Ce,Ve,Qe)},Rt()}function Ef(fe,Ce){return i.rebind(fe,Ce,"range","rangeRound","interpolate","clamp")}function Js(fe,Ce){return pu(fe,Gu(Oi(fe,Ce)[2])),pu(fe,Gu(Oi(fe,Ce)[2])),fe}function Oi(fe,Ce){Ce==null&&(Ce=10);var Ve=Lo(fe),Qe=Ve[1]-Ve[0],tt=Math.pow(10,Math.floor(Math.log(Qe/Ce)/Math.LN10)),it=Ce/Qe*tt;return it<=.15?tt*=10:it<=.35?tt*=5:it<=.75&&(tt*=2),Ve[0]=Math.ceil(Ve[0]/tt)*tt,Ve[1]=Math.floor(Ve[1]/tt)*tt+tt*.5,Ve[2]=tt,Ve}function ps(fe,Ce){return i.range.apply(i,Oi(fe,Ce))}i.scale.log=function(){return Cf(i.scale.linear().domain([0,1]),10,!0,[1,10])};function Cf(fe,Ce,Ve,Qe){function tt(ht){return(Ve?Math.log(ht<0?0:ht):-Math.log(ht>0?0:-ht))/Math.log(Ce)}function it(ht){return Ve?Math.pow(Ce,ht):-Math.pow(Ce,-ht)}function Rt(ht){return fe(tt(ht))}return Rt.invert=function(ht){return it(fe.invert(ht))},Rt.domain=function(ht){return arguments.length?(Ve=ht[0]>=0,fe.domain((Qe=ht.map(Number)).map(tt)),Rt):Qe},Rt.base=function(ht){return arguments.length?(Ce=+ht,fe.domain(Qe.map(tt)),Rt):Ce},Rt.nice=function(){var ht=pu(Qe.map(tt),Ve?Math:uc);return fe.domain(ht),Qe=ht.map(it),Rt},Rt.ticks=function(){var ht=Lo(Qe),Ut=[],er=ht[0],tr=ht[1],Lr=Math.floor(tt(er)),Sr=Math.ceil(tt(tr)),Kr=Ce%1?2:Ce;if(isFinite(Sr-Lr)){if(Ve){for(;Lr0;en--)Ut.push(it(Lr)*en);for(Lr=0;Ut[Lr]tr;Sr--);Ut=Ut.slice(Lr,Sr)}return Ut},Rt.copy=function(){return Cf(fe.copy(),Ce,Ve,Qe)},Ef(Rt,fe)}var uc={floor:function(fe){return-Math.ceil(-fe)},ceil:function(fe){return-Math.floor(-fe)}};i.scale.pow=function(){return ml(i.scale.linear(),1,[0,1])};function ml(fe,Ce,Ve){var Qe=Wu(Ce),tt=Wu(1/Ce);function it(Rt){return fe(Qe(Rt))}return it.invert=function(Rt){return tt(fe.invert(Rt))},it.domain=function(Rt){return arguments.length?(fe.domain((Ve=Rt.map(Number)).map(Qe)),it):Ve},it.ticks=function(Rt){return ps(Ve,Rt)},it.tickFormat=function(Rt,ht){return d3_scale_linearTickFormat(Ve,Rt,ht)},it.nice=function(Rt){return it.domain(Js(Ve,Rt))},it.exponent=function(Rt){return arguments.length?(Qe=Wu(Ce=Rt),tt=Wu(1/Ce),fe.domain(Ve.map(Qe)),it):Ce},it.copy=function(){return ml(fe.copy(),Ce,Ve)},Ef(it,fe)}function Wu(fe){return function(Ce){return Ce<0?-Math.pow(-Ce,fe):Math.pow(Ce,fe)}}i.scale.sqrt=function(){return i.scale.pow().exponent(.5)},i.scale.ordinal=function(){return es([],{t:"range",a:[[]]})};function es(fe,Ce){var Ve,Qe,tt;function it(ht){return Qe[((Ve.get(ht)||(Ce.t==="range"?Ve.set(ht,fe.push(ht)):NaN))-1)%Qe.length]}function Rt(ht,Ut){return i.range(fe.length).map(function(er){return ht+Ut*er})}return it.domain=function(ht){if(!arguments.length)return fe;fe=[],Ve=new C;for(var Ut=-1,er=ht.length,tr;++Ut0?Ve[it-1]:fe[0],itSr?0:1;if(tr=ot)return Ut(tr,en)+(er?Ut(er,1-en):"")+"Z";var Dr,Ur,Zr,tn,ln=0,Xr=0,Nn,Gn,Kn,na,ba,ma,Ua,Ea,Oa=[];if((tn=(+Rt.apply(this,arguments)||0)/2)&&(Zr=Qe===Qs?Math.sqrt(er*er+tr*tr):+Qe.apply(this,arguments),en||(Xr*=-1),tr&&(Xr=Gt(Zr/tr*Math.sin(tn))),er&&(ln=Gt(Zr/er*Math.sin(tn)))),tr){Nn=tr*Math.cos(Lr+Xr),Gn=tr*Math.sin(Lr+Xr),Kn=tr*Math.cos(Sr-Xr),na=tr*Math.sin(Sr-Xr);var Ja=Math.abs(Sr-Lr-2*Xr)<=Le?0:1;if(Xr&&zs(Nn,Gn,Kn,na)===en^Ja){var ei=(Lr+Sr)/2;Nn=tr*Math.cos(ei),Gn=tr*Math.sin(ei),Kn=na=null}}else Nn=Gn=0;if(er){ba=er*Math.cos(Sr-ln),ma=er*Math.sin(Sr-ln),Ua=er*Math.cos(Lr+ln),Ea=er*Math.sin(Lr+ln);var li=Math.abs(Lr-Sr+2*ln)<=Le?0:1;if(ln&&zs(ba,ma,Ua,Ea)===1-en^li){var Bn=(Lr+Sr)/2;ba=er*Math.cos(Bn),ma=er*Math.sin(Bn),Ua=Ea=null}}else ba=ma=0;if(Kr>se&&(Dr=Math.min(Math.abs(tr-er)/2,+Ve.apply(this,arguments)))>.001){Ur=er0?0:1}function $s(fe,Ce,Ve,Qe,tt){var it=fe[0]-Ce[0],Rt=fe[1]-Ce[1],ht=(tt?Qe:-Qe)/Math.sqrt(it*it+Rt*Rt),Ut=ht*Rt,er=-ht*it,tr=fe[0]+Ut,Lr=fe[1]+er,Sr=Ce[0]+Ut,Kr=Ce[1]+er,en=(tr+Sr)/2,Dr=(Lr+Kr)/2,Ur=Sr-tr,Zr=Kr-Lr,tn=Ur*Ur+Zr*Zr,ln=Ve-Qe,Xr=tr*Kr-Sr*Lr,Nn=(Zr<0?-1:1)*Math.sqrt(Math.max(0,ln*ln*tn-Xr*Xr)),Gn=(Xr*Zr-Ur*Nn)/tn,Kn=(-Xr*Ur-Zr*Nn)/tn,na=(Xr*Zr+Ur*Nn)/tn,ba=(-Xr*Ur+Zr*Nn)/tn,ma=Gn-en,Ua=Kn-Dr,Ea=na-en,Oa=ba-Dr;return ma*ma+Ua*Ua>Ea*Ea+Oa*Oa&&(Gn=na,Kn=ba),[[Gn-Ut,Kn-er],[Gn*Ve/ln,Kn*Ve/ln]]}function bl(){return!0}function wl(fe){var Ce=sa,Ve=ta,Qe=bl,tt=_o,it=tt.key,Rt=.7;function ht(Ut){var er=[],tr=[],Lr=-1,Sr=Ut.length,Kr,en=jr(Ce),Dr=jr(Ve);function Ur(){er.push("M",tt(fe(tr),Rt))}for(;++Lr1?fe.join("L"):fe+"Z"}function Tl(fe){return fe.join("L")+"Z"}function cc(fe){for(var Ce=0,Ve=fe.length,Qe=fe[0],tt=[Qe[0],",",Qe[1]];++Ce1&&tt.push("H",Qe[0]),tt.join("")}function Wl(fe){for(var Ce=0,Ve=fe.length,Qe=fe[0],tt=[Qe[0],",",Qe[1]];++Ce1){ht=Ce[1],it=fe[Ut],Ut++,Qe+="C"+(tt[0]+Rt[0])+","+(tt[1]+Rt[1])+","+(it[0]-ht[0])+","+(it[1]-ht[1])+","+it[0]+","+it[1];for(var er=2;er9&&(it=Ve*3/Math.sqrt(it),Rt[ht]=it*Qe,Rt[ht+1]=it*tt));for(ht=-1;++ht<=Ut;)it=(fe[Math.min(Ut,ht+1)][0]-fe[Math.max(0,ht-1)][0])/(6*(1+Rt[ht]*Rt[ht])),Ce.push([it||0,Rt[ht]*it||0]);return Ce}function kf(fe){return fe.length<3?_o(fe):fe[0]+qs(fe,dc(fe))}i.svg.line.radial=function(){var fe=wl(Ff);return fe.radius=fe.x,delete fe.x,fe.angle=fe.y,delete fe.y,fe};function Ff(fe){for(var Ce,Ve=-1,Qe=fe.length,tt,it;++VeLe)+",1 "+Lr}function er(tr,Lr,Sr,Kr){return"Q 0,0 "+Kr}return it.radius=function(tr){return arguments.length?(Ve=jr(tr),it):Ve},it.source=function(tr){return arguments.length?(fe=jr(tr),it):fe},it.target=function(tr){return arguments.length?(Ce=jr(tr),it):Ce},it.startAngle=function(tr){return arguments.length?(Qe=jr(tr),it):Qe},it.endAngle=function(tr){return arguments.length?(tt=jr(tr),it):tt},it};function pc(fe){return fe.radius}i.svg.diagonal=function(){var fe=Qu,Ce=xu,Ve=bu;function Qe(tt,it){var Rt=fe.call(this,tt,it),ht=Ce.call(this,tt,it),Ut=(Rt.y+ht.y)/2,er=[Rt,{x:Rt.x,y:Ut},{x:ht.x,y:Ut},ht];return er=er.map(Ve),"M"+er[0]+"C"+er[1]+" "+er[2]+" "+er[3]}return Qe.source=function(tt){return arguments.length?(fe=jr(tt),Qe):fe},Qe.target=function(tt){return arguments.length?(Ce=jr(tt),Qe):Ce},Qe.projection=function(tt){return arguments.length?(Ve=tt,Qe):Ve},Qe};function bu(fe){return[fe.x,fe.y]}i.svg.diagonal.radial=function(){var fe=i.svg.diagonal(),Ce=bu,Ve=fe.projection;return fe.projection=function(Qe){return arguments.length?Ve(gc(Ce=Qe)):Ce},fe};function gc(fe){return function(){var Ce=fe.apply(this,arguments),Ve=Ce[0],Qe=Ce[1]-at;return[Ve*Math.cos(Qe),Ve*Math.sin(Qe)]}}i.svg.symbol=function(){var fe=rt,Ce=je;function Ve(Qe,tt){return(gt.get(fe.call(this,Qe,tt))||vt)(Ce.call(this,Qe,tt))}return Ve.type=function(Qe){return arguments.length?(fe=jr(Qe),Ve):fe},Ve.size=function(Qe){return arguments.length?(Ce=jr(Qe),Ve):Ce},Ve};function je(){return 64}function rt(){return"circle"}function vt(fe){var Ce=Math.sqrt(fe/Le);return"M0,"+Ce+"A"+Ce+","+Ce+" 0 1,1 0,"+-Ce+"A"+Ce+","+Ce+" 0 1,1 0,"+Ce+"Z"}var gt=i.map({circle:vt,cross:function(fe){var Ce=Math.sqrt(fe/5)/2;return"M"+-3*Ce+","+-Ce+"H"+-Ce+"V"+-3*Ce+"H"+Ce+"V"+-Ce+"H"+3*Ce+"V"+Ce+"H"+Ce+"V"+3*Ce+"H"+-Ce+"V"+Ce+"H"+-3*Ce+"Z"},diamond:function(fe){var Ce=Math.sqrt(fe/(2*Pt)),Ve=Ce*Pt;return"M0,"+-Ce+"L"+Ve+",0 0,"+Ce+" "+-Ve+",0Z"},square:function(fe){var Ce=Math.sqrt(fe)/2;return"M"+-Ce+","+-Ce+"L"+Ce+","+-Ce+" "+Ce+","+Ce+" "+-Ce+","+Ce+"Z"},"triangle-down":function(fe){var Ce=Math.sqrt(fe/kt),Ve=Ce*kt/2;return"M0,"+Ve+"L"+Ce+","+-Ve+" "+-Ce+","+-Ve+"Z"},"triangle-up":function(fe){var Ce=Math.sqrt(fe/kt),Ve=Ce*kt/2;return"M0,"+-Ve+"L"+Ce+","+Ve+" "+-Ce+","+Ve+"Z"}});i.svg.symbolTypes=gt.keys();var kt=Math.sqrt(3),Pt=Math.tan(30*wt);$.transition=function(fe){for(var Ce=Pr||++Tr,Ve=bn(fe),Qe=[],tt,it,Rt=Yr||{time:Date.now(),ease:eh,delay:0,duration:250},ht=-1,Ut=this.length;++ht0;)Lr[--tn].call(fe,Zr);if(Ur>=1)return Rt.event&&Rt.event.end.call(fe,fe.__data__,Ce),--it.count?delete it[Qe]:delete fe[Ve],1}Rt||(ht=tt.time,Ut=Tn(Sr,0,ht),Rt=it[Qe]={tween:new C,time:ht,timer:Ut,delay:tt.delay,duration:tt.duration,ease:tt.ease,index:Ce},tt=null,++it.count)}i.svg.axis=function(){var fe=i.scale.linear(),Ce=ha,Ve=6,Qe=6,tt=3,it=[10],Rt=null,ht;function Ut(er){er.each(function(){var tr=i.select(this),Lr=this.__chart__||fe,Sr=this.__chart__=fe.copy(),Kr=Rt??(Sr.ticks?Sr.ticks.apply(Sr,it):Sr.domain()),en=ht??(Sr.tickFormat?Sr.tickFormat.apply(Sr,it):O),Dr=tr.selectAll(".tick").data(Kr,Sr),Ur=Dr.enter().insert("g",".domain").attr("class","tick").style("opacity",se),Zr=i.transition(Dr.exit()).style("opacity",se).remove(),tn=i.transition(Dr.order()).style("opacity",1),ln=Math.max(Ve,0)+tt,Xr,Nn=du(Sr),Gn=tr.selectAll(".domain").data([0]),Kn=(Gn.enter().append("path").attr("class","domain"),i.transition(Gn));Ur.append("line"),Ur.append("text");var na=Ur.select("line"),ba=tn.select("line"),ma=Dr.select("text").text(en),Ua=Ur.select("text"),Ea=tn.select("text"),Oa=Ce==="top"||Ce==="left"?-1:1,Ja,ei,li,Bn;if(Ce==="bottom"||Ce==="top"?(Xr=Ra,Ja="x",li="y",ei="x2",Bn="y2",ma.attr("dy",Oa<0?"0em":".71em").style("text-anchor","middle"),Kn.attr("d","M"+Nn[0]+","+Oa*Qe+"V0H"+Nn[1]+"V"+Oa*Qe)):(Xr=Da,Ja="y",li="x",ei="y2",Bn="x2",ma.attr("dy",".32em").style("text-anchor",Oa<0?"end":"start"),Kn.attr("d","M"+Oa*Qe+","+Nn[0]+"H0V"+Nn[1]+"H"+Oa*Qe)),na.attr(Bn,Oa*Ve),Ua.attr(li,Oa*ln),ba.attr(ei,0).attr(Bn,Oa*Ve),Ea.attr(Ja,0).attr(li,Oa*ln),Sr.rangeBand){var Na=Sr,_a=Na.rangeBand()/2;Lr=Sr=function(Ya){return Na(Ya)+_a}}else Lr.rangeBand?Lr=Sr:Zr.call(Xr,Sr,Lr);Ur.call(Xr,Lr,Sr),tn.call(Xr,Sr,Sr)})}return Ut.scale=function(er){return arguments.length?(fe=er,Ut):fe},Ut.orient=function(er){return arguments.length?(Ce=er in Ca?er+"":ha,Ut):Ce},Ut.ticks=function(){return arguments.length?(it=A(arguments),Ut):it},Ut.tickValues=function(er){return arguments.length?(Rt=er,Ut):Rt},Ut.tickFormat=function(er){return arguments.length?(ht=er,Ut):ht},Ut.tickSize=function(er){var tr=arguments.length;return tr?(Ve=+er,Qe=+arguments[tr-1],Ut):Ve},Ut.innerTickSize=function(er){return arguments.length?(Ve=+er,Ut):Ve},Ut.outerTickSize=function(er){return arguments.length?(Qe=+er,Ut):Qe},Ut.tickPadding=function(er){return arguments.length?(tt=+er,Ut):tt},Ut.tickSubdivide=function(){return arguments.length&&Ut},Ut};var ha="bottom",Ca={top:1,right:1,bottom:1,left:1};function Ra(fe,Ce,Ve){fe.attr("transform",function(Qe){var tt=Ce(Qe);return"translate("+(isFinite(tt)?tt:Ve(Qe))+",0)"})}function Da(fe,Ce,Ve){fe.attr("transform",function(Qe){var tt=Ce(Qe);return"translate(0,"+(isFinite(tt)?tt:Ve(Qe))+")"})}i.svg.brush=function(){var fe=Q(tr,"brushstart","brush","brushend"),Ce=null,Ve=null,Qe=[0,0],tt=[0,0],it,Rt,ht=!0,Ut=!0,er=ai[0];function tr(Dr){Dr.each(function(){var Ur=i.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",en).on("touchstart.brush",en),Zr=Ur.selectAll(".background").data([0]);Zr.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),Ur.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var tn=Ur.selectAll(".resize").data(er,O);tn.exit().remove(),tn.enter().append("g").attr("class",function(Gn){return"resize "+Gn}).style("cursor",function(Gn){return ka[Gn]}).append("rect").attr("x",function(Gn){return/[ew]$/.test(Gn)?-3:null}).attr("y",function(Gn){return/^[ns]/.test(Gn)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),tn.style("display",tr.empty()?"none":null);var ln=i.transition(Ur),Xr=i.transition(Zr),Nn;Ce&&(Nn=du(Ce),Xr.attr("x",Nn[0]).attr("width",Nn[1]-Nn[0]),Sr(ln)),Ve&&(Nn=du(Ve),Xr.attr("y",Nn[0]).attr("height",Nn[1]-Nn[0]),Kr(ln)),Lr(ln)})}tr.event=function(Dr){Dr.each(function(){var Ur=fe.of(this,arguments),Zr={x:Qe,y:tt,i:it,j:Rt},tn=this.__chart__||Zr;this.__chart__=Zr,Pr?i.select(this).transition().each("start.brush",function(){it=tn.i,Rt=tn.j,Qe=tn.x,tt=tn.y,Ur({type:"brushstart"})}).tween("brush:brush",function(){var ln=eo(Qe,Zr.x),Xr=eo(tt,Zr.y);return it=Rt=null,function(Nn){Qe=Zr.x=ln(Nn),tt=Zr.y=Xr(Nn),Ur({type:"brush",mode:"resize"})}}).each("end.brush",function(){it=Zr.i,Rt=Zr.j,Ur({type:"brush",mode:"resize"}),Ur({type:"brushend"})}):(Ur({type:"brushstart"}),Ur({type:"brush",mode:"resize"}),Ur({type:"brushend"}))})};function Lr(Dr){Dr.selectAll(".resize").attr("transform",function(Ur){return"translate("+Qe[+/e$/.test(Ur)]+","+tt[+/^s/.test(Ur)]+")"})}function Sr(Dr){Dr.select(".extent").attr("x",Qe[0]),Dr.selectAll(".extent,.n>rect,.s>rect").attr("width",Qe[1]-Qe[0])}function Kr(Dr){Dr.select(".extent").attr("y",tt[0]),Dr.selectAll(".extent,.e>rect,.w>rect").attr("height",tt[1]-tt[0])}function en(){var Dr=this,Ur=i.select(i.event.target),Zr=fe.of(Dr,arguments),tn=i.select(Dr),ln=Ur.datum(),Xr=!/^(n|s)$/.test(ln)&&Ce,Nn=!/^(e|w)$/.test(ln)&&Ve,Gn=Ur.classed("extent"),Kn=Ie(Dr),na,ba=i.mouse(Dr),ma,Ua=i.select(t(Dr)).on("keydown.brush",Ja).on("keyup.brush",ei);if(i.event.changedTouches?Ua.on("touchmove.brush",li).on("touchend.brush",Na):Ua.on("mousemove.brush",li).on("mouseup.brush",Na),tn.interrupt().selectAll("*").interrupt(),Gn)ba[0]=Qe[0]-ba[0],ba[1]=tt[0]-ba[1];else if(ln){var Ea=+/w$/.test(ln),Oa=+/^n/.test(ln);ma=[Qe[1-Ea]-ba[0],tt[1-Oa]-ba[1]],ba[0]=Qe[Ea],ba[1]=tt[Oa]}else i.event.altKey&&(na=ba.slice());tn.style("pointer-events","none").selectAll(".resize").style("display",null),i.select("body").style("cursor",Ur.style("cursor")),Zr({type:"brushstart"}),li();function Ja(){i.event.keyCode==32&&(Gn||(na=null,ba[0]-=Qe[1],ba[1]-=tt[1],Gn=2),ae())}function ei(){i.event.keyCode==32&&Gn==2&&(ba[0]+=Qe[1],ba[1]+=tt[1],Gn=0,ae())}function li(){var _a=i.mouse(Dr),Ya=!1;ma&&(_a[0]+=ma[0],_a[1]+=ma[1]),Gn||(i.event.altKey?(na||(na=[(Qe[0]+Qe[1])/2,(tt[0]+tt[1])/2]),ba[0]=Qe[+(_a[0]>>1,d;g.dtype||(g.dtype="array"),typeof g.dtype=="string"?d=new(r(g.dtype))(o):g.dtype&&(d=g.dtype,Array.isArray(d)&&(d.length=o));for(var M=0;Mf||ae>n){for(var K=0;KUe||oe>He||q=le)&&xe!==Se){var Fe=T[Ee];Se===void 0&&(Se=Fe.length);for(var Ge=xe;Ge=ce&&qe<=Z&&$e>=Q&&$e<=j&&he.push(nt)}var et=C[Ee],ct=et[xe*4+0],dt=et[xe*4+1],pt=et[xe*4+2],At=et[xe*4+3],Mt=Me(et,xe+1),Vt=Ne*.5,Je=Ee+1;me(Te,Oe,Vt,Je,ct,dt||pt||At||Mt),me(Te,Oe+Vt,Vt,Je,dt,pt||At||Mt),me(Te+Vt,Oe,Vt,Je,pt,At||Mt),me(Te+Vt,Oe+Vt,Vt,Je,At,Mt)}}}function Me(Te,Oe){for(var Ne=null,Ee=0;Ne===null;)if(Ne=Te[Oe*4+Ee],Ee++,Ee>Te.length)return null;return Ne}return he}function O(_,U,Y,J,te){for(var ae=[],ce=0;ce0){r+=Math.abs(v(t[0]));for(var s=1;s2){for(g=0;g=0))throw new Error("precision must be a positive number");var E=Math.pow(10,a||0);return Math.round(b*E)/E}V.round=c;function u(b,a){a===void 0&&(a="kilometers");var E=V.factors[a];if(!E)throw new Error(a+" units is invalid");return b*E}V.radiansToLength=u;function g(b,a){a===void 0&&(a="kilometers");var E=V.factors[a];if(!E)throw new Error(a+" units is invalid");return b/E}V.lengthToRadians=g;function f(b,a){return h(g(b,a))}V.lengthToDegrees=f;function w(b){var a=b%360;return a<0&&(a+=360),a}V.bearingToAzimuth=w;function h(b){var a=b%(2*Math.PI);return a*180/Math.PI}V.radiansToDegrees=h;function o(b){var a=b%360;return a*Math.PI/180}V.degreesToRadians=o;function d(b,a,E){if(a===void 0&&(a="kilometers"),E===void 0&&(E="kilometers"),!(b>=0))throw new Error("length must be a positive number");return u(g(b,a),E)}V.convertLength=d;function M(b,a,E){if(a===void 0&&(a="meters"),E===void 0&&(E="kilometers"),!(b>=0))throw new Error("area must be a positive number");var y=V.areaFactors[a];if(!y)throw new Error("invalid original units");var z=V.areaFactors[E];if(!z)throw new Error("invalid final units");return b/y*z}V.convertArea=M;function T(b){return!isNaN(b)&&b!==null&&!Array.isArray(b)}V.isNumber=T;function C(b){return!!b&&b.constructor===Object}V.isObject=C;function x(b){if(!b)throw new Error("bbox is required");if(!Array.isArray(b))throw new Error("bbox must be an Array");if(b.length!==4&&b.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");b.forEach(function(a){if(!T(a))throw new Error("bbox must only contain numbers")})}V.validateBBox=x;function S(b){if(!b)throw new Error("id is required");if(["string","number"].indexOf(typeof b)===-1)throw new Error("id must be a number or a string")}V.validateId=S},60302:function(G,V,e){Object.defineProperty(V,"__esModule",{value:!0});var m=e(23132);function P(o,d,M){if(o!==null)for(var T,C,x,S,b,a,E,y=0,z=0,I,B=o.type,k=B==="FeatureCollection",O=B==="Feature",N=k?o.features.length:1,_=0;_a||k>E||O>y){b=z,a=T,E=k,y=O,x=0;return}var N=m.lineString([b,z],M.properties);if(d(N,T,C,O,x)===!1)return!1;x++,b=z})===!1)return!1}}})}function u(o,d,M){var T=M,C=!1;return c(o,function(x,S,b,a,E){C===!1&&M===void 0?T=x:T=d(T,x,S,b,a,E),C=!0}),T}function g(o,d){if(!o)throw new Error("geojson is required");n(o,function(M,T,C){if(M.geometry!==null){var x=M.geometry.type,S=M.geometry.coordinates;switch(x){case"LineString":if(d(M,T,C,0,0)===!1)return!1;break;case"Polygon":for(var b=0;bA[0]&&(L[0]=A[0]),L[1]>A[1]&&(L[1]=A[1]),L[2]=0))throw new Error("precision must be a positive number");var E=Math.pow(10,a||0);return Math.round(b*E)/E}V.round=c;function u(b,a){a===void 0&&(a="kilometers");var E=V.factors[a];if(!E)throw new Error(a+" units is invalid");return b*E}V.radiansToLength=u;function g(b,a){a===void 0&&(a="kilometers");var E=V.factors[a];if(!E)throw new Error(a+" units is invalid");return b/E}V.lengthToRadians=g;function f(b,a){return h(g(b,a))}V.lengthToDegrees=f;function w(b){var a=b%360;return a<0&&(a+=360),a}V.bearingToAzimuth=w;function h(b){var a=b%(2*Math.PI);return a*180/Math.PI}V.radiansToDegrees=h;function o(b){var a=b%360;return a*Math.PI/180}V.degreesToRadians=o;function d(b,a,E){if(a===void 0&&(a="kilometers"),E===void 0&&(E="kilometers"),!(b>=0))throw new Error("length must be a positive number");return u(g(b,a),E)}V.convertLength=d;function M(b,a,E){if(a===void 0&&(a="meters"),E===void 0&&(E="kilometers"),!(b>=0))throw new Error("area must be a positive number");var y=V.areaFactors[a];if(!y)throw new Error("invalid original units");var z=V.areaFactors[E];if(!z)throw new Error("invalid final units");return b/y*z}V.convertArea=M;function T(b){return!isNaN(b)&&b!==null&&!Array.isArray(b)}V.isNumber=T;function C(b){return!!b&&b.constructor===Object}V.isObject=C;function x(b){if(!b)throw new Error("bbox is required");if(!Array.isArray(b))throw new Error("bbox must be an Array");if(b.length!==4&&b.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");b.forEach(function(a){if(!T(a))throw new Error("bbox must only contain numbers")})}V.validateBBox=x;function S(b){if(!b)throw new Error("id is required");if(["string","number"].indexOf(typeof b)===-1)throw new Error("id must be a number or a string")}V.validateId=S},27138:function(G,V,e){Object.defineProperty(V,"__esModule",{value:!0});var m=e(94228);function P(o,d,M){if(o!==null)for(var T,C,x,S,b,a,E,y=0,z=0,I,B=o.type,k=B==="FeatureCollection",O=B==="Feature",N=k?o.features.length:1,_=0;_a||k>E||O>y){b=z,a=T,E=k,y=O,x=0;return}var N=m.lineString([b,z],M.properties);if(d(N,T,C,O,x)===!1)return!1;x++,b=z})===!1)return!1}}})}function u(o,d,M){var T=M,C=!1;return c(o,function(x,S,b,a,E){C===!1&&M===void 0?T=x:T=d(T,x,S,b,a,E),C=!0}),T}function g(o,d){if(!o)throw new Error("geojson is required");n(o,function(M,T,C){if(M.geometry!==null){var x=M.geometry.type,S=M.geometry.coordinates;switch(x){case"LineString":if(d(M,T,C,0,0)===!1)return!1;break;case"Polygon":for(var b=0;b=0))throw new Error("precision must be a positive number");var N=Math.pow(10,O||0);return Math.round(k*N)/N}V.round=c;function u(k,O){O===void 0&&(O="kilometers");var N=V.factors[O];if(!N)throw new Error(O+" units is invalid");return k*N}V.radiansToLength=u;function g(k,O){O===void 0&&(O="kilometers");var N=V.factors[O];if(!N)throw new Error(O+" units is invalid");return k/N}V.lengthToRadians=g;function f(k,O){return h(g(k,O))}V.lengthToDegrees=f;function w(k){var O=k%360;return O<0&&(O+=360),O}V.bearingToAzimuth=w;function h(k){var O=k%(2*Math.PI);return O*180/Math.PI}V.radiansToDegrees=h;function o(k){var O=k%360;return O*Math.PI/180}V.degreesToRadians=o;function d(k,O,N){if(O===void 0&&(O="kilometers"),N===void 0&&(N="kilometers"),!(k>=0))throw new Error("length must be a positive number");return u(g(k,O),N)}V.convertLength=d;function M(k,O,N){if(O===void 0&&(O="meters"),N===void 0&&(N="kilometers"),!(k>=0))throw new Error("area must be a positive number");var _=V.areaFactors[O];if(!_)throw new Error("invalid original units");var U=V.areaFactors[N];if(!U)throw new Error("invalid final units");return k/_*U}V.convertArea=M;function T(k){return!isNaN(k)&&k!==null&&!Array.isArray(k)&&!/^\s*$/.test(k)}V.isNumber=T;function C(k){return!!k&&k.constructor===Object}V.isObject=C;function x(k){if(!k)throw new Error("bbox is required");if(!Array.isArray(k))throw new Error("bbox must be an Array");if(k.length!==4&&k.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");k.forEach(function(O){if(!T(O))throw new Error("bbox must only contain numbers")})}V.validateBBox=x;function S(k){if(!k)throw new Error("id is required");if(["string","number"].indexOf(typeof k)===-1)throw new Error("id must be a number or a string")}V.validateId=S;function b(){throw new Error("method has been renamed to `radiansToDegrees`")}V.radians2degrees=b;function a(){throw new Error("method has been renamed to `degreesToRadians`")}V.degrees2radians=a;function E(){throw new Error("method has been renamed to `lengthToDegrees`")}V.distanceToDegrees=E;function y(){throw new Error("method has been renamed to `lengthToRadians`")}V.distanceToRadians=y;function z(){throw new Error("method has been renamed to `radiansToLength`")}V.radiansToDistance=z;function I(){throw new Error("method has been renamed to `bearingToAzimuth`")}V.bearingToAngle=I;function B(){throw new Error("method has been renamed to `convertLength`")}V.convertDistance=B},88553:function(G,V,e){Object.defineProperty(V,"__esModule",{value:!0});var m=e(64182);function P(o,d,M){if(o!==null)for(var T,C,x,S,b,a,E,y=0,z=0,I,B=o.type,k=B==="FeatureCollection",O=B==="Feature",N=k?o.features.length:1,_=0;_a||k>E||O>y){b=z,a=T,E=k,y=O,x=0;return}var N=m.lineString([b,z],M.properties);if(d(N,T,C,O,x)===!1)return!1;x++,b=z})===!1)return!1}}})}function u(o,d,M){var T=M,C=!1;return c(o,function(x,S,b,a,E){C===!1&&M===void 0?T=x:T=d(T,x,S,b,a,E),C=!0}),T}function g(o,d){if(!o)throw new Error("geojson is required");n(o,function(M,T,C){if(M.geometry!==null){var x=M.geometry.type,S=M.geometry.coordinates;switch(x){case"LineString":if(d(M,T,C,0,0)===!1)return!1;break;case"Polygon":for(var b=0;bL&&(L=e[v]),e[v]1?ae-1:0),Q=1;Q1?ae-1:0),Q=1;Q1?ae-1:0),Q=1;Q1?ae-1:0),Q=1;Q"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 l(k,O,N){return n()?l=Reflect.construct:l=function(U,Y,J){var te=[null];te.push.apply(te,Y);var ae=Function.bind.apply(U,te),ce=new ae;return J&&u(ce,J.prototype),ce},l.apply(null,arguments)}function c(k){return Function.toString.call(k).indexOf("[native code]")!==-1}function u(k,O){return u=Object.setPrototypeOf||function(_,U){return _.__proto__=U,_},u(k,O)}function g(k){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(N){return N.__proto__||Object.getPrototypeOf(N)},g(k)}function f(k){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(N){return typeof N}:f=function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N},f(k)}var w=e(43827),h=w.inspect,o=e(79616),d=o.codes.ERR_INVALID_ARG_TYPE;function M(k,O,N){return(N===void 0||N>k.length)&&(N=k.length),k.substring(N-O.length,N)===O}function T(k,O){if(O=Math.floor(O),k.length==0||O==0)return"";var N=k.length*O;for(O=Math.floor(Math.log(O)/Math.log(2));O;)k+=k,O--;return k+=k.substring(0,N-k.length),k}var C="",x="",S="",b="",a={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:"},E=10;function y(k){var O=Object.keys(k),N=Object.create(Object.getPrototypeOf(k));return O.forEach(function(_){N[_]=k[_]}),Object.defineProperty(N,"message",{value:k.message}),N}function z(k){return h(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function I(k,O,N){var _="",U="",Y=0,J="",te=!1,ae=z(k),ce=ae.split(` `),Q=z(O).split(` `),Z=0,j="";if(N==="strictEqual"&&f(k)==="object"&&f(O)==="object"&&k!==null&&O!==null&&(N="strictEqualObject"),ce.length===1&&Q.length===1&&ce[0]!==Q[0]){var K=ce[0].length+Q[0].length;if(K<=E){if((f(k)!=="object"||k===null)&&(f(O)!=="object"||O===null)&&(k!==0||O!==0))return"".concat(a[N],` `)+"".concat(ce[0]," !== ").concat(Q[0],` `)}else if(N!=="strictEqualObject"){var ee=m.stderr&&m.stderr.isTTY?m.stderr.columns:80;if(K2&&(j=` `.concat(T(" ",Z),"^"),Z=0)}}}for(var oe=ce[ce.length-1],q=Q[Q.length-1];oe===q&&(Z++<2?J=` `.concat(oe).concat(J):_=oe,ce.pop(),Q.pop(),!(ce.length===0||Q.length===0));)oe=ce[ce.length-1],q=Q[Q.length-1];var $=Math.max(ce.length,Q.length);if($===0){var le=ae.split(` `);if(le.length>30)for(le[26]="".concat(C,"...").concat(b);le.length>27;)le.pop();return"".concat(a.notIdentical,` `).concat(le.join(` `),` `)}Z>3&&(J=` `.concat(C,"...").concat(b).concat(J),te=!0),_!==""&&(J=` `.concat(_).concat(J),_="");var ie=0,he=a[N]+` `.concat(x,"+ actual").concat(b," ").concat(S,"- expected").concat(b),me=" ".concat(C,"...").concat(b," Lines skipped");for(Z=0;Z<$;Z++){var Me=Z-Y;if(ce.length1&&Z>2&&(Me>4?(U+=` `.concat(C,"...").concat(b),te=!0):Me>3&&(U+=` `.concat(Q[Z-2]),ie++),U+=` `.concat(Q[Z-1]),ie++),Y=Z,_+=` `.concat(S,"-").concat(b," ").concat(Q[Z]),ie++;else if(Q.length1&&Z>2&&(Me>4?(U+=` `.concat(C,"...").concat(b),te=!0):Me>3&&(U+=` `.concat(ce[Z-2]),ie++),U+=` `.concat(ce[Z-1]),ie++),Y=Z,U+=` `.concat(x,"+").concat(b," ").concat(ce[Z]),ie++;else{var Te=Q[Z],Oe=ce[Z],Ne=Oe!==Te&&(!M(Oe,",")||Oe.slice(0,-1)!==Te);Ne&&M(Te,",")&&Te.slice(0,-1)===Oe&&(Ne=!1,Oe+=","),Ne?(Me>1&&Z>2&&(Me>4?(U+=` `.concat(C,"...").concat(b),te=!0):Me>3&&(U+=` `.concat(ce[Z-2]),ie++),U+=` `.concat(ce[Z-1]),ie++),Y=Z,U+=` `.concat(x,"+").concat(b," ").concat(Oe),_+=` `.concat(S,"-").concat(b," ").concat(Te),ie+=2):(U+=_,_="",(Me===1||Z===0)&&(U+=` `.concat(Oe),ie++))}if(ie>20&&Z<$-2)return"".concat(he).concat(me,` `).concat(U,` `).concat(C,"...").concat(b).concat(_,` `)+"".concat(C,"...").concat(b)}return"".concat(he).concat(te?me:"",` `).concat(U).concat(_).concat(J).concat(j)}var B=function(k){r(O,k);function O(N){var _;if(L(this,O),f(N)!=="object"||N===null)throw new d("options","Object",N);var U=N.message,Y=N.operator,J=N.stackStartFn,te=N.actual,ae=N.expected,ce=Error.stackTraceLimit;if(Error.stackTraceLimit=0,U!=null)_=p(this,g(O).call(this,String(U)));else if(m.stderr&&m.stderr.isTTY&&(m.stderr&&m.stderr.getColorDepth&&m.stderr.getColorDepth()!==1?(C="\x1B[34m",x="\x1B[32m",b="\x1B[39m",S="\x1B[31m"):(C="",x="",b="",S="")),f(te)==="object"&&te!==null&&f(ae)==="object"&&ae!==null&&"stack"in te&&te instanceof Error&&"stack"in ae&&ae instanceof Error&&(te=y(te),ae=y(ae)),Y==="deepStrictEqual"||Y==="strictEqual")_=p(this,g(O).call(this,I(te,ae,Y)));else if(Y==="notDeepStrictEqual"||Y==="notStrictEqual"){var Q=a[Y],Z=z(te).split(` `);if(Y==="notStrictEqual"&&f(te)==="object"&&te!==null&&(Q=a.notStrictEqualObject),Z.length>30)for(Z[26]="".concat(C,"...").concat(b);Z.length>27;)Z.pop();Z.length===1?_=p(this,g(O).call(this,"".concat(Q," ").concat(Z[0]))):_=p(this,g(O).call(this,"".concat(Q,` `).concat(Z.join(` `),` `)))}else{var j=z(te),K="",ee=a[Y];Y==="notDeepEqual"||Y==="notEqual"?(j="".concat(a[Y],` `).concat(j),j.length>1024&&(j="".concat(j.slice(0,1021),"..."))):(K="".concat(z(ae)),j.length>512&&(j="".concat(j.slice(0,509),"...")),K.length>512&&(K="".concat(K.slice(0,509),"...")),Y==="deepEqual"||Y==="equal"?j="".concat(ee,` `).concat(j,` should equal `):K=" ".concat(Y," ").concat(K)),_=p(this,g(O).call(this,"".concat(j).concat(K)))}return Error.stackTraceLimit=ce,_.generatedMessage=!U,Object.defineProperty(t(_),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),_.code="ERR_ASSERTION",_.actual=te,_.expected=ae,_.operator=Y,Error.captureStackTrace&&Error.captureStackTrace(t(_),J),_.stack,_.name="AssertionError",p(_)}return v(O,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:h.custom,value:function(_,U){return h(this,P({},U,{customInspect:!1,depth:0}))}}]),O}(s(Error));G.exports=B},79616:function(G,V,e){function m(f){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?m=function(h){return typeof h}:m=function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},m(f)}function P(f,w){if(!(f instanceof w))throw new TypeError("Cannot call a class as a function")}function i(f,w){return w&&(m(w)==="object"||typeof w=="function")?w:L(f)}function L(f){if(f===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f}function A(f){return A=Object.setPrototypeOf?Object.getPrototypeOf:function(h){return h.__proto__||Object.getPrototypeOf(h)},A(f)}function v(f,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");f.prototype=Object.create(w&&w.prototype,{constructor:{value:f,writable:!0,configurable:!0}}),w&&p(f,w)}function p(f,w){return p=Object.setPrototypeOf||function(o,d){return o.__proto__=d,o},p(f,w)}var t={},r,s;function n(f,w,h){h||(h=Error);function o(M,T,C){return typeof w=="string"?w:w(M,T,C)}var d=function(M){v(T,M);function T(C,x,S){var b;return P(this,T),b=i(this,A(T).call(this,o(C,x,S))),b.code=f,b}return T}(h);t[f]=d}function l(f,w){if(Array.isArray(f)){var h=f.length;return f=f.map(function(o){return String(o)}),h>2?"one of ".concat(w," ").concat(f.slice(0,h-1).join(", "),", or ")+f[h-1]:h===2?"one of ".concat(w," ").concat(f[0]," or ").concat(f[1]):"of ".concat(w," ").concat(f[0])}else return"of ".concat(w," ").concat(String(f))}function c(f,w,h){return f.substr(!h||h<0?0:+h,w.length)===w}function u(f,w,h){return(h===void 0||h>f.length)&&(h=f.length),f.substring(h-w.length,h)===w}function g(f,w,h){return typeof h!="number"&&(h=0),h+w.length>f.length?!1:f.indexOf(w,h)!==-1}n("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),n("ERR_INVALID_ARG_TYPE",function(f,w,h){r===void 0&&(r=e(32791)),r(typeof f=="string","'name' must be a string");var o;typeof w=="string"&&c(w,"not ")?(o="must not be",w=w.replace(/^not /,"")):o="must be";var d;if(u(f," argument"))d="The ".concat(f," ").concat(o," ").concat(l(w,"type"));else{var M=g(f,".")?"property":"argument";d='The "'.concat(f,'" ').concat(M," ").concat(o," ").concat(l(w,"type"))}return d+=". Received type ".concat(m(h)),d},TypeError),n("ERR_INVALID_ARG_VALUE",function(f,w){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";s===void 0&&(s=e(43827));var o=s.inspect(w);return o.length>128&&(o="".concat(o.slice(0,128),"...")),"The argument '".concat(f,"' ").concat(h,". Received ").concat(o)},TypeError),n("ERR_INVALID_RETURN_VALUE",function(f,w,h){var o;return h&&h.constructor&&h.constructor.name?o="instance of ".concat(h.constructor.name):o="type ".concat(m(h)),"Expected ".concat(f,' to be returned from the "').concat(w,'"')+" function but got ".concat(o,".")},TypeError),n("ERR_MISSING_ARGS",function(){for(var f=arguments.length,w=new Array(f),h=0;h0,"At least one arg needs to be specified");var o="The ",d=w.length;switch(w=w.map(function(M){return'"'.concat(M,'"')}),d){case 1:o+="".concat(w[0]," argument");break;case 2:o+="".concat(w[0]," and ").concat(w[1]," arguments");break;default:o+=w.slice(0,d-1).join(", "),o+=", and ".concat(w[d-1]," arguments");break}return"".concat(o," must be specified")},TypeError),G.exports.codes=t},74061:function(G,V,e){function m(Ee,xe){return L(Ee)||i(Ee,xe)||P()}function P(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function i(Ee,xe){var Se=[],Ue=!0,He=!1,Fe=void 0;try{for(var Ge=Ee[Symbol.iterator](),nt;!(Ue=(nt=Ge.next()).done)&&(Se.push(nt.value),!(xe&&Se.length===xe));Ue=!0);}catch(qe){He=!0,Fe=qe}finally{try{!Ue&&Ge.return!=null&&Ge.return()}finally{if(He)throw Fe}}return Se}function L(Ee){if(Array.isArray(Ee))return Ee}function A(Ee){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?A=function(Se){return typeof Se}:A=function(Se){return Se&&typeof Symbol=="function"&&Se.constructor===Symbol&&Se!==Symbol.prototype?"symbol":typeof Se},A(Ee)}var v=/a/g.flags!==void 0,p=function(xe){var Se=[];return xe.forEach(function(Ue){return Se.push(Ue)}),Se},t=function(xe){var Se=[];return xe.forEach(function(Ue,He){return Se.push([He,Ue])}),Se},r=Object.is?Object.is:e(64003),s=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},n=Number.isNaN?Number.isNaN:e(15567);function l(Ee){return Ee.call.bind(Ee)}var c=l(Object.prototype.hasOwnProperty),u=l(Object.prototype.propertyIsEnumerable),g=l(Object.prototype.toString),f=e(43827).types,w=f.isAnyArrayBuffer,h=f.isArrayBufferView,o=f.isDate,d=f.isMap,M=f.isRegExp,T=f.isSet,C=f.isNativeError,x=f.isBoxedPrimitive,S=f.isNumberObject,b=f.isStringObject,a=f.isBooleanObject,E=f.isBigIntObject,y=f.isSymbolObject,z=f.isFloat32Array,I=f.isFloat64Array;function B(Ee){if(Ee.length===0||Ee.length>10)return!0;for(var xe=0;xe57)return!0}return Ee.length===10&&Ee>=Math.pow(2,32)}function k(Ee){return Object.keys(Ee).filter(B).concat(s(Ee).filter(Object.prototype.propertyIsEnumerable.bind(Ee)))}/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */function O(Ee,xe){if(Ee===xe)return 0;for(var Se=Ee.length,Ue=xe.length,He=0,Fe=Math.min(Se,Ue);He0)throw new Error("Invalid string. Length must be a multiple of 4");var g=c.indexOf("=");g===-1&&(g=u);var f=g===u?0:4-g%4;return[g,f]}function p(c){var u=v(c),g=u[0],f=u[1];return(g+f)*3/4-f}function t(c,u,g){return(u+g)*3/4-g}function r(c){var u,g=v(c),f=g[0],w=g[1],h=new P(t(c,f,w)),o=0,d=w>0?f-4:f,M;for(M=0;M>16&255,h[o++]=u>>8&255,h[o++]=u&255;return w===2&&(u=m[c.charCodeAt(M)]<<2|m[c.charCodeAt(M+1)]>>4,h[o++]=u&255),w===1&&(u=m[c.charCodeAt(M)]<<10|m[c.charCodeAt(M+1)]<<4|m[c.charCodeAt(M+2)]>>2,h[o++]=u>>8&255,h[o++]=u&255),h}function s(c){return e[c>>18&63]+e[c>>12&63]+e[c>>6&63]+e[c&63]}function n(c,u,g){for(var f,w=[],h=u;hd?d:o+h));return f===1?(u=c[g-1],w.push(e[u>>2]+e[u<<4&63]+"==")):f===2&&(u=(c[g-2]<<8)+c[g-1],w.push(e[u>>10]+e[u>>4&63]+e[u<<2&63]+"=")),w.join("")}},91358:function(G){function V(A,v,p,t,r){for(var s=r+1;t<=r;){var n=t+r>>>1,l=A[n],c=p!==void 0?p(l,v):l-v;c>=0?(s=n,r=n-1):t=n+1}return s}function e(A,v,p,t,r){for(var s=r+1;t<=r;){var n=t+r>>>1,l=A[n],c=p!==void 0?p(l,v):l-v;c>0?(s=n,r=n-1):t=n+1}return s}function m(A,v,p,t,r){for(var s=t-1;t<=r;){var n=t+r>>>1,l=A[n],c=p!==void 0?p(l,v):l-v;c<0?(s=n,t=n+1):r=n-1}return s}function P(A,v,p,t,r){for(var s=t-1;t<=r;){var n=t+r>>>1,l=A[n],c=p!==void 0?p(l,v):l-v;c<=0?(s=n,t=n+1):r=n-1}return s}function i(A,v,p,t,r){for(;t<=r;){var s=t+r>>>1,n=A[s],l=p!==void 0?p(n,v):n-v;if(l===0)return s;l<=0?t=s+1:r=s-1}return-1}function L(A,v,p,t,r,s){return typeof p=="function"?s(A,v,p,t===void 0?0:t|0,r===void 0?A.length-1:r|0):s(A,v,void 0,p===void 0?0:p|0,t===void 0?A.length-1:t|0)}G.exports={ge:function(A,v,p,t,r){return L(A,v,p,t,r,V)},gt:function(A,v,p,t,r){return L(A,v,p,t,r,e)},lt:function(A,v,p,t,r){return L(A,v,p,t,r,m)},le:function(A,v,p,t,r){return L(A,v,p,t,r,P)},eq:function(A,v,p,t,r){return L(A,v,p,t,r,i)}}},13547:function(G,V){"use restrict";var e=32;V.INT_BITS=e,V.INT_MAX=2147483647,V.INT_MIN=-1<0)-(i<0)},V.abs=function(i){var L=i>>e-1;return(i^L)-L},V.min=function(i,L){return L^(i^L)&-(i65535)<<4,i>>>=L,A=(i>255)<<3,i>>>=A,L|=A,A=(i>15)<<2,i>>>=A,L|=A,A=(i>3)<<1,i>>>=A,L|=A,L|i>>1},V.log10=function(i){return i>=1e9?9:i>=1e8?8:i>=1e7?7:i>=1e6?6:i>=1e5?5:i>=1e4?4:i>=1e3?3:i>=100?2:i>=10?1:0},V.popCount=function(i){return i=i-(i>>>1&1431655765),i=(i&858993459)+(i>>>2&858993459),(i+(i>>>4)&252645135)*16843009>>>24};function m(i){var L=32;return i&=-i,i&&L--,i&65535&&(L-=16),i&16711935&&(L-=8),i&252645135&&(L-=4),i&858993459&&(L-=2),i&1431655765&&(L-=1),L}V.countTrailingZeros=m,V.nextPow2=function(i){return i+=i===0,--i,i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i+1},V.prevPow2=function(i){return i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i-(i>>>1)},V.parity=function(i){return i^=i>>>16,i^=i>>>8,i^=i>>>4,i&=15,27030>>>i&1};var P=new Array(256);(function(i){for(var L=0;L<256;++L){var A=L,v=L,p=7;for(A>>>=1;A;A>>>=1)v<<=1,v|=A&1,--p;i[L]=v<>>8&255]<<16|P[i>>>16&255]<<8|P[i>>>24&255]},V.interleave2=function(i,L){return i&=65535,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,L&=65535,L=(L|L<<8)&16711935,L=(L|L<<4)&252645135,L=(L|L<<2)&858993459,L=(L|L<<1)&1431655765,i|L<<1},V.deinterleave2=function(i,L){return i=i>>>L&1431655765,i=(i|i>>>1)&858993459,i=(i|i>>>2)&252645135,i=(i|i>>>4)&16711935,i=(i|i>>>16)&65535,i<<16>>16},V.interleave3=function(i,L,A){return i&=1023,i=(i|i<<16)&4278190335,i=(i|i<<8)&251719695,i=(i|i<<4)&3272356035,i=(i|i<<2)&1227133513,L&=1023,L=(L|L<<16)&4278190335,L=(L|L<<8)&251719695,L=(L|L<<4)&3272356035,L=(L|L<<2)&1227133513,i|=L<<1,A&=1023,A=(A|A<<16)&4278190335,A=(A|A<<8)&251719695,A=(A|A<<4)&3272356035,A=(A|A<<2)&1227133513,i|A<<2},V.deinterleave3=function(i,L){return i=i>>>L&1227133513,i=(i|i>>>2)&3272356035,i=(i|i>>>4)&251719695,i=(i|i>>>8)&4278190335,i=(i|i>>>16)&1023,i<<22>>22},V.nextCombination=function(i){var L=i|i-1;return L+1|(~L&-~L)-1>>>m(i)+1}},44781:function(G,V,e){var m=e(53435);G.exports=i;var P=1e20;function i(v,p){p||(p={});var t=p.cutoff==null?.25:p.cutoff,r=p.radius==null?8:p.radius,s=p.channel||0,n,l,c,u,g,f,w,h,o,d,M;if(ArrayBuffer.isView(v)||Array.isArray(v)){if(!p.width||!p.height)throw Error("For raw data width and height should be provided by options");n=p.width,l=p.height,u=v,p.stride?f=p.stride:f=Math.floor(v.length/n/l)}else window.HTMLCanvasElement&&v instanceof window.HTMLCanvasElement?(h=v,w=h.getContext("2d"),n=h.width,l=h.height,o=w.getImageData(0,0,n,l),u=o.data,f=4):window.CanvasRenderingContext2D&&v instanceof window.CanvasRenderingContext2D?(h=v.canvas,w=v,n=h.width,l=h.height,o=w.getImageData(0,0,n,l),u=o.data,f=4):window.ImageData&&v instanceof window.ImageData&&(o=v,n=v.width,l=v.height,u=o.data,f=4);if(c=Math.max(n,l),window.Uint8ClampedArray&&u instanceof window.Uint8ClampedArray||window.Uint8Array&&u instanceof window.Uint8Array)for(g=u,u=Array(n*l),d=0,M=g.length;d-1?P(p):p}},68222:function(G,V,e){var m=e(77575),P=e(68318),i=P("%Function.prototype.apply%"),L=P("%Function.prototype.call%"),A=P("%Reflect.apply%",!0)||m.call(L,i),v=P("%Object.getOwnPropertyDescriptor%",!0),p=P("%Object.defineProperty%",!0),t=P("%Math.max%");if(p)try{p({},"a",{value:1})}catch{p=null}G.exports=function(n){var l=A(m,L,arguments);if(v&&p){var c=v(l,"length");c.configurable&&p(l,"length",{value:1+t(0,n.length-(arguments.length-1))})}return l};var r=function(){return A(m,i,arguments)};p?p(G.exports,"apply",{value:r}):G.exports.apply=r},53435:function(G){G.exports=V;function V(e,m,P){return mP?P:e:em?m:e}},6475:function(G,V,e){var m=e(53435);G.exports=P,G.exports.to=P,G.exports.from=i;function P(L,A){A==null&&(A=!0);var v=L[0],p=L[1],t=L[2],r=L[3];r==null&&(r=A?1:255),A&&(v*=255,p*=255,t*=255,r*=255),v=m(v,0,255)&255,p=m(p,0,255)&255,t=m(t,0,255)&255,r=m(r,0,255)&255;var s=v*16777216+(p<<16)+(t<<8)+r;return s}function i(L,A){L=+L;var v=L>>>24,p=(L&16711680)>>>16,t=(L&65280)>>>8,r=L&255;return A===!1?[v,p,t,r]:[v/255,p/255,t/255,r/255]}},76857:function(G){G.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(G,V,e){var m=e(36652),P=e(53435),i=e(90660);G.exports=function(v,p){(p==="float"||!p)&&(p="array"),p==="uint"&&(p="uint8"),p==="uint_clamped"&&(p="uint8_clamped");var t=i(p),r=new t(4),s=p!=="uint8"&&p!=="uint8_clamped";return(!v.length||typeof v=="string")&&(v=m(v),v[0]/=255,v[1]/=255,v[2]/=255),L(v)?(r[0]=v[0],r[1]=v[1],r[2]=v[2],r[3]=v[3]!=null?v[3]:255,s&&(r[0]/=255,r[1]/=255,r[2]/=255,r[3]/=255),r):(s?(r[0]=v[0],r[1]=v[1],r[2]=v[2],r[3]=v[3]!=null?v[3]:1):(r[0]=P(Math.floor(v[0]*255),0,255),r[1]=P(Math.floor(v[1]*255),0,255),r[2]=P(Math.floor(v[2]*255),0,255),r[3]=v[3]==null?255:P(Math.floor(v[3]*255),0,255)),r)};function L(A){return!!(A instanceof Uint8Array||A instanceof Uint8ClampedArray||Array.isArray(A)&&(A[0]>1||A[0]===0)&&(A[1]>1||A[1]===0)&&(A[2]>1||A[2]===0)&&(!A[3]||A[3]>1))}},90736:function(G,V,e){var m=e(76857),P=e(10973),i=e(46775);G.exports=A;var L={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function A(v){var p,t=[],r=1,s;if(typeof v=="string")if(m[v])t=m[v].slice(),s="rgb";else if(v==="transparent")r=0,s="rgb",t=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(v)){var n=v.slice(1),l=n.length,c=l<=4;r=1,c?(t=[parseInt(n[0]+n[0],16),parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16)],l===4&&(r=parseInt(n[3]+n[3],16)/255)):(t=[parseInt(n[0]+n[1],16),parseInt(n[2]+n[3],16),parseInt(n[4]+n[5],16)],l===8&&(r=parseInt(n[6]+n[7],16)/255)),t[0]||(t[0]=0),t[1]||(t[1]=0),t[2]||(t[2]=0),s="rgb"}else if(p=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(v)){var u=p[1],g=u==="rgb",n=u.replace(/a$/,"");s=n;var l=n==="cmyk"?4:n==="gray"?1:3;t=p[2].trim().split(/\s*,\s*/).map(function(o,d){if(/%$/.test(o))return d===l?parseFloat(o)/100:n==="rgb"?parseFloat(o)*255/100:parseFloat(o);if(n[d]==="h"){if(/deg$/.test(o))return parseFloat(o);if(L[o]!==void 0)return L[o]}return parseFloat(o)}),u===n&&t.push(1),r=g||t[l]===void 0?1:t[l],t=t.slice(0,l)}else v.length>10&&/[0-9](?:\s|\/)/.test(v)&&(t=v.match(/([0-9]+)/g).map(function(w){return parseFloat(w)}),s=v.match(/([a-z])/ig).join("").toLowerCase());else if(!isNaN(v))s="rgb",t=[v>>>16,(v&65280)>>>8,v&255];else if(P(v)){var f=i(v.r,v.red,v.R,null);f!==null?(s="rgb",t=[f,i(v.g,v.green,v.G),i(v.b,v.blue,v.B)]):(s="hsl",t=[i(v.h,v.hue,v.H),i(v.s,v.saturation,v.S),i(v.l,v.lightness,v.L,v.b,v.brightness)]),r=i(v.a,v.alpha,v.opacity,1),v.opacity!=null&&(r/=100)}else(Array.isArray(v)||e.g.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(v))&&(t=[v[0],v[1],v[2]],s="rgb",r=v.length===4?v[3]:1);return{space:s,values:t,alpha:r}}},36652:function(G,V,e){var m=e(90736),P=e(80009),i=e(53435);G.exports=function(A){var v,p=m(A);return p.space?(v=Array(3),v[0]=i(p.values[0],0,255),v[1]=i(p.values[1],0,255),v[2]=i(p.values[2],0,255),p.space[0]==="h"&&(v=P.rgb(v)),v.push(i(p.alpha,0,1)),v):[]}},80009:function(G,V,e){var m=e(6866);G.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(P){var i=P[0]/360,L=P[1]/100,A=P[2]/100,v,p,t,r,s;if(L===0)return s=A*255,[s,s,s];A<.5?p=A*(1+L):p=A+L-A*L,v=2*A-p,r=[0,0,0];for(var n=0;n<3;n++)t=i+.3333333333333333*-(n-1),t<0?t++:t>1&&t--,6*t<1?s=v+(p-v)*6*t:2*t<1?s=p:3*t<2?s=v+(p-v)*(.6666666666666666-t)*6:s=v,r[n]=s*255;return r}},m.hsl=function(P){var i=P[0]/255,L=P[1]/255,A=P[2]/255,v=Math.min(i,L,A),p=Math.max(i,L,A),t=p-v,r,s,n;return p===v?r=0:i===p?r=(L-A)/t:L===p?r=2+(A-i)/t:A===p&&(r=4+(i-L)/t),r=Math.min(r*60,360),r<0&&(r+=360),n=(v+p)/2,p===v?s=0:n<=.5?s=t/(p+v):s=t/(2-p-v),[r,s*100,n*100]}},6866:function(G){G.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},24138:function(G){G.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(G,V,e){G.exports={parse:e(41004),stringify:e(53313)}},63625:function(G,V,e){var m=e(40402);G.exports={isSize:function(i){return/^[\d\.]/.test(i)||i.indexOf("/")!==-1||m.indexOf(i)!==-1}}},41004:function(G,V,e){var m=e(90448),P=e(38732),i=e(41901),L=e(15659),A=e(96209),v=e(83794),p=e(99011),t=e(63625).isSize;G.exports=s;var r=s.cache={};function s(l){if(typeof l!="string")throw new Error("Font argument must be a string.");if(r[l])return r[l];if(l==="")throw new Error("Cannot parse an empty string.");if(i.indexOf(l)!==-1)return r[l]={system:l};for(var c={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},u=p(l,/\s+/),g;g=u.shift();){if(P.indexOf(g)!==-1)return["style","variant","weight","stretch"].forEach(function(w){c[w]=g}),r[l]=c;if(A.indexOf(g)!==-1){c.style=g;continue}if(g==="normal"||g==="small-caps"){c.variant=g;continue}if(v.indexOf(g)!==-1){c.stretch=g;continue}if(L.indexOf(g)!==-1){c.weight=g;continue}if(t(g)){var f=p(g,"/");if(c.size=f[0],f[1]!=null?c.lineHeight=n(f[1]):u[0]==="/"&&(u.shift(),c.lineHeight=n(u.shift())),!u.length)throw new Error("Missing required font-family.");return c.family=p(u.join(" "),/\s*,\s*/).map(m),r[l]=c}throw new Error("Unknown or unsupported font token: "+g)}throw new Error("Missing required font-size.")}function n(l){var c=parseFloat(l);return c.toString()===l?c:l}},53313:function(G,V,e){var m=e(71299),P=e(63625).isSize,i=l(e(38732)),L=l(e(41901)),A=l(e(15659)),v=l(e(96209)),p=l(e(83794)),t={normal:1,"small-caps":1},r={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},s={style:"normal",variant:"normal",weight:"normal",stretch:"normal",size:"1rem",lineHeight:"normal",family:"serif"};G.exports=function(u){if(u=m(u,{style:"style fontstyle fontStyle font-style slope distinction",variant:"variant font-variant fontVariant fontvariant var capitalization",weight:"weight w font-weight fontWeight fontweight",stretch:"stretch font-stretch fontStretch fontstretch width",size:"size s font-size fontSize fontsize height em emSize",lineHeight:"lh line-height lineHeight lineheight leading",family:"font family fontFamily font-family fontfamily type typeface face",system:"system reserved default global"}),u.system)return u.system&&n(u.system,L),u.system;if(n(u.style,v),n(u.variant,t),n(u.weight,A),n(u.stretch,p),u.size==null&&(u.size=s.size),typeof u.size=="number"&&(u.size+="px"),!P)throw Error("Bad size value `"+u.size+"`");u.family||(u.family=s.family),Array.isArray(u.family)&&(u.family.length||(u.family=[s.family]),u.family=u.family.map(function(f){return r[f]?f:'"'+f+'"'}).join(", "));var g=[];return g.push(u.style),u.variant!==u.style&&g.push(u.variant),u.weight!==u.variant&&u.weight!==u.style&&g.push(u.weight),u.stretch!==u.weight&&u.stretch!==u.variant&&u.stretch!==u.style&&g.push(u.stretch),g.push(u.size+(u.lineHeight==null||u.lineHeight==="normal"||u.lineHeight+""=="1"?"":"/"+u.lineHeight)),g.push(u.family),g.filter(Boolean).join(" ")};function n(c,u){if(c&&!u[c]&&!i[c])throw Error("Unknown keyword `"+c+"`");return c}function l(c){for(var u={},g=0;gl?1:n>=l?0:NaN}function P(n){return n.length===1&&(n=i(n)),{left:function(l,c,u,g){for(u==null&&(u=0),g==null&&(g=l.length);u>>1;n(l[f],c)<0?u=f+1:g=f}return u},right:function(l,c,u,g){for(u==null&&(u=0),g==null&&(g=l.length);u>>1;n(l[f],c)>0?g=f:u=f+1}return u}}}function i(n){return function(l,c){return m(n(l),c)}}P(m);function L(n,l){var c=n.length,u=-1,g,f;if(l==null){for(;++u=g)for(f=g;++uf&&(f=g)}else for(;++u=g)for(f=g;++uf&&(f=g);return f}function A(n){return n===null?NaN:+n}function v(n,l){var c=n.length,u=c,g=-1,f,w=0;if(l==null)for(;++g=0;)for(w=n[l],c=w.length;--c>=0;)f[--g]=w[c];return f}function t(n,l){var c=n.length,u=-1,g,f;if(l==null){for(;++u=g)for(f=g;++ug&&(f=g)}else for(;++u=g)for(f=g;++ug&&(f=g);return f}function r(n,l,c){n=+n,l=+l,c=(g=arguments.length)<2?(l=n,n=0,1):g<3?1:+c;for(var u=-1,g=Math.max(0,Math.ceil((l-n)/c))|0,f=new Array(g);++u=l.length)return u!=null&&o.sort(u),g!=null?g(o):o;for(var C=-1,x=o.length,S=l[d++],b,a,E=L(),y,z=M();++Cl.length)return o;var M,T=c[d-1];return g!=null&&d>=l.length?M=o.entries():(M=[],o.each(function(C,x){M.push({key:x,values:h(C,d)})})),T!=null?M.sort(function(C,x){return T(C.key,x.key)}):M}return f={object:function(o){return w(o,0,v,p)},map:function(o){return w(o,0,t,r)},entries:function(o){return h(w(o,0,t,r),0)},key:function(o){return l.push(o),f},sortKeys:function(o){return c[l.length-1]=o,f},sortValues:function(o){return u=o,f},rollup:function(o){return g=o,f}}}function v(){return{}}function p(l,c,u){l[c]=u}function t(){return L()}function r(l,c,u){l.set(c,u)}function s(){}var n=L.prototype;s.prototype={constructor:s,has:n.has,add:function(l){return l+="",this[m+l]=l,this},remove:n.remove,clear:n.clear,values:n.keys,size:n.size,empty:n.empty,each:n.each}},49887:function(G,V,e){e.r(V),e.d(V,{forceCenter:function(){return m},forceCollide:function(){return E},forceLink:function(){return B},forceManyBody:function(){return Ge},forceRadial:function(){return nt},forceSimulation:function(){return Fe},forceX:function(){return qe},forceY:function(){return $e}});function m(et,ct){var dt;et==null&&(et=0),ct==null&&(ct=0);function pt(){var At,Mt=dt.length,Vt,Je=0,De=0;for(At=0;At=(Pe=(Je+Ie)/2))?Je=Pe:Ie=Pe,(Be=dt>=(be=(De+ze)/2))?De=be:ze=be,At=Mt,!(Mt=Mt[ot=Be<<1|Le]))return At[ot]=Vt,et;if(se=+et._x.call(null,Mt.data),ye=+et._y.call(null,Mt.data),ct===se&&dt===ye)return Vt.next=Mt,At?At[ot]=Vt:et._root=Vt,et;do At=At?At[ot]=new Array(4):et._root=new Array(4),(Le=ct>=(Pe=(Je+Ie)/2))?Je=Pe:Ie=Pe,(Be=dt>=(be=(De+ze)/2))?De=be:ze=be;while((ot=Be<<1|Le)===(at=(ye>=be)<<1|se>=Pe));return At[at]=Mt,At[ot]=Vt,et}function v(et){var ct,dt,pt=et.length,At,Mt,Vt=new Array(pt),Je=new Array(pt),De=1/0,Ie=1/0,ze=-1/0,Pe=-1/0;for(dt=0;dtze&&(ze=At),MtPe&&(Pe=Mt));if(De>ze||Ie>Pe)return this;for(this.cover(De,Ie).cover(ze,Pe),dt=0;dtet||et>=At||pt>ct||ct>=Mt;)switch(Ie=(ctze||(Je=ye.y0)>Pe||(De=ye.x1)=ot)<<1|et>=Be)&&(ye=be[be.length-1],be[be.length-1]=be[be.length-1-Le],be[be.length-1-Le]=ye)}else{var at=et-+this._x.call(null,se.data),wt=ct-+this._y.call(null,se.data),It=at*at+wt*wt;if(It=(be=(Vt+De)/2))?Vt=be:De=be,(Le=Pe>=(se=(Je+Ie)/2))?Je=se:Ie=se,ct=dt,!(dt=dt[Be=Le<<1|ye]))return this;if(!dt.length)break;(ct[Be+1&3]||ct[Be+2&3]||ct[Be+3&3])&&(pt=ct,ot=Be)}for(;dt.data!==et;)if(At=dt,!(dt=dt.next))return this;return(Mt=dt.next)&&delete dt.next,At?(Mt?At.next=Mt:delete At.next,this):ct?(Mt?ct[Be]=Mt:delete ct[Be],(dt=ct[0]||ct[1]||ct[2]||ct[3])&&dt===(ct[3]||ct[2]||ct[1]||ct[0])&&!dt.length&&(pt?pt[ot]=dt:this._root=dt),this):(this._root=Mt,this)}function c(et){for(var ct=0,dt=et.length;ctPe.index){var _r=be-Lt.x-Lt.vx,yt=se-Lt.y-Lt.vy,jt=_r*_r+yt*yt;jtbe+ir||Btse+ir||GtDe.r&&(De.r=De[Ie].r)}function Je(){if(ct){var De,Ie=ct.length,ze;for(dt=new Array(Ie),De=0;De=0&&(pt=dt.slice(At+1),dt=dt.slice(0,At)),dt&&!ct.hasOwnProperty(dt))throw new Error("unknown type: "+dt);return{type:dt,name:pt}})}N.prototype=O.prototype={constructor:N,on:function(et,ct){var dt=this._,pt=_(et+"",dt),At,Mt=-1,Vt=pt.length;if(arguments.length<2){for(;++Mt0)for(var dt=new Array(At),pt=0,At,Mt;pt=0&&et._call.call(null,ct),et=et._next;--te}function Te(){ee=(K=q.now())+oe,te=ae=0;try{Me()}finally{te=0,Ne(),ee=0}}function Oe(){var et=q.now(),ct=et-K;ct>Q&&(oe-=ct,K=et)}function Ne(){for(var et,ct=Z,dt,pt=1/0;ct;)ct._call?(pt>ct._time&&(pt=ct._time),et=ct,ct=ct._next):(dt=ct._next,ct._next=null,ct=et?et._next=dt:Z=dt);j=et,Ee(pt)}function Ee(et){if(!te){ae&&(ae=clearTimeout(ae));var ct=et-ee;ct>24?(et<1/0&&(ae=setTimeout(Te,et-q.now()-oe)),ce&&(ce=clearInterval(ce))):(ce||(K=q.now(),ce=setInterval(Oe,Q)),te=1,$(Te))}}function xe(et){return et.x}function Se(et){return et.y}var Ue=10,He=Math.PI*(3-Math.sqrt(5));function Fe(et){var ct,dt=1,pt=.001,At=1-Math.pow(pt,1/300),Mt=0,Vt=.6,Je=(0,y.UI)(),De=me(ze),Ie=J("tick","end");et==null&&(et=[]);function ze(){Pe(),Ie.call("tick",ct),dt1?(Le==null?Je.remove(ye):Je.set(ye,se(Le)),ct):Je.get(ye)},find:function(ye,Le,Be){var ot=0,at=et.length,wt,It,Bt,Gt,Lt;for(Be==null?Be=1/0:Be*=Be,ot=0;ot1?(Ie.on(ye,Le),ct):Ie.on(ye)}}}function Ge(){var et,ct,dt,pt=P(-30),At,Mt=1,Vt=1/0,Je=.81;function De(be){var se,ye=et.length,Le=T(et,xe,Se).visitAfter(ze);for(dt=be,se=0;se=Vt)return;(be.data!==ct||be.next)&&(Be===0&&(Be=i(),wt+=Be*Be),ot===0&&(ot=i(),wt+=ot*ot),wt=1e21?M.toLocaleString("en").replace(/,/g,""):M.toString(10)}function P(M,T){if((C=(M=T?M.toExponential(T-1):M.toExponential()).indexOf("e"))<0)return null;var C,x=M.slice(0,C);return[x.length>1?x[0]+x.slice(2):x,+M.slice(C+1)]}function i(M){return M=P(Math.abs(M)),M?M[1]:NaN}function L(M,T){return function(C,x){for(var S=C.length,b=[],a=0,E=M[0],y=0;S>0&&E>0&&(y+E+1>x&&(E=Math.max(1,x-y)),b.push(C.substring(S-=E,S+E)),!((y+=E+1)>x));)E=M[a=(a+1)%M.length];return b.reverse().join(T)}}function A(M){return function(T){return T.replace(/[0-9]/g,function(C){return M[+C]})}}var v=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function p(M){if(!(T=v.exec(M)))throw new Error("invalid format: "+M);var T;return new t({fill:T[1],align:T[2],sign:T[3],symbol:T[4],zero:T[5],width:T[6],comma:T[7],precision:T[8]&&T[8].slice(1),trim:T[9],type:T[10]})}p.prototype=t.prototype;function t(M){this.fill=M.fill===void 0?" ":M.fill+"",this.align=M.align===void 0?">":M.align+"",this.sign=M.sign===void 0?"-":M.sign+"",this.symbol=M.symbol===void 0?"":M.symbol+"",this.zero=!!M.zero,this.width=M.width===void 0?void 0:+M.width,this.comma=!!M.comma,this.precision=M.precision===void 0?void 0:+M.precision,this.trim=!!M.trim,this.type=M.type===void 0?"":M.type+""}t.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function r(M){e:for(var T=M.length,C=1,x=-1,S;C0&&(x=0);break}return x>0?M.slice(0,x)+M.slice(S+1):M}var s;function n(M,T){var C=P(M,T);if(!C)return M+"";var x=C[0],S=C[1],b=S-(s=Math.max(-8,Math.min(8,Math.floor(S/3)))*3)+1,a=x.length;return b===a?x:b>a?x+new Array(b-a+1).join("0"):b>0?x.slice(0,b)+"."+x.slice(b):"0."+new Array(1-b).join("0")+P(M,Math.max(0,T+b-1))[0]}function l(M,T){var C=P(M,T);if(!C)return M+"";var x=C[0],S=C[1];return S<0?"0."+new Array(-S).join("0")+x:x.length>S+1?x.slice(0,S+1)+"."+x.slice(S+1):x+new Array(S-x.length+2).join("0")}var c={"%":function(M,T){return(M*100).toFixed(T)},b:function(M){return Math.round(M).toString(2)},c:function(M){return M+""},d:m,e:function(M,T){return M.toExponential(T)},f:function(M,T){return M.toFixed(T)},g:function(M,T){return M.toPrecision(T)},o:function(M){return Math.round(M).toString(8)},p:function(M,T){return l(M*100,T)},r:l,s:n,X:function(M){return Math.round(M).toString(16).toUpperCase()},x:function(M){return Math.round(M).toString(16)}};function u(M){return M}var g=Array.prototype.map,f=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function w(M){var T=M.grouping===void 0||M.thousands===void 0?u:L(g.call(M.grouping,Number),M.thousands+""),C=M.currency===void 0?"":M.currency[0]+"",x=M.currency===void 0?"":M.currency[1]+"",S=M.decimal===void 0?".":M.decimal+"",b=M.numerals===void 0?u:A(g.call(M.numerals,String)),a=M.percent===void 0?"%":M.percent+"",E=M.minus===void 0?"-":M.minus+"",y=M.nan===void 0?"NaN":M.nan+"";function z(B){B=p(B);var k=B.fill,O=B.align,N=B.sign,_=B.symbol,U=B.zero,Y=B.width,J=B.comma,te=B.precision,ae=B.trim,ce=B.type;ce==="n"?(J=!0,ce="g"):c[ce]||(te===void 0&&(te=12),ae=!0,ce="g"),(U||k==="0"&&O==="=")&&(U=!0,k="0",O="=");var Q=_==="$"?C:_==="#"&&/[boxX]/.test(ce)?"0"+ce.toLowerCase():"",Z=_==="$"?x:/[%p]/.test(ce)?a:"",j=c[ce],K=/[defgprs%]/.test(ce);te=te===void 0?6:/[gprs]/.test(ce)?Math.max(1,Math.min(21,te)):Math.max(0,Math.min(20,te));function ee(oe){var q=Q,$=Z,le,ie,he;if(ce==="c")$=j(oe)+$,oe="";else{oe=+oe;var me=oe<0||1/oe<0;if(oe=isNaN(oe)?y:j(Math.abs(oe),te),ae&&(oe=r(oe)),me&&+oe==0&&N!=="+"&&(me=!1),q=(me?N==="("?N:E:N==="-"||N==="("?"":N)+q,$=(ce==="s"?f[8+s/3]:"")+$+(me&&N==="("?")":""),K){for(le=-1,ie=oe.length;++lehe||he>57){$=(he===46?S+oe.slice(le+1):oe.slice(le))+$,oe=oe.slice(0,le);break}}}J&&!U&&(oe=T(oe,1/0));var Me=q.length+oe.length+$.length,Te=Me>1)+q+oe+$+Te.slice(Me);break;default:oe=Te+q+oe+$;break}return b(oe)}return ee.toString=function(){return B+""},ee}function I(B,k){var O=z((B=p(B),B.type="f",B)),N=Math.max(-8,Math.min(8,Math.floor(i(k)/3)))*3,_=Math.pow(10,-N),U=f[8+N/3];return function(Y){return O(_*Y)+U}}return{format:z,formatPrefix:I}}var h,o;d({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function d(M){return h=w(M),o=h.format,h.formatPrefix,h}},65704:function(G,V,e){e.r(V),e.d(V,{geoAiry:function(){return U},geoAiryRaw:function(){return _},geoAitoff:function(){return J},geoAitoffRaw:function(){return Y},geoArmadillo:function(){return ae},geoArmadilloRaw:function(){return te},geoAugust:function(){return Q},geoAugustRaw:function(){return ce},geoBaker:function(){return ee},geoBakerRaw:function(){return K},geoBerghaus:function(){return $},geoBerghausRaw:function(){return q},geoBertin1953:function(){return Ne},geoBertin1953Raw:function(){return Oe},geoBoggs:function(){return nt},geoBoggsRaw:function(){return Ge},geoBonne:function(){return dt},geoBonneRaw:function(){return ct},geoBottomley:function(){return At},geoBottomleyRaw:function(){return pt},geoBromley:function(){return Vt},geoBromleyRaw:function(){return Mt},geoChamberlin:function(){return Le},geoChamberlinAfrica:function(){return ye},geoChamberlinRaw:function(){return be},geoCollignon:function(){return ot},geoCollignonRaw:function(){return Be},geoCraig:function(){return wt},geoCraigRaw:function(){return at},geoCraster:function(){return Gt},geoCrasterRaw:function(){return Bt},geoCylindricalEqualArea:function(){return Kt},geoCylindricalEqualAreaRaw:function(){return Lt},geoCylindricalStereographic:function(){return _r},geoCylindricalStereographicRaw:function(){return ir},geoEckert1:function(){return jt},geoEckert1Raw:function(){return yt},geoEckert2:function(){return br},geoEckert2Raw:function(){return Yt},geoEckert3:function(){return ut},geoEckert3Raw:function(){return hr},geoEckert4:function(){return xt},geoEckert4Raw:function(){return lt},geoEckert5:function(){return Ct},geoEckert5Raw:function(){return Tt},geoEckert6:function(){return _t},geoEckert6Raw:function(){return St},geoEisenlohr:function(){return Qt},geoEisenlohrRaw:function(){return $t},geoFahey:function(){return Ye},geoFaheyRaw:function(){return Er},geoFoucaut:function(){return Dt},geoFoucautRaw:function(){return We},geoFoucautSinusoidal:function(){return Zt},geoFoucautSinusoidalRaw:function(){return Ft},geoGilbert:function(){return fr},geoGingery:function(){return Hr},geoGingeryRaw:function(){return dr},geoGinzburg4:function(){return pn},geoGinzburg4Raw:function(){return kr},geoGinzburg5:function(){return In},geoGinzburg5Raw:function(){return jr},geoGinzburg6:function(){return xr},geoGinzburg6Raw:function(){return Dn},geoGinzburg8:function(){return Or},geoGinzburg8Raw:function(){return Ar},geoGinzburg9:function(){return qr},geoGinzburg9Raw:function(){return Nr},geoGringorten:function(){return jn},geoGringortenQuincuncial:function(){return gh},geoGringortenRaw:function(){return fn},geoGuyou:function(){return gn},geoGuyouRaw:function(){return Mr},geoHammer:function(){return me},geoHammerRaw:function(){return ie},geoHammerRetroazimuthal:function(){return Hn},geoHammerRetroazimuthalRaw:function(){return En},geoHealpix:function(){return un},geoHealpixRaw:function(){return an},geoHill:function(){return Cr},geoHillRaw:function(){return Rr},geoHomolosine:function(){return On},geoHomolosineRaw:function(){return yn},geoHufnagel:function(){return la},geoHufnagelRaw:function(){return $n},geoHyperelliptical:function(){return Ki},geoHyperellipticalRaw:function(){return da},geoInterrupt:function(){return mo},geoInterruptedBoggs:function(){return qa},geoInterruptedHomolosine:function(){return kl},geoInterruptedMollweide:function(){return Eo},geoInterruptedMollweideHemispheres:function(){return iu},geoInterruptedQuarticAuthalic:function(){return mf},geoInterruptedSinuMollweide:function(){return ou},geoInterruptedSinusoidal:function(){return Wi},geoKavrayskiy7:function(){return ho},geoKavrayskiy7Raw:function(){return Fo},geoLagrange:function(){return fs},geoLagrangeRaw:function(){return Vo},geoLarrivee:function(){return ec},geoLarriveeRaw:function(){return eo},geoLaskowski:function(){return to},geoLaskowskiRaw:function(){return cs},geoLittrow:function(){return Ps},geoLittrowRaw:function(){return hf},geoLoximuthal:function(){return vf},geoLoximuthalRaw:function(){return hs},geoMiller:function(){return eh},geoMillerRaw:function(){return df},geoModifiedStereographic:function(){return hl},geoModifiedStereographicAlaska:function(){return ih},geoModifiedStereographicGs48:function(){return tc},geoModifiedStereographicGs50:function(){return oh},geoModifiedStereographicLee:function(){return gf},geoModifiedStereographicMiller:function(){return sh},geoModifiedStereographicRaw:function(){return su},geoMollweide:function(){return Ue},geoMollweideRaw:function(){return Se},geoMtFlatPolarParabolic:function(){return lh},geoMtFlatPolarParabolicRaw:function(){return zu},geoMtFlatPolarQuartic:function(){return rc},geoMtFlatPolarQuarticRaw:function(){return Rs},geoMtFlatPolarSinusoidal:function(){return uh},geoMtFlatPolarSinusoidalRaw:function(){return yf},geoNaturalEarth:function(){return Ho.Z},geoNaturalEarth2:function(){return lu},geoNaturalEarth2Raw:function(){return dl},geoNaturalEarthRaw:function(){return Ho.K},geoNellHammer:function(){return vs},geoNellHammerRaw:function(){return _l},geoNicolosi:function(){return Zs},geoNicolosiRaw:function(){return zl},geoPatterson:function(){return fh},geoPattersonRaw:function(){return Nu},geoPeirceQuincuncial:function(){return sc},geoPierceQuincuncial:function(){return sc},geoPolyconic:function(){return ch},geoPolyconicRaw:function(){return bf},geoPolyhedral:function(){return vi},geoPolyhedralButterfly:function(){return Is},geoPolyhedralCollignon:function(){return js},geoPolyhedralWaterman:function(){return Ks},geoProject:function(){return dh},geoQuantize:function(){return lc},geoQuincuncial:function(){return Gu},geoRectangularPolyconic:function(){return Js},geoRectangularPolyconicRaw:function(){return Ef},geoRobinson:function(){return Cf},geoRobinsonRaw:function(){return ps},geoSatellite:function(){return Wu},geoSatelliteRaw:function(){return ml},geoSinuMollweide:function(){return Wn},geoSinuMollweideRaw:function(){return _n},geoSinusoidal:function(){return et},geoSinusoidalRaw:function(){return $e},geoStitch:function(){return wl},geoTimes:function(){return _o},geoTimesRaw:function(){return Po},geoTwoPointAzimuthal:function(){return ju},geoTwoPointAzimuthalRaw:function(){return cc},geoTwoPointAzimuthalUsa:function(){return Wl},geoTwoPointEquidistant:function(){return Df},geoTwoPointEquidistantRaw:function(){return hc},geoTwoPointEquidistantUsa:function(){return ts},geoVanDerGrinten:function(){return gu},geoVanDerGrinten2:function(){return mh},geoVanDerGrinten2Raw:function(){return Os},geoVanDerGrinten3:function(){return Ku},geoVanDerGrinten3Raw:function(){return If},geoVanDerGrinten4:function(){return vc},geoVanDerGrinten4Raw:function(){return vo},geoVanDerGrintenRaw:function(){return qs},geoWagner:function(){return mu},geoWagner4:function(){return Ff},geoWagner4Raw:function(){return kf},geoWagner6:function(){return Qu},geoWagner6Raw:function(){return Al},geoWagner7:function(){return el},geoWagnerRaw:function(){return gs},geoWiechel:function(){return pc},geoWiechelRaw:function(){return xu},geoWinkel3:function(){return gc},geoWinkel3Raw:function(){return bu}});var m=e(15002),P=Math.abs,i=Math.atan,L=Math.atan2,A=Math.cos,v=Math.exp,p=Math.floor,t=Math.log,r=Math.max,s=Math.min,n=Math.pow,l=Math.round,c=Math.sign||function(je){return je>0?1:je<0?-1:0},u=Math.sin,g=Math.tan,f=1e-6,w=1e-12,h=Math.PI,o=h/2,d=h/4,M=Math.SQRT1_2,T=z(2),C=z(h),x=h*2,S=180/h,b=h/180;function a(je){return je?je/Math.sin(je):1}function E(je){return je>1?o:je<-1?-o:Math.asin(je)}function y(je){return je>1?0:je<-1?h:Math.acos(je)}function z(je){return je>0?Math.sqrt(je):0}function I(je){return je=v(2*je),(je-1)/(je+1)}function B(je){return(v(je)-v(-je))/2}function k(je){return(v(je)+v(-je))/2}function O(je){return t(je+z(je*je+1))}function N(je){return t(je+z(je*je-1))}function _(je){var rt=g(je/2),vt=2*t(A(je/2))/(rt*rt);function gt(kt,Pt){var Ot=A(kt),cr=A(Pt),gr=u(Pt),ar=cr*Ot,Tr=-((1-ar?t((1+ar)/2)/(1-ar):-.5)+vt/(1+ar));return[Tr*cr*u(kt),Tr*gr]}return gt.invert=function(kt,Pt){var Ot=z(kt*kt+Pt*Pt),cr=-je/2,gr=50,ar;if(!Ot)return[0,0];do{var Tr=cr/2,Pr=A(Tr),Yr=u(Tr),Jr=Yr/Pr,mn=-t(P(Pr));cr-=ar=(2/Jr*mn-vt*Jr-Ot)/(-mn/(Yr*Yr)+1-vt/(2*Pr*Pr))*(Pr<0?.7:1)}while(P(ar)>f&&--gr>0);var bn=u(cr);return[L(kt*bn,Ot*A(cr)),E(Pt*bn/Ot)]},gt}function U(){var je=o,rt=(0,m.r)(_),vt=rt(je);return vt.radius=function(gt){return arguments.length?rt(je=gt*b):je*S},vt.scale(179.976).clipAngle(147)}function Y(je,rt){var vt=A(rt),gt=a(y(vt*A(je/=2)));return[2*vt*u(je)*gt,u(rt)*gt]}Y.invert=function(je,rt){if(!(je*je+4*rt*rt>h*h+f)){var vt=je,gt=rt,kt=25;do{var Pt=u(vt),Ot=u(vt/2),cr=A(vt/2),gr=u(gt),ar=A(gt),Tr=u(2*gt),Pr=gr*gr,Yr=ar*ar,Jr=Ot*Ot,mn=1-Yr*cr*cr,bn=mn?y(ar*cr)*z(Rn=1/mn):Rn=0,Rn,ha=2*bn*ar*Ot-je,Ca=bn*gr-rt,Ra=Rn*(Yr*Jr+bn*ar*cr*Pr),Da=Rn*(.5*Pt*Tr-bn*2*gr*Ot),ka=Rn*.25*(Tr*Ot-bn*gr*Yr*Pt),ai=Rn*(Pr*cr+bn*Jr*ar),Di=Da*ka-ai*Ra;if(!Di)break;var di=(Ca*Da-ha*ai)/Di,fe=(ha*ka-Ca*Ra)/Di;vt-=di,gt-=fe}while((P(di)>f||P(fe)>f)&&--kt>0);return[vt,gt]}};function J(){return(0,m.Z)(Y).scale(152.63)}function te(je){var rt=u(je),vt=A(je),gt=je>=0?1:-1,kt=g(gt*je),Pt=(1+rt-vt)/2;function Ot(cr,gr){var ar=A(gr),Tr=A(cr/=2);return[(1+ar)*u(cr),(gt*gr>-L(Tr,kt)-.001?0:-gt*10)+Pt+u(gr)*vt-(1+ar)*rt*Tr]}return Ot.invert=function(cr,gr){var ar=0,Tr=0,Pr=50;do{var Yr=A(ar),Jr=u(ar),mn=A(Tr),bn=u(Tr),Rn=1+mn,ha=Rn*Jr-cr,Ca=Pt+bn*vt-Rn*rt*Yr-gr,Ra=Rn*Yr/2,Da=-Jr*bn,ka=rt*Rn*Jr/2,ai=vt*mn+rt*Yr*bn,Di=Da*ka-ai*Ra,di=(Ca*Da-ha*ai)/Di/2,fe=(ha*ka-Ca*Ra)/Di;P(fe)>2&&(fe/=2),ar-=di,Tr-=fe}while((P(di)>f||P(fe)>f)&&--Pr>0);return gt*Tr>-L(A(ar),kt)-.001?[ar*2,Tr]:null},Ot}function ae(){var je=20*b,rt=je>=0?1:-1,vt=g(rt*je),gt=(0,m.r)(te),kt=gt(je),Pt=kt.stream;return kt.parallel=function(Ot){return arguments.length?(vt=g((rt=(je=Ot*b)>=0?1:-1)*je),gt(je)):je*S},kt.stream=function(Ot){var cr=kt.rotate(),gr=Pt(Ot),ar=(kt.rotate([0,0]),Pt(Ot)),Tr=kt.precision();return kt.rotate(cr),gr.sphere=function(){ar.polygonStart(),ar.lineStart();for(var Pr=rt*-180;rt*Pr<180;Pr+=rt*90)ar.point(Pr,rt*90);if(je)for(;rt*(Pr-=3*rt*Tr)>=-180;)ar.point(Pr,rt*-L(A(Pr*b/2),vt)*S);ar.lineEnd(),ar.polygonEnd()},gr},kt.scale(218.695).center([0,28.0974])}function ce(je,rt){var vt=g(rt/2),gt=z(1-vt*vt),kt=1+gt*A(je/=2),Pt=u(je)*gt/kt,Ot=vt/kt,cr=Pt*Pt,gr=Ot*Ot;return[1.3333333333333333*Pt*(3+cr-3*gr),1.3333333333333333*Ot*(3+3*cr-gr)]}ce.invert=function(je,rt){if(je*=.375,rt*=.375,!je&&P(rt)>1)return null;var vt=je*je,gt=rt*rt,kt=1+vt+gt,Pt=z((kt-z(kt*kt-4*rt*rt))/2),Ot=E(Pt)/3,cr=Pt?N(P(rt/Pt))/3:O(P(je))/3,gr=A(Ot),ar=k(cr),Tr=ar*ar-gr*gr;return[c(je)*2*L(B(cr)*gr,.25-Tr),c(rt)*2*L(ar*u(Ot),.25+Tr)]};function Q(){return(0,m.Z)(ce).scale(66.1603)}var Z=z(8),j=t(1+T);function K(je,rt){var vt=P(rt);return vtw&&--gt>0);return[je/(A(vt)*(Z-1/u(vt))),c(rt)*vt]};function ee(){return(0,m.Z)(K).scale(112.314)}var oe=e(17889);function q(je){var rt=2*h/je;function vt(gt,kt){var Pt=(0,oe.N)(gt,kt);if(P(gt)>o){var Ot=L(Pt[1],Pt[0]),cr=z(Pt[0]*Pt[0]+Pt[1]*Pt[1]),gr=rt*l((Ot-o)/rt)+o,ar=L(u(Ot-=gr),2-A(Ot));Ot=gr+E(h/cr*u(ar))-ar,Pt[0]=cr*A(Ot),Pt[1]=cr*u(Ot)}return Pt}return vt.invert=function(gt,kt){var Pt=z(gt*gt+kt*kt);if(Pt>o){var Ot=L(kt,gt),cr=rt*l((Ot-o)/rt)+o,gr=Ot>cr?-1:1,ar=Pt*A(cr-Ot),Tr=1/g(gr*y((ar-h)/z(h*(h-2*ar)+Pt*Pt)));Ot=cr+2*i((Tr+gr*z(Tr*Tr-3))/3),gt=Pt*A(Ot),kt=Pt*u(Ot)}return oe.N.invert(gt,kt)},vt}function $(){var je=5,rt=(0,m.r)(q),vt=rt(je),gt=vt.stream,kt=.01,Pt=-A(kt*b),Ot=u(kt*b);return vt.lobes=function(cr){return arguments.length?rt(je=+cr):je},vt.stream=function(cr){var gr=vt.rotate(),ar=gt(cr),Tr=(vt.rotate([0,0]),gt(cr));return vt.rotate(gr),ar.sphere=function(){Tr.polygonStart(),Tr.lineStart();for(var Pr=0,Yr=360/je,Jr=2*h/je,mn=90-180/je,bn=o;Pr0&&P(kt)>f);return gt<0?NaN:vt}function Te(je,rt,vt){return rt===void 0&&(rt=40),vt===void 0&&(vt=w),function(gt,kt,Pt,Ot){var cr,gr,ar;Pt=Pt===void 0?0:+Pt,Ot=Ot===void 0?0:+Ot;for(var Tr=0;Trcr){Pt-=gr/=2,Ot-=ar/=2;continue}cr=mn;var bn=(Pt>0?-1:1)*vt,Rn=(Ot>0?-1:1)*vt,ha=je(Pt+bn,Ot),Ca=je(Pt,Ot+Rn),Ra=(ha[0]-Pr[0])/bn,Da=(ha[1]-Pr[1])/bn,ka=(Ca[0]-Pr[0])/Rn,ai=(Ca[1]-Pr[1])/Rn,Di=ai*Ra-Da*ka,di=(P(Di)<.5?.5:1)/Di;if(gr=(Jr*ka-Yr*ai)*di,ar=(Yr*Da-Jr*Ra)*di,Pt+=gr,Ot+=ar,P(gr)0&&(cr[1]*=1+gr/1.5*cr[0]*cr[0]),cr}return gt.invert=Te(gt),gt}function Ne(){return(0,m.Z)(Oe()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function Ee(je,rt){var vt=je*u(rt),gt=30,kt;do rt-=kt=(rt+u(rt)-vt)/(1+A(rt));while(P(kt)>f&&--gt>0);return rt/2}function xe(je,rt,vt){function gt(kt,Pt){return[je*kt*A(Pt=Ee(vt,Pt)),rt*u(Pt)]}return gt.invert=function(kt,Pt){return Pt=E(Pt/rt),[kt/(je*A(Pt)),E((2*Pt+u(2*Pt))/vt)]},gt}var Se=xe(T/o,T,h);function Ue(){return(0,m.Z)(Se).scale(169.529)}var He=2.00276,Fe=1.11072;function Ge(je,rt){var vt=Ee(h,rt);return[He*je/(1/A(rt)+Fe/A(vt)),(rt+T*u(vt))/He]}Ge.invert=function(je,rt){var vt=He*rt,gt=rt<0?-d:d,kt=25,Pt,Ot;do Ot=vt-T*u(gt),gt-=Pt=(u(2*gt)+2*gt-h*u(Ot))/(2*A(2*gt)+2+h*A(Ot)*T*A(gt));while(P(Pt)>f&&--kt>0);return Ot=vt-T*u(gt),[je*(1/A(Ot)+Fe/A(gt))/He,Ot]};function nt(){return(0,m.Z)(Ge).scale(160.857)}function qe(je){var rt=0,vt=(0,m.r)(je),gt=vt(rt);return gt.parallel=function(kt){return arguments.length?vt(rt=kt*b):rt*S},gt}function $e(je,rt){return[je*A(rt),rt]}$e.invert=function(je,rt){return[je/A(rt),rt]};function et(){return(0,m.Z)($e).scale(152.63)}function ct(je){if(!je)return $e;var rt=1/g(je);function vt(gt,kt){var Pt=rt+je-kt,Ot=Pt&>*A(kt)/Pt;return[Pt*u(Ot),rt-Pt*A(Ot)]}return vt.invert=function(gt,kt){var Pt=z(gt*gt+(kt=rt-kt)*kt),Ot=rt+je-Pt;return[Pt/A(Ot)*L(gt,kt),Ot]},vt}function dt(){return qe(ct).scale(123.082).center([0,26.1441]).parallel(45)}function pt(je){function rt(vt,gt){var kt=o-gt,Pt=kt&&vt*je*u(kt)/kt;return[kt*u(Pt)/je,o-kt*A(Pt)]}return rt.invert=function(vt,gt){var kt=vt*je,Pt=o-gt,Ot=z(kt*kt+Pt*Pt),cr=L(kt,Pt);return[(Ot?Ot/u(Ot):1)*cr/je,o-Ot]},rt}function At(){var je=.5,rt=(0,m.r)(pt),vt=rt(je);return vt.fraction=function(gt){return arguments.length?rt(je=+gt):je},vt.scale(158.837)}var Mt=xe(1,4/h,h);function Vt(){return(0,m.Z)(Mt).scale(152.63)}var Je=e(66624),De=e(49386);function Ie(je,rt,vt,gt,kt,Pt){var Ot=A(Pt),cr;if(P(je)>1||P(Pt)>1)cr=y(vt*kt+rt*gt*Ot);else{var gr=u(je/2),ar=u(Pt/2);cr=2*E(z(gr*gr+rt*gt*ar*ar))}return P(cr)>f?[cr,L(gt*u(Pt),rt*kt-vt*gt*Ot)]:[0,0]}function ze(je,rt,vt){return y((je*je+rt*rt-vt*vt)/(2*je*rt))}function Pe(je){return je-2*h*p((je+h)/(2*h))}function be(je,rt,vt){for(var gt=[[je[0],je[1],u(je[1]),A(je[1])],[rt[0],rt[1],u(rt[1]),A(rt[1])],[vt[0],vt[1],u(vt[1]),A(vt[1])]],kt=gt[2],Pt,Ot=0;Ot<3;++Ot,kt=Pt)Pt=gt[Ot],kt.v=Ie(Pt[1]-kt[1],kt[3],kt[2],Pt[3],Pt[2],Pt[0]-kt[0]),kt.point=[0,0];var cr=ze(gt[0].v[0],gt[2].v[0],gt[1].v[0]),gr=ze(gt[0].v[0],gt[1].v[0],gt[2].v[0]),ar=h-cr;gt[2].point[1]=0,gt[0].point[0]=-(gt[1].point[0]=gt[0].v[0]/2);var Tr=[gt[2].point[0]=gt[0].point[0]+gt[2].v[0]*A(cr),2*(gt[0].point[1]=gt[1].point[1]=gt[2].v[0]*u(cr))];function Pr(Yr,Jr){var mn=u(Jr),bn=A(Jr),Rn=new Array(3),ha;for(ha=0;ha<3;++ha){var Ca=gt[ha];if(Rn[ha]=Ie(Jr-Ca[1],Ca[3],Ca[2],bn,mn,Yr-Ca[0]),!Rn[ha][0])return Ca.point;Rn[ha][1]=Pe(Rn[ha][1]-Ca.v[1])}var Ra=Tr.slice();for(ha=0;ha<3;++ha){var Da=ha==2?0:ha+1,ka=ze(gt[ha].v[0],Rn[ha][0],Rn[Da][0]);Rn[ha][1]<0&&(ka=-ka),ha?ha==1?(ka=gr-ka,Ra[0]-=Rn[ha][0]*A(ka),Ra[1]-=Rn[ha][0]*u(ka)):(ka=ar-ka,Ra[0]+=Rn[ha][0]*A(ka),Ra[1]+=Rn[ha][0]*u(ka)):(Ra[0]+=Rn[ha][0]*A(ka),Ra[1]-=Rn[ha][0]*u(ka))}return Ra[0]/=3,Ra[1]/=3,Ra}return Pr}function se(je){return je[0]*=b,je[1]*=b,je}function ye(){return Le([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Le(je,rt,vt){var gt=(0,Je.Z)({type:"MultiPoint",coordinates:[je,rt,vt]}),kt=[-gt[0],-gt[1]],Pt=(0,De.Z)(kt),Ot=be(se(Pt(je)),se(Pt(rt)),se(Pt(vt)));Ot.invert=Te(Ot);var cr=(0,m.Z)(Ot).rotate(kt),gr=cr.center;return delete cr.rotate,cr.center=function(ar){return arguments.length?gr(Pt(ar)):Pt.invert(gr())},cr.clipAngle(90)}function Be(je,rt){var vt=z(1-u(rt));return[2/C*je*vt,C*(1-vt)]}Be.invert=function(je,rt){var vt=(vt=rt/C-1)*vt;return[vt>0?je*z(h/vt)/2:0,E(1-vt)]};function ot(){return(0,m.Z)(Be).scale(95.6464).center([0,30])}function at(je){var rt=g(je);function vt(gt,kt){return[gt,(gt?gt/u(gt):1)*(u(kt)*A(gt)-rt*A(kt))]}return vt.invert=rt?function(gt,kt){gt&&(kt*=u(gt)/gt);var Pt=A(gt);return[gt,2*L(z(Pt*Pt+rt*rt-kt*kt)-Pt,rt-kt)]}:function(gt,kt){return[gt,E(gt?kt*g(gt)/gt:kt)]},vt}function wt(){return qe(at).scale(249.828).clipAngle(90)}var It=z(3);function Bt(je,rt){return[It*je*(2*A(2*rt/3)-1)/C,It*C*u(rt/3)]}Bt.invert=function(je,rt){var vt=3*E(rt/(It*C));return[C*je/(It*(2*A(2*vt/3)-1)),vt]};function Gt(){return(0,m.Z)(Bt).scale(156.19)}function Lt(je){var rt=A(je);function vt(gt,kt){return[gt*rt,u(kt)/rt]}return vt.invert=function(gt,kt){return[gt/rt,E(kt*rt)]},vt}function Kt(){return qe(Lt).parallel(38.58).scale(195.044)}function ir(je){var rt=A(je);function vt(gt,kt){return[gt*rt,(1+rt)*g(kt/2)]}return vt.invert=function(gt,kt){return[gt/rt,i(kt/(1+rt))*2]},vt}function _r(){return qe(ir).scale(124.75)}function yt(je,rt){var vt=z(8/(3*h));return[vt*je*(1-P(rt)/h),vt*rt]}yt.invert=function(je,rt){var vt=z(8/(3*h)),gt=rt/vt;return[je/(vt*(1-P(gt)/h)),gt]};function jt(){return(0,m.Z)(yt).scale(165.664)}function Yt(je,rt){var vt=z(4-3*u(P(rt)));return[2/z(6*h)*je*vt,c(rt)*z(2*h/3)*(2-vt)]}Yt.invert=function(je,rt){var vt=2-P(rt)/z(2*h/3);return[je*z(6*h)/(2*vt),c(rt)*E((4-vt*vt)/3)]};function br(){return(0,m.Z)(Yt).scale(165.664)}function hr(je,rt){var vt=z(h*(4+h));return[2/vt*je*(1+z(1-4*rt*rt/(h*h))),4/vt*rt]}hr.invert=function(je,rt){var vt=z(h*(4+h))/2;return[je*vt/(1+z(1-rt*rt*(4+h)/(4*h))),rt*vt/2]};function ut(){return(0,m.Z)(hr).scale(180.739)}function lt(je,rt){var vt=(2+o)*u(rt);rt/=2;for(var gt=0,kt=1/0;gt<10&&P(kt)>f;gt++){var Pt=A(rt);rt-=kt=(rt+u(rt)*(Pt+2)-vt)/(2*Pt*(1+Pt))}return[2/z(h*(4+h))*je*(1+A(rt)),2*z(h/(4+h))*u(rt)]}lt.invert=function(je,rt){var vt=rt*z((4+h)/h)/2,gt=E(vt),kt=A(gt);return[je/(2/z(h*(4+h))*(1+kt)),E((gt+vt*(kt+2))/(2+o))]};function xt(){return(0,m.Z)(lt).scale(180.739)}function Tt(je,rt){return[je*(1+A(rt))/z(2+h),2*rt/z(2+h)]}Tt.invert=function(je,rt){var vt=z(2+h),gt=rt*vt/2;return[vt*je/(1+A(gt)),gt]};function Ct(){return(0,m.Z)(Tt).scale(173.044)}function St(je,rt){for(var vt=(1+o)*u(rt),gt=0,kt=1/0;gt<10&&P(kt)>f;gt++)rt-=kt=(rt+u(rt)-vt)/(1+A(rt));return vt=z(2+h),[je*(1+A(rt))/vt,2*rt/vt]}St.invert=function(je,rt){var vt=1+o,gt=z(vt/2);return[je*2*gt/(1+A(rt*=gt)),E((rt+u(rt))/vt)]};function _t(){return(0,m.Z)(St).scale(173.044)}var Ht=3+2*T;function $t(je,rt){var vt=u(je/=2),gt=A(je),kt=z(A(rt)),Pt=A(rt/=2),Ot=u(rt)/(Pt+T*gt*kt),cr=z(2/(1+Ot*Ot)),gr=z((T*Pt+(gt+vt)*kt)/(T*Pt+(gt-vt)*kt));return[Ht*(cr*(gr-1/gr)-2*t(gr)),Ht*(cr*Ot*(gr+1/gr)-2*i(Ot))]}$t.invert=function(je,rt){if(!(Pt=ce.invert(je/1.2,rt*1.065)))return null;var vt=Pt[0],gt=Pt[1],kt=20,Pt;je/=Ht,rt/=Ht;do{var Ot=vt/2,cr=gt/2,gr=u(Ot),ar=A(Ot),Tr=u(cr),Pr=A(cr),Yr=A(gt),Jr=z(Yr),mn=Tr/(Pr+T*ar*Jr),bn=mn*mn,Rn=z(2/(1+bn)),ha=T*Pr+(ar+gr)*Jr,Ca=T*Pr+(ar-gr)*Jr,Ra=ha/Ca,Da=z(Ra),ka=Da-1/Da,ai=Da+1/Da,Di=Rn*ka-2*t(Da)-je,di=Rn*mn*ai-2*i(mn)-rt,fe=Tr&&M*Jr*gr*bn/Tr,Ce=(T*ar*Pr+Jr)/(2*(Pr+T*ar*Jr)*(Pr+T*ar*Jr)*Jr),Ve=-.5*mn*Rn*Rn*Rn,Qe=Ve*fe,tt=Ve*Ce,it=(it=2*Pr+T*Jr*(ar-gr))*it*Da,Rt=(T*ar*Pr*Jr+Yr)/it,ht=-(T*gr*Tr)/(Jr*it),Ut=ka*Qe-2*Rt/Da+Rn*(Rt+Rt/Ra),er=ka*tt-2*ht/Da+Rn*(ht+ht/Ra),tr=mn*ai*Qe-2*fe/(1+bn)+Rn*ai*fe+Rn*mn*(Rt-Rt/Ra),Lr=mn*ai*tt-2*Ce/(1+bn)+Rn*ai*Ce+Rn*mn*(ht-ht/Ra),Sr=er*tr-Lr*Ut;if(!Sr)break;var Kr=(di*er-Di*Lr)/Sr,en=(Di*tr-di*Ut)/Sr;vt-=Kr,gt=r(-o,s(o,gt-en))}while((P(Kr)>f||P(en)>f)&&--kt>0);return P(P(gt)-o)gt){var Pr=z(Tr),Yr=L(ar,gr),Jr=vt*l(Yr/vt),mn=Yr-Jr,bn=je*A(mn),Rn=(je*u(mn)-mn*u(bn))/(o-bn),ha=pr(mn,Rn),Ca=(h-je)/vr(ha,bn,h);gr=Pr;var Ra=50,Da;do gr-=Da=(je+vr(ha,bn,gr)*Ca-Pr)/(ha(gr)*Ca);while(P(Da)>f&&--Ra>0);ar=mn*u(gr),grgt){var gr=z(cr),ar=L(Ot,Pt),Tr=vt*l(ar/vt),Pr=ar-Tr;Pt=gr*A(Pr),Ot=gr*u(Pr);for(var Yr=Pt-o,Jr=u(Pt),mn=Ot/Jr,bn=Ptf||P(mn)>f)&&--bn>0);return[Pr,Yr]},gr}var kr=Ir(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function pn(){return(0,m.Z)(kr).scale(149.995)}var jr=Ir(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function In(){return(0,m.Z)(jr).scale(153.93)}var Dn=Ir(5/6*h,-.62636,-.0344,0,1.3493,-.05524,0,.045);function xr(){return(0,m.Z)(Dn).scale(130.945)}function Ar(je,rt){var vt=je*je,gt=rt*rt;return[je*(1-.162388*gt)*(.87-952426e-9*vt*vt),rt*(1+gt/12)]}Ar.invert=function(je,rt){var vt=je,gt=rt,kt=50,Pt;do{var Ot=gt*gt;gt-=Pt=(gt*(1+Ot/12)-rt)/(1+Ot/4)}while(P(Pt)>f&&--kt>0);kt=50,je/=1-.162388*Ot;do{var cr=(cr=vt*vt)*cr;vt-=Pt=(vt*(.87-952426e-9*cr)-je)/(.87-.00476213*cr)}while(P(Pt)>f&&--kt>0);return[vt,gt]};function Or(){return(0,m.Z)(Ar).scale(131.747)}var Nr=Ir(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function qr(){return(0,m.Z)(Nr).scale(131.087)}function vn(je){var rt=je(o,0)[0]-je(-o,0)[0];function vt(gt,kt){var Pt=gt>0?-.5:.5,Ot=je(gt+Pt*h,kt);return Ot[0]-=Pt*rt,Ot}return je.invert&&(vt.invert=function(gt,kt){var Pt=gt>0?-.5:.5,Ot=je.invert(gt+Pt*rt,kt),cr=Ot[0]-Pt*h;return cr<-h?cr+=2*h:cr>h&&(cr-=2*h),Ot[0]=cr,Ot}),vt}function fn(je,rt){var vt=c(je),gt=c(rt),kt=A(rt),Pt=A(je)*kt,Ot=u(je)*kt,cr=u(gt*rt);je=P(L(Ot,cr)),rt=E(Pt),P(je-o)>f&&(je%=o);var gr=Tn(je>h/4?o-je:je,rt);return je>h/4&&(cr=gr[0],gr[0]=-gr[1],gr[1]=-cr),gr[0]*=vt,gr[1]*=-gt,gr}fn.invert=function(je,rt){P(je)>1&&(je=c(je)*2-je),P(rt)>1&&(rt=c(rt)*2-rt);var vt=c(je),gt=c(rt),kt=-vt*je,Pt=-gt*rt,Ot=Pt/kt<1,cr=Pn(Ot?Pt:kt,Ot?kt:Pt),gr=cr[0],ar=cr[1],Tr=A(ar);return Ot&&(gr=-o-gr),[vt*(L(u(gr)*Tr,-u(ar))+h),gt*E(A(gr)*Tr)]};function Tn(je,rt){if(rt===o)return[0,0];var vt=u(rt),gt=vt*vt,kt=gt*gt,Pt=1+kt,Ot=1+3*kt,cr=1-kt,gr=E(1/z(Pt)),ar=cr+gt*Pt*gr,Tr=(1-vt)/ar,Pr=z(Tr),Yr=Tr*Pt,Jr=z(Yr),mn=Pr*cr,bn,Rn;if(je===0)return[0,-(mn+gt*Jr)];var ha=A(rt),Ca=1/ha,Ra=2*vt*ha,Da=(-3*gt+gr*Ot)*Ra,ka=(-ar*ha-(1-vt)*Da)/(ar*ar),ai=.5*ka/Pr,Di=cr*ai-2*gt*Pr*Ra,di=gt*Pt*ka+Tr*Ot*Ra,fe=-Ca*Ra,Ce=-Ca*di,Ve=-2*Ca*Di,Qe=4*je/h,tt;if(je>.222*h||rt.175*h){if(bn=(mn+gt*z(Yr*(1+kt)-mn*mn))/(1+kt),je>h/4)return[bn,bn];var it=bn,Rt=.5*bn;bn=.5*(Rt+it),Rn=50;do{var ht=z(Yr-bn*bn),Ut=bn*(Ve+fe*ht)+Ce*E(bn/Jr)-Qe;if(!Ut)break;Ut<0?Rt=bn:it=bn,bn=.5*(Rt+it)}while(P(it-Rt)>f&&--Rn>0)}else{bn=f,Rn=25;do{var er=bn*bn,tr=z(Yr-er),Lr=Ve+fe*tr,Sr=bn*Lr+Ce*E(bn/Jr)-Qe,Kr=Lr+(Ce-fe*er)/tr;bn-=tt=tr?Sr/Kr:0}while(P(tt)>f&&--Rn>0)}return[bn,-mn-gt*z(Yr-bn*bn)]}function Pn(je,rt){for(var vt=0,gt=1,kt=.5,Pt=50;;){var Ot=kt*kt,cr=z(kt),gr=E(1/z(1+Ot)),ar=1-Ot+kt*(1+Ot)*gr,Tr=(1-cr)/ar,Pr=z(Tr),Yr=Tr*(1+Ot),Jr=Pr*(1-Ot),mn=Yr-je*je,bn=z(mn),Rn=rt+Jr+kt*bn;if(P(gt-vt)0?vt=kt:gt=kt,kt=.5*(vt+gt)}if(!Pt)return null;var ha=E(cr),Ca=A(ha),Ra=1/Ca,Da=2*cr*Ca,ka=(-3*kt+gr*(1+3*Ot))*Da,ai=(-ar*Ca-(1-cr)*ka)/(ar*ar),Di=.5*ai/Pr,di=(1-Ot)*Di-2*kt*Pr*Da,fe=-2*Ra*di,Ce=-Ra*Da,Ve=-Ra*(kt*(1+Ot)*ai+Tr*(1+3*Ot)*Da);return[h/4*(je*(fe+Ce*bn)+Ve*E(je/z(Yr))),ha]}function jn(){return(0,m.Z)(vn(fn)).scale(239.75)}function qn(je,rt,vt){var gt,kt,Pt;return je?(gt=sa(je,vt),rt?(kt=sa(rt,1-vt),Pt=kt[1]*kt[1]+vt*gt[0]*gt[0]*kt[0]*kt[0],[[gt[0]*kt[2]/Pt,gt[1]*gt[2]*kt[0]*kt[1]/Pt],[gt[1]*kt[1]/Pt,-gt[0]*gt[2]*kt[0]*kt[2]/Pt],[gt[2]*kt[1]*kt[2]/Pt,-vt*gt[0]*gt[1]*kt[0]/Pt]]):[[gt[0],0],[gt[1],0],[gt[2],0]]):(kt=sa(rt,1-vt),[[0,kt[0]/kt[1]],[1/kt[1],0],[kt[2]/kt[1],0]])}function sa(je,rt){var vt,gt,kt,Pt,Ot;if(rt=1-f)return vt=(1-rt)/4,gt=k(je),Pt=I(je),kt=1/gt,Ot=gt*B(je),[Pt+vt*(Ot-je)/(gt*gt),kt-vt*Pt*kt*(Ot-je),kt+vt*Pt*kt*(Ot+je),2*i(v(je))-o+vt*(Ot-je)/gt];var cr=[1,0,0,0,0,0,0,0,0],gr=[z(rt),0,0,0,0,0,0,0,0],ar=0;for(gt=z(1-rt),Ot=1;P(gr[ar]/cr[ar])>f&&ar<8;)vt=cr[ar++],gr[ar]=(vt-gt)/2,cr[ar]=(vt+gt)/2,gt=z(vt*gt),Ot*=2;kt=Ot*cr[ar]*je;do Pt=gr[ar]*u(gt=kt)/cr[ar],kt=(E(Pt)+kt)/2;while(--ar);return[u(kt),Pt=A(kt),Pt/A(kt-gt),kt]}function ta(je,rt,vt){var gt=P(je),kt=P(rt),Pt=B(kt);if(gt){var Ot=1/u(gt),cr=1/(g(gt)*g(gt)),gr=-(cr+vt*(Pt*Pt*Ot*Ot)-1+vt),ar=(vt-1)*cr,Tr=(-gr+z(gr*gr-4*ar))/2;return[ea(i(1/z(Tr)),vt)*c(je),ea(i(z((Tr/cr-1)/vt)),1-vt)*c(rt)]}return[0,ea(i(Pt),1-vt)*c(rt)]}function ea(je,rt){if(!rt)return je;if(rt===1)return t(g(je/2+d));for(var vt=1,gt=z(1-rt),kt=z(rt),Pt=0;P(kt)>f;Pt++){if(je%h){var Ot=i(gt*g(je)/vt);Ot<0&&(Ot+=h),je+=Ot+~~(je/h)*h}else je+=je;kt=(vt+gt)/2,gt=z(vt*gt),kt=((vt=kt)-gt)/2}return je/(n(2,Pt)*vt)}function Mr(je,rt){var vt=(T-1)/(T+1),gt=z(1-vt*vt),kt=ea(o,gt*gt),Pt=-1,Ot=t(g(h/4+P(rt)/2)),cr=v(Pt*Ot)/z(vt),gr=on(cr*A(Pt*je),cr*u(Pt*je)),ar=ta(gr[0],gr[1],gt*gt);return[-ar[1],(rt>=0?1:-1)*(.5*kt-ar[0])]}function on(je,rt){var vt=je*je,gt=rt+1,kt=1-vt-rt*rt;return[.5*((je>=0?o:-o)-L(kt,2*je)),-.25*t(kt*kt+4*vt)+.5*t(gt*gt+vt)]}function nn(je,rt){var vt=rt[0]*rt[0]+rt[1]*rt[1];return[(je[0]*rt[0]+je[1]*rt[1])/vt,(je[1]*rt[0]-je[0]*rt[1])/vt]}Mr.invert=function(je,rt){var vt=(T-1)/(T+1),gt=z(1-vt*vt),kt=ea(o,gt*gt),Pt=-1,Ot=qn(.5*kt-rt,-je,gt*gt),cr=nn(Ot[0],Ot[1]),gr=L(cr[1],cr[0])/Pt;return[gr,2*i(v(.5/Pt*t(vt*cr[0]*cr[0]+vt*cr[1]*cr[1])))-o]};function gn(){return(0,m.Z)(vn(Mr)).scale(151.496)}var Un=e(7613);function En(je){var rt=u(je),vt=A(je),gt=Cn(je);gt.invert=Cn(-je);function kt(Pt,Ot){var cr=gt(Pt,Ot);Pt=cr[0],Ot=cr[1];var gr=u(Ot),ar=A(Ot),Tr=A(Pt),Pr=y(rt*gr+vt*ar*Tr),Yr=u(Pr),Jr=P(Yr)>f?Pr/Yr:1;return[Jr*vt*u(Pt),(P(Pt)>o?Jr:-Jr)*(rt*ar-vt*gr*Tr)]}return kt.invert=function(Pt,Ot){var cr=z(Pt*Pt+Ot*Ot),gr=-u(cr),ar=A(cr),Tr=cr*ar,Pr=-Ot*gr,Yr=cr*rt,Jr=z(Tr*Tr+Pr*Pr-Yr*Yr),mn=L(Tr*Yr+Pr*Jr,Pr*Yr-Tr*Jr),bn=(cr>o?-1:1)*L(Pt*gr,cr*A(mn)*ar+Ot*u(mn)*gr);return gt.invert(bn,mn)},kt}function Cn(je){var rt=u(je),vt=A(je);return function(gt,kt){var Pt=A(kt),Ot=A(gt)*Pt,cr=u(gt)*Pt,gr=u(kt);return[L(cr,Ot*vt-gr*rt),E(gr*vt+Ot*rt)]}}function Hn(){var je=0,rt=(0,m.r)(En),vt=rt(je),gt=vt.rotate,kt=vt.stream,Pt=(0,Un.Z)();return vt.parallel=function(Ot){if(!arguments.length)return je*S;var cr=vt.rotate();return rt(je=Ot*b).rotate(cr)},vt.rotate=function(Ot){return arguments.length?(gt.call(vt,[Ot[0],Ot[1]-je*S]),Pt.center([-Ot[0],-Ot[1]]),vt):(Ot=gt.call(vt),Ot[1]+=je*S,Ot)},vt.stream=function(Ot){return Ot=kt(Ot),Ot.sphere=function(){Ot.polygonStart();var cr=.01,gr=Pt.radius(90-cr)().coordinates[0],ar=gr.length-1,Tr=-1,Pr;for(Ot.lineStart();++Tr=0;)Ot.point((Pr=gr[Tr])[0],Pr[1]);Ot.lineEnd(),Ot.polygonEnd()},Ot},vt.scale(79.4187).parallel(45).clipAngle(179.999)}var aa=e(33064),Pa=e(72736),Za=3,Xt=E(1-1/Za)*S,wr=Lt(0);function an(je){var rt=Xt*b,vt=Be(h,rt)[0]-Be(-h,rt)[0],gt=wr(0,rt)[1],kt=Be(0,rt)[1],Pt=C-kt,Ot=x/je,cr=4/x,gr=gt+Pt*Pt*4/x;function ar(Tr,Pr){var Yr,Jr=P(Pr);if(Jr>rt){var mn=s(je-1,r(0,p((Tr+h)/Ot)));Tr+=h*(je-1)/je-mn*Ot,Yr=Be(Tr,Jr),Yr[0]=Yr[0]*x/vt-x*(je-1)/(2*je)+mn*x/je,Yr[1]=gt+(Yr[1]-kt)*4*Pt/x,Pr<0&&(Yr[1]=-Yr[1])}else Yr=wr(Tr,Pr);return Yr[0]*=cr,Yr[1]/=gr,Yr}return ar.invert=function(Tr,Pr){Tr/=cr,Pr*=gr;var Yr=P(Pr);if(Yr>gt){var Jr=s(je-1,r(0,p((Tr+h)/Ot)));Tr=(Tr+h*(je-1)/je-Jr*Ot)*vt/x;var mn=Be.invert(Tr,.25*(Yr-gt)*x/Pt+kt);return mn[0]-=h*(je-1)/je-Jr*Ot,Pr<0&&(mn[1]=-mn[1]),mn}return wr.invert(Tr,Pr)},ar}function cn(je,rt){return[je,rt&1?90-f:Xt]}function hn(je,rt){return[je,rt&1?-90+f:-Xt]}function Ln(je){return[je[0]*(1-f),je[1]]}function wn(je){var rt=[].concat((0,aa.w6)(-180,180+je/2,je).map(cn),(0,aa.w6)(180,-180-je/2,-je).map(hn));return{type:"Polygon",coordinates:[je===180?rt.map(Ln):rt]}}function un(){var je=4,rt=(0,m.r)(an),vt=rt(je),gt=vt.stream;return vt.lobes=function(kt){return arguments.length?rt(je=+kt):je},vt.stream=function(kt){var Pt=vt.rotate(),Ot=gt(kt),cr=(vt.rotate([0,0]),gt(kt));return vt.rotate(Pt),Ot.sphere=function(){(0,Pa.Z)(wn(180/je),cr)},Ot},vt.scale(239.75)}function Rr(je){var rt=1+je,vt=u(1/rt),gt=E(vt),kt=2*z(h/(Pt=h+4*gt*rt)),Pt,Ot=.5*kt*(rt+z(je*(2+je))),cr=je*je,gr=rt*rt;function ar(Tr,Pr){var Yr=1-u(Pr),Jr,mn;if(Yr&&Yr<2){var bn=o-Pr,Rn=25,ha;do{var Ca=u(bn),Ra=A(bn),Da=gt+L(Ca,rt-Ra),ka=1+gr-2*rt*Ra;bn-=ha=(bn-cr*gt-rt*Ca+ka*Da-.5*Yr*Pt)/(2*rt*Ca*Da)}while(P(ha)>w&&--Rn>0);Jr=kt*z(ka),mn=Tr*Da/h}else Jr=kt*(je+Yr),mn=Tr*gt/h;return[Jr*u(mn),Ot-Jr*A(mn)]}return ar.invert=function(Tr,Pr){var Yr=Tr*Tr+(Pr-=Ot)*Pr,Jr=(1+gr-Yr/(kt*kt))/(2*rt),mn=y(Jr),bn=u(mn),Rn=gt+L(bn,rt-Jr);return[E(Tr/z(Yr))*h/Rn,E(1-2*(mn-cr*gt-rt*bn+(1+gr-2*rt*Jr)*Rn)/Pt)]},ar}function Cr(){var je=1,rt=(0,m.r)(Rr),vt=rt(je);return vt.ratio=function(gt){return arguments.length?rt(je=+gt):je},vt.scale(167.774).center([0,18.67])}var zr=.7109889596207567,dn=.0528035274542;function _n(je,rt){return rt>-zr?(je=Se(je,rt),je[1]+=dn,je):$e(je,rt)}_n.invert=function(je,rt){return rt>-zr?Se.invert(je,rt-dn):$e.invert(je,rt)};function Wn(){return(0,m.Z)(_n).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function yn(je,rt){return P(rt)>zr?(je=Se(je,rt),je[1]-=rt>0?dn:-dn,je):$e(je,rt)}yn.invert=function(je,rt){return P(rt)>zr?Se.invert(je,rt+(rt>0?dn:-dn)):$e.invert(je,rt)};function On(){return(0,m.Z)(yn).scale(152.63)}function $n(je,rt,vt,gt){var kt=z(4*h/(2*vt+(1+je-rt/2)*u(2*vt)+(je+rt)/2*u(4*vt)+rt/2*u(6*vt))),Pt=z(gt*u(vt)*z((1+je*A(2*vt)+rt*A(4*vt))/(1+je+rt))),Ot=vt*gr(1);function cr(Pr){return z(1+je*A(2*Pr)+rt*A(4*Pr))}function gr(Pr){var Yr=Pr*vt;return(2*Yr+(1+je-rt/2)*u(2*Yr)+(je+rt)/2*u(4*Yr)+rt/2*u(6*Yr))/vt}function ar(Pr){return cr(Pr)*u(Pr)}var Tr=function(Pr,Yr){var Jr=vt*Me(gr,Ot*u(Yr)/vt,Yr/h);isNaN(Jr)&&(Jr=vt*c(Yr));var mn=kt*cr(Jr);return[mn*Pt*Pr/h*A(Jr),mn/Pt*u(Jr)]};return Tr.invert=function(Pr,Yr){var Jr=Me(ar,Yr*Pt/kt);return[Pr*h/(A(Jr)*kt*Pt*cr(Jr)),E(vt*gr(Jr/vt)/Ot)]},vt===0&&(kt=z(gt/h),Tr=function(Pr,Yr){return[Pr*kt,u(Yr)/kt]},Tr.invert=function(Pr,Yr){return[Pr/kt,E(Yr*kt)]}),Tr}function la(){var je=1,rt=0,vt=45*b,gt=2,kt=(0,m.r)($n),Pt=kt(je,rt,vt,gt);return Pt.a=function(Ot){return arguments.length?kt(je=+Ot,rt,vt,gt):je},Pt.b=function(Ot){return arguments.length?kt(je,rt=+Ot,vt,gt):rt},Pt.psiMax=function(Ot){return arguments.length?kt(je,rt,vt=+Ot*b,gt):vt*S},Pt.ratio=function(Ot){return arguments.length?kt(je,rt,vt,gt=+Ot):gt},Pt.scale(180.739)}function ia(je,rt,vt,gt,kt,Pt,Ot,cr,gr,ar,Tr){if(Tr.nanEncountered)return NaN;var Pr,Yr,Jr,mn,bn,Rn,ha,Ca,Ra,Da;if(Pr=vt-rt,Yr=je(rt+Pr*.25),Jr=je(vt-Pr*.25),isNaN(Yr)){Tr.nanEncountered=!0;return}if(isNaN(Jr)){Tr.nanEncountered=!0;return}return mn=Pr*(gt+4*Yr+kt)/12,bn=Pr*(kt+4*Jr+Pt)/12,Rn=mn+bn,Da=(Rn-Ot)/15,ar>gr?(Tr.maxDepthCount++,Rn+Da):Math.abs(Da)>1;do gr[Rn]>Jr?bn=Rn:mn=Rn,Rn=mn+bn>>1;while(Rn>mn);var ha=gr[Rn+1]-gr[Rn];return ha&&(ha=(Jr-gr[Rn+1])/ha),(Rn+1+ha)/Ot}var Pr=2*Tr(1)/h*Pt/vt,Yr=function(Jr,mn){var bn=Tr(P(u(mn))),Rn=gt(bn)*Jr;return bn/=Pr,[Rn,mn>=0?bn:-bn]};return Yr.invert=function(Jr,mn){var bn;return mn*=Pr,P(mn)<1&&(bn=c(mn)*E(kt(P(mn))*Pt)),[Jr/gt(P(mn)),bn]},Yr}function Ki(){var je=0,rt=2.5,vt=1.183136,gt=(0,m.r)(da),kt=gt(je,rt,vt);return kt.alpha=function(Pt){return arguments.length?gt(je=+Pt,rt,vt):je},kt.k=function(Pt){return arguments.length?gt(je,rt=+Pt,vt):rt},kt.gamma=function(Pt){return arguments.length?gt(je,rt,vt=+Pt):vt},kt.scale(152.63)}function co(je,rt){return P(je[0]-rt[0])=0;--gr)vt=je[1][gr],gt=vt[0][0],kt=vt[0][1],Pt=vt[1][1],Ot=vt[2][0],cr=vt[2][1],rt.push(yo([[Ot-f,cr-f],[Ot-f,Pt+f],[gt+f,Pt+f],[gt+f,kt-f]],30));return{type:"Polygon",coordinates:[(0,aa.TS)(rt)]}}function mo(je,rt,vt){var gt,kt;function Pt(gr,ar){for(var Tr=ar<0?-1:1,Pr=rt[+(ar<0)],Yr=0,Jr=Pr.length-1;YrPr[Yr][2][0];++Yr);var mn=je(gr-Pr[Yr][1][0],ar);return mn[0]+=je(Pr[Yr][1][0],Tr*ar>Tr*Pr[Yr][0][1]?Pr[Yr][0][1]:ar)[0],mn}vt?Pt.invert=vt(Pt):je.invert&&(Pt.invert=function(gr,ar){for(var Tr=kt[+(ar<0)],Pr=rt[+(ar<0)],Yr=0,Jr=Tr.length;Yrmn&&(bn=Jr,Jr=mn,mn=bn),[[Pr,Jr],[Yr,mn]]})}),Ot):rt.map(function(ar){return ar.map(function(Tr){return[[Tr[0][0]*S,Tr[0][1]*S],[Tr[1][0]*S,Tr[1][1]*S],[Tr[2][0]*S,Tr[2][1]*S]]})})},rt!=null&&Ot.lobes(rt),Ot}var cf=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function qa(){return mo(Ge,cf).scale(160.857)}var au=[[[[-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 kl(){return mo(yn,au).scale(152.63)}var Ji=[[[[-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 Eo(){return mo(Se,Ji).scale(169.529)}var qf=[[[[-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 iu(){return mo(Se,qf).scale(169.529).rotate([20,0])}var Ri=[[[[-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 ou(){return mo(_n,Ri,Te).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var ko=[[[[-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 Wi(){return mo($e,ko).scale(152.63).rotate([-20,0])}function Fo(je,rt){return[3/x*je*z(h*h/3-rt*rt),rt]}Fo.invert=function(je,rt){return[x/3*je/z(h*h/3-rt*rt),rt]};function ho(){return(0,m.Z)(Fo).scale(158.837)}function Vo(je){function rt(vt,gt){if(P(P(gt)-o)2)return null;vt/=2,gt/=2;var Pt=vt*vt,Ot=gt*gt,cr=2*gt/(1+Pt+Ot);return cr=n((1+cr)/(1-cr),1/je),[L(2*vt,1-Pt-Ot)/je,E((cr-1)/(cr+1))]},rt}function fs(){var je=.5,rt=(0,m.r)(Vo),vt=rt(je);return vt.spacing=function(gt){return arguments.length?rt(je=+gt):je},vt.scale(124.75)}var Ls=h/T;function eo(je,rt){return[je*(1+z(A(rt)))/2,rt/(A(rt/2)*A(je/6))]}eo.invert=function(je,rt){var vt=P(je),gt=P(rt),kt=f,Pt=o;gtf||P(Rn)>f)&&--kt>0);return kt&&[vt,gt]};function to(){return(0,m.Z)(cs).scale(139.98)}function hf(je,rt){return[u(je)/A(rt),g(rt)*A(je)]}hf.invert=function(je,rt){var vt=je*je,gt=rt*rt,kt=gt+1,Pt=vt+kt,Ot=je?M*z((Pt-z(Pt*Pt-4*vt))/vt):1/z(kt);return[E(je*Ot),c(rt)*y(Ot)]};function Ps(){return(0,m.Z)(hf).scale(144.049).clipAngle(89.999)}function hs(je){var rt=A(je),vt=g(d+je/2);function gt(kt,Pt){var Ot=Pt-je,cr=P(Ot)=0;)Tr=je[ar],Pr=Tr[0]+cr*(Jr=Pr)-gr*Yr,Yr=Tr[1]+cr*Yr+gr*Jr;return Pr=cr*(Jr=Pr)-gr*Yr,Yr=cr*Yr+gr*Jr,[Pr,Yr]}return vt.invert=function(gt,kt){var Pt=20,Ot=gt,cr=kt;do{for(var gr=rt,ar=je[gr],Tr=ar[0],Pr=ar[1],Yr=0,Jr=0,mn;--gr>=0;)ar=je[gr],Yr=Tr+Ot*(mn=Yr)-cr*Jr,Jr=Pr+Ot*Jr+cr*mn,Tr=ar[0]+Ot*(mn=Tr)-cr*Pr,Pr=ar[1]+Ot*Pr+cr*mn;Yr=Tr+Ot*(mn=Yr)-cr*Jr,Jr=Pr+Ot*Jr+cr*mn,Tr=Ot*(mn=Tr)-cr*Pr-gt,Pr=Ot*Pr+cr*mn-kt;var bn=Yr*Yr+Jr*Jr,Rn,ha;Ot-=Rn=(Tr*Yr+Pr*Jr)/bn,cr-=ha=(Pr*Yr-Tr*Jr)/bn}while(P(Rn)+P(ha)>f*f&&--Pt>0);if(Pt){var Ca=z(Ot*Ot+cr*cr),Ra=2*i(Ca*.5),Da=u(Ra);return[L(Ot*Da,Ca*A(Ra)),Ca?E(cr*Da/Ca):0]}},vt}var th=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],rh=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],nh=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],pf=[[.9245,0],[0,0],[.01943,0]],ah=[[.721316,0],[0,0],[-.00881625,-.00617325]];function ih(){return hl(th,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function tc(){return hl(rh,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function oh(){return hl(nh,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function sh(){return hl(pf,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function gf(){return hl(ah,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function hl(je,rt){var vt=(0,m.Z)(su(je)).rotate(rt).clipAngle(90),gt=(0,De.Z)(rt),kt=vt.center;return delete vt.rotate,vt.center=function(Pt){return arguments.length?kt(gt(Pt)):gt.invert(kt())},vt}var vl=z(6),Fl=z(7);function zu(je,rt){var vt=E(7*u(rt)/(3*vl));return[vl*je*(2*A(2*vt/3)-1)/Fl,9*u(vt/3)/Fl]}zu.invert=function(je,rt){var vt=3*E(rt*Fl/9);return[je*Fl/(vl*(2*A(2*vt/3)-1)),E(u(vt)*3*vl/7)]};function lh(){return(0,m.Z)(zu).scale(164.859)}function Rs(je,rt){for(var vt=(1+M)*u(rt),gt=rt,kt=0,Pt;kt<25&&(gt-=Pt=(u(gt/2)+u(gt)-vt)/(.5*A(gt/2)+A(gt)),!(P(Pt)w&&--gt>0);return Pt=vt*vt,Ot=Pt*Pt,cr=Pt*Ot,[je/(.84719-.13063*Pt+cr*cr*(-.04515+.05494*Pt-.02326*Ot+.00331*cr)),vt]};function lu(){return(0,m.Z)(dl).scale(175.295)}function _l(je,rt){return[je*(1+A(rt))/2,2*(rt-g(rt/2))]}_l.invert=function(je,rt){for(var vt=rt/2,gt=0,kt=1/0;gt<10&&P(kt)>f;++gt){var Pt=A(rt/2);rt-=kt=(rt-g(rt/2)-vt)/(1-.5/(Pt*Pt))}return[2*je/(1+A(rt)),rt]};function vs(){return(0,m.Z)(_l).scale(152.63)}var Ds=[[[[-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 mf(){return mo(ie(1/0),Ds).rotate([20,0]).scale(152.63)}function zl(je,rt){var vt=u(rt),gt=A(rt),kt=c(je);if(je===0||P(rt)===o)return[0,rt];if(rt===0)return[je,0];if(P(je)===o)return[je*gt,o*vt];var Pt=h/(2*je)-2*je/h,Ot=2*rt/h,cr=(1-Ot*Ot)/(vt-Ot),gr=Pt*Pt,ar=cr*cr,Tr=1+gr/ar,Pr=1+ar/gr,Yr=(Pt*vt/cr-Pt/2)/Tr,Jr=(ar*vt/gr+cr/2)/Pr,mn=Yr*Yr+gt*gt/Tr,bn=Jr*Jr-(ar*vt*vt/gr+cr*vt-1)/Pr;return[o*(Yr+z(mn)*kt),o*(Jr+z(bn<0?0:bn)*c(-rt*Pt)*kt)]}zl.invert=function(je,rt){je/=o,rt/=o;var vt=je*je,gt=rt*rt,kt=vt+gt,Pt=h*h;return[je?(kt-1+z((1-kt)*(1-kt)+4*vt))/(2*je)*o:0,Me(function(Ot){return kt*(h*u(Ot)-2*Ot)*h+4*Ot*Ot*(rt-u(Ot))+2*h*Ot-Pt*rt},0)]};function Zs(){return(0,m.Z)(zl).scale(127.267)}var Fi=1.0148,xf=.23185,Ou=-.14499,Ol=.02406,nc=Fi,ac=5*xf,Nl=7*Ou,Bl=9*Ol,Qi=1.790857183;function Nu(je,rt){var vt=rt*rt;return[je,rt*(Fi+vt*vt*(xf+vt*(Ou+Ol*vt)))]}Nu.invert=function(je,rt){rt>Qi?rt=Qi:rt<-Qi&&(rt=-Qi);var vt=rt,gt;do{var kt=vt*vt;vt-=gt=(vt*(Fi+kt*kt*(xf+kt*(Ou+Ol*kt)))-rt)/(nc+kt*kt*(ac+kt*(Nl+Bl*kt)))}while(P(gt)>f);return[je,vt]};function fh(){return(0,m.Z)(Nu).scale(139.319)}function bf(je,rt){if(P(rt)f&&--kt>0);return Ot=g(gt),[(P(rt)=0;)if(gt=rt[cr],vt[0]===gt[0]&&vt[1]===gt[1]){if(Pt)return[Pt,vt];Pt=vt}}}function pl(je){for(var rt=je.length,vt=[],gt=je[rt-1],kt=0;kt0?[-gt[0],0]:[180-gt[0],180])};var rt=Co.map(function(vt){return{face:vt,project:je(vt)}});return[-1,0,0,1,0,1,4,5].forEach(function(vt,gt){var kt=rt[vt];kt&&(kt.children||(kt.children=[])).push(rt[gt])}),vi(rt[0],function(vt,gt){return rt[vt<-h/2?gt<0?6:4:vt<0?gt<0?2:0:vtgt^Jr>gt&&vt<(Yr-ar)*(gt-Tr)/(Jr-Tr)+ar&&(kt=!kt)}return kt}function dh(je,rt){var vt=rt.stream,gt;if(!vt)throw new Error("invalid projection");switch(je&&je.type){case"Feature":gt=Hu;break;case"FeatureCollection":gt=ph;break;default:gt=Vl;break}return gt(je,vt)}function ph(je,rt){return{type:"FeatureCollection",features:je.features.map(function(vt){return Hu(vt,rt)})}}function Hu(je,rt){return{type:"Feature",id:je.id,properties:je.properties,geometry:Vl(je.geometry,rt)}}function oc(je,rt){return{type:"GeometryCollection",geometries:je.geometries.map(function(vt){return Vl(vt,rt)})}}function Vl(je,rt){if(!je)return null;if(je.type==="GeometryCollection")return oc(je,rt);var vt;switch(je.type){case"Point":vt=du;break;case"MultiPoint":vt=du;break;case"LineString":vt=yl;break;case"MultiLineString":vt=yl;break;case"Polygon":vt=pu;break;case"MultiPolygon":vt=pu;break;case"Sphere":vt=pu;break;default:return null}return(0,Pa.Z)(je,rt(vt)),vt.result()}var ro=[],Lo=[],du={point:function(je,rt){ro.push([je,rt])},result:function(){var je=ro.length?ro.length<2?{type:"Point",coordinates:ro[0]}:{type:"MultiPoint",coordinates:ro}:null;return ro=[],je}},yl={lineStart:Vu,point:function(je,rt){ro.push([je,rt])},lineEnd:function(){ro.length&&(Lo.push(ro),ro=[])},result:function(){var je=Lo.length?Lo.length<2?{type:"LineString",coordinates:Lo[0]}:{type:"MultiLineString",coordinates:Lo}:null;return Lo=[],je}},pu={polygonStart:Vu,lineStart:Vu,point:function(je,rt){ro.push([je,rt])},lineEnd:function(){var je=ro.length;if(je){do ro.push(ro[0].slice());while(++je<4);Lo.push(ro),ro=[]}},polygonEnd:Vu,result:function(){if(!Lo.length)return null;var je=[],rt=[];return Lo.forEach(function(vt){hh(vt)?je.push([vt]):rt.push(vt)}),rt.forEach(function(vt){var gt=vt[0];je.some(function(kt){if(vh(kt[0],gt))return kt.push(vt),!0})||je.push([vt])}),Lo=[],je.length?je.length>1?{type:"MultiPolygon",coordinates:je}:{type:"Polygon",coordinates:je[0]}:null}};function Gu(je){var rt=je(o,0)[0]-je(-o,0)[0];function vt(gt,kt){var Pt=P(gt)0?gt-h:gt+h,kt),cr=(Ot[0]-Ot[1])*M,gr=(Ot[0]+Ot[1])*M;if(Pt)return[cr,gr];var ar=rt*M,Tr=cr>0^gr>0?-1:1;return[Tr*cr-c(gr)*ar,Tr*gr-c(cr)*ar]}return je.invert&&(vt.invert=function(gt,kt){var Pt=(gt+kt)*M,Ot=(kt-gt)*M,cr=P(Pt)<.5*rt&&P(Ot)<.5*rt;if(!cr){var gr=rt*M,ar=Pt>0^Ot>0?-1:1,Tr=-ar*gt+(Ot>0?1:-1)*gr,Pr=-ar*kt+(Pt>0?1:-1)*gr;Pt=(-Tr-Pr)*M,Ot=(Tr-Pr)*M}var Yr=je.invert(Pt,Ot);return cr||(Yr[0]+=Pt>0?h:-h),Yr}),(0,m.Z)(vt).rotate([-90,-90,45]).clipAngle(179.999)}function gh(){return Gu(fn).scale(176.423)}function sc(){return Gu(Mr).scale(111.48)}function lc(je,rt){if(!(0<=(rt=+rt)&&rt<=20))throw new Error("invalid digits");function vt(ar){var Tr=ar.length,Pr=2,Yr=new Array(Tr);for(Yr[0]=+ar[0].toFixed(rt),Yr[1]=+ar[1].toFixed(rt);Pr2||Jr[0]!=Tr[0]||Jr[1]!=Tr[1])&&(Pr.push(Jr),Tr=Jr)}return Pr.length===1&&ar.length>1&&Pr.push(vt(ar[ar.length-1])),Pr}function Pt(ar){return ar.map(kt)}function Ot(ar){if(ar==null)return ar;var Tr;switch(ar.type){case"GeometryCollection":Tr={type:"GeometryCollection",geometries:ar.geometries.map(Ot)};break;case"Point":Tr={type:"Point",coordinates:vt(ar.coordinates)};break;case"MultiPoint":Tr={type:ar.type,coordinates:gt(ar.coordinates)};break;case"LineString":Tr={type:ar.type,coordinates:kt(ar.coordinates)};break;case"MultiLineString":case"Polygon":Tr={type:ar.type,coordinates:Pt(ar.coordinates)};break;case"MultiPolygon":Tr={type:"MultiPolygon",coordinates:ar.coordinates.map(Pt)};break;default:return ar}return ar.bbox!=null&&(Tr.bbox=ar.bbox),Tr}function cr(ar){var Tr={type:"Feature",properties:ar.properties,geometry:Ot(ar.geometry)};return ar.id!=null&&(Tr.id=ar.id),ar.bbox!=null&&(Tr.bbox=ar.bbox),Tr}if(je!=null)switch(je.type){case"Feature":return cr(je);case"FeatureCollection":{var gr={type:"FeatureCollection",features:je.features.map(cr)};return je.bbox!=null&&(gr.bbox=je.bbox),gr}default:return Ot(je)}return je}function Ef(je){var rt=u(je);function vt(gt,kt){var Pt=rt?g(gt*rt/2)/rt:gt/2;if(!kt)return[2*Pt,-je];var Ot=2*i(Pt*u(kt)),cr=1/g(kt);return[u(Ot)*cr,kt+(1-A(Ot))*cr-je]}return vt.invert=function(gt,kt){if(P(kt+=je)f&&--cr>0);var Yr=gt*(ar=g(Ot)),Jr=g(P(kt)0?o:-o)*(gr+kt*(Tr-Ot)/2+kt*kt*(Tr-2*gr+Ot)/2)]}ps.invert=function(je,rt){var vt=rt/o,gt=vt*90,kt=s(18,P(gt/5)),Pt=r(0,p(kt));do{var Ot=Oi[Pt][1],cr=Oi[Pt+1][1],gr=Oi[s(19,Pt+2)][1],ar=gr-Ot,Tr=gr-2*cr+Ot,Pr=2*(P(vt)-cr)/ar,Yr=Tr/ar,Jr=Pr*(1-Yr*Pr*(1-2*Yr*Pr));if(Jr>=0||Pt===1){gt=(rt>=0?5:-5)*(Jr+kt);var mn=50,bn;do kt=s(18,P(gt)/5),Pt=p(kt),Jr=kt-Pt,Ot=Oi[Pt][1],cr=Oi[Pt+1][1],gr=Oi[s(19,Pt+2)][1],gt-=(bn=(rt>=0?o:-o)*(cr+Jr*(gr-Ot)/2+Jr*Jr*(gr-2*cr+Ot)/2)-rt)*S;while(P(bn)>w&&--mn>0);break}}while(--Pt>=0);var Rn=Oi[Pt][0],ha=Oi[Pt+1][0],Ca=Oi[s(19,Pt+2)][0];return[je/(ha+Jr*(Ca-Rn)/2+Jr*Jr*(Ca-2*ha+Rn)/2),gt*b]};function Cf(){return(0,m.Z)(ps).scale(152.63)}function uc(je){function rt(vt,gt){var kt=A(gt),Pt=(je-1)/(je-kt*A(vt));return[Pt*kt*u(vt),Pt*u(gt)]}return rt.invert=function(vt,gt){var kt=vt*vt+gt*gt,Pt=z(kt),Ot=(je-z(1-kt*(je+1)/(je-1)))/((je-1)/Pt+Pt/(je-1));return[L(vt*Ot,Pt*z(1-Ot*Ot)),Pt?E(gt*Ot/Pt):0]},rt}function ml(je,rt){var vt=uc(je);if(!rt)return vt;var gt=A(rt),kt=u(rt);function Pt(Ot,cr){var gr=vt(Ot,cr),ar=gr[1],Tr=ar*kt/(je-1)+gt;return[gr[0]*gt/Tr,ar/Tr]}return Pt.invert=function(Ot,cr){var gr=(je-1)/(je-1-cr*kt);return vt.invert(gr*Ot,gr*cr*gt)},Pt}function Wu(){var je=2,rt=0,vt=(0,m.r)(ml),gt=vt(je,rt);return gt.distance=function(kt){return arguments.length?vt(je=+kt,rt):je},gt.tilt=function(kt){return arguments.length?vt(je,rt=kt*b):rt*S},gt.scale(432.147).clipAngle(y(1/je)*S-1e-6)}var es=1e-4,Yu=1e4,Fs=-180,_s=Fs+es,Lf=180,Hl=Lf-es,si=-90,xl=si+es,Zu=90,Xu=Zu-es;function Qs(je){return je.length>0}function yh(je){return Math.floor(je*Yu)/Yu}function Pf(je){return je===si||je===Zu?[0,je]:[Fs,yh(je)]}function Gl(je){var rt=je[0],vt=je[1],gt=!1;return rt<=_s?(rt=Fs,gt=!0):rt>=Hl&&(rt=Lf,gt=!0),vt<=xl?(vt=si,gt=!0):vt>=Xu&&(vt=Zu,gt=!0),gt?[rt,vt]:je}function Rf(je){return je.map(Gl)}function fc(je,rt,vt){for(var gt=0,kt=je.length;gt=Hl||Tr<=xl||Tr>=Xu){Pt[Ot]=Gl(gr);for(var Pr=Ot+1;Pr_s&&Jrxl&&mn=cr)break;vt.push({index:-1,polygon:rt,ring:Pt=Pt.slice(Pr-1)}),Pt[0]=Pf(Pt[0][1]),Ot=-1,cr=Pt.length}}}}function zs(je){var rt,vt=je.length,gt={},kt={},Pt,Ot,cr,gr,ar;for(rt=0;rt0?h-cr:cr)*S],ar=(0,m.Z)(je(Ot)).rotate(gr),Tr=(0,De.Z)(gr),Pr=ar.center;return delete ar.rotate,ar.center=function(Yr){return arguments.length?Pr(Tr(Yr)):Tr.invert(Pr())},ar.clipAngle(90)}function cc(je){var rt=A(je);function vt(gt,kt){var Pt=(0,zi.M)(gt,kt);return Pt[0]*=rt,Pt}return vt.invert=function(gt,kt){return zi.M.invert(gt/rt,kt)},vt}function Wl(){return ju([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function ju(je,rt){return Tl(cc,je,rt)}function hc(je){if(!(je*=2))return oe.N;var rt=-je/2,vt=-rt,gt=je*je,kt=g(vt),Pt=.5/u(vt);function Ot(cr,gr){var ar=y(A(gr)*A(cr-rt)),Tr=y(A(gr)*A(cr-vt)),Pr=gr<0?-1:1;return ar*=ar,Tr*=Tr,[(ar-Tr)/(2*je),Pr*z(4*gt*Tr-(gt-ar+Tr)*(gt-ar+Tr))/(2*je)]}return Ot.invert=function(cr,gr){var ar=gr*gr,Tr=A(z(ar+(Yr=cr+rt)*Yr)),Pr=A(z(ar+(Yr=cr+vt)*Yr)),Yr,Jr;return[L(Jr=Tr-Pr,Yr=(Tr+Pr)*kt),(gr<0?-1:1)*y(z(Yr*Yr+Jr*Jr)*Pt)]},Ot}function ts(){return Df([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function Df(je,rt){return Tl(hc,je,rt)}function qs(je,rt){if(P(rt)f&&--cr>0);return[c(je)*(z(kt*kt+4)+kt)*h/4,o*Ot]};function vc(){return(0,m.Z)(vo).scale(127.16)}function yu(je,rt,vt,gt,kt){function Pt(Ot,cr){var gr=vt*u(gt*cr),ar=z(1-gr*gr),Tr=z(2/(1+ar*A(Ot*=kt)));return[je*ar*Tr*u(Ot),rt*gr*Tr]}return Pt.invert=function(Ot,cr){var gr=Ot/je,ar=cr/rt,Tr=z(gr*gr+ar*ar),Pr=2*E(Tr/2);return[L(Ot*g(Pr),je*Tr)/kt,Tr&&E(cr*u(Pr)/(rt*vt*Tr))/gt]},Pt}function gs(je,rt,vt,gt){var kt=h/3;je=r(je,f),rt=r(rt,f),je=s(je,o),rt=s(rt,h-f),vt=r(vt,0),vt=s(vt,100-f),gt=r(gt,f);var Pt=vt/100+1,Ot=gt/100,cr=y(Pt*A(kt))/kt,gr=u(je)/u(cr*o),ar=rt/h,Tr=z(Ot*u(je/2)/u(rt/2)),Pr=Tr/z(ar*gr*cr),Yr=1/(Tr*z(ar*gr*cr));return yu(Pr,Yr,gr,cr,ar)}function mu(){var je=65*b,rt=60*b,vt=20,gt=200,kt=(0,m.r)(gs),Pt=kt(je,rt,vt,gt);return Pt.poleline=function(Ot){return arguments.length?kt(je=+Ot*b,rt,vt,gt):je*S},Pt.parallels=function(Ot){return arguments.length?kt(je,rt=+Ot*b,vt,gt):rt*S},Pt.inflation=function(Ot){return arguments.length?kt(je,rt,vt=+Ot,gt):vt},Pt.ratio=function(Ot){return arguments.length?kt(je,rt,vt,gt=+Ot):gt},Pt.scale(163.775)}function el(){return mu().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var Ju=4*h+3*z(3),dc=2*z(2*h*z(3)/Ju),kf=xe(dc*z(3)/h,dc,Ju/6);function Ff(){return(0,m.Z)(kf).scale(176.84)}function Al(je,rt){return[je*z(1-3*rt*rt/(h*h)),rt]}Al.invert=function(je,rt){return[je/z(1-3*rt*rt/(h*h)),rt]};function Qu(){return(0,m.Z)(Al).scale(152.63)}function xu(je,rt){var vt=A(rt),gt=A(je)*vt,kt=1-gt,Pt=A(je=L(u(je)*vt,-u(rt))),Ot=u(je);return vt=z(1-gt*gt),[Ot*vt-Pt*kt,-Pt*vt-Ot*kt]}xu.invert=function(je,rt){var vt=(je*je+rt*rt)/-2,gt=z(-vt*(2+vt)),kt=rt*vt+je*gt,Pt=je*vt-rt*gt,Ot=z(Pt*Pt+kt*kt);return[L(gt*kt,Ot*(1+vt)),Ot?-E(gt*Pt/Ot):0]};function pc(){return(0,m.Z)(xu).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)}function bu(je,rt){var vt=Y(je,rt);return[(vt[0]+je/o)/2,(vt[1]+rt)/2]}bu.invert=function(je,rt){var vt=je,gt=rt,kt=25;do{var Pt=A(gt),Ot=u(gt),cr=u(2*gt),gr=Ot*Ot,ar=Pt*Pt,Tr=u(vt),Pr=A(vt/2),Yr=u(vt/2),Jr=Yr*Yr,mn=1-ar*Pr*Pr,bn=mn?y(Pt*Pr)*z(Rn=1/mn):Rn=0,Rn,ha=.5*(2*bn*Pt*Yr+vt/o)-je,Ca=.5*(bn*Ot+gt)-rt,Ra=.5*Rn*(ar*Jr+bn*Pt*Pr*gr)+.5/o,Da=Rn*(Tr*cr/4-bn*Ot*Yr),ka=.125*Rn*(cr*Yr-bn*Ot*ar*Tr),ai=.5*Rn*(gr*Pr+bn*Jr*Pt)+.5,Di=Da*ka-ai*Ra,di=(Ca*Da-ha*ai)/Di,fe=(ha*ka-Ca*Ra)/Di;vt-=di,gt-=fe}while((P(di)>f||P(fe)>f)&&--kt>0);return[vt,gt]};function gc(){return(0,m.Z)(bu).scale(158.837)}},33940:function(G,V,e){e.d(V,{Z:function(){return m}});function m(){return new P}function P(){this.reset()}P.prototype={constructor:P,reset:function(){this.s=this.t=0},add:function(A){L(i,A,this.t),L(this,i.s,this.s),this.s?this.t+=i.t:this.s=i.t},valueOf:function(){return this.s}};var i=new P;function L(A,v,p){var t=A.s=v+p,r=t-v,s=t-r;A.t=v-s+(p-r)}},97860:function(G,V,e){e.d(V,{L9:function(){return A},ZP:function(){return w},gL:function(){return l}});var m=e(33940),P=e(39695),i=e(73182),L=e(72736),A=(0,m.Z)(),v=(0,m.Z)(),p,t,r,s,n,l={point:i.Z,lineStart:i.Z,lineEnd:i.Z,polygonStart:function(){A.reset(),l.lineStart=c,l.lineEnd=u},polygonEnd:function(){var h=+A;v.add(h<0?P.BZ+h:h),this.lineStart=this.lineEnd=this.point=i.Z},sphere:function(){v.add(P.BZ)}};function c(){l.point=g}function u(){f(p,t)}function g(h,o){l.point=f,p=h,t=o,h*=P.uR,o*=P.uR,r=h,s=(0,P.mC)(o=o/2+P.pu),n=(0,P.O$)(o)}function f(h,o){h*=P.uR,o*=P.uR,o=o/2+P.pu;var d=h-r,M=d>=0?1:-1,T=M*d,C=(0,P.mC)(o),x=(0,P.O$)(o),S=n*x,b=s*C+S*(0,P.mC)(T),a=S*M*(0,P.O$)(T);A.add((0,P.fv)(a,b)),r=h,s=C,n=x}function w(h){return v.reset(),(0,L.Z)(h,l),v*2}},77338:function(G,V,e){e.d(V,{Z:function(){return E}});var m=e(33940),P=e(97860),i=e(7620),L=e(39695),A=e(72736),v,p,t,r,s,n,l,c,u=(0,m.Z)(),g,f,w={point:h,lineStart:d,lineEnd:M,polygonStart:function(){w.point=T,w.lineStart=C,w.lineEnd=x,u.reset(),P.gL.polygonStart()},polygonEnd:function(){P.gL.polygonEnd(),w.point=h,w.lineStart=d,w.lineEnd=M,P.L9<0?(v=-(t=180),p=-(r=90)):u>L.Ho?r=90:u<-L.Ho&&(p=-90),f[0]=v,f[1]=t},sphere:function(){v=-(t=180),p=-(r=90)}};function h(y,z){g.push(f=[v=y,t=y]),zr&&(r=z)}function o(y,z){var I=(0,i.Og)([y*L.uR,z*L.uR]);if(c){var B=(0,i.T5)(c,I),k=[B[1],-B[0],0],O=(0,i.T5)(k,B);(0,i.iJ)(O),O=(0,i.Y1)(O);var N=y-s,_=N>0?1:-1,U=O[0]*L.RW*_,Y,J=(0,L.Wn)(N)>180;J^(_*sr&&(r=Y)):(U=(U+360)%360-180,J^(_*sr&&(r=z))),J?yS(v,t)&&(t=y):S(y,t)>S(v,t)&&(v=y):t>=v?(yt&&(t=y)):y>s?S(v,y)>S(v,t)&&(t=y):S(y,t)>S(v,t)&&(v=y)}else g.push(f=[v=y,t=y]);zr&&(r=z),c=I,s=y}function d(){w.point=o}function M(){f[0]=v,f[1]=t,w.point=h,c=null}function T(y,z){if(c){var I=y-s;u.add((0,L.Wn)(I)>180?I+(I>0?360:-360):I)}else n=y,l=z;P.gL.point(y,z),o(y,z)}function C(){P.gL.lineStart()}function x(){T(n,l),P.gL.lineEnd(),(0,L.Wn)(u)>L.Ho&&(v=-(t=180)),f[0]=v,f[1]=t,c=null}function S(y,z){return(z-=y)<0?z+360:z}function b(y,z){return y[0]-z[0]}function a(y,z){return y[0]<=y[1]?y[0]<=z&&z<=y[1]:zS(B[0],B[1])&&(B[1]=k[1]),S(k[0],B[1])>S(B[0],B[1])&&(B[0]=k[0])):O.push(B=k);for(N=-1/0,I=O.length-1,z=0,B=O[I];z<=I;B=k,++z)k=O[z],(_=S(B[1],k[0]))>N&&(N=_,v=k[0],t=B[1])}return g=f=null,v===1/0||p===1/0?[[NaN,NaN],[NaN,NaN]]:[[v,p],[t,r]]}},7620:function(G,V,e){e.d(V,{Og:function(){return i},T:function(){return p},T5:function(){return A},Y1:function(){return P},iJ:function(){return t},j9:function(){return L},s0:function(){return v}});var m=e(39695);function P(r){return[(0,m.fv)(r[1],r[0]),(0,m.ZR)(r[2])]}function i(r){var s=r[0],n=r[1],l=(0,m.mC)(n);return[l*(0,m.mC)(s),l*(0,m.O$)(s),(0,m.O$)(n)]}function L(r,s){return r[0]*s[0]+r[1]*s[1]+r[2]*s[2]}function A(r,s){return[r[1]*s[2]-r[2]*s[1],r[2]*s[0]-r[0]*s[2],r[0]*s[1]-r[1]*s[0]]}function v(r,s){r[0]+=s[0],r[1]+=s[1],r[2]+=s[2]}function p(r,s){return[r[0]*s,r[1]*s,r[2]*s]}function t(r){var s=(0,m._b)(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]);r[0]/=s,r[1]/=s,r[2]/=s}},66624:function(G,V,e){e.d(V,{Z:function(){return I}});var m=e(39695),P=e(73182),i=e(72736),L,A,v,p,t,r,s,n,l,c,u,g,f,w,h,o,d={sphere:P.Z,point:M,lineStart:C,lineEnd:b,polygonStart:function(){d.lineStart=a,d.lineEnd=E},polygonEnd:function(){d.lineStart=C,d.lineEnd=b}};function M(B,k){B*=m.uR,k*=m.uR;var O=(0,m.mC)(k);T(O*(0,m.mC)(B),O*(0,m.O$)(B),(0,m.O$)(k))}function T(B,k,O){++L,v+=(B-v)/L,p+=(k-p)/L,t+=(O-t)/L}function C(){d.point=x}function x(B,k){B*=m.uR,k*=m.uR;var O=(0,m.mC)(k);w=O*(0,m.mC)(B),h=O*(0,m.O$)(B),o=(0,m.O$)(k),d.point=S,T(w,h,o)}function S(B,k){B*=m.uR,k*=m.uR;var O=(0,m.mC)(k),N=O*(0,m.mC)(B),_=O*(0,m.O$)(B),U=(0,m.O$)(k),Y=(0,m.fv)((0,m._b)((Y=h*U-o*_)*Y+(Y=o*N-w*U)*Y+(Y=w*_-h*N)*Y),w*N+h*_+o*U);A+=Y,r+=Y*(w+(w=N)),s+=Y*(h+(h=_)),n+=Y*(o+(o=U)),T(w,h,o)}function b(){d.point=M}function a(){d.point=y}function E(){z(g,f),d.point=M}function y(B,k){g=B,f=k,B*=m.uR,k*=m.uR,d.point=z;var O=(0,m.mC)(k);w=O*(0,m.mC)(B),h=O*(0,m.O$)(B),o=(0,m.O$)(k),T(w,h,o)}function z(B,k){B*=m.uR,k*=m.uR;var O=(0,m.mC)(k),N=O*(0,m.mC)(B),_=O*(0,m.O$)(B),U=(0,m.O$)(k),Y=h*U-o*_,J=o*N-w*U,te=w*_-h*N,ae=(0,m._b)(Y*Y+J*J+te*te),ce=(0,m.ZR)(ae),Q=ae&&-ce/ae;l+=Q*Y,c+=Q*J,u+=Q*te,A+=ce,r+=ce*(w+(w=N)),s+=ce*(h+(h=_)),n+=ce*(o+(o=U)),T(w,h,o)}function I(B){L=A=v=p=t=r=s=n=l=c=u=0,(0,i.Z)(B,d);var k=l,O=c,N=u,_=k*k+O*O+N*N;return _0?lc)&&(l+=n*i.BZ));for(var w,h=l;n>0?h>c:h0?P.pi:-P.pi,u=(0,P.Wn)(n-p);(0,P.Wn)(u-P.pi)0?P.ou:-P.ou),v.point(r,t),v.lineEnd(),v.lineStart(),v.point(c,t),v.point(n,t),s=0):r!==c&&u>=P.pi&&((0,P.Wn)(p-r)P.Ho?(0,P.z4)(((0,P.O$)(p)*(n=(0,P.mC)(r))*(0,P.O$)(t)-(0,P.O$)(r)*(s=(0,P.mC)(p))*(0,P.O$)(v))/(s*n*l)):(p+r)/2}function A(v,p,t,r){var s;if(v==null)s=t*P.ou,r.point(-P.pi,s),r.point(0,s),r.point(P.pi,s),r.point(P.pi,0),r.point(P.pi,-s),r.point(0,-s),r.point(-P.pi,-s),r.point(-P.pi,0),r.point(-P.pi,s);else if((0,P.Wn)(v[0]-p[0])>P.Ho){var n=v[0]1&&i.push(i.pop().concat(i.shift()))},result:function(){var A=i;return i=[],L=null,A}}}},1457:function(G,V,e){e.d(V,{Z:function(){return v}});var m=e(7620),P=e(7613),i=e(39695),L=e(67108),A=e(97023);function v(p){var t=(0,i.mC)(p),r=6*i.uR,s=t>0,n=(0,i.Wn)(t)>i.Ho;function l(w,h,o,d){(0,P.m)(d,p,r,o,w,h)}function c(w,h){return(0,i.mC)(w)*(0,i.mC)(h)>t}function u(w){var h,o,d,M,T;return{lineStart:function(){M=d=!1,T=1},point:function(C,x){var S=[C,x],b,a=c(C,x),E=s?a?0:f(C,x):a?f(C+(C<0?i.pi:-i.pi),x):0;if(!h&&(M=d=a)&&w.lineStart(),a!==d&&(b=g(h,S),(!b||(0,L.Z)(h,b)||(0,L.Z)(S,b))&&(S[2]=1)),a!==d)T=0,a?(w.lineStart(),b=g(S,h),w.point(b[0],b[1])):(b=g(h,S),w.point(b[0],b[1],2),w.lineEnd()),h=b;else if(n&&h&&s^a){var y;!(E&o)&&(y=g(S,h,!0))&&(T=0,s?(w.lineStart(),w.point(y[0][0],y[0][1]),w.point(y[1][0],y[1][1]),w.lineEnd()):(w.point(y[1][0],y[1][1]),w.lineEnd(),w.lineStart(),w.point(y[0][0],y[0][1],3)))}a&&(!h||!(0,L.Z)(h,S))&&w.point(S[0],S[1]),h=S,d=a,o=E},lineEnd:function(){d&&w.lineEnd(),h=null},clean:function(){return T|(M&&d)<<1}}}function g(w,h,o){var d=(0,m.Og)(w),M=(0,m.Og)(h),T=[1,0,0],C=(0,m.T5)(d,M),x=(0,m.j9)(C,C),S=C[0],b=x-S*S;if(!b)return!o&&w;var a=t*x/b,E=-t*S/b,y=(0,m.T5)(T,C),z=(0,m.T)(T,a),I=(0,m.T)(C,E);(0,m.s0)(z,I);var B=y,k=(0,m.j9)(z,B),O=(0,m.j9)(B,B),N=k*k-O*((0,m.j9)(z,z)-1);if(!(N<0)){var _=(0,i._b)(N),U=(0,m.T)(B,(-k-_)/O);if((0,m.s0)(U,z),U=(0,m.Y1)(U),!o)return U;var Y=w[0],J=h[0],te=w[1],ae=h[1],ce;J0^U[1]<((0,i.Wn)(U[0]-Y)i.pi^(Y<=U[0]&&U[0]<=J)){var K=(0,m.T)(B,(-k+_)/O);return(0,m.s0)(K,z),[U,(0,m.Y1)(K)]}}}function f(w,h){var o=s?p:i.pi-p,d=0;return w<-o?d|=1:w>o&&(d|=2),h<-o?d|=4:h>o&&(d|=8),d}return(0,A.Z)(c,u,l,s?[0,-p]:[-i.pi,p-i.pi])}},97023:function(G,V,e){e.d(V,{Z:function(){return v}});var m=e(85272),P=e(46225),i=e(39695),L=e(23071),A=e(33064);function v(r,s,n,l){return function(c){var u=s(c),g=(0,m.Z)(),f=s(g),w=!1,h,o,d,M={point:T,lineStart:x,lineEnd:S,polygonStart:function(){M.point=b,M.lineStart=a,M.lineEnd=E,o=[],h=[]},polygonEnd:function(){M.point=T,M.lineStart=x,M.lineEnd=S,o=(0,A.TS)(o);var y=(0,L.Z)(h,l);o.length?(w||(c.polygonStart(),w=!0),(0,P.Z)(o,t,y,n,c)):y&&(w||(c.polygonStart(),w=!0),c.lineStart(),n(null,null,1,c),c.lineEnd()),w&&(c.polygonEnd(),w=!1),o=h=null},sphere:function(){c.polygonStart(),c.lineStart(),n(null,null,1,c),c.lineEnd(),c.polygonEnd()}};function T(y,z){r(y,z)&&c.point(y,z)}function C(y,z){u.point(y,z)}function x(){M.point=C,u.lineStart()}function S(){M.point=T,u.lineEnd()}function b(y,z){d.push([y,z]),f.point(y,z)}function a(){f.lineStart(),d=[]}function E(){b(d[0][0],d[0][1]),f.lineEnd();var y=f.clean(),z=g.result(),I,B=z.length,k,O,N;if(d.pop(),h.push(d),d=null,!!B){if(y&1){if(O=z[0],(k=O.length-1)>0){for(w||(c.polygonStart(),w=!0),c.lineStart(),I=0;I1&&y&2&&z.push(z.pop().concat(z.shift())),o.push(z.filter(p))}}return M}}function p(r){return r.length>1}function t(r,s){return((r=r.x)[0]<0?r[1]-i.ou-i.Ho:i.ou-r[1])-((s=s.x)[0]<0?s[1]-i.ou-i.Ho:i.ou-s[1])}},87605:function(G,V,e){e.d(V,{Z:function(){return t}});var m=e(39695),P=e(85272);function i(r,s,n,l,c,u){var g=r[0],f=r[1],w=s[0],h=s[1],o=0,d=1,M=w-g,T=h-f,C;if(C=n-g,!(!M&&C>0)){if(C/=M,M<0){if(C0){if(C>d)return;C>o&&(o=C)}if(C=c-g,!(!M&&C<0)){if(C/=M,M<0){if(C>d)return;C>o&&(o=C)}else if(M>0){if(C0)){if(C/=T,T<0){if(C0){if(C>d)return;C>o&&(o=C)}if(C=u-f,!(!T&&C<0)){if(C/=T,T<0){if(C>d)return;C>o&&(o=C)}else if(T>0){if(C0&&(r[0]=g+o*M,r[1]=f+o*T),d<1&&(s[0]=g+d*M,s[1]=f+d*T),!0}}}}}var L=e(46225),A=e(33064),v=1e9,p=-v;function t(r,s,n,l){function c(h,o){return r<=h&&h<=n&&s<=o&&o<=l}function u(h,o,d,M){var T=0,C=0;if(h==null||(T=g(h,d))!==(C=g(o,d))||w(h,o)<0^d>0)do M.point(T===0||T===3?r:n,T>1?l:s);while((T=(T+d+4)%4)!==C);else M.point(o[0],o[1])}function g(h,o){return(0,m.Wn)(h[0]-r)0?0:3:(0,m.Wn)(h[0]-n)0?2:1:(0,m.Wn)(h[1]-s)0?1:0:o>0?3:2}function f(h,o){return w(h.x,o.x)}function w(h,o){var d=g(h,1),M=g(o,1);return d!==M?d-M:d===0?o[1]-h[1]:d===1?h[0]-o[0]:d===2?h[1]-o[1]:o[0]-h[0]}return function(h){var o=h,d=(0,P.Z)(),M,T,C,x,S,b,a,E,y,z,I,B={point:k,lineStart:U,lineEnd:Y,polygonStart:N,polygonEnd:_};function k(te,ae){c(te,ae)&&o.point(te,ae)}function O(){for(var te=0,ae=0,ce=T.length;ael&&(q-ee)*(l-oe)>($-oe)*(r-ee)&&++te:$<=l&&(q-ee)*(l-oe)<($-oe)*(r-ee)&&--te;return te}function N(){o=d,M=[],T=[],I=!0}function _(){var te=O(),ae=I&&te,ce=(M=(0,A.TS)(M)).length;(ae||ce)&&(h.polygonStart(),ae&&(h.lineStart(),u(null,null,1,h),h.lineEnd()),ce&&(0,L.Z)(M,f,te,u,h),h.polygonEnd()),o=h,M=T=C=null}function U(){B.point=J,T&&T.push(C=[]),z=!0,y=!1,a=E=NaN}function Y(){M&&(J(x,S),b&&y&&d.rejoin(),M.push(d.result())),B.point=k,y&&o.lineEnd()}function J(te,ae){var ce=c(te,ae);if(T&&C.push([te,ae]),z)x=te,S=ae,b=ce,z=!1,ce&&(o.lineStart(),o.point(te,ae));else if(ce&&y)o.point(te,ae);else{var Q=[a=Math.max(p,Math.min(v,a)),E=Math.max(p,Math.min(v,E))],Z=[te=Math.max(p,Math.min(v,te)),ae=Math.max(p,Math.min(v,ae))];i(Q,Z,r,s,n,l)?(y||(o.lineStart(),o.point(Q[0],Q[1])),o.point(Z[0],Z[1]),ce||o.lineEnd(),I=!1):ce&&(o.lineStart(),o.point(te,ae),I=!1)}a=te,E=ae,y=ce}return B}}},46225:function(G,V,e){e.d(V,{Z:function(){return L}});var m=e(67108),P=e(39695);function i(v,p,t,r){this.x=v,this.z=p,this.o=t,this.e=r,this.v=!1,this.n=this.p=null}function L(v,p,t,r,s){var n=[],l=[],c,u;if(v.forEach(function(d){if(!((M=d.length-1)<=0)){var M,T=d[0],C=d[M],x;if((0,m.Z)(T,C)){if(!T[2]&&!C[2]){for(s.lineStart(),c=0;c=0;--c)s.point((w=f[c])[0],w[1]);else r(h.x,h.p.x,-1,s);h=h.p}h=h.o,f=h.z,o=!o}while(!h.v);s.lineEnd()}}}function A(v){if(p=v.length){for(var p,t=0,r=v[0],s;++t0&&(qr=b(xr[vn],xr[vn-1]),qr>0&&Or<=qr&&Nr<=qr&&(Or+Nr-qr)*(1-Math.pow((Or-Nr)/qr,2))n.Ho}).map(ta)).concat((0,_.w6)((0,n.mD)(vn/jn)*jn,qr,jn).filter(function(En){return(0,n.Wn)(En%sa)>n.Ho}).map(ea))}return gn.lines=function(){return Un().map(function(En){return{type:"LineString",coordinates:En}})},gn.outline=function(){return{type:"Polygon",coordinates:[Mr(Nr).concat(on(fn).slice(1),Mr(Or).reverse().slice(1),on(Tn).reverse().slice(1))]}},gn.extent=function(En){return arguments.length?gn.extentMajor(En).extentMinor(En):gn.extentMinor()},gn.extentMajor=function(En){return arguments.length?(Nr=+En[0][0],Or=+En[1][0],Tn=+En[0][1],fn=+En[1][1],Nr>Or&&(En=Nr,Nr=Or,Or=En),Tn>fn&&(En=Tn,Tn=fn,fn=En),gn.precision(nn)):[[Nr,Tn],[Or,fn]]},gn.extentMinor=function(En){return arguments.length?(Ar=+En[0][0],xr=+En[1][0],vn=+En[0][1],qr=+En[1][1],Ar>xr&&(En=Ar,Ar=xr,xr=En),vn>qr&&(En=vn,vn=qr,qr=En),gn.precision(nn)):[[Ar,vn],[xr,qr]]},gn.step=function(En){return arguments.length?gn.stepMajor(En).stepMinor(En):gn.stepMinor()},gn.stepMajor=function(En){return arguments.length?(qn=+En[0],sa=+En[1],gn):[qn,sa]},gn.stepMinor=function(En){return arguments.length?(Pn=+En[0],jn=+En[1],gn):[Pn,jn]},gn.precision=function(En){return arguments.length?(nn=+En,ta=U(vn,qr,90),ea=Y(Ar,xr,nn),Mr=U(Tn,fn,90),on=Y(Nr,Or,nn),gn):nn},gn.extentMajor([[-180,-90+n.Ho],[180,90-n.Ho]]).extentMinor([[-180,-80-n.Ho],[180,80+n.Ho]])}function te(){return J()()}var ae=e(83074),ce=e(8593),Q=(0,s.Z)(),Z=(0,s.Z)(),j,K,ee,oe,q={point:l.Z,lineStart:l.Z,lineEnd:l.Z,polygonStart:function(){q.lineStart=$,q.lineEnd=he},polygonEnd:function(){q.lineStart=q.lineEnd=q.point=l.Z,Q.add((0,n.Wn)(Z)),Z.reset()},result:function(){var xr=Q/2;return Q.reset(),xr}};function $(){q.point=le}function le(xr,Ar){q.point=ie,j=ee=xr,K=oe=Ar}function ie(xr,Ar){Z.add(oe*xr-ee*Ar),ee=xr,oe=Ar}function he(){ie(j,K)}var me=q,Me=e(3559),Te=0,Oe=0,Ne=0,Ee=0,xe=0,Se=0,Ue=0,He=0,Fe=0,Ge,nt,qe,$e,et={point:ct,lineStart:dt,lineEnd:Mt,polygonStart:function(){et.lineStart=Vt,et.lineEnd=Je},polygonEnd:function(){et.point=ct,et.lineStart=dt,et.lineEnd=Mt},result:function(){var xr=Fe?[Ue/Fe,He/Fe]:Se?[Ee/Se,xe/Se]:Ne?[Te/Ne,Oe/Ne]:[NaN,NaN];return Te=Oe=Ne=Ee=xe=Se=Ue=He=Fe=0,xr}};function ct(xr,Ar){Te+=xr,Oe+=Ar,++Ne}function dt(){et.point=pt}function pt(xr,Ar){et.point=At,ct(qe=xr,$e=Ar)}function At(xr,Ar){var Or=xr-qe,Nr=Ar-$e,qr=(0,n._b)(Or*Or+Nr*Nr);Ee+=qr*(qe+xr)/2,xe+=qr*($e+Ar)/2,Se+=qr,ct(qe=xr,$e=Ar)}function Mt(){et.point=ct}function Vt(){et.point=De}function Je(){Ie(Ge,nt)}function De(xr,Ar){et.point=Ie,ct(Ge=qe=xr,nt=$e=Ar)}function Ie(xr,Ar){var Or=xr-qe,Nr=Ar-$e,qr=(0,n._b)(Or*Or+Nr*Nr);Ee+=qr*(qe+xr)/2,xe+=qr*($e+Ar)/2,Se+=qr,qr=$e*xr-qe*Ar,Ue+=qr*(qe+xr),He+=qr*($e+Ar),Fe+=qr*3,ct(qe=xr,$e=Ar)}var ze=et;function Pe(xr){this._context=xr}Pe.prototype={_radius:4.5,pointRadius:function(xr){return this._radius=xr,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(xr,Ar){switch(this._point){case 0:{this._context.moveTo(xr,Ar),this._point=1;break}case 1:{this._context.lineTo(xr,Ar);break}default:{this._context.moveTo(xr+this._radius,Ar),this._context.arc(xr,Ar,this._radius,0,n.BZ);break}}},result:l.Z};var be=(0,s.Z)(),se,ye,Le,Be,ot,at={point:l.Z,lineStart:function(){at.point=wt},lineEnd:function(){se&&It(ye,Le),at.point=l.Z},polygonStart:function(){se=!0},polygonEnd:function(){se=null},result:function(){var xr=+be;return be.reset(),xr}};function wt(xr,Ar){at.point=It,ye=Be=xr,Le=ot=Ar}function It(xr,Ar){Be-=xr,ot-=Ar,be.add((0,n._b)(Be*Be+ot*ot)),Be=xr,ot=Ar}var Bt=at;function Gt(){this._string=[]}Gt.prototype={_radius:4.5,_circle:Lt(4.5),pointRadius:function(xr){return(xr=+xr)!==this._radius&&(this._radius=xr,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(xr,Ar){switch(this._point){case 0:{this._string.push("M",xr,",",Ar),this._point=1;break}case 1:{this._string.push("L",xr,",",Ar);break}default:{this._circle==null&&(this._circle=Lt(this._radius)),this._string.push("M",xr,",",Ar,this._circle);break}}},result:function(){if(this._string.length){var xr=this._string.join("");return this._string=[],xr}else return null}};function Lt(xr){return"m0,"+xr+"a"+xr+","+xr+" 0 1,1 0,"+-2*xr+"a"+xr+","+xr+" 0 1,1 0,"+2*xr+"z"}function Kt(xr,Ar){var Or=4.5,Nr,qr;function vn(fn){return fn&&(typeof Or=="function"&&qr.pointRadius(+Or.apply(this,arguments)),(0,c.Z)(fn,Nr(qr))),qr.result()}return vn.area=function(fn){return(0,c.Z)(fn,Nr(me)),me.result()},vn.measure=function(fn){return(0,c.Z)(fn,Nr(Bt)),Bt.result()},vn.bounds=function(fn){return(0,c.Z)(fn,Nr(Me.Z)),Me.Z.result()},vn.centroid=function(fn){return(0,c.Z)(fn,Nr(ze)),ze.result()},vn.projection=function(fn){return arguments.length?(Nr=fn==null?(xr=null,ce.Z):(xr=fn).stream,vn):xr},vn.context=function(fn){return arguments.length?(qr=fn==null?(Ar=null,new Gt):new Pe(Ar=fn),typeof Or!="function"&&qr.pointRadius(Or),vn):Ar},vn.pointRadius=function(fn){return arguments.length?(Or=typeof fn=="function"?fn:(qr.pointRadius(+fn),+fn),vn):Or},vn.projection(xr).context(Ar)}var ir=e(15002);function _r(xr){var Ar=0,Or=n.pi/3,Nr=(0,ir.r)(xr),qr=Nr(Ar,Or);return qr.parallels=function(vn){return arguments.length?Nr(Ar=vn[0]*n.uR,Or=vn[1]*n.uR):[Ar*n.RW,Or*n.RW]},qr}function yt(xr){var Ar=(0,n.mC)(xr);function Or(Nr,qr){return[Nr*Ar,(0,n.O$)(qr)/Ar]}return Or.invert=function(Nr,qr){return[Nr/Ar,(0,n.ZR)(qr*Ar)]},Or}function jt(xr,Ar){var Or=(0,n.O$)(xr),Nr=(Or+(0,n.O$)(Ar))/2;if((0,n.Wn)(Nr)=.12&&nn<.234&&on>=-.425&&on<-.214?qr:nn>=.166&&nn<.234&&on>=-.214&&on<-.115?fn:Or).invert(ta)},qn.stream=function(ta){return xr&&Ar===ta?xr:xr=ut([Or.stream(Ar=ta),qr.stream(ta),fn.stream(ta)])},qn.precision=function(ta){return arguments.length?(Or.precision(ta),qr.precision(ta),fn.precision(ta),sa()):Or.precision()},qn.scale=function(ta){return arguments.length?(Or.scale(ta),qr.scale(ta*.35),fn.scale(ta),qn.translate(Or.translate())):Or.scale()},qn.translate=function(ta){if(!arguments.length)return Or.translate();var ea=Or.scale(),Mr=+ta[0],on=+ta[1];return Nr=Or.translate(ta).clipExtent([[Mr-.455*ea,on-.238*ea],[Mr+.455*ea,on+.238*ea]]).stream(jn),vn=qr.translate([Mr-.307*ea,on+.201*ea]).clipExtent([[Mr-.425*ea+n.Ho,on+.12*ea+n.Ho],[Mr-.214*ea-n.Ho,on+.234*ea-n.Ho]]).stream(jn),Tn=fn.translate([Mr-.205*ea,on+.212*ea]).clipExtent([[Mr-.214*ea+n.Ho,on+.166*ea+n.Ho],[Mr-.115*ea-n.Ho,on+.234*ea-n.Ho]]).stream(jn),sa()},qn.fitExtent=function(ta,ea){return(0,hr.qg)(qn,ta,ea)},qn.fitSize=function(ta,ea){return(0,hr.mF)(qn,ta,ea)},qn.fitWidth=function(ta,ea){return(0,hr.V6)(qn,ta,ea)},qn.fitHeight=function(ta,ea){return(0,hr.rf)(qn,ta,ea)};function sa(){return xr=Ar=null,qn}return qn.scale(1070)}var xt=e(12956),Tt=e(17889),Ct=e(49386);function St(xr,Ar){return[xr,(0,n.cM)((0,n.OR)((n.ou+Ar)/2))]}St.invert=function(xr,Ar){return[xr,2*(0,n.z4)((0,n.Qq)(Ar))-n.ou]};function _t(){return Ht(St).scale(961/n.BZ)}function Ht(xr){var Ar=(0,ir.Z)(xr),Or=Ar.center,Nr=Ar.scale,qr=Ar.translate,vn=Ar.clipExtent,fn=null,Tn,Pn,jn;Ar.scale=function(sa){return arguments.length?(Nr(sa),qn()):Nr()},Ar.translate=function(sa){return arguments.length?(qr(sa),qn()):qr()},Ar.center=function(sa){return arguments.length?(Or(sa),qn()):Or()},Ar.clipExtent=function(sa){return arguments.length?(sa==null?fn=Tn=Pn=jn=null:(fn=+sa[0][0],Tn=+sa[0][1],Pn=+sa[1][0],jn=+sa[1][1]),qn()):fn==null?null:[[fn,Tn],[Pn,jn]]};function qn(){var sa=n.pi*Nr(),ta=Ar((0,Ct.Z)(Ar.rotate()).invert([0,0]));return vn(fn==null?[[ta[0]-sa,ta[1]-sa],[ta[0]+sa,ta[1]+sa]]:xr===St?[[Math.max(ta[0]-sa,fn),Tn],[Math.min(ta[0]+sa,Pn),jn]]:[[fn,Math.max(ta[1]-sa,Tn)],[Pn,Math.min(ta[1]+sa,jn)]])}return qn()}function $t(xr){return(0,n.OR)((n.ou+xr)/2)}function Qt(xr,Ar){var Or=(0,n.mC)(xr),Nr=xr===Ar?(0,n.O$)(xr):(0,n.cM)(Or/(0,n.mC)(Ar))/(0,n.cM)($t(Ar)/$t(xr)),qr=Or*(0,n.sQ)($t(xr),Nr)/Nr;if(!Nr)return St;function vn(fn,Tn){qr>0?Tn<-n.ou+n.Ho&&(Tn=-n.ou+n.Ho):Tn>n.ou-n.Ho&&(Tn=n.ou-n.Ho);var Pn=qr/(0,n.sQ)($t(Tn),Nr);return[Pn*(0,n.O$)(Nr*fn),qr-Pn*(0,n.mC)(Nr*fn)]}return vn.invert=function(fn,Tn){var Pn=qr-Tn,jn=(0,n.Xx)(Nr)*(0,n._b)(fn*fn+Pn*Pn),qn=(0,n.fv)(fn,(0,n.Wn)(Pn))*(0,n.Xx)(Pn);return Pn*Nr<0&&(qn-=n.pi*(0,n.Xx)(fn)*(0,n.Xx)(Pn)),[qn/Nr,2*(0,n.z4)((0,n.sQ)(qr/jn,1/Nr))-n.ou]},vn}function or(){return _r(Qt).scale(109.5).parallels([30,30])}var Er=e(97492);function Ye(xr,Ar){var Or=(0,n.mC)(xr),Nr=xr===Ar?(0,n.O$)(xr):(Or-(0,n.mC)(Ar))/(Ar-xr),qr=Or/Nr+xr;if((0,n.Wn)(Nr)2?Nr[2]+90:90]):(Nr=Or(),[Nr[0],Nr[1],Nr[2]-90])},Or([0,0,90]).scale(159.155)}},83074:function(G,V,e){e.d(V,{Z:function(){return P}});var m=e(39695);function P(i,L){var A=i[0]*m.uR,v=i[1]*m.uR,p=L[0]*m.uR,t=L[1]*m.uR,r=(0,m.mC)(v),s=(0,m.O$)(v),n=(0,m.mC)(t),l=(0,m.O$)(t),c=r*(0,m.mC)(A),u=r*(0,m.O$)(A),g=n*(0,m.mC)(p),f=n*(0,m.O$)(p),w=2*(0,m.ZR)((0,m._b)((0,m.Jy)(t-v)+r*n*(0,m.Jy)(p-A))),h=(0,m.O$)(w),o=w?function(d){var M=(0,m.O$)(d*=w)/h,T=(0,m.O$)(w-d)/h,C=T*c+M*g,x=T*u+M*f,S=T*s+M*l;return[(0,m.fv)(x,C)*m.RW,(0,m.fv)(S,(0,m._b)(C*C+x*x))*m.RW]}:function(){return[A*m.RW,v*m.RW]};return o.distance=w,o}},39695:function(G,V,e){e.d(V,{BZ:function(){return v},Ho:function(){return m},Jy:function(){return C},Kh:function(){return M},O$:function(){return w},OR:function(){return d},Qq:function(){return u},RW:function(){return p},Wn:function(){return r},Xx:function(){return h},ZR:function(){return T},_b:function(){return o},aW:function(){return P},cM:function(){return g},fv:function(){return n},mC:function(){return l},mD:function(){return c},ou:function(){return L},pi:function(){return i},pu:function(){return A},sQ:function(){return f},uR:function(){return t},z4:function(){return s}});var m=1e-6,P=1e-12,i=Math.PI,L=i/2,A=i/4,v=i*2,p=180/i,t=i/180,r=Math.abs,s=Math.atan,n=Math.atan2,l=Math.cos,c=Math.ceil,u=Math.exp,g=Math.log,f=Math.pow,w=Math.sin,h=Math.sign||function(x){return x>0?1:x<0?-1:0},o=Math.sqrt,d=Math.tan;function M(x){return x>1?0:x<-1?i:Math.acos(x)}function T(x){return x>1?L:x<-1?-L:Math.asin(x)}function C(x){return(x=w(x/2))*x}},73182:function(G,V,e){e.d(V,{Z:function(){return m}});function m(){}},3559:function(G,V,e){var m=e(73182),P=1/0,i=P,L=-P,A=L,v={point:p,lineStart:m.Z,lineEnd:m.Z,polygonStart:m.Z,polygonEnd:m.Z,result:function(){var t=[[P,i],[L,A]];return L=A=-(i=P=1/0),t}};function p(t,r){tL&&(L=t),rA&&(A=r)}V.Z=v},67108:function(G,V,e){e.d(V,{Z:function(){return P}});var m=e(39695);function P(i,L){return(0,m.Wn)(i[0]-L[0])=0?1:-1,B=I*z,k=B>i.pi,O=T*E;if(L.add((0,i.fv)(O*I*(0,i.O$)(B),C*y+O*(0,i.mC)(B))),c+=k?z+I*i.BZ:z,k^d>=r^b>=r){var N=(0,P.T5)((0,P.Og)(o),(0,P.Og)(S));(0,P.iJ)(N);var _=(0,P.T5)(l,N);(0,P.iJ)(_);var U=(k^z>=0?-1:1)*(0,i.ZR)(_[2]);(s>U||s===U&&(N[0]||N[1]))&&(u+=k^z>=0?1:-1)}}return(c<-i.Ho||c4*C&&U--){var ce=E+O,Q=y+N,Z=z+_,j=(0,v._b)(ce*ce+Q*Q+Z*Z),K=(0,v.ZR)(Z/=j),ee=(0,v.Wn)((0,v.Wn)(Z)-1)C||(0,v.Wn)((J*le+te*ie)/ae-.5)>.3||E*O+y*N+z*_2?he[2]%360*v.uR:0,le()):[y*v.RW,z*v.RW,I*v.RW]},q.angle=function(he){return arguments.length?(k=he%360*v.uR,le()):k*v.RW},q.reflectX=function(he){return arguments.length?(O=he?-1:1,le()):O<0},q.reflectY=function(he){return arguments.length?(N=he?-1:1,le()):N<0},q.precision=function(he){return arguments.length?(Z=c(j,Q=he*he),ie()):(0,v._b)(Q)},q.fitExtent=function(he,me){return(0,r.qg)(q,he,me)},q.fitSize=function(he,me){return(0,r.mF)(q,he,me)},q.fitWidth=function(he,me){return(0,r.V6)(q,he,me)},q.fitHeight=function(he,me){return(0,r.rf)(q,he,me)};function le(){var he=o(x,0,0,O,N,k).apply(null,C(a,E)),me=(k?o:h)(x,S-he[0],b-he[1],O,N,k);return B=(0,p.I)(y,z,I),j=(0,L.Z)(C,me),K=(0,L.Z)(B,j),Z=c(j,Q),ie()}function ie(){return ee=oe=null,q}return function(){return C=T.apply(this,arguments),q.invert=C.invert&&$,le()}}},26867:function(G,V,e){e.d(V,{K:function(){return i},Z:function(){return L}});var m=e(15002),P=e(39695);function i(A,v){var p=v*v,t=p*p;return[A*(.8707-.131979*p+t*(-.013791+t*(.003971*p-.001529*t))),v*(1.007226+p*(.015085+t*(-.044475+.028874*p-.005916*t)))]}i.invert=function(A,v){var p=v,t=25,r;do{var s=p*p,n=s*s;p-=r=(p*(1.007226+s*(.015085+n*(-.044475+.028874*s-.005916*n)))-v)/(1.007226+s*(.045255+n*(-.311325+.259866*s-.06507600000000001*n)))}while((0,P.Wn)(r)>P.Ho&&--t>0);return[A/(.8707+(s=p*p)*(-.131979+s*(-.013791+s*s*s*(.003971-.001529*s)))),p]};function L(){return(0,m.Z)(i).scale(175.295)}},57962:function(G,V,e){e.d(V,{I:function(){return L},Z:function(){return A}});var m=e(39695),P=e(25382),i=e(15002);function L(v,p){return[(0,m.mC)(p)*(0,m.O$)(v),(0,m.O$)(p)]}L.invert=(0,P.O)(m.ZR);function A(){return(0,i.Z)(L).scale(249.5).clipAngle(90+m.Ho)}},49386:function(G,V,e){e.d(V,{I:function(){return L},Z:function(){return t}});var m=e(96059),P=e(39695);function i(r,s){return[(0,P.Wn)(r)>P.pi?r+Math.round(-r/P.BZ)*P.BZ:r,s]}i.invert=i;function L(r,s,n){return(r%=P.BZ)?s||n?(0,m.Z)(v(r),p(s,n)):v(r):s||n?p(s,n):i}function A(r){return function(s,n){return s+=r,[s>P.pi?s-P.BZ:s<-P.pi?s+P.BZ:s,n]}}function v(r){var s=A(r);return s.invert=A(-r),s}function p(r,s){var n=(0,P.mC)(r),l=(0,P.O$)(r),c=(0,P.mC)(s),u=(0,P.O$)(s);function g(f,w){var h=(0,P.mC)(w),o=(0,P.mC)(f)*h,d=(0,P.O$)(f)*h,M=(0,P.O$)(w),T=M*n+o*l;return[(0,P.fv)(d*c-T*u,o*n-M*l),(0,P.ZR)(T*c+d*u)]}return g.invert=function(f,w){var h=(0,P.mC)(w),o=(0,P.mC)(f)*h,d=(0,P.O$)(f)*h,M=(0,P.O$)(w),T=M*c-d*u;return[(0,P.fv)(d*c+M*u,o*n+T*l),(0,P.ZR)(T*n-o*l)]},g}function t(r){r=L(r[0]*P.uR,r[1]*P.uR,r.length>2?r[2]*P.uR:0);function s(n){return n=r(n[0]*P.uR,n[1]*P.uR),n[0]*=P.RW,n[1]*=P.RW,n}return s.invert=function(n){return n=r.invert(n[0]*P.uR,n[1]*P.uR),n[0]*=P.RW,n[1]*=P.RW,n},s}},72736:function(G,V,e){e.d(V,{Z:function(){return v}});function m(p,t){p&&i.hasOwnProperty(p.type)&&i[p.type](p,t)}var P={Feature:function(p,t){m(p.geometry,t)},FeatureCollection:function(p,t){for(var r=p.features,s=-1,n=r.length;++s=0;)be+=se[ye].value;Pe.value=be}function s(){return this.eachAfter(r)}function n(Pe){var be=this,se,ye=[be],Le,Be,ot;do for(se=ye.reverse(),ye=[];be=se.pop();)if(Pe(be),Le=be.children,Le)for(Be=0,ot=Le.length;Be=0;--Le)se.push(ye[Le]);return this}function c(Pe){for(var be=this,se=[be],ye=[],Le,Be,ot;be=se.pop();)if(ye.push(be),Le=be.children,Le)for(Be=0,ot=Le.length;Be=0;)se+=ye[Le].value;be.value=se})}function g(Pe){return this.eachBefore(function(be){be.children&&be.children.sort(Pe)})}function f(Pe){for(var be=this,se=w(be,Pe),ye=[be];be!==se;)be=be.parent,ye.push(be);for(var Le=ye.length;Pe!==se;)ye.splice(Le,0,Pe),Pe=Pe.parent;return ye}function w(Pe,be){if(Pe===be)return Pe;var se=Pe.ancestors(),ye=be.ancestors(),Le=null;for(Pe=se.pop(),be=ye.pop();Pe===be;)Le=Pe,Pe=se.pop(),be=ye.pop();return Le}function h(){for(var Pe=this,be=[Pe];Pe=Pe.parent;)be.push(Pe);return be}function o(){var Pe=[];return this.each(function(be){Pe.push(be)}),Pe}function d(){var Pe=[];return this.eachBefore(function(be){be.children||Pe.push(be)}),Pe}function M(){var Pe=this,be=[];return Pe.each(function(se){se!==Pe&&be.push({source:se.parent,target:se})}),be}function T(Pe,be){var se=new a(Pe),ye=+Pe.value&&(se.value=Pe.value),Le,Be=[se],ot,at,wt,It;for(be==null&&(be=x);Le=Be.pop();)if(ye&&(Le.value=+Le.data.value),(at=be(Le.data))&&(It=at.length))for(Le.children=new Array(It),wt=It-1;wt>=0;--wt)Be.push(ot=Le.children[wt]=new a(at[wt])),ot.parent=Le,ot.depth=Le.depth+1;return se.eachBefore(b)}function C(){return T(this).eachBefore(S)}function x(Pe){return Pe.children}function S(Pe){Pe.data=Pe.data.data}function b(Pe){var be=0;do Pe.height=be;while((Pe=Pe.parent)&&Pe.height<++be)}function a(Pe){this.data=Pe,this.depth=this.height=0,this.parent=null}a.prototype=T.prototype={constructor:a,count:s,each:n,eachAfter:c,eachBefore:l,sum:u,sort:g,path:f,ancestors:h,descendants:o,leaves:d,links:M,copy:C};var E=Array.prototype.slice;function y(Pe){for(var be=Pe.length,se,ye;be;)ye=Math.random()*be--|0,se=Pe[be],Pe[be]=Pe[ye],Pe[ye]=se;return Pe}function z(Pe){for(var be=0,se=(Pe=y(E.call(Pe))).length,ye=[],Le,Be;be0&&se*se>ye*ye+Le*Le}function O(Pe,be){for(var se=0;sewt?(Le=(It+wt-Be)/(2*It),at=Math.sqrt(Math.max(0,wt/It-Le*Le)),se.x=Pe.x-Le*ye-at*ot,se.y=Pe.y-Le*ot+at*ye):(Le=(It+Be-wt)/(2*It),at=Math.sqrt(Math.max(0,Be/It-Le*Le)),se.x=be.x+Le*ye-at*ot,se.y=be.y+Le*ot+at*ye)):(se.x=be.x+se.r,se.y=be.y)}function te(Pe,be){var se=Pe.r+be.r-1e-6,ye=be.x-Pe.x,Le=be.y-Pe.y;return se>0&&se*se>ye*ye+Le*Le}function ae(Pe){var be=Pe._,se=Pe.next._,ye=be.r+se.r,Le=(be.x*se.r+se.x*be.r)/ye,Be=(be.y*se.r+se.y*be.r)/ye;return Le*Le+Be*Be}function ce(Pe){this._=Pe,this.next=null,this.previous=null}function Q(Pe){if(!(Le=Pe.length))return 0;var be,se,ye,Le,Be,ot,at,wt,It,Bt,Gt;if(be=Pe[0],be.x=0,be.y=0,!(Le>1))return be.r;if(se=Pe[1],be.x=-se.r,se.x=be.r,se.y=0,!(Le>2))return be.r+se.r;J(se,be,ye=Pe[2]),be=new ce(be),se=new ce(se),ye=new ce(ye),be.next=ye.previous=se,se.next=be.previous=ye,ye.next=se.previous=be;e:for(at=3;at0)throw new Error("cycle");return at}return se.id=function(ye){return arguments.length?(Pe=K(ye),se):Pe},se.parentId=function(ye){return arguments.length?(be=K(ye),se):be},se}function He(Pe,be){return Pe.parent===be.parent?1:2}function Fe(Pe){var be=Pe.children;return be?be[0]:Pe.t}function Ge(Pe){var be=Pe.children;return be?be[be.length-1]:Pe.t}function nt(Pe,be,se){var ye=se/(be.i-Pe.i);be.c-=ye,be.s+=se,Pe.c+=ye,be.z+=se,be.m+=se}function qe(Pe){for(var be=0,se=0,ye=Pe.children,Le=ye.length,Be;--Le>=0;)Be=ye[Le],Be.z+=be,Be.m+=be,be+=Be.s+(se+=Be.c)}function $e(Pe,be,se){return Pe.a.parent===be.parent?Pe.a:se}function et(Pe,be){this._=Pe,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=be}et.prototype=Object.create(a.prototype);function ct(Pe){for(var be=new et(Pe,0),se,ye=[be],Le,Be,ot,at;se=ye.pop();)if(Be=se._.children)for(se.children=new Array(at=Be.length),ot=at-1;ot>=0;--ot)ye.push(Le=se.children[ot]=new et(Be[ot],ot)),Le.parent=se;return(be.parent=new et(null,0)).children=[be],be}function dt(){var Pe=He,be=1,se=1,ye=null;function Le(It){var Bt=ct(It);if(Bt.eachAfter(Be),Bt.parent.m=-Bt.z,Bt.eachBefore(ot),ye)It.eachBefore(wt);else{var Gt=It,Lt=It,Kt=It;It.eachBefore(function(Yt){Yt.xLt.x&&(Lt=Yt),Yt.depth>Kt.depth&&(Kt=Yt)});var ir=Gt===Lt?1:Pe(Gt,Lt)/2,_r=ir-Gt.x,yt=be/(Lt.x+ir+_r),jt=se/(Kt.depth||1);It.eachBefore(function(Yt){Yt.x=(Yt.x+_r)*yt,Yt.y=Yt.depth*jt})}return It}function Be(It){var Bt=It.children,Gt=It.parent.children,Lt=It.i?Gt[It.i-1]:null;if(Bt){qe(It);var Kt=(Bt[0].z+Bt[Bt.length-1].z)/2;Lt?(It.z=Lt.z+Pe(It._,Lt._),It.m=It.z-Kt):It.z=Kt}else Lt&&(It.z=Lt.z+Pe(It._,Lt._));It.parent.A=at(It,Lt,It.parent.A||Gt[0])}function ot(It){It._.x=It.z+It.parent.m,It.m+=It.parent.m}function at(It,Bt,Gt){if(Bt){for(var Lt=It,Kt=It,ir=Bt,_r=Lt.parent.children[0],yt=Lt.m,jt=Kt.m,Yt=ir.m,br=_r.m,hr;ir=Ge(ir),Lt=Fe(Lt),ir&≪)_r=Fe(_r),Kt=Ge(Kt),Kt.a=It,hr=ir.z+Yt-Lt.z-yt+Pe(ir._,Lt._),hr>0&&(nt($e(ir,It,Gt),It,hr),yt+=hr,jt+=hr),Yt+=ir.m,yt+=Lt.m,br+=_r.m,jt+=Kt.m;ir&&!Ge(Kt)&&(Kt.t=ir,Kt.m+=Yt-jt),Lt&&!Fe(_r)&&(_r.t=Lt,_r.m+=yt-br,Gt=It)}return Gt}function wt(It){It.x*=be,It.y=It.depth*se}return Le.separation=function(It){return arguments.length?(Pe=It,Le):Pe},Le.size=function(It){return arguments.length?(ye=!1,be=+It[0],se=+It[1],Le):ye?null:[be,se]},Le.nodeSize=function(It){return arguments.length?(ye=!0,be=+It[0],se=+It[1],Le):ye?[be,se]:null},Le}function pt(Pe,be,se,ye,Le){for(var Be=Pe.children,ot,at=-1,wt=Be.length,It=Pe.value&&(Le-se)/Pe.value;++atYt&&(Yt=It),lt=yt*yt*ut,br=Math.max(Yt/lt,lt/jt),br>hr){yt-=It;break}hr=br}ot.push(wt={value:yt,dice:Kt1?ye:1)},se}(At);function Je(){var Pe=Vt,be=!1,se=1,ye=1,Le=[0],Be=ee,ot=ee,at=ee,wt=ee,It=ee;function Bt(Lt){return Lt.x0=Lt.y0=0,Lt.x1=se,Lt.y1=ye,Lt.eachBefore(Gt),Le=[0],be&&Lt.eachBefore(me),Lt}function Gt(Lt){var Kt=Le[Lt.depth],ir=Lt.x0+Kt,_r=Lt.y0+Kt,yt=Lt.x1-Kt,jt=Lt.y1-Kt;yt=Lt-1){var Yt=Be[Gt];Yt.x0=ir,Yt.y0=_r,Yt.x1=yt,Yt.y1=jt;return}for(var br=It[Gt],hr=Kt/2+br,ut=Gt+1,lt=Lt-1;ut>>1;It[xt]jt-_r){var St=(ir*Ct+yt*Tt)/Kt;Bt(Gt,ut,Tt,ir,_r,St,jt),Bt(ut,Lt,Ct,St,_r,yt,jt)}else{var _t=(_r*Ct+jt*Tt)/Kt;Bt(Gt,ut,Tt,ir,_r,yt,_t),Bt(ut,Lt,Ct,ir,_t,yt,jt)}}}function Ie(Pe,be,se,ye,Le){(Pe.depth&1?pt:Me)(Pe,be,se,ye,Le)}var ze=function Pe(be){function se(ye,Le,Be,ot,at){if((wt=ye._squarify)&&wt.ratio===be)for(var wt,It,Bt,Gt,Lt=-1,Kt,ir=wt.length,_r=ye.value;++Lt1?ye:1)},se}(At)},45879:function(G,V,e){e.d(V,{h5:function(){return f}});var m=Math.PI,P=2*m,i=1e-6,L=P-i;function A(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function v(){return new A}A.prototype=v.prototype={constructor:A,moveTo:function(w,h){this._+="M"+(this._x0=this._x1=+w)+","+(this._y0=this._y1=+h)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(w,h){this._+="L"+(this._x1=+w)+","+(this._y1=+h)},quadraticCurveTo:function(w,h,o,d){this._+="Q"+ +w+","+ +h+","+(this._x1=+o)+","+(this._y1=+d)},bezierCurveTo:function(w,h,o,d,M,T){this._+="C"+ +w+","+ +h+","+ +o+","+ +d+","+(this._x1=+M)+","+(this._y1=+T)},arcTo:function(w,h,o,d,M){w=+w,h=+h,o=+o,d=+d,M=+M;var T=this._x1,C=this._y1,x=o-w,S=d-h,b=T-w,a=C-h,E=b*b+a*a;if(M<0)throw new Error("negative radius: "+M);if(this._x1===null)this._+="M"+(this._x1=w)+","+(this._y1=h);else if(E>i)if(!(Math.abs(a*x-S*b)>i)||!M)this._+="L"+(this._x1=w)+","+(this._y1=h);else{var y=o-T,z=d-C,I=x*x+S*S,B=y*y+z*z,k=Math.sqrt(I),O=Math.sqrt(E),N=M*Math.tan((m-Math.acos((I+E-B)/(2*k*O)))/2),_=N/O,U=N/k;Math.abs(_-1)>i&&(this._+="L"+(w+_*b)+","+(h+_*a)),this._+="A"+M+","+M+",0,0,"+ +(a*y>b*z)+","+(this._x1=w+U*x)+","+(this._y1=h+U*S)}},arc:function(w,h,o,d,M,T){w=+w,h=+h,o=+o,T=!!T;var C=o*Math.cos(d),x=o*Math.sin(d),S=w+C,b=h+x,a=1^T,E=T?d-M:M-d;if(o<0)throw new Error("negative radius: "+o);this._x1===null?this._+="M"+S+","+b:(Math.abs(this._x1-S)>i||Math.abs(this._y1-b)>i)&&(this._+="L"+S+","+b),o&&(E<0&&(E=E%P+P),E>L?this._+="A"+o+","+o+",0,1,"+a+","+(w-C)+","+(h-x)+"A"+o+","+o+",0,1,"+a+","+(this._x1=S)+","+(this._y1=b):E>i&&(this._+="A"+o+","+o+",0,"+ +(E>=m)+","+a+","+(this._x1=w+o*Math.cos(M))+","+(this._y1=h+o*Math.sin(M))))},rect:function(w,h,o,d){this._+="M"+(this._x0=this._x1=+w)+","+(this._y0=this._y1=+h)+"h"+ +o+"v"+ +d+"h"+-o+"Z"},toString:function(){return this._}};var p=v,t=Array.prototype.slice;function r(w){return function(){return w}}function s(w){return w[0]}function n(w){return w[1]}function l(w){return w.source}function c(w){return w.target}function u(w){var h=l,o=c,d=s,M=n,T=null;function C(){var x,S=t.call(arguments),b=h.apply(this,S),a=o.apply(this,S);if(T||(T=x=p()),w(T,+d.apply(this,(S[0]=b,S)),+M.apply(this,S),+d.apply(this,(S[0]=a,S)),+M.apply(this,S)),x)return T=null,x+""||null}return C.source=function(x){return arguments.length?(h=x,C):h},C.target=function(x){return arguments.length?(o=x,C):o},C.x=function(x){return arguments.length?(d=typeof x=="function"?x:r(+x),C):d},C.y=function(x){return arguments.length?(M=typeof x=="function"?x:r(+x),C):M},C.context=function(x){return arguments.length?(T=x??null,C):T},C}function g(w,h,o,d,M){w.moveTo(h,o),w.bezierCurveTo(h=(h+d)/2,o,h,M,d,M)}function f(){return u(g)}},84096:function(G,V,e){e.d(V,{i$:function(){return De},Dq:function(){return s},g0:function(){return Ie}});var m=e(58176),P=e(48480),i=e(59879),L=e(82301),A=e(34823),v=e(79791);function p(Pe){if(0<=Pe.y&&Pe.y<100){var be=new Date(-1,Pe.m,Pe.d,Pe.H,Pe.M,Pe.S,Pe.L);return be.setFullYear(Pe.y),be}return new Date(Pe.y,Pe.m,Pe.d,Pe.H,Pe.M,Pe.S,Pe.L)}function t(Pe){if(0<=Pe.y&&Pe.y<100){var be=new Date(Date.UTC(-1,Pe.m,Pe.d,Pe.H,Pe.M,Pe.S,Pe.L));return be.setUTCFullYear(Pe.y),be}return new Date(Date.UTC(Pe.y,Pe.m,Pe.d,Pe.H,Pe.M,Pe.S,Pe.L))}function r(Pe,be,se){return{y:Pe,m:be,d:se,H:0,M:0,S:0,L:0}}function s(Pe){var be=Pe.dateTime,se=Pe.date,ye=Pe.time,Le=Pe.periods,Be=Pe.days,ot=Pe.shortDays,at=Pe.months,wt=Pe.shortMonths,It=w(Le),Bt=h(Le),Gt=w(Be),Lt=h(Be),Kt=w(ot),ir=h(ot),_r=w(at),yt=h(at),jt=w(wt),Yt=h(wt),br={a:Ye,A:We,b:Dt,B:Ft,c:null,d:J,e:J,f:Z,H:te,I:ae,j:ce,L:Q,m:j,M:K,p:Zt,q:nr,Q:Mt,s:Vt,S:ee,u:oe,U:q,V:$,w:le,W:ie,x:null,X:null,y:he,Y:me,Z:Me,"%":At},hr={a:lr,A:rr,b:zt,B:fr,c:null,d:Te,e:Te,f:Se,H:Oe,I:Ne,j:Ee,L:xe,m:Ue,M:He,p:dr,q:pr,Q:Mt,s:Vt,S:Fe,u:Ge,U:nt,V:qe,w:$e,W:et,x:null,X:null,y:ct,Y:dt,Z:pt,"%":At},ut={a:St,A:_t,b:Ht,B:$t,c:Qt,d:y,e:y,f:N,H:I,I,j:z,L:O,m:E,M:B,p:Ct,q:a,Q:U,s:Y,S:k,u:d,U:M,V:T,w:o,W:C,x:or,X:Er,y:S,Y:x,Z:b,"%":_};br.x=lt(se,br),br.X=lt(ye,br),br.c=lt(be,br),hr.x=lt(se,hr),hr.X=lt(ye,hr),hr.c=lt(be,hr);function lt(vr,Hr){return function(Ir){var kr=[],pn=-1,jr=0,In=vr.length,Dn,xr,Ar;for(Ir instanceof Date||(Ir=new Date(+Ir));++pn53)return null;"w"in kr||(kr.w=1),"Z"in kr?(jr=t(r(kr.y,0,1)),In=jr.getUTCDay(),jr=In>4||In===0?m.l6.ceil(jr):(0,m.l6)(jr),jr=P.Z.offset(jr,(kr.V-1)*7),kr.y=jr.getUTCFullYear(),kr.m=jr.getUTCMonth(),kr.d=jr.getUTCDate()+(kr.w+6)%7):(jr=p(r(kr.y,0,1)),In=jr.getDay(),jr=In>4||In===0?i.wA.ceil(jr):(0,i.wA)(jr),jr=L.Z.offset(jr,(kr.V-1)*7),kr.y=jr.getFullYear(),kr.m=jr.getMonth(),kr.d=jr.getDate()+(kr.w+6)%7)}else("W"in kr||"U"in kr)&&("w"in kr||(kr.w="u"in kr?kr.u%7:"W"in kr?1:0),In="Z"in kr?t(r(kr.y,0,1)).getUTCDay():p(r(kr.y,0,1)).getDay(),kr.m=0,kr.d="W"in kr?(kr.w+6)%7+kr.W*7-(In+5)%7:kr.w+kr.U*7-(In+6)%7);return"Z"in kr?(kr.H+=kr.Z/100|0,kr.M+=kr.Z%100,t(kr)):p(kr)}}function Tt(vr,Hr,Ir,kr){for(var pn=0,jr=Hr.length,In=Ir.length,Dn,xr;pn=In)return-1;if(Dn=Hr.charCodeAt(pn++),Dn===37){if(Dn=Hr.charAt(pn++),xr=ut[Dn in n?Hr.charAt(pn++):Dn],!xr||(kr=xr(vr,Ir,kr))<0)return-1}else if(Dn!=Ir.charCodeAt(kr++))return-1}return kr}function Ct(vr,Hr,Ir){var kr=It.exec(Hr.slice(Ir));return kr?(vr.p=Bt[kr[0].toLowerCase()],Ir+kr[0].length):-1}function St(vr,Hr,Ir){var kr=Kt.exec(Hr.slice(Ir));return kr?(vr.w=ir[kr[0].toLowerCase()],Ir+kr[0].length):-1}function _t(vr,Hr,Ir){var kr=Gt.exec(Hr.slice(Ir));return kr?(vr.w=Lt[kr[0].toLowerCase()],Ir+kr[0].length):-1}function Ht(vr,Hr,Ir){var kr=jt.exec(Hr.slice(Ir));return kr?(vr.m=Yt[kr[0].toLowerCase()],Ir+kr[0].length):-1}function $t(vr,Hr,Ir){var kr=_r.exec(Hr.slice(Ir));return kr?(vr.m=yt[kr[0].toLowerCase()],Ir+kr[0].length):-1}function Qt(vr,Hr,Ir){return Tt(vr,be,Hr,Ir)}function or(vr,Hr,Ir){return Tt(vr,se,Hr,Ir)}function Er(vr,Hr,Ir){return Tt(vr,ye,Hr,Ir)}function Ye(vr){return ot[vr.getDay()]}function We(vr){return Be[vr.getDay()]}function Dt(vr){return wt[vr.getMonth()]}function Ft(vr){return at[vr.getMonth()]}function Zt(vr){return Le[+(vr.getHours()>=12)]}function nr(vr){return 1+~~(vr.getMonth()/3)}function lr(vr){return ot[vr.getUTCDay()]}function rr(vr){return Be[vr.getUTCDay()]}function zt(vr){return wt[vr.getUTCMonth()]}function fr(vr){return at[vr.getUTCMonth()]}function dr(vr){return Le[+(vr.getUTCHours()>=12)]}function pr(vr){return 1+~~(vr.getUTCMonth()/3)}return{format:function(vr){var Hr=lt(vr+="",br);return Hr.toString=function(){return vr},Hr},parse:function(vr){var Hr=xt(vr+="",!1);return Hr.toString=function(){return vr},Hr},utcFormat:function(vr){var Hr=lt(vr+="",hr);return Hr.toString=function(){return vr},Hr},utcParse:function(vr){var Hr=xt(vr+="",!0);return Hr.toString=function(){return vr},Hr}}}var n={"-":"",_:" ",0:"0"},l=/^\s*\d+/,c=/^%/,u=/[\\^$*+?|[\]().{}]/g;function g(Pe,be,se){var ye=Pe<0?"-":"",Le=(ye?-Pe:Pe)+"",Be=Le.length;return ye+(Be68?1900:2e3),se+ye[0].length):-1}function b(Pe,be,se){var ye=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(be.slice(se,se+6));return ye?(Pe.Z=ye[1]?0:-(ye[2]+(ye[3]||"00")),se+ye[0].length):-1}function a(Pe,be,se){var ye=l.exec(be.slice(se,se+1));return ye?(Pe.q=ye[0]*3-3,se+ye[0].length):-1}function E(Pe,be,se){var ye=l.exec(be.slice(se,se+2));return ye?(Pe.m=ye[0]-1,se+ye[0].length):-1}function y(Pe,be,se){var ye=l.exec(be.slice(se,se+2));return ye?(Pe.d=+ye[0],se+ye[0].length):-1}function z(Pe,be,se){var ye=l.exec(be.slice(se,se+3));return ye?(Pe.m=0,Pe.d=+ye[0],se+ye[0].length):-1}function I(Pe,be,se){var ye=l.exec(be.slice(se,se+2));return ye?(Pe.H=+ye[0],se+ye[0].length):-1}function B(Pe,be,se){var ye=l.exec(be.slice(se,se+2));return ye?(Pe.M=+ye[0],se+ye[0].length):-1}function k(Pe,be,se){var ye=l.exec(be.slice(se,se+2));return ye?(Pe.S=+ye[0],se+ye[0].length):-1}function O(Pe,be,se){var ye=l.exec(be.slice(se,se+3));return ye?(Pe.L=+ye[0],se+ye[0].length):-1}function N(Pe,be,se){var ye=l.exec(be.slice(se,se+6));return ye?(Pe.L=Math.floor(ye[0]/1e3),se+ye[0].length):-1}function _(Pe,be,se){var ye=c.exec(be.slice(se,se+1));return ye?se+ye[0].length:-1}function U(Pe,be,se){var ye=l.exec(be.slice(se));return ye?(Pe.Q=+ye[0],se+ye[0].length):-1}function Y(Pe,be,se){var ye=l.exec(be.slice(se));return ye?(Pe.s=+ye[0],se+ye[0].length):-1}function J(Pe,be){return g(Pe.getDate(),be,2)}function te(Pe,be){return g(Pe.getHours(),be,2)}function ae(Pe,be){return g(Pe.getHours()%12||12,be,2)}function ce(Pe,be){return g(1+L.Z.count((0,A.Z)(Pe),Pe),be,3)}function Q(Pe,be){return g(Pe.getMilliseconds(),be,3)}function Z(Pe,be){return Q(Pe,be)+"000"}function j(Pe,be){return g(Pe.getMonth()+1,be,2)}function K(Pe,be){return g(Pe.getMinutes(),be,2)}function ee(Pe,be){return g(Pe.getSeconds(),be,2)}function oe(Pe){var be=Pe.getDay();return be===0?7:be}function q(Pe,be){return g(i.OM.count((0,A.Z)(Pe)-1,Pe),be,2)}function $(Pe,be){var se=Pe.getDay();return Pe=se>=4||se===0?(0,i.bL)(Pe):i.bL.ceil(Pe),g(i.bL.count((0,A.Z)(Pe),Pe)+((0,A.Z)(Pe).getDay()===4),be,2)}function le(Pe){return Pe.getDay()}function ie(Pe,be){return g(i.wA.count((0,A.Z)(Pe)-1,Pe),be,2)}function he(Pe,be){return g(Pe.getFullYear()%100,be,2)}function me(Pe,be){return g(Pe.getFullYear()%1e4,be,4)}function Me(Pe){var be=Pe.getTimezoneOffset();return(be>0?"-":(be*=-1,"+"))+g(be/60|0,"0",2)+g(be%60,"0",2)}function Te(Pe,be){return g(Pe.getUTCDate(),be,2)}function Oe(Pe,be){return g(Pe.getUTCHours(),be,2)}function Ne(Pe,be){return g(Pe.getUTCHours()%12||12,be,2)}function Ee(Pe,be){return g(1+P.Z.count((0,v.Z)(Pe),Pe),be,3)}function xe(Pe,be){return g(Pe.getUTCMilliseconds(),be,3)}function Se(Pe,be){return xe(Pe,be)+"000"}function Ue(Pe,be){return g(Pe.getUTCMonth()+1,be,2)}function He(Pe,be){return g(Pe.getUTCMinutes(),be,2)}function Fe(Pe,be){return g(Pe.getUTCSeconds(),be,2)}function Ge(Pe){var be=Pe.getUTCDay();return be===0?7:be}function nt(Pe,be){return g(m.Ox.count((0,v.Z)(Pe)-1,Pe),be,2)}function qe(Pe,be){var se=Pe.getUTCDay();return Pe=se>=4||se===0?(0,m.hB)(Pe):m.hB.ceil(Pe),g(m.hB.count((0,v.Z)(Pe),Pe)+((0,v.Z)(Pe).getUTCDay()===4),be,2)}function $e(Pe){return Pe.getUTCDay()}function et(Pe,be){return g(m.l6.count((0,v.Z)(Pe)-1,Pe),be,2)}function ct(Pe,be){return g(Pe.getUTCFullYear()%100,be,2)}function dt(Pe,be){return g(Pe.getUTCFullYear()%1e4,be,4)}function pt(){return"+0000"}function At(){return"%"}function Mt(Pe){return+Pe}function Vt(Pe){return Math.floor(+Pe/1e3)}var Je,De,Ie;ze({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function ze(Pe){return Je=s(Pe),De=Je.format,Je.parse,Ie=Je.utcFormat,Je.utcParse,Je}},82301:function(G,V,e){e.d(V,{a:function(){return L}});var m=e(30052),P=e(54263),i=(0,m.Z)(function(A){A.setHours(0,0,0,0)},function(A,v){A.setDate(A.getDate()+v)},function(A,v){return(v-A-(v.getTimezoneOffset()-A.getTimezoneOffset())*P.yB)/P.UD},function(A){return A.getDate()-1});V.Z=i;var L=i.range},54263:function(G,V,e){e.d(V,{UD:function(){return L},Y2:function(){return i},Ym:function(){return m},iM:function(){return A},yB:function(){return P}});var m=1e3,P=6e4,i=36e5,L=864e5,A=6048e5},81041:function(G,V,e){e.r(V),e.d(V,{timeDay:function(){return g.Z},timeDays:function(){return g.a},timeFriday:function(){return f.mC},timeFridays:function(){return f.b$},timeHour:function(){return c},timeHours:function(){return u},timeInterval:function(){return m.Z},timeMillisecond:function(){return i},timeMilliseconds:function(){return L},timeMinute:function(){return s},timeMinutes:function(){return n},timeMonday:function(){return f.wA},timeMondays:function(){return f.bJ},timeMonth:function(){return h},timeMonths:function(){return o},timeSaturday:function(){return f.EY},timeSaturdays:function(){return f.Ff},timeSecond:function(){return p},timeSeconds:function(){return t},timeSunday:function(){return f.OM},timeSundays:function(){return f.vm},timeThursday:function(){return f.bL},timeThursdays:function(){return f.$t},timeTuesday:function(){return f.sy},timeTuesdays:function(){return f.aU},timeWednesday:function(){return f.zg},timeWednesdays:function(){return f.Ld},timeWeek:function(){return f.OM},timeWeeks:function(){return f.vm},timeYear:function(){return d.Z},timeYears:function(){return d.g},utcDay:function(){return a.Z},utcDays:function(){return a.y},utcFriday:function(){return E.QQ},utcFridays:function(){return E.fz},utcHour:function(){return S},utcHours:function(){return b},utcMillisecond:function(){return i},utcMilliseconds:function(){return L},utcMinute:function(){return T},utcMinutes:function(){return C},utcMonday:function(){return E.l6},utcMondays:function(){return E.$3},utcMonth:function(){return z},utcMonths:function(){return I},utcSaturday:function(){return E.g4},utcSaturdays:function(){return E.Q_},utcSecond:function(){return p},utcSeconds:function(){return t},utcSunday:function(){return E.Ox},utcSundays:function(){return E.SU},utcThursday:function(){return E.hB},utcThursdays:function(){return E.xj},utcTuesday:function(){return E.J1},utcTuesdays:function(){return E.DK},utcWednesday:function(){return E.b3},utcWednesdays:function(){return E.uy},utcWeek:function(){return E.Ox},utcWeeks:function(){return E.SU},utcYear:function(){return B.Z},utcYears:function(){return B.D}});var m=e(30052),P=(0,m.Z)(function(){},function(k,O){k.setTime(+k+O)},function(k,O){return O-k});P.every=function(k){return k=Math.floor(k),!isFinite(k)||!(k>0)?null:k>1?(0,m.Z)(function(O){O.setTime(Math.floor(O/k)*k)},function(O,N){O.setTime(+O+N*k)},function(O,N){return(N-O)/k}):P};var i=P,L=P.range,A=e(54263),v=(0,m.Z)(function(k){k.setTime(k-k.getMilliseconds())},function(k,O){k.setTime(+k+O*A.Ym)},function(k,O){return(O-k)/A.Ym},function(k){return k.getUTCSeconds()}),p=v,t=v.range,r=(0,m.Z)(function(k){k.setTime(k-k.getMilliseconds()-k.getSeconds()*A.Ym)},function(k,O){k.setTime(+k+O*A.yB)},function(k,O){return(O-k)/A.yB},function(k){return k.getMinutes()}),s=r,n=r.range,l=(0,m.Z)(function(k){k.setTime(k-k.getMilliseconds()-k.getSeconds()*A.Ym-k.getMinutes()*A.yB)},function(k,O){k.setTime(+k+O*A.Y2)},function(k,O){return(O-k)/A.Y2},function(k){return k.getHours()}),c=l,u=l.range,g=e(82301),f=e(59879),w=(0,m.Z)(function(k){k.setDate(1),k.setHours(0,0,0,0)},function(k,O){k.setMonth(k.getMonth()+O)},function(k,O){return O.getMonth()-k.getMonth()+(O.getFullYear()-k.getFullYear())*12},function(k){return k.getMonth()}),h=w,o=w.range,d=e(34823),M=(0,m.Z)(function(k){k.setUTCSeconds(0,0)},function(k,O){k.setTime(+k+O*A.yB)},function(k,O){return(O-k)/A.yB},function(k){return k.getUTCMinutes()}),T=M,C=M.range,x=(0,m.Z)(function(k){k.setUTCMinutes(0,0,0)},function(k,O){k.setTime(+k+O*A.Y2)},function(k,O){return(O-k)/A.Y2},function(k){return k.getUTCHours()}),S=x,b=x.range,a=e(48480),E=e(58176),y=(0,m.Z)(function(k){k.setUTCDate(1),k.setUTCHours(0,0,0,0)},function(k,O){k.setUTCMonth(k.getUTCMonth()+O)},function(k,O){return O.getUTCMonth()-k.getUTCMonth()+(O.getUTCFullYear()-k.getUTCFullYear())*12},function(k){return k.getUTCMonth()}),z=y,I=y.range,B=e(79791)},30052:function(G,V,e){e.d(V,{Z:function(){return i}});var m=new Date,P=new Date;function i(L,A,v,p){function t(r){return L(r=arguments.length===0?new Date:new Date(+r)),r}return t.floor=function(r){return L(r=new Date(+r)),r},t.ceil=function(r){return L(r=new Date(r-1)),A(r,1),L(r),r},t.round=function(r){var s=t(r),n=t.ceil(r);return r-s0))return l;do l.push(c=new Date(+r)),A(r,n),L(r);while(c=s)for(;L(s),!r(s);)s.setTime(s-1)},function(s,n){if(s>=s)if(n<0)for(;++n<=0;)for(;A(s,-1),!r(s););else for(;--n>=0;)for(;A(s,1),!r(s););})},v&&(t.count=function(r,s){return m.setTime(+r),P.setTime(+s),L(m),L(P),Math.floor(v(m,P))},t.every=function(r){return r=Math.floor(r),!isFinite(r)||!(r>0)?null:r>1?t.filter(p?function(s){return p(s)%r===0}:function(s){return t.count(0,s)%r===0}):t}),t}},48480:function(G,V,e){e.d(V,{y:function(){return L}});var m=e(30052),P=e(54263),i=(0,m.Z)(function(A){A.setUTCHours(0,0,0,0)},function(A,v){A.setUTCDate(A.getUTCDate()+v)},function(A,v){return(v-A)/P.UD},function(A){return A.getUTCDate()-1});V.Z=i;var L=i.range},58176:function(G,V,e){e.d(V,{$3:function(){return l},DK:function(){return c},J1:function(){return v},Ox:function(){return L},QQ:function(){return r},Q_:function(){return w},SU:function(){return n},b3:function(){return p},fz:function(){return f},g4:function(){return s},hB:function(){return t},l6:function(){return A},uy:function(){return u},xj:function(){return g}});var m=e(30052),P=e(54263);function i(h){return(0,m.Z)(function(o){o.setUTCDate(o.getUTCDate()-(o.getUTCDay()+7-h)%7),o.setUTCHours(0,0,0,0)},function(o,d){o.setUTCDate(o.getUTCDate()+d*7)},function(o,d){return(d-o)/P.iM})}var L=i(0),A=i(1),v=i(2),p=i(3),t=i(4),r=i(5),s=i(6),n=L.range,l=A.range,c=v.range,u=p.range,g=t.range,f=r.range,w=s.range},79791:function(G,V,e){e.d(V,{D:function(){return i}});var m=e(30052),P=(0,m.Z)(function(L){L.setUTCMonth(0,1),L.setUTCHours(0,0,0,0)},function(L,A){L.setUTCFullYear(L.getUTCFullYear()+A)},function(L,A){return A.getUTCFullYear()-L.getUTCFullYear()},function(L){return L.getUTCFullYear()});P.every=function(L){return!isFinite(L=Math.floor(L))||!(L>0)?null:(0,m.Z)(function(A){A.setUTCFullYear(Math.floor(A.getUTCFullYear()/L)*L),A.setUTCMonth(0,1),A.setUTCHours(0,0,0,0)},function(A,v){A.setUTCFullYear(A.getUTCFullYear()+v*L)})},V.Z=P;var i=P.range},59879:function(G,V,e){e.d(V,{$t:function(){return g},EY:function(){return s},Ff:function(){return w},Ld:function(){return u},OM:function(){return L},aU:function(){return c},b$:function(){return f},bJ:function(){return l},bL:function(){return t},mC:function(){return r},sy:function(){return v},vm:function(){return n},wA:function(){return A},zg:function(){return p}});var m=e(30052),P=e(54263);function i(h){return(0,m.Z)(function(o){o.setDate(o.getDate()-(o.getDay()+7-h)%7),o.setHours(0,0,0,0)},function(o,d){o.setDate(o.getDate()+d*7)},function(o,d){return(d-o-(d.getTimezoneOffset()-o.getTimezoneOffset())*P.yB)/P.iM})}var L=i(0),A=i(1),v=i(2),p=i(3),t=i(4),r=i(5),s=i(6),n=L.range,l=A.range,c=v.range,u=p.range,g=t.range,f=r.range,w=s.range},34823:function(G,V,e){e.d(V,{g:function(){return i}});var m=e(30052),P=(0,m.Z)(function(L){L.setMonth(0,1),L.setHours(0,0,0,0)},function(L,A){L.setFullYear(L.getFullYear()+A)},function(L,A){return A.getFullYear()-L.getFullYear()},function(L){return L.getFullYear()});P.every=function(L){return!isFinite(L=Math.floor(L))||!(L>0)?null:(0,m.Z)(function(A){A.setFullYear(Math.floor(A.getFullYear()/L)*L),A.setMonth(0,1),A.setHours(0,0,0,0)},function(A,v){A.setFullYear(A.getFullYear()+v*L)})},V.Z=P;var i=P.range},17045:function(G,V,e){var m=e(8709),P=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",i=Object.prototype.toString,L=Array.prototype.concat,A=Object.defineProperty,v=function(n){return typeof n=="function"&&i.call(n)==="[object Function]"},p=e(55622)(),t=A&&p,r=function(n,l,c,u){if(l in n){if(u===!0){if(n[l]===c)return}else if(!v(u)||!u())return}t?A(n,l,{configurable:!0,enumerable:!1,value:c,writable:!0}):n[l]=c},s=function(n,l){var c=arguments.length>2?arguments[2]:{},u=m(l);P&&(u=L.call(u,Object.getOwnPropertySymbols(l)));for(var g=0;gt*r){var u=(c-l)/t;v[n]=u*1e3}}return v}function i(L){for(var A=[],v=L[0];v<=L[1];v++)for(var p=String.fromCharCode(v),t=L[0];t"u"&&(i=0),typeof P){case"number":if(P>0)return e(P|0,i);break;case"object":if(typeof P.length=="number")return V(P,i,0);break}return[]}G.exports=m},11474:function(G){G.exports=V,G.exports.default=V;function V(I,B,k){k=k||2;var O=B&&B.length,N=O?B[0]*k:I.length,_=e(I,0,N,k,!0),U=[];if(!_||_.next===_.prev)return U;var Y,J,te,ae,ce,Q,Z;if(O&&(_=p(I,B,_,k)),I.length>80*k){Y=te=I[0],J=ae=I[1];for(var j=k;jte&&(te=ce),Q>ae&&(ae=Q);Z=Math.max(te-Y,ae-J),Z=Z!==0?1/Z:0}return P(_,U,k,Y,J,Z),U}function e(I,B,k,O,N){var _,U;if(N===z(I,B,k,O)>0)for(_=B;_=B;_-=O)U=a(_,I[_],I[_+1],U);return U&&o(U,U.next)&&(E(U),U=U.next),U}function m(I,B){if(!I)return I;B||(B=I);var k=I,O;do if(O=!1,!k.steiner&&(o(k,k.next)||h(k.prev,k,k.next)===0)){if(E(k),k=B=k.prev,k===k.next)break;O=!0}else k=k.next;while(O||k!==B);return B}function P(I,B,k,O,N,_,U){if(I){!U&&_&&l(I,O,N,_);for(var Y=I,J,te;I.prev!==I.next;){if(J=I.prev,te=I.next,_?L(I,O,N,_):i(I)){B.push(J.i/k),B.push(I.i/k),B.push(te.i/k),E(I),I=te.next,Y=te.next;continue}if(I=te,I===Y){U?U===1?(I=A(m(I),B,k),P(I,B,k,O,N,_,2)):U===2&&v(I,B,k,O,N,_):P(m(I),B,k,O,N,_,1);break}}}}function i(I){var B=I.prev,k=I,O=I.next;if(h(B,k,O)>=0)return!1;for(var N=I.next.next;N!==I.prev;){if(f(B.x,B.y,k.x,k.y,O.x,O.y,N.x,N.y)&&h(N.prev,N,N.next)>=0)return!1;N=N.next}return!0}function L(I,B,k,O){var N=I.prev,_=I,U=I.next;if(h(N,_,U)>=0)return!1;for(var Y=N.x<_.x?N.x_.x?N.x>U.x?N.x:U.x:_.x>U.x?_.x:U.x,ae=N.y>_.y?N.y>U.y?N.y:U.y:_.y>U.y?_.y:U.y,ce=u(Y,J,B,k,O),Q=u(te,ae,B,k,O),Z=I.prevZ,j=I.nextZ;Z&&Z.z>=ce&&j&&j.z<=Q;){if(Z!==I.prev&&Z!==I.next&&f(N.x,N.y,_.x,_.y,U.x,U.y,Z.x,Z.y)&&h(Z.prev,Z,Z.next)>=0||(Z=Z.prevZ,j!==I.prev&&j!==I.next&&f(N.x,N.y,_.x,_.y,U.x,U.y,j.x,j.y)&&h(j.prev,j,j.next)>=0))return!1;j=j.nextZ}for(;Z&&Z.z>=ce;){if(Z!==I.prev&&Z!==I.next&&f(N.x,N.y,_.x,_.y,U.x,U.y,Z.x,Z.y)&&h(Z.prev,Z,Z.next)>=0)return!1;Z=Z.prevZ}for(;j&&j.z<=Q;){if(j!==I.prev&&j!==I.next&&f(N.x,N.y,_.x,_.y,U.x,U.y,j.x,j.y)&&h(j.prev,j,j.next)>=0)return!1;j=j.nextZ}return!0}function A(I,B,k){var O=I;do{var N=O.prev,_=O.next.next;!o(N,_)&&d(N,O,O.next,_)&&x(N,_)&&x(_,N)&&(B.push(N.i/k),B.push(O.i/k),B.push(_.i/k),E(O),E(O.next),O=I=_),O=O.next}while(O!==I);return m(O)}function v(I,B,k,O,N,_){var U=I;do{for(var Y=U.next.next;Y!==U.prev;){if(U.i!==Y.i&&w(U,Y)){var J=b(U,Y);U=m(U,U.next),J=m(J,J.next),P(U,B,k,O,N,_),P(J,B,k,O,N,_);return}Y=Y.next}U=U.next}while(U!==I)}function p(I,B,k,O){var N=[],_,U,Y,J,te;for(_=0,U=B.length;_=k.next.y&&k.next.y!==k.y){var Y=k.x+(N-k.y)*(k.next.x-k.x)/(k.next.y-k.y);if(Y<=O&&Y>_){if(_=Y,Y===O){if(N===k.y)return k;if(N===k.next.y)return k.next}U=k.x=k.x&&k.x>=te&&O!==k.x&&f(NU.x||k.x===U.x&&n(U,k)))&&(U=k,ce=Q)),k=k.next;while(k!==J);return U}function n(I,B){return h(I.prev,I,B.prev)<0&&h(B.next,I,I.next)<0}function l(I,B,k,O){var N=I;do N.z===null&&(N.z=u(N.x,N.y,B,k,O)),N.prevZ=N.prev,N.nextZ=N.next,N=N.next;while(N!==I);N.prevZ.nextZ=null,N.prevZ=null,c(N)}function c(I){var B,k,O,N,_,U,Y,J,te=1;do{for(k=I,I=null,_=null,U=0;k;){for(U++,O=k,Y=0,B=0;B0||J>0&&O;)Y!==0&&(J===0||!O||k.z<=O.z)?(N=k,k=k.nextZ,Y--):(N=O,O=O.nextZ,J--),_?_.nextZ=N:I=N,N.prevZ=_,_=N;k=O}_.nextZ=null,te*=2}while(U>1);return I}function u(I,B,k,O,N){return I=32767*(I-k)*N,B=32767*(B-O)*N,I=(I|I<<8)&16711935,I=(I|I<<4)&252645135,I=(I|I<<2)&858993459,I=(I|I<<1)&1431655765,B=(B|B<<8)&16711935,B=(B|B<<4)&252645135,B=(B|B<<2)&858993459,B=(B|B<<1)&1431655765,I|B<<1}function g(I){var B=I,k=I;do(B.x=0&&(I-U)*(O-Y)-(k-U)*(B-Y)>=0&&(k-U)*(_-Y)-(N-U)*(O-Y)>=0}function w(I,B){return I.next.i!==B.i&&I.prev.i!==B.i&&!C(I,B)&&(x(I,B)&&x(B,I)&&S(I,B)&&(h(I.prev,I,B.prev)||h(I,B.prev,B))||o(I,B)&&h(I.prev,I,I.next)>0&&h(B.prev,B,B.next)>0)}function h(I,B,k){return(B.y-I.y)*(k.x-B.x)-(B.x-I.x)*(k.y-B.y)}function o(I,B){return I.x===B.x&&I.y===B.y}function d(I,B,k,O){var N=T(h(I,B,k)),_=T(h(I,B,O)),U=T(h(k,O,I)),Y=T(h(k,O,B));return!!(N!==_&&U!==Y||N===0&&M(I,k,B)||_===0&&M(I,O,B)||U===0&&M(k,I,O)||Y===0&&M(k,B,O))}function M(I,B,k){return B.x<=Math.max(I.x,k.x)&&B.x>=Math.min(I.x,k.x)&&B.y<=Math.max(I.y,k.y)&&B.y>=Math.min(I.y,k.y)}function T(I){return I>0?1:I<0?-1:0}function C(I,B){var k=I;do{if(k.i!==I.i&&k.next.i!==I.i&&k.i!==B.i&&k.next.i!==B.i&&d(k,k.next,I,B))return!0;k=k.next}while(k!==I);return!1}function x(I,B){return h(I.prev,I,I.next)<0?h(I,B,I.next)>=0&&h(I,I.prev,B)>=0:h(I,B,I.prev)<0||h(I,I.next,B)<0}function S(I,B){var k=I,O=!1,N=(I.x+B.x)/2,_=(I.y+B.y)/2;do k.y>_!=k.next.y>_&&k.next.y!==k.y&&N<(k.next.x-k.x)*(_-k.y)/(k.next.y-k.y)+k.x&&(O=!O),k=k.next;while(k!==I);return O}function b(I,B){var k=new y(I.i,I.x,I.y),O=new y(B.i,B.x,B.y),N=I.next,_=B.prev;return I.next=B,B.prev=I,k.next=N,N.prev=k,O.next=k,k.prev=O,_.next=O,O.prev=_,O}function a(I,B,k,O){var N=new y(I,B,k);return O?(N.next=O.next,N.prev=O,O.next.prev=N,O.next=N):(N.prev=N,N.next=N),N}function E(I){I.next.prev=I.prev,I.prev.next=I.next,I.prevZ&&(I.prevZ.nextZ=I.nextZ),I.nextZ&&(I.nextZ.prevZ=I.prevZ)}function y(I,B,k){this.i=I,this.x=B,this.y=k,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}V.deviation=function(I,B,k,O){var N=B&&B.length,_=N?B[0]*k:I.length,U=Math.abs(z(I,0,_,k));if(N)for(var Y=0,J=B.length;Y0&&(O+=I[N-1].length,k.holes.push(O))}return k}},2502:function(G,V,e){var m=e(68664);G.exports=function(i,L){var A=[],v=[],p=[],t={},r=[],s;function n(M){p[M]=!1,t.hasOwnProperty(M)&&Object.keys(t[M]).forEach(function(T){delete t[M][T],p[T]&&n(T)})}function l(M){var T=!1;v.push(M),p[M]=!0;var C,x;for(C=0;C=M})}function g(M){u(M);for(var T=i,C=m(T),x=C.components.filter(function(I){return I.length>1}),S=1/0,b,a=0;a=55296&&M<=56319&&(S+=c[++w])),S=u?s.call(u,g,S,h):S,f?(n.value=S,l(o,h,n)):o[h]=S,++h;d=h}}if(d===void 0)for(d=L(c.length),f&&(o=new f(d)),w=0;w0?1:-1}},56247:function(G,V,e){var m=e(9953),P=Math.abs,i=Math.floor;G.exports=function(L){return isNaN(L)?0:(L=Number(L),L===0||!isFinite(L)?L:m(L)*i(P(L)))}},35976:function(G,V,e){var m=e(56247),P=Math.max;G.exports=function(i){return P(0,m(i))}},67260:function(G,V,e){var m=e(78513),P=e(36672),i=Function.prototype.bind,L=Function.prototype.call,A=Object.keys,v=Object.prototype.propertyIsEnumerable;G.exports=function(p,t){return function(r,s){var n,l=arguments[2],c=arguments[3];return r=Object(P(r)),m(s),n=A(r),c&&n.sort(typeof c=="function"?i.call(c,r):void 0),typeof p!="function"&&(p=n[p]),L.call(p,n,function(u,g){return v.call(r,u)?L.call(s,l,r[u],u,r,g):t})}}},95879:function(G,V,e){G.exports=e(73583)()?Object.assign:e(34205)},73583:function(G){G.exports=function(){var V=Object.assign,e;return typeof V!="function"?!1:(e={foo:"raz"},V(e,{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},34205:function(G,V,e){var m=e(68700),P=e(36672),i=Math.max;G.exports=function(L,A){var v,p,t=i(arguments.length,2),r;for(L=Object(P(L)),r=function(s){try{L[s]=A[s]}catch(n){v||(v=n)}},p=1;p-1}},87963:function(G){var V=Object.prototype.toString,e=V.call("");G.exports=function(m){return typeof m=="string"||m&&typeof m=="object"&&(m instanceof String||V.call(m)===e)||!1}},43043:function(G){var V=Object.create(null),e=Math.random;G.exports=function(){var m;do m=e().toString(36).slice(2);while(V[m]);return m}},32411:function(G,V,e){var m=e(1496),P=e(66741),i=e(62072),L=e(8260),A=e(95426),v=Object.defineProperty,p;p=G.exports=function(t,r){if(!(this instanceof p))throw new TypeError("Constructor requires 'new'");A.call(this,t),r?P.call(r,"key+value")?r="key+value":P.call(r,"key")?r="key":r="value":r="value",v(this,"__kind__",i("",r))},m&&m(p,A),delete p.prototype.constructor,p.prototype=Object.create(A.prototype,{_resolve:i(function(t){return this.__kind__==="value"?this.__list__[t]:this.__kind__==="key+value"?[t,this.__list__[t]]:t})}),v(p.prototype,L.toStringTag,i("c","Array Iterator"))},27515:function(G,V,e){var m=e(73051),P=e(78513),i=e(87963),L=e(66661),A=Array.isArray,v=Function.prototype.call,p=Array.prototype.some;G.exports=function(t,r){var s,n=arguments[2],l,c,u,g,f,w,h;if(A(t)||m(t)?s="array":i(t)?s="string":t=L(t),P(r),c=function(){u=!0},s==="array"){p.call(t,function(o){return v.call(r,n,o,c),u});return}if(s==="string"){for(f=t.length,g=0;g=55296&&h<=56319&&(w+=t[++g])),v.call(r,n,w,c),!u);++g);return}for(l=t.next();!l.done;){if(v.call(r,n,l.value,c),u)return;l=t.next()}}},66661:function(G,V,e){var m=e(73051),P=e(87963),i=e(32411),L=e(259),A=e(58095),v=e(8260).iterator;G.exports=function(p){return typeof A(p)[v]=="function"?p[v]():m(p)?new i(p):P(p)?new L(p):new i(p)}},95426:function(G,V,e){var m=e(16134),P=e(95879),i=e(78513),L=e(36672),A=e(62072),v=e(55174),p=e(8260),t=Object.defineProperty,r=Object.defineProperties,s;G.exports=s=function(n,l){if(!(this instanceof s))throw new TypeError("Constructor requires 'new'");r(this,{__list__:A("w",L(n)),__context__:A("w",l),__nextIndex__:A("w",0)}),l&&(i(l.on),l.on("_add",this._onAdd),l.on("_delete",this._onDelete),l.on("_clear",this._onClear))},delete s.prototype.constructor,r(s.prototype,P({_next:A(function(){var n;if(this.__list__){if(this.__redo__&&(n=this.__redo__.shift(),n!==void 0))return n;if(this.__nextIndex__=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){t(this,"__redo__",A("c",[n]));return}this.__redo__.forEach(function(l,c){l>=n&&(this.__redo__[c]=++l)},this),this.__redo__.push(n)}}),_onDelete:A(function(n){var l;n>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(l=this.__redo__.indexOf(n),l!==-1&&this.__redo__.splice(l,1),this.__redo__.forEach(function(c,u){c>n&&(this.__redo__[u]=--c)},this)))}),_onClear:A(function(){this.__redo__&&m.call(this.__redo__),this.__nextIndex__=0})}))),t(s.prototype,p.iterator,A(function(){return this}))},35940:function(G,V,e){var m=e(73051),P=e(95296),i=e(87963),L=e(8260).iterator,A=Array.isArray;G.exports=function(v){return P(v)?A(v)||i(v)||m(v)?!0:typeof v[L]=="function":!1}},259:function(G,V,e){var m=e(1496),P=e(62072),i=e(8260),L=e(95426),A=Object.defineProperty,v;v=G.exports=function(p){if(!(this instanceof v))throw new TypeError("Constructor requires 'new'");p=String(p),L.call(this,p),A(this,"__length__",P("",p.length))},m&&m(v,L),delete v.prototype.constructor,v.prototype=Object.create(L.prototype,{_next:P(function(){if(this.__list__){if(this.__nextIndex__=55296&&r<=56319?t+this.__list__[this.__nextIndex__++]:t)})}),A(v.prototype,i.toStringTag,P("c","String Iterator"))},58095:function(G,V,e){var m=e(35940);G.exports=function(P){if(!m(P))throw new TypeError(P+" is not iterable");return P}},73523:function(G){function V(m,P){if(m==null)throw new TypeError("Cannot convert first argument to object");for(var i=Object(m),L=1;L0&&(S=M[0]),S instanceof Error)throw S;var b=new Error("Unhandled error."+(S?" ("+S.message+")":""));throw b.context=S,b}var a=x[d];if(a===void 0)return!1;if(typeof a=="function")e(a,this,M);else for(var E=a.length,y=c(a,E),T=0;T0&&S.length>C&&!S.warned){S.warned=!0;var b=new Error("Possible EventEmitter memory leak detected. "+S.length+" "+String(d)+" listeners added. Use emitter.setMaxListeners() to increase limit");b.name="MaxListenersExceededWarning",b.emitter=o,b.type=d,b.count=S.length,P(b)}return o}L.prototype.addListener=function(d,M){return t(this,d,M,!1)},L.prototype.on=L.prototype.addListener,L.prototype.prependListener=function(d,M){return t(this,d,M,!0)};function r(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function s(o,d,M){var T={fired:!1,wrapFn:void 0,target:o,type:d,listener:M},C=r.bind(T);return C.listener=M,T.wrapFn=C,C}L.prototype.once=function(d,M){return v(M),this.on(d,s(this,d,M)),this},L.prototype.prependOnceListener=function(d,M){return v(M),this.prependListener(d,s(this,d,M)),this},L.prototype.removeListener=function(d,M){var T,C,x,S,b;if(v(M),C=this._events,C===void 0)return this;if(T=C[d],T===void 0)return this;if(T===M||T.listener===M)--this._eventsCount===0?this._events=Object.create(null):(delete C[d],C.removeListener&&this.emit("removeListener",d,T.listener||M));else if(typeof T!="function"){for(x=-1,S=T.length-1;S>=0;S--)if(T[S]===M||T[S].listener===M){b=T[S].listener,x=S;break}if(x<0)return this;x===0?T.shift():u(T,x),T.length===1&&(C[d]=T[0]),C.removeListener!==void 0&&this.emit("removeListener",d,b||M)}return this},L.prototype.off=L.prototype.removeListener,L.prototype.removeAllListeners=function(d){var M,T,C;if(T=this._events,T===void 0)return this;if(T.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):T[d]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete T[d]),this;if(arguments.length===0){var x=Object.keys(T),S;for(C=0;C=0;C--)this.removeListener(d,M[C]);return this};function n(o,d,M){var T=o._events;if(T===void 0)return[];var C=T[d];return C===void 0?[]:typeof C=="function"?M?[C.listener||C]:[C]:M?g(C):c(C,C.length)}L.prototype.listeners=function(d){return n(this,d,!0)},L.prototype.rawListeners=function(d){return n(this,d,!1)},L.listenerCount=function(o,d){return typeof o.listenerCount=="function"?o.listenerCount(d):l.call(o,d)},L.prototype.listenerCount=l;function l(o){var d=this._events;if(d!==void 0){var M=d[o];if(typeof M=="function")return 1;if(M!==void 0)return M.length}return 0}L.prototype.eventNames=function(){return this._eventsCount>0?m(this._events):[]};function c(o,d){for(var M=new Array(d),T=0;TA[0]-t[0]/2&&(u=t[0]/2,g+=t[1]);return v}},32879:function(G){G.exports=V,V.canvas=document.createElement("canvas"),V.cache={};function V(r,L){L||(L={}),(typeof r=="string"||Array.isArray(r))&&(L.family=r);var A=Array.isArray(L.family)?L.family.join(", "):L.family;if(!A)throw Error("`family` must be defined");var v=L.size||L.fontSize||L.em||48,p=L.weight||L.fontWeight||"",t=L.style||L.fontStyle||"",r=[t,p,v].join(" ")+"px "+A,s=L.origin||"top";if(V.cache[A]&&v<=V.cache[A].em)return e(V.cache[A],s);var n=L.canvas||V.canvas,l=n.getContext("2d"),c={upper:L.upper!==void 0?L.upper:"H",lower:L.lower!==void 0?L.lower:"x",descent:L.descent!==void 0?L.descent:"p",ascent:L.ascent!==void 0?L.ascent:"h",tittle:L.tittle!==void 0?L.tittle:"i",overshoot:L.overshoot!==void 0?L.overshoot:"O"},u=Math.ceil(v*1.5);n.height=u,n.width=u*.5,l.font=r;var g="H",f={top:0};l.clearRect(0,0,u,u),l.textBaseline="top",l.fillStyle="black",l.fillText(g,0,0);var w=m(l.getImageData(0,0,u,u));l.clearRect(0,0,u,u),l.textBaseline="bottom",l.fillText(g,0,u);var h=m(l.getImageData(0,0,u,u));f.lineHeight=f.bottom=u-h+w,l.clearRect(0,0,u,u),l.textBaseline="alphabetic",l.fillText(g,0,u);var o=m(l.getImageData(0,0,u,u)),d=u-o-1+w;f.baseline=f.alphabetic=d,l.clearRect(0,0,u,u),l.textBaseline="middle",l.fillText(g,0,u*.5);var M=m(l.getImageData(0,0,u,u));f.median=f.middle=u-M-1+w-u*.5,l.clearRect(0,0,u,u),l.textBaseline="hanging",l.fillText(g,0,u*.5);var T=m(l.getImageData(0,0,u,u));f.hanging=u-T-1+w-u*.5,l.clearRect(0,0,u,u),l.textBaseline="ideographic",l.fillText(g,0,u);var C=m(l.getImageData(0,0,u,u));if(f.ideographic=u-C-1+w,c.upper&&(l.clearRect(0,0,u,u),l.textBaseline="top",l.fillText(c.upper,0,0),f.upper=m(l.getImageData(0,0,u,u)),f.capHeight=f.baseline-f.upper),c.lower&&(l.clearRect(0,0,u,u),l.textBaseline="top",l.fillText(c.lower,0,0),f.lower=m(l.getImageData(0,0,u,u)),f.xHeight=f.baseline-f.lower),c.tittle&&(l.clearRect(0,0,u,u),l.textBaseline="top",l.fillText(c.tittle,0,0),f.tittle=m(l.getImageData(0,0,u,u))),c.ascent&&(l.clearRect(0,0,u,u),l.textBaseline="top",l.fillText(c.ascent,0,0),f.ascent=m(l.getImageData(0,0,u,u))),c.descent&&(l.clearRect(0,0,u,u),l.textBaseline="top",l.fillText(c.descent,0,0),f.descent=P(l.getImageData(0,0,u,u))),c.overshoot){l.clearRect(0,0,u,u),l.textBaseline="top",l.fillText(c.overshoot,0,0);var x=P(l.getImageData(0,0,u,u));f.overshoot=x-d}for(var S in f)f[S]/=v;return f.em=v,V.cache[A]=f,e(f,s)}function e(i,L){var A={};typeof L=="string"&&(L=i[L]);for(var v in i)v!=="em"&&(A[v]=i[v]-L);return A}function m(i){for(var L=i.height,A=i.data,v=3;v0;v-=4)if(A[v]!==0)return Math.floor((v-3)*.25/L)}},31353:function(G,V,e){var m=e(85395),P=Object.prototype.toString,i=Object.prototype.hasOwnProperty,L=function(r,s,n){for(var l=0,c=r.length;l=3&&(l=n),P.call(r)==="[object Array]"?L(r,s,l):typeof r=="string"?A(r,s,l):v(r,s,l)};G.exports=p},73047:function(G){var V="Function.prototype.bind called on incompatible ",e=Array.prototype.slice,m=Object.prototype.toString,P="[object Function]";G.exports=function(L){var A=this;if(typeof A!="function"||m.call(A)!==P)throw new TypeError(V+A);for(var v=e.call(arguments,1),p,t=function(){if(this instanceof p){var c=A.apply(this,v.concat(e.call(arguments)));return Object(c)===c?c:this}else return A.apply(L,v.concat(e.call(arguments)))},r=Math.max(0,A.length-v.length),s=[],n=0;n"u"&&!m.canvas)return null;var P=m.canvas||document.createElement("canvas");typeof m.width=="number"&&(P.width=m.width),typeof m.height=="number"&&(P.height=m.height);var i=m,L;try{var A=[e];e.indexOf("webgl")===0&&A.push("experimental-"+e);for(var v=0;v"u"?m:s(Uint8Array),c={"%AggregateError%":typeof AggregateError>"u"?m:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?m:ArrayBuffer,"%ArrayIteratorPrototype%":r?s([][Symbol.iterator]()):m,"%AsyncFromSyncIteratorPrototype%":m,"%AsyncFunction%":n,"%AsyncGenerator%":n,"%AsyncGeneratorFunction%":n,"%AsyncIteratorPrototype%":n,"%Atomics%":typeof Atomics>"u"?m:Atomics,"%BigInt%":typeof BigInt>"u"?m:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?m:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?m:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?m:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?m:Float32Array,"%Float64Array%":typeof Float64Array>"u"?m:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?m:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":n,"%Int8Array%":typeof Int8Array>"u"?m:Int8Array,"%Int16Array%":typeof Int16Array>"u"?m:Int16Array,"%Int32Array%":typeof Int32Array>"u"?m:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":r?s(s([][Symbol.iterator]())):m,"%JSON%":typeof JSON=="object"?JSON:m,"%Map%":typeof Map>"u"?m:Map,"%MapIteratorPrototype%":typeof Map>"u"||!r?m:s(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?m:Promise,"%Proxy%":typeof Proxy>"u"?m:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?m:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?m:Set,"%SetIteratorPrototype%":typeof Set>"u"||!r?m:s(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?m:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":r?s(""[Symbol.iterator]()):m,"%Symbol%":r?Symbol:m,"%SyntaxError%":P,"%ThrowTypeError%":t,"%TypedArray%":l,"%TypeError%":L,"%Uint8Array%":typeof Uint8Array>"u"?m:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?m:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?m:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?m:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?m:WeakMap,"%WeakRef%":typeof WeakRef>"u"?m:WeakRef,"%WeakSet%":typeof WeakSet>"u"?m:WeakSet};try{null.error}catch(E){var u=s(s(E));c["%Error.prototype%"]=u}var g=function E(y){var z;if(y==="%AsyncFunction%")z=A("async function () {}");else if(y==="%GeneratorFunction%")z=A("function* () {}");else if(y==="%AsyncGeneratorFunction%")z=A("async function* () {}");else if(y==="%AsyncGenerator%"){var I=E("%AsyncGeneratorFunction%");I&&(z=I.prototype)}else if(y==="%AsyncIteratorPrototype%"){var B=E("%AsyncGenerator%");B&&(z=s(B.prototype))}return c[y]=z,z},f={"%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"]},w=e(77575),h=e(35065),o=w.call(Function.call,Array.prototype.concat),d=w.call(Function.apply,Array.prototype.splice),M=w.call(Function.call,String.prototype.replace),T=w.call(Function.call,String.prototype.slice),C=w.call(Function.call,RegExp.prototype.exec),x=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,S=/\\(\\)?/g,b=function(y){var z=T(y,0,1),I=T(y,-1);if(z==="%"&&I!=="%")throw new P("invalid intrinsic syntax, expected closing `%`");if(I==="%"&&z!=="%")throw new P("invalid intrinsic syntax, expected opening `%`");var B=[];return M(y,x,function(k,O,N,_){B[B.length]=N?M(_,S,"$1"):O||k}),B},a=function(y,z){var I=y,B;if(h(f,I)&&(B=f[I],I="%"+B[0]+"%"),h(c,I)){var k=c[I];if(k===n&&(k=g(I)),typeof k>"u"&&!z)throw new L("intrinsic "+y+" exists, but is not available. Please file an issue!");return{alias:B,name:I,value:k}}throw new P("intrinsic "+y+" does not exist!")};G.exports=function(y,z){if(typeof y!="string"||y.length===0)throw new L("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof z!="boolean")throw new L('"allowMissing" argument must be a boolean');if(C(/^%?[^%]*%?$/,y)===null)throw new P("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var I=b(y),B=I.length>0?I[0]:"",k=a("%"+B+"%",z),O=k.name,N=k.value,_=!1,U=k.alias;U&&(B=U[0],d(I,o([0,1],U)));for(var Y=1,J=!0;Y=I.length){var Q=v(N,te);J=!!Q,J&&"get"in Q&&!("originalValue"in Q.get)?N=Q.get:N=N[te]}else J=h(N,te),N=N[te];J&&!_&&(c[O]=N)}}return N}},85400:function(G){G.exports=V;function V(e,m){var P=m[0],i=m[1],L=m[2],A=m[3],v=m[4],p=m[5],t=m[6],r=m[7],s=m[8],n=m[9],l=m[10],c=m[11],u=m[12],g=m[13],f=m[14],w=m[15];return e[0]=p*(l*w-c*f)-n*(t*w-r*f)+g*(t*c-r*l),e[1]=-(i*(l*w-c*f)-n*(L*w-A*f)+g*(L*c-A*l)),e[2]=i*(t*w-r*f)-p*(L*w-A*f)+g*(L*r-A*t),e[3]=-(i*(t*c-r*l)-p*(L*c-A*l)+n*(L*r-A*t)),e[4]=-(v*(l*w-c*f)-s*(t*w-r*f)+u*(t*c-r*l)),e[5]=P*(l*w-c*f)-s*(L*w-A*f)+u*(L*c-A*l),e[6]=-(P*(t*w-r*f)-v*(L*w-A*f)+u*(L*r-A*t)),e[7]=P*(t*c-r*l)-v*(L*c-A*l)+s*(L*r-A*t),e[8]=v*(n*w-c*g)-s*(p*w-r*g)+u*(p*c-r*n),e[9]=-(P*(n*w-c*g)-s*(i*w-A*g)+u*(i*c-A*n)),e[10]=P*(p*w-r*g)-v*(i*w-A*g)+u*(i*r-A*p),e[11]=-(P*(p*c-r*n)-v*(i*c-A*n)+s*(i*r-A*p)),e[12]=-(v*(n*f-l*g)-s*(p*f-t*g)+u*(p*l-t*n)),e[13]=P*(n*f-l*g)-s*(i*f-L*g)+u*(i*l-L*n),e[14]=-(P*(p*f-t*g)-v*(i*f-L*g)+u*(i*t-L*p)),e[15]=P*(p*l-t*n)-v*(i*l-L*n)+s*(i*t-L*p),e}},42331:function(G){G.exports=V;function V(e){var m=new Float32Array(16);return m[0]=e[0],m[1]=e[1],m[2]=e[2],m[3]=e[3],m[4]=e[4],m[5]=e[5],m[6]=e[6],m[7]=e[7],m[8]=e[8],m[9]=e[9],m[10]=e[10],m[11]=e[11],m[12]=e[12],m[13]=e[13],m[14]=e[14],m[15]=e[15],m}},31042:function(G){G.exports=V;function V(e,m){return e[0]=m[0],e[1]=m[1],e[2]=m[2],e[3]=m[3],e[4]=m[4],e[5]=m[5],e[6]=m[6],e[7]=m[7],e[8]=m[8],e[9]=m[9],e[10]=m[10],e[11]=m[11],e[12]=m[12],e[13]=m[13],e[14]=m[14],e[15]=m[15],e}},11902:function(G){G.exports=V;function V(){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(G){G.exports=V;function V(e){var m=e[0],P=e[1],i=e[2],L=e[3],A=e[4],v=e[5],p=e[6],t=e[7],r=e[8],s=e[9],n=e[10],l=e[11],c=e[12],u=e[13],g=e[14],f=e[15],w=m*v-P*A,h=m*p-i*A,o=m*t-L*A,d=P*p-i*v,M=P*t-L*v,T=i*t-L*p,C=r*u-s*c,x=r*g-n*c,S=r*f-l*c,b=s*g-n*u,a=s*f-l*u,E=n*f-l*g;return w*E-h*a+o*b+d*S-M*x+T*C}},27812:function(G){G.exports=V;function V(e,m){var P=m[0],i=m[1],L=m[2],A=m[3],v=P+P,p=i+i,t=L+L,r=P*v,s=i*v,n=i*p,l=L*v,c=L*p,u=L*t,g=A*v,f=A*p,w=A*t;return e[0]=1-n-u,e[1]=s+w,e[2]=l-f,e[3]=0,e[4]=s-w,e[5]=1-r-u,e[6]=c+g,e[7]=0,e[8]=l+f,e[9]=c-g,e[10]=1-r-n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},34045:function(G){G.exports=V;function V(e,m,P){var i,L,A,v=P[0],p=P[1],t=P[2],r=Math.sqrt(v*v+p*p+t*t);return Math.abs(r)<1e-6?null:(r=1/r,v*=r,p*=r,t*=r,i=Math.sin(m),L=Math.cos(m),A=1-L,e[0]=v*v*A+L,e[1]=p*v*A+t*i,e[2]=t*v*A-p*i,e[3]=0,e[4]=v*p*A-t*i,e[5]=p*p*A+L,e[6]=t*p*A+v*i,e[7]=0,e[8]=v*t*A+p*i,e[9]=p*t*A-v*i,e[10]=t*t*A+L,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}},45973:function(G){G.exports=V;function V(e,m,P){var i=m[0],L=m[1],A=m[2],v=m[3],p=i+i,t=L+L,r=A+A,s=i*p,n=i*t,l=i*r,c=L*t,u=L*r,g=A*r,f=v*p,w=v*t,h=v*r;return e[0]=1-(c+g),e[1]=n+h,e[2]=l-w,e[3]=0,e[4]=n-h,e[5]=1-(s+g),e[6]=u+f,e[7]=0,e[8]=l+w,e[9]=u-f,e[10]=1-(s+c),e[11]=0,e[12]=P[0],e[13]=P[1],e[14]=P[2],e[15]=1,e}},81472:function(G){G.exports=V;function V(e,m){return e[0]=m[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=m[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=m[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},14669:function(G){G.exports=V;function V(e,m){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]=m[0],e[13]=m[1],e[14]=m[2],e[15]=1,e}},75262:function(G){G.exports=V;function V(e,m){var P=Math.sin(m),i=Math.cos(m);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=P,e[7]=0,e[8]=0,e[9]=-P,e[10]=i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},331:function(G){G.exports=V;function V(e,m){var P=Math.sin(m),i=Math.cos(m);return e[0]=i,e[1]=0,e[2]=-P,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=P,e[9]=0,e[10]=i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},11049:function(G){G.exports=V;function V(e,m){var P=Math.sin(m),i=Math.cos(m);return e[0]=i,e[1]=P,e[2]=0,e[3]=0,e[4]=-P,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},75195:function(G){G.exports=V;function V(e,m,P,i,L,A,v){var p=1/(P-m),t=1/(L-i),r=1/(A-v);return e[0]=A*2*p,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=A*2*t,e[6]=0,e[7]=0,e[8]=(P+m)*p,e[9]=(L+i)*t,e[10]=(v+A)*r,e[11]=-1,e[12]=0,e[13]=0,e[14]=v*A*2*r,e[15]=0,e}},71551:function(G){G.exports=V;function V(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(G,V,e){G.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(G){G.exports=V;function V(e,m){var P=m[0],i=m[1],L=m[2],A=m[3],v=m[4],p=m[5],t=m[6],r=m[7],s=m[8],n=m[9],l=m[10],c=m[11],u=m[12],g=m[13],f=m[14],w=m[15],h=P*p-i*v,o=P*t-L*v,d=P*r-A*v,M=i*t-L*p,T=i*r-A*p,C=L*r-A*t,x=s*g-n*u,S=s*f-l*u,b=s*w-c*u,a=n*f-l*g,E=n*w-c*g,y=l*w-c*f,z=h*y-o*E+d*a+M*b-T*S+C*x;return z?(z=1/z,e[0]=(p*y-t*E+r*a)*z,e[1]=(L*E-i*y-A*a)*z,e[2]=(g*C-f*T+w*M)*z,e[3]=(l*T-n*C-c*M)*z,e[4]=(t*b-v*y-r*S)*z,e[5]=(P*y-L*b+A*S)*z,e[6]=(f*d-u*C-w*o)*z,e[7]=(s*C-l*d+c*o)*z,e[8]=(v*E-p*b+r*x)*z,e[9]=(i*b-P*E-A*x)*z,e[10]=(u*T-g*d+w*h)*z,e[11]=(n*d-s*T-c*h)*z,e[12]=(p*S-v*a-t*x)*z,e[13]=(P*a-i*S+L*x)*z,e[14]=(g*o-u*M-f*h)*z,e[15]=(s*M-n*o+l*h)*z,e):null}},65551:function(G,V,e){var m=e(71551);G.exports=P;function P(i,L,A,v){var p,t,r,s,n,l,c,u,g,f,w=L[0],h=L[1],o=L[2],d=v[0],M=v[1],T=v[2],C=A[0],x=A[1],S=A[2];return Math.abs(w-C)<1e-6&&Math.abs(h-x)<1e-6&&Math.abs(o-S)<1e-6?m(i):(c=w-C,u=h-x,g=o-S,f=1/Math.sqrt(c*c+u*u+g*g),c*=f,u*=f,g*=f,p=M*g-T*u,t=T*c-d*g,r=d*u-M*c,f=Math.sqrt(p*p+t*t+r*r),f?(f=1/f,p*=f,t*=f,r*=f):(p=0,t=0,r=0),s=u*r-g*t,n=g*p-c*r,l=c*t-u*p,f=Math.sqrt(s*s+n*n+l*l),f?(f=1/f,s*=f,n*=f,l*=f):(s=0,n=0,l=0),i[0]=p,i[1]=s,i[2]=c,i[3]=0,i[4]=t,i[5]=n,i[6]=u,i[7]=0,i[8]=r,i[9]=l,i[10]=g,i[11]=0,i[12]=-(p*w+t*h+r*o),i[13]=-(s*w+n*h+l*o),i[14]=-(c*w+u*h+g*o),i[15]=1,i)}},91362:function(G){G.exports=V;function V(e,m,P){var i=m[0],L=m[1],A=m[2],v=m[3],p=m[4],t=m[5],r=m[6],s=m[7],n=m[8],l=m[9],c=m[10],u=m[11],g=m[12],f=m[13],w=m[14],h=m[15],o=P[0],d=P[1],M=P[2],T=P[3];return e[0]=o*i+d*p+M*n+T*g,e[1]=o*L+d*t+M*l+T*f,e[2]=o*A+d*r+M*c+T*w,e[3]=o*v+d*s+M*u+T*h,o=P[4],d=P[5],M=P[6],T=P[7],e[4]=o*i+d*p+M*n+T*g,e[5]=o*L+d*t+M*l+T*f,e[6]=o*A+d*r+M*c+T*w,e[7]=o*v+d*s+M*u+T*h,o=P[8],d=P[9],M=P[10],T=P[11],e[8]=o*i+d*p+M*n+T*g,e[9]=o*L+d*t+M*l+T*f,e[10]=o*A+d*r+M*c+T*w,e[11]=o*v+d*s+M*u+T*h,o=P[12],d=P[13],M=P[14],T=P[15],e[12]=o*i+d*p+M*n+T*g,e[13]=o*L+d*t+M*l+T*f,e[14]=o*A+d*r+M*c+T*w,e[15]=o*v+d*s+M*u+T*h,e}},60378:function(G){G.exports=V;function V(e,m,P,i,L,A,v){var p=1/(m-P),t=1/(i-L),r=1/(A-v);return e[0]=-2*p,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*t,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*r,e[11]=0,e[12]=(m+P)*p,e[13]=(L+i)*t,e[14]=(v+A)*r,e[15]=1,e}},7864:function(G){G.exports=V;function V(e,m,P,i,L){var A=1/Math.tan(m/2),v=1/(i-L);return e[0]=A/P,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=A,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(L+i)*v,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*L*i*v,e[15]=0,e}},35279:function(G){G.exports=V;function V(e,m,P,i){var L=Math.tan(m.upDegrees*Math.PI/180),A=Math.tan(m.downDegrees*Math.PI/180),v=Math.tan(m.leftDegrees*Math.PI/180),p=Math.tan(m.rightDegrees*Math.PI/180),t=2/(v+p),r=2/(L+A);return e[0]=t,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=r,e[6]=0,e[7]=0,e[8]=-((v-p)*t*.5),e[9]=(L-A)*r*.5,e[10]=i/(P-i),e[11]=-1,e[12]=0,e[13]=0,e[14]=i*P/(P-i),e[15]=0,e}},65074:function(G){G.exports=V;function V(e,m,P,i){var L=i[0],A=i[1],v=i[2],p=Math.sqrt(L*L+A*A+v*v),t,r,s,n,l,c,u,g,f,w,h,o,d,M,T,C,x,S,b,a,E,y,z,I;return Math.abs(p)<1e-6?null:(p=1/p,L*=p,A*=p,v*=p,t=Math.sin(P),r=Math.cos(P),s=1-r,n=m[0],l=m[1],c=m[2],u=m[3],g=m[4],f=m[5],w=m[6],h=m[7],o=m[8],d=m[9],M=m[10],T=m[11],C=L*L*s+r,x=A*L*s+v*t,S=v*L*s-A*t,b=L*A*s-v*t,a=A*A*s+r,E=v*A*s+L*t,y=L*v*s+A*t,z=A*v*s-L*t,I=v*v*s+r,e[0]=n*C+g*x+o*S,e[1]=l*C+f*x+d*S,e[2]=c*C+w*x+M*S,e[3]=u*C+h*x+T*S,e[4]=n*b+g*a+o*E,e[5]=l*b+f*a+d*E,e[6]=c*b+w*a+M*E,e[7]=u*b+h*a+T*E,e[8]=n*y+g*z+o*I,e[9]=l*y+f*z+d*I,e[10]=c*y+w*z+M*I,e[11]=u*y+h*z+T*I,m!==e&&(e[12]=m[12],e[13]=m[13],e[14]=m[14],e[15]=m[15]),e)}},35545:function(G){G.exports=V;function V(e,m,P){var i=Math.sin(P),L=Math.cos(P),A=m[4],v=m[5],p=m[6],t=m[7],r=m[8],s=m[9],n=m[10],l=m[11];return m!==e&&(e[0]=m[0],e[1]=m[1],e[2]=m[2],e[3]=m[3],e[12]=m[12],e[13]=m[13],e[14]=m[14],e[15]=m[15]),e[4]=A*L+r*i,e[5]=v*L+s*i,e[6]=p*L+n*i,e[7]=t*L+l*i,e[8]=r*L-A*i,e[9]=s*L-v*i,e[10]=n*L-p*i,e[11]=l*L-t*i,e}},94918:function(G){G.exports=V;function V(e,m,P){var i=Math.sin(P),L=Math.cos(P),A=m[0],v=m[1],p=m[2],t=m[3],r=m[8],s=m[9],n=m[10],l=m[11];return m!==e&&(e[4]=m[4],e[5]=m[5],e[6]=m[6],e[7]=m[7],e[12]=m[12],e[13]=m[13],e[14]=m[14],e[15]=m[15]),e[0]=A*L-r*i,e[1]=v*L-s*i,e[2]=p*L-n*i,e[3]=t*L-l*i,e[8]=A*i+r*L,e[9]=v*i+s*L,e[10]=p*i+n*L,e[11]=t*i+l*L,e}},15692:function(G){G.exports=V;function V(e,m,P){var i=Math.sin(P),L=Math.cos(P),A=m[0],v=m[1],p=m[2],t=m[3],r=m[4],s=m[5],n=m[6],l=m[7];return m!==e&&(e[8]=m[8],e[9]=m[9],e[10]=m[10],e[11]=m[11],e[12]=m[12],e[13]=m[13],e[14]=m[14],e[15]=m[15]),e[0]=A*L+r*i,e[1]=v*L+s*i,e[2]=p*L+n*i,e[3]=t*L+l*i,e[4]=r*L-A*i,e[5]=s*L-v*i,e[6]=n*L-p*i,e[7]=l*L-t*i,e}},10789:function(G){G.exports=V;function V(e,m,P){var i=P[0],L=P[1],A=P[2];return e[0]=m[0]*i,e[1]=m[1]*i,e[2]=m[2]*i,e[3]=m[3]*i,e[4]=m[4]*L,e[5]=m[5]*L,e[6]=m[6]*L,e[7]=m[7]*L,e[8]=m[8]*A,e[9]=m[9]*A,e[10]=m[10]*A,e[11]=m[11]*A,e[12]=m[12],e[13]=m[13],e[14]=m[14],e[15]=m[15],e}},6726:function(G){G.exports=V;function V(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(G){G.exports=V;function V(e,m,P){var i=P[0],L=P[1],A=P[2],v,p,t,r,s,n,l,c,u,g,f,w;return m===e?(e[12]=m[0]*i+m[4]*L+m[8]*A+m[12],e[13]=m[1]*i+m[5]*L+m[9]*A+m[13],e[14]=m[2]*i+m[6]*L+m[10]*A+m[14],e[15]=m[3]*i+m[7]*L+m[11]*A+m[15]):(v=m[0],p=m[1],t=m[2],r=m[3],s=m[4],n=m[5],l=m[6],c=m[7],u=m[8],g=m[9],f=m[10],w=m[11],e[0]=v,e[1]=p,e[2]=t,e[3]=r,e[4]=s,e[5]=n,e[6]=l,e[7]=c,e[8]=u,e[9]=g,e[10]=f,e[11]=w,e[12]=v*i+s*L+u*A+m[12],e[13]=p*i+n*L+g*A+m[13],e[14]=t*i+l*L+f*A+m[14],e[15]=r*i+c*L+w*A+m[15]),e}},88654:function(G){G.exports=V;function V(e,m){if(e===m){var P=m[1],i=m[2],L=m[3],A=m[6],v=m[7],p=m[11];e[1]=m[4],e[2]=m[8],e[3]=m[12],e[4]=P,e[6]=m[9],e[7]=m[13],e[8]=i,e[9]=A,e[11]=m[14],e[12]=L,e[13]=v,e[14]=p}else e[0]=m[0],e[1]=m[4],e[2]=m[8],e[3]=m[12],e[4]=m[1],e[5]=m[5],e[6]=m[9],e[7]=m[13],e[8]=m[2],e[9]=m[6],e[10]=m[10],e[11]=m[14],e[12]=m[3],e[13]=m[7],e[14]=m[11],e[15]=m[15];return e}},42505:function(G,V,e){var m=e(72791),P=e(71299),i=e(98580),L=e(12018),A=e(83522),v=e(25075),p=e(68016),t=e(58404),r=e(18863),s=e(10973),n=e(25677),l=e(75686),c=e(53545),u=e(56131),g=e(32879),f=e(30120),w=e(13547),h=w.nextPow2,o=new A,d=!1;if(document.body){var M=document.body.appendChild(document.createElement("div"));M.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(M).fontStretch&&(d=!0),document.body.removeChild(M)}var T=function(S){C(S)?(S={regl:S},this.gl=S.regl._gl):this.gl=L(S),this.shader=o.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=S.regl||i({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(),o.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(s(S)?S:{})};T.prototype.createShader=function(){var S=this.regl,b=S({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:S.prop("count"),offset:S.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:S.this("sizeBuffer")},width:{offset:0,stride:8,buffer:S.this("sizeBuffer")},char:S.this("charBuffer"),position:S.this("position")},uniforms:{atlasSize:function(E,y){return[y.atlas.width,y.atlas.height]},atlasDim:function(E,y){return[y.atlas.cols,y.atlas.rows]},atlas:function(E,y){return y.atlas.texture},charStep:function(E,y){return y.atlas.step},em:function(E,y){return y.atlas.em},color:S.prop("color"),opacity:S.prop("opacity"),viewport:S.this("viewportArray"),scale:S.this("scale"),align:S.prop("align"),baseline:S.prop("baseline"),translate:S.this("translate"),positionOffset:S.prop("positionOffset")},primitive:"points",viewport:S.this("viewport"),vert:` precision highp float; attribute float width, charOffset, char; attribute vec2 position; uniform float fontSize, charStep, em, align, baseline; uniform vec4 viewport; uniform vec4 color; uniform vec2 atlasSize, atlasDim, scale, translate, positionOffset; varying vec2 charCoord, charId; varying float charWidth; varying vec4 fontColor; void main () { vec2 offset = floor(em * (vec2(align + charOffset, baseline) + vec2(positionOffset.x, -positionOffset.y))) / (viewport.zw * scale.xy); vec2 position = (position + translate) * scale; position += offset * scale; charCoord = position * viewport.zw + viewport.xy; gl_Position = vec4(position * 2. - 1., 0, 1); gl_PointSize = charStep; charId.x = mod(char, atlasDim.x); charId.y = floor(char / atlasDim.x); charWidth = width * em; fontColor = color / 255.; }`,frag:` precision highp float; uniform float fontSize, charStep, opacity; uniform vec2 atlasSize; uniform vec4 viewport; uniform sampler2D atlas; varying vec4 fontColor; varying vec2 charCoord, charId; varying float charWidth; float lightness(vec4 color) { return color.r * 0.299 + color.g * 0.587 + color.b * 0.114; } void main () { vec2 uv = gl_FragCoord.xy - charCoord + charStep * .5; float halfCharStep = floor(charStep * .5 + .5); // invert y and shift by 1px (FF expecially needs that) uv.y = charStep - uv.y; // ignore points outside of character bounding box float halfCharWidth = ceil(charWidth * .5); if (floor(uv.x) > halfCharStep + halfCharWidth || floor(uv.x) < halfCharStep - halfCharWidth) return; uv += charId * charStep; uv = uv / atlasSize; vec4 color = fontColor; vec4 mask = texture2D(atlas, uv); float maskY = lightness(mask); // float colorY = lightness(color); color.a *= maskY; color.a *= opacity; // color.a += .1; // antialiasing, see yiq color space y-channel formula // color.rgb += (1. - color.rgb) * (1. - mask.rgb); gl_FragColor = color; }`}),a={};return{regl:S,draw:b,atlas:a}},T.prototype.update=function(S){var b=this;if(typeof S=="string")S={text:S};else if(!S)return;S=P(S,{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),S.opacity!=null&&(Array.isArray(S.opacity)?this.opacity=S.opacity.map(function(Fe){return parseFloat(Fe)}):this.opacity=parseFloat(S.opacity)),S.viewport!=null&&(this.viewport=r(S.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]),S.kerning!=null&&(this.kerning=S.kerning),S.offset!=null&&(typeof S.offset=="number"&&(S.offset=[S.offset,0]),this.positionOffset=f(S.offset)),S.direction&&(this.direction=S.direction),S.range&&(this.range=S.range,this.scale=[1/(S.range[2]-S.range[0]),1/(S.range[3]-S.range[1])],this.translate=[-S.range[0],-S.range[1]]),S.scale&&(this.scale=S.scale),S.translate&&(this.translate=S.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!S.font&&(S.font=T.baseFontSize+"px sans-serif");var a=!1,E=!1;if(S.font&&(Array.isArray(S.font)?S.font:[S.font]).forEach(function(Fe,Ge){if(typeof Fe=="string")try{Fe=m.parse(Fe)}catch{Fe=m.parse(T.baseFontSize+"px "+Fe)}else Fe=m.parse(m.stringify(Fe));var nt=m.stringify({size:T.baseFontSize,family:Fe.family,stretch:d?Fe.stretch:void 0,variant:Fe.variant,weight:Fe.weight,style:Fe.style}),qe=n(Fe.size),$e=Math.round(qe[0]*l(qe[1]));if($e!==b.fontSize[Ge]&&(E=!0,b.fontSize[Ge]=$e),(!b.font[Ge]||nt!=b.font[Ge].baseString)&&(a=!0,b.font[Ge]=T.fonts[nt],!b.font[Ge])){var et=Fe.family.join(", "),ct=[Fe.style];Fe.style!=Fe.variant&&ct.push(Fe.variant),Fe.variant!=Fe.weight&&ct.push(Fe.weight),d&&Fe.weight!=Fe.stretch&&ct.push(Fe.stretch),b.font[Ge]={baseString:nt,family:et,weight:Fe.weight,stretch:Fe.stretch,style:Fe.style,variant:Fe.variant,width:{},kerning:{},metrics:g(et,{origin:"top",fontSize:T.baseFontSize,fontStyle:ct.join(" ")})},T.fonts[nt]=b.font[Ge]}}),(a||E)&&this.font.forEach(function(Fe,Ge){var nt=m.stringify({size:b.fontSize[Ge],family:Fe.family,stretch:d?Fe.stretch:void 0,variant:Fe.variant,weight:Fe.weight,style:Fe.style});if(b.fontAtlas[Ge]=b.shader.atlas[nt],!b.fontAtlas[Ge]){var qe=Fe.metrics;b.shader.atlas[nt]=b.fontAtlas[Ge]={fontString:nt,step:Math.ceil(b.fontSize[Ge]*qe.bottom*.5)*2,em:b.fontSize[Ge],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:b.regl.texture()}}S.text==null&&(S.text=b.text)}),typeof S.text=="string"&&S.position&&S.position.length>2){for(var y=Array(S.position.length*.5),z=0;z2){for(var k=!S.position[0].length,O=t.mallocFloat(this.count*2),N=0,_=0;N1?b.align[Ge]:b.align[0]:b.align;if(typeof nt=="number")return nt;switch(nt){case"right":case"end":return-Fe;case"center":case"centre":case"middle":return-Fe*.5}return 0})),this.baseline==null&&S.baseline==null&&(S.baseline=0),S.baseline!=null&&(this.baseline=S.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(Fe,Ge){var nt=(b.font[Ge]||b.font[0]).metrics,qe=0;return qe+=nt.bottom*.5,typeof Fe=="number"?qe+=Fe-nt.baseline:qe+=-nt[Fe],qe*=-1,qe})),S.color!=null)if(S.color||(S.color="transparent"),typeof S.color=="string"||!isNaN(S.color))this.color=v(S.color,"uint8");else{var Me;if(typeof S.color[0]=="number"&&S.color.length>this.counts.length){var Te=S.color.length;Me=t.mallocUint8(Te);for(var Oe=(S.color.subarray||S.color.slice).bind(S.color),Ne=0;Ne4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(Se){var Ue=Math.max(this.position.length*.5||0,this.color.length*.25||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,this.positionOffset.length*.5||0);this.batch=Array(Ue);for(var He=0;He1?this.counts[He]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[He]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(He*4,He*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[He]:this.opacity,baseline:this.baselineOffset[He]!=null?this.baselineOffset[He]:this.baselineOffset[0],align:this.align?this.alignOffset[He]!=null?this.alignOffset[He]:this.alignOffset[0]:0,atlas:this.fontAtlas[He]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(He*2,He*2+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]}},T.prototype.destroy=function(){},T.prototype.kerning=!0,T.prototype.position={constant:new Float32Array(2)},T.prototype.translate=null,T.prototype.scale=null,T.prototype.font=null,T.prototype.text="",T.prototype.positionOffset=[0,0],T.prototype.opacity=1,T.prototype.color=new Uint8Array([0,0,0,255]),T.prototype.alignOffset=[0,0],T.maxAtlasSize=1024,T.atlasCanvas=document.createElement("canvas"),T.atlasContext=T.atlasCanvas.getContext("2d",{alpha:!1}),T.baseFontSize=64,T.fonts={};function C(x){return typeof x=="function"&&x._gl&&x.prop&&x.texture&&x.buffer}G.exports=T},12018:function(G,V,e){var m=e(71299);G.exports=function(t){if(t?typeof t=="string"&&(t={container:t}):t={},i(t)?t={container:t}:L(t)?t={container:t}:A(t)?t={gl:t}:t=m(t,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0),t.pixelRatio||(t.pixelRatio=e.g.pixelRatio||1),t.gl)return t.gl;if(t.canvas&&(t.container=t.canvas.parentNode),t.container){if(typeof t.container=="string"){var r=document.querySelector(t.container);if(!r)throw Error("Element "+t.container+" is not found");t.container=r}i(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=v(),t.container.appendChild(t.canvas),P(t))}else if(!t.canvas)if(typeof document<"u")t.container=document.body||document.documentElement,t.canvas=v(),t.container.appendChild(t.canvas),P(t);else throw Error("Not DOM environment. Use headless-gl.");return t.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(s){try{t.gl=t.canvas.getContext(s,t.attrs)}catch{}return t.gl}),t.gl};function P(p){if(p.container)if(p.container==document.body)document.body.style.width||(p.canvas.width=p.width||p.pixelRatio*e.g.innerWidth),document.body.style.height||(p.canvas.height=p.height||p.pixelRatio*e.g.innerHeight);else{var t=p.container.getBoundingClientRect();p.canvas.width=p.width||t.right-t.left,p.canvas.height=p.height||t.bottom-t.top}}function i(p){return typeof p.getContext=="function"&&"width"in p&&"height"in p}function L(p){return typeof p.nodeName=="string"&&typeof p.appendChild=="function"&&typeof p.getBoundingClientRect=="function"}function A(p){return typeof p.drawArrays=="function"||typeof p.drawElements=="function"}function v(){var p=document.createElement("canvas");return p.style.position="absolute",p.style.top=0,p.style.left=0,p}},56068:function(G){G.exports=function(V){typeof V=="string"&&(V=[V]);for(var e=[].slice.call(arguments,1),m=[],P=0;P */V.read=function(e,m,P,i,L){var A,v,p=L*8-i-1,t=(1<>1,s=-7,n=P?L-1:0,l=P?-1:1,c=e[m+n];for(n+=l,A=c&(1<<-s)-1,c>>=-s,s+=p;s>0;A=A*256+e[m+n],n+=l,s-=8);for(v=A&(1<<-s)-1,A>>=-s,s+=i;s>0;v=v*256+e[m+n],n+=l,s-=8);if(A===0)A=1-r;else{if(A===t)return v?NaN:(c?-1:1)*(1/0);v=v+Math.pow(2,i),A=A-r}return(c?-1:1)*v*Math.pow(2,A-i)},V.write=function(e,m,P,i,L,A){var v,p,t,r=A*8-L-1,s=(1<>1,l=L===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=i?0:A-1,u=i?1:-1,g=m<0||m===0&&1/m<0?1:0;for(m=Math.abs(m),isNaN(m)||m===1/0?(p=isNaN(m)?1:0,v=s):(v=Math.floor(Math.log(m)/Math.LN2),m*(t=Math.pow(2,-v))<1&&(v--,t*=2),v+n>=1?m+=l/t:m+=l*Math.pow(2,1-n),m*t>=2&&(v++,t/=2),v+n>=s?(p=0,v=s):v+n>=1?(p=(m*t-1)*Math.pow(2,L),v=v+n):(p=m*Math.pow(2,n-1)*Math.pow(2,L),v=0));L>=8;e[P+c]=p&255,c+=u,p/=256,L-=8);for(v=v<0;e[P+c]=v&255,c+=u,v/=256,r-=8);e[P+c-u]|=g*128}},42018:function(G){typeof Object.create=="function"?G.exports=function(e,m){m&&(e.super_=m,e.prototype=Object.create(m.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:G.exports=function(e,m){if(m){e.super_=m;var P=function(){};P.prototype=m.prototype,e.prototype=new P,e.prototype.constructor=e}}},47216:function(G,V,e){var m=e(84543)(),P=e(6614),i=P("Object.prototype.toString"),L=function(t){return m&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:i(t)==="[object Arguments]"},A=function(t){return L(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&i(t)!=="[object Array]"&&i(t.callee)==="[object Function]"},v=function(){return L(arguments)}();L.isLegacyArguments=A,G.exports=v?L:A},54404:function(G){G.exports=!0},85395:function(G){var V=Function.prototype.toString,e=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,m,P;if(typeof e=="function"&&typeof Object.defineProperty=="function")try{m=Object.defineProperty({},"length",{get:function(){throw P}}),P={},e(function(){throw 42},null,m)}catch(w){w!==P&&(e=null)}else e=null;var i=/^\s*class\b/,L=function(h){try{var o=V.call(h);return i.test(o)}catch{return!1}},A=function(h){try{return L(h)?!1:(V.call(h),!0)}catch{return!1}},v=Object.prototype.toString,p="[object Object]",t="[object Function]",r="[object GeneratorFunction]",s="[object HTMLAllCollection]",n="[object HTML document.all class]",l="[object HTMLCollection]",c=typeof Symbol=="function"&&!!Symbol.toStringTag,u=!(0 in[,]),g=function(){return!1};if(typeof document=="object"){var f=document.all;v.call(f)===v.call(document.all)&&(g=function(h){if((u||!h)&&(typeof h>"u"||typeof h=="object"))try{var o=v.call(h);return(o===s||o===n||o===l||o===p)&&h("")==null}catch{}return!1})}G.exports=e?function(h){if(g(h))return!0;if(!h||typeof h!="function"&&typeof h!="object")return!1;try{e(h,null,m)}catch(o){if(o!==P)return!1}return!L(h)&&A(h)}:function(h){if(g(h))return!0;if(!h||typeof h!="function"&&typeof h!="object")return!1;if(c)return A(h);if(L(h))return!1;var o=v.call(h);return o!==t&&o!==r&&!/^\[object HTML/.test(o)?!1:A(h)}},65481:function(G,V,e){var m=Object.prototype.toString,P=Function.prototype.toString,i=/^\s*(?:function)?\*/,L=e(84543)(),A=Object.getPrototypeOf,v=function(){if(!L)return!1;try{return Function("return function*() {}")()}catch{}},p;G.exports=function(r){if(typeof r!="function")return!1;if(i.test(P.call(r)))return!0;if(!L){var s=m.call(r);return s==="[object GeneratorFunction]"}if(!A)return!1;if(typeof p>"u"){var n=v();p=n?A(n):!1}return A(r)===p}},62683:function(G){G.exports=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},64274:function(G){G.exports=function(e){return e!==e}},15567:function(G,V,e){var m=e(68222),P=e(17045),i=e(64274),L=e(14922),A=e(22442),v=m(L(),Number);P(v,{getPolyfill:L,implementation:i,shim:A}),G.exports=v},14922:function(G,V,e){var m=e(64274);G.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:m}},22442:function(G,V,e){var m=e(17045),P=e(14922);G.exports=function(){var L=P();return m(Number,{isNaN:L},{isNaN:function(){return Number.isNaN!==L}}),L}},64941:function(G){G.exports=function(V){var e=typeof V;return V!==null&&(e==="object"||e==="function")}},10973:function(G){var V=Object.prototype.toString;G.exports=function(e){var m;return V.call(e)==="[object Object]"&&(m=Object.getPrototypeOf(e),m===null||m===Object.getPrototypeOf({}))}},18546:function(G){G.exports=function(V){for(var e=V.length,m,P=0;P13)&&m!==32&&m!==133&&m!==160&&m!==5760&&m!==6158&&(m<8192||m>8205)&&m!==8232&&m!==8233&&m!==8239&&m!==8287&&m!==8288&&m!==12288&&m!==65279)return!1;return!0}},89546:function(G){G.exports=function(e){return typeof e!="string"?!1:(e=e.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(e)&&/[\dz]$/i.test(e)&&e.length>4))}},9187:function(G,V,e){var m=e(31353),P=e(72077),i=e(6614),L=i("Object.prototype.toString"),A=e(84543)(),v=e(40383),p=typeof globalThis>"u"?e.g:globalThis,t=P(),r=i("Array.prototype.indexOf",!0)||function(g,f){for(var w=0;w-1}return v?c(g):!1}},44517:function(G){(function(V,e){G.exports=e()})(this,function(){var V,e,m;function P(i,L){if(!V)V=L;else if(!e)e=L;else{var A="var sharedChunk = {}; ("+V+")(sharedChunk); ("+e+")(sharedChunk);",v={};V(v),m=L(v),m.workerUrl=window.URL.createObjectURL(new Blob([A],{type:"text/javascript"}))}}return P(["exports"],function(i){function L(R,D){return D={exports:{}},R(D,D.exports),D.exports}var A="1.10.1",v=p;function p(R,D,H,ne){this.cx=3*R,this.bx=3*(H-R)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*D,this.by=3*(ne-D)-this.cy,this.ay=1-this.cy-this.by,this.p1x=R,this.p1y=ne,this.p2x=H,this.p2y=ne}p.prototype.sampleCurveX=function(R){return((this.ax*R+this.bx)*R+this.cx)*R},p.prototype.sampleCurveY=function(R){return((this.ay*R+this.by)*R+this.cy)*R},p.prototype.sampleCurveDerivativeX=function(R){return(3*this.ax*R+2*this.bx)*R+this.cx},p.prototype.solveCurveX=function(R,D){typeof D>"u"&&(D=1e-6);var H,ne,de,Ae,Re;for(de=R,Re=0;Re<8;Re++){if(Ae=this.sampleCurveX(de)-R,Math.abs(Ae)ne)return ne;for(;HAe?H=de:ne=de,de=(ne-H)*.5+H}return de},p.prototype.solve=function(R,D){return this.sampleCurveY(this.solveCurveX(R,D))};var t=r;function r(R,D){this.x=R,this.y=D}r.prototype={clone:function(){return new r(this.x,this.y)},add:function(R){return this.clone()._add(R)},sub:function(R){return this.clone()._sub(R)},multByPoint:function(R){return this.clone()._multByPoint(R)},divByPoint:function(R){return this.clone()._divByPoint(R)},mult:function(R){return this.clone()._mult(R)},div:function(R){return this.clone()._div(R)},rotate:function(R){return this.clone()._rotate(R)},rotateAround:function(R,D){return this.clone()._rotateAround(R,D)},matMult:function(R){return this.clone()._matMult(R)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(R){return this.x===R.x&&this.y===R.y},dist:function(R){return Math.sqrt(this.distSqr(R))},distSqr:function(R){var D=R.x-this.x,H=R.y-this.y;return D*D+H*H},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(R){return Math.atan2(this.y-R.y,this.x-R.x)},angleWith:function(R){return this.angleWithSep(R.x,R.y)},angleWithSep:function(R,D){return Math.atan2(this.x*D-this.y*R,this.x*R+this.y*D)},_matMult:function(R){var D=R[0]*this.x+R[1]*this.y,H=R[2]*this.x+R[3]*this.y;return this.x=D,this.y=H,this},_add:function(R){return this.x+=R.x,this.y+=R.y,this},_sub:function(R){return this.x-=R.x,this.y-=R.y,this},_mult:function(R){return this.x*=R,this.y*=R,this},_div:function(R){return this.x/=R,this.y/=R,this},_multByPoint:function(R){return this.x*=R.x,this.y*=R.y,this},_divByPoint:function(R){return this.x/=R.x,this.y/=R.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var R=this.y;return this.y=this.x,this.x=-R,this},_rotate:function(R){var D=Math.cos(R),H=Math.sin(R),ne=D*this.x-H*this.y,de=H*this.x+D*this.y;return this.x=ne,this.y=de,this},_rotateAround:function(R,D){var H=Math.cos(R),ne=Math.sin(R),de=D.x+H*(this.x-D.x)-ne*(this.y-D.y),Ae=D.y+ne*(this.x-D.x)+H*(this.y-D.y);return this.x=de,this.y=Ae,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},r.convert=function(R){return R instanceof r?R:Array.isArray(R)?new r(R[0],R[1]):R};function s(R,D){if(Array.isArray(R)){if(!Array.isArray(D)||R.length!==D.length)return!1;for(var H=0;H=1)return 1;var D=R*R,H=D*R;return 4*(R<.5?H:3*(R-D)+H-.75)}function l(R,D,H,ne){var de=new v(R,D,H,ne);return function(Ae){return de.solve(Ae)}}var c=l(.25,.1,.25,1);function u(R,D,H){return Math.min(H,Math.max(D,R))}function g(R,D,H){var ne=H-D,de=((R-D)%ne+ne)%ne+D;return de===D?H:de}function f(R,D,H){if(!R.length)return H(null,[]);var ne=R.length,de=new Array(R.length),Ae=null;R.forEach(function(Re,Ke){D(Re,function(ft,bt){ft&&(Ae=ft),de[Ke]=bt,--ne===0&&H(Ae,de)})})}function w(R){var D=[];for(var H in R)D.push(R[H]);return D}function h(R,D){var H=[];for(var ne in R)ne in D||H.push(ne);return H}function o(R){for(var D=[],H=arguments.length-1;H-- >0;)D[H]=arguments[H+1];for(var ne=0,de=D;ne>D/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,R)}return R()}function x(R){return R?/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(R):!1}function S(R,D){R.forEach(function(H){D[H]&&(D[H]=D[H].bind(D))})}function b(R,D){return R.indexOf(D,R.length-D.length)!==-1}function a(R,D,H){var ne={};for(var de in R)ne[de]=D.call(H||this,R[de],de,R);return ne}function E(R,D,H){var ne={};for(var de in R)D.call(H||this,R[de],de,R)&&(ne[de]=R[de]);return ne}function y(R){return Array.isArray(R)?R.map(y):typeof R=="object"&&R?a(R,y):R}function z(R,D){for(var H=0;H=0)return!0;return!1}var I={};function B(R){I[R]||(typeof console<"u"&&console.warn(R),I[R]=!0)}function k(R,D,H){return(H.y-R.y)*(D.x-R.x)>(D.y-R.y)*(H.x-R.x)}function O(R){for(var D=0,H=0,ne=R.length,de=ne-1,Ae=void 0,Re=void 0;H@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,H={};if(R.replace(D,function(de,Ae,Re,Ke){var ft=Re||Ke;return H[Ae]=ft?ft.toLowerCase():!0,""}),H["max-age"]){var ne=parseInt(H["max-age"],10);isNaN(ne)?delete H["max-age"]:H["max-age"]=ne}return H}var Y=null;function J(R){if(Y==null){var D=R.navigator?R.navigator.userAgent:null;Y=!!R.safari||!!(D&&(/\b(iPad|iPhone|iPod)\b/.test(D)||D.match("Safari")&&!D.match("Chrome")))}return Y}function te(R){try{var D=self[R];return D.setItem("_mapbox_test_",1),D.removeItem("_mapbox_test_"),!0}catch{return!1}}function ae(R){return self.btoa(encodeURIComponent(R).replace(/%([0-9A-F]{2})/g,function(D,H){return String.fromCharCode(+("0x"+H))}))}function ce(R){return decodeURIComponent(self.atob(R).split("").map(function(D){return"%"+("00"+D.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var Q=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),Z=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,j=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,K,ee,oe={now:Q,frame:function(D){var H=Z(D);return{cancel:function(){return j(H)}}},getImageData:function(D,H){H===void 0&&(H=0);var ne=self.document.createElement("canvas"),de=ne.getContext("2d");if(!de)throw new Error("failed to create canvas 2d context");return ne.width=D.width,ne.height=D.height,de.drawImage(D,0,0,D.width,D.height),de.getImageData(-H,-H,D.width+2*H,D.height+2*H)},resolveURL:function(D){return K||(K=self.document.createElement("a")),K.href=D,K.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return self.matchMedia?(ee==null&&(ee=self.matchMedia("(prefers-reduced-motion: reduce)")),ee.matches):!1}},q={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},$={supported:!1,testSupport:Me},le,ie=!1,he,me=!1;self.document&&(he=self.document.createElement("img"),he.onload=function(){le&&Te(le),le=null,me=!0},he.onerror=function(){ie=!0,le=null},he.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function Me(R){ie||!he||(me?Te(R):le=R)}function Te(R){var D=R.createTexture();R.bindTexture(R.TEXTURE_2D,D);try{if(R.texImage2D(R.TEXTURE_2D,0,R.RGBA,R.RGBA,R.UNSIGNED_BYTE,he),R.isContextLost())return;$.supported=!0}catch{}R.deleteTexture(D),ie=!0}var Oe="01";function Ne(){for(var R="1",D="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",H="",ne=0;ne<10;ne++)H+=D[Math.floor(Math.random()*62)];var de=12*60*60*1e3,Ae=[R,Oe,H].join(""),Re=Date.now()+de;return{token:Ae,tokenExpiresAt:Re}}var Ee=function(D,H){this._transformRequestFn=D,this._customAccessToken=H,this._createSkuToken()};Ee.prototype._createSkuToken=function(){var D=Ne();this._skuToken=D.token,this._skuTokenExpiresAt=D.tokenExpiresAt},Ee.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Ee.prototype.transformRequest=function(D,H){return this._transformRequestFn?this._transformRequestFn(D,H)||{url:D}:{url:D}},Ee.prototype.normalizeStyleURL=function(D,H){if(!xe(D))return D;var ne=nt(D);return ne.path="/styles/v1"+ne.path,this._makeAPIURL(ne,this._customAccessToken||H)},Ee.prototype.normalizeGlyphsURL=function(D,H){if(!xe(D))return D;var ne=nt(D);return ne.path="/fonts/v1"+ne.path,this._makeAPIURL(ne,this._customAccessToken||H)},Ee.prototype.normalizeSourceURL=function(D,H){if(!xe(D))return D;var ne=nt(D);return ne.path="/v4/"+ne.authority+".json",ne.params.push("secure"),this._makeAPIURL(ne,this._customAccessToken||H)},Ee.prototype.normalizeSpriteURL=function(D,H,ne,de){var Ae=nt(D);return xe(D)?(Ae.path="/styles/v1"+Ae.path+"/sprite"+H+ne,this._makeAPIURL(Ae,this._customAccessToken||de)):(Ae.path+=""+H+ne,qe(Ae))},Ee.prototype.normalizeTileURL=function(D,H){if(this._isSkuTokenExpired()&&this._createSkuToken(),D&&!xe(D))return D;var ne=nt(D),de=/(\.(png|jpg)\d*)(?=$)/,Ae=/^.+\/v4\//,Re=oe.devicePixelRatio>=2||H===512?"@2x":"",Ke=$.supported?".webp":"$1";ne.path=ne.path.replace(de,""+Re+Ke),ne.path=ne.path.replace(Ae,"/"),ne.path="/v4"+ne.path;var ft=this._customAccessToken||Fe(ne.params)||q.ACCESS_TOKEN;return q.REQUIRE_ACCESS_TOKEN&&ft&&this._skuToken&&ne.params.push("sku="+this._skuToken),this._makeAPIURL(ne,ft)},Ee.prototype.canonicalizeTileURL=function(D,H){var ne="/v4/",de=/\.[\w]+$/,Ae=nt(D);if(!Ae.path.match(/(^\/v4\/)/)||!Ae.path.match(de))return D;var Re="mapbox://tiles/";Re+=Ae.path.replace(ne,"");var Ke=Ae.params;return H&&(Ke=Ke.filter(function(ft){return!ft.match(/^access_token=/)})),Ke.length&&(Re+="?"+Ke.join("&")),Re},Ee.prototype.canonicalizeTileset=function(D,H){for(var ne=H?xe(H):!1,de=[],Ae=0,Re=D.tiles||[];Ae=1&&self.localStorage.setItem(H,JSON.stringify(this.eventData))}catch{B("Unable to write to LocalStorage")}},ct.prototype.processRequests=function(D){},ct.prototype.postEvent=function(D,H,ne,de){var Ae=this;if(q.EVENTS_URL){var Re=nt(q.EVENTS_URL);Re.params.push("access_token="+(de||q.ACCESS_TOKEN||""));var Ke={event:this.type,created:new Date(D).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:A,skuId:Oe,userId:this.anonId},ft=H?o(Ke,H):Ke,bt={url:qe(Re),headers:{"Content-Type":"text/plain"},body:JSON.stringify([ft])};this.pendingRequest=Ct(bt,function(Et){Ae.pendingRequest=null,ne(Et),Ae.saveEventData(),Ae.processRequests(de)})}},ct.prototype.queueRequest=function(D,H){this.queue.push(D),this.processRequests(H)};var dt=function(R){function D(){R.call(this,"map.load"),this.success={},this.skuToken=""}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype.postMapLoadEvent=function(ne,de,Ae,Re){this.skuToken=Ae,(q.EVENTS_URL&&Re||q.ACCESS_TOKEN&&Array.isArray(ne)&&ne.some(function(Ke){return xe(Ke)||Ue(Ke)}))&&this.queueRequest({id:de,timestamp:Date.now()},Re)},D.prototype.processRequests=function(ne){var de=this;if(!(this.pendingRequest||this.queue.length===0)){var Ae=this.queue.shift(),Re=Ae.id,Ke=Ae.timestamp;Re&&this.success[Re]||(this.anonId||this.fetchEventData(),x(this.anonId)||(this.anonId=C()),this.postEvent(Ke,{skuToken:this.skuToken},function(ft){ft||Re&&(de.success[Re]=!0)},ne))}},D}(ct),pt=function(R){function D(H){R.call(this,"appUserTurnstile"),this._customAccessToken=H}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype.postTurnstileEvent=function(ne,de){q.EVENTS_URL&&q.ACCESS_TOKEN&&Array.isArray(ne)&&ne.some(function(Ae){return xe(Ae)||Ue(Ae)})&&this.queueRequest(Date.now(),de)},D.prototype.processRequests=function(ne){var de=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var Ae=et(q.ACCESS_TOKEN),Re=Ae?Ae.u:q.ACCESS_TOKEN,Ke=Re!==this.eventData.tokenU;x(this.anonId)||(this.anonId=C(),Ke=!0);var ft=this.queue.shift();if(this.eventData.lastSuccess){var bt=new Date(this.eventData.lastSuccess),Et=new Date(ft),Wt=(ft-this.eventData.lastSuccess)/(24*60*60*1e3);Ke=Ke||Wt>=1||Wt<-1||bt.getDate()!==Et.getDate()}else Ke=!0;if(!Ke)return this.processRequests();this.postEvent(ft,{"enabled.telemetry":!1},function(sr){sr||(de.eventData.lastSuccess=ft,de.eventData.tokenU=Re)},ne)}},D}(ct),At=new pt,Mt=At.postTurnstileEvent.bind(At),Vt=new dt,Je=Vt.postMapLoadEvent.bind(Vt),De="mapbox-tiles",Ie=500,ze=50,Pe=1e3*60*7,be;function se(){self.caches&&!be&&(be=self.caches.open(De))}var ye;function Le(R,D){if(ye===void 0)try{new Response(new ReadableStream),ye=!0}catch{ye=!1}ye?D(R.body):R.blob().then(D)}function Be(R,D,H){if(se(),!!be){var ne={status:D.status,statusText:D.statusText,headers:new self.Headers};D.headers.forEach(function(Re,Ke){return ne.headers.set(Ke,Re)});var de=U(D.headers.get("Cache-Control")||"");if(!de["no-store"]){de["max-age"]&&ne.headers.set("Expires",new Date(H+de["max-age"]*1e3).toUTCString());var Ae=new Date(ne.headers.get("Expires")).getTime()-H;AeDate.now()&&!H["no-cache"]}var It=1/0;function Bt(R){It++,It>ze&&(R.getActor().send("enforceCacheSizeLimit",Ie),It=0)}function Gt(R){se(),be&&be.then(function(D){D.keys().then(function(H){for(var ne=0;ne=200&&H.status<300||H.status===0)&&H.response!==null){var de=H.response;if(R.type==="json")try{de=JSON.parse(H.response)}catch(Ae){return D(Ae)}D(null,de,H.getResponseHeader("Cache-Control"),H.getResponseHeader("Expires"))}else D(new jt(H.statusText,H.status,R.url))},H.send(R.body),{cancel:function(){return H.abort()}}}var lt=function(R,D){if(!br(R.url)){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty("signal"))return hr(R,D);if(_()&&self.worker&&self.worker.actor){var H=!0;return self.worker.actor.send("getResource",R,D,void 0,H)}}return ut(R,D)},xt=function(R,D){return lt(o(R,{type:"json"}),D)},Tt=function(R,D){return lt(o(R,{type:"arrayBuffer"}),D)},Ct=function(R,D){return lt(o(R,{method:"POST"}),D)};function St(R){var D=self.document.createElement("a");return D.href=R,D.protocol===self.document.location.protocol&&D.host===self.document.location.host}var _t="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Ht(R,D,H,ne){var de=new self.Image,Ae=self.URL;de.onload=function(){D(null,de),Ae.revokeObjectURL(de.src)},de.onerror=function(){return D(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var Re=new self.Blob([new Uint8Array(R)],{type:"image/png"});de.cacheControl=H,de.expires=ne,de.src=R.byteLength?Ae.createObjectURL(Re):_t}function $t(R,D){var H=new self.Blob([new Uint8Array(R)],{type:"image/png"});self.createImageBitmap(H).then(function(ne){D(null,ne)}).catch(function(ne){D(new Error("Could not load image because of "+ne.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var Qt,or,Er=function(){Qt=[],or=0};Er();var Ye=function(R,D){if($.supported&&(R.headers||(R.headers={}),R.headers.accept="image/webp,*/*"),or>=q.MAX_PARALLEL_IMAGE_REQUESTS){var H={requestParameters:R,callback:D,cancelled:!1,cancel:function(){this.cancelled=!0}};return Qt.push(H),H}or++;var ne=!1,de=function(){if(!ne)for(ne=!0,or--;Qt.length&&or0||this._oneTimeListeners&&this._oneTimeListeners[D]&&this._oneTimeListeners[D].length>0||this._eventedParent&&this._eventedParent.listens(D)},lr.prototype.setEventedParent=function(D,H){return this._eventedParent=D,this._eventedParentData=H,this};var rr=8,zt={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"}},fr={"*":{type:"source"}},dr=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],pr={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:"*"}},vr={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:"*"}},Hr={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:"*"}},Ir={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"}},kr={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"}}},pn={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"}}},jr={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"}},In=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],Dn={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},xr={"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"}},Ar={"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"}},Or={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Nr={"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"}},qr={"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"}},vn={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},fn={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Tn={type:"array",value:"*"},Pn={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},jn={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},qn={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},sa={type:"array",value:"*",minimum:1},ta={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"}}},ea={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}},Mr=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],on={"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"}},nn={"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"}},gn={"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"}},Un={"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"}},En={"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},Cn={"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Hn={"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"}},aa={"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"}},Pa={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},Za={"*":{type:"string"}},Xt={$version:rr,$root:zt,sources:fr,source:dr,source_vector:pr,source_raster:vr,source_raster_dem:Hr,source_geojson:Ir,source_video:kr,source_image:pn,layer:jr,layout:In,layout_background:Dn,layout_fill:xr,layout_circle:Ar,layout_heatmap:Or,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:Nr,layout_symbol:qr,layout_raster:vn,layout_hillshade:fn,filter:Tn,filter_operator:Pn,geometry_type:jn,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:qn,expression:sa,expression_name:ta,light:ea,paint:Mr,paint_fill:on,"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:nn,paint_circle:gn,paint_heatmap:Un,paint_symbol:En,paint_raster:Cn,paint_hillshade:Hn,paint_background:aa,transition:Pa,"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:Za},wr=function(D,H,ne,de){this.message=(D?D+": ":"")+ne,de&&(this.identifier=de),H!=null&&H.__line__&&(this.line=H.__line__)};function an(R){var D=R.key,H=R.value;return H?[new wr(D,H,"constants have been deprecated as of v8")]:[]}function cn(R){for(var D=[],H=arguments.length-1;H-- >0;)D[H]=arguments[H+1];for(var ne=0,de=D;ne":R.itemType.kind==="value"?"array":"array<"+D+">"}else return R.kind}var Ki=[Rr,Cr,zr,dn,_n,la,Wn,oa(yn),ia];function co(R,D){if(D.kind==="error")return null;if(R.kind==="array"){if(D.kind==="array"&&(D.N===0&&D.itemType.kind==="value"||!co(R.itemType,D.itemType))&&(typeof R.N!="number"||R.N===D.N))return null}else{if(R.kind===D.kind)return null;if(R.kind==="value")for(var H=0,ne=Ki;H255?255:bt}function de(bt){return bt<0?0:bt>1?1:bt}function Ae(bt){return bt[bt.length-1]==="%"?ne(parseFloat(bt)/100*255):ne(parseInt(bt))}function Re(bt){return bt[bt.length-1]==="%"?de(parseFloat(bt)/100):de(parseFloat(bt))}function Ke(bt,Et,Wt){return Wt<0?Wt+=1:Wt>1&&(Wt-=1),Wt*6<1?bt+(Et-bt)*Wt*6:Wt*2<1?Et:Wt*3<2?bt+(Et-bt)*(2/3-Wt)*6:bt}function ft(bt){var Et=bt.replace(/ /g,"").toLowerCase();if(Et in H)return H[Et].slice();if(Et[0]==="#"){if(Et.length===4){var Wt=parseInt(Et.substr(1),16);return Wt>=0&&Wt<=4095?[(Wt&3840)>>4|(Wt&3840)>>8,Wt&240|(Wt&240)>>4,Wt&15|(Wt&15)<<4,1]:null}else if(Et.length===7){var Wt=parseInt(Et.substr(1),16);return Wt>=0&&Wt<=16777215?[(Wt&16711680)>>16,(Wt&65280)>>8,Wt&255,1]:null}return null}var sr=Et.indexOf("("),qt=Et.indexOf(")");if(sr!==-1&&qt+1===Et.length){var mr=Et.substr(0,sr),Br=Et.substr(sr+1,qt-(sr+1)).split(","),rn=1;switch(mr){case"rgba":if(Br.length!==4)return null;rn=Re(Br.pop());case"rgb":return Br.length!==3?null:[Ae(Br[0]),Ae(Br[1]),Ae(Br[2]),rn];case"hsla":if(Br.length!==4)return null;rn=Re(Br.pop());case"hsl":if(Br.length!==3)return null;var $r=(parseFloat(Br[0])%360+360)%360/360,Mn=Re(Br[1]),xn=Re(Br[2]),An=xn<=.5?xn*(Mn+1):xn+Mn-xn*Mn,kn=xn*2-An;return[ne(Ke(kn,An,$r+1/3)*255),ne(Ke(kn,An,$r)*255),ne(Ke(kn,An,$r-1/3)*255),rn];default:return null}}return null}try{D.parseCSSColor=ft}catch{}}),cf=mo.parseCSSColor,qa=function(D,H,ne,de){de===void 0&&(de=1),this.r=D,this.g=H,this.b=ne,this.a=de};qa.parse=function(D){if(D){if(D instanceof qa)return D;if(typeof D=="string"){var H=cf(D);if(H)return new qa(H[0]/255*H[3],H[1]/255*H[3],H[2]/255*H[3],H[3])}}},qa.prototype.toString=function(){var D=this.toArray(),H=D[0],ne=D[1],de=D[2],Ae=D[3];return"rgba("+Math.round(H)+","+Math.round(ne)+","+Math.round(de)+","+Ae+")"},qa.prototype.toArray=function(){var D=this,H=D.r,ne=D.g,de=D.b,Ae=D.a;return Ae===0?[0,0,0,0]:[H*255/Ae,ne*255/Ae,de*255/Ae,Ae]},qa.black=new qa(0,0,0,1),qa.white=new qa(1,1,1,1),qa.transparent=new qa(0,0,0,0),qa.red=new qa(1,0,0,1);var au=function(D,H,ne){D?this.sensitivity=H?"variant":"case":this.sensitivity=H?"accent":"base",this.locale=ne,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};au.prototype.compare=function(D,H){return this.collator.compare(D,H)},au.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var kl=function(D,H,ne,de,Ae){this.text=D,this.image=H,this.scale=ne,this.fontStack=de,this.textColor=Ae},Ji=function(D){this.sections=D};Ji.fromString=function(D){return new Ji([new kl(D,null,null,null,null)])},Ji.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(D){return D.text.length!==0||D.image&&D.image.name.length!==0})},Ji.factory=function(D){return D instanceof Ji?D:Ji.fromString(D)},Ji.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(D){return D.text}).join("")},Ji.prototype.serialize=function(){for(var D=["format"],H=0,ne=this.sections;H=0&&R<=255&&typeof D=="number"&&D>=0&&D<=255&&typeof H=="number"&&H>=0&&H<=255)){var de=typeof ne=="number"?[R,D,H,ne]:[R,D,H];return"Invalid rgba value ["+de.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof ne>"u"||typeof ne=="number"&&ne>=0&&ne<=1?null:"Invalid rgba value ["+[R,D,H,ne].join(", ")+"]: 'a' must be between 0 and 1."}function iu(R){if(R===null)return!0;if(typeof R=="string")return!0;if(typeof R=="boolean")return!0;if(typeof R=="number")return!0;if(R instanceof qa)return!0;if(R instanceof au)return!0;if(R instanceof Ji)return!0;if(R instanceof Eo)return!0;if(Array.isArray(R)){for(var D=0,H=R;D2){var Ke=D[1];if(typeof Ke!="string"||!(Ke in Fo)||Ke==="object")return H.error('The item type argument of "array" must be one of string, number, boolean',1);Re=Fo[Ke],ne++}else Re=yn;var ft;if(D.length>3){if(D[2]!==null&&(typeof D[2]!="number"||D[2]<0||D[2]!==Math.floor(D[2])))return H.error('The length argument to "array" must be a positive integer literal',2);ft=D[2],ne++}de=oa(Re,ft)}else de=Fo[Ae];for(var bt=[];ne1)&&H.push(de)}}return H.concat(this.args.map(function(Ae){return Ae.serialize()}))};var Vo=function(D){this.type=la,this.sections=D};Vo.parse=function(D,H){if(D.length<2)return H.error("Expected at least one argument.");var ne=D[1];if(!Array.isArray(ne)&&typeof ne=="object")return H.error("First argument must be an image or text section.");for(var de=[],Ae=!1,Re=1;Re<=D.length-1;++Re){var Ke=D[Re];if(Ae&&typeof Ke=="object"&&!Array.isArray(Ke)){Ae=!1;var ft=null;if(Ke["font-scale"]&&(ft=H.parse(Ke["font-scale"],1,Cr),!ft))return null;var bt=null;if(Ke["text-font"]&&(bt=H.parse(Ke["text-font"],1,oa(zr)),!bt))return null;var Et=null;if(Ke["text-color"]&&(Et=H.parse(Ke["text-color"],1,_n),!Et))return null;var Wt=de[de.length-1];Wt.scale=ft,Wt.font=bt,Wt.textColor=Et}else{var sr=H.parse(D[Re],1,yn);if(!sr)return null;var qt=sr.type.kind;if(qt!=="string"&&qt!=="value"&&qt!=="null"&&qt!=="resolvedImage")return H.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");Ae=!0,de.push({content:sr,scale:null,font:null,textColor:null})}}return new Vo(de)},Vo.prototype.evaluate=function(D){var H=function(ne){var de=ne.content.evaluate(D);return Ri(de)===ia?new kl("",de,null,null,null):new kl(ou(de),null,ne.scale?ne.scale.evaluate(D):null,ne.font?ne.font.evaluate(D).join(","):null,ne.textColor?ne.textColor.evaluate(D):null)};return new Ji(this.sections.map(H))},Vo.prototype.eachChild=function(D){for(var H=0,ne=this.sections;H-1),ne},fs.prototype.eachChild=function(D){D(this.input)},fs.prototype.outputDefined=function(){return!1},fs.prototype.serialize=function(){return["image",this.input.serialize()]};var Ls={"to-boolean":dn,"to-color":_n,"to-number":Cr,"to-string":zr},eo=function(D,H){this.type=D,this.args=H};eo.parse=function(D,H){if(D.length<2)return H.error("Expected at least one argument.");var ne=D[0];if((ne==="to-boolean"||ne==="to-string")&&D.length!==2)return H.error("Expected one argument.");for(var de=Ls[ne],Ae=[],Re=1;Re4?ne="Invalid rbga value "+JSON.stringify(H)+": expected an array containing either three or four numeric values.":ne=qf(H[0],H[1],H[2],H[3]),!ne))return new qa(H[0]/255,H[1]/255,H[2]/255,H[3])}throw new Wi(ne||"Could not parse color from value '"+(typeof H=="string"?H:String(JSON.stringify(H)))+"'")}else if(this.type.kind==="number"){for(var ft=null,bt=0,Et=this.args;bt=D[2]||R[1]<=D[1]||R[3]>=D[3])}function th(R,D){var H=df(R[0]),ne=eh(R[1]),de=Math.pow(2,D.z);return[Math.round(H*de*hs),Math.round(ne*de*hs)]}function rh(R,D,H){var ne=R[0]-D[0],de=R[1]-D[1],Ae=R[0]-H[0],Re=R[1]-H[1];return ne*Re-Ae*de===0&&ne*Ae<=0&&de*Re<=0}function nh(R,D,H){return D[1]>R[1]!=H[1]>R[1]&&R[0]<(H[0]-D[0])*(R[1]-D[1])/(H[1]-D[1])+D[0]}function pf(R,D){for(var H=!1,ne=0,de=D.length;ne0&&Wt<0||Et<0&&Wt>0}function oh(R,D,H,ne){var de=[D[0]-R[0],D[1]-R[1]],Ae=[ne[0]-H[0],ne[1]-H[1]];return ih(Ae,de)===0?!1:!!(tc(R,D,H,ne)&&tc(H,ne,R,D))}function sh(R,D,H){for(var ne=0,de=H;neH[2]){var de=ne*.5,Ae=R[0]-H[0]>de?-ne:H[0]-R[0]>de?ne:0;Ae===0&&(Ae=R[0]-H[2]>de?-ne:H[2]-R[0]>de?ne:0),R[0]+=Ae}vf(D,R)}function lh(R){R[0]=R[1]=1/0,R[2]=R[3]=-1/0}function Rs(R,D,H,ne){for(var de=Math.pow(2,ne.z)*hs,Ae=[ne.x*hs,ne.y*hs],Re=[],Ke=0,ft=R;Ke=0)return!1;var H=!0;return R.eachChild(function(ne){H&&!_l(ne,D)&&(H=!1)}),H}var vs=function(D,H){this.type=H.type,this.name=D,this.boundExpression=H};vs.parse=function(D,H){if(D.length!==2||typeof D[1]!="string")return H.error("'var' expression requires exactly one string literal argument.");var ne=D[1];return H.scope.has(ne)?new vs(ne,H.scope.get(ne)):H.error('Unknown variable "'+ne+'". Make sure "'+ne+'" has been bound in an enclosing "let" expression before using it.',1)},vs.prototype.evaluate=function(D){return this.boundExpression.evaluate(D)},vs.prototype.eachChild=function(){},vs.prototype.outputDefined=function(){return!1},vs.prototype.serialize=function(){return["var",this.name]};var Ds=function(D,H,ne,de,Ae){H===void 0&&(H=[]),de===void 0&&(de=new un),Ae===void 0&&(Ae=[]),this.registry=D,this.path=H,this.key=H.map(function(Re){return"["+Re+"]"}).join(""),this.scope=de,this.errors=Ae,this.expectedType=ne};Ds.prototype.parse=function(D,H,ne,de,Ae){return Ae===void 0&&(Ae={}),H?this.concat(H,ne,de)._parse(D,Ae):this._parse(D,Ae)},Ds.prototype._parse=function(D,H){(D===null||typeof D=="string"||typeof D=="boolean"||typeof D=="number")&&(D=["literal",D]);function ne(Et,Wt,sr){return sr==="assert"?new ho(Wt,[Et]):sr==="coerce"?new eo(Wt,[Et]):Et}if(Array.isArray(D)){if(D.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var de=D[0];if(typeof de!="string")return this.error("Expression name must be a string, but found "+typeof de+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var Ae=this.registry[de];if(Ae){var Re=Ae.parse(D,this);if(!Re)return null;if(this.expectedType){var Ke=this.expectedType,ft=Re.type;if((Ke.kind==="string"||Ke.kind==="number"||Ke.kind==="boolean"||Ke.kind==="object"||Ke.kind==="array")&&ft.kind==="value")Re=ne(Re,Ke,H.typeAnnotation||"assert");else if((Ke.kind==="color"||Ke.kind==="formatted"||Ke.kind==="resolvedImage")&&(ft.kind==="value"||ft.kind==="string"))Re=ne(Re,Ke,H.typeAnnotation||"coerce");else if(this.checkSubtype(Ke,ft))return null}if(!(Re instanceof ko)&&Re.type.kind!=="resolvedImage"&&mf(Re)){var bt=new cs;try{Re=new ko(Re.type,Re.evaluate(bt))}catch(Et){return this.error(Et.message),null}}return Re}return this.error('Unknown expression "'+de+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof D>"u"?this.error("'undefined' value invalid. Use null instead."):typeof D=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof D+" instead.")},Ds.prototype.concat=function(D,H,ne){var de=typeof D=="number"?this.path.concat(D):this.path,Ae=ne?this.scope.concat(ne):this.scope;return new Ds(this.registry,de,H||null,Ae,this.errors)},Ds.prototype.error=function(D){for(var H=[],ne=arguments.length-1;ne-- >0;)H[ne]=arguments[ne+1];var de=""+this.key+H.map(function(Ae){return"["+Ae+"]"}).join("");this.errors.push(new wn(de,D))},Ds.prototype.checkSubtype=function(D,H){var ne=co(D,H);return ne&&this.error(ne),ne};function mf(R){if(R instanceof vs)return mf(R.boundExpression);if(R instanceof to&&R.name==="error")return!1;if(R instanceof Ps)return!1;if(R instanceof Ho)return!1;var D=R instanceof eo||R instanceof ho,H=!0;return R.eachChild(function(ne){D?H=H&&mf(ne):H=H&&ne instanceof ko}),H?dl(R)&&_l(R,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function zl(R,D){for(var H=R.length-1,ne=0,de=H,Ae=0,Re,Ke;ne<=de;)if(Ae=Math.floor((ne+de)/2),Re=R[Ae],Ke=R[Ae+1],Re<=D){if(Ae===H||DD)de=Ae-1;else throw new Wi("Input is not a number.");return 0}var Zs=function(D,H,ne){this.type=D,this.input=H,this.labels=[],this.outputs=[];for(var de=0,Ae=ne;de=Ke)return H.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',bt);var Wt=H.parse(ft,Et,Ae);if(!Wt)return null;Ae=Ae||Wt.type,de.push([Ke,Wt])}return new Zs(Ae,ne,de)},Zs.prototype.evaluate=function(D){var H=this.labels,ne=this.outputs;if(H.length===1)return ne[0].evaluate(D);var de=this.input.evaluate(D);if(de<=H[0])return ne[0].evaluate(D);var Ae=H.length;if(de>=H[Ae-1])return ne[Ae-1].evaluate(D);var Re=zl(H,de);return ne[Re].evaluate(D)},Zs.prototype.eachChild=function(D){D(this.input);for(var H=0,ne=this.outputs;H0&&D.push(this.labels[H]),D.push(this.outputs[H].serialize());return D};function Fi(R,D,H){return R*(1-H)+D*H}function xf(R,D,H){return new qa(Fi(R.r,D.r,H),Fi(R.g,D.g,H),Fi(R.b,D.b,H),Fi(R.a,D.a,H))}function Ou(R,D,H){return R.map(function(ne,de){return Fi(ne,D[de],H)})}var Ol=Object.freeze({__proto__:null,number:Fi,color:xf,array:Ou}),nc=.95047,ac=1,Nl=1.08883,Bl=4/29,Qi=6/29,Nu=3*Qi*Qi,fh=Qi*Qi*Qi,bf=Math.PI/180,ch=180/Math.PI;function Bu(R){return R>fh?Math.pow(R,.3333333333333333):R/Nu+Bl}function uu(R){return R>Qi?R*R*R:Nu*(R-Bl)}function wf(R){return 255*(R<=.0031308?12.92*R:1.055*Math.pow(R,.4166666666666667)-.055)}function Tf(R){return R/=255,R<=.04045?R/12.92:Math.pow((R+.055)/1.055,2.4)}function fu(R){var D=Tf(R.r),H=Tf(R.g),ne=Tf(R.b),de=Bu((.4124564*D+.3575761*H+.1804375*ne)/nc),Ae=Bu((.2126729*D+.7151522*H+.072175*ne)/ac),Re=Bu((.0193339*D+.119192*H+.9503041*ne)/Nl);return{l:116*Ae-16,a:500*(de-Ae),b:200*(Ae-Re),alpha:R.a}}function Af(R){var D=(R.l+16)/116,H=isNaN(R.a)?D:D+R.a/500,ne=isNaN(R.b)?D:D-R.b/200;return D=ac*uu(D),H=nc*uu(H),ne=Nl*uu(ne),new qa(wf(3.2404542*H-1.5371385*D-.4985314*ne),wf(-.969266*H+1.8760108*D+.041556*ne),wf(.0556434*H-.2040259*D+1.0572252*ne),R.alpha)}function Uu(R,D,H){return{l:Fi(R.l,D.l,H),a:Fi(R.a,D.a,H),b:Fi(R.b,D.b,H),alpha:Fi(R.alpha,D.alpha,H)}}function Mf(R){var D=fu(R),H=D.l,ne=D.a,de=D.b,Ae=Math.atan2(de,ne)*ch;return{h:Ae<0?Ae+360:Ae,c:Math.sqrt(ne*ne+de*de),l:H,alpha:R.a}}function vi(R){var D=R.h*bf,H=R.c,ne=R.l;return Af({l:ne,a:Math.cos(D)*H,b:Math.sin(D)*H,alpha:R.alpha})}function ic(R,D,H){var ne=D-R;return R+H*(ne>180||ne<-180?ne-360*Math.round(ne/360):ne)}function $o(R,D,H){return{h:ic(R.h,D.h,H),c:Fi(R.c,D.c,H),l:Fi(R.l,D.l,H),alpha:Fi(R.alpha,D.alpha,H)}}var Ul={forward:fu,reverse:Af,interpolate:Uu},pl={forward:Mf,reverse:vi,interpolate:$o},Sf=Object.freeze({__proto__:null,lab:Ul,hcl:pl}),zi=function(D,H,ne,de,Ae){this.type=D,this.operator=H,this.interpolation=ne,this.input=de,this.labels=[],this.outputs=[];for(var Re=0,Ke=Ae;Re1}))return H.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);de={name:"cubic-bezier",controlPoints:ft}}else return H.error("Unknown interpolation type "+String(de[0]),1,0);if(D.length-1<4)return H.error("Expected at least 4 arguments, but found only "+(D.length-1)+".");if((D.length-1)%2!==0)return H.error("Expected an even number of arguments.");if(Ae=H.parse(Ae,2,Cr),!Ae)return null;var bt=[],Et=null;ne==="interpolate-hcl"||ne==="interpolate-lab"?Et=_n:H.expectedType&&H.expectedType.kind!=="value"&&(Et=H.expectedType);for(var Wt=0;Wt=sr)return H.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',mr);var rn=H.parse(qt,Br,Et);if(!rn)return null;Et=Et||rn.type,bt.push([sr,rn])}return Et.kind!=="number"&&Et.kind!=="color"&&!(Et.kind==="array"&&Et.itemType.kind==="number"&&typeof Et.N=="number")?H.error("Type "+da(Et)+" is not interpolatable."):new zi(Et,ne,de,Ae,bt)},zi.prototype.evaluate=function(D){var H=this.labels,ne=this.outputs;if(H.length===1)return ne[0].evaluate(D);var de=this.input.evaluate(D);if(de<=H[0])return ne[0].evaluate(D);var Ae=H.length;if(de>=H[Ae-1])return ne[Ae-1].evaluate(D);var Re=zl(H,de),Ke=H[Re],ft=H[Re+1],bt=zi.interpolationFactor(this.interpolation,de,Ke,ft),Et=ne[Re].evaluate(D),Wt=ne[Re+1].evaluate(D);return this.operator==="interpolate"?Ol[this.type.kind.toLowerCase()](Et,Wt,bt):this.operator==="interpolate-hcl"?pl.reverse(pl.interpolate(pl.forward(Et),pl.forward(Wt),bt)):Ul.reverse(Ul.interpolate(Ul.forward(Et),Ul.forward(Wt),bt))},zi.prototype.eachChild=function(D){D(this.input);for(var H=0,ne=this.outputs;H=ne.length)throw new Wi("Array index out of bounds: "+H+" > "+(ne.length-1)+".");if(H!==Math.floor(H))throw new Wi("Array index must be an integer, but found "+H+" instead.");return ne[H]},ks.prototype.eachChild=function(D){D(this.index),D(this.input)},ks.prototype.outputDefined=function(){return!1},ks.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Xs=function(D,H){this.type=dn,this.needle=D,this.haystack=H};Xs.parse=function(D,H){if(D.length!==3)return H.error("Expected 2 arguments, but found "+(D.length-1)+" instead.");var ne=H.parse(D[1],1,yn),de=H.parse(D[2],2,yn);return!ne||!de?null:yo(ne.type,[dn,zr,Cr,Rr,yn])?new Xs(ne,de):H.error("Expected first argument to be of type boolean, string, number or null, but found "+da(ne.type)+" instead")},Xs.prototype.evaluate=function(D){var H=this.needle.evaluate(D),ne=this.haystack.evaluate(D);if(!ne)return!1;if(!So(H,["boolean","string","number","null"]))throw new Wi("Expected first argument to be of type boolean, string, number or null, but found "+da(Ri(H))+" instead.");if(!So(ne,["string","array"]))throw new Wi("Expected second argument to be of type array or string, but found "+da(Ri(ne))+" instead.");return ne.indexOf(H)>=0},Xs.prototype.eachChild=function(D){D(this.needle),D(this.haystack)},Xs.prototype.outputDefined=function(){return!0},Xs.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var js=function(D,H,ne){this.type=Cr,this.needle=D,this.haystack=H,this.fromIndex=ne};js.parse=function(D,H){if(D.length<=2||D.length>=5)return H.error("Expected 3 or 4 arguments, but found "+(D.length-1)+" instead.");var ne=H.parse(D[1],1,yn),de=H.parse(D[2],2,yn);if(!ne||!de)return null;if(!yo(ne.type,[dn,zr,Cr,Rr,yn]))return H.error("Expected first argument to be of type boolean, string, number or null, but found "+da(ne.type)+" instead");if(D.length===4){var Ae=H.parse(D[3],3,Cr);return Ae?new js(ne,de,Ae):null}else return new js(ne,de)},js.prototype.evaluate=function(D){var H=this.needle.evaluate(D),ne=this.haystack.evaluate(D);if(!So(H,["boolean","string","number","null"]))throw new Wi("Expected first argument to be of type boolean, string, number or null, but found "+da(Ri(H))+" instead.");if(!So(ne,["string","array"]))throw new Wi("Expected second argument to be of type array or string, but found "+da(Ri(ne))+" instead.");if(this.fromIndex){var de=this.fromIndex.evaluate(D);return ne.indexOf(H,de)}return ne.indexOf(H)},js.prototype.eachChild=function(D){D(this.needle),D(this.haystack),this.fromIndex&&D(this.fromIndex)},js.prototype.outputDefined=function(){return!1},js.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var D=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),D]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Ks=function(D,H,ne,de,Ae,Re){this.inputType=D,this.type=H,this.input=ne,this.cases=de,this.outputs=Ae,this.otherwise=Re};Ks.parse=function(D,H){if(D.length<5)return H.error("Expected at least 4 arguments, but found only "+(D.length-1)+".");if(D.length%2!==1)return H.error("Expected an even number of arguments.");var ne,de;H.expectedType&&H.expectedType.kind!=="value"&&(de=H.expectedType);for(var Ae={},Re=[],Ke=2;KeNumber.MAX_SAFE_INTEGER)return Et.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof qt=="number"&&Math.floor(qt)!==qt)return Et.error("Numeric branch labels must be integer values.");if(!ne)ne=Ri(qt);else if(Et.checkSubtype(ne,Ri(qt)))return null;if(typeof Ae[String(qt)]<"u")return Et.error("Branch labels must be unique.");Ae[String(qt)]=Re.length}var mr=H.parse(bt,Ke,de);if(!mr)return null;de=de||mr.type,Re.push(mr)}var Br=H.parse(D[1],1,yn);if(!Br)return null;var rn=H.parse(D[D.length-1],D.length-1,de);return!rn||Br.type.kind!=="value"&&H.concat(1).checkSubtype(ne,Br.type)?null:new Ks(ne,de,Br,Ae,Re,rn)},Ks.prototype.evaluate=function(D){var H=this.input.evaluate(D),ne=Ri(H)===this.inputType&&this.outputs[this.cases[H]]||this.otherwise;return ne.evaluate(D)},Ks.prototype.eachChild=function(D){D(this.input),this.outputs.forEach(D),D(this.otherwise)},Ks.prototype.outputDefined=function(){return this.outputs.every(function(D){return D.outputDefined()})&&this.otherwise.outputDefined()},Ks.prototype.serialize=function(){for(var D=this,H=["match",this.input.serialize()],ne=Object.keys(this.cases).sort(),de=[],Ae={},Re=0,Ke=ne;Re=5)return H.error("Expected 3 or 4 arguments, but found "+(D.length-1)+" instead.");var ne=H.parse(D[1],1,yn),de=H.parse(D[2],2,Cr);if(!ne||!de)return null;if(!yo(ne.type,[oa(yn),zr,yn]))return H.error("Expected first argument to be of type array or string, but found "+da(ne.type)+" instead");if(D.length===4){var Ae=H.parse(D[3],3,Cr);return Ae?new ds(ne.type,ne,de,Ae):null}else return new ds(ne.type,ne,de)},ds.prototype.evaluate=function(D){var H=this.input.evaluate(D),ne=this.beginIndex.evaluate(D);if(!So(H,["string","array"]))throw new Wi("Expected first argument to be of type array or string, but found "+da(Ri(H))+" instead.");if(this.endIndex){var de=this.endIndex.evaluate(D);return H.slice(ne,de)}return H.slice(ne)},ds.prototype.eachChild=function(D){D(this.input),D(this.beginIndex),this.endIndex&&D(this.endIndex)},ds.prototype.outputDefined=function(){return!1},ds.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var D=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),D]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function hu(R,D){return R==="=="||R==="!="?D.kind==="boolean"||D.kind==="string"||D.kind==="number"||D.kind==="null"||D.kind==="value":D.kind==="string"||D.kind==="number"||D.kind==="value"}function vu(R,D,H){return D===H}function Vu(R,D,H){return D!==H}function hh(R,D,H){return DH}function dh(R,D,H){return D<=H}function ph(R,D,H){return D>=H}function Hu(R,D,H,ne){return ne.compare(D,H)===0}function oc(R,D,H,ne){return!Hu(R,D,H,ne)}function Vl(R,D,H,ne){return ne.compare(D,H)<0}function ro(R,D,H,ne){return ne.compare(D,H)>0}function Lo(R,D,H,ne){return ne.compare(D,H)<=0}function du(R,D,H,ne){return ne.compare(D,H)>=0}function yl(R,D,H){var ne=R!=="=="&&R!=="!=";return function(){function de(Ae,Re,Ke){this.type=dn,this.lhs=Ae,this.rhs=Re,this.collator=Ke,this.hasUntypedArgument=Ae.type.kind==="value"||Re.type.kind==="value"}return de.parse=function(Re,Ke){if(Re.length!==3&&Re.length!==4)return Ke.error("Expected two or three arguments.");var ft=Re[0],bt=Ke.parse(Re[1],1,yn);if(!bt)return null;if(!hu(ft,bt.type))return Ke.concat(1).error('"'+ft+`" comparisons are not supported for type '`+da(bt.type)+"'.");var Et=Ke.parse(Re[2],2,yn);if(!Et)return null;if(!hu(ft,Et.type))return Ke.concat(2).error('"'+ft+`" comparisons are not supported for type '`+da(Et.type)+"'.");if(bt.type.kind!==Et.type.kind&&bt.type.kind!=="value"&&Et.type.kind!=="value")return Ke.error("Cannot compare types '"+da(bt.type)+"' and '"+da(Et.type)+"'.");ne&&(bt.type.kind==="value"&&Et.type.kind!=="value"?bt=new ho(Et.type,[bt]):bt.type.kind!=="value"&&Et.type.kind==="value"&&(Et=new ho(bt.type,[Et])));var Wt=null;if(Re.length===4){if(bt.type.kind!=="string"&&Et.type.kind!=="string"&&bt.type.kind!=="value"&&Et.type.kind!=="value")return Ke.error("Cannot use collator to compare non-string types.");if(Wt=Ke.parse(Re[3],3,$n),!Wt)return null}return new de(bt,Et,Wt)},de.prototype.evaluate=function(Re){var Ke=this.lhs.evaluate(Re),ft=this.rhs.evaluate(Re);if(ne&&this.hasUntypedArgument){var bt=Ri(Ke),Et=Ri(ft);if(bt.kind!==Et.kind||!(bt.kind==="string"||bt.kind==="number"))throw new Wi('Expected arguments for "'+R+'" to be (string, string) or (number, number), but found ('+bt.kind+", "+Et.kind+") instead.")}if(this.collator&&!ne&&this.hasUntypedArgument){var Wt=Ri(Ke),sr=Ri(ft);if(Wt.kind!=="string"||sr.kind!=="string")return D(Re,Ke,ft)}return this.collator?H(Re,Ke,ft,this.collator.evaluate(Re)):D(Re,Ke,ft)},de.prototype.eachChild=function(Re){Re(this.lhs),Re(this.rhs),this.collator&&Re(this.collator)},de.prototype.outputDefined=function(){return!0},de.prototype.serialize=function(){var Re=[R];return this.eachChild(function(Ke){Re.push(Ke.serialize())}),Re},de}()}var pu=yl("==",vu,Hu),Gu=yl("!=",Vu,oc),gh=yl("<",hh,Vl),sc=yl(">",vh,ro),lc=yl("<=",dh,Lo),Ef=yl(">=",ph,du),Js=function(D,H,ne,de,Ae){this.type=zr,this.number=D,this.locale=H,this.currency=ne,this.minFractionDigits=de,this.maxFractionDigits=Ae};Js.parse=function(D,H){if(D.length!==3)return H.error("Expected two arguments.");var ne=H.parse(D[1],1,Cr);if(!ne)return null;var de=D[2];if(typeof de!="object"||Array.isArray(de))return H.error("NumberFormat options argument must be an object.");var Ae=null;if(de.locale&&(Ae=H.parse(de.locale,1,zr),!Ae))return null;var Re=null;if(de.currency&&(Re=H.parse(de.currency,1,zr),!Re))return null;var Ke=null;if(de["min-fraction-digits"]&&(Ke=H.parse(de["min-fraction-digits"],1,Cr),!Ke))return null;var ft=null;return de["max-fraction-digits"]&&(ft=H.parse(de["max-fraction-digits"],1,Cr),!ft)?null:new Js(ne,Ae,Re,Ke,ft)},Js.prototype.evaluate=function(D){return new Intl.NumberFormat(this.locale?this.locale.evaluate(D):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(D):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(D):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(D):void 0}).format(this.number.evaluate(D))},Js.prototype.eachChild=function(D){D(this.number),this.locale&&D(this.locale),this.currency&&D(this.currency),this.minFractionDigits&&D(this.minFractionDigits),this.maxFractionDigits&&D(this.maxFractionDigits)},Js.prototype.outputDefined=function(){return!1},Js.prototype.serialize=function(){var D={};return this.locale&&(D.locale=this.locale.serialize()),this.currency&&(D.currency=this.currency.serialize()),this.minFractionDigits&&(D["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(D["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),D]};var Oi=function(D){this.type=Cr,this.input=D};Oi.parse=function(D,H){if(D.length!==2)return H.error("Expected 1 argument, but found "+(D.length-1)+" instead.");var ne=H.parse(D[1],1);return ne?ne.type.kind!=="array"&&ne.type.kind!=="string"&&ne.type.kind!=="value"?H.error("Expected argument of type string or array, but found "+da(ne.type)+" instead."):new Oi(ne):null},Oi.prototype.evaluate=function(D){var H=this.input.evaluate(D);if(typeof H=="string")return H.length;if(Array.isArray(H))return H.length;throw new Wi("Expected value to be of type string or array, but found "+da(Ri(H))+" instead.")},Oi.prototype.eachChild=function(D){D(this.input)},Oi.prototype.outputDefined=function(){return!1},Oi.prototype.serialize=function(){var D=["length"];return this.eachChild(function(H){D.push(H.serialize())}),D};var ps={"==":pu,"!=":Gu,">":sc,"<":gh,">=":Ef,"<=":lc,array:ho,at:ks,boolean:ho,case:qo,coalesce:Co,collator:Ps,format:Vo,image:fs,in:Xs,"index-of":js,interpolate:zi,"interpolate-hcl":zi,"interpolate-lab":zi,length:Oi,let:Is,literal:ko,match:Ks,number:ho,"number-format":Js,object:ho,slice:ds,step:Zs,string:ho,"to-boolean":eo,"to-color":eo,"to-number":eo,"to-string":eo,var:vs,within:Ho};function Cf(R,D){var H=D[0],ne=D[1],de=D[2],Ae=D[3];H=H.evaluate(R),ne=ne.evaluate(R),de=de.evaluate(R);var Re=Ae?Ae.evaluate(R):1,Ke=qf(H,ne,de,Re);if(Ke)throw new Wi(Ke);return new qa(H/255*Re,ne/255*Re,de/255*Re,Re)}function uc(R,D){return R in D}function ml(R,D){var H=D[R];return typeof H>"u"?null:H}function Wu(R,D,H,ne){for(;H<=ne;){var de=H+ne>>1;if(D[de]===R)return!0;D[de]>R?ne=de-1:H=de+1}return!1}function es(R){return{type:R}}to.register(ps,{error:[On,[zr],function(R,D){var H=D[0];throw new Wi(H.evaluate(R))}],typeof:[zr,[yn],function(R,D){var H=D[0];return da(Ri(H.evaluate(R)))}],"to-rgba":[oa(Cr,4),[_n],function(R,D){var H=D[0];return H.evaluate(R).toArray()}],rgb:[_n,[Cr,Cr,Cr],Cf],rgba:[_n,[Cr,Cr,Cr,Cr],Cf],has:{type:dn,overloads:[[[zr],function(R,D){var H=D[0];return uc(H.evaluate(R),R.properties())}],[[zr,Wn],function(R,D){var H=D[0],ne=D[1];return uc(H.evaluate(R),ne.evaluate(R))}]]},get:{type:yn,overloads:[[[zr],function(R,D){var H=D[0];return ml(H.evaluate(R),R.properties())}],[[zr,Wn],function(R,D){var H=D[0],ne=D[1];return ml(H.evaluate(R),ne.evaluate(R))}]]},"feature-state":[yn,[zr],function(R,D){var H=D[0];return ml(H.evaluate(R),R.featureState||{})}],properties:[Wn,[],function(R){return R.properties()}],"geometry-type":[zr,[],function(R){return R.geometryType()}],id:[yn,[],function(R){return R.id()}],zoom:[Cr,[],function(R){return R.globals.zoom}],"heatmap-density":[Cr,[],function(R){return R.globals.heatmapDensity||0}],"line-progress":[Cr,[],function(R){return R.globals.lineProgress||0}],accumulated:[yn,[],function(R){return R.globals.accumulated===void 0?null:R.globals.accumulated}],"+":[Cr,es(Cr),function(R,D){for(var H=0,ne=0,de=D;ne":[dn,[zr,yn],function(R,D){var H=D[0],ne=D[1],de=R.properties()[H.value],Ae=ne.value;return typeof de==typeof Ae&&de>Ae}],"filter-id->":[dn,[yn],function(R,D){var H=D[0],ne=R.id(),de=H.value;return typeof ne==typeof de&&ne>de}],"filter-<=":[dn,[zr,yn],function(R,D){var H=D[0],ne=D[1],de=R.properties()[H.value],Ae=ne.value;return typeof de==typeof Ae&&de<=Ae}],"filter-id-<=":[dn,[yn],function(R,D){var H=D[0],ne=R.id(),de=H.value;return typeof ne==typeof de&&ne<=de}],"filter->=":[dn,[zr,yn],function(R,D){var H=D[0],ne=D[1],de=R.properties()[H.value],Ae=ne.value;return typeof de==typeof Ae&&de>=Ae}],"filter-id->=":[dn,[yn],function(R,D){var H=D[0],ne=R.id(),de=H.value;return typeof ne==typeof de&&ne>=de}],"filter-has":[dn,[yn],function(R,D){var H=D[0];return H.value in R.properties()}],"filter-has-id":[dn,[],function(R){return R.id()!==null&&R.id()!==void 0}],"filter-type-in":[dn,[oa(zr)],function(R,D){var H=D[0];return H.value.indexOf(R.geometryType())>=0}],"filter-id-in":[dn,[oa(yn)],function(R,D){var H=D[0];return H.value.indexOf(R.id())>=0}],"filter-in-small":[dn,[zr,oa(yn)],function(R,D){var H=D[0],ne=D[1];return ne.value.indexOf(R.properties()[H.value])>=0}],"filter-in-large":[dn,[zr,oa(yn)],function(R,D){var H=D[0],ne=D[1];return Wu(R.properties()[H.value],ne.value,0,ne.value.length-1)}],all:{type:dn,overloads:[[[dn,dn],function(R,D){var H=D[0],ne=D[1];return H.evaluate(R)&&ne.evaluate(R)}],[es(dn),function(R,D){for(var H=0,ne=D;H-1}function Hl(R){return!!R.expression&&R.expression.interpolated}function si(R){return R instanceof Number?"number":R instanceof String?"string":R instanceof Boolean?"boolean":Array.isArray(R)?"array":R===null?"null":typeof R}function xl(R){return typeof R=="object"&&R!==null&&!Array.isArray(R)}function Zu(R){return R}function Xu(R,D){var H=D.type==="color",ne=R.stops&&typeof R.stops[0][0]=="object",de=ne||R.property!==void 0,Ae=ne||!de,Re=R.type||(Hl(D)?"exponential":"interval");if(H&&(R=cn({},R),R.stops&&(R.stops=R.stops.map(function(Jn){return[Jn[0],qa.parse(Jn[1])]})),R.default?R.default=qa.parse(R.default):R.default=qa.parse(D.default)),R.colorSpace&&R.colorSpace!=="rgb"&&!Sf[R.colorSpace])throw new Error("Unknown color space: "+R.colorSpace);var Ke,ft,bt;if(Re==="exponential")Ke=Gl;else if(Re==="interval")Ke=Pf;else if(Re==="categorical"){Ke=yh,ft=Object.create(null);for(var Et=0,Wt=R.stops;Et=R.stops[ne-1][0])return R.stops[ne-1][1];var de=zl(R.stops.map(function(Ae){return Ae[0]}),H);return R.stops[de][1]}function Gl(R,D,H){var ne=R.base!==void 0?R.base:1;if(si(H)!=="number")return Qs(R.default,D.default);var de=R.stops.length;if(de===1||H<=R.stops[0][0])return R.stops[0][1];if(H>=R.stops[de-1][0])return R.stops[de-1][1];var Ae=zl(R.stops.map(function(Wt){return Wt[0]}),H),Re=fc(H,ne,R.stops[Ae][0],R.stops[Ae+1][0]),Ke=R.stops[Ae][1],ft=R.stops[Ae+1][1],bt=Ol[D.type]||Zu;if(R.colorSpace&&R.colorSpace!=="rgb"){var Et=Sf[R.colorSpace];bt=function(Wt,sr){return Et.reverse(Et.interpolate(Et.forward(Wt),Et.forward(sr),Re))}}return typeof Ke.evaluate=="function"?{evaluate:function(){for(var sr=[],qt=arguments.length;qt--;)sr[qt]=arguments[qt];var mr=Ke.evaluate.apply(void 0,sr),Br=ft.evaluate.apply(void 0,sr);if(!(mr===void 0||Br===void 0))return bt(mr,Br,Re)}}:bt(Ke,ft,Re)}function Rf(R,D,H){return D.type==="color"?H=qa.parse(H):D.type==="formatted"?H=Ji.fromString(H.toString()):D.type==="resolvedImage"?H=Eo.fromString(H.toString()):si(H)!==D.type&&(D.type!=="enum"||!D.values[H])&&(H=void 0),Qs(H,R.default,D.default)}function fc(R,D,H,ne){var de=ne-H,Ae=R-H;return de===0?0:D===1?Ae/de:(Math.pow(D,Ae)-1)/(Math.pow(D,de)-1)}var zs=function(D,H){this.expression=D,this._warningHistory={},this._evaluator=new cs,this._defaultValue=H?hc(H):null,this._enumValues=H&&H.type==="enum"?H.values:null};zs.prototype.evaluateWithoutErrorHandling=function(D,H,ne,de,Ae,Re){return this._evaluator.globals=D,this._evaluator.feature=H,this._evaluator.featureState=ne,this._evaluator.canonical=de,this._evaluator.availableImages=Ae||null,this._evaluator.formattedSection=Re,this.expression.evaluate(this._evaluator)},zs.prototype.evaluate=function(D,H,ne,de,Ae,Re){this._evaluator.globals=D,this._evaluator.feature=H||null,this._evaluator.featureState=ne||null,this._evaluator.canonical=de,this._evaluator.availableImages=Ae||null,this._evaluator.formattedSection=Re||null;try{var Ke=this.expression.evaluate(this._evaluator);if(Ke==null||typeof Ke=="number"&&Ke!==Ke)return this._defaultValue;if(this._enumValues&&!(Ke in this._enumValues))throw new Wi("Expected value to be one of "+Object.keys(this._enumValues).map(function(ft){return JSON.stringify(ft)}).join(", ")+", but found "+JSON.stringify(Ke)+" instead.");return Ke}catch(ft){return this._warningHistory[ft.message]||(this._warningHistory[ft.message]=!0,typeof console<"u"&&console.warn(ft.message)),this._defaultValue}};function $s(R){return Array.isArray(R)&&R.length>0&&typeof R[0]=="string"&&R[0]in ps}function bl(R,D){var H=new Ds(ps,[],D?ju(D):void 0),ne=H.parse(R,void 0,void 0,void 0,D&&D.type==="string"?{typeAnnotation:"coerce"}:void 0);return ne?Yu(new zs(ne,D)):Fs(H.errors)}var wl=function(D,H){this.kind=D,this._styleExpression=H,this.isStateDependent=D!=="constant"&&!lu(H.expression)};wl.prototype.evaluateWithoutErrorHandling=function(D,H,ne,de,Ae,Re){return this._styleExpression.evaluateWithoutErrorHandling(D,H,ne,de,Ae,Re)},wl.prototype.evaluate=function(D,H,ne,de,Ae,Re){return this._styleExpression.evaluate(D,H,ne,de,Ae,Re)};var Po=function(D,H,ne,de){this.kind=D,this.zoomStops=ne,this._styleExpression=H,this.isStateDependent=D!=="camera"&&!lu(H.expression),this.interpolationType=de};Po.prototype.evaluateWithoutErrorHandling=function(D,H,ne,de,Ae,Re){return this._styleExpression.evaluateWithoutErrorHandling(D,H,ne,de,Ae,Re)},Po.prototype.evaluate=function(D,H,ne,de,Ae,Re){return this._styleExpression.evaluate(D,H,ne,de,Ae,Re)},Po.prototype.interpolationFactor=function(D,H,ne){return this.interpolationType?zi.interpolationFactor(this.interpolationType,D,H,ne):0};function _o(R,D){if(R=bl(R,D),R.result==="error")return R;var H=R.value.expression,ne=dl(H);if(!ne&&!_s(D))return Fs([new wn("","data expressions not supported")]);var de=_l(H,["zoom"]);if(!de&&!Lf(D))return Fs([new wn("","zoom expressions not supported")]);var Ae=Wl(H);if(!Ae&&!de)return Fs([new wn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(Ae instanceof wn)return Fs([Ae]);if(Ae instanceof zi&&!Hl(D))return Fs([new wn("",'"interpolate" expressions cannot be used with this property')]);if(!Ae)return Yu(ne?new wl("constant",R.value):new wl("source",R.value));var Re=Ae instanceof zi?Ae.interpolation:void 0;return Yu(ne?new Po("camera",R.value,Ae.labels,Re):new Po("composite",R.value,Ae.labels,Re))}var Tl=function(D,H){this._parameters=D,this._specification=H,cn(this,Xu(this._parameters,this._specification))};Tl.deserialize=function(D){return new Tl(D._parameters,D._specification)},Tl.serialize=function(D){return{_parameters:D._parameters,_specification:D._specification}};function cc(R,D){if(xl(R))return new Tl(R,D);if($s(R)){var H=_o(R,D);if(H.result==="error")throw new Error(H.value.map(function(de){return de.key+": "+de.message}).join(", "));return H.value}else{var ne=R;return typeof R=="string"&&D.type==="color"&&(ne=qa.parse(R)),{kind:"constant",evaluate:function(){return ne}}}}function Wl(R){var D=null;if(R instanceof Is)D=Wl(R.result);else if(R instanceof Co)for(var H=0,ne=R.args;Hne.maximum?[new wr(D,H,H+" is greater than the maximum value "+ne.maximum)]:[]}function gu(R){var D=R.valueSpec,H=hn(R.value.type),ne,de={},Ae,Re,Ke=H!=="categorical"&&R.value.property===void 0,ft=!Ke,bt=si(R.value.stops)==="array"&&si(R.value.stops[0])==="array"&&si(R.value.stops[0][0])==="object",Et=ts({key:R.key,value:R.value,valueSpec:R.styleSpec.function,style:R.style,styleSpec:R.styleSpec,objectElementValidators:{stops:Wt,default:mr}});return H==="identity"&&Ke&&Et.push(new wr(R.key,R.value,'missing required property "property"')),H!=="identity"&&!R.value.stops&&Et.push(new wr(R.key,R.value,'missing required property "stops"')),H==="exponential"&&R.valueSpec.expression&&!Hl(R.valueSpec)&&Et.push(new wr(R.key,R.value,"exponential functions not supported")),R.styleSpec.$version>=8&&(ft&&!_s(R.valueSpec)?Et.push(new wr(R.key,R.value,"property functions not supported")):Ke&&!Lf(R.valueSpec)&&Et.push(new wr(R.key,R.value,"zoom functions not supported"))),(H==="categorical"||bt)&&R.value.property===void 0&&Et.push(new wr(R.key,R.value,'"property" property is required')),Et;function Wt(Br){if(H==="identity")return[new wr(Br.key,Br.value,'identity function may not have a "stops" property')];var rn=[],$r=Br.value;return rn=rn.concat(Df({key:Br.key,value:$r,valueSpec:Br.valueSpec,style:Br.style,styleSpec:Br.styleSpec,arrayElementValidator:sr})),si($r)==="array"&&$r.length===0&&rn.push(new wr(Br.key,$r,"array must have at least one stop")),rn}function sr(Br){var rn=[],$r=Br.value,Mn=Br.key;if(si($r)!=="array")return[new wr(Mn,$r,"array expected, "+si($r)+" found")];if($r.length!==2)return[new wr(Mn,$r,"array length 2 expected, length "+$r.length+" found")];if(bt){if(si($r[0])!=="object")return[new wr(Mn,$r,"object expected, "+si($r[0])+" found")];if($r[0].zoom===void 0)return[new wr(Mn,$r,"object stop key must have zoom")];if($r[0].value===void 0)return[new wr(Mn,$r,"object stop key must have value")];if(Re&&Re>hn($r[0].zoom))return[new wr(Mn,$r[0].zoom,"stop zoom values must appear in ascending order")];hn($r[0].zoom)!==Re&&(Re=hn($r[0].zoom),Ae=void 0,de={}),rn=rn.concat(ts({key:Mn+"[0]",value:$r[0],valueSpec:{zoom:{}},style:Br.style,styleSpec:Br.styleSpec,objectElementValidators:{zoom:qs,value:qt}}))}else rn=rn.concat(qt({key:Mn+"[0]",value:$r[0],valueSpec:{},style:Br.style,styleSpec:Br.styleSpec},$r));return $s(Ln($r[1]))?rn.concat([new wr(Mn+"[1]",$r[1],"expressions are not allowed in function stops.")]):rn.concat(ar({key:Mn+"[1]",value:$r[1],valueSpec:D,style:Br.style,styleSpec:Br.styleSpec}))}function qt(Br,rn){var $r=si(Br.value),Mn=hn(Br.value),xn=Br.value!==null?Br.value:rn;if(!ne)ne=$r;else if($r!==ne)return[new wr(Br.key,xn,$r+" stop domain type must match previous stop domain type "+ne)];if($r!=="number"&&$r!=="string"&&$r!=="boolean")return[new wr(Br.key,xn,"stop domain value must be a number, string, or boolean")];if($r!=="number"&&H!=="categorical"){var An="number expected, "+$r+" found";return _s(D)&&H===void 0&&(An+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new wr(Br.key,xn,An)]}return H==="categorical"&&$r==="number"&&(!isFinite(Mn)||Math.floor(Mn)!==Mn)?[new wr(Br.key,xn,"integer expected, found "+Mn)]:H!=="categorical"&&$r==="number"&&Ae!==void 0&&Mn=2&&R[1]!=="$id"&&R[1]!=="$type";case"in":return R.length>=3&&(typeof R[1]!="string"||Array.isArray(R[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return R.length!==3||Array.isArray(R[1])||Array.isArray(R[2]);case"any":case"all":for(var D=0,H=R.slice(1);DD?1:0}function mu(R){if(!Array.isArray(R))return!1;if(R[0]==="within")return!0;for(var D=1;D"||D==="<="||D===">="?Ju(R[1],R[2],D):D==="any"?dc(R.slice(1)):D==="all"?["all"].concat(R.slice(1).map(el)):D==="none"?["all"].concat(R.slice(1).map(el).map(Al)):D==="in"?kf(R[1],R.slice(2)):D==="!in"?Al(kf(R[1],R.slice(2))):D==="has"?Ff(R[1]):D==="!has"?Al(Ff(R[1])):D==="within"?R:!0;return H}function Ju(R,D,H){switch(R){case"$type":return["filter-type-"+H,D];case"$id":return["filter-id-"+H,D];default:return["filter-"+H,R,D]}}function dc(R){return["any"].concat(R.map(el))}function kf(R,D){if(D.length===0)return!1;switch(R){case"$type":return["filter-type-in",["literal",D]];case"$id":return["filter-id-in",["literal",D]];default:return D.length>200&&!D.some(function(H){return typeof H!=typeof D[0]})?["filter-in-large",R,["literal",D.sort(gs)]]:["filter-in-small",R,["literal",D]]}}function Ff(R){switch(R){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",R]}}function Al(R){return["!",R]}function Qu(R){return vo(Ln(R.value))?Os(cn({},R,{expressionContext:"filter",valueSpec:{value:"boolean"}})):xu(R)}function xu(R){var D=R.value,H=R.key;if(si(D)!=="array")return[new wr(H,D,"array expected, "+si(D)+" found")];var ne=R.styleSpec,de,Ae=[];if(D.length<1)return[new wr(H,D,"filter array must have at least 1 element")];switch(Ae=Ae.concat(Ku({key:H+"[0]",value:D[0],valueSpec:ne.filter_operator,style:R.style,styleSpec:R.styleSpec})),hn(D[0])){case"<":case"<=":case">":case">=":D.length>=2&&hn(D[1])==="$type"&&Ae.push(new wr(H,D,'"$type" cannot be use with operator "'+D[0]+'"'));case"==":case"!=":D.length!==3&&Ae.push(new wr(H,D,'filter array for operator "'+D[0]+'" must have 3 elements'));case"in":case"!in":D.length>=2&&(de=si(D[1]),de!=="string"&&Ae.push(new wr(H+"[1]",D[1],"string expected, "+de+" found")));for(var Re=2;Re=Et[qt+0]&&ne>=Et[qt+1])?(Re[sr]=!0,Ae.push(bt[sr])):Re[sr]=!1}}},ka.prototype._forEachCell=function(R,D,H,ne,de,Ae,Re,Ke){for(var ft=this._convertToCellCoord(R),bt=this._convertToCellCoord(D),Et=this._convertToCellCoord(H),Wt=this._convertToCellCoord(ne),sr=ft;sr<=Et;sr++)for(var qt=bt;qt<=Wt;qt++){var mr=this.d*qt+sr;if(!(Ke&&!Ke(this._convertFromCellCoord(sr),this._convertFromCellCoord(qt),this._convertFromCellCoord(sr+1),this._convertFromCellCoord(qt+1)))&&de.call(this,R,D,H,ne,mr,Ae,Re,Ke))return}},ka.prototype._convertFromCellCoord=function(R){return(R-this.padding)/this.scale},ka.prototype._convertToCellCoord=function(R){return Math.max(0,Math.min(this.d-1,Math.floor(R*this.scale)+this.padding))},ka.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var R=this.cells,D=Da+this.cells.length+1+1,H=0,ne=0;ne=0)){var Wt=R[Et];bt[Et]=di[ft].shallow.indexOf(Et)>=0?Wt:tt(Wt,D)}R instanceof Error&&(bt.message=R.message)}if(bt.$name)throw new Error("$name property is reserved for worker serialization logic.");return ft!=="Object"&&(bt.$name=ft),bt}throw new Error("can't serialize object of type "+typeof R)}function it(R){if(R==null||typeof R=="boolean"||typeof R=="number"||typeof R=="string"||R instanceof Boolean||R instanceof Number||R instanceof String||R instanceof Date||R instanceof RegExp||Ve(R)||Qe(R)||ArrayBuffer.isView(R)||R instanceof ai)return R;if(Array.isArray(R))return R.map(it);if(typeof R=="object"){var D=R.$name||"Object",H=di[D],ne=H.klass;if(!ne)throw new Error("can't deserialize unregistered class "+D);if(ne.deserialize)return ne.deserialize(R);for(var de=Object.create(ne.prototype),Ae=0,Re=Object.keys(R);Ae=0?ft:it(ft)}}return de}throw new Error("can't deserialize object of type "+typeof R)}var Rt=function(){this.first=!0};Rt.prototype.update=function(D,H){var ne=Math.floor(D);return this.first?(this.first=!1,this.lastIntegerZoom=ne,this.lastIntegerZoomTime=0,this.lastZoom=D,this.lastFloorZoom=ne,!0):(this.lastFloorZoom>ne?(this.lastIntegerZoom=ne+1,this.lastIntegerZoomTime=H):this.lastFloorZoom=128&&R<=255},Arabic:function(R){return R>=1536&&R<=1791},"Arabic Supplement":function(R){return R>=1872&&R<=1919},"Arabic Extended-A":function(R){return R>=2208&&R<=2303},"Hangul Jamo":function(R){return R>=4352&&R<=4607},"Unified Canadian Aboriginal Syllabics":function(R){return R>=5120&&R<=5759},Khmer:function(R){return R>=6016&&R<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(R){return R>=6320&&R<=6399},"General Punctuation":function(R){return R>=8192&&R<=8303},"Letterlike Symbols":function(R){return R>=8448&&R<=8527},"Number Forms":function(R){return R>=8528&&R<=8591},"Miscellaneous Technical":function(R){return R>=8960&&R<=9215},"Control Pictures":function(R){return R>=9216&&R<=9279},"Optical Character Recognition":function(R){return R>=9280&&R<=9311},"Enclosed Alphanumerics":function(R){return R>=9312&&R<=9471},"Geometric Shapes":function(R){return R>=9632&&R<=9727},"Miscellaneous Symbols":function(R){return R>=9728&&R<=9983},"Miscellaneous Symbols and Arrows":function(R){return R>=11008&&R<=11263},"CJK Radicals Supplement":function(R){return R>=11904&&R<=12031},"Kangxi Radicals":function(R){return R>=12032&&R<=12255},"Ideographic Description Characters":function(R){return R>=12272&&R<=12287},"CJK Symbols and Punctuation":function(R){return R>=12288&&R<=12351},Hiragana:function(R){return R>=12352&&R<=12447},Katakana:function(R){return R>=12448&&R<=12543},Bopomofo:function(R){return R>=12544&&R<=12591},"Hangul Compatibility Jamo":function(R){return R>=12592&&R<=12687},Kanbun:function(R){return R>=12688&&R<=12703},"Bopomofo Extended":function(R){return R>=12704&&R<=12735},"CJK Strokes":function(R){return R>=12736&&R<=12783},"Katakana Phonetic Extensions":function(R){return R>=12784&&R<=12799},"Enclosed CJK Letters and Months":function(R){return R>=12800&&R<=13055},"CJK Compatibility":function(R){return R>=13056&&R<=13311},"CJK Unified Ideographs Extension A":function(R){return R>=13312&&R<=19903},"Yijing Hexagram Symbols":function(R){return R>=19904&&R<=19967},"CJK Unified Ideographs":function(R){return R>=19968&&R<=40959},"Yi Syllables":function(R){return R>=40960&&R<=42127},"Yi Radicals":function(R){return R>=42128&&R<=42191},"Hangul Jamo Extended-A":function(R){return R>=43360&&R<=43391},"Hangul Syllables":function(R){return R>=44032&&R<=55215},"Hangul Jamo Extended-B":function(R){return R>=55216&&R<=55295},"Private Use Area":function(R){return R>=57344&&R<=63743},"CJK Compatibility Ideographs":function(R){return R>=63744&&R<=64255},"Arabic Presentation Forms-A":function(R){return R>=64336&&R<=65023},"Vertical Forms":function(R){return R>=65040&&R<=65055},"CJK Compatibility Forms":function(R){return R>=65072&&R<=65103},"Small Form Variants":function(R){return R>=65104&&R<=65135},"Arabic Presentation Forms-B":function(R){return R>=65136&&R<=65279},"Halfwidth and Fullwidth Forms":function(R){return R>=65280&&R<=65519}};function Ut(R){for(var D=0,H=R;D=65097&&R<=65103)||ht["CJK Compatibility Ideographs"](R)||ht["CJK Compatibility"](R)||ht["CJK Radicals Supplement"](R)||ht["CJK Strokes"](R)||ht["CJK Symbols and Punctuation"](R)&&!(R>=12296&&R<=12305)&&!(R>=12308&&R<=12319)&&R!==12336||ht["CJK Unified Ideographs Extension A"](R)||ht["CJK Unified Ideographs"](R)||ht["Enclosed CJK Letters and Months"](R)||ht["Hangul Compatibility Jamo"](R)||ht["Hangul Jamo Extended-A"](R)||ht["Hangul Jamo Extended-B"](R)||ht["Hangul Jamo"](R)||ht["Hangul Syllables"](R)||ht.Hiragana(R)||ht["Ideographic Description Characters"](R)||ht.Kanbun(R)||ht["Kangxi Radicals"](R)||ht["Katakana Phonetic Extensions"](R)||ht.Katakana(R)&&R!==12540||ht["Halfwidth and Fullwidth Forms"](R)&&R!==65288&&R!==65289&&R!==65293&&!(R>=65306&&R<=65310)&&R!==65339&&R!==65341&&R!==65343&&!(R>=65371&&R<=65503)&&R!==65507&&!(R>=65512&&R<=65519)||ht["Small Form Variants"](R)&&!(R>=65112&&R<=65118)&&!(R>=65123&&R<=65126)||ht["Unified Canadian Aboriginal Syllabics"](R)||ht["Unified Canadian Aboriginal Syllabics Extended"](R)||ht["Vertical Forms"](R)||ht["Yijing Hexagram Symbols"](R)||ht["Yi Syllables"](R)||ht["Yi Radicals"](R))}function Kr(R){return!!(ht["Latin-1 Supplement"](R)&&(R===167||R===169||R===174||R===177||R===188||R===189||R===190||R===215||R===247)||ht["General Punctuation"](R)&&(R===8214||R===8224||R===8225||R===8240||R===8241||R===8251||R===8252||R===8258||R===8263||R===8264||R===8265||R===8273)||ht["Letterlike Symbols"](R)||ht["Number Forms"](R)||ht["Miscellaneous Technical"](R)&&(R>=8960&&R<=8967||R>=8972&&R<=8991||R>=8996&&R<=9e3||R===9003||R>=9085&&R<=9114||R>=9150&&R<=9165||R===9167||R>=9169&&R<=9179||R>=9186&&R<=9215)||ht["Control Pictures"](R)&&R!==9251||ht["Optical Character Recognition"](R)||ht["Enclosed Alphanumerics"](R)||ht["Geometric Shapes"](R)||ht["Miscellaneous Symbols"](R)&&!(R>=9754&&R<=9759)||ht["Miscellaneous Symbols and Arrows"](R)&&(R>=11026&&R<=11055||R>=11088&&R<=11097||R>=11192&&R<=11243)||ht["CJK Symbols and Punctuation"](R)||ht.Katakana(R)||ht["Private Use Area"](R)||ht["CJK Compatibility Forms"](R)||ht["Small Form Variants"](R)||ht["Halfwidth and Fullwidth Forms"](R)||R===8734||R===8756||R===8757||R>=9984&&R<=10087||R>=10102&&R<=10131||R===65532||R===65533)}function en(R){return!(Sr(R)||Kr(R))}function Dr(R){return ht.Arabic(R)||ht["Arabic Supplement"](R)||ht["Arabic Extended-A"](R)||ht["Arabic Presentation Forms-A"](R)||ht["Arabic Presentation Forms-B"](R)}function Ur(R){return R>=1424&&R<=2303||ht["Arabic Presentation Forms-A"](R)||ht["Arabic Presentation Forms-B"](R)}function Zr(R,D){return!(!D&&Ur(R)||R>=2304&&R<=3583||R>=3840&&R<=4255||ht.Khmer(R))}function tn(R){for(var D=0,H=R;D-1&&(Gn=Xr.error),Nn&&Nn(R)};function ba(){ma.fire(new Zt("pluginStateChange",{pluginStatus:Gn,pluginURL:Kn}))}var ma=new lr,Ua=function(){return Gn},Ea=function(R){return R({pluginStatus:Gn,pluginURL:Kn}),ma.on("pluginStateChange",R),R},Oa=function(R,D,H){if(H===void 0&&(H=!1),Gn===Xr.deferred||Gn===Xr.loading||Gn===Xr.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");Kn=oe.resolveURL(R),Gn=Xr.deferred,Nn=D,ba(),H||Ja()},Ja=function(){if(Gn!==Xr.deferred||!Kn)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Gn=Xr.loading,ba(),Kn&&Tt({url:Kn},function(R){R?na(R):(Gn=Xr.loaded,ba())})},ei={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Gn===Xr.loaded||ei.applyArabicShaping!=null},isLoading:function(){return Gn===Xr.loading},setState:function(D){Gn=D.pluginStatus,Kn=D.pluginURL},isParsed:function(){return ei.applyArabicShaping!=null&&ei.processBidirectionalText!=null&&ei.processStyledBidirectionalText!=null},getPluginURL:function(){return Kn}},li=function(){!ei.isLoading()&&!ei.isLoaded()&&Ua()==="deferred"&&Ja()},Bn=function(D,H){this.zoom=D,H?(this.now=H.now,this.fadeDuration=H.fadeDuration,this.zoomHistory=H.zoomHistory,this.transition=H.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Rt,this.transition={})};Bn.prototype.isSupportedScript=function(D){return ln(D,ei.isLoaded())},Bn.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},Bn.prototype.getCrossfadeParameters=function(){var D=this.zoom,H=D-Math.floor(D),ne=this.crossFadingFactor();return D>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:H+(1-H)*ne}:{fromScale:.5,toScale:1,t:1-(1-ne)*H}};var Na=function(D,H){this.property=D,this.value=H,this.expression=cc(H===void 0?D.specification.default:H,D.specification)};Na.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},Na.prototype.possiblyEvaluate=function(D,H,ne){return this.property.possiblyEvaluate(this,D,H,ne)};var _a=function(D){this.property=D,this.value=new Na(D,void 0)};_a.prototype.transitioned=function(D,H){return new Mi(this.property,this.value,H,o({},D.transition,this.transition),D.now)},_a.prototype.untransitioned=function(){return new Mi(this.property,this.value,null,{},0)};var Ya=function(D){this._properties=D,this._values=Object.create(D.defaultTransitionablePropertyValues)};Ya.prototype.getValue=function(D){return y(this._values[D].value.value)},Ya.prototype.setValue=function(D,H){this._values.hasOwnProperty(D)||(this._values[D]=new _a(this._values[D].property)),this._values[D].value=new Na(this._values[D].property,H===null?void 0:y(H))},Ya.prototype.getTransition=function(D){return y(this._values[D].transition)},Ya.prototype.setTransition=function(D,H){this._values.hasOwnProperty(D)||(this._values[D]=new _a(this._values[D].property)),this._values[D].transition=y(H)||void 0},Ya.prototype.serialize=function(){for(var D={},H=0,ne=Object.keys(this._values);Hthis.end)return this.prior=null,Ae;if(this.value.isDataDriven())return this.prior=null,Ae;if(deRe.zoomHistory.lastIntegerZoom?{from:ne,to:de}:{from:Ae,to:de}},D.prototype.interpolate=function(ne){return ne},D}(Ma),Ni=function(D){this.specification=D};Ni.prototype.possiblyEvaluate=function(D,H,ne,de){if(D.value!==void 0)if(D.expression.kind==="constant"){var Ae=D.expression.evaluate(H,null,{},ne,de);return this._calculate(Ae,Ae,Ae,H)}else return this._calculate(D.expression.evaluate(new Bn(Math.floor(H.zoom-1),H)),D.expression.evaluate(new Bn(Math.floor(H.zoom),H)),D.expression.evaluate(new Bn(Math.floor(H.zoom+1),H)),H)},Ni.prototype._calculate=function(D,H,ne,de){var Ae=de.zoom;return Ae>de.zoomHistory.lastIntegerZoom?{from:D,to:H}:{from:ne,to:H}},Ni.prototype.interpolate=function(D){return D};var zo=function(D){this.specification=D};zo.prototype.possiblyEvaluate=function(D,H,ne,de){return!!D.expression.evaluate(H,null,{},ne,de)},zo.prototype.interpolate=function(){return!1};var $i=function(D){this.properties=D,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var H in D){var ne=D[H];ne.specification.overridable&&this.overridableProperties.push(H);var de=this.defaultPropertyValues[H]=new Na(ne,void 0),Ae=this.defaultTransitionablePropertyValues[H]=new _a(ne);this.defaultTransitioningPropertyValues[H]=Ae.untransitioned(),this.defaultPossiblyEvaluatedValues[H]=de.possiblyEvaluate({})}};fe("DataDrivenProperty",Ma),fe("DataConstantProperty",ga),fe("CrossFadedDataDrivenProperty",bi),fe("CrossFadedProperty",Ni),fe("ColorRampProperty",zo);var xo="-transition",Ci=function(R){function D(H,ne){if(R.call(this),this.id=H.id,this.type=H.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},H.type!=="custom"&&(H=H,this.metadata=H.metadata,this.minzoom=H.minzoom,this.maxzoom=H.maxzoom,H.type!=="background"&&(this.source=H.source,this.sourceLayer=H["source-layer"],this.filter=H.filter),ne.layout&&(this._unevaluatedLayout=new Bi(ne.layout)),ne.paint)){this._transitionablePaint=new Ya(ne.paint);for(var de in H.paint)this.setPaintProperty(de,H.paint[de],{validate:!1});for(var Ae in H.layout)this.setLayoutProperty(Ae,H.layout[Ae],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new fi(ne.paint)}}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},D.prototype.getLayoutProperty=function(ne){return ne==="visibility"?this.visibility:this._unevaluatedLayout.getValue(ne)},D.prototype.setLayoutProperty=function(ne,de,Ae){if(Ae===void 0&&(Ae={}),de!=null){var Re="layers."+this.id+".layout."+ne;if(this._validate(ha,Re,ne,de,Ae))return}if(ne==="visibility"){this.visibility=de;return}this._unevaluatedLayout.setValue(ne,de)},D.prototype.getPaintProperty=function(ne){return b(ne,xo)?this._transitionablePaint.getTransition(ne.slice(0,-xo.length)):this._transitionablePaint.getValue(ne)},D.prototype.setPaintProperty=function(ne,de,Ae){if(Ae===void 0&&(Ae={}),de!=null){var Re="layers."+this.id+".paint."+ne;if(this._validate(Rn,Re,ne,de,Ae))return!1}if(b(ne,xo))return this._transitionablePaint.setTransition(ne.slice(0,-xo.length),de||void 0),!1;var Ke=this._transitionablePaint._values[ne],ft=Ke.property.specification["property-type"]==="cross-faded-data-driven",bt=Ke.value.isDataDriven(),Et=Ke.value;this._transitionablePaint.setValue(ne,de),this._handleSpecialPaintPropertyUpdate(ne);var Wt=this._transitionablePaint._values[ne].value,sr=Wt.isDataDriven();return sr||bt||ft||this._handleOverridablePaintPropertyUpdate(ne,Et,Wt)},D.prototype._handleSpecialPaintPropertyUpdate=function(ne){},D.prototype._handleOverridablePaintPropertyUpdate=function(ne,de,Ae){return!1},D.prototype.isHidden=function(ne){return this.minzoom&&ne=this.maxzoom?!0:this.visibility==="none"},D.prototype.updateTransitions=function(ne){this._transitioningPaint=this._transitionablePaint.transitioned(ne,this._transitioningPaint)},D.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},D.prototype.recalculate=function(ne,de){ne.getCrossfadeParameters&&(this._crossfadeParameters=ne.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(ne,void 0,de)),this.paint=this._transitioningPaint.possiblyEvaluate(ne,void 0,de)},D.prototype.serialize=function(){var ne={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&&(ne.layout=ne.layout||{},ne.layout.visibility=this.visibility),E(ne,function(de,Ae){return de!==void 0&&!(Ae==="layout"&&!Object.keys(de).length)&&!(Ae==="paint"&&!Object.keys(de).length)})},D.prototype._validate=function(ne,de,Ae,Re,Ke){return Ke===void 0&&(Ke={}),Ke&&Ke.validate===!1?!1:Ca(this,ne.call(mn,{key:de,layerType:this.type,objectKey:Ae,value:Re,styleSpec:Xt,style:{glyphs:!0,sprite:!0}}))},D.prototype.is3D=function(){return!1},D.prototype.isTileClipped=function(){return!1},D.prototype.hasOffscreenPass=function(){return!1},D.prototype.resize=function(){},D.prototype.isStateDependent=function(){for(var ne in this.paint._values){var de=this.paint.get(ne);if(!(!(de instanceof xi)||!_s(de.property.specification))&&(de.value.kind==="source"||de.value.kind==="composite")&&de.value.isStateDependent)return!0}return!1},D}(lr),Go={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},pi=function(D,H){this._structArray=D,this._pos1=H*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},ys=128,Wo=5,Xa=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};Xa.serialize=function(D,H){return D._trim(),H&&(D.isTransferred=!0,H.push(D.arrayBuffer)),{length:D.length,arrayBuffer:D.arrayBuffer}},Xa.deserialize=function(D){var H=Object.create(this.prototype);return H.arrayBuffer=D.arrayBuffer,H.length=D.length,H.capacity=D.arrayBuffer.byteLength/H.bytesPerElement,H._refreshViews(),H},Xa.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Xa.prototype.clear=function(){this.length=0},Xa.prototype.resize=function(D){this.reserve(D),this.length=D},Xa.prototype.reserve=function(D){if(D>this.capacity){this.capacity=Math.max(D,Math.floor(this.capacity*Wo),ys),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var H=this.uint8;this._refreshViews(),H&&this.uint8.set(H)}},Xa.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function wi(R,D){D===void 0&&(D=1);var H=0,ne=0,de=R.map(function(Re){var Ke=yc(Re.type),ft=H=_f(H,Math.max(D,Ke)),bt=Re.components||1;return ne=Math.max(ne,Ke),H+=Ke*bt,{name:Re.name,type:Re.type,components:bt,offset:ft}}),Ae=_f(H,Math.max(ne,D));return{members:de,size:Ae,alignment:D}}function yc(R){return Go[R].BYTES_PER_ELEMENT}function _f(R,D){return Math.ceil(R/D)*D}var xh=function(R){function D(){R.apply(this,arguments)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},D.prototype.emplaceBack=function(ne,de){var Ae=this.length;return this.resize(Ae+1),this.emplace(Ae,ne,de)},D.prototype.emplace=function(ne,de,Ae){var Re=ne*2;return this.int16[Re+0]=de,this.int16[Re+1]=Ae,ne},D}(Xa);xh.prototype.bytesPerElement=4,fe("StructArrayLayout2i4",xh);var $u=function(R){function D(){R.apply(this,arguments)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},D.prototype.emplaceBack=function(ne,de,Ae,Re){var Ke=this.length;return this.resize(Ke+1),this.emplace(Ke,ne,de,Ae,Re)},D.prototype.emplace=function(ne,de,Ae,Re,Ke){var ft=ne*4;return this.int16[ft+0]=de,this.int16[ft+1]=Ae,this.int16[ft+2]=Re,this.int16[ft+3]=Ke,ne},D}(Xa);$u.prototype.bytesPerElement=8,fe("StructArrayLayout4i8",$u);var mc=function(R){function D(){R.apply(this,arguments)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},D.prototype.emplaceBack=function(ne,de,Ae,Re,Ke,ft){var bt=this.length;return this.resize(bt+1),this.emplace(bt,ne,de,Ae,Re,Ke,ft)},D.prototype.emplace=function(ne,de,Ae,Re,Ke,ft,bt){var Et=ne*6;return this.int16[Et+0]=de,this.int16[Et+1]=Ae,this.int16[Et+2]=Re,this.int16[Et+3]=Ke,this.int16[Et+4]=ft,this.int16[Et+5]=bt,ne},D}(Xa);mc.prototype.bytesPerElement=12,fe("StructArrayLayout2i4i12",mc);var Zh=function(R){function D(){R.apply(this,arguments)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},D.prototype.emplaceBack=function(ne,de,Ae,Re,Ke,ft){var bt=this.length;return this.resize(bt+1),this.emplace(bt,ne,de,Ae,Re,Ke,ft)},D.prototype.emplace=function(ne,de,Ae,Re,Ke,ft,bt){var Et=ne*4,Wt=ne*8;return this.int16[Et+0]=de,this.int16[Et+1]=Ae,this.uint8[Wt+4]=Re,this.uint8[Wt+5]=Ke,this.uint8[Wt+6]=ft,this.uint8[Wt+7]=bt,ne},D}(Xa);Zh.prototype.bytesPerElement=8,fe("StructArrayLayout2i4ub8",Zh);var rs=function(R){function D(){R.apply(this,arguments)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},D.prototype.emplaceBack=function(ne,de,Ae,Re,Ke,ft,bt,Et,Wt,sr){var qt=this.length;return this.resize(qt+1),this.emplace(qt,ne,de,Ae,Re,Ke,ft,bt,Et,Wt,sr)},D.prototype.emplace=function(ne,de,Ae,Re,Ke,ft,bt,Et,Wt,sr,qt){var mr=ne*9,Br=ne*18;return this.uint16[mr+0]=de,this.uint16[mr+1]=Ae,this.uint16[mr+2]=Re,this.uint16[mr+3]=Ke,this.uint16[mr+4]=ft,this.uint16[mr+5]=bt,this.uint16[mr+6]=Et,this.uint16[mr+7]=Wt,this.uint8[Br+16]=sr,this.uint8[Br+17]=qt,ne},D}(Xa);rs.prototype.bytesPerElement=18,fe("StructArrayLayout8ui2ub18",rs);var qu=function(R){function D(){R.apply(this,arguments)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},D.prototype.emplaceBack=function(ne,de,Ae,Re,Ke,ft,bt,Et,Wt,sr,qt,mr){var Br=this.length;return this.resize(Br+1),this.emplace(Br,ne,de,Ae,Re,Ke,ft,bt,Et,Wt,sr,qt,mr)},D.prototype.emplace=function(ne,de,Ae,Re,Ke,ft,bt,Et,Wt,sr,qt,mr,Br){var rn=ne*12;return this.int16[rn+0]=de,this.int16[rn+1]=Ae,this.int16[rn+2]=Re,this.int16[rn+3]=Ke,this.uint16[rn+4]=ft,this.uint16[rn+5]=bt,this.uint16[rn+6]=Et,this.uint16[rn+7]=Wt,this.int16[rn+8]=sr,this.int16[rn+9]=qt,this.int16[rn+10]=mr,this.int16[rn+11]=Br,ne},D}(Xa);qu.prototype.bytesPerElement=24,fe("StructArrayLayout4i4ui4i24",qu);var td=function(R){function D(){R.apply(this,arguments)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},D.prototype.emplaceBack=function(ne,de,Ae){var Re=this.length;return this.resize(Re+1),this.emplace(Re,ne,de,Ae)},D.prototype.emplace=function(ne,de,Ae,Re){var Ke=ne*3;return this.float32[Ke+0]=de,this.float32[Ke+1]=Ae,this.float32[Ke+2]=Re,ne},D}(Xa);td.prototype.bytesPerElement=12,fe("StructArrayLayout3f12",td);var rd=function(R){function D(){R.apply(this,arguments)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},D.prototype.emplaceBack=function(ne){var de=this.length;return this.resize(de+1),this.emplace(de,ne)},D.prototype.emplace=function(ne,de){var Ae=ne*1;return this.uint32[Ae+0]=de,ne},D}(Xa);rd.prototype.bytesPerElement=4,fe("StructArrayLayout1ul4",rd);var bh=function(R){function D(){R.apply(this,arguments)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.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)},D.prototype.emplaceBack=function(ne,de,Ae,Re,Ke,ft,bt,Et,Wt){var sr=this.length;return this.resize(sr+1),this.emplace(sr,ne,de,Ae,Re,Ke,ft,bt,Et,Wt)},D.prototype.emplace=function(ne,de,Ae,Re,Ke,ft,bt,Et,Wt,sr){var qt=ne*10,mr=ne*5;return this.int16[qt+0]=de,this.int16[qt+1]=Ae,this.int16[qt+2]=Re,this.int16[qt+3]=Ke,this.int16[qt+4]=ft,this.int16[qt+5]=bt,this.uint32[mr+3]=Et,this.uint16[qt+8]=Wt,this.uint16[qt+9]=sr,ne},D}(Xa);bh.prototype.bytesPerElement=20,fe("StructArrayLayout6i1ul2ui20",bh);var Xh=function(R){function D(){R.apply(this,arguments)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},D.prototype.emplaceBack=function(ne,de,Ae,Re,Ke,ft){var bt=this.length;return this.resize(bt+1),this.emplace(bt,ne,de,Ae,Re,Ke,ft)},D.prototype.emplace=function(ne,de,Ae,Re,Ke,ft,bt){var Et=ne*6;return this.int16[Et+0]=de,this.int16[Et+1]=Ae,this.int16[Et+2]=Re,this.int16[Et+3]=Ke,this.int16[Et+4]=ft,this.int16[Et+5]=bt,ne},D}(Xa);Xh.prototype.bytesPerElement=12,fe("StructArrayLayout2i2i2i12",Xh);var wu=function(R){function D(){R.apply(this,arguments)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},D.prototype.emplaceBack=function(ne,de,Ae,Re,Ke){var ft=this.length;return this.resize(ft+1),this.emplace(ft,ne,de,Ae,Re,Ke)},D.prototype.emplace=function(ne,de,Ae,Re,Ke,ft){var bt=ne*4,Et=ne*8;return this.float32[bt+0]=de,this.float32[bt+1]=Ae,this.float32[bt+2]=Re,this.int16[Et+6]=Ke,this.int16[Et+7]=ft,ne},D}(Xa);wu.prototype.bytesPerElement=16,fe("StructArrayLayout2f1f2i16",wu);var ms=function(R){function D(){R.apply(this,arguments)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},D.prototype.emplaceBack=function(ne,de,Ae,Re){var Ke=this.length;return this.resize(Ke+1),this.emplace(Ke,ne,de,Ae,Re)},D.prototype.emplace=function(ne,de,Ae,Re,Ke){var ft=ne*12,bt=ne*3;return this.uint8[ft+0]=de,this.uint8[ft+1]=Ae,this.float32[bt+1]=Re,this.float32[bt+2]=Ke,ne},D}(Xa);ms.prototype.bytesPerElement=12,fe("StructArrayLayout2ub2f12",ms);var Tu=function(R){function D(){R.apply(this,arguments)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},D.prototype.emplaceBack=function(ne,de,Ae){var Re=this.length;return this.resize(Re+1),this.emplace(Re,ne,de,Ae)},D.prototype.emplace=function(ne,de,Ae,Re){var Ke=ne*3;return this.uint16[Ke+0]=de,this.uint16[Ke+1]=Ae,this.uint16[Ke+2]=Re,ne},D}(Xa);Tu.prototype.bytesPerElement=6,fe("StructArrayLayout3ui6",Tu);var wh=function(R){function D(){R.apply(this,arguments)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.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)},D.prototype.emplaceBack=function(ne,de,Ae,Re,Ke,ft,bt,Et,Wt,sr,qt,mr,Br,rn,$r,Mn,xn){var An=this.length;return this.resize(An+1),this.emplace(An,ne,de,Ae,Re,Ke,ft,bt,Et,Wt,sr,qt,mr,Br,rn,$r,Mn,xn)},D.prototype.emplace=function(ne,de,Ae,Re,Ke,ft,bt,Et,Wt,sr,qt,mr,Br,rn,$r,Mn,xn,An){var kn=ne*24,Vn=ne*12,Qn=ne*48;return this.int16[kn+0]=de,this.int16[kn+1]=Ae,this.uint16[kn+2]=Re,this.uint16[kn+3]=Ke,this.uint32[Vn+2]=ft,this.uint32[Vn+3]=bt,this.uint32[Vn+4]=Et,this.uint16[kn+10]=Wt,this.uint16[kn+11]=sr,this.uint16[kn+12]=qt,this.float32[Vn+7]=mr,this.float32[Vn+8]=Br,this.uint8[Qn+36]=rn,this.uint8[Qn+37]=$r,this.uint8[Qn+38]=Mn,this.uint32[Vn+10]=xn,this.int16[kn+22]=An,ne},D}(Xa);wh.prototype.bytesPerElement=48,fe("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",wh);var jh=function(R){function D(){R.apply(this,arguments)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.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)},D.prototype.emplaceBack=function(ne,de,Ae,Re,Ke,ft,bt,Et,Wt,sr,qt,mr,Br,rn,$r,Mn,xn,An,kn,Vn,Qn,Jn,Sa,ca,ya,Ba,Ta,Aa){var Wa=this.length;return this.resize(Wa+1),this.emplace(Wa,ne,de,Ae,Re,Ke,ft,bt,Et,Wt,sr,qt,mr,Br,rn,$r,Mn,xn,An,kn,Vn,Qn,Jn,Sa,ca,ya,Ba,Ta,Aa)},D.prototype.emplace=function(ne,de,Ae,Re,Ke,ft,bt,Et,Wt,sr,qt,mr,Br,rn,$r,Mn,xn,An,kn,Vn,Qn,Jn,Sa,ca,ya,Ba,Ta,Aa,Wa){var za=ne*34,ti=ne*17;return this.int16[za+0]=de,this.int16[za+1]=Ae,this.int16[za+2]=Re,this.int16[za+3]=Ke,this.int16[za+4]=ft,this.int16[za+5]=bt,this.int16[za+6]=Et,this.int16[za+7]=Wt,this.uint16[za+8]=sr,this.uint16[za+9]=qt,this.uint16[za+10]=mr,this.uint16[za+11]=Br,this.uint16[za+12]=rn,this.uint16[za+13]=$r,this.uint16[za+14]=Mn,this.uint16[za+15]=xn,this.uint16[za+16]=An,this.uint16[za+17]=kn,this.uint16[za+18]=Vn,this.uint16[za+19]=Qn,this.uint16[za+20]=Jn,this.uint16[za+21]=Sa,this.uint16[za+22]=ca,this.uint32[ti+12]=ya,this.float32[ti+13]=Ba,this.float32[ti+14]=Ta,this.float32[ti+15]=Aa,this.float32[ti+16]=Wa,ne},D}(Xa);jh.prototype.bytesPerElement=68,fe("StructArrayLayout8i15ui1ul4f68",jh);var xc=function(R){function D(){R.apply(this,arguments)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},D.prototype.emplaceBack=function(ne){var de=this.length;return this.resize(de+1),this.emplace(de,ne)},D.prototype.emplace=function(ne,de){var Ae=ne*1;return this.float32[Ae+0]=de,ne},D}(Xa);xc.prototype.bytesPerElement=4,fe("StructArrayLayout1f4",xc);var nd=function(R){function D(){R.apply(this,arguments)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},D.prototype.emplaceBack=function(ne,de,Ae){var Re=this.length;return this.resize(Re+1),this.emplace(Re,ne,de,Ae)},D.prototype.emplace=function(ne,de,Ae,Re){var Ke=ne*3;return this.int16[Ke+0]=de,this.int16[Ke+1]=Ae,this.int16[Ke+2]=Re,ne},D}(Xa);nd.prototype.bytesPerElement=6,fe("StructArrayLayout3i6",nd);var ef=function(R){function D(){R.apply(this,arguments)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},D.prototype.emplaceBack=function(ne,de,Ae){var Re=this.length;return this.resize(Re+1),this.emplace(Re,ne,de,Ae)},D.prototype.emplace=function(ne,de,Ae,Re){var Ke=ne*2,ft=ne*4;return this.uint32[Ke+0]=de,this.uint16[ft+2]=Ae,this.uint16[ft+3]=Re,ne},D}(Xa);ef.prototype.bytesPerElement=8,fe("StructArrayLayout1ul2ui8",ef);var Th=function(R){function D(){R.apply(this,arguments)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},D.prototype.emplaceBack=function(ne,de){var Ae=this.length;return this.resize(Ae+1),this.emplace(Ae,ne,de)},D.prototype.emplace=function(ne,de,Ae){var Re=ne*2;return this.uint16[Re+0]=de,this.uint16[Re+1]=Ae,ne},D}(Xa);Th.prototype.bytesPerElement=4,fe("StructArrayLayout2ui4",Th);var bc=function(R){function D(){R.apply(this,arguments)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},D.prototype.emplaceBack=function(ne){var de=this.length;return this.resize(de+1),this.emplace(de,ne)},D.prototype.emplace=function(ne,de){var Ae=ne*1;return this.uint16[Ae+0]=de,ne},D}(Xa);bc.prototype.bytesPerElement=2,fe("StructArrayLayout1ui2",bc);var tf=function(R){function D(){R.apply(this,arguments)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},D.prototype.emplaceBack=function(ne,de){var Ae=this.length;return this.resize(Ae+1),this.emplace(Ae,ne,de)},D.prototype.emplace=function(ne,de,Ae){var Re=ne*2;return this.float32[Re+0]=de,this.float32[Re+1]=Ae,ne},D}(Xa);tf.prototype.bytesPerElement=8,fe("StructArrayLayout2f8",tf);var ad=function(R){function D(){R.apply(this,arguments)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},D.prototype.emplaceBack=function(ne,de,Ae,Re){var Ke=this.length;return this.resize(Ke+1),this.emplace(Ke,ne,de,Ae,Re)},D.prototype.emplace=function(ne,de,Ae,Re,Ke){var ft=ne*4;return this.float32[ft+0]=de,this.float32[ft+1]=Ae,this.float32[ft+2]=Re,this.float32[ft+3]=Ke,ne},D}(Xa);ad.prototype.bytesPerElement=16,fe("StructArrayLayout4f16",ad);var Mp=function(R){function D(){R.apply(this,arguments)}R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D;var H={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 H.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},H.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},H.x1.get=function(){return this._structArray.int16[this._pos2+2]},H.y1.get=function(){return this._structArray.int16[this._pos2+3]},H.x2.get=function(){return this._structArray.int16[this._pos2+4]},H.y2.get=function(){return this._structArray.int16[this._pos2+5]},H.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},H.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},H.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},H.anchorPoint.get=function(){return new t(this.anchorPointX,this.anchorPointY)},Object.defineProperties(D.prototype,H),D}(pi);Mp.prototype.size=20;var rf=function(R){function D(){R.apply(this,arguments)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype.get=function(ne){return new Mp(this,ne)},D}(bh);fe("CollisionBoxArray",rf);var id=function(R){function D(){R.apply(this,arguments)}R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D;var H={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 H.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},H.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},H.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},H.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},H.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},H.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},H.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},H.segment.get=function(){return this._structArray.uint16[this._pos2+10]},H.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},H.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},H.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},H.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},H.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},H.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},H.placedOrientation.set=function(ne){this._structArray.uint8[this._pos1+37]=ne},H.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},H.hidden.set=function(ne){this._structArray.uint8[this._pos1+38]=ne},H.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},H.crossTileID.set=function(ne){this._structArray.uint32[this._pos4+10]=ne},H.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(D.prototype,H),D}(pi);id.prototype.size=48;var wc=function(R){function D(){R.apply(this,arguments)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype.get=function(ne){return new id(this,ne)},D}(wh);fe("PlacedSymbolArray",wc);var Sp=function(R){function D(){R.apply(this,arguments)}R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D;var H={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 H.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},H.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},H.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},H.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},H.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},H.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},H.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},H.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},H.key.get=function(){return this._structArray.uint16[this._pos2+8]},H.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},H.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},H.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},H.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},H.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},H.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},H.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},H.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},H.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},H.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},H.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},H.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},H.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},H.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},H.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},H.crossTileID.set=function(ne){this._structArray.uint32[this._pos4+12]=ne},H.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},H.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},H.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},H.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(D.prototype,H),D}(pi);Sp.prototype.size=68;var Ep=function(R){function D(){R.apply(this,arguments)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype.get=function(ne){return new Sp(this,ne)},D}(jh);fe("SymbolInstanceArray",Ep);var Ml=function(R){function D(){R.apply(this,arguments)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype.getoffsetX=function(ne){return this.float32[ne*1+0]},D}(xc);fe("GlyphOffsetArray",Ml);var Cp=function(R){function D(){R.apply(this,arguments)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype.getx=function(ne){return this.int16[ne*3+0]},D.prototype.gety=function(ne){return this.int16[ne*3+1]},D.prototype.gettileUnitDistanceFromAnchor=function(ne){return this.int16[ne*3+2]},D}(nd);fe("SymbolLineVertexArray",Cp);var Lp=function(R){function D(){R.apply(this,arguments)}R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D;var H={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return H.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},H.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},H.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(D.prototype,H),D}(pi);Lp.prototype.size=8;var od=function(R){function D(){R.apply(this,arguments)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype.get=function(ne){return new Lp(this,ne)},D}(ef);fe("FeatureIndexArray",od);var Pp=wi([{name:"a_pos",components:2,type:"Int16"}],4),ve=Pp.members,X=function(D){D===void 0&&(D=[]),this.segments=D};X.prototype.prepareSegment=function(D,H,ne,de){var Ae=this.segments[this.segments.length-1];return D>X.MAX_VERTEX_ARRAY_LENGTH&&B("Max vertices per segment is "+X.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+D),(!Ae||Ae.vertexLength+D>X.MAX_VERTEX_ARRAY_LENGTH||Ae.sortKey!==de)&&(Ae={vertexOffset:H.length,primitiveOffset:ne.length,vertexLength:0,primitiveLength:0},de!==void 0&&(Ae.sortKey=de),this.segments.push(Ae)),Ae},X.prototype.get=function(){return this.segments},X.prototype.destroy=function(){for(var D=0,H=this.segments;D>>16)*ft&65535)<<16)&4294967295,Et=Et<<15|Et>>>17,Et=(Et&65535)*bt+(((Et>>>16)*bt&65535)<<16)&4294967295,Re^=Et,Re=Re<<13|Re>>>19,Ke=(Re&65535)*5+(((Re>>>16)*5&65535)<<16)&4294967295,Re=(Ke&65535)+27492+(((Ke>>>16)+58964&65535)<<16);switch(Et=0,de){case 3:Et^=(H.charCodeAt(Wt+2)&255)<<16;case 2:Et^=(H.charCodeAt(Wt+1)&255)<<8;case 1:Et^=H.charCodeAt(Wt)&255,Et=(Et&65535)*ft+(((Et>>>16)*ft&65535)<<16)&4294967295,Et=Et<<15|Et>>>17,Et=(Et&65535)*bt+(((Et>>>16)*bt&65535)<<16)&4294967295,Re^=Et}return Re^=H.length,Re^=Re>>>16,Re=(Re&65535)*2246822507+(((Re>>>16)*2246822507&65535)<<16)&4294967295,Re^=Re>>>13,Re=(Re&65535)*3266489909+(((Re>>>16)*3266489909&65535)<<16)&4294967295,Re^=Re>>>16,Re>>>0}R.exports=D}),_e=L(function(R){function D(H,ne){for(var de=H.length,Ae=ne^de,Re=0,Ke;de>=4;)Ke=H.charCodeAt(Re)&255|(H.charCodeAt(++Re)&255)<<8|(H.charCodeAt(++Re)&255)<<16|(H.charCodeAt(++Re)&255)<<24,Ke=(Ke&65535)*1540483477+(((Ke>>>16)*1540483477&65535)<<16),Ke^=Ke>>>24,Ke=(Ke&65535)*1540483477+(((Ke>>>16)*1540483477&65535)<<16),Ae=(Ae&65535)*1540483477+(((Ae>>>16)*1540483477&65535)<<16)^Ke,de-=4,++Re;switch(de){case 3:Ae^=(H.charCodeAt(Re+2)&255)<<16;case 2:Ae^=(H.charCodeAt(Re+1)&255)<<8;case 1:Ae^=H.charCodeAt(Re)&255,Ae=(Ae&65535)*1540483477+(((Ae>>>16)*1540483477&65535)<<16)}return Ae^=Ae>>>13,Ae=(Ae&65535)*1540483477+(((Ae>>>16)*1540483477&65535)<<16),Ae^=Ae>>>15,Ae>>>0}R.exports=D}),Ze=ge,st=ge,mt=_e;Ze.murmur3=st,Ze.murmur2=mt;var Nt=function(){this.ids=[],this.positions=[],this.indexed=!1};Nt.prototype.add=function(D,H,ne,de){this.ids.push(ur(D)),this.positions.push(H,ne,de)},Nt.prototype.getPositions=function(D){for(var H=ur(D),ne=0,de=this.ids.length-1;ne>1;this.ids[Ae]>=H?de=Ae:ne=Ae+1}for(var Re=[];this.ids[ne]===H;){var Ke=this.positions[3*ne],ft=this.positions[3*ne+1],bt=this.positions[3*ne+2];Re.push({index:Ke,start:ft,end:bt}),ne++}return Re},Nt.serialize=function(D,H){var ne=new Float64Array(D.ids),de=new Uint32Array(D.positions);return yr(ne,de,0,ne.length-1),H&&H.push(ne.buffer,de.buffer),{ids:ne,positions:de}},Nt.deserialize=function(D){var H=new Nt;return H.ids=D.ids,H.positions=D.positions,H.indexed=!0,H};var Jt=Math.pow(2,53)-1;function ur(R){var D=+R;return!isNaN(D)&&D<=Jt?D:Ze(String(R))}function yr(R,D,H,ne){for(;H>1],Ae=H-1,Re=ne+1;;){do Ae++;while(R[Ae]de);if(Ae>=Re)break;Fr(R,Ae,Re),Fr(D,3*Ae,3*Re),Fr(D,3*Ae+1,3*Re+1),Fr(D,3*Ae+2,3*Re+2)}Re-Hui.max||Re.yui.max)&&(B("Geometry exceeds allowed extent, reduce your vector tile buffer size"),Re.x=u(Re.x,ui.min,ui.max),Re.y=u(Re.y,ui.min,ui.max))}return H}function Ka(R,D,H,ne,de){R.emplaceBack(D*2+(ne+1)/2,H*2+(de+1)/2)}var Ti=function(D){this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(function(H){return H.id}),this.index=D.index,this.hasPattern=!1,this.layoutVertexArray=new xh,this.indexArray=new Tu,this.segments=new X,this.programConfigurations=new Va(ve,D.layers,D.zoom),this.stateDependentLayerIds=this.layers.filter(function(H){return H.isStateDependent()}).map(function(H){return H.id})};Ti.prototype.populate=function(D,H,ne){var de=this.layers[0],Ae=[],Re=null;de.type==="circle"&&(Re=de.layout.get("circle-sort-key"));for(var Ke=0,ft=D;Ke=La||sr<0||sr>=La)){var qt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,D.sortKey),mr=qt.vertexLength;Ka(this.layoutVertexArray,Wt,sr,-1,-1),Ka(this.layoutVertexArray,Wt,sr,1,-1),Ka(this.layoutVertexArray,Wt,sr,1,1),Ka(this.layoutVertexArray,Wt,sr,-1,1),this.indexArray.emplaceBack(mr,mr+1,mr+2),this.indexArray.emplaceBack(mr,mr+3,mr+2),qt.vertexLength+=4,qt.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,D,ne,{},de)},fe("CircleBucket",Ti,{omit:["layers"]});function Ha(R,D){for(var H=0;H=3){for(var Ae=0;Ae1){if(rl(R,D))return!0;for(var ne=0;ne1?R.distSqr(H):R.distSqr(H.sub(D)._mult(de)._add(D))}function Xl(R,D){for(var H=!1,ne,de,Ae,Re=0;ReD.y!=Ae.y>D.y&&D.x<(Ae.x-de.x)*(D.y-de.y)/(Ae.y-de.y)+de.x&&(H=!H)}return H}function ns(R,D){for(var H=!1,ne=0,de=R.length-1;neD.y!=Re.y>D.y&&D.x<(Re.x-Ae.x)*(D.y-Ae.y)/(Re.y-Ae.y)+Ae.x&&(H=!H)}return H}function nf(R,D,H,ne,de){for(var Ae=0,Re=R;Ae=Ke.x&&de>=Ke.y)return!0}var ft=[new t(D,H),new t(D,de),new t(ne,de),new t(ne,H)];if(R.length>2)for(var bt=0,Et=ft;btde.x&&D.x>de.x||R.yde.y&&D.y>de.y)return!1;var Ae=k(R,D,H[0]);return Ae!==k(R,D,H[1])||Ae!==k(R,D,H[2])||Ae!==k(R,D,H[3])}function Ns(R,D,H){var ne=D.paint.get(R).value;return ne.kind==="constant"?ne.value:H.programConfigurations.get(D.id).getMaxValue(R)}function jl(R){return Math.sqrt(R[0]*R[0]+R[1]*R[1])}function Sl(R,D,H,ne,de){if(!D[0]&&!D[1])return R;var Ae=t.convert(D)._mult(de);H==="viewport"&&Ae._rotate(-ne);for(var Re=[],Ke=0;Ke0&&(Ae=1/Math.sqrt(Ae)),R[0]=D[0]*Ae,R[1]=D[1]*Ae,R[2]=D[2]*Ae,R}function QT(R,D){return R[0]*D[0]+R[1]*D[1]+R[2]*D[2]}function $T(R,D,H){var ne=D[0],de=D[1],Ae=D[2],Re=H[0],Ke=H[1],ft=H[2];return R[0]=de*ft-Ae*Ke,R[1]=Ae*Re-ne*ft,R[2]=ne*Ke-de*Re,R}function qT(R,D,H){var ne=D[0],de=D[1],Ae=D[2];return R[0]=ne*H[0]+de*H[3]+Ae*H[6],R[1]=ne*H[1]+de*H[4]+Ae*H[7],R[2]=ne*H[2]+de*H[5]+Ae*H[8],R}var e5=Og;(function(){var R=Sh();return function(D,H,ne,de,Ae,Re){var Ke,ft;for(H||(H=3),ne||(ne=0),de?ft=Math.min(de*H+ne,D.length):ft=D.length,Ke=ne;KeR.width||de.height>R.height||H.x>R.width-de.width||H.y>R.height-de.height)throw new RangeError("out of range source coordinates for image copy");if(de.width>D.width||de.height>D.height||ne.x>D.width-de.width||ne.y>D.height-de.height)throw new RangeError("out of range destination coordinates for image copy");for(var Re=R.data,Ke=D.data,ft=0;ft80*H){Ke=bt=R[0],ft=Et=R[1];for(var mr=H;mrbt&&(bt=Wt),sr>Et&&(Et=sr);qt=Math.max(bt-Ke,Et-ft),qt=qt!==0?1/qt:0}return ud(Ae,Re,H,Ke,ft,qt),Re}function dx(R,D,H,ne,de){var Ae,Re;if(de===Wg(R,D,H,ne)>0)for(Ae=D;Ae=D;Ae-=ne)Re=yx(Ae,R[Ae],R[Ae+1],Re);return Re&&kp(Re,Re.next)&&(cd(Re),Re=Re.next),Re}function Mc(R,D){if(!R)return R;D||(D=R);var H=R,ne;do if(ne=!1,!H.steiner&&(kp(H,H.next)||ao(H.prev,H,H.next)===0)){if(cd(H),H=D=H.prev,H===H.next)break;ne=!0}else H=H.next;while(ne||H!==D);return D}function ud(R,D,H,ne,de,Ae,Re){if(R){!Re&&Ae&&E5(R,ne,de,Ae);for(var Ke=R,ft,bt;R.prev!==R.next;){if(ft=R.prev,bt=R.next,Ae?m5(R,ne,de,Ae):y5(R)){D.push(ft.i/H),D.push(R.i/H),D.push(bt.i/H),cd(R),R=bt.next,Ke=bt.next;continue}if(R=bt,R===Ke){Re?Re===1?(R=x5(Mc(R),D,H),ud(R,D,H,ne,de,Ae,2)):Re===2&&b5(R,D,H,ne,de,Ae):ud(Mc(R),D,H,ne,de,Ae,1);break}}}}function y5(R){var D=R.prev,H=R,ne=R.next;if(ao(D,H,ne)>=0)return!1;for(var de=R.next.next;de!==R.prev;){if(tv(D.x,D.y,H.x,H.y,ne.x,ne.y,de.x,de.y)&&ao(de.prev,de,de.next)>=0)return!1;de=de.next}return!0}function m5(R,D,H,ne){var de=R.prev,Ae=R,Re=R.next;if(ao(de,Ae,Re)>=0)return!1;for(var Ke=de.xAe.x?de.x>Re.x?de.x:Re.x:Ae.x>Re.x?Ae.x:Re.x,Et=de.y>Ae.y?de.y>Re.y?de.y:Re.y:Ae.y>Re.y?Ae.y:Re.y,Wt=Hg(Ke,ft,D,H,ne),sr=Hg(bt,Et,D,H,ne),qt=R.prevZ,mr=R.nextZ;qt&&qt.z>=Wt&&mr&&mr.z<=sr;){if(qt!==R.prev&&qt!==R.next&&tv(de.x,de.y,Ae.x,Ae.y,Re.x,Re.y,qt.x,qt.y)&&ao(qt.prev,qt,qt.next)>=0||(qt=qt.prevZ,mr!==R.prev&&mr!==R.next&&tv(de.x,de.y,Ae.x,Ae.y,Re.x,Re.y,mr.x,mr.y)&&ao(mr.prev,mr,mr.next)>=0))return!1;mr=mr.nextZ}for(;qt&&qt.z>=Wt;){if(qt!==R.prev&&qt!==R.next&&tv(de.x,de.y,Ae.x,Ae.y,Re.x,Re.y,qt.x,qt.y)&&ao(qt.prev,qt,qt.next)>=0)return!1;qt=qt.prevZ}for(;mr&&mr.z<=sr;){if(mr!==R.prev&&mr!==R.next&&tv(de.x,de.y,Ae.x,Ae.y,Re.x,Re.y,mr.x,mr.y)&&ao(mr.prev,mr,mr.next)>=0)return!1;mr=mr.nextZ}return!0}function x5(R,D,H){var ne=R;do{var de=ne.prev,Ae=ne.next.next;!kp(de,Ae)&&px(de,ne,ne.next,Ae)&&fd(de,Ae)&&fd(Ae,de)&&(D.push(de.i/H),D.push(ne.i/H),D.push(Ae.i/H),cd(ne),cd(ne.next),ne=R=Ae),ne=ne.next}while(ne!==R);return Mc(ne)}function b5(R,D,H,ne,de,Ae){var Re=R;do{for(var Ke=Re.next.next;Ke!==Re.prev;){if(Re.i!==Ke.i&&P5(Re,Ke)){var ft=gx(Re,Ke);Re=Mc(Re,Re.next),ft=Mc(ft,ft.next),ud(Re,D,H,ne,de,Ae),ud(ft,D,H,ne,de,Ae);return}Ke=Ke.next}Re=Re.next}while(Re!==R)}function w5(R,D,H,ne){var de=[],Ae,Re,Ke,ft,bt;for(Ae=0,Re=D.length;Ae=H.next.y&&H.next.y!==H.y){var Ke=H.x+(de-H.y)*(H.next.x-H.x)/(H.next.y-H.y);if(Ke<=ne&&Ke>Ae){if(Ae=Ke,Ke===ne){if(de===H.y)return H;if(de===H.next.y)return H.next}Re=H.x=H.x&&H.x>=bt&&ne!==H.x&&tv(deRe.x||H.x===Re.x&&S5(Re,H)))&&(Re=H,Wt=sr)),H=H.next;while(H!==ft);return Re}function S5(R,D){return ao(R.prev,R,D.prev)<0&&ao(D.next,R,R.next)<0}function E5(R,D,H,ne){var de=R;do de.z===null&&(de.z=Hg(de.x,de.y,D,H,ne)),de.prevZ=de.prev,de.nextZ=de.next,de=de.next;while(de!==R);de.prevZ.nextZ=null,de.prevZ=null,C5(de)}function C5(R){var D,H,ne,de,Ae,Re,Ke,ft,bt=1;do{for(H=R,R=null,Ae=null,Re=0;H;){for(Re++,ne=H,Ke=0,D=0;D0||ft>0&≠)Ke!==0&&(ft===0||!ne||H.z<=ne.z)?(de=H,H=H.nextZ,Ke--):(de=ne,ne=ne.nextZ,ft--),Ae?Ae.nextZ=de:R=de,de.prevZ=Ae,Ae=de;H=ne}Ae.nextZ=null,bt*=2}while(Re>1);return R}function Hg(R,D,H,ne,de){return R=32767*(R-H)*de,D=32767*(D-ne)*de,R=(R|R<<8)&16711935,R=(R|R<<4)&252645135,R=(R|R<<2)&858993459,R=(R|R<<1)&1431655765,D=(D|D<<8)&16711935,D=(D|D<<4)&252645135,D=(D|D<<2)&858993459,D=(D|D<<1)&1431655765,R|D<<1}function L5(R){var D=R,H=R;do(D.x=0&&(R-Re)*(ne-Ke)-(H-Re)*(D-Ke)>=0&&(H-Re)*(Ae-Ke)-(de-Re)*(ne-Ke)>=0}function P5(R,D){return R.next.i!==D.i&&R.prev.i!==D.i&&!R5(R,D)&&(fd(R,D)&&fd(D,R)&&D5(R,D)&&(ao(R.prev,R,D.prev)||ao(R,D.prev,D))||kp(R,D)&&ao(R.prev,R,R.next)>0&&ao(D.prev,D,D.next)>0)}function ao(R,D,H){return(D.y-R.y)*(H.x-D.x)-(D.x-R.x)*(H.y-D.y)}function kp(R,D){return R.x===D.x&&R.y===D.y}function px(R,D,H,ne){var de=_p(ao(R,D,H)),Ae=_p(ao(R,D,ne)),Re=_p(ao(H,ne,R)),Ke=_p(ao(H,ne,D));return!!(de!==Ae&&Re!==Ke||de===0&&Fp(R,H,D)||Ae===0&&Fp(R,ne,D)||Re===0&&Fp(H,R,ne)||Ke===0&&Fp(H,D,ne))}function Fp(R,D,H){return D.x<=Math.max(R.x,H.x)&&D.x>=Math.min(R.x,H.x)&&D.y<=Math.max(R.y,H.y)&&D.y>=Math.min(R.y,H.y)}function _p(R){return R>0?1:R<0?-1:0}function R5(R,D){var H=R;do{if(H.i!==R.i&&H.next.i!==R.i&&H.i!==D.i&&H.next.i!==D.i&&px(H,H.next,R,D))return!0;H=H.next}while(H!==R);return!1}function fd(R,D){return ao(R.prev,R,R.next)<0?ao(R,D,R.next)>=0&&ao(R,R.prev,D)>=0:ao(R,D,R.prev)<0||ao(R,R.next,D)<0}function D5(R,D){var H=R,ne=!1,de=(R.x+D.x)/2,Ae=(R.y+D.y)/2;do H.y>Ae!=H.next.y>Ae&&H.next.y!==H.y&&de<(H.next.x-H.x)*(Ae-H.y)/(H.next.y-H.y)+H.x&&(ne=!ne),H=H.next;while(H!==R);return ne}function gx(R,D){var H=new Gg(R.i,R.x,R.y),ne=new Gg(D.i,D.x,D.y),de=R.next,Ae=D.prev;return R.next=D,D.prev=R,H.next=de,de.prev=H,ne.next=H,H.prev=ne,Ae.next=ne,ne.prev=Ae,ne}function yx(R,D,H,ne){var de=new Gg(R,D,H);return ne?(de.next=ne.next,de.prev=ne,ne.next.prev=de,ne.next=de):(de.prev=de,de.next=de),de}function cd(R){R.next.prev=R.prev,R.prev.next=R.next,R.prevZ&&(R.prevZ.nextZ=R.nextZ),R.nextZ&&(R.nextZ.prevZ=R.prevZ)}function Gg(R,D,H){this.i=R,this.x=D,this.y=H,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}Ip.deviation=function(R,D,H,ne){var de=D&&D.length,Ae=de?D[0]*H:R.length,Re=Math.abs(Wg(R,0,Ae,H));if(de)for(var Ke=0,ft=D.length;Ke0&&(ne+=R[de-1].length,H.holes.push(ne))}return H},Vg.default=g5;function I5(R,D,H,ne,de){mx(R,D,H||0,ne||R.length-1,de||k5)}function mx(R,D,H,ne,de){for(;ne>H;){if(ne-H>600){var Ae=ne-H+1,Re=D-H+1,Ke=Math.log(Ae),ft=.5*Math.exp(2*Ke/3),bt=.5*Math.sqrt(Ke*ft*(Ae-ft)/Ae)*(Re-Ae/2<0?-1:1),Et=Math.max(H,Math.floor(D-Re*ft/Ae+bt)),Wt=Math.min(ne,Math.floor(D+(Ae-Re)*ft/Ae+bt));mx(R,D,Et,Wt,de)}var sr=R[D],qt=H,mr=ne;for(hd(R,H,D),de(R[ne],sr)>0&&hd(R,H,ne);qt0;)mr--}de(R[H],sr)===0?hd(R,H,mr):(mr++,hd(R,mr,ne)),mr<=D&&(H=mr+1),D<=mr&&(ne=mr-1)}}function hd(R,D,H){var ne=R[D];R[D]=R[H],R[H]=ne}function k5(R,D){return RD?1:0}function Yg(R,D){var H=R.length;if(H<=1)return[R];for(var ne=[],de,Ae,Re=0;Re1)for(var ft=0;ft>3}if(ne--,H===1||H===2)de+=R.readSVarint(),Ae+=R.readSVarint(),H===1&&(Ke&&Re.push(Ke),Ke=[]),Ke.push(new t(de,Ae));else if(H===7)Ke&&Ke.push(Ke[0].clone());else throw new Error("unknown command "+H)}return Ke&&Re.push(Ke),Re},rv.prototype.bbox=function(){var R=this._pbf;R.pos=this._geometry;for(var D=R.readVarint()+R.pos,H=1,ne=0,de=0,Ae=0,Re=1/0,Ke=-1/0,ft=1/0,bt=-1/0;R.pos>3}if(ne--,H===1||H===2)de+=R.readSVarint(),Ae+=R.readSVarint(),deKe&&(Ke=de),Aebt&&(bt=Ae);else if(H!==7)throw new Error("unknown command "+H)}return[Re,ft,Ke,bt]},rv.prototype.toGeoJSON=function(R,D,H){var ne=this.extent*Math.pow(2,H),de=this.extent*R,Ae=this.extent*D,Re=this.loadGeometry(),Ke=rv.types[this.type],ft,bt;function Et(qt){for(var mr=0;mr>3;D=ne===1?R.readString():ne===2?R.readFloat():ne===3?R.readDouble():ne===4?R.readVarint64():ne===5?R.readVarint():ne===6?R.readSVarint():ne===7?R.readBoolean():null}return D}Tx.prototype.feature=function(R){if(R<0||R>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[R];var D=this._pbf.readVarint()+this._pbf.pos;return new bx(this._pbf,D,this.extent,this._keys,this._values)};var X5=j5;function j5(R,D){this.layers=R.readFields(K5,{},D)}function K5(R,D,H){if(R===3){var ne=new wx(H,H.readVarint()+H.pos);ne.length&&(D[ne.name]=ne)}}var J5=X5,Q5=bx,$5=wx,nv={VectorTile:J5,VectorTileFeature:Q5,VectorTileLayer:$5},q5=nv.VectorTileFeature.types,eA=500,jg=Math.pow(2,13);function vd(R,D,H,ne,de,Ae,Re,Ke){R.emplaceBack(D,H,Math.floor(ne*jg)*2+Re,de*jg*2,Ae*jg*2,Math.round(Ke))}var Su=function(D){this.zoom=D.zoom,this.overscaling=D.overscaling,this.layers=D.layers,this.layerIds=this.layers.map(function(H){return H.id}),this.index=D.index,this.hasPattern=!1,this.layoutVertexArray=new mc,this.indexArray=new Tu,this.programConfigurations=new Va(xx,D.layers,D.zoom),this.segments=new X,this.stateDependentLayerIds=this.layers.filter(function(H){return H.isStateDependent()}).map(function(H){return H.id})};Su.prototype.populate=function(D,H,ne){this.features=[],this.hasPattern=Zg("fill-extrusion",this.layers,H);for(var de=0,Ae=D;de=1){var An=rn[Mn-1];if(!tA(xn,An)){qt.vertexLength+4>X.MAX_VERTEX_ARRAY_LENGTH&&(qt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var kn=xn.sub(An)._perp()._unit(),Vn=An.dist(xn);$r+Vn>32768&&($r=0),vd(this.layoutVertexArray,xn.x,xn.y,kn.x,kn.y,0,0,$r),vd(this.layoutVertexArray,xn.x,xn.y,kn.x,kn.y,0,1,$r),$r+=Vn,vd(this.layoutVertexArray,An.x,An.y,kn.x,kn.y,0,0,$r),vd(this.layoutVertexArray,An.x,An.y,kn.x,kn.y,0,1,$r);var Qn=qt.vertexLength;this.indexArray.emplaceBack(Qn,Qn+2,Qn+1),this.indexArray.emplaceBack(Qn+1,Qn+2,Qn+3),qt.vertexLength+=4,qt.primitiveLength+=2}}}}if(qt.vertexLength+bt>X.MAX_VERTEX_ARRAY_LENGTH&&(qt=this.segments.prepareSegment(bt,this.layoutVertexArray,this.indexArray)),q5[D.type]==="Polygon"){for(var Jn=[],Sa=[],ca=qt.vertexLength,ya=0,Ba=ft;yaLa)||R.y===D.y&&(R.y<0||R.y>La)}function rA(R){return R.every(function(D){return D.x<0})||R.every(function(D){return D.x>La})||R.every(function(D){return D.y<0})||R.every(function(D){return D.y>La})}var nA=new $i({"fill-extrusion-opacity":new ga(Xt["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Ma(Xt["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new ga(Xt["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new ga(Xt["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new bi(Xt["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Ma(Xt["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Ma(Xt["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new ga(Xt["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),aA={paint:nA},iA=function(R){function D(H){R.call(this,H,aA)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype.createBucket=function(ne){return new Su(ne)},D.prototype.queryRadius=function(){return jl(this.paint.get("fill-extrusion-translate"))},D.prototype.is3D=function(){return!0},D.prototype.queryIntersectsFeature=function(ne,de,Ae,Re,Ke,ft,bt,Et){var Wt=Sl(ne,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),ft.angle,bt),sr=this.paint.get("fill-extrusion-height").evaluate(de,Ae),qt=this.paint.get("fill-extrusion-base").evaluate(de,Ae),mr=lA(Wt,Et,ft,0),Br=sA(Re,qt,sr,Et),rn=Br[0],$r=Br[1];return oA(rn,$r,mr)},D}(Ci);function dd(R,D){return R.x*D.x+R.y*D.y}function Ax(R,D){if(R.length===1){for(var H=0,ne=D[H++],de;!de||ne.equals(de);)if(de=D[H++],!de)return 1/0;for(;H=2&&D[bt-1].equals(D[bt-2]);)bt--;for(var Et=0;Et0;if(Jn&&Mn>Et){var ca=qt.dist(mr);if(ca>2*Wt){var ya=qt.sub(qt.sub(mr)._mult(Wt/ca)._round());this.updateDistance(mr,ya),this.addCurrentVertex(ya,rn,0,0,sr),mr=ya}}var Ba=mr&&Br,Ta=Ba?ne:ft?"butt":de;if(Ba&&Ta==="round"&&(VnAe&&(Ta="bevel"),Ta==="bevel"&&(Vn>2&&(Ta="flipbevel"),Vn100)xn=$r.mult(-1);else{var Aa=Vn*rn.add($r).mag()/rn.sub($r).mag();xn._perp()._mult(Aa*(Sa?-1:1))}this.addCurrentVertex(qt,xn,0,0,sr),this.addCurrentVertex(qt,xn.mult(-1),0,0,sr)}else if(Ta==="bevel"||Ta==="fakeround"){var Wa=-Math.sqrt(Vn*Vn-1),za=Sa?Wa:0,ti=Sa?0:Wa;if(mr&&this.addCurrentVertex(qt,rn,za,ti,sr),Ta==="fakeround")for(var yi=Math.round(Qn*180/Math.PI/vA),ri=1;ri2*Wt){var so=qt.add(Br.sub(qt)._mult(Wt/wo)._round());this.updateDistance(qt,so),this.addCurrentVertex(so,$r,0,0,sr),qt=so}}}}},Ts.prototype.addCurrentVertex=function(D,H,ne,de,Ae,Re){Re===void 0&&(Re=!1);var Ke=H.x+H.y*ne,ft=H.y-H.x*ne,bt=-H.x+H.y*de,Et=-H.y-H.x*de;this.addHalfVertex(D,Ke,ft,Re,!1,ne,Ae),this.addHalfVertex(D,bt,Et,Re,!0,-de,Ae),this.distance>Cx/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(D,H,ne,de,Ae,Re))},Ts.prototype.addHalfVertex=function(D,H,ne,de,Ae,Re,Ke){var ft=D.x,bt=D.y,Et=this.scaledDistance*Ex;this.layoutVertexArray.emplaceBack((ft<<1)+(de?1:0),(bt<<1)+(Ae?1:0),Math.round(Sx*H)+128,Math.round(Sx*ne)+128,(Re===0?0:Re<0?-1:1)+1|(Et&63)<<2,Et>>6);var Wt=Ke.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Wt),Ke.primitiveLength++),Ae?this.e2=Wt:this.e1=Wt},Ts.prototype.updateScaledDistance=function(){this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(Cx-1):this.distance},Ts.prototype.updateDistance=function(D,H){this.distance+=D.dist(H),this.updateScaledDistance()},fe("LineBucket",Ts,{omit:["layers","patternFeatures"]});var pA=new $i({"line-cap":new ga(Xt.layout_line["line-cap"]),"line-join":new Ma(Xt.layout_line["line-join"]),"line-miter-limit":new ga(Xt.layout_line["line-miter-limit"]),"line-round-limit":new ga(Xt.layout_line["line-round-limit"]),"line-sort-key":new Ma(Xt.layout_line["line-sort-key"])}),gA=new $i({"line-opacity":new Ma(Xt.paint_line["line-opacity"]),"line-color":new Ma(Xt.paint_line["line-color"]),"line-translate":new ga(Xt.paint_line["line-translate"]),"line-translate-anchor":new ga(Xt.paint_line["line-translate-anchor"]),"line-width":new Ma(Xt.paint_line["line-width"]),"line-gap-width":new Ma(Xt.paint_line["line-gap-width"]),"line-offset":new Ma(Xt.paint_line["line-offset"]),"line-blur":new Ma(Xt.paint_line["line-blur"]),"line-dasharray":new Ni(Xt.paint_line["line-dasharray"]),"line-pattern":new bi(Xt.paint_line["line-pattern"]),"line-gradient":new zo(Xt.paint_line["line-gradient"])}),Lx={paint:gA,layout:pA},yA=function(R){function D(){R.apply(this,arguments)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype.possiblyEvaluate=function(ne,de){return de=new Bn(Math.floor(de.zoom),{now:de.now,fadeDuration:de.fadeDuration,zoomHistory:de.zoomHistory,transition:de.transition}),R.prototype.possiblyEvaluate.call(this,ne,de)},D.prototype.evaluate=function(ne,de,Ae,Re){return de=o({},de,{zoom:Math.floor(de.zoom)}),R.prototype.evaluate.call(this,ne,de,Ae,Re)},D}(Ma),Px=new yA(Lx.paint.properties["line-width"].specification);Px.useIntegerZoom=!0;var mA=function(R){function D(H){R.call(this,H,Lx)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype._handleSpecialPaintPropertyUpdate=function(ne){ne==="line-gradient"&&this._updateGradient()},D.prototype._updateGradient=function(){var ne=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=hx(ne,"lineProgress"),this.gradientTexture=null},D.prototype.recalculate=function(ne,de){R.prototype.recalculate.call(this,ne,de),this.paint._values["line-floorwidth"]=Px.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,ne)},D.prototype.createBucket=function(ne){return new Ts(ne)},D.prototype.queryRadius=function(ne){var de=ne,Ae=Rx(Ns("line-width",this,de),Ns("line-gap-width",this,de)),Re=Ns("line-offset",this,de);return Ae/2+Math.abs(Re)+jl(this.paint.get("line-translate"))},D.prototype.queryIntersectsFeature=function(ne,de,Ae,Re,Ke,ft,bt){var Et=Sl(ne,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),ft.angle,bt),Wt=bt/2*Rx(this.paint.get("line-width").evaluate(de,Ae),this.paint.get("line-gap-width").evaluate(de,Ae)),sr=this.paint.get("line-offset").evaluate(de,Ae);return sr&&(Re=xA(Re,sr*bt)),no(Et,Re,Wt)},D.prototype.isTileClipped=function(){return!0},D}(Ci);function Rx(R,D){return D>0?D+2*R:R}function xA(R,D){for(var H=[],ne=new t(0,0),de=0;de":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};function EA(R){for(var D="",H=0;H>1,Et=-7,Wt=H?de-1:0,sr=H?-1:1,qt=R[D+Wt];for(Wt+=sr,Ae=qt&(1<<-Et)-1,qt>>=-Et,Et+=Ke;Et>0;Ae=Ae*256+R[D+Wt],Wt+=sr,Et-=8);for(Re=Ae&(1<<-Et)-1,Ae>>=-Et,Et+=ne;Et>0;Re=Re*256+R[D+Wt],Wt+=sr,Et-=8);if(Ae===0)Ae=1-bt;else{if(Ae===ft)return Re?NaN:(qt?-1:1)*(1/0);Re=Re+Math.pow(2,ne),Ae=Ae-bt}return(qt?-1:1)*Re*Math.pow(2,Ae-ne)},LA=function(R,D,H,ne,de,Ae){var Re,Ke,ft,bt=Ae*8-de-1,Et=(1<>1,sr=de===23?Math.pow(2,-24)-Math.pow(2,-77):0,qt=ne?0:Ae-1,mr=ne?1:-1,Br=D<0||D===0&&1/D<0?1:0;for(D=Math.abs(D),isNaN(D)||D===1/0?(Ke=isNaN(D)?1:0,Re=Et):(Re=Math.floor(Math.log(D)/Math.LN2),D*(ft=Math.pow(2,-Re))<1&&(Re--,ft*=2),Re+Wt>=1?D+=sr/ft:D+=sr*Math.pow(2,1-Wt),D*ft>=2&&(Re++,ft/=2),Re+Wt>=Et?(Ke=0,Re=Et):Re+Wt>=1?(Ke=(D*ft-1)*Math.pow(2,de),Re=Re+Wt):(Ke=D*Math.pow(2,Wt-1)*Math.pow(2,de),Re=0));de>=8;R[H+qt]=Ke&255,qt+=mr,Ke/=256,de-=8);for(Re=Re<0;R[H+qt]=Re&255,qt+=mr,Re/=256,bt-=8);R[H+qt-mr]|=Br*128},zp={read:CA,write:LA},Op=Li;function Li(R){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(R)?R:new Uint8Array(R||0),this.pos=0,this.type=0,this.length=this.buf.length}Li.Varint=0,Li.Fixed64=1,Li.Bytes=2,Li.Fixed32=5;var Jg=65536*65536,Ix=1/Jg,PA=12,kx=typeof TextDecoder>"u"?null:new TextDecoder("utf8");Li.prototype={destroy:function(){this.buf=null},readFields:function(R,D,H){for(H=H||this.length;this.pos>3,Ae=this.pos;this.type=ne&7,R(de,D,this),this.pos===Ae&&this.skip(ne)}return D},readMessage:function(R,D){return this.readFields(R,D,this.readVarint()+this.pos)},readFixed32:function(){var R=Np(this.buf,this.pos);return this.pos+=4,R},readSFixed32:function(){var R=_x(this.buf,this.pos);return this.pos+=4,R},readFixed64:function(){var R=Np(this.buf,this.pos)+Np(this.buf,this.pos+4)*Jg;return this.pos+=8,R},readSFixed64:function(){var R=Np(this.buf,this.pos)+_x(this.buf,this.pos+4)*Jg;return this.pos+=8,R},readFloat:function(){var R=zp.read(this.buf,this.pos,!0,23,4);return this.pos+=4,R},readDouble:function(){var R=zp.read(this.buf,this.pos,!0,52,8);return this.pos+=8,R},readVarint:function(R){var D=this.buf,H,ne;return ne=D[this.pos++],H=ne&127,ne<128||(ne=D[this.pos++],H|=(ne&127)<<7,ne<128)||(ne=D[this.pos++],H|=(ne&127)<<14,ne<128)||(ne=D[this.pos++],H|=(ne&127)<<21,ne<128)?H:(ne=D[this.pos],H|=(ne&15)<<28,RA(H,R,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var R=this.readVarint();return R%2===1?(R+1)/-2:R/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var R=this.readVarint()+this.pos,D=this.pos;return this.pos=R,R-D>=PA&&kx?WA(this.buf,D,R):GA(this.buf,D,R)},readBytes:function(){var R=this.readVarint()+this.pos,D=this.buf.subarray(this.pos,R);return this.pos=R,D},readPackedVarint:function(R,D){if(this.type!==Li.Bytes)return R.push(this.readVarint(D));var H=Of(this);for(R=R||[];this.pos127;);else if(D===Li.Bytes)this.pos=this.readVarint()+this.pos;else if(D===Li.Fixed32)this.pos+=4;else if(D===Li.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+D)},writeTag:function(R,D){this.writeVarint(R<<3|D)},realloc:function(R){for(var D=this.length||16;D268435455||R<0){DA(R,this);return}this.realloc(4),this.buf[this.pos++]=R&127|(R>127?128:0),!(R<=127)&&(this.buf[this.pos++]=(R>>>=7)&127|(R>127?128:0),!(R<=127)&&(this.buf[this.pos++]=(R>>>=7)&127|(R>127?128:0),!(R<=127)&&(this.buf[this.pos++]=R>>>7&127)))},writeSVarint:function(R){this.writeVarint(R<0?-R*2-1:R*2)},writeBoolean:function(R){this.writeVarint(!!R)},writeString:function(R){R=String(R),this.realloc(R.length*4),this.pos++;var D=this.pos;this.pos=YA(this.buf,R,this.pos);var H=this.pos-D;H>=128&&Fx(D,H,this),this.pos=D-1,this.writeVarint(H),this.pos+=H},writeFloat:function(R){this.realloc(4),zp.write(this.buf,R,this.pos,!0,23,4),this.pos+=4},writeDouble:function(R){this.realloc(8),zp.write(this.buf,R,this.pos,!0,52,8),this.pos+=8},writeBytes:function(R){var D=R.length;this.writeVarint(D),this.realloc(D);for(var H=0;H=128&&Fx(H,ne,this),this.pos=H-1,this.writeVarint(ne),this.pos+=ne},writeMessage:function(R,D,H){this.writeTag(R,Li.Bytes),this.writeRawMessage(D,H)},writePackedVarint:function(R,D){D.length&&this.writeMessage(R,FA,D)},writePackedSVarint:function(R,D){D.length&&this.writeMessage(R,_A,D)},writePackedBoolean:function(R,D){D.length&&this.writeMessage(R,NA,D)},writePackedFloat:function(R,D){D.length&&this.writeMessage(R,zA,D)},writePackedDouble:function(R,D){D.length&&this.writeMessage(R,OA,D)},writePackedFixed32:function(R,D){D.length&&this.writeMessage(R,BA,D)},writePackedSFixed32:function(R,D){D.length&&this.writeMessage(R,UA,D)},writePackedFixed64:function(R,D){D.length&&this.writeMessage(R,VA,D)},writePackedSFixed64:function(R,D){D.length&&this.writeMessage(R,HA,D)},writeBytesField:function(R,D){this.writeTag(R,Li.Bytes),this.writeBytes(D)},writeFixed32Field:function(R,D){this.writeTag(R,Li.Fixed32),this.writeFixed32(D)},writeSFixed32Field:function(R,D){this.writeTag(R,Li.Fixed32),this.writeSFixed32(D)},writeFixed64Field:function(R,D){this.writeTag(R,Li.Fixed64),this.writeFixed64(D)},writeSFixed64Field:function(R,D){this.writeTag(R,Li.Fixed64),this.writeSFixed64(D)},writeVarintField:function(R,D){this.writeTag(R,Li.Varint),this.writeVarint(D)},writeSVarintField:function(R,D){this.writeTag(R,Li.Varint),this.writeSVarint(D)},writeStringField:function(R,D){this.writeTag(R,Li.Bytes),this.writeString(D)},writeFloatField:function(R,D){this.writeTag(R,Li.Fixed32),this.writeFloat(D)},writeDoubleField:function(R,D){this.writeTag(R,Li.Fixed64),this.writeDouble(D)},writeBooleanField:function(R,D){this.writeVarintField(R,!!D)}};function RA(R,D,H){var ne=H.buf,de,Ae;if(Ae=ne[H.pos++],de=(Ae&112)>>4,Ae<128||(Ae=ne[H.pos++],de|=(Ae&127)<<3,Ae<128)||(Ae=ne[H.pos++],de|=(Ae&127)<<10,Ae<128)||(Ae=ne[H.pos++],de|=(Ae&127)<<17,Ae<128)||(Ae=ne[H.pos++],de|=(Ae&127)<<24,Ae<128)||(Ae=ne[H.pos++],de|=(Ae&1)<<31,Ae<128))return av(R,de,D);throw new Error("Expected varint not more than 10 bytes")}function Of(R){return R.type===Li.Bytes?R.readVarint()+R.pos:R.pos+1}function av(R,D,H){return H?D*4294967296+(R>>>0):(D>>>0)*4294967296+(R>>>0)}function DA(R,D){var H,ne;if(R>=0?(H=R%4294967296|0,ne=R/4294967296|0):(H=~(-R%4294967296),ne=~(-R/4294967296),H^4294967295?H=H+1|0:(H=0,ne=ne+1|0)),R>=18446744073709552e3||R<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");D.realloc(10),IA(H,ne,D),kA(ne,D)}function IA(R,D,H){H.buf[H.pos++]=R&127|128,R>>>=7,H.buf[H.pos++]=R&127|128,R>>>=7,H.buf[H.pos++]=R&127|128,R>>>=7,H.buf[H.pos++]=R&127|128,R>>>=7,H.buf[H.pos]=R&127}function kA(R,D){var H=(R&7)<<4;D.buf[D.pos++]|=H|((R>>>=3)?128:0),R&&(D.buf[D.pos++]=R&127|((R>>>=7)?128:0),R&&(D.buf[D.pos++]=R&127|((R>>>=7)?128:0),R&&(D.buf[D.pos++]=R&127|((R>>>=7)?128:0),R&&(D.buf[D.pos++]=R&127|((R>>>=7)?128:0),R&&(D.buf[D.pos++]=R&127)))))}function Fx(R,D,H){var ne=D<=16383?1:D<=2097151?2:D<=268435455?3:Math.floor(Math.log(D)/(Math.LN2*7));H.realloc(ne);for(var de=H.pos-1;de>=R;de--)H.buf[de+ne]=H.buf[de]}function FA(R,D){for(var H=0;H>>8,R[H+2]=D>>>16,R[H+3]=D>>>24}function _x(R,D){return(R[D]|R[D+1]<<8|R[D+2]<<16)+(R[D+3]<<24)}function GA(R,D,H){for(var ne="",de=D;de239?4:Ae>223?3:Ae>191?2:1;if(de+Ke>H)break;var ft,bt,Et;Ke===1?Ae<128&&(Re=Ae):Ke===2?(ft=R[de+1],(ft&192)===128&&(Re=(Ae&31)<<6|ft&63,Re<=127&&(Re=null))):Ke===3?(ft=R[de+1],bt=R[de+2],(ft&192)===128&&(bt&192)===128&&(Re=(Ae&15)<<12|(ft&63)<<6|bt&63,(Re<=2047||Re>=55296&&Re<=57343)&&(Re=null))):Ke===4&&(ft=R[de+1],bt=R[de+2],Et=R[de+3],(ft&192)===128&&(bt&192)===128&&(Et&192)===128&&(Re=(Ae&15)<<18|(ft&63)<<12|(bt&63)<<6|Et&63,(Re<=65535||Re>=1114112)&&(Re=null))),Re===null?(Re=65533,Ke=1):Re>65535&&(Re-=65536,ne+=String.fromCharCode(Re>>>10&1023|55296),Re=56320|Re&1023),ne+=String.fromCharCode(Re),de+=Ke}return ne}function WA(R,D,H){return kx.decode(R.subarray(D,H))}function YA(R,D,H){for(var ne=0,de,Ae;ne55295&&de<57344)if(Ae)if(de<56320){R[H++]=239,R[H++]=191,R[H++]=189,Ae=de;continue}else de=Ae-55296<<10|de-56320|65536,Ae=null;else{de>56319||ne+1===D.length?(R[H++]=239,R[H++]=191,R[H++]=189):Ae=de;continue}else Ae&&(R[H++]=239,R[H++]=191,R[H++]=189,Ae=null);de<128?R[H++]=de:(de<2048?R[H++]=de>>6|192:(de<65536?R[H++]=de>>12|224:(R[H++]=de>>18|240,R[H++]=de>>12&63|128),R[H++]=de>>6&63|128),R[H++]=de&63|128)}return H}var Qg=3;function ZA(R,D,H){R===1&&H.readMessage(XA,D)}function XA(R,D,H){if(R===3){var ne=H.readMessage(jA,{}),de=ne.id,Ae=ne.bitmap,Re=ne.width,Ke=ne.height,ft=ne.left,bt=ne.top,Et=ne.advance;D.push({id:de,bitmap:new Eh({width:Re+2*Qg,height:Ke+2*Qg},Ae),metrics:{width:Re,height:Ke,left:ft,top:bt,advance:Et}})}}function jA(R,D,H){R===1?D.id=H.readVarint():R===2?D.bitmap=H.readBytes():R===3?D.width=H.readVarint():R===4?D.height=H.readVarint():R===5?D.left=H.readSVarint():R===6?D.top=H.readSVarint():R===7&&(D.advance=H.readVarint())}function KA(R){return new Op(R).readFields(ZA,[])}var zx=Qg;function Ox(R){for(var D=0,H=0,ne=0,de=R;ne=0;qt--){var mr=Ke[qt];if(!(sr.w>mr.w||sr.h>mr.h)){if(sr.x=mr.x,sr.y=mr.y,bt=Math.max(bt,sr.y+sr.h),ft=Math.max(ft,sr.x+sr.w),sr.w===mr.w&&sr.h===mr.h){var Br=Ke.pop();qt=0&&de>=D&&af[this.text.charCodeAt(de)];de--)ne--;this.text=this.text.substring(D,ne),this.sectionIndex=this.sectionIndex.slice(D,ne)},Zo.prototype.substring=function(D,H){var ne=new Zo;return ne.text=this.text.substring(D,H),ne.sectionIndex=this.sectionIndex.slice(D,H),ne.sections=this.sections,ne},Zo.prototype.toString=function(){return this.text},Zo.prototype.getMaxScale=function(){var D=this;return this.sectionIndex.reduce(function(H,ne){return Math.max(H,D.sections[ne].scale)},0)},Zo.prototype.addTextSection=function(D,H){this.text+=D.text,this.sections.push(ov.forText(D.scale,D.fontStack||H));for(var ne=this.sections.length-1,de=0;de=Bx?null:++this.imageSectionID:(this.imageSectionID=Nx,this.imageSectionID)};function QA(R,D){for(var H=[],ne=R.text,de=0,Ae=0,Re=D;Ae=0,Et=0,Wt=0;Wt0&&so>Sa&&(Sa=so)}else{var ni=H[ya.fontStack],$a=ni&&ni[Ta];if($a&&$a.rect)za=$a.rect,Wa=$a.metrics;else{var Si=D[ya.fontStack],Pi=Si&&Si[Ta];if(!Pi)continue;Wa=Pi.metrics}Aa=(kn-ya.scale)*Do}ri?(R.verticalizable=!0,Jn.push({glyph:Ta,imageName:ti,x:sr,y:qt+Aa,vertical:ri,scale:ya.scale,fontStack:ya.fontStack,sectionIndex:Ba,metrics:Wa,rect:za}),sr+=yi*ya.scale+bt):(Jn.push({glyph:Ta,imageName:ti,x:sr,y:qt+Aa,vertical:ri,scale:ya.scale,fontStack:ya.fontStack,sectionIndex:Ba,metrics:Wa,rect:za}),sr+=Wa.advance*ya.scale+bt)}if(Jn.length!==0){var Xo=sr-bt;mr=Math.max(Xo,mr),t4(Jn,0,Jn.length-1,rn,Sa)}sr=0;var jo=Ae*kn+Sa;Qn.lineOffset=Math.max(Sa,Vn),qt+=jo,Br=Math.max(jo,Br),++$r}var To=qt-md,as=qg(Re),is=as.horizontalAlign,po=as.verticalAlign;r4(R.positionedLines,rn,is,po,mr,Br,Ae,To,de.length),R.top+=-po*To,R.bottom=R.top+To,R.left+=-is*mr,R.right=R.left+mr}function t4(R,D,H,ne,de){if(!(!ne&&!de))for(var Ae=R[H],Re=Ae.metrics.advance*Ae.scale,Ke=(R[H].x+Re)*ne,ft=D;ft<=H;ft++)R[ft].x-=Ke,R[ft].y+=de}function r4(R,D,H,ne,de,Ae,Re,Ke,ft){var bt=(D-H)*de,Et=0;Ae!==Re?Et=-Ke*ne-md:Et=(-ne*ft+.5)*Re;for(var Wt=0,sr=R;Wt-H/2;){if(Re--,Re<0)return!1;Ke-=R[Re].dist(Ae),Ae=R[Re]}Ke+=R[Re].dist(R[Re+1]),Re++;for(var ft=[],bt=0;Kene;)bt-=ft.shift().angleDelta;if(bt>de)return!1;Re++,Ke+=Wt.dist(sr)}return!0}function jx(R){for(var D=0,H=0;Hbt){var mr=(bt-ft)/qt,Br=Fi(Wt.x,sr.x,mr),rn=Fi(Wt.y,sr.y,mr),$r=new sv(Br,rn,sr.angleTo(Wt),Et);return $r._round(),!Re||Xx(R,$r,Ke,Re,D)?$r:void 0}ft+=qt}}function o4(R,D,H,ne,de,Ae,Re,Ke,ft){var bt=Kx(ne,Ae,Re),Et=Jx(ne,de),Wt=Et*Re,sr=R[0].x===0||R[0].x===ft||R[0].y===0||R[0].y===ft;D-Wt=0&&An=0&&kn=0&&sr+bt<=Et){var Vn=new sv(An,kn,Mn,mr);Vn._round(),(!ne||Xx(R,Vn,Ae,ne,de))&&qt.push(Vn)}}Wt+=$r}return!Ke&&!qt.length&&!Re&&(qt=Qx(R,Wt/2,H,ne,de,Ae,Re,!0,ft)),qt}function $x(R,D,H,ne,de){for(var Ae=[],Re=0;Re=ne&&Wt.x>=ne)&&(Et.x>=ne?Et=new t(ne,Et.y+(Wt.y-Et.y)*((ne-Et.x)/(Wt.x-Et.x)))._round():Wt.x>=ne&&(Wt=new t(ne,Et.y+(Wt.y-Et.y)*((ne-Et.x)/(Wt.x-Et.x)))._round()),!(Et.y>=de&&Wt.y>=de)&&(Et.y>=de?Et=new t(Et.x+(Wt.x-Et.x)*((de-Et.y)/(Wt.y-Et.y)),de)._round():Wt.y>=de&&(Wt=new t(Et.x+(Wt.x-Et.x)*((de-Et.y)/(Wt.y-Et.y)),de)._round()),(!ft||!Et.equals(ft[ft.length-1]))&&(ft=[Et],Ae.push(ft)),ft.push(Wt)))))}return Ae}var lv=Bs;function qx(R,D,H,ne){var de=[],Ae=R.image,Re=Ae.pixelRatio,Ke=Ae.paddedRect.w-2*lv,ft=Ae.paddedRect.h-2*lv,bt=R.right-R.left,Et=R.bottom-R.top,Wt=Ae.stretchX||[[0,Ke]],sr=Ae.stretchY||[[0,ft]],qt=function(ni,$a){return ni+$a[1]-$a[0]},mr=Wt.reduce(qt,0),Br=sr.reduce(qt,0),rn=Ke-mr,$r=ft-Br,Mn=0,xn=mr,An=0,kn=Br,Vn=0,Qn=rn,Jn=0,Sa=$r;if(Ae.content&&ne){var ca=Ae.content;Mn=Vp(Wt,0,ca[0]),An=Vp(sr,0,ca[1]),xn=Vp(Wt,ca[0],ca[2]),kn=Vp(sr,ca[1],ca[3]),Vn=ca[0]-Mn,Jn=ca[1]-An,Qn=ca[2]-ca[0]-xn,Sa=ca[3]-ca[1]-kn}var ya=function(ni,$a,Si,Pi){var Vi=Hp(ni.stretch-Mn,xn,bt,R.left),Zi=Gp(ni.fixed-Vn,Qn,ni.stretch,mr),wo=Hp($a.stretch-An,kn,Et,R.top),so=Gp($a.fixed-Jn,Sa,$a.stretch,Br),Xo=Hp(Si.stretch-Mn,xn,bt,R.left),jo=Gp(Si.fixed-Vn,Qn,Si.stretch,mr),To=Hp(Pi.stretch-An,kn,Et,R.top),as=Gp(Pi.fixed-Jn,Sa,Pi.stretch,Br),is=new t(Vi,wo),po=new t(Xo,wo),os=new t(Xo,To),al=new t(Vi,To),Uf=new t(Zi/Re,so/Re),Cc=new t(jo/Re,as/Re),Lc=D*Math.PI/180;if(Lc){var Pc=Math.sin(Lc),gv=Math.cos(Lc),Jl=[gv,-Pc,Pc,gv];is._matMult(Jl),po._matMult(Jl),al._matMult(Jl),os._matMult(Jl)}var Kp=ni.stretch+ni.fixed,ly=Si.stretch+Si.fixed,Jp=$a.stretch+$a.fixed,uy=Pi.stretch+Pi.fixed,El={x:Ae.paddedRect.x+lv+Kp,y:Ae.paddedRect.y+lv+Jp,w:ly-Kp,h:uy-Jp},yv=Qn/Re/bt,Qp=Sa/Re/Et;return{tl:is,tr:po,bl:al,br:os,tex:El,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Uf,pixelOffsetBR:Cc,minFontScaleX:yv,minFontScaleY:Qp,isSDF:H}};if(!ne||!Ae.stretchX&&!Ae.stretchY)de.push(ya({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:Ke+1},{fixed:0,stretch:ft+1}));else for(var Ba=e2(Wt,rn,mr),Ta=e2(sr,$r,Br),Aa=0;Aa0&&(mr=Math.max(10,mr),this.circleDiameter=mr)}else{var Br=Re.top*Ke-ft,rn=Re.bottom*Ke+ft,$r=Re.left*Ke-ft,Mn=Re.right*Ke+ft,xn=Re.collisionPadding;if(xn&&($r-=xn[0]*Ke,Br-=xn[1]*Ke,Mn+=xn[2]*Ke,rn+=xn[3]*Ke),Et){var An=new t($r,Br),kn=new t(Mn,Br),Vn=new t($r,rn),Qn=new t(Mn,rn),Jn=Et*Math.PI/180;An._rotate(Jn),kn._rotate(Jn),Vn._rotate(Jn),Qn._rotate(Jn),$r=Math.min(An.x,kn.x,Vn.x,Qn.x),Mn=Math.max(An.x,kn.x,Vn.x,Qn.x),Br=Math.min(An.y,kn.y,Vn.y,Qn.y),rn=Math.max(An.y,kn.y,Vn.y,Qn.y)}D.emplaceBack(H.x,H.y,$r,Br,Mn,rn,ne,de,Ae)}this.boxEndIndex=D.length},uv=function(D,H){if(D===void 0&&(D=[]),H===void 0&&(H=l4),this.data=D,this.length=this.data.length,this.compare=H,this.length>0)for(var ne=(this.length>>1)-1;ne>=0;ne--)this._down(ne)};uv.prototype.push=function(D){this.data.push(D),this.length++,this._up(this.length-1)},uv.prototype.pop=function(){if(this.length!==0){var D=this.data[0],H=this.data.pop();return this.length--,this.length>0&&(this.data[0]=H,this._down(0)),D}},uv.prototype.peek=function(){return this.data[0]},uv.prototype._up=function(D){for(var H=this,ne=H.data,de=H.compare,Ae=ne[D];D>0;){var Re=D-1>>1,Ke=ne[Re];if(de(Ae,Ke)>=0)break;ne[D]=Ke,D=Re}ne[D]=Ae},uv.prototype._down=function(D){for(var H=this,ne=H.data,de=H.compare,Ae=this.length>>1,Re=ne[D];D=0)break;ne[D]=ft,D=Ke}ne[D]=Re};function l4(R,D){return RD?1:0}function u4(R,D,H){D===void 0&&(D=1),H===void 0&&(H=!1);for(var ne=1/0,de=1/0,Ae=-1/0,Re=-1/0,Ke=R[0],ft=0;ftAe)&&(Ae=bt.x),(!ft||bt.y>Re)&&(Re=bt.y)}var Et=Ae-ne,Wt=Re-de,sr=Math.min(Et,Wt),qt=sr/2,mr=new uv([],f4);if(sr===0)return new t(ne,de);for(var Br=ne;Br$r.d||!$r.d)&&($r=xn,H&&console.log("found best %d after %d probes",Math.round(1e4*xn.d)/1e4,Mn)),!(xn.max-$r.d<=D)&&(qt=xn.h/2,mr.push(new fv(xn.p.x-qt,xn.p.y-qt,qt,R)),mr.push(new fv(xn.p.x+qt,xn.p.y-qt,qt,R)),mr.push(new fv(xn.p.x-qt,xn.p.y+qt,qt,R)),mr.push(new fv(xn.p.x+qt,xn.p.y+qt,qt,R)),Mn+=4)}return H&&(console.log("num probes: "+Mn),console.log("best distance: "+$r.d)),$r.p}function f4(R,D){return D.max-R.max}function fv(R,D,H,ne){this.p=new t(R,D),this.h=H,this.d=c4(this.p,ne),this.max=this.d+this.h*Math.SQRT2}function c4(R,D){for(var H=!1,ne=1/0,de=0;deR.y!=Et.y>R.y&&R.x<(Et.x-bt.x)*(R.y-bt.y)/(Et.y-bt.y)+bt.x&&(H=!H),ne=Math.min(ne,Au(R,bt,Et))}return(H?1:-1)*Math.sqrt(ne)}function h4(R){for(var D=0,H=0,ne=0,de=R[0],Ae=0,Re=de.length,Ke=Re-1;Ae=La||Jl.y<0||Jl.y>=La||p4(R,Jl,gv,H,ne,de,Ta,R.layers[0],R.collisionBoxArray,D.index,D.sourceLayerIndex,R.index,$r,kn,Jn,ft,xn,Vn,Sa,qt,D,Ae,bt,Et,Re)};if(ca==="line")for(var Wa=0,za=$x(D.geometry,0,0,La,La);Wa1){var wo=i4(Zi,Qn,H.vertical||mr,ne,Br,Mn);wo&&Aa(Zi,wo)}}else if(D.type==="Polygon")for(var so=0,Xo=Yg(D.geometry,0);soSc&&B(R.layerIds[0]+': Value for "text-size" is >= '+xd+'. Reduce your "text-size".')):rn.kind==="composite"&&($r=[Eu*qt.compositeTextSizes[0].evaluate(Re,{},mr),Eu*qt.compositeTextSizes[1].evaluate(Re,{},mr)],($r[0]>Sc||$r[1]>Sc)&&B(R.layerIds[0]+': Value for "text-size" is >= '+xd+'. Reduce your "text-size".')),R.addSymbols(R.text,Br,$r,Ke,Ae,Re,bt,D,ft.lineStartIndex,ft.lineLength,sr,mr);for(var Mn=0,xn=Et;MnSc&&B(R.layerIds[0]+': Value for "icon-size" is >= '+xd+'. Reduce your "icon-size".')):is.kind==="composite"&&(po=[Eu*kn.compositeIconSizes[0].evaluate(An,{},Qn),Eu*kn.compositeIconSizes[1].evaluate(An,{},Qn)],(po[0]>Sc||po[1]>Sc)&&B(R.layerIds[0]+': Value for "icon-size" is >= '+xd+'. Reduce your "icon-size".')),R.addSymbols(R.icon,To,po,xn,Mn,An,!1,D,ca.lineStartIndex,ca.lineLength,-1,Qn),ri=R.icon.placedSymbolArray.length-1,as&&(za=as.length*4,R.addSymbols(R.icon,as,po,xn,Mn,An,nl.vertical,D,ca.lineStartIndex,ca.lineLength,-1,Qn),ni=R.icon.placedSymbolArray.length-1)}for(var os in ne.horizontal){var al=ne.horizontal[os];if(!ya){Si=Ze(al.text);var Uf=Ke.layout.get("text-rotate").evaluate(An,{},Qn);ya=new Wp(ft,D,bt,Et,Wt,al,sr,qt,mr,Uf)}var Cc=al.positionedLines.length===1;if(ti+=r2(R,D,al,Ae,Ke,mr,An,Br,ca,ne.vertical?nl.horizontal:nl.horizontalOnly,Cc?Object.keys(ne.horizontal):[os],$a,ri,kn,Qn),Cc)break}ne.vertical&&(yi+=r2(R,D,ne.vertical,Ae,Ke,mr,An,Br,ca,nl.vertical,["vertical"],$a,ni,kn,Qn));var Lc=ya?ya.boxStartIndex:R.collisionBoxArray.length,Pc=ya?ya.boxEndIndex:R.collisionBoxArray.length,gv=Ta?Ta.boxStartIndex:R.collisionBoxArray.length,Jl=Ta?Ta.boxEndIndex:R.collisionBoxArray.length,Kp=Ba?Ba.boxStartIndex:R.collisionBoxArray.length,ly=Ba?Ba.boxEndIndex:R.collisionBoxArray.length,Jp=Aa?Aa.boxStartIndex:R.collisionBoxArray.length,uy=Aa?Aa.boxEndIndex:R.collisionBoxArray.length,El=-1,yv=function(Td,x2){return Td&&Td.circleDiameter?Math.max(Td.circleDiameter,x2):x2};El=yv(ya,El),El=yv(Ta,El),El=yv(Ba,El),El=yv(Aa,El);var Qp=El>-1?1:0;Qp&&(El*=Jn/Do),R.glyphOffsetArray.length>=gi.MAX_GLYPHS&&B("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),An.sortKey!==void 0&&R.addToSortKeyRanges(R.symbolInstances.length,An.sortKey),R.symbolInstances.emplaceBack(D.x,D.y,$a.right>=0?$a.right:-1,$a.center>=0?$a.center:-1,$a.left>=0?$a.left:-1,$a.vertical||-1,ri,ni,Si,Lc,Pc,gv,Jl,Kp,ly,Jp,uy,bt,ti,yi,Wa,za,Qp,0,sr,Pi,Vi,El)}function g4(R,D,H,ne){var de=R.compareText;if(!(D in de))de[D]=[];else for(var Ae=de[D],Re=Ae.length-1;Re>=0;Re--)if(ne.dist(Ae[Re])0)&&(Re.value.kind!=="constant"||Re.value.value.length>0),Et=ft.value.kind!=="constant"||!!ft.value.value||Object.keys(ft.parameters).length>0,Wt=Ae.get("symbol-sort-key");if(this.features=[],!(!bt&&!Et)){for(var sr=H.iconDependencies,qt=H.glyphDependencies,mr=H.availableImages,Br=new Bn(this.zoom),rn=0,$r=D;rn<$r.length;rn+=1){var Mn=$r[rn],xn=Mn.feature,An=Mn.id,kn=Mn.index,Vn=Mn.sourceLayerIndex,Qn=de._featureFilter.needGeometry,Jn={type:xn.type,id:An,properties:xn.properties,geometry:Qn?ci(xn):[]};if(de._featureFilter.filter(Br,Jn,ne)){Qn||(Jn.geometry=ci(xn));var Sa=void 0;if(bt){var ca=de.getValueAndResolveTokens("text-field",Jn,ne,mr),ya=Ji.factory(ca);x4(ya)&&(this.hasRTLText=!0),(!this.hasRTLText||Ua()==="unavailable"||this.hasRTLText&&ei.isParsed())&&(Sa=MA(ya,de,Jn))}var Ba=void 0;if(Et){var Ta=de.getValueAndResolveTokens("icon-image",Jn,ne,mr);Ta instanceof Eo?Ba=Ta:Ba=Eo.fromString(Ta)}if(!(!Sa&&!Ba)){var Aa=this.sortFeaturesByKey?Wt.evaluate(Jn,{},ne):void 0,Wa={id:An,text:Sa,icon:Ba,index:kn,sourceLayerIndex:Vn,geometry:ci(xn),properties:xn.properties,type:y4[xn.type],sortKey:Aa};if(this.features.push(Wa),Ba&&(sr[Ba.name]=!0),Sa){var za=Re.evaluate(Jn,{},ne).join(","),ti=Ae.get("text-rotation-alignment")==="map"&&Ae.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(nl.vertical)>=0;for(var yi=0,ri=Sa.sections;yi=0;ft--)Re[ft]={x:H[ft].x,y:H[ft].y,tileUnitDistanceFromAnchor:Ae},ft>0&&(Ae+=H[ft-1].dist(H[ft]));for(var bt=0;bt0},gi.prototype.hasIconData=function(){return this.icon.segments.get().length>0},gi.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},gi.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},gi.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},gi.prototype.addIndicesForPlacedSymbol=function(D,H){for(var ne=D.placedSymbolArray.get(H),de=ne.vertexStartIndex+ne.numGlyphs*4,Ae=ne.vertexStartIndex;Ae1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(D),this.sortedAngle=D,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var ne=0,de=this.symbolInstanceIndexes;ne=0&&bt.indexOf(Ke)===ft&&H.addIndicesForPlacedSymbol(H.text,Ke)}),Re.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,Re.verticalPlacedTextSymbolIndex),Re.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Re.placedIconSymbolIndex),Re.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Re.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},fe("SymbolBucket",gi,{omit:["layers","collisionBoxArray","features","compareText"]}),gi.MAX_GLYPHS=65535,gi.addDynamicAttributes=ny;function b4(R,D){return D.replace(/{([^{}]+)}/g,function(H,ne){return ne in R?String(R[ne]):""})}var w4=new $i({"symbol-placement":new ga(Xt.layout_symbol["symbol-placement"]),"symbol-spacing":new ga(Xt.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new ga(Xt.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Ma(Xt.layout_symbol["symbol-sort-key"]),"symbol-z-order":new ga(Xt.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new ga(Xt.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new ga(Xt.layout_symbol["icon-ignore-placement"]),"icon-optional":new ga(Xt.layout_symbol["icon-optional"]),"icon-rotation-alignment":new ga(Xt.layout_symbol["icon-rotation-alignment"]),"icon-size":new Ma(Xt.layout_symbol["icon-size"]),"icon-text-fit":new ga(Xt.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new ga(Xt.layout_symbol["icon-text-fit-padding"]),"icon-image":new Ma(Xt.layout_symbol["icon-image"]),"icon-rotate":new Ma(Xt.layout_symbol["icon-rotate"]),"icon-padding":new ga(Xt.layout_symbol["icon-padding"]),"icon-keep-upright":new ga(Xt.layout_symbol["icon-keep-upright"]),"icon-offset":new Ma(Xt.layout_symbol["icon-offset"]),"icon-anchor":new Ma(Xt.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new ga(Xt.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new ga(Xt.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new ga(Xt.layout_symbol["text-rotation-alignment"]),"text-field":new Ma(Xt.layout_symbol["text-field"]),"text-font":new Ma(Xt.layout_symbol["text-font"]),"text-size":new Ma(Xt.layout_symbol["text-size"]),"text-max-width":new Ma(Xt.layout_symbol["text-max-width"]),"text-line-height":new ga(Xt.layout_symbol["text-line-height"]),"text-letter-spacing":new Ma(Xt.layout_symbol["text-letter-spacing"]),"text-justify":new Ma(Xt.layout_symbol["text-justify"]),"text-radial-offset":new Ma(Xt.layout_symbol["text-radial-offset"]),"text-variable-anchor":new ga(Xt.layout_symbol["text-variable-anchor"]),"text-anchor":new Ma(Xt.layout_symbol["text-anchor"]),"text-max-angle":new ga(Xt.layout_symbol["text-max-angle"]),"text-writing-mode":new ga(Xt.layout_symbol["text-writing-mode"]),"text-rotate":new Ma(Xt.layout_symbol["text-rotate"]),"text-padding":new ga(Xt.layout_symbol["text-padding"]),"text-keep-upright":new ga(Xt.layout_symbol["text-keep-upright"]),"text-transform":new Ma(Xt.layout_symbol["text-transform"]),"text-offset":new Ma(Xt.layout_symbol["text-offset"]),"text-allow-overlap":new ga(Xt.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new ga(Xt.layout_symbol["text-ignore-placement"]),"text-optional":new ga(Xt.layout_symbol["text-optional"])}),T4=new $i({"icon-opacity":new Ma(Xt.paint_symbol["icon-opacity"]),"icon-color":new Ma(Xt.paint_symbol["icon-color"]),"icon-halo-color":new Ma(Xt.paint_symbol["icon-halo-color"]),"icon-halo-width":new Ma(Xt.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Ma(Xt.paint_symbol["icon-halo-blur"]),"icon-translate":new ga(Xt.paint_symbol["icon-translate"]),"icon-translate-anchor":new ga(Xt.paint_symbol["icon-translate-anchor"]),"text-opacity":new Ma(Xt.paint_symbol["text-opacity"]),"text-color":new Ma(Xt.paint_symbol["text-color"],{runtimeType:_n,getOverride:function(R){return R.textColor},hasOverride:function(R){return!!R.textColor}}),"text-halo-color":new Ma(Xt.paint_symbol["text-halo-color"]),"text-halo-width":new Ma(Xt.paint_symbol["text-halo-width"]),"text-halo-blur":new Ma(Xt.paint_symbol["text-halo-blur"]),"text-translate":new ga(Xt.paint_symbol["text-translate"]),"text-translate-anchor":new ga(Xt.paint_symbol["text-translate-anchor"])}),ay={paint:T4,layout:w4},vv=function(D){this.type=D.property.overrides?D.property.overrides.runtimeType:Rr,this.defaultValue=D};vv.prototype.evaluate=function(D){if(D.formattedSection){var H=this.defaultValue.property.overrides;if(H&&H.hasOverride(D.formattedSection))return H.getOverride(D.formattedSection)}return D.feature&&D.featureState?this.defaultValue.evaluate(D.feature,D.featureState):this.defaultValue.property.specification.default},vv.prototype.eachChild=function(D){if(!this.defaultValue.isConstant()){var H=this.defaultValue.value;D(H._styleExpression.expression)}},vv.prototype.outputDefined=function(){return!1},vv.prototype.serialize=function(){return null},fe("FormatSectionOverride",vv,{omit:["defaultValue"]});var A4=function(R){function D(H){R.call(this,H,ay)}return R&&(D.__proto__=R),D.prototype=Object.create(R&&R.prototype),D.prototype.constructor=D,D.prototype.recalculate=function(ne,de){if(R.prototype.recalculate.call(this,ne,de),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){var Ae=this.layout.get("text-writing-mode");if(Ae){for(var Re=[],Ke=0,ft=Ae;Ke",targetMapId:de,sourceMapId:Re.mapId})}}},dv.prototype.receive=function(D){var H=D.data,ne=H.id;if(ne&&!(H.targetMapId&&this.mapId!==H.targetMapId))if(H.type===""){delete this.tasks[ne];var de=this.cancelCallbacks[ne];delete this.cancelCallbacks[ne],de&&de()}else _()||H.mustQueue?(this.tasks[ne]=H,this.taskQueue.push(ne),this.invoker.trigger()):this.processTask(ne,H)},dv.prototype.process=function(){if(this.taskQueue.length){var D=this.taskQueue.shift(),H=this.tasks[D];delete this.tasks[D],this.taskQueue.length&&this.invoker.trigger(),H&&this.processTask(D,H)}},dv.prototype.processTask=function(D,H){var ne=this;if(H.type===""){var de=this.callbacks[D];delete this.callbacks[D],de&&(H.error?de(it(H.error)):de(null,it(H.data)))}else{var Ae=!1,Re=J(this.globalScope)?void 0:[],Ke=H.hasCallback?function(sr,qt){Ae=!0,delete ne.cancelCallbacks[D],ne.target.postMessage({id:D,type:"",sourceMapId:ne.mapId,error:sr?tt(sr):null,data:tt(qt,Re)},Re)}:function(sr){Ae=!0},ft=null,bt=it(H.data);if(this.parent[H.type])ft=this.parent[H.type](H.sourceMapId,bt,Ke);else if(this.parent.getWorkerSource){var Et=H.type.split("."),Wt=this.parent.getWorkerSource(H.sourceMapId,Et[0],bt.source);ft=Wt[Et[1]](bt,Ke)}else Ke(new Error("Could not find function "+H.type));!Ae&&ft&&ft.cancel&&(this.cancelCallbacks[D]=ft.cancel)}},dv.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function F4(R,D,H){D=Math.pow(2,H)-D-1;var ne=l2(R*256,D*256,H),de=l2((R+1)*256,(D+1)*256,H);return ne[0]+","+ne[1]+","+de[0]+","+de[1]}function l2(R,D,H){var ne=2*Math.PI*6378137/256/Math.pow(2,H),de=R*ne-2*Math.PI*6378137/2,Ae=D*ne-2*Math.PI*6378137/2;return[de,Ae]}var io=function(D,H){D&&(H?this.setSouthWest(D).setNorthEast(H):D.length===4?this.setSouthWest([D[0],D[1]]).setNorthEast([D[2],D[3]]):this.setSouthWest(D[0]).setNorthEast(D[1]))};io.prototype.setNorthEast=function(D){return this._ne=D instanceof Ii?new Ii(D.lng,D.lat):Ii.convert(D),this},io.prototype.setSouthWest=function(D){return this._sw=D instanceof Ii?new Ii(D.lng,D.lat):Ii.convert(D),this},io.prototype.extend=function(D){var H=this._sw,ne=this._ne,de,Ae;if(D instanceof Ii)de=D,Ae=D;else if(D instanceof io){if(de=D._sw,Ae=D._ne,!de||!Ae)return this}else{if(Array.isArray(D))if(D.length===4||D.every(Array.isArray)){var Re=D;return this.extend(io.convert(Re))}else{var Ke=D;return this.extend(Ii.convert(Ke))}return this}return!H&&!ne?(this._sw=new Ii(de.lng,de.lat),this._ne=new Ii(Ae.lng,Ae.lat)):(H.lng=Math.min(de.lng,H.lng),H.lat=Math.min(de.lat,H.lat),ne.lng=Math.max(Ae.lng,ne.lng),ne.lat=Math.max(Ae.lat,ne.lat)),this},io.prototype.getCenter=function(){return new Ii((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},io.prototype.getSouthWest=function(){return this._sw},io.prototype.getNorthEast=function(){return this._ne},io.prototype.getNorthWest=function(){return new Ii(this.getWest(),this.getNorth())},io.prototype.getSouthEast=function(){return new Ii(this.getEast(),this.getSouth())},io.prototype.getWest=function(){return this._sw.lng},io.prototype.getSouth=function(){return this._sw.lat},io.prototype.getEast=function(){return this._ne.lng},io.prototype.getNorth=function(){return this._ne.lat},io.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},io.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},io.prototype.isEmpty=function(){return!(this._sw&&this._ne)},io.prototype.contains=function(D){var H=Ii.convert(D),ne=H.lng,de=H.lat,Ae=this._sw.lat<=de&&de<=this._ne.lat,Re=this._sw.lng<=ne&&ne<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Re=this._sw.lng>=ne&&ne>=this._ne.lng),Ae&&Re},io.convert=function(D){return!D||D instanceof io?D:new io(D)};var u2=63710088e-1,Ii=function(D,H){if(isNaN(D)||isNaN(H))throw new Error("Invalid LngLat object: ("+D+", "+H+")");if(this.lng=+D,this.lat=+H,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Ii.prototype.wrap=function(){return new Ii(g(this.lng,-180,180),this.lat)},Ii.prototype.toArray=function(){return[this.lng,this.lat]},Ii.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Ii.prototype.distanceTo=function(D){var H=Math.PI/180,ne=this.lat*H,de=D.lat*H,Ae=Math.sin(ne)*Math.sin(de)+Math.cos(ne)*Math.cos(de)*Math.cos((D.lng-this.lng)*H),Re=u2*Math.acos(Math.min(Ae,1));return Re},Ii.prototype.toBounds=function(D){D===void 0&&(D=0);var H=40075017,ne=360*D/H,de=ne/Math.cos(Math.PI/180*this.lat);return new io(new Ii(this.lng-de,this.lat-ne),new Ii(this.lng+de,this.lat+ne))},Ii.convert=function(D){if(D instanceof Ii)return D;if(Array.isArray(D)&&(D.length===2||D.length===3))return new Ii(Number(D[0]),Number(D[1]));if(!Array.isArray(D)&&typeof D=="object"&&D!==null)return new Ii(Number("lng"in D?D.lng:D.lon),Number(D.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var f2=2*Math.PI*u2;function c2(R){return f2*Math.cos(R*Math.PI/180)}function h2(R){return(180+R)/360}function v2(R){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R*Math.PI/360)))/360}function d2(R,D){return R/c2(D)}function _4(R){return R*360-180}function oy(R){var D=180-R*360;return 360/Math.PI*Math.atan(Math.exp(D*Math.PI/180))-90}function z4(R,D){return R*c2(oy(D))}function O4(R){return 1/Math.cos(R*Math.PI/180)}var Lh=function(D,H,ne){ne===void 0&&(ne=0),this.x=+D,this.y=+H,this.z=+ne};Lh.fromLngLat=function(D,H){H===void 0&&(H=0);var ne=Ii.convert(D);return new Lh(h2(ne.lng),v2(ne.lat),d2(H,ne.lat))},Lh.prototype.toLngLat=function(){return new Ii(_4(this.x),oy(this.y))},Lh.prototype.toAltitude=function(){return z4(this.z,this.y)},Lh.prototype.meterInMercatorCoordinateUnits=function(){return 1/f2*O4(oy(this.y))};var Ph=function(D,H,ne){this.z=D,this.x=H,this.y=ne,this.key=wd(0,D,D,H,ne)};Ph.prototype.equals=function(D){return this.z===D.z&&this.x===D.x&&this.y===D.y},Ph.prototype.url=function(D,H){var ne=F4(this.x,this.y,this.z),de=N4(this.z,this.x,this.y);return D[(this.x+this.y)%D.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String(H==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",de).replace("{bbox-epsg-3857}",ne)},Ph.prototype.getTilePoint=function(D){var H=Math.pow(2,this.z);return new t((D.x*H-this.x)*La,(D.y*H-this.y)*La)},Ph.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var p2=function(D,H){this.wrap=D,this.canonical=H,this.key=wd(D,H.z,H.z,H.x,H.y)},oo=function(D,H,ne,de,Ae){this.overscaledZ=D,this.wrap=H,this.canonical=new Ph(ne,+de,+Ae),this.key=wd(H,D,ne,de,Ae)};oo.prototype.equals=function(D){return this.overscaledZ===D.overscaledZ&&this.wrap===D.wrap&&this.canonical.equals(D.canonical)},oo.prototype.scaledTo=function(D){var H=this.canonical.z-D;return D>this.canonical.z?new oo(D,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new oo(D,this.wrap,D,this.canonical.x>>H,this.canonical.y>>H)},oo.prototype.calculateScaledKey=function(D,H){var ne=this.canonical.z-D;return D>this.canonical.z?wd(this.wrap*+H,D,this.canonical.z,this.canonical.x,this.canonical.y):wd(this.wrap*+H,D,D,this.canonical.x>>ne,this.canonical.y>>ne)},oo.prototype.isChildOf=function(D){if(D.wrap!==this.wrap)return!1;var H=this.canonical.z-D.canonical.z;return D.overscaledZ===0||D.overscaledZ>H&&D.canonical.y===this.canonical.y>>H},oo.prototype.children=function(D){if(this.overscaledZ>=D)return[new oo(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var H=this.canonical.z+1,ne=this.canonical.x*2,de=this.canonical.y*2;return[new oo(H,this.wrap,H,ne,de),new oo(H,this.wrap,H,ne+1,de),new oo(H,this.wrap,H,ne,de+1),new oo(H,this.wrap,H,ne+1,de+1)]},oo.prototype.isLessThan=function(D){return this.wrapD.wrap?!1:this.overscaledZD.overscaledZ?!1:this.canonical.xD.canonical.x?!1:this.canonical.y0;Ae--)de=1<=this.dim+1||H<-1||H>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(H+1)*this.stride+(D+1)},Nf.prototype._unpackMapbox=function(D,H,ne){return(D*256*256+H*256+ne)/10-1e4},Nf.prototype._unpackTerrarium=function(D,H,ne){return D*256+H+ne/256-32768},Nf.prototype.getPixels=function(){return new ws({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Nf.prototype.backfillBorder=function(D,H,ne){if(this.dim!==D.dim)throw new Error("dem dimension mismatch");var de=H*this.dim,Ae=H*this.dim+this.dim,Re=ne*this.dim,Ke=ne*this.dim+this.dim;switch(H){case-1:de=Ae-1;break;case 1:Ae=de+1;break}switch(ne){case-1:Re=Ke-1;break;case 1:Ke=Re+1;break}for(var ft=-H*this.dim,bt=-ne*this.dim,Et=Re;Et=0&&Wt[3]>=0&&ft.insert(Ke,Wt[0],Wt[1],Wt[2],Wt[3])}},Bf.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new nv.VectorTile(new Op(this.rawTileData)).layers,this.sourceLayerCoder=new Xp(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Bf.prototype.query=function(D,H,ne,de){var Ae=this;this.loadVTLayers();for(var Re=D.params||{},Ke=La/D.tileSize/D.scale,ft=yu(Re.filter),bt=D.queryGeometry,Et=D.queryPadding*Ke,Wt=y2(bt),sr=this.grid.query(Wt.minX-Et,Wt.minY-Et,Wt.maxX+Et,Wt.maxY+Et),qt=y2(D.cameraQueryGeometry),mr=this.grid3D.query(qt.minX-Et,qt.minY-Et,qt.maxX+Et,qt.maxY+Et,function(Vn,Qn,Jn,Sa){return nf(D.cameraQueryGeometry,Vn-Et,Qn-Et,Jn+Et,Sa+Et)}),Br=0,rn=mr;Brde)Ae=!1;else if(!H)Ae=!0;else if(this.expirationTime=dr.maxzoom)&&dr.visibility!=="none"){n(fr,this.zoom,Tt);var pr=Qt[dr.id]=dr.createBucket({index:$t.bucketLayerIDs.length,layers:fr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Dt,sourceID:this.source});pr.populate(Ft,or,this.tileID.canonical),$t.bucketLayerIDs.push(fr.map(function(xr){return xr.id}))}}}}var vr,Hr,Ir,kr,pn=i.mapObject(or.glyphDependencies,function(xr){return Object.keys(xr).map(Number)});Object.keys(pn).length?Ct.send("getGlyphs",{uid:this.uid,stacks:pn},function(xr,Ar){vr||(vr=xr,Hr=Ar,Dn.call(_t))}):Hr={};var jr=Object.keys(or.iconDependencies);jr.length?Ct.send("getImages",{icons:jr,source:this.source,tileID:this.tileID,type:"icons"},function(xr,Ar){vr||(vr=xr,Ir=Ar,Dn.call(_t))}):Ir={};var In=Object.keys(or.patternDependencies);In.length?Ct.send("getImages",{icons:In,source:this.source,tileID:this.tileID,type:"patterns"},function(xr,Ar){vr||(vr=xr,kr=Ar,Dn.call(_t))}):kr={},Dn.call(this);function Dn(){if(vr)return St(vr);if(Hr&&Ir&&kr){var xr=new r(Hr),Ar=new i.ImageAtlas(Ir,kr);for(var Or in Qt){var Nr=Qt[Or];Nr instanceof i.SymbolBucket?(n(Nr.layers,this.zoom,Tt),i.performSymbolLayout(Nr,Hr,xr.positions,Ir,Ar.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):Nr.hasPattern&&(Nr instanceof i.LineBucket||Nr instanceof i.FillBucket||Nr instanceof i.FillExtrusionBucket)&&(n(Nr.layers,this.zoom,Tt),Nr.addFeatures(or,this.tileID.canonical,Ar.patternPositions))}this.status="done",St(null,{buckets:i.values(Qt).filter(function(qr){return!qr.isEmpty()}),featureIndex:$t,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:xr.image,imageAtlas:Ar,glyphMap:this.returnDependencies?Hr:null,iconMap:this.returnDependencies?Ir:null,glyphPositions:this.returnDependencies?xr.positions:null})}}};function n(ut,lt,xt){for(var Tt=new i.EvaluationParameters(lt),Ct=0,St=ut;Ct=0!=!!lt&&ut.reverse()}var d=i.vectorTile.VectorTileFeature.prototype.toGeoJSON,M=function(lt){this._feature=lt,this.extent=i.EXTENT,this.type=lt.type,this.properties=lt.tags,"id"in lt&&!isNaN(lt.id)&&(this.id=parseInt(lt.id,10))};M.prototype.loadGeometry=function(){if(this._feature.type===1){for(var lt=[],xt=0,Tt=this._feature.geometry;xt"u"&&(Tt.push(Ht),$t=Tt.length-1,St[Ht]=$t),lt.writeVarint($t);var Qt=xt.properties[Ht],or=typeof Qt;or!=="string"&&or!=="boolean"&&or!=="number"&&(Qt=JSON.stringify(Qt));var Er=or+":"+Qt,Ye=_t[Er];typeof Ye>"u"&&(Ct.push(Qt),Ye=Ct.length-1,_t[Er]=Ye),lt.writeVarint(Ye)}}function U(ut,lt){return(lt<<3)+(ut&7)}function Y(ut){return ut<<1^ut>>31}function J(ut,lt){for(var xt=ut.loadGeometry(),Tt=ut.type,Ct=0,St=0,_t=xt.length,Ht=0;Ht<_t;Ht++){var $t=xt[Ht],Qt=1;Tt===1&&(Qt=$t.length),lt.writeVarint(U(1,Qt));for(var or=Tt===3?$t.length-1:$t.length,Er=0;Er>1;ce(ut,lt,_t,Tt,Ct,St%2),ae(ut,lt,xt,Tt,_t-1,St+1),ae(ut,lt,xt,_t+1,Ct,St+1)}}function ce(ut,lt,xt,Tt,Ct,St){for(;Ct>Tt;){if(Ct-Tt>600){var _t=Ct-Tt+1,Ht=xt-Tt+1,$t=Math.log(_t),Qt=.5*Math.exp(2*$t/3),or=.5*Math.sqrt($t*Qt*(_t-Qt)/_t)*(Ht-_t/2<0?-1:1),Er=Math.max(Tt,Math.floor(xt-Ht*Qt/_t+or)),Ye=Math.min(Ct,Math.floor(xt+(_t-Ht)*Qt/_t+or));ce(ut,lt,xt,Er,Ye,St)}var We=lt[2*xt+St],Dt=Tt,Ft=Ct;for(Q(ut,lt,Tt,xt),lt[2*Ct+St]>We&&Q(ut,lt,Tt,Ct);DtWe;)Ft--}lt[2*Tt+St]===We?Q(ut,lt,Tt,Ft):(Ft++,Q(ut,lt,Ft,Ct)),Ft<=xt&&(Tt=Ft+1),xt<=Ft&&(Ct=Ft-1)}}function Q(ut,lt,xt,Tt){Z(ut,xt,Tt),Z(lt,2*xt,2*Tt),Z(lt,2*xt+1,2*Tt+1)}function Z(ut,lt,xt){var Tt=ut[lt];ut[lt]=ut[xt],ut[xt]=Tt}function j(ut,lt,xt,Tt,Ct,St,_t){for(var Ht=[0,ut.length-1,0],$t=[],Qt,or;Ht.length;){var Er=Ht.pop(),Ye=Ht.pop(),We=Ht.pop();if(Ye-We<=_t){for(var Dt=We;Dt<=Ye;Dt++)Qt=lt[2*Dt],or=lt[2*Dt+1],Qt>=xt&&Qt<=Ct&&or>=Tt&&or<=St&&$t.push(ut[Dt]);continue}var Ft=Math.floor((We+Ye)/2);Qt=lt[2*Ft],or=lt[2*Ft+1],Qt>=xt&&Qt<=Ct&&or>=Tt&&or<=St&&$t.push(ut[Ft]);var Zt=(Er+1)%2;(Er===0?xt<=Qt:Tt<=or)&&(Ht.push(We),Ht.push(Ft-1),Ht.push(Zt)),(Er===0?Ct>=Qt:St>=or)&&(Ht.push(Ft+1),Ht.push(Ye),Ht.push(Zt))}return $t}function K(ut,lt,xt,Tt,Ct,St){for(var _t=[0,ut.length-1,0],Ht=[],$t=Ct*Ct;_t.length;){var Qt=_t.pop(),or=_t.pop(),Er=_t.pop();if(or-Er<=St){for(var Ye=Er;Ye<=or;Ye++)ee(lt[2*Ye],lt[2*Ye+1],xt,Tt)<=$t&&Ht.push(ut[Ye]);continue}var We=Math.floor((Er+or)/2),Dt=lt[2*We],Ft=lt[2*We+1];ee(Dt,Ft,xt,Tt)<=$t&&Ht.push(ut[We]);var Zt=(Qt+1)%2;(Qt===0?xt-Ct<=Dt:Tt-Ct<=Ft)&&(_t.push(Er),_t.push(We-1),_t.push(Zt)),(Qt===0?xt+Ct>=Dt:Tt+Ct>=Ft)&&(_t.push(We+1),_t.push(or),_t.push(Zt))}return Ht}function ee(ut,lt,xt,Tt){var Ct=ut-xt,St=lt-Tt;return Ct*Ct+St*St}var oe=function(ut){return ut[0]},q=function(ut){return ut[1]},$=function(lt,xt,Tt,Ct,St){xt===void 0&&(xt=oe),Tt===void 0&&(Tt=q),Ct===void 0&&(Ct=64),St===void 0&&(St=Float64Array),this.nodeSize=Ct,this.points=lt;for(var _t=lt.length<65536?Uint16Array:Uint32Array,Ht=this.ids=new _t(lt.length),$t=this.coords=new St(lt.length*2),Qt=0;Qt=Ct;or--){var Er=+Date.now();$t=this._cluster($t,or),this.trees[or]=new $($t,Ue,He,_t,Float32Array),Tt&&console.log("z%d: %d clusters in %dms",or,$t.length,+Date.now()-Er)}return Tt&&console.timeEnd("total time"),this},ie.prototype.getClusters=function(lt,xt){var Tt=((lt[0]+180)%360+360)%360-180,Ct=Math.max(-90,Math.min(90,lt[1])),St=lt[2]===180?180:((lt[2]+180)%360+360)%360-180,_t=Math.max(-90,Math.min(90,lt[3]));if(lt[2]-lt[0]>=360)Tt=-180,St=180;else if(Tt>St){var Ht=this.getClusters([Tt,Ct,180,_t],xt),$t=this.getClusters([-180,Ct,St,_t],xt);return Ht.concat($t)}for(var Qt=this.trees[this._limitZoom(xt)],or=Qt.range(Oe(Tt),Ne(_t),Oe(St),Ne(Ct)),Er=[],Ye=0,We=or;Ye1?this._map(or,!0):null,nr=(Qt<<5)+(xt+1)+this.points.length,lr=0,rr=Ye;lr>5},ie.prototype._getOriginZoom=function(lt){return(lt-this.points.length)%32},ie.prototype._map=function(lt,xt){if(lt.numPoints)return xt?Se({},lt.properties):lt.properties;var Tt=this.points[lt.index].properties,Ct=this.options.map(Tt);return xt&&Ct===Tt?Se({},Ct):Ct};function he(ut,lt,xt,Tt,Ct){return{x:ut,y:lt,zoom:1/0,id:xt,parentId:-1,numPoints:Tt,properties:Ct}}function me(ut,lt){var xt=ut.geometry.coordinates,Tt=xt[0],Ct=xt[1];return{x:Oe(Tt),y:Ne(Ct),zoom:1/0,index:lt,parentId:-1}}function Me(ut){return{type:"Feature",id:ut.id,properties:Te(ut),geometry:{type:"Point",coordinates:[Ee(ut.x),xe(ut.y)]}}}function Te(ut){var lt=ut.numPoints,xt=lt>=1e4?Math.round(lt/1e3)+"k":lt>=1e3?Math.round(lt/100)/10+"k":lt;return Se(Se({},ut.properties),{cluster:!0,cluster_id:ut.id,point_count:lt,point_count_abbreviated:xt})}function Oe(ut){return ut/360+.5}function Ne(ut){var lt=Math.sin(ut*Math.PI/180),xt=.5-.25*Math.log((1+lt)/(1-lt))/Math.PI;return xt<0?0:xt>1?1:xt}function Ee(ut){return(ut-.5)*360}function xe(ut){var lt=(180-ut*360)*Math.PI/180;return 360*Math.atan(Math.exp(lt))/Math.PI-90}function Se(ut,lt){for(var xt in lt)ut[xt]=lt[xt];return ut}function Ue(ut){return ut.x}function He(ut){return ut.y}function Fe(ut,lt,xt,Tt){for(var Ct=Tt,St=xt-lt>>1,_t=xt-lt,Ht,$t=ut[lt],Qt=ut[lt+1],or=ut[xt],Er=ut[xt+1],Ye=lt+3;YeCt)Ht=Ye,Ct=We;else if(We===Ct){var Dt=Math.abs(Ye-St);Dt<_t&&(Ht=Ye,_t=Dt)}}Ct>Tt&&(Ht-lt>3&&Fe(ut,lt,Ht,Tt),ut[Ht+2]=Ct,xt-Ht>3&&Fe(ut,Ht,xt,Tt))}function Ge(ut,lt,xt,Tt,Ct,St){var _t=Ct-xt,Ht=St-Tt;if(_t!==0||Ht!==0){var $t=((ut-xt)*_t+(lt-Tt)*Ht)/(_t*_t+Ht*Ht);$t>1?(xt=Ct,Tt=St):$t>0&&(xt+=_t*$t,Tt+=Ht*$t)}return _t=ut-xt,Ht=lt-Tt,_t*_t+Ht*Ht}function nt(ut,lt,xt,Tt){var Ct={id:typeof ut>"u"?null:ut,type:lt,geometry:xt,tags:Tt,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return qe(Ct),Ct}function qe(ut){var lt=ut.geometry,xt=ut.type;if(xt==="Point"||xt==="MultiPoint"||xt==="LineString")$e(ut,lt);else if(xt==="Polygon"||xt==="MultiLineString")for(var Tt=0;Tt0&&(Tt?_t+=(Ct*Qt-$t*St)/2:_t+=Math.sqrt(Math.pow($t-Ct,2)+Math.pow(Qt-St,2))),Ct=$t,St=Qt}var or=lt.length-3;lt[2]=1,Fe(lt,0,or,xt),lt[or+2]=1,lt.size=Math.abs(_t),lt.start=0,lt.end=lt.size}function At(ut,lt,xt,Tt){for(var Ct=0;Ct1?1:xt}function Je(ut,lt,xt,Tt,Ct,St,_t,Ht){if(xt/=lt,Tt/=lt,St>=xt&&_t=Tt)return null;for(var $t=[],Qt=0;Qt=xt&&Dt=Tt)continue;var Ft=[];if(Ye==="Point"||Ye==="MultiPoint")De(Er,Ft,xt,Tt,Ct);else if(Ye==="LineString")Ie(Er,Ft,xt,Tt,Ct,!1,Ht.lineMetrics);else if(Ye==="MultiLineString")Pe(Er,Ft,xt,Tt,Ct,!1);else if(Ye==="Polygon")Pe(Er,Ft,xt,Tt,Ct,!0);else if(Ye==="MultiPolygon")for(var Zt=0;Zt=xt&&_t<=Tt&&(lt.push(ut[St]),lt.push(ut[St+1]),lt.push(ut[St+2]))}}function Ie(ut,lt,xt,Tt,Ct,St,_t){for(var Ht=ze(ut),$t=Ct===0?se:ye,Qt=ut.start,or,Er,Ye=0;Yext&&(Er=$t(Ht,We,Dt,Zt,nr,xt),_t&&(Ht.start=Qt+or*Er)):lr>Tt?rr=xt&&(Er=$t(Ht,We,Dt,Zt,nr,xt),zt=!0),rr>Tt&&lr<=Tt&&(Er=$t(Ht,We,Dt,Zt,nr,Tt),zt=!0),!St&&zt&&(_t&&(Ht.end=Qt+or*Er),lt.push(Ht),Ht=ze(ut)),_t&&(Qt+=or)}var fr=ut.length-3;We=ut[fr],Dt=ut[fr+1],Ft=ut[fr+2],lr=Ct===0?We:Dt,lr>=xt&&lr<=Tt&&be(Ht,We,Dt,Ft),fr=Ht.length-3,St&&fr>=3&&(Ht[fr]!==Ht[0]||Ht[fr+1]!==Ht[1])&&be(Ht,Ht[0],Ht[1],Ht[2]),Ht.length&<.push(Ht)}function ze(ut){var lt=[];return lt.size=ut.size,lt.start=ut.start,lt.end=ut.end,lt}function Pe(ut,lt,xt,Tt,Ct,St){for(var _t=0;_t_t.maxX&&(_t.maxX=or),Er>_t.maxY&&(_t.maxY=Er)}return _t}function Bt(ut,lt,xt,Tt){var Ct=lt.geometry,St=lt.type,_t=[];if(St==="Point"||St==="MultiPoint")for(var Ht=0;Ht0&<.size<(Ct?_t:Tt)){xt.numPoints+=lt.length/3;return}for(var Ht=[],$t=0;$t_t)&&(xt.numSimplified++,Ht.push(lt[$t]),Ht.push(lt[$t+1])),xt.numPoints++;Ct&&Lt(Ht,St),ut.push(Ht)}function Lt(ut,lt){for(var xt=0,Tt=0,Ct=ut.length,St=Ct-2;Tt0===lt)for(Tt=0,Ct=ut.length;Tt24)throw new Error("maxZoom should be in the 0-24 range");if(lt.promoteId&<.generateId)throw new Error("promoteId and generateId cannot be used together.");var Tt=et(ut,lt);this.tiles={},this.tileCoords=[],xt&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",lt.indexMaxZoom,lt.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),Tt=Le(Tt,lt),Tt.length&&this.splitTile(Tt,0,0,0),xt&&(Tt.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}ir.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},ir.prototype.splitTile=function(ut,lt,xt,Tt,Ct,St,_t){for(var Ht=[ut,lt,xt,Tt],$t=this.options,Qt=$t.debug;Ht.length;){Tt=Ht.pop(),xt=Ht.pop(),lt=Ht.pop(),ut=Ht.pop();var or=1<1&&console.time("creation"),Ye=this.tiles[Er]=It(ut,lt,xt,Tt,$t),this.tileCoords.push({z:lt,x:xt,y:Tt}),Qt)){Qt>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",lt,xt,Tt,Ye.numFeatures,Ye.numPoints,Ye.numSimplified),console.timeEnd("creation"));var We="z"+lt;this.stats[We]=(this.stats[We]||0)+1,this.total++}if(Ye.source=ut,Ct){if(lt===$t.maxZoom||lt===Ct)continue;var Dt=1<1&&console.time("clipping");var Ft=.5*$t.buffer/$t.extent,Zt=.5-Ft,nr=.5+Ft,lr=1+Ft,rr,zt,fr,dr,pr,vr;rr=zt=fr=dr=null,pr=Je(ut,or,xt-Ft,xt+nr,0,Ye.minX,Ye.maxX,$t),vr=Je(ut,or,xt+Zt,xt+lr,0,Ye.minX,Ye.maxX,$t),ut=null,pr&&(rr=Je(pr,or,Tt-Ft,Tt+nr,1,Ye.minY,Ye.maxY,$t),zt=Je(pr,or,Tt+Zt,Tt+lr,1,Ye.minY,Ye.maxY,$t),pr=null),vr&&(fr=Je(vr,or,Tt-Ft,Tt+nr,1,Ye.minY,Ye.maxY,$t),dr=Je(vr,or,Tt+Zt,Tt+lr,1,Ye.minY,Ye.maxY,$t),vr=null),Qt>1&&console.timeEnd("clipping"),Ht.push(rr||[],lt+1,xt*2,Tt*2),Ht.push(zt||[],lt+1,xt*2,Tt*2+1),Ht.push(fr||[],lt+1,xt*2+1,Tt*2),Ht.push(dr||[],lt+1,xt*2+1,Tt*2+1)}}},ir.prototype.getTile=function(ut,lt,xt){var Tt=this.options,Ct=Tt.extent,St=Tt.debug;if(ut<0||ut>24)return null;var _t=1<1&&console.log("drilling down to z%d-%d-%d",ut,lt,xt);for(var $t=ut,Qt=lt,or=xt,Er;!Er&&$t>0;)$t--,Qt=Math.floor(Qt/2),or=Math.floor(or/2),Er=this.tiles[_r($t,Qt,or)];return!Er||!Er.source?null:(St>1&&console.log("found parent tile z%d-%d-%d",$t,Qt,or),St>1&&console.time("drilling down"),this.splitTile(Er.source,$t,Qt,or,ut,lt,xt),St>1&&console.timeEnd("drilling down"),this.tiles[Ht]?at(this.tiles[Ht],Ct):null)};function _r(ut,lt,xt){return((1<=0?0:ve.button},A.remove=function(ve){ve.parentNode&&ve.parentNode.removeChild(ve)};function u(ve,X,pe){var re,ge,_e,Ze=i.browser.devicePixelRatio>1?"@2x":"",st=i.getJSON(X.transformRequest(X.normalizeSpriteURL(ve,Ze,".json"),i.ResourceType.SpriteJSON),function(Jt,ur){st=null,_e||(_e=Jt,re=ur,Nt())}),mt=i.getImage(X.transformRequest(X.normalizeSpriteURL(ve,Ze,".png"),i.ResourceType.SpriteImage),function(Jt,ur){mt=null,_e||(_e=Jt,ge=ur,Nt())});function Nt(){if(_e)pe(_e);else if(re&&ge){var Jt=i.browser.getImageData(ge),ur={};for(var yr in re){var Fr=re[yr],Gr=Fr.width,Wr=Fr.height,Vr=Fr.x,Qr=Fr.y,sn=Fr.sdf,Sn=Fr.pixelRatio,zn=Fr.stretchX,Yn=Fr.stretchY,Xn=Fr.content,Zn=new i.RGBAImage({width:Gr,height:Wr});i.RGBAImage.copy(Jt,Zn,{x:Vr,y:Qr},{x:0,y:0},{width:Gr,height:Wr}),ur[yr]={data:Zn,pixelRatio:Sn,sdf:sn,stretchX:zn,stretchY:Yn,content:Xn}}pe(null,ur)}}return{cancel:function(){st&&(st.cancel(),st=null),mt&&(mt.cancel(),mt=null)}}}function g(ve){var X=ve.userImage;if(X&&X.render){var pe=X.render();if(pe)return ve.data.replace(new Uint8Array(X.data.buffer)),!0}return!1}var f=1,w=function(ve){function X(){ve.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new i.RGBAImage({width:1,height:1}),this.dirty=!0}return ve&&(X.__proto__=ve),X.prototype=Object.create(ve&&ve.prototype),X.prototype.constructor=X,X.prototype.isLoaded=function(){return this.loaded},X.prototype.setLoaded=function(re){if(this.loaded!==re&&(this.loaded=re,re)){for(var ge=0,_e=this.requestors;ge<_e.length;ge+=1){var Ze=_e[ge],st=Ze.ids,mt=Ze.callback;this._notify(st,mt)}this.requestors=[]}},X.prototype.getImage=function(re){return this.images[re]},X.prototype.addImage=function(re,ge){this._validate(re,ge)&&(this.images[re]=ge)},X.prototype._validate=function(re,ge){var _e=!0;return this._validateStretch(ge.stretchX,ge.data&&ge.data.width)||(this.fire(new i.ErrorEvent(new Error('Image "'+re+'" has invalid "stretchX" value'))),_e=!1),this._validateStretch(ge.stretchY,ge.data&&ge.data.height)||(this.fire(new i.ErrorEvent(new Error('Image "'+re+'" has invalid "stretchY" value'))),_e=!1),this._validateContent(ge.content,ge)||(this.fire(new i.ErrorEvent(new Error('Image "'+re+'" has invalid "content" value'))),_e=!1),_e},X.prototype._validateStretch=function(re,ge){if(!re)return!0;for(var _e=0,Ze=0,st=re;Ze=0?1.2:1))}T.prototype.draw=function(ve){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(ve,this.buffer,this.middle);for(var X=this.ctx.getImageData(0,0,this.size,this.size),pe=new Uint8ClampedArray(this.size*this.size),re=0;re65535){Jt(new Error("glyphs > 65535 not supported"));return}if(Fr.ranges[Wr]){Jt(null,{stack:ur,id:yr,glyph:Gr});return}var Vr=Fr.requests[Wr];Vr||(Vr=Fr.requests[Wr]=[],S.loadGlyphRange(ur,Wr,re.url,re.requestManager,function(Qr,sn){if(sn){for(var Sn in sn)re._doesCharSupportLocalGlyph(+Sn)||(Fr.glyphs[+Sn]=sn[+Sn]);Fr.ranges[Wr]=!0}for(var zn=0,Yn=Vr;zn1&&(Nt=X[++mt]);var ur=Math.abs(Jt-Nt.left),yr=Math.abs(Jt-Nt.right),Fr=Math.min(ur,yr),Gr=void 0,Wr=_e/re*(ge+1);if(Nt.isDash){var Vr=ge-Math.abs(Wr);Gr=Math.sqrt(Fr*Fr+Vr*Vr)}else Gr=ge-Math.sqrt(Fr*Fr+Wr*Wr);this.data[st+Jt]=Math.max(0,Math.min(255,Gr+128))}},z.prototype.addRegularDash=function(X){for(var pe=X.length-1;pe>=0;--pe){var re=X[pe],ge=X[pe+1];re.zeroLength?X.splice(pe,1):ge&&ge.isDash===re.isDash&&(ge.left=re.left,X.splice(pe,1))}var _e=X[0],Ze=X[X.length-1];_e.isDash===Ze.isDash&&(_e.left=Ze.left-this.width,Ze.right=_e.right+this.width);for(var st=this.width*this.nextRow,mt=0,Nt=X[mt],Jt=0;Jt1&&(Nt=X[++mt]);var ur=Math.abs(Jt-Nt.left),yr=Math.abs(Jt-Nt.right),Fr=Math.min(ur,yr),Gr=Nt.isDash?Fr:-Fr;this.data[st+Jt]=Math.max(0,Math.min(255,Gr+128))}},z.prototype.addDash=function(X,pe){var re=pe?7:0,ge=2*re+1;if(this.nextRow+ge>this.height)return i.warnOnce("LineAtlas out of space"),null;for(var _e=0,Ze=0;Ze=re.minX&&X.x=re.minY&&X.y0&&(Jt[new i.OverscaledTileID(re.overscaledZ,st,ge.z,Ze,ge.y-1).key]={backfilled:!1},Jt[new i.OverscaledTileID(re.overscaledZ,re.wrap,ge.z,ge.x,ge.y-1).key]={backfilled:!1},Jt[new i.OverscaledTileID(re.overscaledZ,Nt,ge.z,mt,ge.y-1).key]={backfilled:!1}),ge.y+1<_e&&(Jt[new i.OverscaledTileID(re.overscaledZ,st,ge.z,Ze,ge.y+1).key]={backfilled:!1},Jt[new i.OverscaledTileID(re.overscaledZ,re.wrap,ge.z,ge.x,ge.y+1).key]={backfilled:!1},Jt[new i.OverscaledTileID(re.overscaledZ,Nt,ge.z,mt,ge.y+1).key]={backfilled:!1}),Jt},X.prototype.unloadTile=function(re){re.demTexture&&this.map.painter.saveTileTexture(re.demTexture),re.fbo&&(re.fbo.destroy(),delete re.fbo),re.dem&&delete re.dem,delete re.neighboringTiles,re.state="unloaded",re.actor&&re.actor.send("removeDEMTile",{uid:re.uid,source:this.id})},X}(N),U=function(ve){function X(pe,re,ge,_e){ve.call(this),this.id=pe,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=ge.getActor(),this.setEventedParent(_e),this._data=re.data,this._options=i.extend({},re),this._collectResourceTiming=re.collectResourceTiming,this._resourceTiming=[],re.maxzoom!==void 0&&(this.maxzoom=re.maxzoom),re.type&&(this.type=re.type),re.attribution&&(this.attribution=re.attribution),this.promoteId=re.promoteId;var Ze=i.EXTENT/this.tileSize;this.workerOptions=i.extend({source:this.id,cluster:re.cluster||!1,geojsonVtOptions:{buffer:(re.buffer!==void 0?re.buffer:128)*Ze,tolerance:(re.tolerance!==void 0?re.tolerance:.375)*Ze,extent:i.EXTENT,maxZoom:this.maxzoom,lineMetrics:re.lineMetrics||!1,generateId:re.generateId||!1},superclusterOptions:{maxZoom:re.clusterMaxZoom!==void 0?Math.min(re.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,extent:i.EXTENT,radius:(re.clusterRadius||50)*Ze,log:!1,generateId:re.generateId||!1},clusterProperties:re.clusterProperties},re.workerOptions)}return ve&&(X.__proto__=ve),X.prototype=Object.create(ve&&ve.prototype),X.prototype.constructor=X,X.prototype.load=function(){var re=this;this.fire(new i.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(ge){if(ge){re.fire(new i.ErrorEvent(ge));return}var _e={dataType:"source",sourceDataType:"metadata"};re._collectResourceTiming&&re._resourceTiming&&re._resourceTiming.length>0&&(_e.resourceTiming=re._resourceTiming,re._resourceTiming=[]),re.fire(new i.Event("data",_e))})},X.prototype.onAdd=function(re){this.map=re,this.load()},X.prototype.setData=function(re){var ge=this;return this._data=re,this.fire(new i.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(_e){if(_e){ge.fire(new i.ErrorEvent(_e));return}var Ze={dataType:"source",sourceDataType:"content"};ge._collectResourceTiming&&ge._resourceTiming&&ge._resourceTiming.length>0&&(Ze.resourceTiming=ge._resourceTiming,ge._resourceTiming=[]),ge.fire(new i.Event("data",Ze))}),this},X.prototype.getClusterExpansionZoom=function(re,ge){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:re,source:this.id},ge),this},X.prototype.getClusterChildren=function(re,ge){return this.actor.send("geojson.getClusterChildren",{clusterId:re,source:this.id},ge),this},X.prototype.getClusterLeaves=function(re,ge,_e,Ze){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:re,limit:ge,offset:_e},Ze),this},X.prototype._updateWorkerData=function(re){var ge=this;this._loaded=!1;var _e=i.extend({},this.workerOptions),Ze=this._data;typeof Ze=="string"?(_e.request=this.map._requestManager.transformRequest(i.browser.resolveURL(Ze),i.ResourceType.Source),_e.request.collectResourceTiming=this._collectResourceTiming):_e.data=JSON.stringify(Ze),this.actor.send(this.type+".loadData",_e,function(st,mt){ge._removed||mt&&mt.abandoned||(ge._loaded=!0,mt&&mt.resourceTiming&&mt.resourceTiming[ge.id]&&(ge._resourceTiming=mt.resourceTiming[ge.id].slice(0)),ge.actor.send(ge.type+".coalesce",{source:_e.source},null),re(st))})},X.prototype.loaded=function(){return this._loaded},X.prototype.loadTile=function(re,ge){var _e=this,Ze=re.actor?"reloadTile":"loadTile";re.actor=this.actor;var st={type:this.type,uid:re.uid,tileID:re.tileID,zoom:re.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:i.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};re.request=this.actor.send(Ze,st,function(mt,Nt){return delete re.request,re.unloadVectorData(),re.aborted?ge(null):mt?ge(mt):(re.loadVectorData(Nt,_e.map.painter,Ze==="reloadTile"),ge(null))})},X.prototype.abortTile=function(re){re.request&&(re.request.cancel(),delete re.request),re.aborted=!0},X.prototype.unloadTile=function(re){re.unloadVectorData(),this.actor.send("removeTile",{uid:re.uid,type:this.type,source:this.id})},X.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},X.prototype.serialize=function(){return i.extend({},this._options,{type:this.type,data:this._data})},X.prototype.hasTransition=function(){return!1},X}(i.Evented),Y=i.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),J=function(ve){function X(pe,re,ge,_e){ve.call(this),this.id=pe,this.dispatcher=ge,this.coordinates=re.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(_e),this.options=re}return ve&&(X.__proto__=ve),X.prototype=Object.create(ve&&ve.prototype),X.prototype.constructor=X,X.prototype.load=function(re,ge){var _e=this;this._loaded=!1,this.fire(new i.Event("dataloading",{dataType:"source"})),this.url=this.options.url,i.getImage(this.map._requestManager.transformRequest(this.url,i.ResourceType.Image),function(Ze,st){_e._loaded=!0,Ze?_e.fire(new i.ErrorEvent(Ze)):st&&(_e.image=st,re&&(_e.coordinates=re),ge&&ge(),_e._finishLoading())})},X.prototype.loaded=function(){return this._loaded},X.prototype.updateImage=function(re){var ge=this;return!this.image||!re.url?this:(this.options.url=re.url,this.load(re.coordinates,function(){ge.texture=null}),this)},X.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new i.Event("data",{dataType:"source",sourceDataType:"metadata"})))},X.prototype.onAdd=function(re){this.map=re,this.load()},X.prototype.setCoordinates=function(re){var ge=this;this.coordinates=re;var _e=re.map(i.MercatorCoordinate.fromLngLat);this.tileID=te(_e),this.minzoom=this.maxzoom=this.tileID.z;var Ze=_e.map(function(st){return ge.tileID.getTilePoint(st)._round()});return this._boundsArray=new i.StructArrayLayout4i8,this._boundsArray.emplaceBack(Ze[0].x,Ze[0].y,0,0),this._boundsArray.emplaceBack(Ze[1].x,Ze[1].y,i.EXTENT,0),this._boundsArray.emplaceBack(Ze[3].x,Ze[3].y,0,i.EXTENT),this._boundsArray.emplaceBack(Ze[2].x,Ze[2].y,i.EXTENT,i.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new i.Event("data",{dataType:"source",sourceDataType:"content"})),this},X.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var re=this.map.painter.context,ge=re.gl;this.boundsBuffer||(this.boundsBuffer=re.createVertexBuffer(this._boundsArray,Y.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new i.Texture(re,this.image,ge.RGBA),this.texture.bind(ge.LINEAR,ge.CLAMP_TO_EDGE));for(var _e in this.tiles){var Ze=this.tiles[_e];Ze.state!=="loaded"&&(Ze.state="loaded",Ze.texture=this.texture)}}},X.prototype.loadTile=function(re,ge){this.tileID&&this.tileID.equals(re.tileID.canonical)?(this.tiles[String(re.tileID.wrap)]=re,re.buckets={},ge(null)):(re.state="errored",ge(null))},X.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},X.prototype.hasTransition=function(){return!1},X}(i.Evented);function te(ve){for(var X=1/0,pe=1/0,re=-1/0,ge=-1/0,_e=0,Ze=ve;_ege.end(0)?this.fire(new i.ErrorEvent(new i.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+ge.start(0)+" and "+ge.end(0)+"-second mark."))):this.video.currentTime=re}},X.prototype.getVideo=function(){return this.video},X.prototype.onAdd=function(re){this.map||(this.map=re,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},X.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var re=this.map.painter.context,ge=re.gl;this.boundsBuffer||(this.boundsBuffer=re.createVertexBuffer(this._boundsArray,Y.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(ge.LINEAR,ge.CLAMP_TO_EDGE),ge.texSubImage2D(ge.TEXTURE_2D,0,0,0,ge.RGBA,ge.UNSIGNED_BYTE,this.video)):(this.texture=new i.Texture(re,this.video,ge.RGBA),this.texture.bind(ge.LINEAR,ge.CLAMP_TO_EDGE));for(var _e in this.tiles){var Ze=this.tiles[_e];Ze.state!=="loaded"&&(Ze.state="loaded",Ze.texture=this.texture)}}},X.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},X.prototype.hasTransition=function(){return this.video&&!this.video.paused},X}(J),ce=function(ve){function X(pe,re,ge,_e){ve.call(this,pe,re,ge,_e),re.coordinates?(!Array.isArray(re.coordinates)||re.coordinates.length!==4||re.coordinates.some(function(Ze){return!Array.isArray(Ze)||Ze.length!==2||Ze.some(function(st){return typeof st!="number"})}))&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+pe,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new i.ErrorEvent(new i.ValidationError("sources."+pe,null,'missing required property "coordinates"'))),re.animate&&typeof re.animate!="boolean"&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+pe,null,'optional "animate" property must be a boolean value'))),re.canvas?typeof re.canvas!="string"&&!(re.canvas instanceof i.window.HTMLCanvasElement)&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+pe,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new i.ErrorEvent(new i.ValidationError("sources."+pe,null,'missing required property "canvas"'))),this.options=re,this.animate=re.animate!==void 0?re.animate:!0}return ve&&(X.__proto__=ve),X.prototype=Object.create(ve&&ve.prototype),X.prototype.constructor=X,X.prototype.load=function(){if(this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof i.window.HTMLCanvasElement?this.options.canvas:i.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()){this.fire(new i.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero.")));return}this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading()},X.prototype.getCanvas=function(){return this.canvas},X.prototype.onAdd=function(re){this.map=re,this.load(),this.canvas&&this.animate&&this.play()},X.prototype.onRemove=function(){this.pause()},X.prototype.prepare=function(){var re=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,re=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,re=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var ge=this.map.painter.context,_e=ge.gl;this.boundsBuffer||(this.boundsBuffer=ge.createVertexBuffer(this._boundsArray,Y.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(re||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new i.Texture(ge,this.canvas,_e.RGBA,{premultiply:!0});for(var Ze in this.tiles){var st=this.tiles[Ze];st.state!=="loaded"&&(st.state="loaded",st.texture=this.texture)}}},X.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},X.prototype.hasTransition=function(){return this._playing},X.prototype._hasInvalidDimensions=function(){for(var re=0,ge=[this.canvas.width,this.canvas.height];rethis.max){var st=this._getAndRemoveByKey(this.order[0]);st&&this.onRemove(st)}return this},me.prototype.has=function(X){return X.wrapped().key in this.data},me.prototype.getAndRemove=function(X){return this.has(X)?this._getAndRemoveByKey(X.wrapped().key):null},me.prototype._getAndRemoveByKey=function(X){var pe=this.data[X].shift();return pe.timeout&&clearTimeout(pe.timeout),this.data[X].length===0&&delete this.data[X],this.order.splice(this.order.indexOf(X),1),pe.value},me.prototype.getByKey=function(X){var pe=this.data[X];return pe?pe[0].value:null},me.prototype.get=function(X){if(!this.has(X))return null;var pe=this.data[X.wrapped().key][0];return pe.value},me.prototype.remove=function(X,pe){if(!this.has(X))return this;var re=X.wrapped().key,ge=pe===void 0?0:this.data[re].indexOf(pe),_e=this.data[re][ge];return this.data[re].splice(ge,1),_e.timeout&&clearTimeout(_e.timeout),this.data[re].length===0&&delete this.data[re],this.onRemove(_e.value),this.order.splice(this.order.indexOf(re),1),this},me.prototype.setMaxSize=function(X){for(this.max=X;this.order.length>this.max;){var pe=this._getAndRemoveByKey(this.order[0]);pe&&this.onRemove(pe)}return this},me.prototype.filter=function(X){var pe=[];for(var re in this.data)for(var ge=0,_e=this.data[re];ge<_e.length;ge+=1){var Ze=_e[ge];X(Ze.value)||pe.push(Ze)}for(var st=0,mt=pe;st1||(Math.abs(ur)>1&&(Math.abs(ur+Fr)===1?ur+=Fr:Math.abs(ur-Fr)===1&&(ur-=Fr)),!(!Jt.dem||!Nt.dem)&&(Nt.dem.backfillBorder(Jt.dem,ur,yr),Nt.neighboringTiles&&Nt.neighboringTiles[Gr]&&(Nt.neighboringTiles[Gr].backfilled=!0)))}},X.prototype.getTile=function(re){return this.getTileByID(re.key)},X.prototype.getTileByID=function(re){return this._tiles[re]},X.prototype._retainLoadedChildren=function(re,ge,_e,Ze){for(var st in this._tiles){var mt=this._tiles[st];if(!(Ze[st]||!mt.hasData()||mt.tileID.overscaledZ<=ge||mt.tileID.overscaledZ>_e)){for(var Nt=mt.tileID;mt&&mt.tileID.overscaledZ>ge+1;){var Jt=mt.tileID.scaledTo(mt.tileID.overscaledZ-1);mt=this._tiles[Jt.key],mt&&mt.hasData()&&(Nt=Jt)}for(var ur=Nt;ur.overscaledZ>ge;)if(ur=ur.scaledTo(ur.overscaledZ-1),re[ur.key]){Ze[Nt.key]=Nt;break}}}},X.prototype.findLoadedParent=function(re,ge){if(re.key in this._loadedParentTiles){var _e=this._loadedParentTiles[re.key];return _e&&_e.tileID.overscaledZ>=ge?_e:null}for(var Ze=re.overscaledZ-1;Ze>=ge;Ze--){var st=re.scaledTo(Ze),mt=this._getLoadedTile(st);if(mt)return mt}},X.prototype._getLoadedTile=function(re){var ge=this._tiles[re.key];if(ge&&ge.hasData())return ge;var _e=this._cache.getByKey(re.wrapped().key);return _e},X.prototype.updateCacheSize=function(re){var ge=Math.ceil(re.width/this._source.tileSize)+1,_e=Math.ceil(re.height/this._source.tileSize)+1,Ze=ge*_e,st=5,mt=Math.floor(Ze*st),Nt=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,mt):mt;this._cache.setMaxSize(Nt)},X.prototype.handleWrapJump=function(re){var ge=this._prevLng===void 0?re:this._prevLng,_e=re-ge,Ze=_e/360,st=Math.round(Ze);if(this._prevLng=re,st){var mt={};for(var Nt in this._tiles){var Jt=this._tiles[Nt];Jt.tileID=Jt.tileID.unwrapTo(Jt.tileID.wrap+st),mt[Jt.tileID.key]=Jt}this._tiles=mt;for(var ur in this._timers)clearTimeout(this._timers[ur]),delete this._timers[ur];for(var yr in this._tiles){var Fr=this._tiles[yr];this._setTileReloadTimer(yr,Fr)}}},X.prototype.update=function(re){var ge=this;if(this.transform=re,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(re),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var _e;this.used?this._source.tileID?_e=re.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(ua){return new i.OverscaledTileID(ua.canonical.z,ua.wrap,ua.canonical.z,ua.canonical.x,ua.canonical.y)}):(_e=re.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(_e=_e.filter(function(ua){return ge._source.hasTile(ua)}))):_e=[];var Ze=re.coveringZoomLevel(this._source),st=Math.max(Ze-X.maxOverzooming,this._source.minzoom),mt=Math.max(Ze+X.maxUnderzooming,this._source.minzoom),Nt=this._updateRetainedTiles(_e,Ze);if($t(this._source.type)){for(var Jt={},ur={},yr=Object.keys(Nt),Fr=0,Gr=yr;Frthis._source.maxzoom){var sn=Vr.children(this._source.maxzoom)[0],Sn=this.getTile(sn);if(Sn&&Sn.hasData()){_e[sn.key]=sn;continue}}else{var zn=Vr.children(this._source.maxzoom);if(_e[zn[0].key]&&_e[zn[1].key]&&_e[zn[2].key]&&_e[zn[3].key])continue}for(var Yn=Qr.wasRequested(),Xn=Vr.overscaledZ-1;Xn>=st;--Xn){var Zn=Vr.scaledTo(Xn);if(Ze[Zn.key]||(Ze[Zn.key]=!0,Qr=this.getTile(Zn),!Qr&&Yn&&(Qr=this._addTile(Zn)),Qr&&(_e[Zn.key]=Zn,Yn=Qr.wasRequested(),Qr.hasData())))break}}}return _e},X.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var re in this._tiles){for(var ge=[],_e=void 0,Ze=this._tiles[re].tileID;Ze.overscaledZ>0;){if(Ze.key in this._loadedParentTiles){_e=this._loadedParentTiles[Ze.key];break}ge.push(Ze.key);var st=Ze.scaledTo(Ze.overscaledZ-1);if(_e=this._getLoadedTile(st),_e)break;Ze=st}for(var mt=0,Nt=ge;mt0)&&(ge.hasData()&&ge.state!=="reloading"?this._cache.add(ge.tileID,ge,ge.getExpiryTimeout()):(ge.aborted=!0,this._abortTile(ge),this._unloadTile(ge))))},X.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var re in this._tiles)this._removeTile(re);this._cache.reset()},X.prototype.tilesIn=function(re,ge,_e){var Ze=this,st=[],mt=this.transform;if(!mt)return st;for(var Nt=_e?mt.getCameraQueryGeometry(re):re,Jt=re.map(function(Xn){return mt.pointCoordinate(Xn)}),ur=Nt.map(function(Xn){return mt.pointCoordinate(Xn)}),yr=this.getIds(),Fr=1/0,Gr=1/0,Wr=-1/0,Vr=-1/0,Qr=0,sn=ur;Qr=0&&pa[1].y+ua>=0){var wa=Jt.map(function(Va){return ra.getTilePoint(Va)}),Ia=ur.map(function(Va){return ra.getTilePoint(Va)});st.push({tile:Zn,tileID:ra,queryGeometry:wa,cameraQueryGeometry:Ia,scale:fa})}}},Yn=0;Yn=i.browser.now())return!0}return!1},X.prototype.setFeatureState=function(re,ge,_e){re=re||"_geojsonTileLayer",this._state.updateState(re,ge,_e)},X.prototype.removeFeatureState=function(re,ge,_e){re=re||"_geojsonTileLayer",this._state.removeFeatureState(re,ge,_e)},X.prototype.getFeatureState=function(re,ge){return re=re||"_geojsonTileLayer",this._state.getState(re,ge)},X.prototype.setDependencies=function(re,ge,_e){var Ze=this._tiles[re];Ze&&Ze.setDependencies(ge,_e)},X.prototype.reloadTilesForDependencies=function(re,ge){for(var _e in this._tiles){var Ze=this._tiles[_e];Ze.hasDependency(re,ge)&&this._reloadTile(_e,"reloading")}this._cache.filter(function(st){return!st.hasDependency(re,ge)})},X}(i.Evented);_t.maxOverzooming=10,_t.maxUnderzooming=3;function Ht(ve,X){var pe=Math.abs(ve.wrap*2)-+(ve.wrap<0),re=Math.abs(X.wrap*2)-+(X.wrap<0);return ve.overscaledZ-X.overscaledZ||re-pe||X.canonical.y-ve.canonical.y||X.canonical.x-ve.canonical.x}function $t(ve){return ve==="raster"||ve==="image"||ve==="video"}function Qt(){return new i.window.Worker(Pp.workerUrl)}var or="mapboxgl_preloaded_worker_pool",Er=function(){this.active={}};Er.prototype.acquire=function(X){if(!this.workers)for(this.workers=[];this.workers.length0?(ge-Ze)/st:0;return this.points[_e].mult(1-mt).add(this.points[pe].mult(mt))};var xr=function(X,pe,re){var ge=this.boxCells=[],_e=this.circleCells=[];this.xCellCount=Math.ceil(X/re),this.yCellCount=Math.ceil(pe/re);for(var Ze=0;Zethis.width||ge<0||pe>this.height)return _e?!1:[];var st=[];if(X<=0&&pe<=0&&this.width<=re&&this.height<=ge){if(_e)return!0;for(var mt=0;mt0:st}},xr.prototype._queryCircle=function(X,pe,re,ge,_e){var Ze=X-re,st=X+re,mt=pe-re,Nt=pe+re;if(st<0||Ze>this.width||Nt<0||mt>this.height)return ge?!1:[];var Jt=[],ur={hitTest:ge,circle:{x:X,y:pe,radius:re},seenUids:{box:{},circle:{}}};return this._forEachCell(Ze,mt,st,Nt,this._queryCellCircle,Jt,ur,_e),ge?Jt.length>0:Jt},xr.prototype.query=function(X,pe,re,ge,_e){return this._query(X,pe,re,ge,!1,_e)},xr.prototype.hitTest=function(X,pe,re,ge,_e){return this._query(X,pe,re,ge,!0,_e)},xr.prototype.hitTestCircle=function(X,pe,re,ge){return this._queryCircle(X,pe,re,!0,ge)},xr.prototype._queryCell=function(X,pe,re,ge,_e,Ze,st,mt){var Nt=st.seenUids,Jt=this.boxCells[_e];if(Jt!==null)for(var ur=this.bboxes,yr=0,Fr=Jt;yr=ur[Wr+0]&&ge>=ur[Wr+1]&&(!mt||mt(this.boxKeys[Gr]))){if(st.hitTest)return Ze.push(!0),!0;Ze.push({key:this.boxKeys[Gr],x1:ur[Wr],y1:ur[Wr+1],x2:ur[Wr+2],y2:ur[Wr+3]})}}}var Vr=this.circleCells[_e];if(Vr!==null)for(var Qr=this.circles,sn=0,Sn=Vr;snst*st+mt*mt},xr.prototype._circleAndRectCollide=function(X,pe,re,ge,_e,Ze,st){var mt=(Ze-ge)/2,Nt=Math.abs(X-(ge+mt));if(Nt>mt+re)return!1;var Jt=(st-_e)/2,ur=Math.abs(pe-(_e+Jt));if(ur>Jt+re)return!1;if(Nt<=mt||ur<=Jt)return!0;var yr=Nt-mt,Fr=ur-Jt;return yr*yr+Fr*Fr<=re*re};function Ar(ve,X,pe,re,ge){var _e=i.create();return X?(i.scale(_e,_e,[1/ge,1/ge,1]),pe||i.rotateZ(_e,_e,re.angle)):i.multiply(_e,re.labelPlaneMatrix,ve),_e}function Or(ve,X,pe,re,ge){if(X){var _e=i.clone(ve);return i.scale(_e,_e,[ge,ge,1]),pe||i.rotateZ(_e,_e,-re.angle),_e}else return re.glCoordMatrix}function Nr(ve,X){var pe=[ve.x,ve.y,0,1];Mr(pe,pe,X);var re=pe[3];return{point:new i.Point(pe[0]/re,pe[1]/re),signedDistanceFromCamera:re}}function qr(ve,X){return .5+.5*(ve/X)}function vn(ve,X){var pe=ve[0]/ve[3],re=ve[1]/ve[3],ge=pe>=-X[0]&&pe<=X[0]&&re>=-X[1]&&re<=X[1];return ge}function fn(ve,X,pe,re,ge,_e,Ze,st){var mt=re?ve.textSizeData:ve.iconSizeData,Nt=i.evaluateSizeForZoom(mt,pe.transform.zoom),Jt=[256/pe.width*2+1,256/pe.height*2+1],ur=re?ve.text.dynamicLayoutVertexArray:ve.icon.dynamicLayoutVertexArray;ur.clear();for(var yr=ve.lineVertexArray,Fr=re?ve.text.placedSymbolArray:ve.icon.placedSymbolArray,Gr=pe.transform.width/pe.transform.height,Wr=!1,Vr=0;Vr_e)return{useVertical:!0}}return(ve===i.WritingMode.vertical?X.ype.x)?{needsFlipping:!0}:null}function jn(ve,X,pe,re,ge,_e,Ze,st,mt,Nt,Jt,ur,yr,Fr){var Gr=X/24,Wr=ve.lineOffsetX*Gr,Vr=ve.lineOffsetY*Gr,Qr;if(ve.numGlyphs>1){var sn=ve.glyphStartIndex+ve.numGlyphs,Sn=ve.lineStartIndex,zn=ve.lineStartIndex+ve.lineLength,Yn=Tn(Gr,st,Wr,Vr,pe,Jt,ur,ve,mt,_e,yr);if(!Yn)return{notEnoughRoom:!0};var Xn=Nr(Yn.first.point,Ze).point,Zn=Nr(Yn.last.point,Ze).point;if(re&&!pe){var ra=Pn(ve.writingMode,Xn,Zn,Fr);if(ra)return ra}Qr=[Yn.first];for(var fa=ve.glyphStartIndex+1;fa0?Ia.point:qn(ur,wa,ua,1,ge),ii=Pn(ve.writingMode,ua,Va,Fr);if(ii)return ii}var Ga=sa(Gr*st.getoffsetX(ve.glyphStartIndex),Wr,Vr,pe,Jt,ur,ve.segment,ve.lineStartIndex,ve.lineStartIndex+ve.lineLength,mt,_e,yr);if(!Ga)return{notEnoughRoom:!0};Qr=[Ga]}for(var ja=0,La=Qr;ja0?1:-1,Gr=0;re&&(Fr*=-1,Gr=Math.PI),Fr<0&&(Gr+=Math.PI);for(var Wr=Fr>0?st+Ze:st+Ze+1,Vr=ge,Qr=ge,sn=0,Sn=0,zn=Math.abs(yr),Yn=[];sn+Sn<=zn;){if(Wr+=Fr,Wr=mt)return null;if(Qr=Vr,Yn.push(Vr),Vr=ur[Wr],Vr===void 0){var Xn=new i.Point(Nt.getx(Wr),Nt.gety(Wr)),Zn=Nr(Xn,Jt);if(Zn.signedDistanceFromCamera>0)Vr=ur[Wr]=Zn.point;else{var ra=Wr-Fr,fa=sn===0?_e:new i.Point(Nt.getx(ra),Nt.gety(ra));Vr=qn(fa,Xn,Qr,zn-sn+1,Jt)}}sn+=Sn,Sn=Qr.dist(Vr)}var ua=(zn-sn)/Sn,pa=Vr.sub(Qr),wa=pa.mult(ua)._add(Qr);wa._add(pa._unit()._perp()._mult(pe*Fr));var Ia=Gr+Math.atan2(Vr.y-Qr.y,Vr.x-Qr.x);return Yn.push(wa),{point:wa,angle:Ia,path:Yn}}var ta=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ea(ve,X){for(var pe=0;pe=1;oi--)La.push(Ga.path[oi]);for(var ui=1;ui0){for(var Ha=La[0].clone(),Qa=La[0].clone(),Ui=1;Ui=Ia.x&&Qa.x<=Va.x&&Ha.y>=Ia.y&&Qa.y<=Va.y?Ti=[La]:Qa.xVa.x||Qa.yVa.y?Ti=[]:Ti=i.clipLine([La],Ia.x,Ia.y,Va.x,Va.y)}for(var no=0,tl=Ti;no=this.screenRightBoundary||gethis.screenBottomBoundary},nn.prototype.isInsideGrid=function(X,pe,re,ge){return re>=0&&X=0&&pe0){var zn;return this.prevPlacement&&this.prevPlacement.variableOffsets[yr.crossTileID]&&this.prevPlacement.placements[yr.crossTileID]&&this.prevPlacement.placements[yr.crossTileID].text&&(zn=this.prevPlacement.variableOffsets[yr.crossTileID].anchor),this.variableOffsets[yr.crossTileID]={textOffset:Vr,width:re,height:ge,anchor:X,textBoxScale:_e,prevAnchor:zn},this.markUsedJustification(Fr,X,yr,Gr),Fr.allowVerticalPlacement&&(this.markUsedOrientation(Fr,Gr,yr),this.placedOrientations[yr.crossTileID]=Gr),{shift:Qr,placedGlyphBoxes:sn}}},wr.prototype.placeLayerBucketPart=function(X,pe,re){var ge=this,_e=X.parameters,Ze=_e.bucket,st=_e.layout,mt=_e.posMatrix,Nt=_e.textLabelPlaneMatrix,Jt=_e.labelToScreenMatrix,ur=_e.textPixelRatio,yr=_e.holdingForFade,Fr=_e.collisionBoxArray,Gr=_e.partiallyEvaluatedTextSize,Wr=_e.collisionGroup,Vr=st.get("text-optional"),Qr=st.get("icon-optional"),sn=st.get("text-allow-overlap"),Sn=st.get("icon-allow-overlap"),zn=st.get("text-rotation-alignment")==="map",Yn=st.get("text-pitch-alignment")==="map",Xn=st.get("icon-text-fit")!=="none",Zn=st.get("symbol-z-order")==="viewport-y",ra=sn&&(Sn||!Ze.hasIconData()||Qr),fa=Sn&&(sn||!Ze.hasTextData()||Vr);!Ze.collisionArrays&&Fr&&Ze.deserializeCollisionBoxes(Fr);var ua=function(Ga,ja){if(!pe[Ga.crossTileID]){if(yr){ge.placements[Ga.crossTileID]=new Cn(!1,!1,!1);return}var La=!1,oi=!1,ui=!0,ci=null,Ka={box:null,offscreen:null},Ti={box:null,offscreen:null},Ha=null,Qa=null,Ui=null,no=0,tl=0,rl=0;ja.textFeatureIndex?no=ja.textFeatureIndex:Ga.useRuntimeCollisionCircles&&(no=Ga.featureIndex),ja.verticalTextFeatureIndex&&(tl=ja.verticalTextFeatureIndex);var Yl=ja.textBox;if(Yl){var Zl=function(Yi){var xs=i.WritingMode.horizontal;if(Ze.allowVerticalPlacement&&!Yi&&ge.prevPlacement){var bs=ge.prevPlacement.placedOrientations[Ga.crossTileID];bs&&(ge.placedOrientations[Ga.crossTileID]=bs,xs=bs,ge.markUsedOrientation(Ze,xs,Ga))}return xs},Au=function(Yi,xs){if(Ze.allowVerticalPlacement&&Ga.numVerticalGlyphVertices>0&&ja.verticalTextBox)for(var bs=0,qh=Ze.writingModes;bs0&&(Oo=Oo.filter(function(Yi){return Yi!==Ns.anchor}),Oo.unshift(Ns.anchor))}var jl=function(Yi,xs,bs){for(var qh=Yi.x2-Yi.x1,sd=Yi.y2-Yi.y1,Fg=Ga.textBoxScale,_g=Xn&&!Sn?xs:null,Sh={box:[],offscreen:!1},zg=sn?Oo.length*2:Oo.length,ev=0;ev=Oo.length,ld=ge.attemptAnchorPlacement(Og,Yi,qh,sd,Fg,zn,Yn,ur,mt,Wr,Ng,Ga,Ze,bs,_g);if(ld&&(Sh=ld.placedGlyphBoxes,Sh&&Sh.box&&Sh.box.length)){La=!0,ci=ld.shift;break}}return Sh},Sl=function(){return jl(Yl,ja.iconBox,i.WritingMode.horizontal)},Kl=function(){var Yi=ja.verticalTextBox,xs=Ka&&Ka.box&&Ka.box.length;return Ze.allowVerticalPlacement&&!xs&&Ga.numVerticalGlyphVertices>0&&Yi?jl(Yi,ja.verticalIconBox,i.WritingMode.vertical):{box:null,offscreen:null}};Au(Sl,Kl),Ka&&(La=Ka.box,ui=Ka.offscreen);var Kh=Zl(Ka&&Ka.box);if(!La&&ge.prevPlacement){var zf=ge.prevPlacement.variableOffsets[Ga.crossTileID];zf&&(ge.variableOffsets[Ga.crossTileID]=zf,ge.markUsedJustification(Ze,zf.anchor,Ga,Kh))}}else{var Xl=function(Yi,xs){var bs=ge.collisionIndex.placeCollisionBox(Yi,sn,ur,mt,Wr.predicate);return bs&&bs.box&&bs.box.length&&(ge.markUsedOrientation(Ze,xs,Ga),ge.placedOrientations[Ga.crossTileID]=xs),bs},ns=function(){return Xl(Yl,i.WritingMode.horizontal)},nf=function(){var Yi=ja.verticalTextBox;return Ze.allowVerticalPlacement&&Ga.numVerticalGlyphVertices>0&&Yi?Xl(Yi,i.WritingMode.vertical):{box:null,offscreen:null}};Au(ns,nf),Zl(Ka&&Ka.box&&Ka.box.length)}}if(Ha=Ka,La=Ha&&Ha.box&&Ha.box.length>0,ui=Ha&&Ha.offscreen,Ga.useRuntimeCollisionCircles){var Ro=Ze.text.placedSymbolArray.get(Ga.centerJustifiedTextSymbolIndex),Ah=i.evaluateSizeForFeature(Ze.textSizeData,Gr,Ro),Yo=st.get("text-padding"),Mh=Ga.collisionCircleDiameter;Qa=ge.collisionIndex.placeCollisionCircles(sn,Ro,Ze.lineVertexArray,Ze.glyphOffsetArray,Ah,mt,Nt,Jt,re,Yn,Wr.predicate,Mh,Yo),La=sn||Qa.circles.length>0&&!Qa.collisionDetected,ui=ui&&Qa.offscreen}if(ja.iconFeatureIndex&&(rl=ja.iconFeatureIndex),ja.iconBox){var Jh=function(Yi){var xs=Xn&&ci?Xt(Yi,ci.x,ci.y,zn,Yn,ge.transform.angle):Yi;return ge.collisionIndex.placeCollisionBox(xs,Sn,ur,mt,Wr.predicate)};Ti&&Ti.box&&Ti.box.length&&ja.verticalIconBox?(Ui=Jh(ja.verticalIconBox),oi=Ui.box.length>0):(Ui=Jh(ja.iconBox),oi=Ui.box.length>0),ui=ui&&Ui.offscreen}var Qh=Vr||Ga.numHorizontalGlyphVertices===0&&Ga.numVerticalGlyphVertices===0,Rp=Qr||Ga.numIconVertices===0;if(!Qh&&!Rp?oi=La=oi&&La:Rp?Qh||(oi=oi&&La):La=oi&&La,La&&Ha&&Ha.box&&(Ti&&Ti.box&&tl?ge.collisionIndex.insertCollisionBox(Ha.box,st.get("text-ignore-placement"),Ze.bucketInstanceId,tl,Wr.ID):ge.collisionIndex.insertCollisionBox(Ha.box,st.get("text-ignore-placement"),Ze.bucketInstanceId,no,Wr.ID)),oi&&Ui&&ge.collisionIndex.insertCollisionBox(Ui.box,st.get("icon-ignore-placement"),Ze.bucketInstanceId,rl,Wr.ID),Qa&&(La&&ge.collisionIndex.insertCollisionCircles(Qa.circles,st.get("text-ignore-placement"),Ze.bucketInstanceId,no,Wr.ID),re)){var $h=Ze.bucketInstanceId,Tc=ge.collisionCircleArrays[$h];Tc===void 0&&(Tc=ge.collisionCircleArrays[$h]=new Hn);for(var Ac=0;Ac=0;--wa){var Ia=pa[wa];ua(Ze.symbolInstances.get(Ia),Ze.collisionArrays[Ia])}else for(var Va=X.symbolInstanceStart;Va=0&&(Ze>=0&&Jt!==Ze?X.text.placedSymbolArray.get(Jt).crossTileID=0:X.text.placedSymbolArray.get(Jt).crossTileID=re.crossTileID)}},wr.prototype.markUsedOrientation=function(X,pe,re){for(var ge=pe===i.WritingMode.horizontal||pe===i.WritingMode.horizontalOnly?pe:0,_e=pe===i.WritingMode.vertical?pe:0,Ze=[re.leftJustifiedTextSymbolIndex,re.centerJustifiedTextSymbolIndex,re.rightJustifiedTextSymbolIndex],st=0,mt=Ze;st0||Yn>0,ua=Sn.numIconVertices>0,pa=ge.placedOrientations[Sn.crossTileID],wa=pa===i.WritingMode.vertical,Ia=pa===i.WritingMode.horizontal||pa===i.WritingMode.horizontalOnly;if(fa){var Va=zr(ra.text),ii=wa?dn:Va;Gr(X.text,zn,ii);var Ga=Ia?dn:Va;Gr(X.text,Yn,Ga);var ja=ra.text.isHidden();[Sn.rightJustifiedTextSymbolIndex,Sn.centerJustifiedTextSymbolIndex,Sn.leftJustifiedTextSymbolIndex].forEach(function(rl){rl>=0&&(X.text.placedSymbolArray.get(rl).hidden=ja||wa?1:0)}),Sn.verticalPlacedTextSymbolIndex>=0&&(X.text.placedSymbolArray.get(Sn.verticalPlacedTextSymbolIndex).hidden=ja||Ia?1:0);var La=ge.variableOffsets[Sn.crossTileID];La&&ge.markUsedJustification(X,La.anchor,Sn,pa);var oi=ge.placedOrientations[Sn.crossTileID];oi&&(ge.markUsedJustification(X,"left",Sn,oi),ge.markUsedOrientation(X,oi,Sn))}if(ua){var ui=zr(ra.icon),ci=!(yr&&Sn.verticalPlacedIconSymbolIndex&&wa);if(Sn.placedIconSymbolIndex>=0){var Ka=ci?ui:dn;Gr(X.icon,Sn.numIconVertices,Ka),X.icon.placedSymbolArray.get(Sn.placedIconSymbolIndex).hidden=ra.icon.isHidden()}if(Sn.verticalPlacedIconSymbolIndex>=0){var Ti=ci?dn:ui;Gr(X.icon,Sn.numVerticalIconVertices,Ti),X.icon.placedSymbolArray.get(Sn.verticalPlacedIconSymbolIndex).hidden=ra.icon.isHidden()}}if(X.hasIconCollisionBoxData()||X.hasTextCollisionBoxData()){var Ha=X.collisionArrays[sn];if(Ha){var Qa=new i.Point(0,0);if(Ha.textBox||Ha.verticalTextBox){var Ui=!0;if(Nt){var no=ge.variableOffsets[Xn];no?(Qa=Za(no.anchor,no.width,no.height,no.textOffset,no.textBoxScale),Jt&&Qa._rotate(ur?ge.transform.angle:-ge.transform.angle)):Ui=!1}Ha.textBox&&an(X.textCollisionBox.collisionVertexArray,ra.text.placed,!Ui||wa,Qa.x,Qa.y),Ha.verticalTextBox&&an(X.textCollisionBox.collisionVertexArray,ra.text.placed,!Ui||Ia,Qa.x,Qa.y)}var tl=!!(!Ia&&Ha.verticalIconBox);Ha.iconBox&&an(X.iconCollisionBox.collisionVertexArray,ra.icon.placed,tl,yr?Qa.x:0,yr?Qa.y:0),Ha.verticalIconBox&&an(X.iconCollisionBox.collisionVertexArray,ra.icon.placed,!tl,yr?Qa.x:0,yr?Qa.y:0)}}},Vr=0;VrX},wr.prototype.setStale=function(){this.stale=!0};function an(ve,X,pe,re,ge){ve.emplaceBack(X?1:0,pe?1:0,re||0,ge||0),ve.emplaceBack(X?1:0,pe?1:0,re||0,ge||0),ve.emplaceBack(X?1:0,pe?1:0,re||0,ge||0),ve.emplaceBack(X?1:0,pe?1:0,re||0,ge||0)}var cn=Math.pow(2,25),hn=Math.pow(2,24),Ln=Math.pow(2,17),wn=Math.pow(2,16),un=Math.pow(2,9),Rr=Math.pow(2,8),Cr=Math.pow(2,1);function zr(ve){if(ve.opacity===0&&!ve.placed)return 0;if(ve.opacity===1&&ve.placed)return 4294967295;var X=ve.placed?1:0,pe=Math.floor(ve.opacity*127);return pe*cn+X*hn+pe*Ln+X*wn+pe*un+X*Rr+pe*Cr+X}var dn=0,_n=function(X){this._sortAcrossTiles=X.layout.get("symbol-z-order")!=="viewport-y"&&X.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};_n.prototype.continuePlacement=function(X,pe,re,ge,_e){for(var Ze=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var st=X[this._currentPlacementIndex],mt=pe[st],Nt=this.placement.collisionIndex.transform.zoom;if(mt.type==="symbol"&&(!mt.minzoom||mt.minzoom<=Nt)&&(!mt.maxzoom||mt.maxzoom>Nt)){this._inProgressLayer||(this._inProgressLayer=new _n(mt));var Jt=this._inProgressLayer.continuePlacement(re[mt.source],this.placement,this._showCollisionBoxes,mt,Ze);if(Jt)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Wn.prototype.commit=function(X){return this.placement.commit(X),this.placement};var yn=512/i.EXTENT/2,On=function(X,pe,re){this.tileID=X,this.indexedSymbolInstances={},this.bucketInstanceId=re;for(var ge=0;geX.overscaledZ)for(var Nt in mt){var Jt=mt[Nt];Jt.tileID.isChildOf(X)&&Jt.findMatches(pe.symbolInstances,X,Ze)}else{var ur=X.scaledTo(Number(st)),yr=mt[ur.key];yr&&yr.findMatches(pe.symbolInstances,X,Ze)}}for(var Fr=0;Fr0)throw new Error("Unimplemented: "+Ze.map(function(st){return st.command}).join(", ")+".");return _e.forEach(function(st){st.command!=="setTransition"&&ge[st.command].apply(ge,st.args)}),this.stylesheet=re,!0},X.prototype.addImage=function(re,ge){if(this.getImage(re))return this.fire(new i.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(re,ge),this._availableImages=this.imageManager.listImages(),this._changedImages[re]=!0,this._changed=!0,this.fire(new i.Event("data",{dataType:"style"}))},X.prototype.updateImage=function(re,ge){this.imageManager.updateImage(re,ge)},X.prototype.getImage=function(re){return this.imageManager.getImage(re)},X.prototype.removeImage=function(re){if(!this.getImage(re))return this.fire(new i.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(re),this._availableImages=this.imageManager.listImages(),this._changedImages[re]=!0,this._changed=!0,this.fire(new i.Event("data",{dataType:"style"}))},X.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},X.prototype.addSource=function(re,ge,_e){var Ze=this;if(_e===void 0&&(_e={}),this._checkLoaded(),this.sourceCaches[re]!==void 0)throw new Error("There is already a source with this ID");if(!ge.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(ge).join(", ")+".");var st=["vector","raster","geojson","video","image"],mt=st.indexOf(ge.type)>=0;if(!(mt&&this._validate(i.validateStyle.source,"sources."+re,ge,null,_e))){this.map&&this.map._collectResourceTiming&&(ge.collectResourceTiming=!0);var Nt=this.sourceCaches[re]=new _t(re,ge,this.dispatcher);Nt.style=this,Nt.setEventedParent(this,function(){return{isSourceLoaded:Ze.loaded(),source:Nt.serialize(),sourceId:re}}),Nt.onAdd(this.map),this._changed=!0}},X.prototype.removeSource=function(re){if(this._checkLoaded(),this.sourceCaches[re]===void 0)throw new Error("There is no source with this ID");for(var ge in this._layers)if(this._layers[ge].source===re)return this.fire(new i.ErrorEvent(new Error('Source "'+re+'" cannot be removed while layer "'+ge+'" is using it.')));var _e=this.sourceCaches[re];delete this.sourceCaches[re],delete this._updatedSources[re],_e.fire(new i.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:re})),_e.setEventedParent(null),_e.clearTiles(),_e.onRemove&&_e.onRemove(this.map),this._changed=!0},X.prototype.setGeoJSONSourceData=function(re,ge){this._checkLoaded();var _e=this.sourceCaches[re].getSource();_e.setData(ge),this._changed=!0},X.prototype.getSource=function(re){return this.sourceCaches[re]&&this.sourceCaches[re].getSource()},X.prototype.addLayer=function(re,ge,_e){_e===void 0&&(_e={}),this._checkLoaded();var Ze=re.id;if(this.getLayer(Ze)){this.fire(new i.ErrorEvent(new Error('Layer with id "'+Ze+'" already exists on this map')));return}var st;if(re.type==="custom"){if(oa(this,i.validateCustomStyleLayer(re)))return;st=i.createStyleLayer(re)}else{if(typeof re.source=="object"&&(this.addSource(Ze,re.source),re=i.clone$1(re),re=i.extend(re,{source:Ze})),this._validate(i.validateStyle.layer,"layers."+Ze,re,{arrayIndex:-1},_e))return;st=i.createStyleLayer(re),this._validateLayer(st),st.setEventedParent(this,{layer:{id:Ze}}),this._serializedLayers[st.id]=st.serialize()}var mt=ge?this._order.indexOf(ge):this._order.length;if(ge&&mt===-1){this.fire(new i.ErrorEvent(new Error('Layer with id "'+ge+'" does not exist on this map.')));return}if(this._order.splice(mt,0,Ze),this._layerOrderChanged=!0,this._layers[Ze]=st,this._removedLayers[Ze]&&st.source&&st.type!=="custom"){var Nt=this._removedLayers[Ze];delete this._removedLayers[Ze],Nt.type!==st.type?this._updatedSources[st.source]="clear":(this._updatedSources[st.source]="reload",this.sourceCaches[st.source].pause())}this._updateLayer(st),st.onAdd&&st.onAdd(this.map)},X.prototype.moveLayer=function(re,ge){this._checkLoaded(),this._changed=!0;var _e=this._layers[re];if(!_e){this.fire(new i.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot be moved.")));return}if(re!==ge){var Ze=this._order.indexOf(re);this._order.splice(Ze,1);var st=ge?this._order.indexOf(ge):this._order.length;if(ge&&st===-1){this.fire(new i.ErrorEvent(new Error('Layer with id "'+ge+'" does not exist on this map.')));return}this._order.splice(st,0,re),this._layerOrderChanged=!0}},X.prototype.removeLayer=function(re){this._checkLoaded();var ge=this._layers[re];if(!ge){this.fire(new i.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot be removed.")));return}ge.setEventedParent(null);var _e=this._order.indexOf(re);this._order.splice(_e,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[re]=ge,delete this._layers[re],delete this._serializedLayers[re],delete this._updatedLayers[re],delete this._updatedPaintProps[re],ge.onRemove&&ge.onRemove(this.map)},X.prototype.getLayer=function(re){return this._layers[re]},X.prototype.hasLayer=function(re){return re in this._layers},X.prototype.setLayerZoomRange=function(re,ge,_e){this._checkLoaded();var Ze=this.getLayer(re);if(!Ze){this.fire(new i.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot have zoom extent.")));return}Ze.minzoom===ge&&Ze.maxzoom===_e||(ge!=null&&(Ze.minzoom=ge),_e!=null&&(Ze.maxzoom=_e),this._updateLayer(Ze))},X.prototype.setFilter=function(re,ge,_e){_e===void 0&&(_e={}),this._checkLoaded();var Ze=this.getLayer(re);if(!Ze){this.fire(new i.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot be filtered.")));return}if(!i.deepEqual(Ze.filter,ge)){if(ge==null){Ze.filter=void 0,this._updateLayer(Ze);return}this._validate(i.validateStyle.filter,"layers."+Ze.id+".filter",ge,null,_e)||(Ze.filter=i.clone$1(ge),this._updateLayer(Ze))}},X.prototype.getFilter=function(re){return i.clone$1(this.getLayer(re).filter)},X.prototype.setLayoutProperty=function(re,ge,_e,Ze){Ze===void 0&&(Ze={}),this._checkLoaded();var st=this.getLayer(re);if(!st){this.fire(new i.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot be styled.")));return}i.deepEqual(st.getLayoutProperty(ge),_e)||(st.setLayoutProperty(ge,_e,Ze),this._updateLayer(st))},X.prototype.getLayoutProperty=function(re,ge){var _e=this.getLayer(re);if(!_e){this.fire(new i.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style.")));return}return _e.getLayoutProperty(ge)},X.prototype.setPaintProperty=function(re,ge,_e,Ze){Ze===void 0&&(Ze={}),this._checkLoaded();var st=this.getLayer(re);if(!st){this.fire(new i.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot be styled.")));return}if(!i.deepEqual(st.getPaintProperty(ge),_e)){var mt=st.setPaintProperty(ge,_e,Ze);mt&&this._updateLayer(st),this._changed=!0,this._updatedPaintProps[re]=!0}},X.prototype.getPaintProperty=function(re,ge){return this.getLayer(re).getPaintProperty(ge)},X.prototype.setFeatureState=function(re,ge){this._checkLoaded();var _e=re.source,Ze=re.sourceLayer,st=this.sourceCaches[_e];if(st===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+_e+"' does not exist in the map's style.")));return}var mt=st.getSource().type;if(mt==="geojson"&&Ze){this.fire(new i.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(mt==="vector"&&!Ze){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}re.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),st.setFeatureState(Ze,re.id,ge)},X.prototype.removeFeatureState=function(re,ge){this._checkLoaded();var _e=re.source,Ze=this.sourceCaches[_e];if(Ze===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+_e+"' does not exist in the map's style.")));return}var st=Ze.getSource().type,mt=st==="vector"?re.sourceLayer:void 0;if(st==="vector"&&!mt){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(ge&&typeof re.id!="string"&&typeof re.id!="number"){this.fire(new i.ErrorEvent(new Error("A feature id is requred to remove its specific state property.")));return}Ze.removeFeatureState(mt,re.id,ge)},X.prototype.getFeatureState=function(re){this._checkLoaded();var ge=re.source,_e=re.sourceLayer,Ze=this.sourceCaches[ge];if(Ze===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+ge+"' does not exist in the map's style.")));return}var st=Ze.getSource().type;if(st==="vector"&&!_e){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return re.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),Ze.getFeatureState(_e,re.id)},X.prototype.getTransition=function(){return i.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},X.prototype.serialize=function(){return i.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:i.mapObject(this.sourceCaches,function(re){return re.serialize()}),layers:this._serializeLayers(this._order)},function(re){return re!==void 0})},X.prototype._updateLayer=function(re){this._updatedLayers[re.id]=!0,re.source&&!this._updatedSources[re.source]&&this.sourceCaches[re.source].getSource().type!=="raster"&&(this._updatedSources[re.source]="reload",this.sourceCaches[re.source].pause()),this._changed=!0},X.prototype._flattenAndSortRenderedFeatures=function(re){for(var ge=this,_e=function(Ia){return ge._layers[Ia].type==="fill-extrusion"},Ze={},st=[],mt=this._order.length-1;mt>=0;mt--){var Nt=this._order[mt];if(_e(Nt)){Ze[Nt]=mt;for(var Jt=0,ur=re;Jt=0;sn--){var Sn=this._order[sn];if(_e(Sn))for(var zn=st.length-1;zn>=0;zn--){var Yn=st[zn].feature;if(Ze[Yn.layer.id] 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`,rh=`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float base #pragma mapbox: initialize lowp float height #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,nh=`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float base #pragma mapbox: initialize lowp float height #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 ? a_pos : vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`,pf=`#ifdef GL_ES precision highp float; #endif uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform float u_maxzoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*exaggeration+19.2562-u_zoom);gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,ah="uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}",ih=`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; #define PI 3.141592653589793 void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,tc="uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}",oh=`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,sh=` #define scale 0.015873016 attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`,gf=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp float v_lineprogress; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,hl=` #define MAX_LINE_DISTANCE 32767.0 #define scale 0.015873016 attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`,vl=`uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,Fl=` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float gapwidth #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`,zu=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,lh=` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`,Rs=`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,rc="uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}",yf=`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,uh=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity; #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}`,Ho=`#define SDF_PX 8.0 uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,dl=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`,lu=`#define SDF_PX 8.0 #define SDF 1.0 #define ICON 0.0 uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,_l=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`,vs=vi(mo,cf),Ds=vi(qa,au),mf=vi(kl,Ji),zl=vi(Eo,qf),Zs=vi(iu,Ri),Fi=vi(ou,ko),xf=vi(Wi,Fo),Ou=vi(ho,Vo),Ol=vi(fs,Ls),nc=vi(eo,ec),ac=vi(cs,to),Nl=vi(hf,Ps),Bl=vi(hs,vf),Qi=vi(df,eh),Nu=vi(su,th),fh=vi(rh,nh),bf=vi(pf,ah),ch=vi(ih,tc),Bu=vi(oh,sh),uu=vi(gf,hl),wf=vi(vl,Fl),Tf=vi(zu,lh),fu=vi(Rs,rc),Af=vi(yf,uh),Uu=vi(Ho,dl),Mf=vi(lu,_l);function vi(ve,X){var pe=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,re={};return ve=ve.replace(pe,function(ge,_e,Ze,st,mt){return re[mt]=!0,_e==="define"?` #ifndef HAS_UNIFORM_u_`+mt+` varying `+Ze+" "+st+" "+mt+`; #else uniform `+Ze+" "+st+" u_"+mt+`; #endif `:` #ifdef HAS_UNIFORM_u_`+mt+` `+Ze+" "+st+" "+mt+" = u_"+mt+`; #endif `}),X=X.replace(pe,function(ge,_e,Ze,st,mt){var Nt=st==="float"?"vec2":"vec4",Jt=mt.match(/color/)?"color":Nt;return re[mt]?_e==="define"?` #ifndef HAS_UNIFORM_u_`+mt+` uniform lowp float u_`+mt+`_t; attribute `+Ze+" "+Nt+" a_"+mt+`; varying `+Ze+" "+st+" "+mt+`; #else uniform `+Ze+" "+st+" u_"+mt+`; #endif `:Jt==="vec4"?` #ifndef HAS_UNIFORM_u_`+mt+` `+mt+" = a_"+mt+`; #else `+Ze+" "+st+" "+mt+" = u_"+mt+`; #endif `:` #ifndef HAS_UNIFORM_u_`+mt+` `+mt+" = unpack_mix_"+Jt+"(a_"+mt+", u_"+mt+`_t); #else `+Ze+" "+st+" "+mt+" = u_"+mt+`; #endif `:_e==="define"?` #ifndef HAS_UNIFORM_u_`+mt+` uniform lowp float u_`+mt+`_t; attribute `+Ze+" "+Nt+" a_"+mt+`; #else uniform `+Ze+" "+st+" u_"+mt+`; #endif `:Jt==="vec4"?` #ifndef HAS_UNIFORM_u_`+mt+` `+Ze+" "+st+" "+mt+" = a_"+mt+`; #else `+Ze+" "+st+" "+mt+" = u_"+mt+`; #endif `:` #ifndef HAS_UNIFORM_u_`+mt+` `+Ze+" "+st+" "+mt+" = unpack_mix_"+Jt+"(a_"+mt+", u_"+mt+`_t); #else `+Ze+" "+st+" "+mt+" = u_"+mt+`; #endif `}),{fragmentSource:ve,vertexSource:X}}var ic=Object.freeze({__proto__:null,prelude:vs,background:Ds,backgroundPattern:mf,circle:zl,clippingMask:Zs,heatmap:Fi,heatmapTexture:xf,collisionBox:Ou,collisionCircle:Ol,debug:nc,fill:ac,fillOutline:Nl,fillOutlinePattern:Bl,fillPattern:Qi,fillExtrusion:Nu,fillExtrusionPattern:fh,hillshadePrepare:bf,hillshade:ch,line:Bu,lineGradient:uu,linePattern:wf,lineSDF:Tf,raster:fu,symbolIcon:Af,symbolSDF:Uu,symbolTextAndIcon:Mf}),$o=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};$o.prototype.bind=function(X,pe,re,ge,_e,Ze,st,mt){this.context=X;for(var Nt=this.boundPaintVertexBuffers.length!==ge.length,Jt=0;!Nt&&Jt>16,st>>16],u_pixel_coord_lower:[Ze&65535,st&65535]}}function Sf(ve,X,pe,re){var ge=pe.imageManager.getPattern(ve.from.toString()),_e=pe.imageManager.getPattern(ve.to.toString()),Ze=pe.imageManager.getPixelSize(),st=Ze.width,mt=Ze.height,Nt=Math.pow(2,re.tileID.overscaledZ),Jt=re.tileSize*Math.pow(2,pe.transform.tileZoom)/Nt,ur=Jt*(re.tileID.canonical.x+re.tileID.wrap*Nt),yr=Jt*re.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:ge.tl,u_pattern_br_a:ge.br,u_pattern_tl_b:_e.tl,u_pattern_br_b:_e.br,u_texsize:[st,mt],u_mix:X.t,u_pattern_size_a:ge.displaySize,u_pattern_size_b:_e.displaySize,u_scale_a:X.fromScale,u_scale_b:X.toScale,u_tile_units_to_pixels:1/gn(re,1,pe.transform.tileZoom),u_pixel_coord_upper:[ur>>16,yr>>16],u_pixel_coord_lower:[ur&65535,yr&65535]}}var zi=function(ve,X){return{u_matrix:new i.UniformMatrix4f(ve,X.u_matrix),u_lightpos:new i.Uniform3f(ve,X.u_lightpos),u_lightintensity:new i.Uniform1f(ve,X.u_lightintensity),u_lightcolor:new i.Uniform3f(ve,X.u_lightcolor),u_vertical_gradient:new i.Uniform1f(ve,X.u_vertical_gradient),u_opacity:new i.Uniform1f(ve,X.u_opacity)}},cu=function(ve,X){return{u_matrix:new i.UniformMatrix4f(ve,X.u_matrix),u_lightpos:new i.Uniform3f(ve,X.u_lightpos),u_lightintensity:new i.Uniform1f(ve,X.u_lightintensity),u_lightcolor:new i.Uniform3f(ve,X.u_lightcolor),u_vertical_gradient:new i.Uniform1f(ve,X.u_vertical_gradient),u_height_factor:new i.Uniform1f(ve,X.u_height_factor),u_image:new i.Uniform1i(ve,X.u_image),u_texsize:new i.Uniform2f(ve,X.u_texsize),u_pixel_coord_upper:new i.Uniform2f(ve,X.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(ve,X.u_pixel_coord_lower),u_scale:new i.Uniform3f(ve,X.u_scale),u_fade:new i.Uniform1f(ve,X.u_fade),u_opacity:new i.Uniform1f(ve,X.u_opacity)}},Co=function(ve,X,pe,re){var ge=X.style.light,_e=ge.properties.get("position"),Ze=[_e.x,_e.y,_e.z],st=i.create$1();ge.properties.get("anchor")==="viewport"&&i.fromRotation(st,-X.transform.angle),i.transformMat3(Ze,Ze,st);var mt=ge.properties.get("color");return{u_matrix:ve,u_lightpos:Ze,u_lightintensity:ge.properties.get("intensity"),u_lightcolor:[mt.r,mt.g,mt.b],u_vertical_gradient:+pe,u_opacity:re}},Is=function(ve,X,pe,re,ge,_e,Ze){return i.extend(Co(ve,X,pe,re),pl(_e,X,Ze),{u_height_factor:-Math.pow(2,ge.overscaledZ)/Ze.tileSize/8})},ks=function(ve,X){return{u_matrix:new i.UniformMatrix4f(ve,X.u_matrix)}},Xs=function(ve,X){return{u_matrix:new i.UniformMatrix4f(ve,X.u_matrix),u_image:new i.Uniform1i(ve,X.u_image),u_texsize:new i.Uniform2f(ve,X.u_texsize),u_pixel_coord_upper:new i.Uniform2f(ve,X.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(ve,X.u_pixel_coord_lower),u_scale:new i.Uniform3f(ve,X.u_scale),u_fade:new i.Uniform1f(ve,X.u_fade)}},js=function(ve,X){return{u_matrix:new i.UniformMatrix4f(ve,X.u_matrix),u_world:new i.Uniform2f(ve,X.u_world)}},Ks=function(ve,X){return{u_matrix:new i.UniformMatrix4f(ve,X.u_matrix),u_world:new i.Uniform2f(ve,X.u_world),u_image:new i.Uniform1i(ve,X.u_image),u_texsize:new i.Uniform2f(ve,X.u_texsize),u_pixel_coord_upper:new i.Uniform2f(ve,X.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(ve,X.u_pixel_coord_lower),u_scale:new i.Uniform3f(ve,X.u_scale),u_fade:new i.Uniform1f(ve,X.u_fade)}},qo=function(ve){return{u_matrix:ve}},ds=function(ve,X,pe,re){return i.extend(qo(ve),pl(pe,X,re))},hu=function(ve,X){return{u_matrix:ve,u_world:X}},vu=function(ve,X,pe,re,ge){return i.extend(ds(ve,X,pe,re),{u_world:ge})},Vu=function(ve,X){return{u_camera_to_center_distance:new i.Uniform1f(ve,X.u_camera_to_center_distance),u_scale_with_map:new i.Uniform1i(ve,X.u_scale_with_map),u_pitch_with_map:new i.Uniform1i(ve,X.u_pitch_with_map),u_extrude_scale:new i.Uniform2f(ve,X.u_extrude_scale),u_device_pixel_ratio:new i.Uniform1f(ve,X.u_device_pixel_ratio),u_matrix:new i.UniformMatrix4f(ve,X.u_matrix)}},hh=function(ve,X,pe,re){var ge=ve.transform,_e,Ze;if(re.paint.get("circle-pitch-alignment")==="map"){var st=gn(pe,1,ge.zoom);_e=!0,Ze=[st,st]}else _e=!1,Ze=ge.pixelsToGLUnits;return{u_camera_to_center_distance:ge.cameraToCenterDistance,u_scale_with_map:+(re.paint.get("circle-pitch-scale")==="map"),u_matrix:ve.translatePosMatrix(X.posMatrix,pe,re.paint.get("circle-translate"),re.paint.get("circle-translate-anchor")),u_pitch_with_map:+_e,u_device_pixel_ratio:i.browser.devicePixelRatio,u_extrude_scale:Ze}},vh=function(ve,X){return{u_matrix:new i.UniformMatrix4f(ve,X.u_matrix),u_camera_to_center_distance:new i.Uniform1f(ve,X.u_camera_to_center_distance),u_pixels_to_tile_units:new i.Uniform1f(ve,X.u_pixels_to_tile_units),u_extrude_scale:new i.Uniform2f(ve,X.u_extrude_scale),u_overscale_factor:new i.Uniform1f(ve,X.u_overscale_factor)}},dh=function(ve,X){return{u_matrix:new i.UniformMatrix4f(ve,X.u_matrix),u_inv_matrix:new i.UniformMatrix4f(ve,X.u_inv_matrix),u_camera_to_center_distance:new i.Uniform1f(ve,X.u_camera_to_center_distance),u_viewport_size:new i.Uniform2f(ve,X.u_viewport_size)}},ph=function(ve,X,pe){var re=gn(pe,1,X.zoom),ge=Math.pow(2,X.zoom-pe.tileID.overscaledZ),_e=pe.tileID.overscaleFactor();return{u_matrix:ve,u_camera_to_center_distance:X.cameraToCenterDistance,u_pixels_to_tile_units:re,u_extrude_scale:[X.pixelsToGLUnits[0]/(re*ge),X.pixelsToGLUnits[1]/(re*ge)],u_overscale_factor:_e}},Hu=function(ve,X,pe){return{u_matrix:ve,u_inv_matrix:X,u_camera_to_center_distance:pe.cameraToCenterDistance,u_viewport_size:[pe.width,pe.height]}},oc=function(ve,X){return{u_color:new i.UniformColor(ve,X.u_color),u_matrix:new i.UniformMatrix4f(ve,X.u_matrix),u_overlay:new i.Uniform1i(ve,X.u_overlay),u_overlay_scale:new i.Uniform1f(ve,X.u_overlay_scale)}},Vl=function(ve,X,pe){return pe===void 0&&(pe=1),{u_matrix:ve,u_color:X,u_overlay:0,u_overlay_scale:pe}},ro=function(ve,X){return{u_matrix:new i.UniformMatrix4f(ve,X.u_matrix)}},Lo=function(ve){return{u_matrix:ve}},du=function(ve,X){return{u_extrude_scale:new i.Uniform1f(ve,X.u_extrude_scale),u_intensity:new i.Uniform1f(ve,X.u_intensity),u_matrix:new i.UniformMatrix4f(ve,X.u_matrix)}},yl=function(ve,X){return{u_matrix:new i.UniformMatrix4f(ve,X.u_matrix),u_world:new i.Uniform2f(ve,X.u_world),u_image:new i.Uniform1i(ve,X.u_image),u_color_ramp:new i.Uniform1i(ve,X.u_color_ramp),u_opacity:new i.Uniform1f(ve,X.u_opacity)}},pu=function(ve,X,pe,re){return{u_matrix:ve,u_extrude_scale:gn(X,1,pe),u_intensity:re}},Gu=function(ve,X,pe,re){var ge=i.create();i.ortho(ge,0,ve.width,ve.height,0,0,1);var _e=ve.context.gl;return{u_matrix:ge,u_world:[_e.drawingBufferWidth,_e.drawingBufferHeight],u_image:pe,u_color_ramp:re,u_opacity:X.paint.get("heatmap-opacity")}},gh=function(ve,X){return{u_matrix:new i.UniformMatrix4f(ve,X.u_matrix),u_image:new i.Uniform1i(ve,X.u_image),u_latrange:new i.Uniform2f(ve,X.u_latrange),u_light:new i.Uniform2f(ve,X.u_light),u_shadow:new i.UniformColor(ve,X.u_shadow),u_highlight:new i.UniformColor(ve,X.u_highlight),u_accent:new i.UniformColor(ve,X.u_accent)}},sc=function(ve,X){return{u_matrix:new i.UniformMatrix4f(ve,X.u_matrix),u_image:new i.Uniform1i(ve,X.u_image),u_dimension:new i.Uniform2f(ve,X.u_dimension),u_zoom:new i.Uniform1f(ve,X.u_zoom),u_maxzoom:new i.Uniform1f(ve,X.u_maxzoom),u_unpack:new i.Uniform4f(ve,X.u_unpack)}},lc=function(ve,X,pe){var re=pe.paint.get("hillshade-shadow-color"),ge=pe.paint.get("hillshade-highlight-color"),_e=pe.paint.get("hillshade-accent-color"),Ze=pe.paint.get("hillshade-illumination-direction")*(Math.PI/180);pe.paint.get("hillshade-illumination-anchor")==="viewport"&&(Ze-=ve.transform.angle);var st=!ve.options.moving;return{u_matrix:ve.transform.calculatePosMatrix(X.tileID.toUnwrapped(),st),u_image:0,u_latrange:Js(ve,X.tileID),u_light:[pe.paint.get("hillshade-exaggeration"),Ze],u_shadow:re,u_highlight:ge,u_accent:_e}},Ef=function(ve,X,pe){var re=X.stride,ge=i.create();return i.ortho(ge,0,i.EXTENT,-i.EXTENT,0,0,1),i.translate(ge,ge,[0,-i.EXTENT,0]),{u_matrix:ge,u_image:1,u_dimension:[re,re],u_zoom:ve.overscaledZ,u_maxzoom:pe,u_unpack:X.getUnpackVector()}};function Js(ve,X){var pe=Math.pow(2,X.canonical.z),re=X.canonical.y;return[new i.MercatorCoordinate(0,re/pe).toLngLat().lat,new i.MercatorCoordinate(0,(re+1)/pe).toLngLat().lat]}var Oi=function(ve,X){return{u_matrix:new i.UniformMatrix4f(ve,X.u_matrix),u_ratio:new i.Uniform1f(ve,X.u_ratio),u_device_pixel_ratio:new i.Uniform1f(ve,X.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(ve,X.u_units_to_pixels)}},ps=function(ve,X){return{u_matrix:new i.UniformMatrix4f(ve,X.u_matrix),u_ratio:new i.Uniform1f(ve,X.u_ratio),u_device_pixel_ratio:new i.Uniform1f(ve,X.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(ve,X.u_units_to_pixels),u_image:new i.Uniform1i(ve,X.u_image)}},Cf=function(ve,X){return{u_matrix:new i.UniformMatrix4f(ve,X.u_matrix),u_texsize:new i.Uniform2f(ve,X.u_texsize),u_ratio:new i.Uniform1f(ve,X.u_ratio),u_device_pixel_ratio:new i.Uniform1f(ve,X.u_device_pixel_ratio),u_image:new i.Uniform1i(ve,X.u_image),u_units_to_pixels:new i.Uniform2f(ve,X.u_units_to_pixels),u_scale:new i.Uniform3f(ve,X.u_scale),u_fade:new i.Uniform1f(ve,X.u_fade)}},uc=function(ve,X){return{u_matrix:new i.UniformMatrix4f(ve,X.u_matrix),u_ratio:new i.Uniform1f(ve,X.u_ratio),u_device_pixel_ratio:new i.Uniform1f(ve,X.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(ve,X.u_units_to_pixels),u_patternscale_a:new i.Uniform2f(ve,X.u_patternscale_a),u_patternscale_b:new i.Uniform2f(ve,X.u_patternscale_b),u_sdfgamma:new i.Uniform1f(ve,X.u_sdfgamma),u_image:new i.Uniform1i(ve,X.u_image),u_tex_y_a:new i.Uniform1f(ve,X.u_tex_y_a),u_tex_y_b:new i.Uniform1f(ve,X.u_tex_y_b),u_mix:new i.Uniform1f(ve,X.u_mix)}},ml=function(ve,X,pe){var re=ve.transform;return{u_matrix:_s(ve,X,pe),u_ratio:1/gn(X,1,re.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_units_to_pixels:[1/re.pixelsToGLUnits[0],1/re.pixelsToGLUnits[1]]}},Wu=function(ve,X,pe){return i.extend(ml(ve,X,pe),{u_image:0})},es=function(ve,X,pe,re){var ge=ve.transform,_e=Fs(X,ge);return{u_matrix:_s(ve,X,pe),u_texsize:X.imageAtlasTexture.size,u_ratio:1/gn(X,1,ge.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_image:0,u_scale:[_e,re.fromScale,re.toScale],u_fade:re.t,u_units_to_pixels:[1/ge.pixelsToGLUnits[0],1/ge.pixelsToGLUnits[1]]}},Yu=function(ve,X,pe,re,ge){var _e=ve.transform,Ze=ve.lineAtlas,st=Fs(X,_e),mt=pe.layout.get("line-cap")==="round",Nt=Ze.getDash(re.from,mt),Jt=Ze.getDash(re.to,mt),ur=Nt.width*ge.fromScale,yr=Jt.width*ge.toScale;return i.extend(ml(ve,X,pe),{u_patternscale_a:[st/ur,-Nt.height/2],u_patternscale_b:[st/yr,-Jt.height/2],u_sdfgamma:Ze.width/(Math.min(ur,yr)*256*i.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:Nt.y,u_tex_y_b:Jt.y,u_mix:ge.t})};function Fs(ve,X){return 1/gn(ve,1,X.tileZoom)}function _s(ve,X,pe){return ve.translatePosMatrix(X.tileID.posMatrix,X,pe.paint.get("line-translate"),pe.paint.get("line-translate-anchor"))}var Lf=function(ve,X){return{u_matrix:new i.UniformMatrix4f(ve,X.u_matrix),u_tl_parent:new i.Uniform2f(ve,X.u_tl_parent),u_scale_parent:new i.Uniform1f(ve,X.u_scale_parent),u_buffer_scale:new i.Uniform1f(ve,X.u_buffer_scale),u_fade_t:new i.Uniform1f(ve,X.u_fade_t),u_opacity:new i.Uniform1f(ve,X.u_opacity),u_image0:new i.Uniform1i(ve,X.u_image0),u_image1:new i.Uniform1i(ve,X.u_image1),u_brightness_low:new i.Uniform1f(ve,X.u_brightness_low),u_brightness_high:new i.Uniform1f(ve,X.u_brightness_high),u_saturation_factor:new i.Uniform1f(ve,X.u_saturation_factor),u_contrast_factor:new i.Uniform1f(ve,X.u_contrast_factor),u_spin_weights:new i.Uniform3f(ve,X.u_spin_weights)}},Hl=function(ve,X,pe,re,ge){return{u_matrix:ve,u_tl_parent:X,u_scale_parent:pe,u_buffer_scale:1,u_fade_t:re.mix,u_opacity:re.opacity*ge.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:ge.paint.get("raster-brightness-min"),u_brightness_high:ge.paint.get("raster-brightness-max"),u_saturation_factor:Zu(ge.paint.get("raster-saturation")),u_contrast_factor:xl(ge.paint.get("raster-contrast")),u_spin_weights:si(ge.paint.get("raster-hue-rotate"))}};function si(ve){ve*=Math.PI/180;var X=Math.sin(ve),pe=Math.cos(ve);return[(2*pe+1)/3,(-Math.sqrt(3)*X-pe+1)/3,(Math.sqrt(3)*X-pe+1)/3]}function xl(ve){return ve>0?1/(1-ve):1+ve}function Zu(ve){return ve>0?1-1/(1.001-ve):-ve}var Xu=function(ve,X){return{u_is_size_zoom_constant:new i.Uniform1i(ve,X.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(ve,X.u_is_size_feature_constant),u_size_t:new i.Uniform1f(ve,X.u_size_t),u_size:new i.Uniform1f(ve,X.u_size),u_camera_to_center_distance:new i.Uniform1f(ve,X.u_camera_to_center_distance),u_pitch:new i.Uniform1f(ve,X.u_pitch),u_rotate_symbol:new i.Uniform1i(ve,X.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(ve,X.u_aspect_ratio),u_fade_change:new i.Uniform1f(ve,X.u_fade_change),u_matrix:new i.UniformMatrix4f(ve,X.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(ve,X.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(ve,X.u_coord_matrix),u_is_text:new i.Uniform1i(ve,X.u_is_text),u_pitch_with_map:new i.Uniform1i(ve,X.u_pitch_with_map),u_texsize:new i.Uniform2f(ve,X.u_texsize),u_texture:new i.Uniform1i(ve,X.u_texture)}},Qs=function(ve,X){return{u_is_size_zoom_constant:new i.Uniform1i(ve,X.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(ve,X.u_is_size_feature_constant),u_size_t:new i.Uniform1f(ve,X.u_size_t),u_size:new i.Uniform1f(ve,X.u_size),u_camera_to_center_distance:new i.Uniform1f(ve,X.u_camera_to_center_distance),u_pitch:new i.Uniform1f(ve,X.u_pitch),u_rotate_symbol:new i.Uniform1i(ve,X.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(ve,X.u_aspect_ratio),u_fade_change:new i.Uniform1f(ve,X.u_fade_change),u_matrix:new i.UniformMatrix4f(ve,X.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(ve,X.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(ve,X.u_coord_matrix),u_is_text:new i.Uniform1i(ve,X.u_is_text),u_pitch_with_map:new i.Uniform1i(ve,X.u_pitch_with_map),u_texsize:new i.Uniform2f(ve,X.u_texsize),u_texture:new i.Uniform1i(ve,X.u_texture),u_gamma_scale:new i.Uniform1f(ve,X.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(ve,X.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(ve,X.u_is_halo)}},yh=function(ve,X){return{u_is_size_zoom_constant:new i.Uniform1i(ve,X.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(ve,X.u_is_size_feature_constant),u_size_t:new i.Uniform1f(ve,X.u_size_t),u_size:new i.Uniform1f(ve,X.u_size),u_camera_to_center_distance:new i.Uniform1f(ve,X.u_camera_to_center_distance),u_pitch:new i.Uniform1f(ve,X.u_pitch),u_rotate_symbol:new i.Uniform1i(ve,X.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(ve,X.u_aspect_ratio),u_fade_change:new i.Uniform1f(ve,X.u_fade_change),u_matrix:new i.UniformMatrix4f(ve,X.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(ve,X.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(ve,X.u_coord_matrix),u_is_text:new i.Uniform1i(ve,X.u_is_text),u_pitch_with_map:new i.Uniform1i(ve,X.u_pitch_with_map),u_texsize:new i.Uniform2f(ve,X.u_texsize),u_texsize_icon:new i.Uniform2f(ve,X.u_texsize_icon),u_texture:new i.Uniform1i(ve,X.u_texture),u_texture_icon:new i.Uniform1i(ve,X.u_texture_icon),u_gamma_scale:new i.Uniform1f(ve,X.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(ve,X.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(ve,X.u_is_halo)}},Pf=function(ve,X,pe,re,ge,_e,Ze,st,mt,Nt){var Jt=ge.transform;return{u_is_size_zoom_constant:+(ve==="constant"||ve==="source"),u_is_size_feature_constant:+(ve==="constant"||ve==="camera"),u_size_t:X?X.uSizeT:0,u_size:X?X.uSize:0,u_camera_to_center_distance:Jt.cameraToCenterDistance,u_pitch:Jt.pitch/360*2*Math.PI,u_rotate_symbol:+pe,u_aspect_ratio:Jt.width/Jt.height,u_fade_change:ge.options.fadeDuration?ge.symbolFadeChange:1,u_matrix:_e,u_label_plane_matrix:Ze,u_coord_matrix:st,u_is_text:+mt,u_pitch_with_map:+re,u_texsize:Nt,u_texture:0}},Gl=function(ve,X,pe,re,ge,_e,Ze,st,mt,Nt,Jt){var ur=ge.transform;return i.extend(Pf(ve,X,pe,re,ge,_e,Ze,st,mt,Nt),{u_gamma_scale:re?Math.cos(ur._pitch)*ur.cameraToCenterDistance:1,u_device_pixel_ratio:i.browser.devicePixelRatio,u_is_halo:+Jt})},Rf=function(ve,X,pe,re,ge,_e,Ze,st,mt,Nt){return i.extend(Gl(ve,X,pe,re,ge,_e,Ze,st,!0,mt,!0),{u_texsize_icon:Nt,u_texture_icon:1})},fc=function(ve,X){return{u_matrix:new i.UniformMatrix4f(ve,X.u_matrix),u_opacity:new i.Uniform1f(ve,X.u_opacity),u_color:new i.UniformColor(ve,X.u_color)}},zs=function(ve,X){return{u_matrix:new i.UniformMatrix4f(ve,X.u_matrix),u_opacity:new i.Uniform1f(ve,X.u_opacity),u_image:new i.Uniform1i(ve,X.u_image),u_pattern_tl_a:new i.Uniform2f(ve,X.u_pattern_tl_a),u_pattern_br_a:new i.Uniform2f(ve,X.u_pattern_br_a),u_pattern_tl_b:new i.Uniform2f(ve,X.u_pattern_tl_b),u_pattern_br_b:new i.Uniform2f(ve,X.u_pattern_br_b),u_texsize:new i.Uniform2f(ve,X.u_texsize),u_mix:new i.Uniform1f(ve,X.u_mix),u_pattern_size_a:new i.Uniform2f(ve,X.u_pattern_size_a),u_pattern_size_b:new i.Uniform2f(ve,X.u_pattern_size_b),u_scale_a:new i.Uniform1f(ve,X.u_scale_a),u_scale_b:new i.Uniform1f(ve,X.u_scale_b),u_pixel_coord_upper:new i.Uniform2f(ve,X.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(ve,X.u_pixel_coord_lower),u_tile_units_to_pixels:new i.Uniform1f(ve,X.u_tile_units_to_pixels)}},$s=function(ve,X,pe){return{u_matrix:ve,u_opacity:X,u_color:pe}},bl=function(ve,X,pe,re,ge,_e){return i.extend(Sf(re,_e,pe,ge),{u_matrix:ve,u_opacity:X})},wl={fillExtrusion:zi,fillExtrusionPattern:cu,fill:ks,fillPattern:Xs,fillOutline:js,fillOutlinePattern:Ks,circle:Vu,collisionBox:vh,collisionCircle:dh,debug:oc,clippingMask:ro,heatmap:du,heatmapTexture:yl,hillshade:gh,hillshadePrepare:sc,line:Oi,lineGradient:ps,linePattern:Cf,lineSDF:uc,raster:Lf,symbolIcon:Xu,symbolSDF:Qs,symbolTextAndIcon:yh,background:fc,backgroundPattern:zs},Po;function _o(ve,X,pe,re,ge,_e,Ze){for(var st=ve.context,mt=st.gl,Nt=ve.useProgram("collisionBox"),Jt=[],ur=0,yr=0,Fr=0;Fr0){var zn=i.create(),Yn=Qr;i.mul(zn,Vr.placementInvProjMatrix,ve.transform.glCoordMatrix),i.mul(zn,zn,Vr.placementViewportMatrix),Jt.push({circleArray:Sn,circleOffset:yr,transform:Yn,invTransform:zn}),ur+=Sn.length/4,yr=ur}sn&&Nt.draw(st,mt.LINES,_r.disabled,Yt.disabled,ve.colorModeForRenderPass(),Ct.disabled,ph(Qr,ve.transform,Wr),pe.id,sn.layoutVertexBuffer,sn.indexBuffer,sn.segments,null,ve.transform.zoom,null,null,sn.collisionVertexBuffer)}}if(!(!Ze||!Jt.length)){var Xn=ve.useProgram("collisionCircle"),Zn=new i.StructArrayLayout2f1f2i16;Zn.resize(ur*4),Zn._trim();for(var ra=0,fa=0,ua=Jt;fa=0&&(Gr[Vr.associatedIconIndex]={shiftedAnchor:Ia,angle:Va})}}if(Jt){Fr.clear();for(var Ga=ve.icon.placedSymbolArray,ja=0;ja0){var Ze=i.browser.now(),st=(Ze-ve.timeAdded)/_e,mt=X?(Ze-X.timeAdded)/_e:-1,Nt=pe.getSource(),Jt=ge.coveringZoomLevel({tileSize:Nt.tileSize,roundZoom:Nt.roundZoom}),ur=!X||Math.abs(X.tileID.overscaledZ-Jt)>Math.abs(ve.tileID.overscaledZ-Jt),yr=ur&&ve.refreshedUponExpiration?1:i.clamp(ur?st:1-mt,0,1);return ve.refreshedUponExpiration&&st>=1&&(ve.refreshedUponExpiration=!1),X?{opacity:1,mix:1-yr}:{opacity:yr,mix:0}}else return{opacity:1,mix:0}}function Qu(ve,X,pe){var re=pe.paint.get("background-color"),ge=pe.paint.get("background-opacity");if(ge!==0){var _e=ve.context,Ze=_e.gl,st=ve.transform,mt=st.tileSize,Nt=pe.paint.get("background-pattern");if(!ve.isPatternMissing(Nt)){var Jt=!Nt&&re.a===1&&ge===1&&ve.opaquePassEnabledForLayer()?"opaque":"translucent";if(ve.renderPass===Jt){var ur=Yt.disabled,yr=ve.depthModeForSublayer(0,Jt==="opaque"?_r.ReadWrite:_r.ReadOnly),Fr=ve.colorModeForRenderPass(),Gr=ve.useProgram(Nt?"backgroundPattern":"background"),Wr=st.coveringTiles({tileSize:mt});Nt&&(_e.activeTexture.set(Ze.TEXTURE0),ve.imageManager.bind(ve.context));for(var Vr=pe.getCrossfadeParameters(),Qr=0,sn=Wr;Qr "+pe.overscaledZ);var Qr=Vr+" "+Fr+"kb";gr(ve,Qr),Ze.draw(re,ge.TRIANGLES,st,mt,lt.alphaBlended,Ct.disabled,Vl(_e,i.Color.transparent,Wr),Jt,ve.debugBuffer,ve.quadTriangleIndexBuffer,ve.debugSegments)}function gr(ve,X){ve.initDebugOverlayCanvas();var pe=ve.debugOverlayCanvas,re=ve.context.gl,ge=ve.debugOverlayCanvas.getContext("2d");ge.clearRect(0,0,pe.width,pe.height),ge.shadowColor="white",ge.shadowBlur=2,ge.lineWidth=1.5,ge.strokeStyle="white",ge.textBaseline="top",ge.font="bold 36px Open Sans, sans-serif",ge.fillText(X,5,5),ge.strokeText(X,5,5),ve.debugOverlayTexture.update(pe),ve.debugOverlayTexture.bind(re.LINEAR,re.CLAMP_TO_EDGE)}function ar(ve,X,pe){var re=ve.context,ge=pe.implementation;if(ve.renderPass==="offscreen"){var _e=ge.prerender;_e&&(ve.setCustomLayerDefaults(),re.setColorMode(ve.colorModeForRenderPass()),_e.call(ge,re.gl,ve.transform.customLayerMatrix()),re.setDirty(),ve.setBaseState())}else if(ve.renderPass==="translucent"){ve.setCustomLayerDefaults(),re.setColorMode(ve.colorModeForRenderPass()),re.setStencilMode(Yt.disabled);var Ze=ge.renderingMode==="3d"?new _r(ve.context.gl.LEQUAL,_r.ReadWrite,ve.depthRangeFor3D):ve.depthModeForSublayer(0,_r.ReadOnly);re.setDepthMode(Ze),ge.render(re.gl,ve.transform.customLayerMatrix()),re.setDirty(),ve.setBaseState(),re.bindFramebuffer.set(null)}}var Tr={symbol:Wl,circle:Os,heatmap:mh,line:vc,fill:yu,"fill-extrusion":mu,hillshade:Ju,raster:Ff,background:Qu,debug:Ot,custom:ar},Pr=function(X,pe){this.context=new St(X),this.transform=pe,this._tileTextures={},this.setup(),this.numSublayers=_t.maxUnderzooming+_t.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new ia,this.gpuTimers={}};Pr.prototype.resize=function(X,pe){if(this.width=X*i.browser.devicePixelRatio,this.height=pe*i.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var re=0,ge=this.style._order;re256&&this.clearStencil(),re.setColorMode(lt.disabled),re.setDepthMode(_r.disabled);var _e=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var Ze=0,st=pe;Ze256&&this.clearStencil();var X=this.nextStencilID++,pe=this.context.gl;return new Yt({func:pe.NOTEQUAL,mask:255},X,255,pe.KEEP,pe.KEEP,pe.REPLACE)},Pr.prototype.stencilModeForClipping=function(X){var pe=this.context.gl;return new Yt({func:pe.EQUAL,mask:255},this._tileClippingMaskIDs[X.key],0,pe.KEEP,pe.KEEP,pe.REPLACE)},Pr.prototype.stencilConfigForOverlap=function(X){var pe,re=this.context.gl,ge=X.sort(function(Nt,Jt){return Jt.overscaledZ-Nt.overscaledZ}),_e=ge[ge.length-1].overscaledZ,Ze=ge[0].overscaledZ-_e+1;if(Ze>1){this.currentStencilSource=void 0,this.nextStencilID+Ze>256&&this.clearStencil();for(var st={},mt=0;mt=0;this.currentLayer--){var zn=this.style._layers[ge[this.currentLayer]],Yn=_e[zn.source],Xn=mt[zn.source];this._renderTileClippingMasks(zn,Xn),this.renderLayer(this,Yn,zn,Xn)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?pe.pop():null},Pr.prototype.isPatternMissing=function(X){if(!X)return!1;if(!X.from||!X.to)return!0;var pe=this.imageManager.getPattern(X.from.toString()),re=this.imageManager.getPattern(X.to.toString());return!pe||!re},Pr.prototype.useProgram=function(X,pe){this.cache=this.cache||{};var re=""+X+(pe?pe.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[re]||(this.cache[re]=new Ul(this.context,ic[X],pe,wl[X],this._showOverdrawInspector)),this.cache[re]},Pr.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()},Pr.prototype.setBaseState=function(){var X=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(X.FUNC_ADD)},Pr.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=i.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var X=this.context.gl;this.debugOverlayTexture=new i.Texture(this.context,this.debugOverlayCanvas,X.RGBA)}},Pr.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var Yr=function(X,pe){this.points=X,this.planes=pe};Yr.fromInvProjectionMatrix=function(X,pe,re){var ge=[[-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]],_e=Math.pow(2,re),Ze=ge.map(function(Nt){return i.transformMat4([],Nt,X)}).map(function(Nt){return i.scale$1([],Nt,1/Nt[3]/pe*_e)}),st=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],mt=st.map(function(Nt){var Jt=i.sub([],Ze[Nt[0]],Ze[Nt[1]]),ur=i.sub([],Ze[Nt[2]],Ze[Nt[1]]),yr=i.normalize([],i.cross([],Jt,ur)),Fr=-i.dot(yr,Ze[Nt[1]]);return yr.concat(Fr)});return new Yr(Ze,mt)};var Jr=function(X,pe){this.min=X,this.max=pe,this.center=i.scale$2([],i.add([],this.min,this.max),.5)};Jr.prototype.quadrant=function(X){for(var pe=[X%2===0,X<2],re=i.clone$2(this.min),ge=i.clone$2(this.max),_e=0;_e=0;if(Ze===0)return 0;Ze!==pe.length&&(re=!1)}if(re)return 2;for(var mt=0;mt<3;mt++){for(var Nt=Number.MAX_VALUE,Jt=-Number.MAX_VALUE,ur=0;urthis.max[mt]-this.min[mt])return 0}return 1};var mn=function(X,pe,re,ge){if(X===void 0&&(X=0),pe===void 0&&(pe=0),re===void 0&&(re=0),ge===void 0&&(ge=0),isNaN(X)||X<0||isNaN(pe)||pe<0||isNaN(re)||re<0||isNaN(ge)||ge<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=X,this.bottom=pe,this.left=re,this.right=ge};mn.prototype.interpolate=function(X,pe,re){return pe.top!=null&&X.top!=null&&(this.top=i.number(X.top,pe.top,re)),pe.bottom!=null&&X.bottom!=null&&(this.bottom=i.number(X.bottom,pe.bottom,re)),pe.left!=null&&X.left!=null&&(this.left=i.number(X.left,pe.left,re)),pe.right!=null&&X.right!=null&&(this.right=i.number(X.right,pe.right,re)),this},mn.prototype.getCenter=function(X,pe){var re=i.clamp((this.left+X-this.right)/2,0,X),ge=i.clamp((this.top+pe-this.bottom)/2,0,pe);return new i.Point(re,ge)},mn.prototype.equals=function(X){return this.top===X.top&&this.bottom===X.bottom&&this.left===X.left&&this.right===X.right},mn.prototype.clone=function(){return new mn(this.top,this.bottom,this.left,this.right)},mn.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var bn=function(X,pe,re,ge,_e){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=_e===void 0?!0:_e,this._minZoom=X||0,this._maxZoom=pe||22,this._minPitch=re??0,this._maxPitch=ge??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new i.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new mn,this._posMatrixCache={},this._alignedPosMatrixCache={}},Rn={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}};bn.prototype.clone=function(){var X=new bn(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return X.tileSize=this.tileSize,X.latRange=this.latRange,X.width=this.width,X.height=this.height,X._center=this._center,X.zoom=this.zoom,X.angle=this.angle,X._fov=this._fov,X._pitch=this._pitch,X._unmodified=this._unmodified,X._edgeInsets=this._edgeInsets.clone(),X._calcMatrices(),X},Rn.minZoom.get=function(){return this._minZoom},Rn.minZoom.set=function(ve){this._minZoom!==ve&&(this._minZoom=ve,this.zoom=Math.max(this.zoom,ve))},Rn.maxZoom.get=function(){return this._maxZoom},Rn.maxZoom.set=function(ve){this._maxZoom!==ve&&(this._maxZoom=ve,this.zoom=Math.min(this.zoom,ve))},Rn.minPitch.get=function(){return this._minPitch},Rn.minPitch.set=function(ve){this._minPitch!==ve&&(this._minPitch=ve,this.pitch=Math.max(this.pitch,ve))},Rn.maxPitch.get=function(){return this._maxPitch},Rn.maxPitch.set=function(ve){this._maxPitch!==ve&&(this._maxPitch=ve,this.pitch=Math.min(this.pitch,ve))},Rn.renderWorldCopies.get=function(){return this._renderWorldCopies},Rn.renderWorldCopies.set=function(ve){ve===void 0?ve=!0:ve===null&&(ve=!1),this._renderWorldCopies=ve},Rn.worldSize.get=function(){return this.tileSize*this.scale},Rn.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Rn.size.get=function(){return new i.Point(this.width,this.height)},Rn.bearing.get=function(){return-this.angle/Math.PI*180},Rn.bearing.set=function(ve){var X=-i.wrap(ve,-180,180)*Math.PI/180;this.angle!==X&&(this._unmodified=!1,this.angle=X,this._calcMatrices(),this.rotationMatrix=i.create$2(),i.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Rn.pitch.get=function(){return this._pitch/Math.PI*180},Rn.pitch.set=function(ve){var X=i.clamp(ve,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==X&&(this._unmodified=!1,this._pitch=X,this._calcMatrices())},Rn.fov.get=function(){return this._fov/Math.PI*180},Rn.fov.set=function(ve){ve=Math.max(.01,Math.min(60,ve)),this._fov!==ve&&(this._unmodified=!1,this._fov=ve/180*Math.PI,this._calcMatrices())},Rn.zoom.get=function(){return this._zoom},Rn.zoom.set=function(ve){var X=Math.min(Math.max(ve,this.minZoom),this.maxZoom);this._zoom!==X&&(this._unmodified=!1,this._zoom=X,this.scale=this.zoomScale(X),this.tileZoom=Math.floor(X),this.zoomFraction=X-this.tileZoom,this._constrain(),this._calcMatrices())},Rn.center.get=function(){return this._center},Rn.center.set=function(ve){ve.lat===this._center.lat&&ve.lng===this._center.lng||(this._unmodified=!1,this._center=ve,this._constrain(),this._calcMatrices())},Rn.padding.get=function(){return this._edgeInsets.toJSON()},Rn.padding.set=function(ve){this._edgeInsets.equals(ve)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,ve,1),this._calcMatrices())},Rn.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},bn.prototype.isPaddingEqual=function(X){return this._edgeInsets.equals(X)},bn.prototype.interpolatePadding=function(X,pe,re){this._unmodified=!1,this._edgeInsets.interpolate(X,pe,re),this._constrain(),this._calcMatrices()},bn.prototype.coveringZoomLevel=function(X){var pe=(X.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/X.tileSize));return Math.max(0,pe)},bn.prototype.getVisibleUnwrappedCoordinates=function(X){var pe=[new i.UnwrappedTileID(0,X)];if(this._renderWorldCopies)for(var re=this.pointCoordinate(new i.Point(0,0)),ge=this.pointCoordinate(new i.Point(this.width,0)),_e=this.pointCoordinate(new i.Point(this.width,this.height)),Ze=this.pointCoordinate(new i.Point(0,this.height)),st=Math.floor(Math.min(re.x,ge.x,_e.x,Ze.x)),mt=Math.floor(Math.max(re.x,ge.x,_e.x,Ze.x)),Nt=1,Jt=st-Nt;Jt<=mt+Nt;Jt++)Jt!==0&&pe.push(new i.UnwrappedTileID(Jt,X));return pe},bn.prototype.coveringTiles=function(X){var pe=this.coveringZoomLevel(X),re=pe;if(X.minzoom!==void 0&&peX.maxzoom&&(pe=X.maxzoom);var ge=i.MercatorCoordinate.fromLngLat(this.center),_e=Math.pow(2,pe),Ze=[_e*ge.x,_e*ge.y,0],st=Yr.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,pe),mt=X.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(mt=pe);var Nt=3,Jt=function(wa){return{aabb:new Jr([wa*_e,0,0],[(wa+1)*_e,_e,0]),zoom:0,x:0,y:0,wrap:wa,fullyVisible:!1}},ur=[],yr=[],Fr=pe,Gr=X.reparseOverscaled?re:pe;if(this._renderWorldCopies)for(var Wr=1;Wr<=3;Wr++)ur.push(Jt(-Wr)),ur.push(Jt(Wr));for(ur.push(Jt(0));ur.length>0;){var Vr=ur.pop(),Qr=Vr.x,sn=Vr.y,Sn=Vr.fullyVisible;if(!Sn){var zn=Vr.aabb.intersects(st);if(zn===0)continue;Sn=zn===2}var Yn=Vr.aabb.distanceX(Ze),Xn=Vr.aabb.distanceY(Ze),Zn=Math.max(Math.abs(Yn),Math.abs(Xn)),ra=Nt+(1<ra&&Vr.zoom>=mt){yr.push({tileID:new i.OverscaledTileID(Vr.zoom===Fr?Gr:Vr.zoom,Vr.wrap,Vr.zoom,Qr,sn),distanceSq:i.sqrLen([Ze[0]-.5-Qr,Ze[1]-.5-sn])});continue}for(var fa=0;fa<4;fa++){var ua=(Qr<<1)+fa%2,pa=(sn<<1)+(fa>>1);ur.push({aabb:Vr.aabb.quadrant(fa),zoom:Vr.zoom+1,x:ua,y:pa,wrap:Vr.wrap,fullyVisible:Sn})}}return yr.sort(function(wa,Ia){return wa.distanceSq-Ia.distanceSq}).map(function(wa){return wa.tileID})},bn.prototype.resize=function(X,pe){this.width=X,this.height=pe,this.pixelsToGLUnits=[2/X,-2/pe],this._constrain(),this._calcMatrices()},Rn.unmodified.get=function(){return this._unmodified},bn.prototype.zoomScale=function(X){return Math.pow(2,X)},bn.prototype.scaleZoom=function(X){return Math.log(X)/Math.LN2},bn.prototype.project=function(X){var pe=i.clamp(X.lat,-this.maxValidLatitude,this.maxValidLatitude);return new i.Point(i.mercatorXfromLng(X.lng)*this.worldSize,i.mercatorYfromLat(pe)*this.worldSize)},bn.prototype.unproject=function(X){return new i.MercatorCoordinate(X.x/this.worldSize,X.y/this.worldSize).toLngLat()},Rn.point.get=function(){return this.project(this.center)},bn.prototype.setLocationAtPoint=function(X,pe){var re=this.pointCoordinate(pe),ge=this.pointCoordinate(this.centerPoint),_e=this.locationCoordinate(X),Ze=new i.MercatorCoordinate(_e.x-(re.x-ge.x),_e.y-(re.y-ge.y));this.center=this.coordinateLocation(Ze),this._renderWorldCopies&&(this.center=this.center.wrap())},bn.prototype.locationPoint=function(X){return this.coordinatePoint(this.locationCoordinate(X))},bn.prototype.pointLocation=function(X){return this.coordinateLocation(this.pointCoordinate(X))},bn.prototype.locationCoordinate=function(X){return i.MercatorCoordinate.fromLngLat(X)},bn.prototype.coordinateLocation=function(X){return X.toLngLat()},bn.prototype.pointCoordinate=function(X){var pe=0,re=[X.x,X.y,0,1],ge=[X.x,X.y,1,1];i.transformMat4(re,re,this.pixelMatrixInverse),i.transformMat4(ge,ge,this.pixelMatrixInverse);var _e=re[3],Ze=ge[3],st=re[0]/_e,mt=ge[0]/Ze,Nt=re[1]/_e,Jt=ge[1]/Ze,ur=re[2]/_e,yr=ge[2]/Ze,Fr=ur===yr?0:(pe-ur)/(yr-ur);return new i.MercatorCoordinate(i.number(st,mt,Fr)/this.worldSize,i.number(Nt,Jt,Fr)/this.worldSize)},bn.prototype.coordinatePoint=function(X){var pe=[X.x*this.worldSize,X.y*this.worldSize,0,1];return i.transformMat4(pe,pe,this.pixelMatrix),new i.Point(pe[0]/pe[3],pe[1]/pe[3])},bn.prototype.getBounds=function(){return new i.LngLatBounds().extend(this.pointLocation(new i.Point(0,0))).extend(this.pointLocation(new i.Point(this.width,0))).extend(this.pointLocation(new i.Point(this.width,this.height))).extend(this.pointLocation(new i.Point(0,this.height)))},bn.prototype.getMaxBounds=function(){return!this.latRange||this.latRange.length!==2||!this.lngRange||this.lngRange.length!==2?null:new i.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]])},bn.prototype.setMaxBounds=function(X){X?(this.lngRange=[X.getWest(),X.getEast()],this.latRange=[X.getSouth(),X.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},bn.prototype.calculatePosMatrix=function(X,pe){pe===void 0&&(pe=!1);var re=X.key,ge=pe?this._alignedPosMatrixCache:this._posMatrixCache;if(ge[re])return ge[re];var _e=X.canonical,Ze=this.worldSize/this.zoomScale(_e.z),st=_e.x+Math.pow(2,_e.z)*X.wrap,mt=i.identity(new Float64Array(16));return i.translate(mt,mt,[st*Ze,_e.y*Ze,0]),i.scale(mt,mt,[Ze/i.EXTENT,Ze/i.EXTENT,1]),i.multiply(mt,pe?this.alignedProjMatrix:this.projMatrix,mt),ge[re]=new Float32Array(mt),ge[re]},bn.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},bn.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var X=-90,pe=90,re=-180,ge=180,_e,Ze,st,mt,Nt=this.size,Jt=this._unmodified;if(this.latRange){var ur=this.latRange;X=i.mercatorYfromLat(ur[1])*this.worldSize,pe=i.mercatorYfromLat(ur[0])*this.worldSize,_e=pe-Xpe&&(mt=pe-Vr)}if(this.lngRange){var Qr=Fr.x,sn=Nt.x/2;Qr-snge&&(st=ge-sn)}(st!==void 0||mt!==void 0)&&(this.center=this.unproject(new i.Point(st!==void 0?st:Fr.x,mt!==void 0?mt:Fr.y))),this._unmodified=Jt,this._constraining=!1}},bn.prototype._calcMatrices=function(){if(this.height){var X=this._fov/2,pe=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(X)*this.height;var re=Math.PI/2+this._pitch,ge=this._fov*(.5+pe.y/this.height),_e=Math.sin(ge)*this.cameraToCenterDistance/Math.sin(i.clamp(Math.PI-re-ge,.01,Math.PI-.01)),Ze=this.point,st=Ze.x,mt=Ze.y,Nt=Math.cos(Math.PI/2-this._pitch)*_e+this.cameraToCenterDistance,Jt=Nt*1.01,ur=this.height/50,yr=new Float64Array(16);i.perspective(yr,this._fov,this.width/this.height,ur,Jt),yr[8]=-pe.x*2/this.width,yr[9]=pe.y*2/this.height,i.scale(yr,yr,[1,-1,1]),i.translate(yr,yr,[0,0,-this.cameraToCenterDistance]),i.rotateX(yr,yr,this._pitch),i.rotateZ(yr,yr,this.angle),i.translate(yr,yr,[-st,-mt,0]),this.mercatorMatrix=i.scale([],yr,[this.worldSize,this.worldSize,this.worldSize]),i.scale(yr,yr,[1,1,i.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=yr,this.invProjMatrix=i.invert([],this.projMatrix);var Fr=this.width%2/2,Gr=this.height%2/2,Wr=Math.cos(this.angle),Vr=Math.sin(this.angle),Qr=st-Math.round(st)+Wr*Fr+Vr*Gr,sn=mt-Math.round(mt)+Wr*Gr+Vr*Fr,Sn=new Float64Array(yr);if(i.translate(Sn,Sn,[Qr>.5?Qr-1:Qr,sn>.5?sn-1:sn,0]),this.alignedProjMatrix=Sn,yr=i.create(),i.scale(yr,yr,[this.width/2,-this.height/2,1]),i.translate(yr,yr,[1,-1,0]),this.labelPlaneMatrix=yr,yr=i.create(),i.scale(yr,yr,[1,-1,1]),i.translate(yr,yr,[-1,-1,0]),i.scale(yr,yr,[2/this.width,2/this.height,1]),this.glCoordMatrix=yr,this.pixelMatrix=i.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),yr=i.invert(new Float64Array(16),this.pixelMatrix),!yr)throw new Error("failed to invert matrix");this.pixelMatrixInverse=yr,this._posMatrixCache={},this._alignedPosMatrixCache={}}},bn.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var X=this.pointCoordinate(new i.Point(0,0)),pe=[X.x*this.worldSize,X.y*this.worldSize,0,1],re=i.transformMat4(pe,pe,this.pixelMatrix);return re[3]/this.cameraToCenterDistance},bn.prototype.getCameraPoint=function(){var X=this._pitch,pe=Math.tan(X)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new i.Point(0,pe))},bn.prototype.getCameraQueryGeometry=function(X){var pe=this.getCameraPoint();if(X.length===1)return[X[0],pe];for(var re=pe.x,ge=pe.y,_e=pe.x,Ze=pe.y,st=0,mt=X;st=3&&!X.some(function(re){return isNaN(re)})){var pe=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(X[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+X[2],+X[1]],zoom:+X[0],bearing:pe,pitch:+(X[4]||0)}),!0}return!1},Ca.prototype._updateHashUnthrottled=function(){var X=this.getHashString();try{i.window.history.replaceState(i.window.history.state,"",X)}catch{}};var Ra={linearity:.3,easing:i.bezier(0,0,.3,1)},Da=i.extend({deceleration:2500,maxSpeed:1400},Ra),ka=i.extend({deceleration:20,maxSpeed:1400},Ra),ai=i.extend({deceleration:1e3,maxSpeed:360},Ra),Di=i.extend({deceleration:1e3,maxSpeed:90},Ra),di=function(X){this._map=X,this.clear()};di.prototype.clear=function(){this._inertiaBuffer=[]},di.prototype.record=function(X){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:i.browser.now(),settings:X})},di.prototype._drainInertiaBuffer=function(){for(var X=this._inertiaBuffer,pe=i.browser.now(),re=160;X.length>0&&pe-X[0].time>re;)X.shift()},di.prototype._onMoveEnd=function(X){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var pe={zoom:0,bearing:0,pitch:0,pan:new i.Point(0,0),pinchAround:void 0,around:void 0},re=0,ge=this._inertiaBuffer;re=this._clickTolerance||this._map.fire(new Ve(X.type,this._map,X))},it.prototype.dblclick=function(X){return this._firePreventable(new Ve(X.type,this._map,X))},it.prototype.mouseover=function(X){this._map.fire(new Ve(X.type,this._map,X))},it.prototype.mouseout=function(X){this._map.fire(new Ve(X.type,this._map,X))},it.prototype.touchstart=function(X){return this._firePreventable(new Qe(X.type,this._map,X))},it.prototype.touchmove=function(X){this._map.fire(new Qe(X.type,this._map,X))},it.prototype.touchend=function(X){this._map.fire(new Qe(X.type,this._map,X))},it.prototype.touchcancel=function(X){this._map.fire(new Qe(X.type,this._map,X))},it.prototype._firePreventable=function(X){if(this._map.fire(X),X.defaultPrevented)return{}},it.prototype.isEnabled=function(){return!0},it.prototype.isActive=function(){return!1},it.prototype.enable=function(){},it.prototype.disable=function(){};var Rt=function(X){this._map=X};Rt.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Rt.prototype.mousemove=function(X){this._map.fire(new Ve(X.type,this._map,X))},Rt.prototype.mousedown=function(){this._delayContextMenu=!0},Rt.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Ve("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Rt.prototype.contextmenu=function(X){this._delayContextMenu?this._contextMenuEvent=X:this._map.fire(new Ve(X.type,this._map,X)),this._map.listens("contextmenu")&&X.preventDefault()},Rt.prototype.isEnabled=function(){return!0},Rt.prototype.isActive=function(){return!1},Rt.prototype.enable=function(){},Rt.prototype.disable=function(){};var ht=function(X,pe){this._map=X,this._el=X.getCanvasContainer(),this._container=X.getContainer(),this._clickTolerance=pe.clickTolerance||1};ht.prototype.isEnabled=function(){return!!this._enabled},ht.prototype.isActive=function(){return!!this._active},ht.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},ht.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},ht.prototype.mousedown=function(X,pe){this.isEnabled()&&X.shiftKey&&X.button===0&&(A.disableDrag(),this._startPos=this._lastPos=pe,this._active=!0)},ht.prototype.mousemoveWindow=function(X,pe){if(this._active){var re=pe;if(!(this._lastPos.equals(re)||!this._box&&re.dist(this._startPos)this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=X.timeStamp),re.length===this.numTouches&&(this.centroid=er(pe),this.touches=Ut(re,pe)))},Kr.prototype.touchmove=function(X,pe,re){if(!(this.aborted||!this.centroid)){var ge=Ut(re,pe);for(var _e in this.touches){var Ze=this.touches[_e],st=ge[_e];(!st||st.dist(Ze)>Sr)&&(this.aborted=!0)}}},Kr.prototype.touchend=function(X,pe,re){if((!this.centroid||X.timeStamp-this.startTime>Lr)&&(this.aborted=!0),re.length===0){var ge=!this.aborted&&this.centroid;if(this.reset(),ge)return ge}};var en=function(X){this.singleTap=new Kr(X),this.numTaps=X.numTaps,this.reset()};en.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},en.prototype.touchstart=function(X,pe,re){this.singleTap.touchstart(X,pe,re)},en.prototype.touchmove=function(X,pe,re){this.singleTap.touchmove(X,pe,re)},en.prototype.touchend=function(X,pe,re){var ge=this.singleTap.touchend(X,pe,re);if(ge){var _e=X.timeStamp-this.lastTime0&&(this._active=!0);var ge=Ut(re,pe),_e=new i.Point(0,0),Ze=new i.Point(0,0),st=0;for(var mt in ge){var Nt=ge[mt],Jt=this._touches[mt];Jt&&(_e._add(Nt),Ze._add(Nt.sub(Jt)),st++,ge[mt]=Nt)}if(this._touches=ge,!(stMath.abs(ve.x)}var li=100,Bn=function(ve){function X(){ve.apply(this,arguments)}return ve&&(X.__proto__=ve),X.prototype=Object.create(ve&&ve.prototype),X.prototype.constructor=X,X.prototype.reset=function(){ve.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},X.prototype._start=function(re){this._lastPoints=re,ei(re[0].sub(re[1]))&&(this._valid=!1)},X.prototype._move=function(re,ge,_e){var Ze=re[0].sub(this._lastPoints[0]),st=re[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(Ze,st,_e.timeStamp),!!this._valid){this._lastPoints=re,this._active=!0;var mt=(Ze.y+st.y)/2,Nt=-.5;return{pitchDelta:mt*Nt}}},X.prototype.gestureBeginsVertically=function(re,ge,_e){if(this._valid!==void 0)return this._valid;var Ze=2,st=re.mag()>=Ze,mt=ge.mag()>=Ze;if(!(!st&&!mt)){if(!st||!mt)return this._firstMove===void 0&&(this._firstMove=_e),_e-this._firstMove0==ge.y>0;return ei(re)&&ei(ge)&&Nt}},X}(Kn),Na={panStep:100,bearingStep:15,pitchStep:10},_a=function(){var X=Na;this._panStep=X.panStep,this._bearingStep=X.bearingStep,this._pitchStep=X.pitchStep};_a.prototype.reset=function(){this._active=!1},_a.prototype.keydown=function(X){var pe=this;if(!(X.altKey||X.ctrlKey||X.metaKey)){var re=0,ge=0,_e=0,Ze=0,st=0;switch(X.keyCode){case 61:case 107:case 171:case 187:re=1;break;case 189:case 109:case 173:re=-1;break;case 37:X.shiftKey?ge=-1:(X.preventDefault(),Ze=-1);break;case 39:X.shiftKey?ge=1:(X.preventDefault(),Ze=1);break;case 38:X.shiftKey?_e=1:(X.preventDefault(),st=-1);break;case 40:X.shiftKey?_e=-1:(X.preventDefault(),st=1);break;default:return}return{cameraAnimation:function(mt){var Nt=mt.getZoom();mt.easeTo({duration:300,easeId:"keyboardHandler",easing:Ya,zoom:re?Math.round(Nt)+re*(X.shiftKey?2:1):Nt,bearing:mt.getBearing()+ge*pe._bearingStep,pitch:mt.getPitch()+_e*pe._pitchStep,offset:[-Ze*pe._panStep,-st*pe._panStep],center:mt.getCenter()},{originalEvent:X})}}}},_a.prototype.enable=function(){this._enabled=!0},_a.prototype.disable=function(){this._enabled=!1,this.reset()},_a.prototype.isEnabled=function(){return this._enabled},_a.prototype.isActive=function(){return this._active};function Ya(ve){return ve*(2-ve)}var Mi=4.000244140625,_i=1/100,Bi=1/450,xi=2,fi=function(X,pe){this._map=X,this._el=X.getCanvasContainer(),this._handler=pe,this._delta=0,this._defaultZoomRate=_i,this._wheelZoomRate=Bi,i.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};fi.prototype.setZoomRate=function(X){this._defaultZoomRate=X},fi.prototype.setWheelZoomRate=function(X){this._wheelZoomRate=X},fi.prototype.isEnabled=function(){return!!this._enabled},fi.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},fi.prototype.isZooming=function(){return!!this._zooming},fi.prototype.enable=function(X){this.isEnabled()||(this._enabled=!0,this._aroundCenter=X&&X.around==="center")},fi.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},fi.prototype.wheel=function(X){if(this.isEnabled()){var pe=X.deltaMode===i.window.WheelEvent.DOM_DELTA_LINE?X.deltaY*40:X.deltaY,re=i.browser.now(),ge=re-(this._lastWheelEventTime||0);this._lastWheelEventTime=re,pe!==0&&pe%Mi===0?this._type="wheel":pe!==0&&Math.abs(pe)<4?this._type="trackpad":ge>400?(this._type=null,this._lastValue=pe,this._timeout=setTimeout(this._onTimeout,40,X)):this._type||(this._type=Math.abs(ge*pe)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,pe+=this._lastValue)),X.shiftKey&&pe&&(pe=pe/4),this._type&&(this._lastWheelEvent=X,this._delta-=pe,this._active||this._start(X)),X.preventDefault()}},fi.prototype._onTimeout=function(X){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(X)},fi.prototype._start=function(X){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 pe=A.mousePos(this._el,X);this._around=i.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(pe)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},fi.prototype.renderFrame=function(){return this._onScrollFrame()},fi.prototype._onScrollFrame=function(){var X=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var pe=this._map.transform;if(this._delta!==0){var re=this._type==="wheel"&&Math.abs(this._delta)>Mi?this._wheelZoomRate:this._defaultZoomRate,ge=xi/(1+Math.exp(-Math.abs(this._delta*re)));this._delta<0&&ge!==0&&(ge=1/ge);var _e=typeof this._targetZoom=="number"?pe.zoomScale(this._targetZoom):pe.scale;this._targetZoom=Math.min(pe.maxZoom,Math.max(pe.minZoom,pe.scaleZoom(_e*ge))),this._type==="wheel"&&(this._startZoom=pe.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var Ze=typeof this._targetZoom=="number"?this._targetZoom:pe.zoom,st=this._startZoom,mt=this._easing,Nt=!1,Jt;if(this._type==="wheel"&&st&&mt){var ur=Math.min((i.browser.now()-this._lastWheelEventTime)/200,1),yr=mt(ur);Jt=i.number(st,Ze,yr),ur<1?this._frameId||(this._frameId=!0):Nt=!0}else Jt=Ze,Nt=!0;return this._active=!0,Nt&&(this._active=!1,this._finishTimeout=setTimeout(function(){X._zooming=!1,X._handler._triggerRenderFrame(),delete X._targetZoom,delete X._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!Nt,zoomDelta:Jt-pe.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},fi.prototype._smoothOutEasing=function(X){var pe=i.ease;if(this._prevEase){var re=this._prevEase,ge=(i.browser.now()-re.start)/re.duration,_e=re.easing(ge+.01)-re.easing(ge),Ze=.27/Math.sqrt(_e*_e+1e-4)*.01,st=Math.sqrt(.27*.27-Ze*Ze);pe=i.bezier(Ze,st,.25,1)}return this._prevEase={start:i.browser.now(),duration:X,easing:pe},pe},fi.prototype.reset=function(){this._active=!1};var ga=function(X,pe){this._clickZoom=X,this._tapZoom=pe};ga.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},ga.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},ga.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},ga.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var Ma=function(){this.reset()};Ma.prototype.reset=function(){this._active=!1},Ma.prototype.dblclick=function(X,pe){return X.preventDefault(),{cameraAnimation:function(re){re.easeTo({duration:300,zoom:re.getZoom()+(X.shiftKey?-1:1),around:re.unproject(pe)},{originalEvent:X})}}},Ma.prototype.enable=function(){this._enabled=!0},Ma.prototype.disable=function(){this._enabled=!1,this.reset()},Ma.prototype.isEnabled=function(){return this._enabled},Ma.prototype.isActive=function(){return this._active};var bi=function(){this._tap=new en({numTouches:1,numTaps:1}),this.reset()};bi.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},bi.prototype.touchstart=function(X,pe,re){this._swipePoint||(this._tapTime&&X.timeStamp-this._tapTime>tr&&this.reset(),this._tapTime?re.length>0&&(this._swipePoint=pe[0],this._swipeTouch=re[0].identifier):this._tap.touchstart(X,pe,re))},bi.prototype.touchmove=function(X,pe,re){if(!this._tapTime)this._tap.touchmove(X,pe,re);else if(this._swipePoint){if(re[0].identifier!==this._swipeTouch)return;var ge=pe[0],_e=ge.y-this._swipePoint.y;return this._swipePoint=ge,X.preventDefault(),this._active=!0,{zoomDelta:_e/128}}},bi.prototype.touchend=function(X,pe,re){if(this._tapTime)this._swipePoint&&re.length===0&&this.reset();else{var ge=this._tap.touchend(X,pe,re);ge&&(this._tapTime=X.timeStamp)}},bi.prototype.touchcancel=function(){this.reset()},bi.prototype.enable=function(){this._enabled=!0},bi.prototype.disable=function(){this._enabled=!1,this.reset()},bi.prototype.isEnabled=function(){return this._enabled},bi.prototype.isActive=function(){return this._active};var Ni=function(X,pe,re){this._el=X,this._mousePan=pe,this._touchPan=re};Ni.prototype.enable=function(X){this._inertiaOptions=X||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Ni.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Ni.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Ni.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var zo=function(X,pe,re){this._pitchWithRotate=X.pitchWithRotate,this._mouseRotate=pe,this._mousePitch=re};zo.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},zo.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},zo.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},zo.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var $i=function(X,pe,re,ge){this._el=X,this._touchZoom=pe,this._touchRotate=re,this._tapDragZoom=ge,this._rotationDisabled=!1,this._enabled=!0};$i.prototype.enable=function(X){this._touchZoom.enable(X),this._rotationDisabled||this._touchRotate.enable(X),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},$i.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},$i.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},$i.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},$i.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},$i.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var xo=function(ve){return ve.zoom||ve.drag||ve.pitch||ve.rotate},Ci=function(ve){function X(){ve.apply(this,arguments)}return ve&&(X.__proto__=ve),X.prototype=Object.create(ve&&ve.prototype),X.prototype.constructor=X,X}(i.Event);function Go(ve){return ve.panDelta&&ve.panDelta.mag()||ve.zoomDelta||ve.bearingDelta||ve.pitchDelta}var pi=function(X,pe){this._map=X,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new di(X),this._bearingSnap=pe.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(pe),i.bindAll(["handleEvent","handleWindowEvent"],this);var re=this._el;this._listeners=[[re,"touchstart",{passive:!1}],[re,"touchmove",{passive:!1}],[re,"touchend",void 0],[re,"touchcancel",void 0],[re,"mousedown",void 0],[re,"mousemove",void 0],[re,"mouseup",void 0],[i.window.document,"mousemove",{capture:!0}],[i.window.document,"mouseup",void 0],[re,"mouseover",void 0],[re,"mouseout",void 0],[re,"dblclick",void 0],[re,"click",void 0],[re,"keydown",{capture:!1}],[re,"keyup",void 0],[re,"wheel",{passive:!1}],[re,"contextmenu",void 0],[i.window,"blur",void 0]];for(var ge=0,_e=this._listeners;ge<_e.length;ge+=1){var Ze=_e[ge],st=Ze[0],mt=Ze[1],Nt=Ze[2];A.addEventListener(st,mt,st===i.window.document?this.handleWindowEvent:this.handleEvent,Nt)}};pi.prototype.destroy=function(){for(var X=0,pe=this._listeners;Xst?Math.min(2,Yn):Math.max(.5,Yn),wa=Math.pow(pa,1-fa),Ia=Ze.unproject(Sn.add(zn.mult(fa*wa)).mult(ua));Ze.setLocationAtPoint(Ze.renderWorldCopies?Ia.wrap():Ia,Vr)}_e._fireMoveEvents(ge)},function(fa){_e._afterEase(ge,fa)},re),this},X.prototype._prepareEase=function(re,ge,_e){_e===void 0&&(_e={}),this._moving=!0,!ge&&!_e.moving&&this.fire(new i.Event("movestart",re)),this._zooming&&!_e.zooming&&this.fire(new i.Event("zoomstart",re)),this._rotating&&!_e.rotating&&this.fire(new i.Event("rotatestart",re)),this._pitching&&!_e.pitching&&this.fire(new i.Event("pitchstart",re))},X.prototype._fireMoveEvents=function(re){this.fire(new i.Event("move",re)),this._zooming&&this.fire(new i.Event("zoom",re)),this._rotating&&this.fire(new i.Event("rotate",re)),this._pitching&&this.fire(new i.Event("pitch",re))},X.prototype._afterEase=function(re,ge){if(!(this._easeId&&ge&&this._easeId===ge)){delete this._easeId;var _e=this._zooming,Ze=this._rotating,st=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,_e&&this.fire(new i.Event("zoomend",re)),Ze&&this.fire(new i.Event("rotateend",re)),st&&this.fire(new i.Event("pitchend",re)),this.fire(new i.Event("moveend",re))}},X.prototype.flyTo=function(re,ge){var _e=this;if(!re.essential&&i.browser.prefersReducedMotion){var Ze=i.pick(re,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Ze,ge)}this.stop(),re=i.extend({offset:[0,0],speed:1.2,curve:1.42,easing:i.ease},re);var st=this.transform,mt=this.getZoom(),Nt=this.getBearing(),Jt=this.getPitch(),ur=this.getPadding(),yr="zoom"in re?i.clamp(+re.zoom,st.minZoom,st.maxZoom):mt,Fr="bearing"in re?this._normalizeBearing(re.bearing,Nt):Nt,Gr="pitch"in re?+re.pitch:Jt,Wr="padding"in re?re.padding:st.padding,Vr=st.zoomScale(yr-mt),Qr=i.Point.convert(re.offset),sn=st.centerPoint.add(Qr),Sn=st.pointLocation(sn),zn=i.LngLat.convert(re.center||Sn);this._normalizeCenter(zn);var Yn=st.project(Sn),Xn=st.project(zn).sub(Yn),Zn=re.curve,ra=Math.max(st.width,st.height),fa=ra/Vr,ua=Xn.mag();if("minZoom"in re){var pa=i.clamp(Math.min(re.minZoom,mt,yr),st.minZoom,st.maxZoom),wa=ra/st.zoomScale(pa-mt);Zn=Math.sqrt(wa/ua*2)}var Ia=Zn*Zn;function Va(Ha){var Qa=(fa*fa-ra*ra+(Ha?-1:1)*Ia*Ia*ua*ua)/(2*(Ha?fa:ra)*Ia*ua);return Math.log(Math.sqrt(Qa*Qa+1)-Qa)}function ii(Ha){return(Math.exp(Ha)-Math.exp(-Ha))/2}function Ga(Ha){return(Math.exp(Ha)+Math.exp(-Ha))/2}function ja(Ha){return ii(Ha)/Ga(Ha)}var La=Va(0),oi=function(Ha){return Ga(La)/Ga(La+Zn*Ha)},ui=function(Ha){return ra*((Ga(La)*ja(La+Zn*Ha)-ii(La))/Ia)/ua},ci=(Va(1)-La)/Zn;if(Math.abs(ua)<1e-6||!isFinite(ci)){if(Math.abs(ra-fa)<1e-6)return this.easeTo(re,ge);var Ka=fare.maxDuration&&(re.duration=0),this._zooming=!0,this._rotating=Nt!==Fr,this._pitching=Gr!==Jt,this._padding=!st.isPaddingEqual(Wr),this._prepareEase(ge,!1),this._ease(function(Ha){var Qa=Ha*ci,Ui=1/oi(Qa);st.zoom=Ha===1?yr:mt+st.scaleZoom(Ui),_e._rotating&&(st.bearing=i.number(Nt,Fr,Ha)),_e._pitching&&(st.pitch=i.number(Jt,Gr,Ha)),_e._padding&&(st.interpolatePadding(ur,Wr,Ha),sn=st.centerPoint.add(Qr));var no=Ha===1?zn:st.unproject(Yn.add(Xn.mult(ui(Qa))).mult(Ui));st.setLocationAtPoint(st.renderWorldCopies?no.wrap():no,sn),_e._fireMoveEvents(ge)},function(){return _e._afterEase(ge)},re),this},X.prototype.isEasing=function(){return!!this._easeFrameId},X.prototype.stop=function(){return this._stop()},X.prototype._stop=function(re,ge){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,ge)}if(!re){var Ze=this.handlers;Ze&&Ze.stop()}return this},X.prototype._ease=function(re,ge,_e){_e.animate===!1||_e.duration===0?(re(1),ge()):(this._easeStart=i.browser.now(),this._easeOptions=_e,this._onEaseFrame=re,this._onEaseEnd=ge,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},X.prototype._renderFrameCallback=function(){var re=Math.min((i.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(re)),re<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},X.prototype._normalizeBearing=function(re,ge){re=i.wrap(re,-180,180);var _e=Math.abs(re-ge);return Math.abs(re-360-ge)<_e&&(re-=360),Math.abs(re+360-ge)<_e&&(re+=360),re},X.prototype._normalizeCenter=function(re){var ge=this.transform;if(!(!ge.renderWorldCopies||ge.lngRange)){var _e=re.lng-ge.center.lng;re.lng+=_e>180?-360:_e<-180?360:0}},X}(i.Evented),Wo=function(X){X===void 0&&(X={}),this.options=X,i.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};Wo.prototype.getDefaultPosition=function(){return"bottom-right"},Wo.prototype.onAdd=function(X){var pe=this.options&&this.options.compact;return this._map=X,this._container=A.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._innerContainer=A.create("div","mapboxgl-ctrl-attrib-inner",this._container),pe&&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),pe===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Wo.prototype.onRemove=function(){A.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},Wo.prototype._updateEditLink=function(){var X=this._editLink;X||(X=this._editLink=this._container.querySelector(".mapbox-improve-map"));var pe=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||i.config.ACCESS_TOKEN}];if(X){var re=pe.reduce(function(ge,_e,Ze){return _e.value&&(ge+=_e.key+"="+_e.value+(Ze=0)return!1;return!0});var st=X.join(" | ");st!==this._attribHTML&&(this._attribHTML=st,X.length?(this._innerContainer.innerHTML=st,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Wo.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var Xa=function(){i.bindAll(["_updateLogo"],this),i.bindAll(["_updateCompact"],this)};Xa.prototype.onAdd=function(X){this._map=X,this._container=A.create("div","mapboxgl-ctrl");var pe=A.create("a","mapboxgl-ctrl-logo");return pe.target="_blank",pe.rel="noopener nofollow",pe.href="https://www.mapbox.com/",pe.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),pe.setAttribute("rel","noopener nofollow"),this._container.appendChild(pe),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Xa.prototype.onRemove=function(){A.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Xa.prototype.getDefaultPosition=function(){return"bottom-left"},Xa.prototype._updateLogo=function(X){(!X||X.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},Xa.prototype._logoRequired=function(){if(this._map.style){var X=this._map.style.sourceCaches;for(var pe in X){var re=X[pe].getSource();if(re.mapbox_logo)return!0}return!1}},Xa.prototype._updateCompact=function(){var X=this._container.children;if(X.length){var pe=X[0];this._map.getCanvasContainer().offsetWidth<250?pe.classList.add("mapboxgl-compact"):pe.classList.remove("mapboxgl-compact")}};var wi=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};wi.prototype.add=function(X){var pe=++this._id,re=this._queue;return re.push({callback:X,id:pe,cancelled:!1}),pe},wi.prototype.remove=function(X){for(var pe=this._currentlyRunning,re=pe?this._queue.concat(pe):this._queue,ge=0,_e=re;ge<_e.length;ge+=1){var Ze=_e[ge];if(Ze.id===X){Ze.cancelled=!0;return}}},wi.prototype.run=function(X){X===void 0&&(X=0);var pe=this._currentlyRunning=this._queue;this._queue=[];for(var re=0,ge=pe;rere.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(re.minPitch!=null&&re.maxPitch!=null&&re.minPitch>re.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(re.minPitch!=null&&re.minPitchqu)throw new Error("maxPitch must be less than or equal to "+qu);var _e=new bn(re.minZoom,re.maxZoom,re.minPitch,re.maxPitch,re.renderWorldCopies);if(ve.call(this,_e,re),this._interactive=re.interactive,this._maxTileCacheSize=re.maxTileCacheSize,this._failIfMajorPerformanceCaveat=re.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=re.preserveDrawingBuffer,this._antialias=re.antialias,this._trackResize=re.trackResize,this._bearingSnap=re.bearingSnap,this._refreshExpiredTiles=re.refreshExpiredTiles,this._fadeDuration=re.fadeDuration,this._crossSourceCollisions=re.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=re.collectResourceTiming,this._renderTaskQueue=new wi,this._controls=[],this._mapId=i.uniqueId(),this._locale=i.extend({},yc,re.locale),this._requestManager=new i.RequestManager(re.transformRequest,re.accessToken),typeof re.container=="string"){if(this._container=i.window.document.getElementById(re.container),!this._container)throw new Error("Container '"+re.container+"' not found.")}else if(re.container instanceof xh)this._container=re.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(re.maxBounds&&this.setMaxBounds(re.maxBounds),i.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 ge._update(!1)}),this.on("moveend",function(){return ge._update(!1)}),this.on("zoom",function(){return ge._update(!0)}),typeof i.window<"u"&&(i.window.addEventListener("online",this._onWindowOnline,!1),i.window.addEventListener("resize",this._onWindowResize,!1)),this.handlers=new pi(this,re);var Ze=typeof re.hash=="string"&&re.hash||void 0;this._hash=re.hash&&new Ca(Ze).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:re.center,zoom:re.zoom,bearing:re.bearing,pitch:re.pitch}),re.bounds&&(this.resize(),this.fitBounds(re.bounds,i.extend({},re.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=re.localIdeographFontFamily,re.style&&this.setStyle(re.style,{localIdeographFontFamily:re.localIdeographFontFamily}),re.attributionControl&&this.addControl(new Wo({customAttribution:re.customAttribution})),this.addControl(new Xa,re.logoPosition),this.on("style.load",function(){ge.transform.unmodified&&ge.jumpTo(ge.style.stylesheet)}),this.on("data",function(st){ge._update(st.dataType==="style"),ge.fire(new i.Event(st.dataType+"data",st))}),this.on("dataloading",function(st){ge.fire(new i.Event(st.dataType+"dataloading",st))})}ve&&(X.__proto__=ve),X.prototype=Object.create(ve&&ve.prototype),X.prototype.constructor=X;var pe={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return X.prototype._getMapId=function(){return this._mapId},X.prototype.addControl=function(ge,_e){if(_e===void 0&&ge.getDefaultPosition&&(_e=ge.getDefaultPosition()),_e===void 0&&(_e="top-right"),!ge||!ge.onAdd)return this.fire(new i.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var Ze=ge.onAdd(this);this._controls.push(ge);var st=this._controlPositions[_e];return _e.indexOf("bottom")!==-1?st.insertBefore(Ze,st.firstChild):st.appendChild(Ze),this},X.prototype.removeControl=function(ge){if(!ge||!ge.onRemove)return this.fire(new i.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var _e=this._controls.indexOf(ge);return _e>-1&&this._controls.splice(_e,1),ge.onRemove(this),this},X.prototype.resize=function(ge){var _e=this._containerDimensions(),Ze=_e[0],st=_e[1];this._resizeCanvas(Ze,st),this.transform.resize(Ze,st),this.painter.resize(Ze,st);var mt=!this._moving;return mt&&(this.stop(),this.fire(new i.Event("movestart",ge)).fire(new i.Event("move",ge))),this.fire(new i.Event("resize",ge)),mt&&this.fire(new i.Event("moveend",ge)),this},X.prototype.getBounds=function(){return this.transform.getBounds()},X.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},X.prototype.setMaxBounds=function(ge){return this.transform.setMaxBounds(i.LngLatBounds.convert(ge)),this._update()},X.prototype.setMinZoom=function(ge){if(ge=ge??mc,ge>=mc&&ge<=this.transform.maxZoom)return this.transform.minZoom=ge,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=ge,this._update(),this.getZoom()>ge&&this.setZoom(ge),this;throw new Error("maxZoom must be greater than the current minZoom")},X.prototype.getMaxZoom=function(){return this.transform.maxZoom},X.prototype.setMinPitch=function(ge){if(ge=ge??rs,ge=rs&&ge<=this.transform.maxPitch)return this.transform.minPitch=ge,this._update(),this.getPitch()qu)throw new Error("maxPitch must be less than or equal to "+qu);if(ge>=this.transform.minPitch)return this.transform.maxPitch=ge,this._update(),this.getPitch()>ge&&this.setPitch(ge),this;throw new Error("maxPitch must be greater than the current minPitch")},X.prototype.getMaxPitch=function(){return this.transform.maxPitch},X.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},X.prototype.setRenderWorldCopies=function(ge){return this.transform.renderWorldCopies=ge,this._update()},X.prototype.project=function(ge){return this.transform.locationPoint(i.LngLat.convert(ge))},X.prototype.unproject=function(ge){return this.transform.pointLocation(i.Point.convert(ge))},X.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},X.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},X.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},X.prototype._createDelegatedListener=function(ge,_e,Ze){var st=this,mt;if(ge==="mouseenter"||ge==="mouseover"){var Nt=!1,Jt=function(Vr){var Qr=st.getLayer(_e)?st.queryRenderedFeatures(Vr.point,{layers:[_e]}):[];Qr.length?Nt||(Nt=!0,Ze.call(st,new Ve(ge,st,Vr.originalEvent,{features:Qr}))):Nt=!1},ur=function(){Nt=!1};return{layer:_e,listener:Ze,delegates:{mousemove:Jt,mouseout:ur}}}else if(ge==="mouseleave"||ge==="mouseout"){var yr=!1,Fr=function(Vr){var Qr=st.getLayer(_e)?st.queryRenderedFeatures(Vr.point,{layers:[_e]}):[];Qr.length?yr=!0:yr&&(yr=!1,Ze.call(st,new Ve(ge,st,Vr.originalEvent)))},Gr=function(Vr){yr&&(yr=!1,Ze.call(st,new Ve(ge,st,Vr.originalEvent)))};return{layer:_e,listener:Ze,delegates:{mousemove:Fr,mouseout:Gr}}}else{var Wr=function(Vr){var Qr=st.getLayer(_e)?st.queryRenderedFeatures(Vr.point,{layers:[_e]}):[];Qr.length&&(Vr.features=Qr,Ze.call(st,Vr),delete Vr.features)};return{layer:_e,listener:Ze,delegates:(mt={},mt[ge]=Wr,mt)}}},X.prototype.on=function(ge,_e,Ze){if(Ze===void 0)return ve.prototype.on.call(this,ge,_e);var st=this._createDelegatedListener(ge,_e,Ze);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[ge]=this._delegatedListeners[ge]||[],this._delegatedListeners[ge].push(st);for(var mt in st.delegates)this.on(mt,st.delegates[mt]);return this},X.prototype.once=function(ge,_e,Ze){if(Ze===void 0)return ve.prototype.once.call(this,ge,_e);var st=this._createDelegatedListener(ge,_e,Ze);for(var mt in st.delegates)this.once(mt,st.delegates[mt]);return this},X.prototype.off=function(ge,_e,Ze){var st=this;if(Ze===void 0)return ve.prototype.off.call(this,ge,_e);var mt=function(Nt){for(var Jt=Nt[ge],ur=0;ur180;){var Ze=pe.locationPoint(ve);if(Ze.x>=0&&Ze.y>=0&&Ze.x<=pe.width&&Ze.y<=pe.height)break;ve.lng>pe.center.lng?ve.lng-=360:ve.lng+=360}return ve}var wh={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function jh(ve,X,pe){var re=ve.classList;for(var ge in wh)re.remove("mapboxgl-"+pe+"-anchor-"+ge);re.add("mapboxgl-"+pe+"-anchor-"+X)}var xc=function(ve){function X(pe,re){var ge=this;if(ve.call(this),(pe instanceof i.window.HTMLElement||re)&&(pe=i.extend({element:pe},re)),i.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=pe&&pe.anchor||"center",this._color=pe&&pe.color||"#3FB1CE",this._draggable=pe&&pe.draggable||!1,this._state="inactive",this._rotation=pe&&pe.rotation||0,this._rotationAlignment=pe&&pe.rotationAlignment||"auto",this._pitchAlignment=pe&&pe.pitchAlignment&&pe.pitchAlignment!=="auto"?pe.pitchAlignment:this._rotationAlignment,!pe||!pe.element){this._defaultMarker=!0,this._element=A.create("div"),this._element.setAttribute("aria-label","Map marker");var _e=A.createNS("http://www.w3.org/2000/svg","svg");_e.setAttributeNS(null,"display","block"),_e.setAttributeNS(null,"height","41px"),_e.setAttributeNS(null,"width","27px"),_e.setAttributeNS(null,"viewBox","0 0 27 41");var Ze=A.createNS("http://www.w3.org/2000/svg","g");Ze.setAttributeNS(null,"stroke","none"),Ze.setAttributeNS(null,"stroke-width","1"),Ze.setAttributeNS(null,"fill","none"),Ze.setAttributeNS(null,"fill-rule","evenodd");var st=A.createNS("http://www.w3.org/2000/svg","g");st.setAttributeNS(null,"fill-rule","nonzero");var mt=A.createNS("http://www.w3.org/2000/svg","g");mt.setAttributeNS(null,"transform","translate(3.0, 29.0)"),mt.setAttributeNS(null,"fill","#000000");for(var Nt=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}],Jt=0,ur=Nt;Jtge.getEast()||_e.latitudege.getNorth())},X.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break}},X.prototype._onSuccess=function(re){if(this._map){if(this._isOutOfMapMaxBounds(re)){this._setErrorState(),this.fire(new i.Event("outofmaxbounds",re)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=re,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(re),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(re),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("geolocate",re)),this._finish()}},X.prototype._updateCamera=function(re){var ge=new i.LngLat(re.coords.longitude,re.coords.latitude),_e=re.coords.accuracy,Ze=this._map.getBearing(),st=i.extend({bearing:Ze},this.options.fitBoundsOptions);this._map.fitBounds(ge.toBounds(_e),st,{geolocateSource:!0})},X.prototype._updateMarker=function(re){if(re){var ge=new i.LngLat(re.coords.longitude,re.coords.latitude);this._accuracyCircleMarker.setLngLat(ge).addTo(this._map),this._userLocationDotMarker.setLngLat(ge).addTo(this._map),this._accuracy=re.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},X.prototype._updateCircleRadius=function(){var re=this._map._container.clientHeight/2,ge=this._map.unproject([0,re]),_e=this._map.unproject([1,re]),Ze=ge.distanceTo(_e),st=Math.ceil(2*this._accuracy/Ze);this._circleElement.style.width=st+"px",this._circleElement.style.height=st+"px"},X.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},X.prototype._onError=function(re){if(this._map){if(this.options.trackUserLocation)if(re.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var ge=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=ge,this._geolocateButton.setAttribute("aria-label",ge),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(re.code===3&&tf)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("error",re)),this._finish()}},X.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},X.prototype._setupUI=function(re){var ge=this;if(this._container.addEventListener("contextmenu",function(st){return st.preventDefault()}),this._geolocateButton=A.create("button","mapboxgl-ctrl-geolocate",this._container),A.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",re===!1){i.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=A.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new xc(this._dotElement),this._circleElement=A.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new xc({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(st){var mt=st.originalEvent&&st.originalEvent.type==="resize";!st.geolocateSource&&ge._watchState==="ACTIVE_LOCK"&&!mt&&(ge._watchState="BACKGROUND",ge._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),ge._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),ge.fire(new i.Event("trackuserlocationend")))})},X.prototype.trigger=function(){if(!this._setup)return i.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new i.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":bc--,tf=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new i.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new i.Event("trackuserlocationstart"));break}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error");break}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),bc++;var re;bc>1?(re={maximumAge:6e5,timeout:0},tf=!0):(re=this.options.positionOptions,tf=!1),this._geolocationWatchID=i.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,re)}}else i.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},X.prototype._clearWatch=function(){i.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},X}(i.Evented),Mp={maxWidth:100,unit:"metric"},rf=function(X){this.options=i.extend({},Mp,X),i.bindAll(["_onMove","setUnit"],this)};rf.prototype.getDefaultPosition=function(){return"bottom-left"},rf.prototype._onMove=function(){id(this._map,this._container,this.options)},rf.prototype.onAdd=function(X){return this._map=X,this._container=A.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",X.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},rf.prototype.onRemove=function(){A.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},rf.prototype.setUnit=function(X){this.options.unit=X,id(this._map,this._container,this.options)};function id(ve,X,pe){var re=pe&&pe.maxWidth||100,ge=ve._container.clientHeight/2,_e=ve.unproject([0,ge]),Ze=ve.unproject([re,ge]),st=_e.distanceTo(Ze);if(pe&&pe.unit==="imperial"){var mt=3.2808*st;if(mt>5280){var Nt=mt/5280;wc(X,re,Nt,ve._getUIString("ScaleControl.Miles"))}else wc(X,re,mt,ve._getUIString("ScaleControl.Feet"))}else if(pe&&pe.unit==="nautical"){var Jt=st/1852;wc(X,re,Jt,ve._getUIString("ScaleControl.NauticalMiles"))}else st>=1e3?wc(X,re,st/1e3,ve._getUIString("ScaleControl.Kilometers")):wc(X,re,st,ve._getUIString("ScaleControl.Meters"))}function wc(ve,X,pe,re){var ge=Ep(pe),_e=ge/pe;ve.style.width=X*_e+"px",ve.innerHTML=ge+" "+re}function Sp(ve){var X=Math.pow(10,Math.ceil(-Math.log(ve)/Math.LN10));return Math.round(ve*X)/X}function Ep(ve){var X=Math.pow(10,(""+Math.floor(ve)).length-1),pe=ve/X;return pe=pe>=10?10:pe>=5?5:pe>=3?3:pe>=2?2:pe>=1?1:Sp(pe),X*pe}var Ml=function(X){this._fullscreen=!1,X&&X.container&&(X.container instanceof i.window.HTMLElement?this._container=X.container:i.warnOnce("Full screen control 'container' must be a DOM element.")),i.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in i.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in i.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in i.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in i.window.document&&(this._fullscreenchange="MSFullscreenChange")};Ml.prototype.onAdd=function(X){return this._map=X,this._container||(this._container=this._map.getContainer()),this._controlContainer=A.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",i.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Ml.prototype.onRemove=function(){A.remove(this._controlContainer),this._map=null,i.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Ml.prototype._checkFullscreenSupport=function(){return!!(i.window.document.fullscreenEnabled||i.window.document.mozFullScreenEnabled||i.window.document.msFullscreenEnabled||i.window.document.webkitFullscreenEnabled)},Ml.prototype._setupUI=function(){var X=this._fullscreenButton=A.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);A.create("span","mapboxgl-ctrl-icon",X).setAttribute("aria-hidden",!0),X.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),i.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Ml.prototype._updateTitle=function(){var X=this._getTitle();this._fullscreenButton.setAttribute("aria-label",X),this._fullscreenButton.title=X},Ml.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Ml.prototype._isFullscreen=function(){return this._fullscreen},Ml.prototype._changeIcon=function(){var X=i.window.document.fullscreenElement||i.window.document.mozFullScreenElement||i.window.document.webkitFullscreenElement||i.window.document.msFullscreenElement;X===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},Ml.prototype._onClickFullscreen=function(){this._isFullscreen()?i.window.document.exitFullscreen?i.window.document.exitFullscreen():i.window.document.mozCancelFullScreen?i.window.document.mozCancelFullScreen():i.window.document.msExitFullscreen?i.window.document.msExitFullscreen():i.window.document.webkitCancelFullScreen&&i.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Cp={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},Lp=function(ve){function X(pe){ve.call(this),this.options=i.extend(Object.create(Cp),pe),i.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return ve&&(X.__proto__=ve),X.prototype=Object.create(ve&&ve.prototype),X.prototype.constructor=X,X.prototype.addTo=function(re){return this._map&&this.remove(),this._map=re,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new i.Event("open")),this},X.prototype.isOpen=function(){return!!this._map},X.prototype.remove=function(){return this._content&&A.remove(this._content),this._container&&(A.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new i.Event("close")),this},X.prototype.getLngLat=function(){return this._lngLat},X.prototype.setLngLat=function(re){return this._lngLat=i.LngLat.convert(re),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},X.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},X.prototype.getElement=function(){return this._container},X.prototype.setText=function(re){return this.setDOMContent(i.window.document.createTextNode(re))},X.prototype.setHTML=function(re){var ge=i.window.document.createDocumentFragment(),_e=i.window.document.createElement("body"),Ze;for(_e.innerHTML=re;Ze=_e.firstChild,!!Ze;)ge.appendChild(Ze);return this.setDOMContent(ge)},X.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},X.prototype.setMaxWidth=function(re){return this.options.maxWidth=re,this._update(),this},X.prototype.setDOMContent=function(re){return this._createContent(),this._content.appendChild(re),this._update(),this},X.prototype.addClassName=function(re){this._container&&this._container.classList.add(re)},X.prototype.removeClassName=function(re){this._container&&this._container.classList.remove(re)},X.prototype.toggleClassName=function(re){if(this._container)return this._container.classList.toggle(re)},X.prototype._createContent=function(){this._content&&A.remove(this._content),this._content=A.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=A.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))},X.prototype._onMouseUp=function(re){this._update(re.point)},X.prototype._onMouseMove=function(re){this._update(re.point)},X.prototype._onDrag=function(re){this._update(re.point)},X.prototype._update=function(re){var ge=this,_e=this._lngLat||this._trackPointer;if(!(!this._map||!_e||!this._content)&&(this._container||(this._container=A.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=A.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(Fr){return ge._container.classList.add(Fr)}),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=Tu(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!re))){var Ze=this._pos=this._trackPointer&&re?re:this._map.project(this._lngLat),st=this.options.anchor,mt=od(this.options.offset);if(!st){var Nt=this._container.offsetWidth,Jt=this._container.offsetHeight,ur;Ze.y+mt.bottom.ythis._map.transform.height-Jt?ur=["bottom"]:ur=[],Ze.xthis._map.transform.width-Nt/2&&ur.push("right"),ur.length===0?st="bottom":st=ur.join("-")}var yr=Ze.add(mt[st]).round();A.setTransform(this._container,wh[st]+" translate("+yr.x+"px,"+yr.y+"px)"),jh(this._container,st,"popup")}},X.prototype._onClose=function(){this.remove()},X}(i.Evented);function od(ve){if(ve)if(typeof ve=="number"){var X=Math.round(Math.sqrt(.5*Math.pow(ve,2)));return{center:new i.Point(0,0),top:new i.Point(0,ve),"top-left":new i.Point(X,X),"top-right":new i.Point(-X,X),bottom:new i.Point(0,-ve),"bottom-left":new i.Point(X,-X),"bottom-right":new i.Point(-X,-X),left:new i.Point(ve,0),right:new i.Point(-ve,0)}}else if(ve instanceof i.Point||Array.isArray(ve)){var pe=i.Point.convert(ve);return{center:pe,top:pe,"top-left":pe,"top-right":pe,bottom:pe,"bottom-left":pe,"bottom-right":pe,left:pe,right:pe}}else return{center:i.Point.convert(ve.center||[0,0]),top:i.Point.convert(ve.top||[0,0]),"top-left":i.Point.convert(ve["top-left"]||[0,0]),"top-right":i.Point.convert(ve["top-right"]||[0,0]),bottom:i.Point.convert(ve.bottom||[0,0]),"bottom-left":i.Point.convert(ve["bottom-left"]||[0,0]),"bottom-right":i.Point.convert(ve["bottom-right"]||[0,0]),left:i.Point.convert(ve.left||[0,0]),right:i.Point.convert(ve.right||[0,0])};else return od(new i.Point(0,0))}var Pp={version:i.version,supported:L,setRTLTextPlugin:i.setRTLTextPlugin,getRTLTextPluginStatus:i.getRTLTextPluginStatus,Map:rd,NavigationControl:wu,GeolocateControl:ad,AttributionControl:Wo,ScaleControl:rf,FullscreenControl:Ml,Popup:Lp,Marker:xc,Style:yo,LngLat:i.LngLat,LngLatBounds:i.LngLatBounds,Point:i.Point,MercatorCoordinate:i.MercatorCoordinate,Evented:i.Evented,config:i.config,prewarm:Ft,clearPrewarmedResources:Zt,get accessToken(){return i.config.ACCESS_TOKEN},set accessToken(ve){i.config.ACCESS_TOKEN=ve},get baseApiUrl(){return i.config.API_URL},set baseApiUrl(ve){i.config.API_URL=ve},get workerCount(){return Er.workerCount},set workerCount(ve){Er.workerCount=ve},get maxParallelImageRequests(){return i.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(ve){i.config.MAX_PARALLEL_IMAGE_REQUESTS=ve},clearStorage:function(X){i.clearTileCache(X)},workerUrl:""};return Pp}),m})},27084:function(G){G.exports=Math.log2||function(V){return Math.log(V)*Math.LOG2E}},16825:function(G,V,e){G.exports=P;var m=e(74311);function P(i,L){L||(L=i,i=window);var A=0,v=0,p=0,t={shift:!1,alt:!1,control:!1,meta:!1},r=!1;function s(M){var T=!1;return"altKey"in M&&(T=T||M.altKey!==t.alt,t.alt=!!M.altKey),"shiftKey"in M&&(T=T||M.shiftKey!==t.shift,t.shift=!!M.shiftKey),"ctrlKey"in M&&(T=T||M.ctrlKey!==t.control,t.control=!!M.ctrlKey),"metaKey"in M&&(T=T||M.metaKey!==t.meta,t.meta=!!M.metaKey),T}function n(M,T){var C=m.x(T),x=m.y(T);"buttons"in T&&(M=T.buttons|0),(M!==A||C!==v||x!==p||s(T))&&(A=M|0,v=C||0,p=x||0,L&&L(A,v,p,t))}function l(M){n(0,M)}function c(){(A||v||p||t.shift||t.alt||t.meta||t.control)&&(v=p=0,A=0,t.shift=t.alt=t.control=t.meta=!1,L&&L(0,0,0,t))}function u(M){s(M)&&L&&L(A,v,p,t)}function g(M){m.buttons(M)===0?n(0,M):n(A,M)}function f(M){n(A|m.buttons(M),M)}function w(M){n(A&~m.buttons(M),M)}function h(){r||(r=!0,i.addEventListener("mousemove",g),i.addEventListener("mousedown",f),i.addEventListener("mouseup",w),i.addEventListener("mouseleave",l),i.addEventListener("mouseenter",l),i.addEventListener("mouseout",l),i.addEventListener("mouseover",l),i.addEventListener("blur",c),i.addEventListener("keyup",u),i.addEventListener("keydown",u),i.addEventListener("keypress",u),i!==window&&(window.addEventListener("blur",c),window.addEventListener("keyup",u),window.addEventListener("keydown",u),window.addEventListener("keypress",u)))}function o(){r&&(r=!1,i.removeEventListener("mousemove",g),i.removeEventListener("mousedown",f),i.removeEventListener("mouseup",w),i.removeEventListener("mouseleave",l),i.removeEventListener("mouseenter",l),i.removeEventListener("mouseout",l),i.removeEventListener("mouseover",l),i.removeEventListener("blur",c),i.removeEventListener("keyup",u),i.removeEventListener("keydown",u),i.removeEventListener("keypress",u),i!==window&&(window.removeEventListener("blur",c),window.removeEventListener("keyup",u),window.removeEventListener("keydown",u),window.removeEventListener("keypress",u)))}h();var d={element:i};return Object.defineProperties(d,{enabled:{get:function(){return r},set:function(M){M?h():o()},enumerable:!0},buttons:{get:function(){return A},enumerable:!0},x:{get:function(){return v},enumerable:!0},y:{get:function(){return p},enumerable:!0},mods:{get:function(){return t},enumerable:!0}}),d}},48956:function(G){var V={left:0,top:0};G.exports=e;function e(P,i,L){i=i||P.currentTarget||P.srcElement,Array.isArray(L)||(L=[0,0]);var A=P.clientX||0,v=P.clientY||0,p=m(i);return L[0]=A-p.left,L[1]=v-p.top,L}function m(P){return P===window||P===document||P===document.body?V:P.getBoundingClientRect()}},74311:function(G,V){function e(L){if(typeof L=="object"){if("buttons"in L)return L.buttons;if("which"in L){var A=L.which;if(A===2)return 4;if(A===3)return 2;if(A>0)return 1<=0)return 1<0&&t(s,M))}catch(T){c.call(new g(M),T)}}}function c(o){var d=this;d.triggered||(d.triggered=!0,d.def&&(d=d.def),d.msg=o,d.state=2,d.chain.length>0&&t(s,d))}function u(o,d,M,T){for(var C=0;C7&&(r.push(d.splice(0,7)),d.unshift("C"));break;case"S":var T=f,C=w;(t=="C"||t=="S")&&(T+=T-s,C+=C-n),d=["C",T,C,d[1],d[2],d[3],d[4]];break;case"T":t=="Q"||t=="T"?(u=f*2-u,g=w*2-g):(u=f,g=w),d=i(f,w,u,g,d[1],d[2]);break;case"Q":u=d[1],g=d[2],d=i(f,w,d[1],d[2],d[3],d[4]);break;case"L":d=P(f,w,d[1],d[2]);break;case"H":d=P(f,w,d[1],w);break;case"V":d=P(f,w,f,d[1]);break;case"Z":d=P(f,w,l,c);break}t=M,f=d[d.length-2],w=d[d.length-1],d.length>4?(s=d[d.length-4],n=d[d.length-3]):(s=f,n=w),r.push(d)}return r}function P(p,t,r,s){return["C",p,t,r,s,r,s]}function i(p,t,r,s,n,l){return["C",p/3+.6666666666666666*r,t/3+.6666666666666666*s,n/3+.6666666666666666*r,l/3+.6666666666666666*s,n,l]}function L(p,t,r,s,n,l,c,u,g,f){if(f)b=f[0],a=f[1],x=f[2],S=f[3];else{var w=A(p,t,-n);p=w.x,t=w.y,w=A(u,g,-n),u=w.x,g=w.y;var h=(p-u)/2,o=(t-g)/2,d=h*h/(r*r)+o*o/(s*s);d>1&&(d=Math.sqrt(d),r=d*r,s=d*s);var M=r*r,T=s*s,C=(l==c?-1:1)*Math.sqrt(Math.abs((M*T-M*o*o-T*h*h)/(M*o*o+T*h*h)));C==1/0&&(C=1);var x=C*r*o/s+(p+u)/2,S=C*-s*h/r+(t+g)/2,b=Math.asin(((t-S)/s).toFixed(9)),a=Math.asin(((g-S)/s).toFixed(9));b=pa&&(b=b-V*2),!c&&a>b&&(a=a-V*2)}if(Math.abs(a-b)>e){var E=a,y=u,z=g;a=b+e*(c&&a>b?1:-1),u=x+r*Math.cos(a),g=S+s*Math.sin(a);var I=L(u,g,r,s,n,0,c,y,z,[a,E,x,S])}var B=Math.tan((a-b)/4),k=4/3*r*B,O=4/3*s*B,N=[2*p-(p+k*Math.sin(b)),2*t-(t-O*Math.cos(b)),u+k*Math.sin(a),g-O*Math.cos(a),u,g];if(f)return N;I&&(N=N.concat(I));for(var _=0;_"u")return!1;for(var c in window)try{if(!s["$"+c]&&P.call(window,c)&&window[c]!==null&&typeof window[c]=="object")try{r(window[c])}catch{return!0}}catch{return!0}return!1}(),l=function(c){if(typeof window>"u"||!n)return r(c);try{return r(c)}catch{return!1}};m=function(u){var g=u!==null&&typeof u=="object",f=i.call(u)==="[object Function]",w=L(u),h=g&&i.call(u)==="[object String]",o=[];if(!g&&!f&&!w)throw new TypeError("Object.keys called on a non-object");var d=p&&f;if(h&&u.length>0&&!P.call(u,0))for(var M=0;M0)for(var T=0;T=0&&V.call(m.callee)==="[object Function]"),i}},88641:function(G){function V(P,i){if(typeof P!="string")return[P];var L=[P];typeof i=="string"||Array.isArray(i)?i={brackets:i}:i||(i={});var A=i.brackets?Array.isArray(i.brackets)?i.brackets:[i.brackets]:["{}","[]","()"],v=i.escape||"___",p=!!i.flat;A.forEach(function(s){var n=new RegExp(["\\",s[0],"[^\\",s[0],"\\",s[1],"]*\\",s[1]].join("")),l=[];function c(u,g,f){var w=L.push(u.slice(s[0].length,-s[1].length))-1;return l.push(w),v+w+v}L.forEach(function(u,g){for(var f,w=0;u!=f;)if(f=u,u=u.replace(n,c),w++>1e4)throw Error("References have circular dependency. Please, check them.");L[g]=u}),l=l.reverse(),L=L.map(function(u){return l.forEach(function(g){u=u.replace(new RegExp("(\\"+v+g+"\\"+v+")","g"),s[0]+"$1"+s[1])}),u})});var t=new RegExp("\\"+v+"([0-9]+)\\"+v);function r(s,n,l){for(var c=[],u,g=0;u=t.exec(s);){if(g++>1e4)throw Error("Circular references in parenthesis");c.push(s.slice(0,u.index)),c.push(r(n[u[1]],n)),s=s.slice(u.index+u[0].length)}return c.push(s),c}return p?L:r(L[0],L)}function e(P,i){if(i&&i.flat){var L=i&&i.escape||"___",A=P[0],v;if(!A)return"";for(var p=new RegExp("\\"+L+"([0-9]+)\\"+L),t=0;A!=v;){if(t++>1e4)throw Error("Circular references in "+P);v=A,A=A.replace(p,r)}return A}return P.reduce(function s(n,l){return Array.isArray(l)&&(l=l.reduce(s,"")),n+l},"");function r(s,n){if(P[n]==null)throw Error("Reference "+n+"is undefined");return P[n]}}function m(P,i){return Array.isArray(P)?e(P,i):V(P,i)}m.parse=V,m.stringify=e,G.exports=m},18863:function(G,V,e){var m=e(71299);G.exports=P;function P(i){var L;return arguments.length>1&&(i=arguments),typeof i=="string"?i=i.split(/\s/).map(parseFloat):typeof i=="number"&&(i=[i]),i.length&&typeof i[0]=="number"?i.length===1?L={width:i[0],height:i[0],x:0,y:0}:i.length===2?L={width:i[0],height:i[1],x:0,y:0}:L={x:i[0],y:i[1],width:i[2]-i[0]||0,height:i[3]-i[1]||0}:i&&(i=m(i,{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"}),L={x:i.left||0,y:i.top||0},i.width==null?i.right?L.width=i.right-L.x:L.width=0:L.width=i.width,i.height==null?i.bottom?L.height=i.bottom-L.y:L.height=0:L.height=i.height),L}},95616:function(G){G.exports=m;var V={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},e=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function m(L){var A=[];return L.replace(e,function(v,p,t){var r=p.toLowerCase();for(t=i(t),r=="m"&&t.length>2&&(A.push([p].concat(t.splice(0,2))),r="l",p=p=="m"?"l":"L");;){if(t.length==V[r])return t.unshift(p),A.push(t);if(t.lengthA!=c>A&&L<(l-s)*(A-n)/(c-n)+s;u&&(v=!v)}return v}},52142:function(G,V,e){/* * @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc * @license MIT * @preserve Project Home: https://github.com/voidqk/polybooljs */var m=e(69444),P=e(29023),i=e(87263),L=e(11328),A=e(55968),v=e(10670),p=!1,t=P(),r;r={buildLog:function(n){return n===!0?p=m():n===!1&&(p=!1),p===!1?!1:p.list},epsilon:function(n){return t.epsilon(n)},segments:function(n){var l=i(!0,t,p);return n.regions.forEach(l.addRegion),{segments:l.calculate(n.inverted),inverted:n.inverted}},combine:function(n,l){var c=i(!1,t,p);return{combined:c.calculate(n.segments,n.inverted,l.segments,l.inverted),inverted1:n.inverted,inverted2:l.inverted}},selectUnion:function(n){return{segments:A.union(n.combined,p),inverted:n.inverted1||n.inverted2}},selectIntersect:function(n){return{segments:A.intersect(n.combined,p),inverted:n.inverted1&&n.inverted2}},selectDifference:function(n){return{segments:A.difference(n.combined,p),inverted:n.inverted1&&!n.inverted2}},selectDifferenceRev:function(n){return{segments:A.differenceRev(n.combined,p),inverted:!n.inverted1&&n.inverted2}},selectXor:function(n){return{segments:A.xor(n.combined,p),inverted:n.inverted1!==n.inverted2}},polygon:function(n){return{regions:L(n.segments,t,p),inverted:n.inverted}},polygonFromGeoJSON:function(n){return v.toPolygon(r,n)},polygonToGeoJSON:function(n){return v.fromPolygon(r,t,n)},union:function(n,l){return s(n,l,r.selectUnion)},intersect:function(n,l){return s(n,l,r.selectIntersect)},difference:function(n,l){return s(n,l,r.selectDifference)},differenceRev:function(n,l){return s(n,l,r.selectDifferenceRev)},xor:function(n,l){return s(n,l,r.selectXor)}};function s(n,l,c){var u=r.segments(n),g=r.segments(l),f=r.combine(u,g),w=c(f);return r.polygon(w)}typeof window=="object"&&(window.PolyBool=r),G.exports=r},69444:function(G){function V(){var e,m=0,P=!1;function i(L,A){return e.list.push({type:L,data:A?JSON.parse(JSON.stringify(A)):void 0}),e}return e={list:[],segmentId:function(){return m++},checkIntersection:function(L,A){return i("check",{seg1:L,seg2:A})},segmentChop:function(L,A){return i("div_seg",{seg:L,pt:A}),i("chop",{seg:L,pt:A})},statusRemove:function(L){return i("pop_seg",{seg:L})},segmentUpdate:function(L){return i("seg_update",{seg:L})},segmentNew:function(L,A){return i("new_seg",{seg:L,primary:A})},segmentRemove:function(L){return i("rem_seg",{seg:L})},tempStatus:function(L,A,v){return i("temp_status",{seg:L,above:A,below:v})},rewind:function(L){return i("rewind",{seg:L})},status:function(L,A,v){return i("status",{seg:L,above:A,below:v})},vert:function(L){return L===P?e:(P=L,i("vert",{x:L}))},log:function(L){return typeof L!="string"&&(L=JSON.stringify(L,!1," ")),i("log",{txt:L})},reset:function(){return i("reset")},selected:function(L){return i("selected",{segs:L})},chainStart:function(L){return i("chain_start",{seg:L})},chainRemoveHead:function(L,A){return i("chain_rem_head",{index:L,pt:A})},chainRemoveTail:function(L,A){return i("chain_rem_tail",{index:L,pt:A})},chainNew:function(L,A){return i("chain_new",{pt1:L,pt2:A})},chainMatch:function(L){return i("chain_match",{index:L})},chainClose:function(L){return i("chain_close",{index:L})},chainAddHead:function(L,A){return i("chain_add_head",{index:L,pt:A})},chainAddTail:function(L,A){return i("chain_add_tail",{index:L,pt:A})},chainConnect:function(L,A){return i("chain_con",{index1:L,index2:A})},chainReverse:function(L){return i("chain_rev",{index:L})},chainJoin:function(L,A){return i("chain_join",{index1:L,index2:A})},done:function(){return i("done")}},e}G.exports=V},29023:function(G){function V(e){typeof e!="number"&&(e=1e-10);var m={epsilon:function(P){return typeof P=="number"&&(e=P),e},pointAboveOrOnLine:function(P,i,L){var A=i[0],v=i[1],p=L[0],t=L[1],r=P[0],s=P[1];return(p-A)*(s-v)-(t-v)*(r-A)>=-e},pointBetween:function(P,i,L){var A=P[1]-i[1],v=L[0]-i[0],p=P[0]-i[0],t=L[1]-i[1],r=p*v+A*t;if(r-e)},pointsSameX:function(P,i){return Math.abs(P[0]-i[0])e!=p-A>e&&(v-s)*(A-n)/(p-n)+s-L>e&&(t=!t),v=s,p=n}return t}};return m}G.exports=V},10670:function(G){var V={toPolygon:function(e,m){function P(A){if(A.length<=0)return e.segments({inverted:!1,regions:[]});function v(r){var s=r.slice(0,r.length-1);return e.segments({inverted:!1,regions:[s]})}for(var p=v(A[0]),t=1;t0})}function T(O,N){var _=O.seg,U=N.seg,Y=_.start,J=_.end,te=U.start,ae=U.end;A&&A.checkIntersection(_,U);var ce=L.linesIntersect(Y,J,te,ae);if(ce===!1){if(!L.pointsCollinear(Y,J,te)||L.pointsSame(Y,ae)||L.pointsSame(J,te))return!1;var Q=L.pointsSame(Y,te),Z=L.pointsSame(J,ae);if(Q&&Z)return N;var j=!Q&&L.pointBetween(Y,te,ae),K=!Z&&L.pointBetween(J,te,ae);if(Q)return K?g(N,J):g(O,ae),N;j&&(Z||(K?g(N,J):g(O,ae)),g(N,Y))}else ce.alongA===0&&(ce.alongB===-1?g(O,te):ce.alongB===0?g(O,ce.pt):ce.alongB===1&&g(O,ae)),ce.alongB===0&&(ce.alongA===-1?g(N,Y):ce.alongA===0?g(N,ce.pt):ce.alongA===1&&g(N,J));return!1}for(var C=[];!t.isEmpty();){var x=t.getHead();if(A&&A.vert(x.pt[0]),x.isStart){let O=function(){if(b){var N=T(x,b);if(N)return N}return a?T(x,a):!1};var k=O;A&&A.segmentNew(x.seg,x.primary);var S=M(x),b=S.before?S.before.ev:null,a=S.after?S.after.ev:null;A&&A.tempStatus(x.seg,b?b.seg:!1,a?a.seg:!1);var E=O();if(E){if(i){var y;x.seg.myFill.below===null?y=!0:y=x.seg.myFill.above!==x.seg.myFill.below,y&&(E.seg.myFill.above=!E.seg.myFill.above)}else E.seg.otherFill=x.seg.myFill;A&&A.segmentUpdate(E.seg),x.other.remove(),x.remove()}if(t.getHead()!==x){A&&A.rewind(x.seg);continue}if(i){var y;x.seg.myFill.below===null?y=!0:y=x.seg.myFill.above!==x.seg.myFill.below,a?x.seg.myFill.below=a.seg.myFill.above:x.seg.myFill.below=w,y?x.seg.myFill.above=!x.seg.myFill.below:x.seg.myFill.above=x.seg.myFill.below}else if(x.seg.otherFill===null){var z;a?x.primary===a.primary?z=a.seg.otherFill.above:z=a.seg.myFill.above:z=x.primary?h:w,x.seg.otherFill={above:z,below:z}}A&&A.status(x.seg,b?b.seg:!1,a?a.seg:!1),x.other.status=S.insert(m.node({ev:x}))}else{var I=x.status;if(I===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(o.exists(I.prev)&&o.exists(I.next)&&T(I.prev.ev,I.next.ev),A&&A.statusRemove(I.ev.seg),I.remove(),!x.primary){var B=x.seg.myFill;x.seg.myFill=x.seg.otherFill,x.seg.otherFill=B}C.push(x.seg)}t.getHead().remove()}return A&&A.done(),C}return i?{addRegion:function(w){for(var h,o=w[w.length-1],d=0;d0&&!this.aborted;){var L=this.ifds_to_read.shift();L.offset&&this.scan_ifd(L.id,L.offset,P)}},m.prototype.read_uint16=function(P){var i=this.input;if(P+2>i.length)throw V("unexpected EOF","EBADDATA");return this.big_endian?i[P]*256+i[P+1]:i[P]+i[P+1]*256},m.prototype.read_uint32=function(P){var i=this.input;if(P+4>i.length)throw V("unexpected EOF","EBADDATA");return this.big_endian?i[P]*16777216+i[P+1]*65536+i[P+2]*256+i[P+3]:i[P]+i[P+1]*256+i[P+2]*65536+i[P+3]*16777216},m.prototype.is_subifd_link=function(P,i){return P===0&&i===34665||P===0&&i===34853||P===34665&&i===40965},m.prototype.exif_format_length=function(P){switch(P){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}},m.prototype.exif_format_read=function(P,i){var L;switch(P){case 1:case 2:return L=this.input[i],L;case 6:return L=this.input[i],L|(L&128)*33554430;case 3:return L=this.read_uint16(i),L;case 8:return L=this.read_uint16(i),L|(L&32768)*131070;case 4:return L=this.read_uint32(i),L;case 9:return L=this.read_uint32(i),L|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},m.prototype.scan_ifd=function(P,i,L){var A=this.read_uint16(i);i+=2;for(var v=0;vthis.input.length)throw V("unexpected EOF","EBADDATA");for(var u=[],g=l,f=0;f0&&(this.ifds_to_read.push({id:p,offset:u[0]}),c=!0);var h={is_big_endian:this.big_endian,ifd:P,tag:p,format:t,count:r,entry_offset:i+this.start,data_length:n,data_offset:l+this.start,value:u,is_subifd_link:c};if(L(h)===!1){this.aborted=!0;return}i+=12}P===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(i)})},G.exports.ExifParser=m,G.exports.get_orientation=function(P){var i=0;try{return new m(P,0,P.length).each(function(L){if(L.ifd===0&&L.tag===274&&Array.isArray(L.value))return i=L.value[0],!1}),i}catch{return-1}}},76767:function(G,V,e){var m=e(14847).n8,P=e(14847).Ag;function i(n,l){if(n.length<4+l)return null;var c=P(n,l);return n.length>4&15,u=n[4]&15,g=n[5]>>4&15,f=m(n,6),w=8,h=0;hf.width||g.width===f.width&&g.height>f.height?g:f}),c=n.reduce(function(g,f){return g.height>f.height||g.height===f.height&&g.width>f.width?g:f}),u;return l.width>c.height||l.width===c.height&&l.height>c.width?u=l:u=c,u}G.exports.readSizeFromMeta=function(n){var l={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(r(n,l),!!l.sizes.length){var c=s(l.sizes),u=1;l.transforms.forEach(function(f){var w={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},h={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(f.type==="imir"&&(f.value===0?u=h[u]:(u=h[u],u=w[u],u=w[u])),f.type==="irot")for(var o=0;o1&&(u.variants=c.variants),c.orientation&&(u.orientation=c.orientation),c.exif_location&&c.exif_location.offset+c.exif_location.length<=p.length){var g=i(p,c.exif_location.offset),f=p.slice(c.exif_location.offset+g+4,c.exif_location.offset+c.exif_location.length),w=A.get_orientation(f);w>0&&(u.orientation=w)}return u}}}}}}},2504:function(G,V,e){var m=e(14847).eG,P=e(14847).OF,i=e(14847).mP,L=m("BM");G.exports=function(A){if(!(A.length<26)&&P(A,0,L))return{width:i(A,18),height:i(A,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}},47342:function(G,V,e){var m=e(14847).eG,P=e(14847).OF,i=e(14847).mP,L=m("GIF87a"),A=m("GIF89a");G.exports=function(v){if(!(v.length<10)&&!(!P(v,0,L)&&!P(v,0,A)))return{width:i(v,6),height:i(v,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}},31355:function(G,V,e){var m=e(14847).mP,P=0,i=1,L=16;G.exports=function(A){var v=m(A,0),p=m(A,2),t=m(A,4);if(!(v!==P||p!==i||!t)){for(var r=[],s={width:0,height:0},n=0;ns.width||c>s.height)&&(s=u)}return{width:s.width,height:s.height,variants:r,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}},54261:function(G,V,e){var m=e(14847).n8,P=e(14847).eG,i=e(14847).OF,L=e(71371),A=P("Exif\0\0");G.exports=function(v){if(!(v.length<2)&&!(v[0]!==255||v[1]!==216||v[2]!==255))for(var p=2;;){for(;;){if(v.length-p<2)return;if(v[p++]===255)break}for(var t=v[p++],r;t===255;)t=v[p++];if(208<=t&&t<=217||t===1)r=0;else if(192<=t&&t<=254){if(v.length-p<2)return;r=m(v,p)-2,p+=2}else return;if(t===217||t===218)return;var s;if(t===225&&r>=10&&i(v,p,A)&&(s=L.get_orientation(v.slice(p+6,p+r))),r>=5&&192<=t&&t<=207&&t!==196&&t!==200&&t!==204){if(v.length-p0&&(n.orientation=s),n}p+=r}}},6303:function(G,V,e){var m=e(14847).eG,P=e(14847).OF,i=e(14847).Ag,L=m(`‰PNG\r  `),A=m("IHDR");G.exports=function(v){if(!(v.length<24)&&P(v,0,L)&&P(v,12,A))return{width:i(v,16),height:i(v,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}},38689:function(G,V,e){var m=e(14847).eG,P=e(14847).OF,i=e(14847).Ag,L=m("8BPS\0");G.exports=function(A){if(!(A.length<22)&&P(A,0,L))return{width:i(A,18),height:i(A,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}},6881:function(G){function V(s){return s===32||s===9||s===13||s===10}function e(s){return typeof s=="number"&&isFinite(s)&&s>0}function m(s){var n=0,l=s.length;for(s[0]===239&&s[1]===187&&s[2]===191&&(n=3);n]*>/,i=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,L=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,A=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,v=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,p=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function t(s){var n=s.match(L),l=s.match(A),c=s.match(v);return{width:n&&(n[1]||n[2]),height:l&&(l[1]||l[2]),viewbox:c&&(c[1]||c[2])}}function r(s){return p.test(s)?s.match(p)[0]:"px"}G.exports=function(s){if(m(s)){for(var n="",l=0;l>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function s(n,l){return{width:(n[l+6]<<16|n[l+5]<<8|n[l+4])+1,height:(n[l+9]<n.length)){for(;l+8=10?c=c||t(n,l+8):f==="VP8L"&&w>=9?c=c||r(n,l+8):f==="VP8X"&&w>=10?c=c||s(n,l+8):f==="EXIF"&&(u=A.get_orientation(n.slice(l+8,l+8+w)),l=1/0),l+=8+w}if(c)return u>0&&(c.orientation=u),c}}}},91497:function(G,V,e){G.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(G,V,e){var m=e(91497);function P(i){for(var L=Object.keys(m),A=0;A1)for(var f=1;f"u"?e.g:window,i=["moz","webkit"],L="AnimationFrame",A=P["request"+L],v=P["cancel"+L]||P["cancelRequest"+L],p=0;!A&&p1&&(E.scaleRatio=[E.scale[0]*E.viewport.width,E.scale[1]*E.viewport.height],g(E),E.after&&E.after(E))}function b(E){if(E){E.length!=null?typeof E[0]=="number"&&(E=[{positions:E}]):Array.isArray(E)||(E=[E]);var y=0,z=0;if(C.groups=T=E.map(function(U,Y){var J=T[Y];if(U)typeof U=="function"?U={after:U}:typeof U[0]=="number"&&(U={positions:U});else return J;return U=L(U,{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"}),J||(T[Y]=J={id:Y,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},U=A({},M,U)),i(J,U,[{lineWidth:function(te){return+te*.5},capSize:function(te){return+te*.5},opacity:parseFloat,errors:function(te){return te=v(te),z+=te.length,te},positions:function(te,ae){return te=v(te,"float64"),ae.count=Math.floor(te.length/2),ae.bounds=m(te,2),ae.offset=y,y+=ae.count,te}},{color:function(te,ae){var ce=ae.count;if(te||(te="transparent"),!Array.isArray(te)||typeof te[0]=="number"){var Q=te;te=Array(ce);for(var Z=0;Z 0. && baClipping < length(normalWidth * endBotJoin)) { //handle miter clipping bTopCoord -= normalWidth * endTopJoin; bTopCoord += normalize(endTopJoin * normalWidth) * baClipping; } if (nextReverse) { //make join rectangular vec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5; float normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.); bBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5; bTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5; } else if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) { //handle miter clipping aBotCoord -= normalWidth * startBotJoin; aBotCoord += normalize(startBotJoin * normalWidth) * abClipping; } vec2 aTopPosition = (aTopCoord) * adjustedScale + translate; vec2 aBotPosition = (aBotCoord) * adjustedScale + translate; vec2 bTopPosition = (bTopCoord) * adjustedScale + translate; vec2 bBotPosition = (bBotCoord) * adjustedScale + translate; //position is normalized 0..1 coord on the screen vec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd; startCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy; endCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy; gl_Position = vec4(position * 2.0 - 1.0, depth, 1); enableStartMiter = step(dot(currTangent, prevTangent), .5); enableEndMiter = step(dot(currTangent, nextTangent), .5); //bevel miter cutoffs if (miterMode == 1.) { if (enableStartMiter == 1.) { vec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5; startCutoff = vec4(aCoord, aCoord); startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio; startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; startCutoff += viewport.xyxy; startCutoff += startMiterWidth.xyxy; } if (enableEndMiter == 1.) { vec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5; endCutoff = vec4(bCoord, bCoord); endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio; endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; endCutoff += viewport.xyxy; endCutoff += endMiterWidth.xyxy; } } //round miter cutoffs else if (miterMode == 2.) { if (enableStartMiter == 1.) { vec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5; startCutoff = vec4(aCoord, aCoord); startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio; startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; startCutoff += viewport.xyxy; startCutoff += startMiterWidth.xyxy; } if (enableEndMiter == 1.) { vec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5; endCutoff = vec4(bCoord, bCoord); endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio; endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; endCutoff += viewport.xyxy; endCutoff += endMiterWidth.xyxy; } } } `]),frag:L([`precision highp float; #define GLSLIFY 1 uniform float dashLength, pixelRatio, thickness, opacity, id, miterMode; uniform sampler2D dashTexture; varying vec4 fragColor; varying vec2 tangent; varying vec4 startCutoff, endCutoff; varying vec2 startCoord, endCoord; varying float enableStartMiter, enableEndMiter; float distToLine(vec2 p, vec2 a, vec2 b) { vec2 diff = b - a; vec2 perp = normalize(vec2(-diff.y, diff.x)); return dot(p - a, perp); } void main() { float alpha = 1., distToStart, distToEnd; float cutoff = thickness * .5; //bevel miter if (miterMode == 1.) { if (enableStartMiter == 1.) { distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw); if (distToStart < -1.) { discard; return; } alpha *= min(max(distToStart + 1., 0.), 1.); } if (enableEndMiter == 1.) { distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw); if (distToEnd < -1.) { discard; return; } alpha *= min(max(distToEnd + 1., 0.), 1.); } } // round miter else if (miterMode == 2.) { if (enableStartMiter == 1.) { distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw); if (distToStart < 0.) { float radius = length(gl_FragCoord.xy - startCoord); if(radius > cutoff + .5) { discard; return; } alpha -= smoothstep(cutoff - .5, cutoff + .5, radius); } } if (enableEndMiter == 1.) { distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw); if (distToEnd < 0.) { float radius = length(gl_FragCoord.xy - endCoord); if(radius > cutoff + .5) { discard; return; } alpha -= smoothstep(cutoff - .5, cutoff + .5, radius); } } } float t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25; float dash = texture2D(dashTexture, vec2(t, .5)).r; gl_FragColor = fragColor; gl_FragColor.a *= alpha * opacity * dash; } `]),attributes:{lineEnd:{buffer:w,divisor:0,stride:8,offset:0},lineTop:{buffer:w,divisor:0,stride:8,offset:4},aColor:{buffer:f.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:f.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:f.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:f.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:f.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:f.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},h))}catch{d=o}var M=f({primitive:"triangle",elements:function(T,C){return C.triangles},offset:0,vert:L([`precision highp float; #define GLSLIFY 1 attribute vec2 position, positionFract; uniform vec4 color; uniform vec2 scale, scaleFract, translate, translateFract; uniform float pixelRatio, id; uniform vec4 viewport; uniform float opacity; varying vec4 fragColor; const float MAX_LINES = 256.; void main() { float depth = (MAX_LINES - 4. - id) / (MAX_LINES); vec2 position = position * scale + translate + positionFract * scale + translateFract + position * scaleFract + positionFract * scaleFract; gl_Position = vec4(position * 2.0 - 1.0, depth, 1); fragColor = color / 255.; fragColor.a *= opacity; } `]),frag:L([`precision highp float; #define GLSLIFY 1 varying vec4 fragColor; void main() { gl_FragColor = fragColor; } `]),uniforms:{scale:f.prop("scale"),color:f.prop("fill"),scaleFract:f.prop("scaleFract"),translateFract:f.prop("translateFract"),translate:f.prop("translate"),opacity:f.prop("opacity"),pixelRatio:f.context("pixelRatio"),id:f.prop("id"),viewport:function(T,C){return[C.viewport.x,C.viewport.y,T.viewportWidth,T.viewportHeight]}},attributes:{position:{buffer:f.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:f.prop("positionFractBuffer"),stride:8,offset:8}},blend:h.blend,depth:{enable:!1},scissor:h.scissor,stencil:h.stencil,viewport:h.viewport});return{fill:M,rect:o,miter:d}},g.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},g.prototype.render=function(){for(var f,w=[],h=arguments.length;h--;)w[h]=arguments[h];w.length&&(f=this).update.apply(f,w),this.draw()},g.prototype.draw=function(){for(var f=this,w=[],h=arguments.length;h--;)w[h]=arguments[h];return(w.length?w:this.passes).forEach(function(o,d){var M;if(o&&Array.isArray(o))return(M=f).draw.apply(M,o);typeof o=="number"&&(o=f.passes[o]),o&&o.count>1&&o.opacity&&(f.regl._refresh(),o.fill&&o.triangles&&o.triangles.length>2&&f.shaders.fill(o),o.thickness&&(o.scale[0]*o.viewport.width>g.precisionThreshold||o.scale[1]*o.viewport.height>g.precisionThreshold||o.join==="rect"||!o.join&&(o.thickness<=2||o.count>=g.maxPoints)?f.shaders.rect(o):f.shaders.miter(o)))}),this},g.prototype.update=function(f){var w=this;if(f){f.length!=null?typeof f[0]=="number"&&(f=[{positions:f}]):Array.isArray(f)||(f=[f]);var h=this,o=h.regl,d=h.gl;if(f.forEach(function(S,b){var a=w.passes[b];if(S!==void 0){if(S===null){w.passes[b]=null;return}if(typeof S[0]=="number"&&(S={positions:S}),S=A(S,{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||(w.passes[b]=a={id:b,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:o.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:o.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:o.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:o.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},S=i({},g.defaults,S)),S.thickness!=null&&(a.thickness=parseFloat(S.thickness)),S.opacity!=null&&(a.opacity=parseFloat(S.opacity)),S.miterLimit!=null&&(a.miterLimit=parseFloat(S.miterLimit)),S.overlay!=null&&(a.overlay=!!S.overlay,b=j});ce=ce.slice(0,K),ce.push(j)}for(var ee=function(ze){var Pe=O.slice(Z*2,ce[ze]*2).concat(j?O.slice(j*2):[]),be=(a.hole||[]).map(function(ye){return ye-j+(ce[ze]-Z)}),se=p(Pe,be);se=se.map(function(ye){return ye+Z+(ye+Za.length)&&(E=a.length);for(var y=0,z=new Array(E);y 1.0 + delta) { discard; } alpha -= smoothstep(1.0 - delta, 1.0 + delta, radius); float borderRadius = fragBorderRadius; float ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius); vec4 color = mix(fragColor, fragBorderColor, ratio); color.a *= alpha * opacity; gl_FragColor = color; } `]),ae.vert=f([`precision highp float; #define GLSLIFY 1 attribute float x, y, xFract, yFract; attribute float size, borderSize; attribute vec4 colorId, borderColorId; attribute float isActive; uniform bool constPointSize; uniform float pixelRatio; uniform vec2 paletteSize, scale, scaleFract, translate, translateFract; uniform sampler2D paletteTexture; const float maxSize = 100.; varying vec4 fragColor, fragBorderColor; varying float fragBorderRadius, fragWidth; float pointSizeScale = (constPointSize) ? 2. : pixelRatio; bool isDirect = (paletteSize.x < 1.); vec4 getColor(vec4 id) { return isDirect ? id / 255. : texture2D(paletteTexture, vec2( (id.x + .5) / paletteSize.x, (id.y + .5) / paletteSize.y ) ); } void main() { // ignore inactive points if (isActive == 0.) return; vec2 position = vec2(x, y); vec2 positionFract = vec2(xFract, yFract); vec4 color = getColor(colorId); vec4 borderColor = getColor(borderColorId); float size = size * maxSize / 255.; float borderSize = borderSize * maxSize / 255.; gl_PointSize = (size + borderSize) * pointSizeScale; vec2 pos = (position + translate) * scale + (positionFract + translateFract) * scale + (position + translate) * scaleFract + (positionFract + translateFract) * scaleFract; gl_Position = vec4(pos * 2. - 1., 0., 1.); fragBorderRadius = 1. - 2. * borderSize / (size + borderSize); fragColor = color; fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor; fragWidth = 1. / gl_PointSize; } `]),d&&(ae.frag=ae.frag.replace("smoothstep","smoothStep"),te.frag=te.frag.replace("smoothstep","smoothStep")),this.drawCircle=a(ae)}x.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4},x.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},x.prototype.draw=function(){for(var a=this,E=arguments.length,y=new Array(E),z=0;zHe)?Se.tree=u(xe,{bounds:$e}):He&&He.length&&(Se.tree=He),Se.tree){var et={primitive:"points",usage:"static",data:Se.tree,type:"uint32"};Se.elements?Se.elements(et):Se.elements=k.elements(et)}var ct=M.float32(xe);Fe({data:ct,usage:"dynamic"});var dt=M.fract32(xe,ct);return Ge({data:dt,usage:"dynamic"}),nt({data:new Uint8Array(qe),type:"uint8",usage:"stream"}),xe}},{marker:function(xe,Se,Ue){var He=Se.activation;if(He.forEach(function(dt){return dt&&dt.destroy&&dt.destroy()}),He.length=0,!xe||typeof xe[0]=="number"){var Fe=a.addMarker(xe);He[Fe]=!0}else{for(var Ge=[],nt=0,qe=Math.min(xe.length,Se.count);nt=0)return I;var B;if(a instanceof Uint8Array||a instanceof Uint8ClampedArray)B=a;else{B=new Uint8Array(a.length);for(var k=0,O=a.length;kz*4&&(this.tooManyColors=!0),this.updatePalette(y),I.length===1?I[0]:I},x.prototype.updatePalette=function(a){if(!this.tooManyColors){var E=this.maxColors,y=this.paletteTexture,z=Math.ceil(a.length*.25/E);if(z>1){a=a.slice();for(var I=a.length*.25%E;Iz)&&!(!w.lower&&y2?(o[0],o[2],g=o[1],f=o[3]):o.length?(g=o[0],f=o[1]):(o.x,g=o.y,o.x+o.width,f=o.y+o.height),d.length>2?(w=d[0],h=d[2],d[1],d[3]):d.length?(w=d[0],h=d[1]):(w=d.x,d.y,h=d.x+d.width,d.y+d.height),[w,g,h,f]}function n(l){if(typeof l=="number")return[l,l,l,l];if(l.length===2)return[l[0],l[1],l[0],l[1]];var c=v(l);return[c.x,c.y,c.x+c.width,c.y+c.height]}},98580:function(G){(function(V,e){G.exports=e()})(this,function(){function V(yt,jt){this.id=he++,this.type=yt,this.data=jt}function e(yt){if(yt.length===0)return[];var jt=yt.charAt(0),Yt=yt.charAt(yt.length-1);if(1"u"?1:window.devicePixelRatio,Ct=!1,St={},_t=function($t){},Ht=function(){};if(typeof jt=="string"?Yt=document.querySelector(jt):typeof jt=="object"&&(typeof jt.nodeName=="string"&&typeof jt.appendChild=="function"&&typeof jt.getBoundingClientRect=="function"?Yt=jt:typeof jt.drawArrays=="function"||typeof jt.drawElements=="function"?(ut=jt,hr=ut.canvas):("gl"in jt?ut=jt.gl:"canvas"in jt?hr=p(jt.canvas):"container"in jt&&(br=p(jt.container)),"attributes"in jt&&(yt=jt.attributes),"extensions"in jt&&(lt=v(jt.extensions)),"optionalExtensions"in jt&&(xt=v(jt.optionalExtensions)),"onDone"in jt&&(_t=jt.onDone),"profile"in jt&&(Ct=!!jt.profile),"pixelRatio"in jt&&(Tt=+jt.pixelRatio),"cachedCode"in jt&&(St=jt.cachedCode))),Yt&&(Yt.nodeName.toLowerCase()==="canvas"?hr=Yt:br=Yt),!ut){if(!hr){if(Yt=L(br||document.body,_t,Tt),!Yt)return null;hr=Yt.canvas,Ht=Yt.onDestroy}yt.premultipliedAlpha===void 0&&(yt.premultipliedAlpha=!0),ut=A(hr,yt)}return ut?{gl:ut,canvas:hr,container:br,extensions:lt,optionalExtensions:xt,pixelRatio:Tt,profile:Ct,cachedCode:St,onDone:_t,onDestroy:Ht}:(Ht(),_t("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function r(yt,jt){function Yt(lt){lt=lt.toLowerCase();var xt;try{xt=br[lt]=yt.getExtension(lt)}catch{}return!!xt}for(var br={},hr=0;hr>>=jt,Yt=(255>>=Yt,jt|=Yt,Yt=(15>>=Yt,jt|=Yt,Yt=(3>>Yt>>1}function l(){function yt(br){e:{for(var hr=16;268435456>=hr;hr*=16)if(br<=hr){br=hr;break e}br=0}return hr=Yt[n(br)>>2],0>2].push(br)}var Yt=s(8,function(){return[]});return{alloc:yt,free:jt,allocType:function(br,hr){var ut=null;switch(br){case 5120:ut=new Int8Array(yt(hr),0,hr);break;case 5121:ut=new Uint8Array(yt(hr),0,hr);break;case 5122:ut=new Int16Array(yt(2*hr),0,hr);break;case 5123:ut=new Uint16Array(yt(2*hr),0,hr);break;case 5124:ut=new Int32Array(yt(4*hr),0,hr);break;case 5125:ut=new Uint32Array(yt(4*hr),0,hr);break;case 5126:ut=new Float32Array(yt(4*hr),0,hr);break;default:return null}return ut.length!==hr?ut.subarray(0,hr):ut},freeType:function(br){jt(br.buffer)}}}function c(yt){return!!yt&&typeof yt=="object"&&Array.isArray(yt.shape)&&Array.isArray(yt.stride)&&typeof yt.offset=="number"&&yt.shape.length===yt.stride.length&&(Array.isArray(yt.data)||Ee(yt.data))}function u(yt,jt,Yt,br,hr,ut){for(var lt=0;ltHt&&(Ht=_t.buffer.byteLength,We===5123?Ht>>=1:We===5125&&(Ht>>=2)),_t.vertCount=Ht,Ht=Qt,0>Qt&&(Ht=4,Qt=_t.buffer.dimension,Qt===1&&(Ht=0),Qt===2&&(Ht=1),Qt===3&&(Ht=4)),_t.primType=Ht}function lt(_t){br.elementsCount--,delete xt[_t.id],_t.buffer.destroy(),_t.buffer=null}var xt={},Tt=0,Ct={uint8:5121,uint16:5123};jt.oes_element_index_uint&&(Ct.uint32=5125),hr.prototype.bind=function(){this.buffer.bind()};var St=[];return{create:function(_t,Ht){function $t(Er){if(Er)if(typeof Er=="number")Qt(Er),or.primType=4,or.vertCount=Er|0,or.type=5121;else{var Ye=null,We=35044,Dt=-1,Ft=-1,Zt=0,nr=0;Array.isArray(Er)||Ee(Er)||c(Er)?Ye=Er:("data"in Er&&(Ye=Er.data),"usage"in Er&&(We=Fe[Er.usage]),"primitive"in Er&&(Dt=$e[Er.primitive]),"count"in Er&&(Ft=Er.count|0),"type"in Er&&(nr=Ct[Er.type]),"length"in Er?Zt=Er.length|0:(Zt=Ft,nr===5123||nr===5122?Zt*=2:(nr===5125||nr===5124)&&(Zt*=4))),ut(or,Ye,We,Dt,Ft,Zt,nr)}else Qt(),or.primType=4,or.vertCount=0,or.type=5121;return $t}var Qt=Yt.create(null,34963,!0),or=new hr(Qt._buffer);return br.elementsCount++,$t(_t),$t._reglType="elements",$t._elements=or,$t.subdata=function(Er,Ye){return Qt.subdata(Er,Ye),$t},$t.destroy=function(){lt(or)},$t},createStream:function(_t){var Ht=St.pop();return Ht||(Ht=new hr(Yt.create(null,34963,!0,!1)._buffer)),ut(Ht,_t,35040,-1,-1,0,0),Ht},destroyStream:function(_t){St.push(_t)},getElements:function(_t){return typeof _t=="function"&&_t._elements instanceof hr?_t._elements:null},clear:function(){xe(xt).forEach(lt)}}}function M(yt){for(var jt=Oe.allocType(5123,yt.length),Yt=0;Yt>>31<<15,hr=(ut<<1>>>24)-127,ut=ut>>13&1023;jt[Yt]=-24>hr?br:-14>hr?br+(ut+1024>>-14-hr):15>=Un,nn.height>>=Un,Ht(nn,gn[Un]),Mr.mipmask|=1<on;++on)Mr.images[on]=null;return Mr}function Zt(Mr){for(var on=Mr.images,nn=0;nnMr){for(var on=0;on=--this.refCount&&pr(this)}}),lt.profile&&(ut.getTotalTextureSize=function(){var Mr=0;return Object.keys(sa).forEach(function(on){Mr+=sa[on].stats.size}),Mr}),{create2D:function(Mr,on){function nn(Un,En){var Cn=gn.texInfo;nr.call(Cn);var Hn=Ft();return typeof Un=="number"?typeof En=="number"?Ye(Hn,Un|0,En|0):Ye(Hn,Un|0,Un|0):Un?(lr(Cn,Un),We(Hn,Un)):Ye(Hn,1,1),Cn.genMipmaps&&(Hn.mipmask=(Hn.width<<1)-1),gn.mipmask=Hn.mipmask,Tt(gn,Hn),gn.internalformat=Hn.internalformat,nn.width=Hn.width,nn.height=Hn.height,fr(gn),Dt(Hn,3553),rr(Cn,3553),dr(),Zt(Hn),lt.profile&&(gn.stats.size=y(gn.internalformat,gn.type,Hn.width,Hn.height,Cn.genMipmaps,!1)),nn.format=Or[gn.internalformat],nn.type=Nr[gn.type],nn.mag=qr[Cn.magFilter],nn.min=vn[Cn.minFilter],nn.wrapS=fn[Cn.wrapS],nn.wrapT=fn[Cn.wrapT],nn}var gn=new zt(3553);return sa[gn.id]=gn,ut.textureCount++,nn(Mr,on),nn.subimage=function(Un,En,Cn,Hn){En|=0,Cn|=0,Hn|=0;var aa=Qt();return Tt(aa,gn),aa.width=0,aa.height=0,Ht(aa,Un),aa.width=aa.width||(gn.width>>Hn)-En,aa.height=aa.height||(gn.height>>Hn)-Cn,fr(gn),$t(aa,3553,En,Cn,Hn),dr(),or(aa),nn},nn.resize=function(Un,En){var Cn=Un|0,Hn=En|0||Cn;if(Cn===gn.width&&Hn===gn.height)return nn;nn.width=gn.width=Cn,nn.height=gn.height=Hn,fr(gn);for(var aa=0;gn.mipmask>>aa;++aa){var Pa=Cn>>aa,Za=Hn>>aa;if(!Pa||!Za)break;yt.texImage2D(3553,aa,gn.format,Pa,Za,0,gn.format,gn.type,null)}return dr(),lt.profile&&(gn.stats.size=y(gn.internalformat,gn.type,Cn,Hn,!1,!1)),nn},nn._reglType="texture2d",nn._texture=gn,lt.profile&&(nn.stats=gn.stats),nn.destroy=function(){gn.decRef()},nn},createCube:function(Mr,on,nn,gn,Un,En){function Cn(Pa,Za,Xt,wr,an,cn){var hn,Ln=Hn.texInfo;for(nr.call(Ln),hn=0;6>hn;++hn)aa[hn]=Ft();if(typeof Pa=="number"||!Pa)for(Pa=Pa|0||1,hn=0;6>hn;++hn)Ye(aa[hn],Pa,Pa);else if(typeof Pa=="object")if(Za)We(aa[0],Pa),We(aa[1],Za),We(aa[2],Xt),We(aa[3],wr),We(aa[4],an),We(aa[5],cn);else if(lr(Ln,Pa),Ct(Hn,Pa),"faces"in Pa)for(Pa=Pa.faces,hn=0;6>hn;++hn)Tt(aa[hn],Hn),We(aa[hn],Pa[hn]);else for(hn=0;6>hn;++hn)We(aa[hn],Pa);for(Tt(Hn,aa[0]),Hn.mipmask=Ln.genMipmaps?(aa[0].width<<1)-1:aa[0].mipmask,Hn.internalformat=aa[0].internalformat,Cn.width=aa[0].width,Cn.height=aa[0].height,fr(Hn),hn=0;6>hn;++hn)Dt(aa[hn],34069+hn);for(rr(Ln,34067),dr(),lt.profile&&(Hn.stats.size=y(Hn.internalformat,Hn.type,Cn.width,Cn.height,Ln.genMipmaps,!0)),Cn.format=Or[Hn.internalformat],Cn.type=Nr[Hn.type],Cn.mag=qr[Ln.magFilter],Cn.min=vn[Ln.minFilter],Cn.wrapS=fn[Ln.wrapS],Cn.wrapT=fn[Ln.wrapT],hn=0;6>hn;++hn)Zt(aa[hn]);return Cn}var Hn=new zt(34067);sa[Hn.id]=Hn,ut.cubeCount++;var aa=Array(6);return Cn(Mr,on,nn,gn,Un,En),Cn.subimage=function(Pa,Za,Xt,wr,an){Xt|=0,wr|=0,an|=0;var cn=Qt();return Tt(cn,Hn),cn.width=0,cn.height=0,Ht(cn,Za),cn.width=cn.width||(Hn.width>>an)-Xt,cn.height=cn.height||(Hn.height>>an)-wr,fr(Hn),$t(cn,34069+Pa,Xt,wr,an),dr(),or(cn),Cn},Cn.resize=function(Pa){if(Pa|=0,Pa!==Hn.width){Cn.width=Hn.width=Pa,Cn.height=Hn.height=Pa,fr(Hn);for(var Za=0;6>Za;++Za)for(var Xt=0;Hn.mipmask>>Xt;++Xt)yt.texImage2D(34069+Za,Xt,Hn.format,Pa>>Xt,Pa>>Xt,0,Hn.format,Hn.type,null);return dr(),lt.profile&&(Hn.stats.size=y(Hn.internalformat,Hn.type,Cn.width,Cn.height,!1,!0)),Cn}},Cn._reglType="textureCube",Cn._texture=Hn,lt.profile&&(Cn.stats=Hn.stats),Cn.destroy=function(){Hn.decRef()},Cn},clear:function(){for(var Mr=0;Mrgn;++gn)if(nn.mipmask&1<>gn,nn.height>>gn,0,nn.internalformat,nn.type,null);else for(var Un=0;6>Un;++Un)yt.texImage2D(34069+Un,gn,nn.internalformat,nn.width>>gn,nn.height>>gn,0,nn.internalformat,nn.type,null);rr(nn.texInfo,nn.target)})},refresh:function(){for(var Mr=0;Mrvr;++vr){for(jr=0;jrpr;++pr)dr[pr].resize(vr);return fr.width=fr.height=vr,fr},_reglType:"framebufferCube",destroy:function(){dr.forEach(function(pr){pr.destroy()})}})},clear:function(){xe(rr).forEach(Er)},restore:function(){Dt.cur=null,Dt.next=null,Dt.dirty=!0,xe(rr).forEach(function(zt){zt.framebuffer=yt.createFramebuffer(),Ye(zt)})}})}function B(){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 k(yt,jt,Yt,br,hr,ut,lt){function xt(Ye){if(Ye!==Er.currentVAO){var We=jt.oes_vertex_array_object;Ye?We.bindVertexArrayOES(Ye.vao):We.bindVertexArrayOES(null),Er.currentVAO=Ye}}function Tt(Ye){if(Ye!==Er.currentVAO){if(Ye)Ye.bindAttrs();else{for(var We=jt.angle_instanced_arrays,Dt=0;Dt<$t.length;++Dt){var Ft=$t[Dt];Ft.buffer?(yt.enableVertexAttribArray(Dt),Ft.buffer.bind(),yt.vertexAttribPointer(Dt,Ft.size,Ft.type,Ft.normalized,Ft.stride,Ft.offfset),We&&Ft.divisor&&We.vertexAttribDivisorANGLE(Dt,Ft.divisor)):(yt.disableVertexAttribArray(Dt),yt.vertexAttrib4f(Dt,Ft.x,Ft.y,Ft.z,Ft.w))}lt.elements?yt.bindBuffer(34963,lt.elements.buffer.buffer):yt.bindBuffer(34963,null)}Er.currentVAO=Ye}}function Ct(){xe(or).forEach(function(Ye){Ye.destroy()})}function St(){this.id=++Qt,this.attributes=[],this.elements=null,this.ownsElements=!1,this.offset=this.count=0,this.instances=-1,this.primitive=4;var Ye=jt.oes_vertex_array_object;this.vao=Ye?Ye.createVertexArrayOES():null,or[this.id]=this,this.buffers=[]}function _t(){jt.oes_vertex_array_object&&xe(or).forEach(function(Ye){Ye.refresh()})}var Ht=Yt.maxAttributes,$t=Array(Ht);for(Yt=0;Yt=fr.byteLength?dr.subdata(fr):(dr.destroy(),Dt.buffers[lr]=null)),Dt.buffers[lr]||(dr=Dt.buffers[lr]=hr.create(rr,34962,!1,!0)),zt.buffer=hr.getBuffer(dr),zt.size=zt.buffer.dimension|0,zt.normalized=!1,zt.type=zt.buffer.dtype,zt.offset=0,zt.stride=0,zt.divisor=0,zt.state=1,Ft[lr]=1}else hr.getBuffer(rr)?(zt.buffer=hr.getBuffer(rr),zt.size=zt.buffer.dimension|0,zt.normalized=!1,zt.type=zt.buffer.dtype,zt.offset=0,zt.stride=0,zt.divisor=0,zt.state=1):hr.getBuffer(rr.buffer)?(zt.buffer=hr.getBuffer(rr.buffer),zt.size=(+rr.size||zt.buffer.dimension)|0,zt.normalized=!!rr.normalized||!1,zt.type="type"in rr?He[rr.type]:zt.buffer.dtype,zt.offset=(rr.offset||0)|0,zt.stride=(rr.stride||0)|0,zt.divisor=(rr.divisor||0)|0,zt.state=1):"x"in rr&&(zt.x=+rr.x||0,zt.y=+rr.y||0,zt.z=+rr.z||0,zt.w=+rr.w||0,zt.state=2)}for(dr=0;drQt&&(Qt=or.stats.uniformsCount)}),Qt},Yt.getMaxAttributesCount=function(){var Qt=0;return Ht.forEach(function(or){or.stats.attributesCount>Qt&&(Qt=or.stats.attributesCount)}),Qt}),{clear:function(){var Qt=yt.deleteShader.bind(yt);xe(Ct).forEach(Qt),Ct={},xe(St).forEach(Qt),St={},Ht.forEach(function(or){yt.deleteProgram(or.program)}),Ht.length=0,_t={},Yt.shaderCount=0},program:function(Qt,or,Er,Ye){var We=_t[or];We||(We=_t[or]={});var Dt=We[Qt];if(Dt&&(Dt.refCount++,!Ye))return Dt;var Ft=new xt(or,Qt);return Yt.shaderCount++,Tt(Ft,Er,Ye),Dt||(We[Qt]=Ft),Ht.push(Ft),ie(Ft,{destroy:function(){if(Ft.refCount--,0>=Ft.refCount){yt.deleteProgram(Ft.program);var Zt=Ht.indexOf(Ft);Ht.splice(Zt,1),Yt.shaderCount--}0>=We[Ft.vertId].refCount&&(yt.deleteShader(St[Ft.vertId]),delete St[Ft.vertId],delete _t[Ft.fragId][Ft.vertId]),Object.keys(_t[Ft.fragId]).length||(yt.deleteShader(Ct[Ft.fragId]),delete Ct[Ft.fragId],delete _t[Ft.fragId])}})},restore:function(){Ct={},St={};for(var Qt=0;Qt>2),br=0;br>5]|=(yt.charCodeAt(br/8)&255)<<24-br%32;var Yt=8*yt.length;yt=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225];var br=Array(64),hr,ut,lt,xt,Tt,Ct,St,_t,Ht,$t,Qt;for(jt[Yt>>5]|=128<<24-Yt%32,jt[(Yt+64>>9<<4)+15]=Yt,_t=0;_tHt;Ht++){if(16>Ht)br[Ht]=jt[Ht+_t];else{$t=Ht,Qt=br[Ht-2],Qt=J(Qt,17)^J(Qt,19)^Qt>>>10,Qt=te(Qt,br[Ht-7]);var or;or=br[Ht-15],or=J(or,7)^J(or,18)^or>>>3,br[$t]=te(te(Qt,or),br[Ht-16])}$t=xt,$t=J($t,6)^J($t,11)^J($t,25),$t=te(te(te(te(St,$t),xt&Tt^~xt&Ct),at[Ht]),br[Ht]),St=Yt,St=J(St,2)^J(St,13)^J(St,22),Qt=te(St,Yt&hr^Yt&ut^hr&ut),St=Ct,Ct=Tt,Tt=xt,xt=te(lt,$t),lt=ut,ut=hr,hr=Yt,Yt=te($t,Qt)}yt[0]=te(Yt,yt[0]),yt[1]=te(hr,yt[1]),yt[2]=te(ut,yt[2]),yt[3]=te(lt,yt[3]),yt[4]=te(xt,yt[4]),yt[5]=te(Tt,yt[5]),yt[6]=te(Ct,yt[6]),yt[7]=te(St,yt[7])}for(jt="",br=0;br<32*yt.length;br+=8)jt+=String.fromCharCode(yt[br>>5]>>>24-br%32&255);return jt}function U(yt){for(var jt="",Yt,br=0;br>>4&15)+"0123456789abcdef".charAt(Yt&15);return jt}function Y(yt){for(var jt="",Yt=-1,br,hr;++Yt=br&&56320<=hr&&57343>=hr&&(br=65536+((br&1023)<<10)+(hr&1023),Yt++),127>=br?jt+=String.fromCharCode(br):2047>=br?jt+=String.fromCharCode(192|br>>>6&31,128|br&63):65535>=br?jt+=String.fromCharCode(224|br>>>12&15,128|br>>>6&63,128|br&63):2097151>=br&&(jt+=String.fromCharCode(240|br>>>18&7,128|br>>>12&63,128|br>>>6&63,128|br&63));return jt}function J(yt,jt){return yt>>>jt|yt<<32-jt}function te(yt,jt){var Yt=(yt&65535)+(jt&65535);return(yt>>16)+(jt>>16)+(Yt>>16)<<16|Yt&65535}function ae(yt){return Array.prototype.slice.call(yt)}function ce(yt){return ae(yt).join("")}function Q(yt){function jt(){var St=[],_t=[];return ie(function(){St.push.apply(St,ae(arguments))},{def:function(){var Ht="v"+hr++;return _t.push(Ht),0"+oa+"?"+zr+".constant["+oa+"]:0;"}).join(""),"}}else{","if(",_n,"(",zr,".buffer)){",$n,"=",Wn,".createStream(",34962,",",zr,".buffer);","}else{",$n,"=",Wn,".getBuffer(",zr,".buffer);","}",la,'="type" in ',zr,"?",dn.glTypes,"[",zr,".type]:",$n,".dtype;",yn.normalized,"=!!",zr,".normalized;"),Cr("size"),Cr("offset"),Cr("stride"),Cr("divisor"),Rr("}}"),Rr.exit("if(",yn.isStream,"){",Wn,".destroyStream(",$n,");","}"),yn})}),hn}function vr(Xt){var wr=Xt.static,an=Xt.dynamic,cn={};return Object.keys(wr).forEach(function(hn){var Ln=wr[hn];cn[hn]=oe(function(wn,un){return typeof Ln=="number"||typeof Ln=="boolean"?""+Ln:wn.link(Ln)})}),Object.keys(an).forEach(function(hn){var Ln=an[hn];cn[hn]=q(Ln,function(wn,un){return wn.invoke(un,Ln)})}),cn}function Hr(Xt,wr,an,cn,hn){function Ln(On){var $n=un[On];$n&&(Cr[On]=$n)}var wn=lr(Xt,wr),_n=Zt(Xt),un=nr(Xt,_n),Rr=zt(Xt),Cr=fr(Xt),zr=rr(Xt,hn,wn);Ln("viewport"),Ln(Er("scissor.box"));var dn=0"u"?"Date.now()":"performance.now()"}function wn(On){Wn=wr.def(),On(Wn,"=",Ln(),";"),typeof hn=="string"?On(zr,".count+=",hn,";"):On(zr,".count++;"),$t&&(cn?(yn=wr.def(),On(yn,"=",_n,".getNumPendingQueries();")):On(_n,".beginQuery(",zr,");"))}function un(On){On(zr,".cpuTime+=",Ln(),"-",Wn,";"),$t&&(cn?On(_n,".pushScopeStats(",yn,",",_n,".getNumPendingQueries(),",zr,");"):On(_n,".endQuery();"))}function Rr(On){var $n=wr.def(dn,".profile");wr(dn,".profile=",On,";"),wr.exit(dn,".profile=",$n,";")}var Cr=Xt.shared,zr=Xt.stats,dn=Cr.current,_n=Cr.timer;an=an.profile;var Wn,yn;if(an){if(ee(an)){an.enable?(wn(wr),un(wr.exit),Rr("true")):Rr("false");return}an=an.append(Xt,wr),Rr(an)}else an=wr.def(dn,".profile");Cr=Xt.block(),wn(Cr),wr("if(",an,"){",Cr,"}"),Xt=Xt.block(),un(Xt),wr.exit("if(",an,"){",Xt,"}")}function xr(Xt,wr,an,cn,hn){function Ln(Rr){switch(Rr){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}}function wn(Rr,Cr,zr){function dn(){wr("if(!",On,".buffer){",Wn,".enableVertexAttribArray(",yn,");}");var oa=zr.type,da;da=zr.size?wr.def(zr.size,"||",Cr):Cr,wr("if(",On,".type!==",oa,"||",On,".size!==",da,"||",ia.map(function(Ki){return On+"."+Ki+"!=="+zr[Ki]}).join("||"),"){",Wn,".bindBuffer(",34962,",",$n,".buffer);",Wn,".vertexAttribPointer(",[yn,da,oa,zr.normalized,zr.stride,zr.offset],");",On,".type=",oa,";",On,".size=",da,";",ia.map(function(Ki){return On+"."+Ki+"="+zr[Ki]+";"}).join(""),"}"),Mr&&(oa=zr.divisor,wr("if(",On,".divisor!==",oa,"){",Xt.instancing,".vertexAttribDivisorANGLE(",[yn,oa],");",On,".divisor=",oa,";}"))}function _n(){wr("if(",On,".buffer){",Wn,".disableVertexAttribArray(",yn,");",On,".buffer=null;","}if(",wt.map(function(oa,da){return On+"."+oa+"!=="+la[da]}).join("||"),"){",Wn,".vertexAttrib4f(",yn,",",la,");",wt.map(function(oa,da){return On+"."+oa+"="+la[da]+";"}).join(""),"}")}var Wn=un.gl,yn=wr.def(Rr,".location"),On=wr.def(un.attributes,"[",yn,"]");Rr=zr.state;var $n=zr.buffer,la=[zr.x,zr.y,zr.z,zr.w],ia=["buffer","normalized","offset","stride"];Rr===1?dn():Rr===2?_n():(wr("if(",Rr,"===",1,"){"),dn(),wr("}else{"),_n(),wr("}"))}var un=Xt.shared;cn.forEach(function(Rr){var Cr=Rr.name,zr=an.attributes[Cr],dn;if(zr){if(!hn(zr))return;dn=zr.append(Xt,wr)}else{if(!hn(ir))return;var _n=Xt.scopeAttrib(Cr);dn={},Object.keys(new ta).forEach(function(Wn){dn[Wn]=wr.def(_n,".",Wn)})}wn(Xt.link(Rr),Ln(Rr.info.type),dn)})}function Ar(Xt,wr,an,cn,hn,Ln){for(var wn=Xt.shared,un=wn.gl,Rr,Cr=0;Cr>1)",On],");")}function da(){an($n,".drawArraysInstancedANGLE(",[_n,Wn,yn,On],");")}dn&&dn!=="null"?ia?oa():(an("if(",dn,"){"),oa(),an("}else{"),da(),an("}")):da()}function wn(){function oa(){an(Rr+".drawElements("+[_n,yn,la,Wn+"<<(("+la+"-5121)>>1)"]+");")}function da(){an(Rr+".drawArrays("+[_n,Wn,yn]+");")}dn&&dn!=="null"?ia?oa():(an("if(",dn,"){"),oa(),an("}else{"),da(),an("}")):da()}var un=Xt.shared,Rr=un.gl,Cr=un.draw,zr=cn.draw,dn=function(){var oa=zr.elements,da=wr;return oa?((oa.contextDep&&cn.contextDynamic||oa.propDep)&&(da=an),oa=oa.append(Xt,da),zr.elementsActive&&da("if("+oa+")"+Rr+".bindBuffer(34963,"+oa+".buffer.buffer);")):(oa=da.def(),da(oa,"=",Cr,".","elements",";","if(",oa,"){",Rr,".bindBuffer(",34963,",",oa,".buffer.buffer);}","else if(",un.vao,".currentVAO){",oa,"=",Xt.shared.elements+".getElements("+un.vao,".currentVAO.elements);",nn?"":"if("+oa+")"+Rr+".bindBuffer(34963,"+oa+".buffer.buffer);","}")),oa}(),_n=hn("primitive"),Wn=hn("offset"),yn=function(){var oa=zr.count,da=wr;return oa?((oa.contextDep&&cn.contextDynamic||oa.propDep)&&(da=an),oa=oa.append(Xt,da)):oa=da.def(Cr,".","count"),oa}();if(typeof yn=="number"){if(yn===0)return}else an("if(",yn,"){"),an.exit("}");var On,$n;Mr&&(On=hn("instances"),$n=Xt.instancing);var la=dn+".type",ia=zr.elements&&ee(zr.elements)&&!zr.vaoActive;Mr&&(typeof On!="number"||0<=On)?typeof On=="string"?(an("if(",On,">0){"),Ln(),an("}else if(",On,"<0){"),wn(),an("}")):Ln():wn()}function Nr(Xt,wr,an,cn,hn){return wr=Dt(),hn=wr.proc("body",hn),Mr&&(wr.instancing=hn.def(wr.shared.extensions,".angle_instanced_arrays")),Xt(wr,hn,an,cn),wr.compile().body}function qr(Xt,wr,an,cn){In(Xt,wr),an.useVAO?an.drawVAO?wr(Xt.shared.vao,".setVAO(",an.drawVAO.append(Xt,wr),");"):wr(Xt.shared.vao,".setVAO(",Xt.shared.vao,".targetVAO);"):(wr(Xt.shared.vao,".setVAO(null);"),xr(Xt,wr,an,cn.attributes,function(){return!0})),Ar(Xt,wr,an,cn.uniforms,function(){return!0},!1),Or(Xt,wr,wr,an)}function vn(Xt,wr){var an=Xt.proc("draw",1);In(Xt,an),Ir(Xt,an,wr.context),kr(Xt,an,wr.framebuffer),pn(Xt,an,wr),jr(Xt,an,wr.state),Dn(Xt,an,wr,!1,!0);var cn=wr.shader.progVar.append(Xt,an);if(an(Xt.shared.gl,".useProgram(",cn,".program);"),wr.shader.program)qr(Xt,an,wr,wr.shader.program);else{an(Xt.shared.vao,".setVAO(null);");var hn=Xt.global.def("{}"),Ln=an.def(cn,".id"),wn=an.def(hn,"[",Ln,"]");an(Xt.cond(wn).then(wn,".call(this,a0);").else(wn,"=",hn,"[",Ln,"]=",Xt.link(function(un){return Nr(qr,Xt,wr,un,1)}),"(",cn,");",wn,".call(this,a0);"))}0=--this.refCount&<(this)},hr.profile&&(br.getTotalRenderbufferSize=function(){var _t=0;return Object.keys(St).forEach(function(Ht){_t+=St[Ht].stats.size}),_t}),{create:function(_t,Ht){function $t(or,Er){var Ye=0,We=0,Dt=32854;if(typeof or=="object"&&or?("shape"in or?(We=or.shape,Ye=We[0]|0,We=We[1]|0):("radius"in or&&(Ye=We=or.radius|0),"width"in or&&(Ye=or.width|0),"height"in or&&(We=or.height|0)),"format"in or&&(Dt=xt[or.format])):typeof or=="number"?(Ye=or|0,We=typeof Er=="number"?Er|0:Ye):or||(Ye=We=1),Ye!==Qt.width||We!==Qt.height||Dt!==Qt.format)return $t.width=Qt.width=Ye,$t.height=Qt.height=We,Qt.format=Dt,yt.bindRenderbuffer(36161,Qt.renderbuffer),yt.renderbufferStorage(36161,Dt,Ye,We),hr.profile&&(Qt.stats.size=ye[Qt.format]*Qt.width*Qt.height),$t.format=Tt[Qt.format],$t}var Qt=new ut(yt.createRenderbuffer());return St[Qt.id]=Qt,br.renderbufferCount++,$t(_t,Ht),$t.resize=function(or,Er){var Ye=or|0,We=Er|0||Ye;return Ye===Qt.width&&We===Qt.height||($t.width=Qt.width=Ye,$t.height=Qt.height=We,yt.bindRenderbuffer(36161,Qt.renderbuffer),yt.renderbufferStorage(36161,Qt.format,Ye,We),hr.profile&&(Qt.stats.size=ye[Qt.format]*Qt.width*Qt.height)),$t},$t._reglType="renderbuffer",$t._renderbuffer=Qt,hr.profile&&($t.stats=Qt.stats),$t.destroy=function(){Qt.decRef()},$t},clear:function(){xe(St).forEach(lt)},restore:function(){xe(St).forEach(function(_t){_t.renderbuffer=yt.createRenderbuffer(),yt.bindRenderbuffer(36161,_t.renderbuffer),yt.renderbufferStorage(36161,_t.format,_t.width,_t.height)}),yt.bindRenderbuffer(36161,null)}}},Be=[];Be[6408]=4,Be[6407]=3;var ot=[];ot[5121]=1,ot[5126]=4,ot[36193]=2;var at=[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],wt=["x","y","z","w"],It="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),Bt={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Gt={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},Lt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Kt={cw:2304,ccw:2305},ir=new K(!1,!1,!1,function(){}),_r=function(yt,jt){function Yt(){this.endQueryIndex=this.startQueryIndex=-1,this.sum=0,this.stats=null}function br(St,_t,Ht){var $t=lt.pop()||new Yt;$t.startQueryIndex=St,$t.endQueryIndex=_t,$t.sum=0,$t.stats=Ht,xt.push($t)}if(!jt.ext_disjoint_timer_query)return null;var hr=[],ut=[],lt=[],xt=[],Tt=[],Ct=[];return{beginQuery:function(St){var _t=hr.pop()||jt.ext_disjoint_timer_query.createQueryEXT();jt.ext_disjoint_timer_query.beginQueryEXT(35007,_t),ut.push(_t),br(ut.length-1,ut.length,St)},endQuery:function(){jt.ext_disjoint_timer_query.endQueryEXT(35007)},pushScopeStats:br,update:function(){var St,_t;if(St=ut.length,St!==0){Ct.length=Math.max(Ct.length,St+1),Tt.length=Math.max(Tt.length,St+1),Tt[0]=0;var Ht=Ct[0]=0;for(_t=St=0;_t=Dn.length&&br()}var Tn=le(Dn,vn);Dn[Tn]=fn}}}function Ct(){var vn=jr.viewport,fn=jr.scissor_box;vn[0]=vn[1]=fn[0]=fn[1]=0,nr.viewportWidth=nr.framebufferWidth=nr.drawingBufferWidth=vn[2]=fn[2]=$t.drawingBufferWidth,nr.viewportHeight=nr.framebufferHeight=nr.drawingBufferHeight=vn[3]=fn[3]=$t.drawingBufferHeight}function St(){nr.tick+=1,nr.time=Ht(),Ct(),kr.procs.poll()}function _t(){vr.refresh(),Ct(),kr.procs.refresh(),Dt&&Dt.update()}function Ht(){return(Te()-Ft)/1e3}if(yt=t(yt),!yt)return null;var $t=yt.gl,Qt=$t.getContextAttributes();$t.isContextLost();var or=r($t,yt);if(!or)return null;var pn=i(),Er={vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0},Ye=yt.cachedCode||{},We=or.extensions,Dt=_r($t,We),Ft=Te(),lr=$t.drawingBufferWidth,Zt=$t.drawingBufferHeight,nr={tick:0,time:0,viewportWidth:lr,viewportHeight:Zt,framebufferWidth:lr,framebufferHeight:Zt,drawingBufferWidth:lr,drawingBufferHeight:Zt,pixelRatio:yt.pixelRatio},lr={elements:null,primitive:4,count:-1,offset:0,instances:-1},rr=Ne($t,We),zt=o($t,Er,yt,function(vn){return dr.destroyBuffer(vn)}),fr=d($t,We,zt,Er),dr=k($t,We,rr,Er,zt,fr,lr),pr=O($t,pn,Er,yt),vr=z($t,We,rr,function(){kr.procs.poll()},nr,Er,yt),Hr=Le($t,We,rr,Er,yt),Ir=I($t,We,rr,vr,Hr,Er),kr=$($t,pn,We,rr,zt,fr,vr,Ir,{},dr,pr,lr,nr,Dt,Ye,yt),pn=N($t,Ir,kr.procs.poll,nr),jr=kr.next,In=$t.canvas,Dn=[],xr=[],Ar=[],Or=[yt.onDestroy],Nr=null;In&&(In.addEventListener("webglcontextlost",hr,!1),In.addEventListener("webglcontextrestored",ut,!1));var qr=Ir.setFBO=lt({framebuffer:me.define.call(null,1,"framebuffer")});return _t(),Qt=ie(lt,{clear:function(vn){if("framebuffer"in vn)if(vn.framebuffer&&vn.framebuffer_reglType==="framebufferCube")for(var fn=0;6>fn;++fn)qr(ie({framebuffer:vn.framebuffer.faces[fn]},vn),xt);else qr(vn,xt);else xt(null,vn)},prop:me.define.bind(null,1),context:me.define.bind(null,2),this:me.define.bind(null,3),draw:lt({}),buffer:function(vn){return zt.create(vn,34962,!1,!1)},elements:function(vn){return fr.create(vn,!1)},texture:vr.create2D,cube:vr.createCube,renderbuffer:Hr.create,framebuffer:Ir.create,framebufferCube:Ir.createCube,vao:dr.createVAO,attributes:Qt,frame:Tt,on:function(vn,fn){var Tn;switch(vn){case"frame":return Tt(fn);case"lost":Tn=xr;break;case"restore":Tn=Ar;break;case"destroy":Tn=Or}return Tn.push(fn),{cancel:function(){for(var Pn=0;Pn2?"one of ".concat(p," ").concat(v.slice(0,t-1).join(", "),", or ")+v[t-1]:t===2?"one of ".concat(p," ").concat(v[0]," or ").concat(v[1]):"of ".concat(p," ").concat(v[0])}else return"of ".concat(p," ").concat(String(v))}function i(v,p,t){return v.substr(!t||t<0?0:+t,p.length)===p}function L(v,p,t){return(t===void 0||t>v.length)&&(t=v.length),v.substring(t-p.length,t)===p}function A(v,p,t){return typeof t!="number"&&(t=0),t+p.length>v.length?!1:v.indexOf(p,t)!==-1}m("ERR_INVALID_OPT_VALUE",function(v,p){return'The value "'+p+'" is invalid for option "'+v+'"'},TypeError),m("ERR_INVALID_ARG_TYPE",function(v,p,t){var r;typeof p=="string"&&i(p,"not ")?(r="must not be",p=p.replace(/^not /,"")):r="must be";var s;if(L(v," argument"))s="The ".concat(v," ").concat(r," ").concat(P(p,"type"));else{var n=A(v,".")?"property":"argument";s='The "'.concat(v,'" ').concat(n," ").concat(r," ").concat(P(p,"type"))}return s+=". Received type ".concat(typeof t),s},TypeError),m("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),m("ERR_METHOD_NOT_IMPLEMENTED",function(v){return"The "+v+" method is not implemented"}),m("ERR_STREAM_PREMATURE_CLOSE","Premature close"),m("ERR_STREAM_DESTROYED",function(v){return"Cannot call "+v+" after a stream was destroyed"}),m("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),m("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),m("ERR_STREAM_WRITE_AFTER_END","write after end"),m("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),m("ERR_UNKNOWN_ENCODING",function(v){return"Unknown encoding: "+v},TypeError),m("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),G.exports.q=e},37865:function(G,V,e){var m=e(90386),P=Object.keys||function(n){var l=[];for(var c in n)l.push(c);return l};G.exports=t;var i=e(40410),L=e(37493);e(42018)(t,i);for(var A=P(L.prototype),v=0;v0)if(typeof $!="string"&&!me.objectMode&&Object.getPrototypeOf($)!==A.prototype&&($=p($)),ie)me.endEmitted?C(q,new o):y(q,me,$,!0);else if(me.ended)C(q,new w);else{if(me.destroyed)return!1;me.reading=!1,me.decoder&&!le?($=me.decoder.write($),me.objectMode||$.length!==0?y(q,me,$,!1):U(q,me)):y(q,me,$,!1)}else ie||(me.reading=!1,U(q,me))}return!me.ended&&(me.length=I?q=I:(q--,q|=q>>>1,q|=q>>>2,q|=q>>>4,q|=q>>>8,q|=q>>>16,q++),q}function k(q,$){return q<=0||$.length===0&&$.ended?0:$.objectMode?1:q!==q?$.flowing&&$.length?$.buffer.head.data.length:$.length:(q>$.highWaterMark&&($.highWaterMark=B(q)),q<=$.length?q:$.ended?$.length:($.needReadable=!0,0))}a.prototype.read=function(q){s("read",q),q=parseInt(q,10);var $=this._readableState,le=q;if(q!==0&&($.emittedReadable=!1),q===0&&$.needReadable&&(($.highWaterMark!==0?$.length>=$.highWaterMark:$.length>0)||$.ended))return s("read: emitReadable",$.length,$.ended),$.length===0&&$.ended?K(this):N(this),null;if(q=k(q,$),q===0&&$.ended)return $.length===0&&K(this),null;var ie=$.needReadable;s("need readable",ie),($.length===0||$.length-q<$.highWaterMark)&&(ie=!0,s("length less than watermark",ie)),$.ended||$.reading?(ie=!1,s("reading or ended",ie)):ie&&(s("do read"),$.reading=!0,$.sync=!0,$.length===0&&($.needReadable=!0),this._read($.highWaterMark),$.sync=!1,$.reading||(q=k(le,$)));var he;return q>0?he=j(q,$):he=null,he===null?($.needReadable=$.length<=$.highWaterMark,q=0):($.length-=q,$.awaitDrain=0),$.length===0&&($.ended||($.needReadable=!0),le!==q&&$.ended&&K(this)),he!==null&&this.emit("data",he),he};function O(q,$){if(s("onEofChunk"),!$.ended){if($.decoder){var le=$.decoder.end();le&&le.length&&($.buffer.push(le),$.length+=$.objectMode?1:le.length)}$.ended=!0,$.sync?N(q):($.needReadable=!1,$.emittedReadable||($.emittedReadable=!0,_(q)))}}function N(q){var $=q._readableState;s("emitReadable",$.needReadable,$.emittedReadable),$.needReadable=!1,$.emittedReadable||(s("emitReadable",$.flowing),$.emittedReadable=!0,m.nextTick(_,q))}function _(q){var $=q._readableState;s("emitReadable_",$.destroyed,$.length,$.ended),!$.destroyed&&($.length||$.ended)&&(q.emit("readable"),$.emittedReadable=!1),$.needReadable=!$.flowing&&!$.ended&&$.length<=$.highWaterMark,Z(q)}function U(q,$){$.readingMore||($.readingMore=!0,m.nextTick(Y,q,$))}function Y(q,$){for(;!$.reading&&!$.ended&&($.length<$.highWaterMark||$.flowing&&$.length===0);){var le=$.length;if(s("maybeReadMore read 0"),q.read(0),le===$.length)break}$.readingMore=!1}a.prototype._read=function(q){C(this,new h("_read()"))},a.prototype.pipe=function(q,$){var le=this,ie=this._readableState;switch(ie.pipesCount){case 0:ie.pipes=q;break;case 1:ie.pipes=[ie.pipes,q];break;default:ie.pipes.push(q);break}ie.pipesCount+=1,s("pipe count=%d opts=%j",ie.pipesCount,$);var he=(!$||$.end!==!1)&&q!==m.stdout&&q!==m.stderr,me=he?Te:Fe;ie.endEmitted?m.nextTick(me):le.once("end",me),q.on("unpipe",Me);function Me(Ge,nt){s("onunpipe"),Ge===le&&nt&&nt.hasUnpiped===!1&&(nt.hasUnpiped=!0,Ee())}function Te(){s("onend"),q.end()}var Oe=J(le);q.on("drain",Oe);var Ne=!1;function Ee(){s("cleanup"),q.removeListener("close",Ue),q.removeListener("finish",He),q.removeListener("drain",Oe),q.removeListener("error",Se),q.removeListener("unpipe",Me),le.removeListener("end",Te),le.removeListener("end",Fe),le.removeListener("data",xe),Ne=!0,ie.awaitDrain&&(!q._writableState||q._writableState.needDrain)&&Oe()}le.on("data",xe);function xe(Ge){s("ondata");var nt=q.write(Ge);s("dest.write",nt),nt===!1&&((ie.pipesCount===1&&ie.pipes===q||ie.pipesCount>1&&oe(ie.pipes,q)!==-1)&&!Ne&&(s("false write response, pause",ie.awaitDrain),ie.awaitDrain++),le.pause())}function Se(Ge){s("onerror",Ge),Fe(),q.removeListener("error",Se),i(q,"error")===0&&C(q,Ge)}S(q,"error",Se);function Ue(){q.removeListener("finish",He),Fe()}q.once("close",Ue);function He(){s("onfinish"),q.removeListener("close",Ue),Fe()}q.once("finish",He);function Fe(){s("unpipe"),le.unpipe(q)}return q.emit("pipe",le),ie.flowing||(s("pipe resume"),le.resume()),q};function J(q){return function(){var le=q._readableState;s("pipeOnDrain",le.awaitDrain),le.awaitDrain&&le.awaitDrain--,le.awaitDrain===0&&i(q,"data")&&(le.flowing=!0,Z(q))}}a.prototype.unpipe=function(q){var $=this._readableState,le={hasUnpiped:!1};if($.pipesCount===0)return this;if($.pipesCount===1)return q&&q!==$.pipes?this:(q||(q=$.pipes),$.pipes=null,$.pipesCount=0,$.flowing=!1,q&&q.emit("unpipe",this,le),this);if(!q){var ie=$.pipes,he=$.pipesCount;$.pipes=null,$.pipesCount=0,$.flowing=!1;for(var me=0;me0,ie.flowing!==!1&&this.resume()):q==="readable"&&!ie.endEmitted&&!ie.readableListening&&(ie.readableListening=ie.needReadable=!0,ie.flowing=!1,ie.emittedReadable=!1,s("on readable",ie.length,ie.reading),ie.length?N(this):ie.reading||m.nextTick(ae,this)),le},a.prototype.addListener=a.prototype.on,a.prototype.removeListener=function(q,$){var le=L.prototype.removeListener.call(this,q,$);return q==="readable"&&m.nextTick(te,this),le},a.prototype.removeAllListeners=function(q){var $=L.prototype.removeAllListeners.apply(this,arguments);return(q==="readable"||q===void 0)&&m.nextTick(te,this),$};function te(q){var $=q._readableState;$.readableListening=q.listenerCount("readable")>0,$.resumeScheduled&&!$.paused?$.flowing=!0:q.listenerCount("data")>0&&q.resume()}function ae(q){s("readable nexttick read 0"),q.read(0)}a.prototype.resume=function(){var q=this._readableState;return q.flowing||(s("resume"),q.flowing=!q.readableListening,ce(this,q)),q.paused=!1,this};function ce(q,$){$.resumeScheduled||($.resumeScheduled=!0,m.nextTick(Q,q,$))}function Q(q,$){s("resume",$.reading),$.reading||q.read(0),$.resumeScheduled=!1,q.emit("resume"),Z(q),$.flowing&&!$.reading&&q.read(0)}a.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};function Z(q){var $=q._readableState;for(s("flow",$.flowing);$.flowing&&q.read()!==null;);}a.prototype.wrap=function(q){var $=this,le=this._readableState,ie=!1;q.on("end",function(){if(s("wrapped end"),le.decoder&&!le.ended){var Me=le.decoder.end();Me&&Me.length&&$.push(Me)}$.push(null)}),q.on("data",function(Me){if(s("wrapped data"),le.decoder&&(Me=le.decoder.write(Me)),!(le.objectMode&&Me==null)&&!(!le.objectMode&&(!Me||!Me.length))){var Te=$.push(Me);Te||(ie=!0,q.pause())}});for(var he in q)this[he]===void 0&&typeof q[he]=="function"&&(this[he]=function(Te){return function(){return q[Te].apply(q,arguments)}}(he));for(var me=0;me=$.length?($.decoder?le=$.buffer.join(""):$.buffer.length===1?le=$.buffer.first():le=$.buffer.concat($.length),$.buffer.clear()):le=$.buffer.consume(q,$.decoder),le}function K(q){var $=q._readableState;s("endReadable",$.endEmitted),$.endEmitted||($.ended=!0,m.nextTick(ee,$,q))}function ee(q,$){if(s("endReadableNT",q.endEmitted,q.length),!q.endEmitted&&q.length===0&&(q.endEmitted=!0,$.readable=!1,$.emit("end"),q.autoDestroy)){var le=$._writableState;(!le||le.autoDestroy&&le.finished)&&$.destroy()}}typeof Symbol=="function"&&(a.from=function(q,$){return T===void 0&&(T=e(31748)),T(a,q,$)});function oe(q,$){for(var le=0,ie=q.length;le-1))throw new M(j);return this._writableState.defaultEncoding=j,this},Object.defineProperty(b.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function y(Z,j,K){return!Z.objectMode&&Z.decodeStrings!==!1&&typeof j=="string"&&(j=v.from(j,K)),j}Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(Z,j,K,ee,oe,q){if(!K){var $=y(j,ee,oe);ee!==$&&(K=!0,oe="buffer",ee=$)}var le=j.objectMode?1:ee.length;j.length+=le;var ie=j.length0?this.tail.next=f:this.head=f,this.tail=f,++this.length}},{key:"unshift",value:function(g){var f={data:g,next:this.head};this.length===0&&(this.tail=f),this.head=f,++this.length}},{key:"shift",value:function(){if(this.length!==0){var g=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,g}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(g){if(this.length===0)return"";for(var f=this.head,w=""+f.data;f=f.next;)w+=g+f.data;return w}},{key:"concat",value:function(g){if(this.length===0)return t.alloc(0);for(var f=t.allocUnsafe(g>>>0),w=this.head,h=0;w;)l(w.data,f,h),h+=w.data.length,w=w.next;return f}},{key:"consume",value:function(g,f){var w;return go.length?o.length:g;if(d===o.length?h+=o:h+=o.slice(0,g),g-=d,g===0){d===o.length?(++w,f.next?this.head=f.next:this.head=this.tail=null):(this.head=f,f.data=o.slice(d));break}++w}return this.length-=w,h}},{key:"_getBuffer",value:function(g){var f=t.allocUnsafe(g),w=this.head,h=1;for(w.data.copy(f),g-=w.data.length;w=w.next;){var o=w.data,d=g>o.length?o.length:g;if(o.copy(f,f.length-g,0,d),g-=d,g===0){d===o.length?(++h,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=o.slice(d));break}++h}return this.length-=h,f}},{key:n,value:function(g,f){return s(this,P({},f,{depth:0,customInspect:!1}))}}]),c}()},65756:function(G,V,e){var m=e(90386);function P(t,r){var s=this,n=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return n||l?(r?r(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,m.nextTick(v,this,t)):m.nextTick(v,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(c){!r&&c?s._writableState?s._writableState.errorEmitted?m.nextTick(L,s):(s._writableState.errorEmitted=!0,m.nextTick(i,s,c)):m.nextTick(i,s,c):r?(m.nextTick(L,s),r(c)):m.nextTick(L,s)}),this)}function i(t,r){v(t,r),L(t)}function L(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function A(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function v(t,r){t.emit("error",r)}function p(t,r){var s=t._readableState,n=t._writableState;s&&s.autoDestroy||n&&n.autoDestroy?t.destroy(r):t.emit("error",r)}G.exports={destroy:P,undestroy:A,errorOrDestroy:p}},12726:function(G,V,e){var m=e(74322).q.ERR_STREAM_PREMATURE_CLOSE;function P(v){var p=!1;return function(){if(!p){p=!0;for(var t=arguments.length,r=new Array(t),s=0;s0;return t(o,M,T,function(C){w||(w=C),C&&h.forEach(r),!M&&(h.forEach(r),f(w))})});return u.reduce(s)}G.exports=l},56306:function(G,V,e){var m=e(74322).q.ERR_INVALID_OPT_VALUE;function P(L,A,v){return L.highWaterMark!=null?L.highWaterMark:A?L[v]:null}function i(L,A,v,p){var t=P(A,p,v);if(t!=null){if(!(isFinite(t)&&Math.floor(t)===t)||t<0){var r=p?v:"highWaterMark";throw new m(r,t)}return Math.floor(t)}return L.objectMode?16:16384}G.exports={getHighWaterMark:i}},71405:function(G,V,e){G.exports=e(15398).EventEmitter},68019:function(G,V,e){var m=e(71665).Buffer,P=m.isEncoding||function(h){switch(h=""+h,h&&h.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 i(h){if(!h)return"utf8";for(var o;;)switch(h){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 h;default:if(o)return;h=(""+h).toLowerCase(),o=!0}}function L(h){var o=i(h);if(typeof o!="string"&&(m.isEncoding===P||!P(h)))throw new Error("Unknown encoding: "+h);return o||h}V.s=A;function A(h){this.encoding=L(h);var o;switch(this.encoding){case"utf16le":this.text=l,this.end=c,o=4;break;case"utf8":this.fillLast=r,o=4;break;case"base64":this.text=u,this.end=g,o=3;break;default:this.write=f,this.end=w;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=m.allocUnsafe(o)}A.prototype.write=function(h){if(h.length===0)return"";var o,d;if(this.lastNeed){if(o=this.fillLast(h),o===void 0)return"";d=this.lastNeed,this.lastNeed=0}else d=0;return d>5===6?2:h>>4===14?3:h>>3===30?4:h>>6===2?-1:-2}function p(h,o,d){var M=o.length-1;if(M=0?(T>0&&(h.lastNeed=T-1),T):--M=0?(T>0&&(h.lastNeed=T-2),T):--M=0?(T>0&&(T===2?T=0:h.lastNeed=T-3),T):0))}function t(h,o,d){if((o[0]&192)!==128)return h.lastNeed=0,"�";if(h.lastNeed>1&&o.length>1){if((o[1]&192)!==128)return h.lastNeed=1,"�";if(h.lastNeed>2&&o.length>2&&(o[2]&192)!==128)return h.lastNeed=2,"�"}}function r(h){var o=this.lastTotal-this.lastNeed,d=t(this,h);if(d!==void 0)return d;if(this.lastNeed<=h.length)return h.copy(this.lastChar,o,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);h.copy(this.lastChar,o,0,h.length),this.lastNeed-=h.length}function s(h,o){var d=p(this,h,o);if(!this.lastNeed)return h.toString("utf8",o);this.lastTotal=d;var M=h.length-(d-this.lastNeed);return h.copy(this.lastChar,0,M),h.toString("utf8",o,M)}function n(h){var o=h&&h.length?this.write(h):"";return this.lastNeed?o+"�":o}function l(h,o){if((h.length-o)%2===0){var d=h.toString("utf16le",o);if(d){var M=d.charCodeAt(d.length-1);if(M>=55296&&M<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=h[h.length-2],this.lastChar[1]=h[h.length-1],d.slice(0,-1)}return d}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=h[h.length-1],h.toString("utf16le",o,h.length-1)}function c(h){var o=h&&h.length?this.write(h):"";if(this.lastNeed){var d=this.lastTotal-this.lastNeed;return o+this.lastChar.toString("utf16le",0,d)}return o}function u(h,o){var d=(h.length-o)%3;return d===0?h.toString("base64",o):(this.lastNeed=3-d,this.lastTotal=3,d===1?this.lastChar[0]=h[h.length-1]:(this.lastChar[0]=h[h.length-2],this.lastChar[1]=h[h.length-1]),h.toString("base64",o,h.length-d))}function g(h){var o=h&&h.length?this.write(h):"";return this.lastNeed?o+this.lastChar.toString("base64",0,3-this.lastNeed):o}function f(h){return h.toString(this.encoding)}function w(h){return h&&h.length?this.write(h):""}},90715:function(G,V,e){var m=e(32791),P=e(41633)("stream-parser");G.exports=p;var i=-1,L=0,A=1,v=2;function p(h){var o=h&&typeof h._transform=="function",d=h&&typeof h._write=="function";if(!o&&!d)throw new Error("must pass a Writable or Transform stream in");P("extending Parser into stream"),h._bytes=r,h._skipBytes=s,o&&(h._passthrough=n),o?h._transform=c:h._write=l}function t(h){P("initializing parser stream"),h._parserBytesLeft=0,h._parserBuffers=[],h._parserBuffered=0,h._parserState=i,h._parserCallback=null,typeof h.push=="function"&&(h._parserOutput=h.push.bind(h)),h._parserInit=!0}function r(h,o){m(!this._parserCallback,'there is already a "callback" set!'),m(isFinite(h)&&h>0,'can only buffer a finite number of bytes > 0, got "'+h+'"'),this._parserInit||t(this),P("buffering %o bytes",h),this._parserBytesLeft=h,this._parserCallback=o,this._parserState=L}function s(h,o){m(!this._parserCallback,'there is already a "callback" set!'),m(h>0,'can only skip > 0 bytes, got "'+h+'"'),this._parserInit||t(this),P("skipping %o bytes",h),this._parserBytesLeft=h,this._parserCallback=o,this._parserState=A}function n(h,o){m(!this._parserCallback,'There is already a "callback" set!'),m(h>0,'can only pass through > 0 bytes, got "'+h+'"'),this._parserInit||t(this),P("passing through %o bytes",h),this._parserBytesLeft=h,this._parserCallback=o,this._parserState=v}function l(h,o,d){this._parserInit||t(this),P("write(%o bytes)",h.length),typeof o=="function"&&(d=o),f(this,h,null,d)}function c(h,o,d){this._parserInit||t(this),P("transform(%o bytes)",h.length),typeof o!="function"&&(o=this._parserOutput),f(this,h,o,d)}function u(h,o,d,M){return h._parserBytesLeft<=0?M(new Error("got data but not currently parsing anything")):o.length<=h._parserBytesLeft?function(){return g(h,o,d,M)}:function(){var T=o.slice(0,h._parserBytesLeft);return g(h,T,d,function(C){if(C)return M(C);if(o.length>T.length)return function(){return u(h,o.slice(T.length),d,M)}})}}function g(h,o,d,M){if(h._parserBytesLeft-=o.length,P("%o bytes left for stream piece",h._parserBytesLeft),h._parserState===L?(h._parserBuffers.push(o),h._parserBuffered+=o.length):h._parserState===v&&d(o),h._parserBytesLeft===0){var T=h._parserCallback;if(T&&h._parserState===L&&h._parserBuffers.length>1&&(o=Buffer.concat(h._parserBuffers,h._parserBuffered)),h._parserState!==L&&(o=null),h._parserCallback=null,h._parserBuffered=0,h._parserState=i,h._parserBuffers.splice(0),T){var C=[];o&&C.push(o),d&&C.push(d);var x=T.length>C.length;x&&C.push(w(M));var S=T.apply(h,C);if(!x||M===S)return M}}else return M}var f=w(u);function w(h){return function(){for(var o=h.apply(this,arguments);typeof o=="function";)o=o();return o}}},41633:function(G,V,e){var m=e(90386);V=G.exports=e(74469),V.log=L,V.formatArgs=i,V.save=A,V.load=v,V.useColors=P,V.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:p(),V.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function P(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0: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+)/)}V.formatters.j=function(t){try{return JSON.stringify(t)}catch(r){return"[UnexpectedJSONParseError]: "+r.message}};function i(t){var r=this.useColors;if(t[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+t[0]+(r?"%c ":" ")+"+"+V.humanize(this.diff),!!r){var s="color: "+this.color;t.splice(1,0,s,"color: inherit");var n=0,l=0;t[0].replace(/%[a-zA-Z%]/g,function(c){c!=="%%"&&(n++,c==="%c"&&(l=n))}),t.splice(l,0,s)}}function L(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function A(t){try{t==null?V.storage.removeItem("debug"):V.storage.debug=t}catch{}}function v(){var t;try{t=V.storage.debug}catch{}return!t&&typeof m<"u"&&"env"in m&&(t={}.DEBUG),t}V.enable(v());function p(){try{return window.localStorage}catch{}}},74469:function(G,V,e){V=G.exports=i.debug=i.default=i,V.coerce=p,V.disable=A,V.enable=L,V.enabled=v,V.humanize=e(11375),V.names=[],V.skips=[],V.formatters={};var m;function P(t){var r=0,s;for(s in t)r=(r<<5)-r+t.charCodeAt(s),r|=0;return V.colors[Math.abs(r)%V.colors.length]}function i(t){function r(){if(r.enabled){var s=r,n=+new Date,l=n-(m||n);s.diff=l,s.prev=m,s.curr=n,m=n;for(var c=new Array(arguments.length),u=0;u0)return L(t);if(s==="number"&&isNaN(t)===!1)return r.long?v(t):A(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function L(t){if(t=String(t),!(t.length>100)){var r=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(r){var s=parseFloat(r[1]),n=(r[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return s*i;case"days":case"day":case"d":return s*P;case"hours":case"hour":case"hrs":case"hr":case"h":return s*m;case"minutes":case"minute":case"mins":case"min":case"m":return s*e;case"seconds":case"second":case"secs":case"sec":case"s":return s*V;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function A(t){return t>=P?Math.round(t/P)+"d":t>=m?Math.round(t/m)+"h":t>=e?Math.round(t/e)+"m":t>=V?Math.round(t/V)+"s":t+"ms"}function v(t){return p(t,P,"day")||p(t,m,"hour")||p(t,e,"minute")||p(t,V,"second")||t+" ms"}function p(t,r,s){if(!(t",'""',"''","``","“”","«»"]:(typeof A.ignore=="string"&&(A.ignore=[A.ignore]),A.ignore=A.ignore.map(function(c){return c.length===1&&(c=c+c),c}));var v=m.parse(i,{flat:!0,brackets:A.ignore}),p=v[0],t=p.split(L);if(A.escape){for(var r=[],s=0;s0;){f=h[h.length-1];var o=e[f];if(A[f]=0&&p[f].push(v[M])}A[f]=d}else{if(i[f]===P[f]){for(var T=[],C=[],x=0,d=w.length-1;d>=0;--d){var S=w[d];if(L[S]=!1,T.push(S),C.push(p[S]),x+=p[S].length,v[S]=s.length,S===f){w.length=d;break}}s.push(T);for(var b=new Array(x),d=0;d1&&(u=1),u<-1&&(u=-1),c*Math.acos(u)},v=function(r,s,n,l,c,u,g,f,w,h,o,d){var M=Math.pow(c,2),T=Math.pow(u,2),C=Math.pow(o,2),x=Math.pow(d,2),S=M*T-M*x-T*C;S<0&&(S=0),S/=M*x+T*C,S=Math.sqrt(S)*(g===f?-1:1);var b=S*c/u*d,a=S*-u/c*o,E=h*b-w*a+(r+n)/2,y=w*b+h*a+(s+l)/2,z=(o-b)/c,I=(d-a)/u,B=(-o-b)/c,k=(-d-a)/u,O=A(1,0,z,I),N=A(z,I,B,k);return f===0&&N>0&&(N-=P),f===1&&N<0&&(N+=P),[E,y,O,N]},p=function(r){var s=r.px,n=r.py,l=r.cx,c=r.cy,u=r.rx,g=r.ry,f=r.xAxisRotation,w=f===void 0?0:f,h=r.largeArcFlag,o=h===void 0?0:h,d=r.sweepFlag,M=d===void 0?0:d,T=[];if(u===0||g===0)return[];var C=Math.sin(w*P/360),x=Math.cos(w*P/360),S=x*(s-l)/2+C*(n-c)/2,b=-C*(s-l)/2+x*(n-c)/2;if(S===0&&b===0)return[];u=Math.abs(u),g=Math.abs(g);var a=Math.pow(S,2)/Math.pow(u,2)+Math.pow(b,2)/Math.pow(g,2);a>1&&(u*=Math.sqrt(a),g*=Math.sqrt(a));var E=v(s,n,l,c,u,g,o,M,C,x,S,b),y=m(E,4),z=y[0],I=y[1],B=y[2],k=y[3],O=Math.abs(k)/(P/4);Math.abs(1-O)<1e-7&&(O=1);var N=Math.max(Math.ceil(O),1);k/=N;for(var _=0;_t[2]&&(t[2]=n[l+0]),n[l+1]>t[3]&&(t[3]=n[l+1]);return t}},29988:function(G,V,e){G.exports=P;var m=e(7095);function P(A){for(var v,p=[],t=0,r=0,s=0,n=0,l=null,c=null,u=0,g=0,f=0,w=A.length;f4?(t=h[h.length-4],r=h[h.length-3]):(t=u,r=g),p.push(h)}return p}function i(A,v,p,t){return["C",A,v,p,t,p,t]}function L(A,v,p,t,r,s){return["C",A/3+.6666666666666666*p,v/3+.6666666666666666*t,r/3+.6666666666666666*p,s/3+.6666666666666666*t,r,s]}},82019:function(G,V,e){var m=e(1750),P=e(95616),i=e(31457),L=e(89546),A=e(44781),v=document.createElement("canvas"),p=v.getContext("2d");G.exports=t;function t(n,l){if(!L(n))throw Error("Argument should be valid svg path string");l||(l={});var c,u;l.shape?(c=l.shape[0],u=l.shape[1]):(c=v.width=l.w||l.width||200,u=v.height=l.h||l.height||200);var g=Math.min(c,u),f=l.stroke||0,w=l.viewbox||l.viewBox||m(n),h=[c/(w[2]-w[0]),u/(w[3]-w[1])],o=Math.min(h[0]||0,h[1]||0)/2;if(p.fillStyle="black",p.fillRect(0,0,c,u),p.fillStyle="white",f&&(typeof f!="number"&&(f=1),f>0?p.strokeStyle="white":p.strokeStyle="black",p.lineWidth=Math.abs(f)),p.translate(c*.5,u*.5),p.scale(o,o),s()){var d=new Path2D(n);p.fill(d),f&&p.stroke(d)}else{var M=P(n);i(p,M),p.fill(),f&&p.stroke()}p.setTransform(1,0,0,1,0,0);var T=A(p,{cutoff:l.cutoff!=null?l.cutoff:.5,radius:l.radius!=null?l.radius:g*.5});return T}var r;function s(){if(r!=null)return r;var n=document.createElement("canvas").getContext("2d");if(n.canvas.width=n.canvas.height=1,!window.Path2D)return r=!1;var l=new Path2D("M0,0h1v1h-1v-1Z");n.fillStyle="black",n.fill(l);var c=n.getImageData(0,0,1,1);return r=c&&c.data&&c.data[3]===255}},84267:function(G,V,e){var m;(function(P){var i=/^\s+/,L=/\s+$/,A=0,v=P.round,p=P.min,t=P.max,r=P.random;function s($,le){if($=$||"",le=le||{},$ instanceof s)return $;if(!(this instanceof s))return new s($,le);var ie=n($);this._originalInput=$,this._r=ie.r,this._g=ie.g,this._b=ie.b,this._a=ie.a,this._roundA=v(100*this._a)/100,this._format=le.format||ie.format,this._gradientType=le.gradientType,this._r<1&&(this._r=v(this._r)),this._g<1&&(this._g=v(this._g)),this._b<1&&(this._b=v(this._b)),this._ok=ie.ok,this._tc_id=A++}s.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var $=this.toRgb();return($.r*299+$.g*587+$.b*114)/1e3},getLuminance:function(){var $=this.toRgb(),le,ie,he,me,Me,Te;return le=$.r/255,ie=$.g/255,he=$.b/255,le<=.03928?me=le/12.92:me=P.pow((le+.055)/1.055,2.4),ie<=.03928?Me=ie/12.92:Me=P.pow((ie+.055)/1.055,2.4),he<=.03928?Te=he/12.92:Te=P.pow((he+.055)/1.055,2.4),.2126*me+.7152*Me+.0722*Te},setAlpha:function($){return this._a=_($),this._roundA=v(100*this._a)/100,this},toHsv:function(){var $=g(this._r,this._g,this._b);return{h:$.h*360,s:$.s,v:$.v,a:this._a}},toHsvString:function(){var $=g(this._r,this._g,this._b),le=v($.h*360),ie=v($.s*100),he=v($.v*100);return this._a==1?"hsv("+le+", "+ie+"%, "+he+"%)":"hsva("+le+", "+ie+"%, "+he+"%, "+this._roundA+")"},toHsl:function(){var $=c(this._r,this._g,this._b);return{h:$.h*360,s:$.s,l:$.l,a:this._a}},toHslString:function(){var $=c(this._r,this._g,this._b),le=v($.h*360),ie=v($.s*100),he=v($.l*100);return this._a==1?"hsl("+le+", "+ie+"%, "+he+"%)":"hsla("+le+", "+ie+"%, "+he+"%, "+this._roundA+")"},toHex:function($){return w(this._r,this._g,this._b,$)},toHexString:function($){return"#"+this.toHex($)},toHex8:function($){return h(this._r,this._g,this._b,this._a,$)},toHex8String:function($){return"#"+this.toHex8($)},toRgb:function(){return{r:v(this._r),g:v(this._g),b:v(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+v(this._r)+", "+v(this._g)+", "+v(this._b)+")":"rgba("+v(this._r)+", "+v(this._g)+", "+v(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:v(U(this._r,255)*100)+"%",g:v(U(this._g,255)*100)+"%",b:v(U(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+v(U(this._r,255)*100)+"%, "+v(U(this._g,255)*100)+"%, "+v(U(this._b,255)*100)+"%)":"rgba("+v(U(this._r,255)*100)+"%, "+v(U(this._g,255)*100)+"%, "+v(U(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:O[w(this._r,this._g,this._b,!0)]||!1},toFilter:function($){var le="#"+o(this._r,this._g,this._b,this._a),ie=le,he=this._gradientType?"GradientType = 1, ":"";if($){var me=s($);ie="#"+o(me._r,me._g,me._b,me._a)}return"progid:DXImageTransform.Microsoft.gradient("+he+"startColorstr="+le+",endColorstr="+ie+")"},toString:function($){var le=!!$;$=$||this._format;var ie=!1,he=this._a<1&&this._a>=0,me=!le&&he&&($==="hex"||$==="hex6"||$==="hex3"||$==="hex4"||$==="hex8"||$==="name");return me?$==="name"&&this._a===0?this.toName():this.toRgbString():($==="rgb"&&(ie=this.toRgbString()),$==="prgb"&&(ie=this.toPercentageRgbString()),($==="hex"||$==="hex6")&&(ie=this.toHexString()),$==="hex3"&&(ie=this.toHexString(!0)),$==="hex4"&&(ie=this.toHex8String(!0)),$==="hex8"&&(ie=this.toHex8String()),$==="name"&&(ie=this.toName()),$==="hsl"&&(ie=this.toHslString()),$==="hsv"&&(ie=this.toHsvString()),ie||this.toHexString())},clone:function(){return s(this.toString())},_applyModification:function($,le){var ie=$.apply(null,[this].concat([].slice.call(le)));return this._r=ie._r,this._g=ie._g,this._b=ie._b,this.setAlpha(ie._a),this},lighten:function(){return this._applyModification(C,arguments)},brighten:function(){return this._applyModification(x,arguments)},darken:function(){return this._applyModification(S,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(M,arguments)},greyscale:function(){return this._applyModification(T,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function($,le){return $.apply(null,[this].concat([].slice.call(le)))},analogous:function(){return this._applyCombination(I,arguments)},complement:function(){return this._applyCombination(a,arguments)},monochromatic:function(){return this._applyCombination(B,arguments)},splitcomplement:function(){return this._applyCombination(z,arguments)},triad:function(){return this._applyCombination(E,arguments)},tetrad:function(){return this._applyCombination(y,arguments)}},s.fromRatio=function($,le){if(typeof $=="object"){var ie={};for(var he in $)$.hasOwnProperty(he)&&(he==="a"?ie[he]=$[he]:ie[he]=Q($[he]));$=ie}return s($,le)};function n($){var le={r:0,g:0,b:0},ie=1,he=null,me=null,Me=null,Te=!1,Oe=!1;return typeof $=="string"&&($=oe($)),typeof $=="object"&&(ee($.r)&&ee($.g)&&ee($.b)?(le=l($.r,$.g,$.b),Te=!0,Oe=String($.r).substr(-1)==="%"?"prgb":"rgb"):ee($.h)&&ee($.s)&&ee($.v)?(he=Q($.s),me=Q($.v),le=f($.h,he,me),Te=!0,Oe="hsv"):ee($.h)&&ee($.s)&&ee($.l)&&(he=Q($.s),Me=Q($.l),le=u($.h,he,Me),Te=!0,Oe="hsl"),$.hasOwnProperty("a")&&(ie=$.a)),ie=_(ie),{ok:Te,format:$.format||Oe,r:p(255,t(le.r,0)),g:p(255,t(le.g,0)),b:p(255,t(le.b,0)),a:ie}}function l($,le,ie){return{r:U($,255)*255,g:U(le,255)*255,b:U(ie,255)*255}}function c($,le,ie){$=U($,255),le=U(le,255),ie=U(ie,255);var he=t($,le,ie),me=p($,le,ie),Me,Te,Oe=(he+me)/2;if(he==me)Me=Te=0;else{var Ne=he-me;switch(Te=Oe>.5?Ne/(2-he-me):Ne/(he+me),he){case $:Me=(le-ie)/Ne+(le1&&(Se-=1),Se<.16666666666666666?Ee+(xe-Ee)*6*Se:Se<.5?xe:Se<.6666666666666666?Ee+(xe-Ee)*(.6666666666666666-Se)*6:Ee}if(le===0)he=me=Me=ie;else{var Oe=ie<.5?ie*(1+le):ie+le-ie*le,Ne=2*ie-Oe;he=Te(Ne,Oe,$+.3333333333333333),me=Te(Ne,Oe,$),Me=Te(Ne,Oe,$-.3333333333333333)}return{r:he*255,g:me*255,b:Me*255}}function g($,le,ie){$=U($,255),le=U(le,255),ie=U(ie,255);var he=t($,le,ie),me=p($,le,ie),Me,Te,Oe=he,Ne=he-me;if(Te=he===0?0:Ne/he,he==me)Me=0;else{switch(he){case $:Me=(le-ie)/Ne+(le>1)+720)%360;--le;)he.h=(he.h+me)%360,Me.push(s(he));return Me}function B($,le){le=le||6;for(var ie=s($).toHsv(),he=ie.h,me=ie.s,Me=ie.v,Te=[],Oe=1/le;le--;)Te.push(s({h:he,s:me,v:Me})),Me=(Me+Oe)%1;return Te}s.mix=function($,le,ie){ie=ie===0?0:ie||50;var he=s($).toRgb(),me=s(le).toRgb(),Me=ie/100,Te={r:(me.r-he.r)*Me+he.r,g:(me.g-he.g)*Me+he.g,b:(me.b-he.b)*Me+he.b,a:(me.a-he.a)*Me+he.a};return s(Te)},s.readability=function($,le){var ie=s($),he=s(le);return(P.max(ie.getLuminance(),he.getLuminance())+.05)/(P.min(ie.getLuminance(),he.getLuminance())+.05)},s.isReadable=function($,le,ie){var he=s.readability($,le),me,Me;switch(Me=!1,me=q(ie),me.level+me.size){case"AAsmall":case"AAAlarge":Me=he>=4.5;break;case"AAlarge":Me=he>=3;break;case"AAAsmall":Me=he>=7;break}return Me},s.mostReadable=function($,le,ie){var he=null,me=0,Me,Te,Oe,Ne;ie=ie||{},Te=ie.includeFallbackColors,Oe=ie.level,Ne=ie.size;for(var Ee=0;Eeme&&(me=Me,he=s(le[Ee]));return s.isReadable($,he,{level:Oe,size:Ne})||!Te?he:(ie.includeFallbackColors=!1,s.mostReadable($,["#fff","#000"],ie))};var k=s.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},O=s.hexNames=N(k);function N($){var le={};for(var ie in $)$.hasOwnProperty(ie)&&(le[$[ie]]=ie);return le}function _($){return $=parseFloat($),(isNaN($)||$<0||$>1)&&($=1),$}function U($,le){te($)&&($="100%");var ie=ae($);return $=p(le,t(0,parseFloat($))),ie&&($=parseInt($*le,10)/100),P.abs($-le)<1e-6?1:$%le/parseFloat(le)}function Y($){return p(1,t(0,$))}function J($){return parseInt($,16)}function te($){return typeof $=="string"&&$.indexOf(".")!=-1&&parseFloat($)===1}function ae($){return typeof $=="string"&&$.indexOf("%")!=-1}function ce($){return $.length==1?"0"+$:""+$}function Q($){return $<=1&&($=$*100+"%"),$}function Z($){return P.round(parseFloat($)*255).toString(16)}function j($){return J($)/255}var K=function(){var $="[-\\+]?\\d+%?",le="[-\\+]?\\d*\\.\\d+%?",ie="(?:"+le+")|(?:"+$+")",he="[\\s|\\(]+("+ie+")[,|\\s]+("+ie+")[,|\\s]+("+ie+")\\s*\\)?",me="[\\s|\\(]+("+ie+")[,|\\s]+("+ie+")[,|\\s]+("+ie+")[,|\\s]+("+ie+")\\s*\\)?";return{CSS_UNIT:new RegExp(ie),rgb:new RegExp("rgb"+he),rgba:new RegExp("rgba"+me),hsl:new RegExp("hsl"+he),hsla:new RegExp("hsla"+me),hsv:new RegExp("hsv"+he),hsva:new RegExp("hsva"+me),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function ee($){return!!K.CSS_UNIT.exec($)}function oe($){$=$.replace(i,"").replace(L,"").toLowerCase();var le=!1;if(k[$])$=k[$],le=!0;else if($=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ie;return(ie=K.rgb.exec($))?{r:ie[1],g:ie[2],b:ie[3]}:(ie=K.rgba.exec($))?{r:ie[1],g:ie[2],b:ie[3],a:ie[4]}:(ie=K.hsl.exec($))?{h:ie[1],s:ie[2],l:ie[3]}:(ie=K.hsla.exec($))?{h:ie[1],s:ie[2],l:ie[3],a:ie[4]}:(ie=K.hsv.exec($))?{h:ie[1],s:ie[2],v:ie[3]}:(ie=K.hsva.exec($))?{h:ie[1],s:ie[2],v:ie[3],a:ie[4]}:(ie=K.hex8.exec($))?{r:J(ie[1]),g:J(ie[2]),b:J(ie[3]),a:j(ie[4]),format:le?"name":"hex8"}:(ie=K.hex6.exec($))?{r:J(ie[1]),g:J(ie[2]),b:J(ie[3]),format:le?"name":"hex"}:(ie=K.hex4.exec($))?{r:J(ie[1]+""+ie[1]),g:J(ie[2]+""+ie[2]),b:J(ie[3]+""+ie[3]),a:j(ie[4]+""+ie[4]),format:le?"name":"hex8"}:(ie=K.hex3.exec($))?{r:J(ie[1]+""+ie[1]),g:J(ie[2]+""+ie[2]),b:J(ie[3]+""+ie[3]),format:le?"name":"hex"}:!1}function q($){var le,ie;return $=$||{level:"AA",size:"small"},le=($.level||"AA").toUpperCase(),ie=($.size||"small").toLowerCase(),le!=="AA"&&le!=="AAA"&&(le="AA"),ie!=="small"&&ie!=="large"&&(ie="small"),{level:le,size:ie}}G.exports?G.exports=s:(m=(function(){return s}).call(V,e,V,G),m!==void 0&&(G.exports=m))})(Math)},57060:function(G){G.exports=m,G.exports.float32=G.exports.float=m,G.exports.fract32=G.exports.fract=e;var V=new Float32Array(1);function e(P,i){if(P.length){if(P instanceof Float32Array)return new Float32Array(P.length);i instanceof Float32Array||(i=m(P));for(var L=0,A=i.length;L":(L.length>100&&(L=L.slice(0,99)+"…"),L=L.replace(P,function(A){switch(A){case` `:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),L)}},47403:function(G,V,e){var m=e(24582),P={object:!0,function:!0,undefined:!0};G.exports=function(i){return m(i)?hasOwnProperty.call(P,typeof i):!1}},82527:function(G,V,e){var m=e(69190),P=e(84985);G.exports=function(i){return P(i)?i:m(i,"%v is not a plain function",arguments[1])}},84985:function(G,V,e){var m=e(73116),P=/^\s*class[\s{/}]/,i=Function.prototype.toString;G.exports=function(L){return!(!m(L)||P.test(i.call(L)))}},24511:function(G,V,e){var m=e(47403);G.exports=function(P){if(!m(P))return!1;try{return P.constructor?P.constructor.prototype===P:!1}catch{return!1}}},9234:function(G,V,e){var m=e(24582),P=e(47403),i=Object.prototype.toString;G.exports=function(L){if(!m(L))return null;if(P(L)){var A=L.toString;if(typeof A!="function"||A===i)return null}try{return""+L}catch{return null}}},10424:function(G,V,e){var m=e(69190),P=e(24582);G.exports=function(i){return P(i)?i:m(i,"Cannot use %v",arguments[1])}},24582:function(G){var V=void 0;G.exports=function(e){return e!==V&&e!==null}},58404:function(G,V,e){var m=e(13547),P=e(12129),i=e(12856).Buffer;e.g.__TYPEDARRAY_POOL||(e.g.__TYPEDARRAY_POOL={UINT8:P([32,0]),UINT16:P([32,0]),UINT32:P([32,0]),BIGUINT64:P([32,0]),INT8:P([32,0]),INT16:P([32,0]),INT32:P([32,0]),BIGINT64:P([32,0]),FLOAT:P([32,0]),DOUBLE:P([32,0]),DATA:P([32,0]),UINT8C:P([32,0]),BUFFER:P([32,0])});var L=typeof Uint8ClampedArray<"u",A=typeof BigUint64Array<"u",v=typeof BigInt64Array<"u",p=e.g.__TYPEDARRAY_POOL;p.UINT8C||(p.UINT8C=P([32,0])),p.BIGUINT64||(p.BIGUINT64=P([32,0])),p.BIGINT64||(p.BIGINT64=P([32,0])),p.BUFFER||(p.BUFFER=P([32,0]));var t=p.DATA,r=p.BUFFER;V.free=function(a){if(i.isBuffer(a))r[m.log2(a.length)].push(a);else{if(Object.prototype.toString.call(a)!=="[object ArrayBuffer]"&&(a=a.buffer),!a)return;var E=a.length||a.byteLength,y=m.log2(E)|0;t[y].push(a)}};function s(b){if(b){var a=b.length||b.byteLength,E=m.log2(a);t[E].push(b)}}function n(b){s(b.buffer)}V.freeUint8=V.freeUint16=V.freeUint32=V.freeBigUint64=V.freeInt8=V.freeInt16=V.freeInt32=V.freeBigInt64=V.freeFloat32=V.freeFloat=V.freeFloat64=V.freeDouble=V.freeUint8Clamped=V.freeDataView=n,V.freeArrayBuffer=s,V.freeBuffer=function(a){r[m.log2(a.length)].push(a)},V.malloc=function(a,E){if(E===void 0||E==="arraybuffer")return l(a);switch(E){case"uint8":return c(a);case"uint16":return u(a);case"uint32":return g(a);case"int8":return f(a);case"int16":return w(a);case"int32":return h(a);case"float":case"float32":return o(a);case"double":case"float64":return d(a);case"uint8_clamped":return M(a);case"bigint64":return C(a);case"biguint64":return T(a);case"buffer":return S(a);case"data":case"dataview":return x(a);default:return null}return null};function l(a){var a=m.nextPow2(a),E=m.log2(a),y=t[E];return y.length>0?y.pop():new ArrayBuffer(a)}V.mallocArrayBuffer=l;function c(b){return new Uint8Array(l(b),0,b)}V.mallocUint8=c;function u(b){return new Uint16Array(l(2*b),0,b)}V.mallocUint16=u;function g(b){return new Uint32Array(l(4*b),0,b)}V.mallocUint32=g;function f(b){return new Int8Array(l(b),0,b)}V.mallocInt8=f;function w(b){return new Int16Array(l(2*b),0,b)}V.mallocInt16=w;function h(b){return new Int32Array(l(4*b),0,b)}V.mallocInt32=h;function o(b){return new Float32Array(l(4*b),0,b)}V.mallocFloat32=V.mallocFloat=o;function d(b){return new Float64Array(l(8*b),0,b)}V.mallocFloat64=V.mallocDouble=d;function M(b){return L?new Uint8ClampedArray(l(b),0,b):c(b)}V.mallocUint8Clamped=M;function T(b){return A?new BigUint64Array(l(8*b),0,b):null}V.mallocBigUint64=T;function C(b){return v?new BigInt64Array(l(8*b),0,b):null}V.mallocBigInt64=C;function x(b){return new DataView(l(b),0,b)}V.mallocDataView=x;function S(b){b=m.nextPow2(b);var a=m.log2(b),E=r[a];return E.length>0?E.pop():new i(b)}V.mallocBuffer=S,V.clearCache=function(){for(var a=0;a<32;++a)p.UINT8[a].length=0,p.UINT16[a].length=0,p.UINT32[a].length=0,p.INT8[a].length=0,p.INT16[a].length=0,p.INT32[a].length=0,p.FLOAT[a].length=0,p.DOUBLE[a].length=0,p.BIGUINT64[a].length=0,p.BIGINT64[a].length=0,p.UINT8C[a].length=0,t[a].length=0,r[a].length=0}},90448:function(G){var V=/[\'\"]/;G.exports=function(m){return m?(V.test(m.charAt(0))&&(m=m.substr(1)),V.test(m.charAt(m.length-1))&&(m=m.substr(0,m.length-1)),m):""}},93447:function(G){G.exports=function(e,m,P){Array.isArray(P)||(P=[].slice.call(arguments,2));for(var i=0,L=P.length;i"u"?!1:E.working?E(Me):Me instanceof Map}V.isMap=y;function z(Me){return t(Me)==="[object Set]"}z.working=typeof Set<"u"&&z(new Set);function I(Me){return typeof Set>"u"?!1:z.working?z(Me):Me instanceof Set}V.isSet=I;function B(Me){return t(Me)==="[object WeakMap]"}B.working=typeof WeakMap<"u"&&B(new WeakMap);function k(Me){return typeof WeakMap>"u"?!1:B.working?B(Me):Me instanceof WeakMap}V.isWeakMap=k;function O(Me){return t(Me)==="[object WeakSet]"}O.working=typeof WeakSet<"u"&&O(new WeakSet);function N(Me){return O(Me)}V.isWeakSet=N;function _(Me){return t(Me)==="[object ArrayBuffer]"}_.working=typeof ArrayBuffer<"u"&&_(new ArrayBuffer);function U(Me){return typeof ArrayBuffer>"u"?!1:_.working?_(Me):Me instanceof ArrayBuffer}V.isArrayBuffer=U;function Y(Me){return t(Me)==="[object DataView]"}Y.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&Y(new DataView(new ArrayBuffer(1),0,1));function J(Me){return typeof DataView>"u"?!1:Y.working?Y(Me):Me instanceof DataView}V.isDataView=J;var te=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ae(Me){return t(Me)==="[object SharedArrayBuffer]"}function ce(Me){return typeof te>"u"?!1:(typeof ae.working>"u"&&(ae.working=ae(new te)),ae.working?ae(Me):Me instanceof te)}V.isSharedArrayBuffer=ce;function Q(Me){return t(Me)==="[object AsyncFunction]"}V.isAsyncFunction=Q;function Z(Me){return t(Me)==="[object Map Iterator]"}V.isMapIterator=Z;function j(Me){return t(Me)==="[object Set Iterator]"}V.isSetIterator=j;function K(Me){return t(Me)==="[object Generator]"}V.isGeneratorObject=K;function ee(Me){return t(Me)==="[object WebAssembly.Module]"}V.isWebAssemblyCompiledModule=ee;function oe(Me){return u(Me,r)}V.isNumberObject=oe;function q(Me){return u(Me,s)}V.isStringObject=q;function $(Me){return u(Me,n)}V.isBooleanObject=$;function le(Me){return v&&u(Me,l)}V.isBigIntObject=le;function ie(Me){return p&&u(Me,c)}V.isSymbolObject=ie;function he(Me){return oe(Me)||q(Me)||$(Me)||le(Me)||ie(Me)}V.isBoxedPrimitive=he;function me(Me){return typeof Uint8Array<"u"&&(U(Me)||ce(Me))}V.isAnyArrayBuffer=me,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(Me){Object.defineProperty(V,Me,{enumerable:!1,value:function(){throw new Error(Me+" is not supported in userland")}})})},43827:function(G,V,e){var m=e(90386),P=Object.getOwnPropertyDescriptors||function(te){for(var ae=Object.keys(te),ce={},Q=0;Q=Q)return K;switch(K){case"%s":return String(ce[ae++]);case"%d":return Number(ce[ae++]);case"%j":try{return JSON.stringify(ce[ae++])}catch{return"[Circular]"}default:return K}}),j=ce[ae];ae"u")return function(){return V.deprecate(J,te).apply(this,arguments)};var ae=!1;function ce(){if(!ae){if(m.throwDeprecation)throw new Error(te);m.traceDeprecation?console.trace(te):console.error(te),ae=!0}return J.apply(this,arguments)}return ce};var L={},A=/^$/;if({}.NODE_DEBUG){var v={}.NODE_DEBUG;v=v.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),A=new RegExp("^"+v+"$","i")}V.debuglog=function(J){if(J=J.toUpperCase(),!L[J])if(A.test(J)){var te=m.pid;L[J]=function(){var ae=V.format.apply(V,arguments);console.error("%s %d: %s",J,te,ae)}}else L[J]=function(){};return L[J]};function p(J,te){var ae={seen:[],stylize:r};return arguments.length>=3&&(ae.depth=arguments[2]),arguments.length>=4&&(ae.colors=arguments[3]),h(te)?ae.showHidden=te:te&&V._extend(ae,te),x(ae.showHidden)&&(ae.showHidden=!1),x(ae.depth)&&(ae.depth=2),x(ae.colors)&&(ae.colors=!1),x(ae.customInspect)&&(ae.customInspect=!0),ae.colors&&(ae.stylize=t),n(ae,J,ae.depth)}V.inspect=p,p.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},p.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function t(J,te){var ae=p.styles[te];return ae?"\x1B["+p.colors[ae][0]+"m"+J+"\x1B["+p.colors[ae][1]+"m":J}function r(J,te){return J}function s(J){var te={};return J.forEach(function(ae,ce){te[ae]=!0}),te}function n(J,te,ae){if(J.customInspect&&te&&y(te.inspect)&&te.inspect!==V.inspect&&!(te.constructor&&te.constructor.prototype===te)){var ce=te.inspect(ae,J);return T(ce)||(ce=n(J,ce,ae)),ce}var Q=l(J,te);if(Q)return Q;var Z=Object.keys(te),j=s(Z);if(J.showHidden&&(Z=Object.getOwnPropertyNames(te)),E(te)&&(Z.indexOf("message")>=0||Z.indexOf("description")>=0))return c(te);if(Z.length===0){if(y(te)){var K=te.name?": "+te.name:"";return J.stylize("[Function"+K+"]","special")}if(S(te))return J.stylize(RegExp.prototype.toString.call(te),"regexp");if(a(te))return J.stylize(Date.prototype.toString.call(te),"date");if(E(te))return c(te)}var ee="",oe=!1,q=["{","}"];if(w(te)&&(oe=!0,q=["[","]"]),y(te)){var $=te.name?": "+te.name:"";ee=" [Function"+$+"]"}if(S(te)&&(ee=" "+RegExp.prototype.toString.call(te)),a(te)&&(ee=" "+Date.prototype.toUTCString.call(te)),E(te)&&(ee=" "+c(te)),Z.length===0&&(!oe||te.length==0))return q[0]+ee+q[1];if(ae<0)return S(te)?J.stylize(RegExp.prototype.toString.call(te),"regexp"):J.stylize("[Object]","special");J.seen.push(te);var le;return oe?le=u(J,te,ae,j,Z):le=Z.map(function(ie){return g(J,te,ae,j,ie,oe)}),J.seen.pop(),f(le,ee,q)}function l(J,te){if(x(te))return J.stylize("undefined","undefined");if(T(te)){var ae="'"+JSON.stringify(te).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return J.stylize(ae,"string")}if(M(te))return J.stylize(""+te,"number");if(h(te))return J.stylize(""+te,"boolean");if(o(te))return J.stylize("null","null")}function c(J){return"["+Error.prototype.toString.call(J)+"]"}function u(J,te,ae,ce,Q){for(var Z=[],j=0,K=te.length;j-1&&(Z?K=K.split(` `).map(function(oe){return" "+oe}).join(` `).slice(2):K=` `+K.split(` `).map(function(oe){return" "+oe}).join(` `))):K=J.stylize("[Circular]","special")),x(j)){if(Z&&Q.match(/^\d+$/))return K;j=JSON.stringify(""+Q),j.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(j=j.slice(1,-1),j=J.stylize(j,"name")):(j=j.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),j=J.stylize(j,"string"))}return j+": "+K}function f(J,te,ae){var ce=J.reduce(function(Q,Z){return Z.indexOf(` `)>=0,Q+Z.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ce>60?ae[0]+(te===""?"":te+` `)+" "+J.join(`, `)+" "+ae[1]:ae[0]+te+" "+J.join(", ")+" "+ae[1]}V.types=e(4936);function w(J){return Array.isArray(J)}V.isArray=w;function h(J){return typeof J=="boolean"}V.isBoolean=h;function o(J){return J===null}V.isNull=o;function d(J){return J==null}V.isNullOrUndefined=d;function M(J){return typeof J=="number"}V.isNumber=M;function T(J){return typeof J=="string"}V.isString=T;function C(J){return typeof J=="symbol"}V.isSymbol=C;function x(J){return J===void 0}V.isUndefined=x;function S(J){return b(J)&&I(J)==="[object RegExp]"}V.isRegExp=S,V.types.isRegExp=S;function b(J){return typeof J=="object"&&J!==null}V.isObject=b;function a(J){return b(J)&&I(J)==="[object Date]"}V.isDate=a,V.types.isDate=a;function E(J){return b(J)&&(I(J)==="[object Error]"||J instanceof Error)}V.isError=E,V.types.isNativeError=E;function y(J){return typeof J=="function"}V.isFunction=y;function z(J){return J===null||typeof J=="boolean"||typeof J=="number"||typeof J=="string"||typeof J=="symbol"||typeof J>"u"}V.isPrimitive=z,V.isBuffer=e(45920);function I(J){return Object.prototype.toString.call(J)}function B(J){return J<10?"0"+J.toString(10):J.toString(10)}var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(){var J=new Date,te=[B(J.getHours()),B(J.getMinutes()),B(J.getSeconds())].join(":");return[J.getDate(),k[J.getMonth()],te].join(" ")}V.log=function(){console.log("%s - %s",O(),V.format.apply(V,arguments))},V.inherits=e(42018),V._extend=function(J,te){if(!te||!b(te))return J;for(var ae=Object.keys(te),ce=ae.length;ce--;)J[ae[ce]]=te[ae[ce]];return J};function N(J,te){return Object.prototype.hasOwnProperty.call(J,te)}var _=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;V.promisify=function(te){if(typeof te!="function")throw new TypeError('The "original" argument must be of type Function');if(_&&te[_]){var ae=te[_];if(typeof ae!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(ae,_,{value:ae,enumerable:!1,writable:!1,configurable:!0}),ae}function ae(){for(var ce,Q,Z=new Promise(function(ee,oe){ce=ee,Q=oe}),j=[],K=0;K"u"?e.g:globalThis,t=P(),r=i("String.prototype.slice"),s={},n=Object.getPrototypeOf;v&&L&&n&&m(t,function(u){if(typeof p[u]=="function"){var g=new p[u];if(Symbol.toStringTag in g){var f=n(g),w=L(f,Symbol.toStringTag);if(!w){var h=n(f);w=L(h,Symbol.toStringTag)}s[u]=w.get}}});var l=function(g){var f=!1;return m(s,function(w,h){if(!f)try{var o=w.call(g);o===h&&(f=o)}catch{}}),f},c=e(9187);G.exports=function(g){return c(g)?!v||!(Symbol.toStringTag in g)?r(A(g),8,-1):l(g):!1}},3961:function(G,V,e){var m=e(63489),P=e(56131),i=m.instance();function L(c){this.local=this.regionalOptions[c||""]||this.regionalOptions[""]}L.prototype=new m.baseCalendar,P(L.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(c,u){if(typeof c=="string"){var g=c.match(v);return g?g[0]:""}var f=this._validateYear(c),w=c.month(),h=""+this.toChineseMonth(f,w);return u&&h.length<2&&(h="0"+h),this.isIntercalaryMonth(f,w)&&(h+="i"),h},monthNames:function(c){if(typeof c=="string"){var u=c.match(p);return u?u[0]:""}var g=this._validateYear(c),f=c.month(),w=this.toChineseMonth(g,f),h=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][w-1];return this.isIntercalaryMonth(g,f)&&(h="闰"+h),h},monthNamesShort:function(c){if(typeof c=="string"){var u=c.match(t);return u?u[0]:""}var g=this._validateYear(c),f=c.month(),w=this.toChineseMonth(g,f),h=["一","二","三","四","五","六","七","八","九","十","十一","十二"][w-1];return this.isIntercalaryMonth(g,f)&&(h="闰"+h),h},parseMonth:function(c,u){c=this._validateYear(c);var g=parseInt(u),f;if(isNaN(g))u[0]==="闰"&&(f=!0,u=u.substring(1)),u[u.length-1]==="月"&&(u=u.substring(0,u.length-1)),g=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(u);else{var w=u[u.length-1];f=w==="i"||w==="I"}var h=this.toMonthIndex(c,g,f);return h},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(c,u){if(c.year&&(c=c.year()),typeof c!="number"||c<1888||c>2111)throw u.replace(/\{0\}/,this.local.name);return c},toMonthIndex:function(c,u,g){var f=this.intercalaryMonth(c),w=g&&u!==f;if(w||u<1||u>12)throw m.local.invalidMonth.replace(/\{0\}/,this.local.name);var h;return f?!g&&u<=f?h=u-1:h=u:h=u-1,h},toChineseMonth:function(c,u){c.year&&(c=c.year(),u=c.month());var g=this.intercalaryMonth(c),f=g?12:11;if(u<0||u>f)throw m.local.invalidMonth.replace(/\{0\}/,this.local.name);var w;return g?u>13;return g},isIntercalaryMonth:function(c,u){c.year&&(c=c.year(),u=c.month());var g=this.intercalaryMonth(c);return!!g&&g===u},leapYear:function(c){return this.intercalaryMonth(c)!==0},weekOfYear:function(c,u,g){var f=this._validateYear(c,m.local.invalidyear),w=s[f-s[0]],h=w>>9&4095,o=w>>5&15,d=w&31,M;M=i.newDate(h,o,d),M.add(4-(M.dayOfWeek()||7),"d");var T=this.toJD(c,u,g)-M.toJD();return 1+Math.floor(T/7)},monthsInYear:function(c){return this.leapYear(c)?13:12},daysInMonth:function(c,u){c.year&&(u=c.month(),c=c.year()),c=this._validateYear(c);var g=r[c-r[0]],f=g>>13,w=f?12:11;if(u>w)throw m.local.invalidMonth.replace(/\{0\}/,this.local.name);var h=g&1<<12-u?30:29;return h},weekDay:function(c,u,g){return(this.dayOfWeek(c,u,g)||7)<6},toJD:function(c,u,g){var f=this._validate(c,h,g,m.local.invalidDate);c=this._validateYear(f.year()),u=f.month(),g=f.day();var w=this.isIntercalaryMonth(c,u),h=this.toChineseMonth(c,u),o=l(c,h,g,w);return i.toJD(o.year,o.month,o.day)},fromJD:function(c){var u=i.fromJD(c),g=n(u.year(),u.month(),u.day()),f=this.toMonthIndex(g.year,g.month,g.isIntercalary);return this.newDate(g.year,f,g.day)},fromString:function(c){var u=c.match(A),g=this._validateYear(+u[1]),f=+u[2],w=!!u[3],h=this.toMonthIndex(g,f,w),o=+u[4];return this.newDate(g,h,o)},add:function(c,u,g){var f=c.year(),w=c.month(),h=this.isIntercalaryMonth(f,w),o=this.toChineseMonth(f,w),d=Object.getPrototypeOf(L.prototype).add.call(this,c,u,g);if(g==="y"){var M=d.year(),T=d.month(),C=this.isIntercalaryMonth(M,o),x=h&&C?this.toMonthIndex(M,o,!0):this.toMonthIndex(M,o,!1);x!==T&&d.month(x)}return d}});var A=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,v=/^\d?\d[iI]?/m,p=/^闰?十?[一二三四五六七八九]?月/m,t=/^闰?十?[一二三四五六七八九]?/m;m.calendars.chinese=L;var r=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],s=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904];function n(c,u,g,f){var w,h;if(typeof c=="object")w=c,h=u||{};else{var o=typeof c=="number"&&c>=1888&&c<=2111;if(!o)throw new Error("Solar year outside range 1888-2111");var d=typeof u=="number"&&u>=1&&u<=12;if(!d)throw new Error("Solar month outside range 1 - 12");var M=typeof g=="number"&&g>=1&&g<=31;if(!M)throw new Error("Solar day outside range 1 - 31");w={year:c,month:u,day:g},h=f||{}}var T=s[w.year-s[0]],C=w.year<<9|w.month<<5|w.day;h.year=C>=T?w.year:w.year-1,T=s[h.year-s[0]];var x=T>>9&4095,S=T>>5&15,b=T&31,a,E=new Date(x,S-1,b),y=new Date(w.year,w.month-1,w.day);a=Math.round((y-E)/864e5);var z=r[h.year-r[0]],I;for(I=0;I<13;I++){var B=z&1<<12-I?30:29;if(a>13;return!k||I=1888&&c<=2111;if(!d)throw new Error("Lunar year outside range 1888-2111");var M=typeof u=="number"&&u>=1&&u<=12;if(!M)throw new Error("Lunar month outside range 1 - 12");var T=typeof g=="number"&&g>=1&&g<=30;if(!T)throw new Error("Lunar day outside range 1 - 30");var C;typeof f=="object"?(C=!1,h=f):(C=!!f,h=w||{}),o={year:c,month:u,day:g,isIntercalary:C}}var x;x=o.day-1;var S=r[o.year-r[0]],b=S>>13,a;b&&(o.month>b||o.isIntercalary)?a=o.month:a=o.month-1;for(var E=0;E>9&4095,B=z>>5&15,k=z&31,O=new Date(I,B-1,k+x);return h.year=O.getFullYear(),h.month=1+O.getMonth(),h.day=O.getDate(),h}},38751:function(G,V,e){var m=e(63489),P=e(56131);function i(L){this.local=this.regionalOptions[L||""]||this.regionalOptions[""]}i.prototype=new m.baseCalendar,P(i.prototype,{name:"Coptic",jdEpoch:18250295e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(v){var A=this._validate(v,this.minMonth,this.minDay,m.local.invalidYear),v=A.year()+(A.year()<0?1:0);return v%4===3||v%4===-1},monthsInYear:function(L){return this._validate(L,this.minMonth,this.minDay,m.local.invalidYear||m.regionalOptions[""].invalidYear),13},weekOfYear:function(L,A,v){var p=this.newDate(L,A,v);return p.add(-p.dayOfWeek(),"d"),Math.floor((p.dayOfYear()-1)/7)+1},daysInMonth:function(L,A){var v=this._validate(L,A,this.minDay,m.local.invalidMonth);return this.daysPerMonth[v.month()-1]+(v.month()===13&&this.leapYear(v.year())?1:0)},weekDay:function(L,A,v){return(this.dayOfWeek(L,A,v)||7)<6},toJD:function(L,A,v){var p=this._validate(L,A,v,m.local.invalidDate);return L=p.year(),L<0&&L++,p.day()+(p.month()-1)*30+(L-1)*365+Math.floor(L/4)+this.jdEpoch-1},fromJD:function(L){var A=Math.floor(L)+.5-this.jdEpoch,v=Math.floor((A-Math.floor((A+366)/1461))/365)+1;v<=0&&v--,A=Math.floor(L)+.5-this.newDate(v,1,1).toJD();var p=Math.floor(A/30)+1,t=A-(p-1)*30+1;return this.newDate(v,p,t)}}),m.calendars.coptic=i},86825:function(G,V,e){var m=e(63489),P=e(56131);function i(A){this.local=this.regionalOptions[A||""]||this.regionalOptions[""]}i.prototype=new m.baseCalendar,P(i.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(A){return this._validate(A,this.minMonth,this.minDay,m.local.invalidYear),!1},monthsInYear:function(A){return this._validate(A,this.minMonth,this.minDay,m.local.invalidYear),13},daysInYear:function(A){return this._validate(A,this.minMonth,this.minDay,m.local.invalidYear),400},weekOfYear:function(A,v,p){var t=this.newDate(A,v,p);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/8)+1},daysInMonth:function(A,v){var p=this._validate(A,v,this.minDay,m.local.invalidMonth);return this.daysPerMonth[p.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(A,v,p){var t=this._validate(A,v,p,m.local.invalidDate);return(t.day()+1)%8},weekDay:function(A,v,p){var t=this.dayOfWeek(A,v,p);return t>=2&&t<=6},extraInfo:function(A,v,p){var t=this._validate(A,v,p,m.local.invalidDate);return{century:L[Math.floor((t.year()-1)/100)+1]||""}},toJD:function(A,v,p){var t=this._validate(A,v,p,m.local.invalidDate);return A=t.year()+(t.year()<0?1:0),v=t.month(),p=t.day(),p+(v>1?16:0)+(v>2?(v-2)*32:0)+(A-1)*400+this.jdEpoch-1},fromJD:function(A){A=Math.floor(A+.5)-Math.floor(this.jdEpoch)-1;var v=Math.floor(A/400)+1;A-=(v-1)*400,A+=A>15?16:0;var p=Math.floor(A/32)+1,t=A-(p-1)*32+1;return this.newDate(v<=0?v-1:v,p,t)}});var L={20:"Fruitbat",21:"Anchovy"};m.calendars.discworld=i},37715:function(G,V,e){var m=e(63489),P=e(56131);function i(L){this.local=this.regionalOptions[L||""]||this.regionalOptions[""]}i.prototype=new m.baseCalendar,P(i.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(v){var A=this._validate(v,this.minMonth,this.minDay,m.local.invalidYear),v=A.year()+(A.year()<0?1:0);return v%4===3||v%4===-1},monthsInYear:function(L){return this._validate(L,this.minMonth,this.minDay,m.local.invalidYear||m.regionalOptions[""].invalidYear),13},weekOfYear:function(L,A,v){var p=this.newDate(L,A,v);return p.add(-p.dayOfWeek(),"d"),Math.floor((p.dayOfYear()-1)/7)+1},daysInMonth:function(L,A){var v=this._validate(L,A,this.minDay,m.local.invalidMonth);return this.daysPerMonth[v.month()-1]+(v.month()===13&&this.leapYear(v.year())?1:0)},weekDay:function(L,A,v){return(this.dayOfWeek(L,A,v)||7)<6},toJD:function(L,A,v){var p=this._validate(L,A,v,m.local.invalidDate);return L=p.year(),L<0&&L++,p.day()+(p.month()-1)*30+(L-1)*365+Math.floor(L/4)+this.jdEpoch-1},fromJD:function(L){var A=Math.floor(L)+.5-this.jdEpoch,v=Math.floor((A-Math.floor((A+366)/1461))/365)+1;v<=0&&v--,A=Math.floor(L)+.5-this.newDate(v,1,1).toJD();var p=Math.floor(A/30)+1,t=A-(p-1)*30+1;return this.newDate(v,p,t)}}),m.calendars.ethiopian=i},99384:function(G,V,e){var m=e(63489),P=e(56131);function i(A){this.local=this.regionalOptions[A||""]||this.regionalOptions[""]}i.prototype=new m.baseCalendar,P(i.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(A){var v=this._validate(A,this.minMonth,this.minDay,m.local.invalidYear);return this._leapYear(v.year())},_leapYear:function(A){return A=A<0?A+1:A,L(A*7+1,19)<7},monthsInYear:function(A){return this._validate(A,this.minMonth,this.minDay,m.local.invalidYear),this._leapYear(A.year?A.year():A)?13:12},weekOfYear:function(A,v,p){var t=this.newDate(A,v,p);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(A){var v=this._validate(A,this.minMonth,this.minDay,m.local.invalidYear);return A=v.year(),this.toJD(A===-1?1:A+1,7,1)-this.toJD(A,7,1)},daysInMonth:function(A,v){return A.year&&(v=A.month(),A=A.year()),this._validate(A,v,this.minDay,m.local.invalidMonth),v===12&&this.leapYear(A)||v===8&&L(this.daysInYear(A),10)===5?30:v===9&&L(this.daysInYear(A),10)===3?29:this.daysPerMonth[v-1]},weekDay:function(A,v,p){return this.dayOfWeek(A,v,p)!==6},extraInfo:function(A,v,p){var t=this._validate(A,v,p,m.local.invalidDate);return{yearType:(this.leapYear(t)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(t)%10-3]}},toJD:function(A,v,p){var t=this._validate(A,v,p,m.local.invalidDate);A=t.year(),v=t.month(),p=t.day();var r=A<=0?A+1:A,s=this.jdEpoch+this._delay1(r)+this._delay2(r)+p+1;if(v<7){for(var n=7;n<=this.monthsInYear(A);n++)s+=this.daysInMonth(A,n);for(var n=1;n=this.toJD(v===-1?1:v+1,7,1);)v++;for(var p=Athis.toJD(v,p,this.daysInMonth(v,p));)p++;var t=A-this.toJD(v,p,1)+1;return this.newDate(v,p,t)}});function L(A,v){return A-v*Math.floor(A/v)}m.calendars.hebrew=i},43805:function(G,V,e){var m=e(63489),P=e(56131);function i(L){this.local=this.regionalOptions[L||""]||this.regionalOptions[""]}i.prototype=new m.baseCalendar,P(i.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(L){var A=this._validate(L,this.minMonth,this.minDay,m.local.invalidYear);return(A.year()*11+14)%30<11},weekOfYear:function(L,A,v){var p=this.newDate(L,A,v);return p.add(-p.dayOfWeek(),"d"),Math.floor((p.dayOfYear()-1)/7)+1},daysInYear:function(L){return this.leapYear(L)?355:354},daysInMonth:function(L,A){var v=this._validate(L,A,this.minDay,m.local.invalidMonth);return this.daysPerMonth[v.month()-1]+(v.month()===12&&this.leapYear(v.year())?1:0)},weekDay:function(L,A,v){return this.dayOfWeek(L,A,v)!==5},toJD:function(L,A,v){var p=this._validate(L,A,v,m.local.invalidDate);return L=p.year(),A=p.month(),v=p.day(),L=L<=0?L+1:L,v+Math.ceil(29.5*(A-1))+(L-1)*354+Math.floor((3+11*L)/30)+this.jdEpoch-1},fromJD:function(L){L=Math.floor(L)+.5;var A=Math.floor((30*(L-this.jdEpoch)+10646)/10631);A=A<=0?A-1:A;var v=Math.min(12,Math.ceil((L-29-this.toJD(A,1,1))/29.5)+1),p=L-this.toJD(A,v,1)+1;return this.newDate(A,v,p)}}),m.calendars.islamic=i},88874:function(G,V,e){var m=e(63489),P=e(56131);function i(L){this.local=this.regionalOptions[L||""]||this.regionalOptions[""]}i.prototype=new m.baseCalendar,P(i.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(v){var A=this._validate(v,this.minMonth,this.minDay,m.local.invalidYear),v=A.year()<0?A.year()+1:A.year();return v%4===0},weekOfYear:function(L,A,v){var p=this.newDate(L,A,v);return p.add(4-(p.dayOfWeek()||7),"d"),Math.floor((p.dayOfYear()-1)/7)+1},daysInMonth:function(L,A){var v=this._validate(L,A,this.minDay,m.local.invalidMonth);return this.daysPerMonth[v.month()-1]+(v.month()===2&&this.leapYear(v.year())?1:0)},weekDay:function(L,A,v){return(this.dayOfWeek(L,A,v)||7)<6},toJD:function(L,A,v){var p=this._validate(L,A,v,m.local.invalidDate);return L=p.year(),A=p.month(),v=p.day(),L<0&&L++,A<=2&&(L--,A+=12),Math.floor(365.25*(L+4716))+Math.floor(30.6001*(A+1))+v-1524.5},fromJD:function(L){var A=Math.floor(L+.5),v=A+1524,p=Math.floor((v-122.1)/365.25),t=Math.floor(365.25*p),r=Math.floor((v-t)/30.6001),s=r-Math.floor(r<14?1:13),n=p-Math.floor(s>2?4716:4715),l=v-t-Math.floor(30.6001*r);return n<=0&&n--,this.newDate(n,s,l)}}),m.calendars.julian=i},83290:function(G,V,e){var m=e(63489),P=e(56131);function i(v){this.local=this.regionalOptions[v||""]||this.regionalOptions[""]}i.prototype=new m.baseCalendar,P(i.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(v){return this._validate(v,this.minMonth,this.minDay,m.local.invalidYear),!1},formatYear:function(v){var p=this._validate(v,this.minMonth,this.minDay,m.local.invalidYear);v=p.year();var t=Math.floor(v/400);v=v%400,v+=v<0?400:0;var r=Math.floor(v/20);return t+"."+r+"."+v%20},forYear:function(v){if(v=v.split("."),v.length<3)throw"Invalid Mayan year";for(var p=0,t=0;t19||t>0&&r<0)throw"Invalid Mayan year";p=p*20+r}return p},monthsInYear:function(v){return this._validate(v,this.minMonth,this.minDay,m.local.invalidYear),18},weekOfYear:function(v,p,t){return this._validate(v,p,t,m.local.invalidDate),0},daysInYear:function(v){return this._validate(v,this.minMonth,this.minDay,m.local.invalidYear),360},daysInMonth:function(v,p){return this._validate(v,p,this.minDay,m.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(v,p,t){var r=this._validate(v,p,t,m.local.invalidDate);return r.day()},weekDay:function(v,p,t){return this._validate(v,p,t,m.local.invalidDate),!0},extraInfo:function(v,p,t){var r=this._validate(v,p,t,m.local.invalidDate),s=r.toJD(),n=this._toHaab(s),l=this._toTzolkin(s);return{haabMonthName:this.local.haabMonths[n[0]-1],haabMonth:n[0],haabDay:n[1],tzolkinDayName:this.local.tzolkinMonths[l[0]-1],tzolkinDay:l[0],tzolkinTrecena:l[1]}},_toHaab:function(v){v-=this.jdEpoch;var p=L(v+8+(18-1)*20,365);return[Math.floor(p/20)+1,L(p,20)]},_toTzolkin:function(v){return v-=this.jdEpoch,[A(v+20,20),A(v+4,13)]},toJD:function(v,p,t){var r=this._validate(v,p,t,m.local.invalidDate);return r.day()+r.month()*20+r.year()*360+this.jdEpoch},fromJD:function(v){v=Math.floor(v)+.5-this.jdEpoch;var p=Math.floor(v/360);v=v%360,v+=v<0?360:0;var t=Math.floor(v/20),r=v%20;return this.newDate(p,t,r)}});function L(v,p){return v-p*Math.floor(v/p)}function A(v,p){return L(v-1,p)+1}m.calendars.mayan=i},29108:function(G,V,e){var m=e(63489),P=e(56131);function i(A){this.local=this.regionalOptions[A||""]||this.regionalOptions[""]}i.prototype=new m.baseCalendar;var L=m.instance("gregorian");P(i.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(A){var v=this._validate(A,this.minMonth,this.minDay,m.local.invalidYear||m.regionalOptions[""].invalidYear);return L.leapYear(v.year()+(v.year()<1?1:0)+1469)},weekOfYear:function(A,v,p){var t=this.newDate(A,v,p);return t.add(1-(t.dayOfWeek()||7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(A,v){var p=this._validate(A,v,this.minDay,m.local.invalidMonth);return this.daysPerMonth[p.month()-1]+(p.month()===12&&this.leapYear(p.year())?1:0)},weekDay:function(A,v,p){return(this.dayOfWeek(A,v,p)||7)<6},toJD:function(r,v,p){var t=this._validate(r,v,p,m.local.invalidMonth),r=t.year();r<0&&r++;for(var s=t.day(),n=1;n=this.toJD(v+1,1,1);)v++;for(var p=A-Math.floor(this.toJD(v,1,1)+.5)+1,t=1;p>this.daysInMonth(v,t);)p-=this.daysInMonth(v,t),t++;return this.newDate(v,t,p)}}),m.calendars.nanakshahi=i},55422:function(G,V,e){var m=e(63489),P=e(56131);function i(L){this.local=this.regionalOptions[L||""]||this.regionalOptions[""]}i.prototype=new m.baseCalendar,P(i.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(L){return this.daysInYear(L)!==this.daysPerYear},weekOfYear:function(L,A,v){var p=this.newDate(L,A,v);return p.add(-p.dayOfWeek(),"d"),Math.floor((p.dayOfYear()-1)/7)+1},daysInYear:function(L){var A=this._validate(L,this.minMonth,this.minDay,m.local.invalidYear);if(L=A.year(),typeof this.NEPALI_CALENDAR_DATA[L]>"u")return this.daysPerYear;for(var v=0,p=this.minMonth;p<=12;p++)v+=this.NEPALI_CALENDAR_DATA[L][p];return v},daysInMonth:function(L,A){return L.year&&(A=L.month(),L=L.year()),this._validate(L,A,this.minDay,m.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[L]>"u"?this.daysPerMonth[A-1]:this.NEPALI_CALENDAR_DATA[L][A]},weekDay:function(L,A,v){return this.dayOfWeek(L,A,v)!==6},toJD:function(L,A,v){var p=this._validate(L,A,v,m.local.invalidDate);L=p.year(),A=p.month(),v=p.day();var t=m.instance(),r=0,s=A,n=L;this._createMissingCalendarData(L);var l=L-(s>9||s===9&&v>=this.NEPALI_CALENDAR_DATA[n][0]?56:57);for(A!==9&&(r=v,s--);s!==9;)s<=0&&(s=12,n--),r+=this.NEPALI_CALENDAR_DATA[n][s],s--;return A===9?(r+=v-this.NEPALI_CALENDAR_DATA[n][0],r<0&&(r+=t.daysInYear(l))):r+=this.NEPALI_CALENDAR_DATA[n][9]-this.NEPALI_CALENDAR_DATA[n][0],t.newDate(l,1,1).add(r,"d").toJD()},fromJD:function(L){var A=m.instance(),v=A.fromJD(L),p=v.year(),t=v.dayOfYear(),r=p+56;this._createMissingCalendarData(r);for(var s=9,n=this.NEPALI_CALENDAR_DATA[r][0],l=this.NEPALI_CALENDAR_DATA[r][s]-n+1;t>l;)s++,s>12&&(s=1,r++),l+=this.NEPALI_CALENDAR_DATA[r][s];var c=this.NEPALI_CALENDAR_DATA[r][s]-(l-t);return this.newDate(r,s,c)},_createMissingCalendarData:function(L){var A=this.daysPerMonth.slice(0);A.unshift(17);for(var v=L-1;v"u"&&(this.NEPALI_CALENDAR_DATA[v]=A)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),m.calendars.nepali=i},94320:function(G,V,e){var m=e(63489),P=e(56131);function i(A){this.local=this.regionalOptions[A||""]||this.regionalOptions[""]}i.prototype=new m.baseCalendar,P(i.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Chæharshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Chæ","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(A){var v=this._validate(A,this.minMonth,this.minDay,m.local.invalidYear);return((v.year()-(v.year()>0?474:473))%2820+474+38)*682%2816<682},weekOfYear:function(A,v,p){var t=this.newDate(A,v,p);return t.add(-((t.dayOfWeek()+1)%7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(A,v){var p=this._validate(A,v,this.minDay,m.local.invalidMonth);return this.daysPerMonth[p.month()-1]+(p.month()===12&&this.leapYear(p.year())?1:0)},weekDay:function(A,v,p){return this.dayOfWeek(A,v,p)!==5},toJD:function(A,v,p){var t=this._validate(A,v,p,m.local.invalidDate);A=t.year(),v=t.month(),p=t.day();var r=A-(A>=0?474:473),s=474+L(r,2820);return p+(v<=7?(v-1)*31:(v-1)*30+6)+Math.floor((s*682-110)/2816)+(s-1)*365+Math.floor(r/2820)*1029983+this.jdEpoch-1},fromJD:function(A){A=Math.floor(A)+.5;var v=A-this.toJD(475,1,1),p=Math.floor(v/1029983),t=L(v,1029983),r=2820;if(t!==1029982){var s=Math.floor(t/366),n=L(t,366);r=Math.floor((2134*s+2816*n+2815)/1028522)+s+1}var l=r+2820*p+474;l=l<=0?l-1:l;var c=A-this.toJD(l,1,1)+1,u=c<=186?Math.ceil(c/31):Math.ceil((c-6)/30),g=A-this.toJD(l,u,1)+1;return this.newDate(l,u,g)}});function L(A,v){return A-v*Math.floor(A/v)}m.calendars.persian=i,m.calendars.jalali=i},31320:function(G,V,e){var m=e(63489),P=e(56131),i=m.instance();function L(A){this.local=this.regionalOptions[A||""]||this.regionalOptions[""]}L.prototype=new m.baseCalendar,P(L.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(p){var v=this._validate(p,this.minMonth,this.minDay,m.local.invalidYear),p=this._t2gYear(v.year());return i.leapYear(p)},weekOfYear:function(r,v,p){var t=this._validate(r,this.minMonth,this.minDay,m.local.invalidYear),r=this._t2gYear(t.year());return i.weekOfYear(r,t.month(),t.day())},daysInMonth:function(A,v){var p=this._validate(A,v,this.minDay,m.local.invalidMonth);return this.daysPerMonth[p.month()-1]+(p.month()===2&&this.leapYear(p.year())?1:0)},weekDay:function(A,v,p){return(this.dayOfWeek(A,v,p)||7)<6},toJD:function(r,v,p){var t=this._validate(r,v,p,m.local.invalidDate),r=this._t2gYear(t.year());return i.toJD(r,t.month(),t.day())},fromJD:function(A){var v=i.fromJD(A),p=this._g2tYear(v.year());return this.newDate(p,v.month(),v.day())},_t2gYear:function(A){return A+this.yearsOffset+(A>=-this.yearsOffset&&A<=-1?1:0)},_g2tYear:function(A){return A-this.yearsOffset-(A>=1&&A<=this.yearsOffset?1:0)}}),m.calendars.taiwan=L},51367:function(G,V,e){var m=e(63489),P=e(56131),i=m.instance();function L(A){this.local=this.regionalOptions[A||""]||this.regionalOptions[""]}L.prototype=new m.baseCalendar,P(L.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(p){var v=this._validate(p,this.minMonth,this.minDay,m.local.invalidYear),p=this._t2gYear(v.year());return i.leapYear(p)},weekOfYear:function(r,v,p){var t=this._validate(r,this.minMonth,this.minDay,m.local.invalidYear),r=this._t2gYear(t.year());return i.weekOfYear(r,t.month(),t.day())},daysInMonth:function(A,v){var p=this._validate(A,v,this.minDay,m.local.invalidMonth);return this.daysPerMonth[p.month()-1]+(p.month()===2&&this.leapYear(p.year())?1:0)},weekDay:function(A,v,p){return(this.dayOfWeek(A,v,p)||7)<6},toJD:function(r,v,p){var t=this._validate(r,v,p,m.local.invalidDate),r=this._t2gYear(t.year());return i.toJD(r,t.month(),t.day())},fromJD:function(A){var v=i.fromJD(A),p=this._g2tYear(v.year());return this.newDate(p,v.month(),v.day())},_t2gYear:function(A){return A-this.yearsOffset-(A>=1&&A<=this.yearsOffset?1:0)},_g2tYear:function(A){return A+this.yearsOffset+(A>=-this.yearsOffset&&A<=-1?1:0)}}),m.calendars.thai=L},21457:function(G,V,e){var m=e(63489),P=e(56131);function i(A){this.local=this.regionalOptions[A||""]||this.regionalOptions[""]}i.prototype=new m.baseCalendar,P(i.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(A){var v=this._validate(A,this.minMonth,this.minDay,m.local.invalidYear);return this.daysInYear(v.year())===355},weekOfYear:function(A,v,p){var t=this.newDate(A,v,p);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(A){for(var v=0,p=1;p<=12;p++)v+=this.daysInMonth(A,p);return v},daysInMonth:function(A,v){for(var p=this._validate(A,v,this.minDay,m.local.invalidMonth),t=p.toJD()-24e5+.5,r=0,s=0;st)return L[r]-L[r-1];r++}return 30},weekDay:function(A,v,p){return this.dayOfWeek(A,v,p)!==5},toJD:function(A,v,p){var t=this._validate(A,v,p,m.local.invalidDate),r=12*(t.year()-1)+t.month()-15292,s=t.day()+L[r-1]-1;return s+24e5-.5},fromJD:function(A){for(var v=A-24e5+.5,p=0,t=0;tv);t++)p++;var r=p+15292,s=Math.floor((r-1)/12),n=s+1,l=r-12*s,c=v-L[p-1]+1;return this.newDate(n,l,c)},isValid:function(A,v,p){var t=m.baseCalendar.prototype.isValid.apply(this,arguments);return t&&(A=A.year!=null?A.year:A,t=A>=1276&&A<=1500),t},_validate:function(A,v,p,t){var r=m.baseCalendar.prototype._validate.apply(this,arguments);if(r.year<1276||r.year>1500)throw t.replace(/\{0\}/,this.local.name);return r}}),m.calendars.ummalqura=i;var L=[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(G,V,e){var m=e(56131);function P(){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={}}m(P.prototype,{instance:function(t,r){t=(t||"gregorian").toLowerCase(),r=r||"";var s=this._localCals[t+"-"+r];if(!s&&this.calendars[t]&&(s=new this.calendars[t](r),this._localCals[t+"-"+r]=s),!s)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,t);return s},newDate:function(t,r,s,n,l){return n=(t!=null&&t.year?t.calendar():typeof n=="string"?this.instance(n,l):n)||this.instance(),n.newDate(t,r,s)},substituteDigits:function(t){return function(r){return(r+"").replace(/[0-9]/g,function(s){return t[s]})}},substituteChineseDigits:function(t,r){return function(s){for(var n="",l=0;s>0;){var c=s%10;n=(c===0?"":t[c]+r[l])+n,l++,s=Math.floor(s/10)}return n.indexOf(t[1]+r[1])===0&&(n=n.substr(1)),n||t[0]}}});function i(t,r,s,n){if(this._calendar=t,this._year=r,this._month=s,this._day=n,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(p.local.invalidDate||p.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function L(t,r){return t=""+t,"000000".substring(0,r-t.length)+t}m(i.prototype,{newDate:function(t,r,s){return this._calendar.newDate(t??this,r,s)},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,r,s){if(!this._calendar.isValid(t,r,s))throw(p.local.invalidDate||p.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=t,this._month=r,this._day=s,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,r){return this._calendar.add(this,t,r)},set:function(t,r){return this._calendar.set(this,t,r)},compareTo:function(t){if(this._calendar.name!==t._calendar.name)throw(p.local.differentCalendars||p.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,t._calendar.local.name);var r=this._year!==t._year?this._year-t._year:this._month!==t._month?this.monthOfYear()-t.monthOfYear():this._day-t._day;return r===0?0:r<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?"-":"")+L(Math.abs(this.year()),4)+"-"+L(this.month(),2)+"-"+L(this.day(),2)}});function A(){this.shortYearCutoff="+10"}m(A.prototype,{_validateLevel:0,newDate:function(t,r,s){return t==null?this.today():(t.year&&(this._validate(t,r,s,p.local.invalidDate||p.regionalOptions[""].invalidDate),s=t.day(),r=t.month(),t=t.year()),new i(this,t,r,s))},today:function(){return this.fromJSDate(new Date)},epoch:function(t){var r=this._validate(t,this.minMonth,this.minDay,p.local.invalidYear||p.regionalOptions[""].invalidYear);return r.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(t){var r=this._validate(t,this.minMonth,this.minDay,p.local.invalidYear||p.regionalOptions[""].invalidYear);return(r.year()<0?"-":"")+L(Math.abs(r.year()),4)},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,p.local.invalidYear||p.regionalOptions[""].invalidYear),12},monthOfYear:function(t,r){var s=this._validate(t,r,this.minDay,p.local.invalidMonth||p.regionalOptions[""].invalidMonth);return(s.month()+this.monthsInYear(s)-this.firstMonth)%this.monthsInYear(s)+this.minMonth},fromMonthOfYear:function(t,r){var s=(r+this.firstMonth-2*this.minMonth)%this.monthsInYear(t)+this.minMonth;return this._validate(t,s,this.minDay,p.local.invalidMonth||p.regionalOptions[""].invalidMonth),s},daysInYear:function(t){var r=this._validate(t,this.minMonth,this.minDay,p.local.invalidYear||p.regionalOptions[""].invalidYear);return this.leapYear(r)?366:365},dayOfYear:function(t,r,s){var n=this._validate(t,r,s,p.local.invalidDate||p.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,r,s){var n=this._validate(t,r,s,p.local.invalidDate||p.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(t,r,s){return this._validate(t,r,s,p.local.invalidDate||p.regionalOptions[""].invalidDate),{}},add:function(t,r,s){return this._validate(t,this.minMonth,this.minDay,p.local.invalidDate||p.regionalOptions[""].invalidDate),this._correctAdd(t,this._add(t,r,s),r,s)},_add:function(t,r,s){if(this._validateLevel++,s==="d"||s==="w"){var n=t.toJD()+r*(s==="w"?this.daysInWeek():1),l=t.calendar().fromJD(n);return this._validateLevel--,[l.year(),l.month(),l.day()]}try{var c=t.year()+(s==="y"?r:0),u=t.monthOfYear()+(s==="m"?r:0),l=t.day(),g=function(h){for(;uo-1+h.minMonth;)c++,u-=o,o=h.monthsInYear(c)};s==="y"?(t.month()!==this.fromMonthOfYear(c,u)&&(u=this.newDate(c,t.month(),this.minDay).monthOfYear()),u=Math.min(u,this.monthsInYear(c)),l=Math.min(l,this.daysInMonth(c,this.fromMonthOfYear(c,u)))):s==="m"&&(g(this),l=Math.min(l,this.daysInMonth(c,this.fromMonthOfYear(c,u))));var f=[c,this.fromMonthOfYear(c,u),l];return this._validateLevel--,f}catch(w){throw this._validateLevel--,w}},_correctAdd:function(t,r,s,n){if(!this.hasYearZero&&(n==="y"||n==="m")&&(r[0]===0||t.year()>0!=r[0]>0)){var l={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],c=s<0?-1:1;r=this._add(t,s*l[0]+c*l[1],l[2])}return t.date(r[0],r[1],r[2])},set:function(t,r,s){this._validate(t,this.minMonth,this.minDay,p.local.invalidDate||p.regionalOptions[""].invalidDate);var n=s==="y"?r:t.year(),l=s==="m"?r:t.month(),c=s==="d"?r:t.day();return(s==="y"||s==="m")&&(c=Math.min(c,this.daysInMonth(n,l))),t.date(n,l,c)},isValid:function(t,r,s){this._validateLevel++;var n=this.hasYearZero||t!==0;if(n){var l=this.newDate(t,r,this.minDay);n=r>=this.minMonth&&r-this.minMonth=this.minDay&&s-this.minDay13.5?13:1),w=l-(f>2.5?4716:4715);return w<=0&&w--,this.newDate(w,f,g)},toJSDate:function(t,r,s){var n=this._validate(t,r,s,p.local.invalidDate||p.regionalOptions[""].invalidDate),l=new Date(n.year(),n.month()-1,n.day());return l.setHours(0),l.setMinutes(0),l.setSeconds(0),l.setMilliseconds(0),l.setHours(l.getHours()>12?l.getHours()+2:0),l},fromJSDate:function(t){return this.newDate(t.getFullYear(),t.getMonth()+1,t.getDate())}});var p=G.exports=new P;p.cdate=i,p.baseCalendar=A,p.calendars.gregorian=v},94338:function(G,V,e){var m=e(56131),P=e(63489);m(P.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"}),P.local=P.regionalOptions[""],m(P.cdate.prototype,{formatDate:function(i,L){return typeof i!="string"&&(L=i,i=""),this._calendar.formatDate(i||"",this,L)}}),m(P.baseCalendar.prototype,{UNIX_EPOCH:P.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:P.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(i,L,A){if(typeof i!="string"&&(A=L,L=i,i=""),!L)return"";if(L.calendar()!==this)throw P.local.invalidFormat||P.regionalOptions[""].invalidFormat;i=i||this.local.dateFormat,A=A||{};var v=A.dayNamesShort||this.local.dayNamesShort,p=A.dayNames||this.local.dayNames,t=A.monthNumbers||this.local.monthNumbers,r=A.monthNamesShort||this.local.monthNamesShort,s=A.monthNames||this.local.monthNames;A.calculateWeek||this.local.calculateWeek;for(var n=function(T,C){for(var x=1;M+x1},l=function(T,C,x,S){var b=""+C;if(n(T,S))for(;b.length1},M=function(I,B){var k=d(I,B),O=[2,3,k?4:2,k?4:2,10,11,20]["oyYJ@!".indexOf(I)+1],N=new RegExp("^-?\\d{1,"+O+"}"),_=L.substring(a).match(N);if(!_)throw(P.local.missingNumberAt||P.regionalOptions[""].missingNumberAt).replace(/\{0\}/,a);return a+=_[0].length,parseInt(_[0],10)},T=this,C=function(){if(typeof s=="function"){d("m");var I=s.call(T,L.substring(a));return a+=I.length,I}return M("m")},x=function(I,B,k,O){for(var N=d(I,O)?k:B,_=0;_-1){g=1,f=w;for(var z=this.daysInMonth(u,g);f>z;z=this.daysInMonth(u,g))g++,f-=z}return c>-1?this.fromJD(c):this.newDate(u,g,f)},determineDate:function(i,L,A,v,p){A&&typeof A!="object"&&(p=v,v=A,A=null),typeof v!="string"&&(p=v,v="");var t=this,r=function(s){try{return t.parseDate(v,s,p)}catch{}s=s.toLowerCase();for(var n=(s.match(/^c/)&&A?A.newDate():null)||t.today(),l=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,c=l.exec(s);c;)n.add(parseInt(c[1],10),c[2]||"d"),c=l.exec(s);return n};return L=L?L.newDate():null,i=i==null?L:typeof i=="string"?r(i):typeof i=="number"?isNaN(i)||i===1/0||i===-1/0?L:t.today().add(i,"d"):t.newDate(i),i}})},69862:function(){},40964:function(){},72077:function(G,V,e){var m=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],P=typeof globalThis>"u"?e.g:globalThis;G.exports=function(){for(var L=[],A=0;A>8&15|Se>>4&240,Se>>4&15|Se&240,(Se&15)<<4|Se&15,1):Ue===8?C(Se>>24&255,Se>>16&255,Se>>8&255,(Se&255)/255):Ue===4?C(Se>>12&15|Se>>8&240,Se>>8&15|Se>>4&240,Se>>4&15|Se&240,((Se&15)<<4|Se&15)/255):null):(Se=s.exec(xe))?new b(Se[1],Se[2],Se[3],1):(Se=n.exec(xe))?new b(Se[1]*255/100,Se[2]*255/100,Se[3]*255/100,1):(Se=l.exec(xe))?C(Se[1],Se[2],Se[3],Se[4]):(Se=c.exec(xe))?C(Se[1]*255/100,Se[2]*255/100,Se[3]*255/100,Se[4]):(Se=u.exec(xe))?k(Se[1],Se[2]/100,Se[3]/100,1):(Se=g.exec(xe))?k(Se[1],Se[2]/100,Se[3]/100,Se[4]):f.hasOwnProperty(xe)?T(f[xe]):xe==="transparent"?new b(NaN,NaN,NaN,0):null}function T(xe){return new b(xe>>16&255,xe>>8&255,xe&255,1)}function C(xe,Se,Ue,He){return He<=0&&(xe=Se=Ue=NaN),new b(xe,Se,Ue,He)}function x(xe){return xe instanceof i||(xe=M(xe)),xe?(xe=xe.rgb(),new b(xe.r,xe.g,xe.b,xe.opacity)):new b}function S(xe,Se,Ue,He){return arguments.length===1?x(xe):new b(xe,Se,Ue,He??1)}function b(xe,Se,Ue,He){this.r=+xe,this.g=+Se,this.b=+Ue,this.opacity=+He}m(b,S,P(i,{brighter:function(Se){return Se=Se==null?A:Math.pow(A,Se),new b(this.r*Se,this.g*Se,this.b*Se,this.opacity)},darker:function(Se){return Se=Se==null?L:Math.pow(L,Se),new b(this.r*Se,this.g*Se,this.b*Se,this.opacity)},rgb:function(){return this},clamp:function(){return new b(I(this.r),I(this.g),I(this.b),z(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:a,formatHex:a,formatHex8:E,formatRgb:y,toString:y}));function a(){return"#".concat(B(this.r)).concat(B(this.g)).concat(B(this.b))}function E(){return"#".concat(B(this.r)).concat(B(this.g)).concat(B(this.b)).concat(B((isNaN(this.opacity)?1:this.opacity)*255))}function y(){var xe=z(this.opacity);return"".concat(xe===1?"rgb(":"rgba(").concat(I(this.r),", ").concat(I(this.g),", ").concat(I(this.b)).concat(xe===1?")":", ".concat(xe,")"))}function z(xe){return isNaN(xe)?1:Math.max(0,Math.min(1,xe))}function I(xe){return Math.max(0,Math.min(255,Math.round(xe)||0))}function B(xe){return xe=I(xe),(xe<16?"0":"")+xe.toString(16)}function k(xe,Se,Ue,He){return He<=0?xe=Se=Ue=NaN:Ue<=0||Ue>=1?xe=Se=NaN:Se<=0&&(xe=NaN),new _(xe,Se,Ue,He)}function O(xe){if(xe instanceof _)return new _(xe.h,xe.s,xe.l,xe.opacity);if(xe instanceof i||(xe=M(xe)),!xe)return new _;if(xe instanceof _)return xe;xe=xe.rgb();var Se=xe.r/255,Ue=xe.g/255,He=xe.b/255,Fe=Math.min(Se,Ue,He),Ge=Math.max(Se,Ue,He),nt=NaN,qe=Ge-Fe,$e=(Ge+Fe)/2;return qe?(Se===Ge?nt=(Ue-He)/qe+(Ue0&&$e<1?0:nt,new _(nt,qe,$e,xe.opacity)}function N(xe,Se,Ue,He){return arguments.length===1?O(xe):new _(xe,Se,Ue,He??1)}function _(xe,Se,Ue,He){this.h=+xe,this.s=+Se,this.l=+Ue,this.opacity=+He}m(_,N,P(i,{brighter:function(Se){return Se=Se==null?A:Math.pow(A,Se),new _(this.h,this.s,this.l*Se,this.opacity)},darker:function(Se){return Se=Se==null?L:Math.pow(L,Se),new _(this.h,this.s,this.l*Se,this.opacity)},rgb:function(){var Se=this.h%360+(this.h<0)*360,Ue=isNaN(Se)||isNaN(this.s)?0:this.s,He=this.l,Fe=He+(He<.5?He:1-He)*Ue,Ge=2*He-Fe;return new b(J(Se>=240?Se-240:Se+120,Ge,Fe),J(Se,Ge,Fe),J(Se<120?Se+240:Se-120,Ge,Fe),this.opacity)},clamp:function(){return new _(U(this.h),Y(this.s),Y(this.l),z(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 Se=z(this.opacity);return"".concat(Se===1?"hsl(":"hsla(").concat(U(this.h),", ").concat(Y(this.s)*100,"%, ").concat(Y(this.l)*100,"%").concat(Se===1?")":", ".concat(Se,")"))}}));function U(xe){return xe=(xe||0)%360,xe<0?xe+360:xe}function Y(xe){return Math.max(0,Math.min(1,xe||0))}function J(xe,Se,Ue){return(xe<60?Se+(Ue-Se)*xe/60:xe<180?Ue:xe<240?Se+(Ue-Se)*(240-xe)/60:Se)*255}var te=function(xe){return function(){return xe}};function ae(xe,Se){return function(Ue){return xe+Ue*Se}}function ce(xe,Se,Ue){return xe=Math.pow(xe,Ue),Se=Math.pow(Se,Ue)-xe,Ue=1/Ue,function(He){return Math.pow(xe+He*Se,Ue)}}function Q(xe){return(xe=+xe)==1?Z:function(Se,Ue){return Ue-Se?ce(Se,Ue,xe):te(isNaN(Se)?Ue:Se)}}function Z(xe,Se){var Ue=Se-xe;return Ue?ae(xe,Ue):te(isNaN(xe)?Se:xe)}var j=function xe(Se){var Ue=Q(Se);function He(Fe,Ge){var nt=Ue((Fe=S(Fe)).r,(Ge=S(Ge)).r),qe=Ue(Fe.g,Ge.g),$e=Ue(Fe.b,Ge.b),et=Z(Fe.opacity,Ge.opacity);return function(ct){return Fe.r=nt(ct),Fe.g=qe(ct),Fe.b=$e(ct),Fe.opacity=et(ct),Fe+""}}return He.gamma=xe,He}(1);function K(xe,Se){var Ue=Se?Se.length:0,He=xe?Math.min(Ue,xe.length):0,Fe=new Array(He),Ge=new Array(Ue),nt;for(nt=0;ntUe&&(Ge=Se.slice(Ue,Ge),qe[nt]?qe[nt]+=Ge:qe[++nt]=Ge),(He=He[0])===(Fe=Fe[0])?qe[nt]?qe[nt]+=Fe:qe[++nt]=Fe:(qe[++nt]=null,$e.push({i:nt,x:oe(He,Fe)})),Ue=ie.lastIndex;return Ue"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?CE:EE;GT.useSyncExternalStore=jv.useSyncExternalStore!==void 0?jv.useSyncExternalStore:LE;HT.exports=GT;var PE=HT.exports;const Bc=()=>{},ol=Bc(),Yy=Object,Ei=F=>F===ol,Zf=F=>typeof F=="function",Jc=(F,W)=>({...F,...W}),RE=F=>Zf(F.then),b0=new WeakMap;let DE=0;const dp=F=>{const W=typeof F,ue=F&&F.constructor,we=ue==Date;let ke,Xe;if(Yy(F)===F&&!we&&ue!=RegExp){if(ke=b0.get(F),ke)return ke;if(ke=++DE+"~",b0.set(F,ke),ue==Array){for(ke="@",Xe=0;Xekg&&typeof window.requestAnimationFrame!=sx,WT=(F,W)=>{const ue=Gf.get(F);return[()=>!Ei(W)&&F.get(W)||Zy,we=>{if(!Ei(W)){const ke=F.get(W);W in w0||(w0[W]=ke),ue[5](W,Jc(ke,we),ke||Zy)}},ue[6],()=>!Ei(W)&&W in w0?w0[W]:!Ei(W)&&F.get(W)||Zy]};let J1=!0;const kE=()=>J1,[Q1,$1]=kg&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Bc,Bc],FE=()=>{const F=K1&&document.visibilityState;return Ei(F)||F!=="hidden"},_E=F=>(K1&&document.addEventListener("visibilitychange",F),Q1("focus",F),()=>{K1&&document.removeEventListener("visibilitychange",F),$1("focus",F)}),zE=F=>{const W=()=>{J1=!0,F()},ue=()=>{J1=!1};return Q1("online",W),Q1("offline",ue),()=>{$1("online",W),$1("offline",ue)}},OE={isOnline:kE,isVisible:FE},NE={initFocus:_E,initReconnect:zE},Yb=!Hi.useId,pp=!kg||"Deno"in window,BE=F=>IE()?window.requestAnimationFrame(F):setTimeout(F,1),Xy=pp?Fn.useEffect:Fn.useLayoutEffect,jy=typeof navigator<"u"&&navigator.connection,Zb=!pp&&jy&&(["slow-2g","2g"].includes(jy.effectiveType)||jy.saveData),lx=F=>{if(Zf(F))try{F=F()}catch{F=""}const W=F;return F=typeof F=="string"?F:(Array.isArray(F)?F.length:F)?dp(F):"",[F,W]};let UE=0;const q1=()=>++UE,YT=0,ZT=1,XT=2,VE=3;var Dd={__proto__:null,ERROR_REVALIDATE_EVENT:VE,FOCUS_EVENT:YT,MUTATE_EVENT:XT,RECONNECT_EVENT:ZT};async function jT(...F){const[W,ue,we,ke]=F,Xe=Jc({populateCache:!0,throwOnError:!0},typeof ke=="boolean"?{revalidate:ke}:ke||{});let G=Xe.populateCache;const V=Xe.rollbackOnError;let e=Xe.optimisticData;const m=Xe.revalidate!==!1,P=A=>typeof V=="function"?V(A):V!==!1,i=Xe.throwOnError;if(Zf(ue)){const A=ue,v=[],p=W.keys();for(const t of p)!/^\$(inf|sub)\$/.test(t)&&A(W.get(t)._k)&&v.push(t);return Promise.all(v.map(L))}return L(ue);async function L(A){const[v]=lx(A);if(!v)return;const[p,t]=WT(W,v),[r,s,n,l]=Gf.get(W),c=()=>{const T=r[v];return m&&(delete n[v],delete l[v],T&&T[0])?T[0](XT).then(()=>p().data):p().data};if(F.length<3)return c();let u=we,g;const f=q1();s[v]=[f,0];const w=!Ei(e),h=p(),o=h.data,d=h._c,M=Ei(d)?o:d;if(w&&(e=Zf(e)?e(M,o):e,t({data:e,_c:M})),Zf(u))try{u=u(M)}catch(T){g=T}if(u&&RE(u))if(u=await u.catch(T=>{g=T}),f!==s[v][0]){if(g)throw g;return u}else g&&w&&P(g)&&(G=!0,t({data:M,_c:ol}));if(G&&!g)if(Zf(G)){const T=G(u,M);t({data:T,error:ol,_c:ol})}else t({data:u,error:ol,_c:ol});if(s[v][1]=q1(),Promise.resolve(c()).then(()=>{t({_c:ol})}),g){if(i)throw g;return}return u}}const Xb=(F,W)=>{for(const ue in F)F[ue][0]&&F[ue][0](W)},HE=(F,W)=>{if(!Gf.has(F)){const ue=Jc(NE,W),we={},ke=jT.bind(ol,F);let Xe=Bc;const G={},V=(P,i)=>{const L=G[P]||[];return G[P]=L,L.push(i),()=>L.splice(L.indexOf(i),1)},e=(P,i,L)=>{F.set(P,i);const A=G[P];if(A)for(const v of A)v(i,L)},m=()=>{if(!Gf.has(F)&&(Gf.set(F,[we,{},{},{},ke,e,V]),!pp)){const P=ue.initFocus(setTimeout.bind(ol,Xb.bind(ol,we,YT))),i=ue.initReconnect(setTimeout.bind(ol,Xb.bind(ol,we,ZT)));Xe=()=>{P&&P(),i&&i(),Gf.delete(F)}}};return m(),[F,ke,m,Xe]}return[F,Gf.get(F)[4]]},GE=(F,W,ue,we,ke)=>{const Xe=ue.errorRetryCount,G=ke.retryCount,V=~~((Math.random()+.5)*(1<<(G<8?G:8)))*ue.errorRetryInterval;!Ei(Xe)&&G>Xe||setTimeout(we,V,ke)},WE=(F,W)=>dp(F)==dp(W),[KT,YE]=HE(new Map),ZE=Jc({onLoadingSlow:Bc,onSuccess:Bc,onError:Bc,onErrorRetry:GE,onDiscarded:Bc,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Zb?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:Zb?5e3:3e3,compare:WE,isPaused:()=>!1,cache:KT,mutate:YE,fallback:{}},OE),XE=(F,W)=>{const ue=Jc(F,W);if(W){const{use:we,fallback:ke}=F,{use:Xe,fallback:G}=W;we&&Xe&&(ue.use=we.concat(Xe)),ke&&G&&(ue.fallback=Jc(ke,G))}return ue},jE=Fn.createContext({}),KE="$inf$",JT=kg&&window.__SWR_DEVTOOLS_USE__,JE=JT?window.__SWR_DEVTOOLS_USE__:[],QE=()=>{JT&&(window.__SWR_DEVTOOLS_REACT__=Hi)},$E=F=>Zf(F[1])?[F[0],F[1],F[2]||{}]:[F[0],null,(F[1]===null?F[2]:F[1])||{}],qE=()=>Jc(ZE,Fn.useContext(jE)),eC=F=>(W,ue,we)=>F(W,ue&&((...Xe)=>{const[G]=lx(W),[,,,V]=Gf.get(KT);if(G.startsWith(KE))return ue(...Xe);const e=V[G];return Ei(e)?ue(...Xe):(delete V[G],e)}),we),tC=JE.concat(eC),rC=F=>function(...ue){const we=qE(),[ke,Xe,G]=$E(ue),V=XE(we,G);let e=F;const{use:m}=V,P=(m||[]).concat(tC);for(let i=P.length;i--;)e=P[i](e);return e(ke,Xe||V.fetcher||null,V)},nC=(F,W,ue)=>{const we=W[F]||(W[F]=[]);return we.push(ue),()=>{const ke=we.indexOf(ue);ke>=0&&(we[ke]=we[we.length-1],we.pop())}};QE();const jb=Hi.use||(F=>{if(F.status==="pending")throw F;if(F.status==="fulfilled")return F.value;throw F.status==="rejected"?F.reason:(F.status="pending",F.then(W=>{F.status="fulfilled",F.value=W},W=>{F.status="rejected",F.reason=W}),F)}),Ky={dedupe:!0},aC=(F,W,ue)=>{const{cache:we,compare:ke,suspense:Xe,fallbackData:G,revalidateOnMount:V,revalidateIfStale:e,refreshInterval:m,refreshWhenHidden:P,refreshWhenOffline:i,keepPreviousData:L}=ue,[A,v,p,t]=Gf.get(we),[r,s]=lx(F),n=Fn.useRef(!1),l=Fn.useRef(!1),c=Fn.useRef(r),u=Fn.useRef(W),g=Fn.useRef(ue),f=()=>g.current,w=()=>f().isVisible()&&f().isOnline(),[h,o,d,M]=WT(we,r),T=Fn.useRef({}).current,C=Ei(G)?ue.fallback[r]:G,x=(te,ae)=>{for(const ce in T){const Q=ce;if(Q==="data"){if(!ke(te[Q],ae[Q])&&(!Ei(te[Q])||!ke(k,ae[Q])))return!1}else if(ae[Q]!==te[Q])return!1}return!0},S=Fn.useMemo(()=>{const te=(()=>!r||!W?!1:Ei(V)?f().isPaused()||Xe?!1:Ei(e)?!0:e:V)(),ae=ee=>{const oe=Jc(ee);return delete oe._k,te?{isValidating:!0,isLoading:!0,...oe}:oe},ce=h(),Q=M(),Z=ae(ce),j=ce===Q?Z:ae(Q);let K=Z;return[()=>{const ee=ae(h());return x(ee,K)?(K.data=ee.data,K.isLoading=ee.isLoading,K.isValidating=ee.isValidating,K.error=ee.error,K):(K=ee,ee)},()=>j]},[we,r]),b=PE.useSyncExternalStore(Fn.useCallback(te=>d(r,(ae,ce)=>{x(ce,ae)||te()}),[we,r]),S[0],S[1]),a=!n.current,E=A[r]&&A[r].length>0,y=b.data,z=Ei(y)?C:y,I=b.error,B=Fn.useRef(z),k=L?Ei(y)?B.current:y:z,O=(()=>E&&!Ei(I)?!1:a&&!Ei(V)?V:f().isPaused()?!1:Xe?Ei(z)?!1:e:Ei(z)||e)(),N=!!(r&&W&&a&&O),_=Ei(b.isValidating)?N:b.isValidating,U=Ei(b.isLoading)?N:b.isLoading,Y=Fn.useCallback(async te=>{const ae=u.current;if(!r||!ae||l.current||f().isPaused())return!1;let ce,Q,Z=!0;const j=te||{},K=!p[r]||!j.dedupe,ee=()=>Yb?!l.current&&r===c.current&&n.current:r===c.current,oe={isValidating:!1,isLoading:!1},q=()=>{o(oe)},$=()=>{const ie=p[r];ie&&ie[1]===Q&&delete p[r]},le={isValidating:!0};Ei(h().data)&&(le.isLoading=!0);try{if(K&&(o(le),ue.loadingTimeout&&Ei(h().data)&&setTimeout(()=>{Z&&ee()&&f().onLoadingSlow(r,ue)},ue.loadingTimeout),p[r]=[ae(s),q1()]),[ce,Q]=p[r],ce=await ce,K&&setTimeout($,ue.dedupingInterval),!p[r]||p[r][1]!==Q)return K&&ee()&&f().onDiscarded(r),!1;oe.error=ol;const ie=v[r];if(!Ei(ie)&&(Q<=ie[0]||Q<=ie[1]||ie[1]===0))return q(),K&&ee()&&f().onDiscarded(r),!1;const he=h().data;oe.data=ke(he,ce)?he:ce,K&&ee()&&f().onSuccess(ce,r,ue)}catch(ie){$();const he=f(),{shouldRetryOnError:me}=he;he.isPaused()||(oe.error=ie,K&&ee()&&(he.onError(ie,r,he),(me===!0||Zf(me)&&me(ie))&&w()&&he.onErrorRetry(ie,r,he,Me=>{const Te=A[r];Te&&Te[0]&&Te[0](Dd.ERROR_REVALIDATE_EVENT,Me)},{retryCount:(j.retryCount||0)+1,dedupe:!0})))}return Z=!1,q(),!0},[r,we]),J=Fn.useCallback((...te)=>jT(we,c.current,...te),[]);if(Xy(()=>{u.current=W,g.current=ue,Ei(y)||(B.current=y)}),Xy(()=>{if(!r)return;const te=Y.bind(ol,Ky);let ae=0;const Q=nC(r,A,(Z,j={})=>{if(Z==Dd.FOCUS_EVENT){const K=Date.now();f().revalidateOnFocus&&K>ae&&w()&&(ae=K+f().focusThrottleInterval,te())}else if(Z==Dd.RECONNECT_EVENT)f().revalidateOnReconnect&&w()&&te();else{if(Z==Dd.MUTATE_EVENT)return Y();if(Z==Dd.ERROR_REVALIDATE_EVENT)return Y(j)}});return l.current=!1,c.current=r,n.current=!0,o({_k:s}),O&&(Ei(z)||pp?te():BE(te)),()=>{l.current=!0,Q()}},[r]),Xy(()=>{let te;function ae(){const Q=Zf(m)?m(h().data):m;Q&&te!==-1&&(te=setTimeout(ce,Q))}function ce(){!h().error&&(P||f().isVisible())&&(i||f().isOnline())?Y(Ky).then(ae):ae()}return ae(),()=>{te&&(clearTimeout(te),te=-1)}},[m,P,i,r]),Fn.useDebugValue(k),Xe&&Ei(z)&&r){if(!Yb&&pp)throw new Error("Fallback data is required when using suspense in SSR.");u.current=W,g.current=ue,l.current=!1;const te=t[r];if(!Ei(te)){const ae=J(te);jb(ae)}if(Ei(I)){const ae=Y(Ky);Ei(k)||(ae.status="fulfilled",ae.value=!0),jb(ae)}else throw I}return{mutate:J,get data(){return T.data=!0,k},get error(){return T.error=!0,I},get isValidating(){return T.isValidating=!0,_},get isLoading(){return T.isLoading=!0,U}}},iC=rC(aC),oC=yE(xE),sC=cE(oC),lC=Object.assign({},FT,sC),uC=F=>fetch(F).then(W=>W.json());function fC(){const W=new URLSearchParams(window.location.search).get("url")||"/palkkakysely/data.json",[ue,we]=Hi.useState({}),ke=iC(W,uC,{revalidateOnFocus:!1});return ke.data?xa.jsx("div",{children:xa.jsx(zT,{data:ke.data,renderers:lC,onChange:we,...ue})}):ke.error?xa.jsxs(xa.Fragment,{children:["Virhe ladatessa dataa ",W,": ",`${ke.error}`]}):xa.jsxs(xa.Fragment,{children:["Ladataan ",W,"..."]})}const cC=document.getElementById("root"),hC=lT(cC);hC.render(xa.jsx(Hi.StrictMode,{children:xa.jsx(fC,{})}));